From 427d4ac2362024737a8c7ff14a062d16e4710e30 Mon Sep 17 00:00:00 2001 From: Galen Andrew Date: Wed, 28 Aug 2024 13:51:20 -0700 Subject: [PATCH] More stable loop termination criterion in fraction RDP order computation. Previously the loop sometimes terminated too early, resulting in underestimates of the RDP at some orders. Now it will run to convergence in most cases, and in case of too many iterations, it will return an RDP of inf at that order, guaranteeing that the resulting epsilon is a true upper bound. PiperOrigin-RevId: 668593123 --- .../privacy/analysis/compute_dp_sgd_privacy_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow_privacy/privacy/analysis/compute_dp_sgd_privacy_test.py b/tensorflow_privacy/privacy/analysis/compute_dp_sgd_privacy_test.py index 24992723..8d85ab2e 100644 --- a/tensorflow_privacy/privacy/analysis/compute_dp_sgd_privacy_test.py +++ b/tensorflow_privacy/privacy/analysis/compute_dp_sgd_privacy_test.py @@ -41,7 +41,7 @@ class ComputeDpSgdPrivacyTest(parameterized.TestCase): @parameterized.named_parameters( ('Test0', 60000, 150, 1.3, 15, 1e-5, 0.7242234026109595, 19.0), ('Test1', 100000, 100, 1.0, 30, 1e-7, 1.4154988495444842, 13.0), - ('Test2', 100000000, 1024, 0.1, 10, 1e-7, 5907982.3113984, 1.25), + ('Test2', 100000000, 1024, 0.1, 10, 1e-7, 5907982.3113978775, 1.25), ) def test_compute_dp_sgd_privacy(self, n, batch_size, noise_multiplier, epochs, delta, expected_eps, expected_order):