-
Notifications
You must be signed in to change notification settings - Fork 405
Add double mixture privacy losses #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
11be431 to
8c514a9
Compare
|
Hi Jan, sorry for the delayed response. Wanted to follow up on this:
I think it is okay for now, and if someone requests we can work on optimizing later (either internally, or with your help).
It would be good to make sure any behavior specific to these classes are being tested. If you feel this is a lot of added work, we can potentially have you submit the current version and I can make a follow-up change that adds more robust tests. In addition, there are some upcoming changes to the structure of privacy_loss_mechanism that might affect the PR (the amount of work needed to correct the PR for these changes should be pretty small). So it may be best to wait until those changes are out to make a final pull request :) |
All right, let's do that. The existing tests do not look to complicated, so I can also take care of those. |
|
Hi Jan. The changes alluded to by Arun have been pushed now (see changes to Basically, your PR made us realize that it would be more natural to introduce a common class of |
|
Ok, great. I'm on a vacation / conference travel for the next couple of weeks, but I'll look into doing the rebase after that. |
8c514a9 to
da7c9e3
Compare
da7c9e3 to
9b25bdd
Compare
|
Hi! I've been somewhat busy, but I've now gotten around to integrating the proposed changes into the new class hierarchy: I've also added unit tests to ensure that
The reference values for delta_for_epsilon are computed via scipy.quad. It would be great if you could have another look at my PR. |
|
Thanks Jan for making the changes! I am on vacation right now but will review the PR once I'm back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Jan, overall the changes look great! Most of these comments are catching typos or suggestions on style.
python/dp_accounting/dp_accounting/pld/privacy_loss_mechanism.py
Outdated
Show resolved
Hide resolved
python/dp_accounting/dp_accounting/pld/privacy_loss_mechanism.py
Outdated
Show resolved
Hide resolved
python/dp_accounting/dp_accounting/pld/privacy_loss_mechanism.py
Outdated
Show resolved
Hide resolved
python/dp_accounting/dp_accounting/pld/privacy_loss_mechanism_test.py
Outdated
Show resolved
Hide resolved
python/dp_accounting/dp_accounting/pld/privacy_loss_mechanism_test.py
Outdated
Show resolved
Hide resolved
python/dp_accounting/dp_accounting/pld/privacy_loss_mechanism_test.py
Outdated
Show resolved
Hide resolved
|
Thank you! I've set all comments with trivial fixes (typos etc.) to resolved. There are five open comments. It would be nice if you could have another look at those and let me know if everything looks ok to you, or if we should make any additional changes. |
|
Hi Jan, Thanks for your responses! At this point everything LGTM. I'll try to take a second pass to double check, and I need to do a bit of work on my end (some internal permissions, nothing you need to worry about) before I can merge the PR, but at this point it should be ready to submit. |
Hi,
this is a draft pull request related to issue #274.
I have implemented instances of AdditiveNoisePrivacyLoss whose privacy loss distribution is dominated by a pair of two mixture distributions. The class hierarchy looks as follows:
I have kept the existing
MixtureGaussianPrivacyLossas a special case ofDoubleMixtureGaussianPrivacyLossfor backwards compatibility and because it has certain optimizations that are not implemented in its super classes.Specifically, the
DoubleMixtureXYZclasses are less optimized in the following sense:These optimization cannot be trivially generalized to the super classes, because they rely on the (inverse) likelihood ratio decomposing into a sum of single-distribution ratios. This is not the case when we have two mixtures.
Before I create a final pull request, it would be great if we could discuss the following questions:
DoubleMixtureXYZclasses are currently only being tested via tests forMixtureGaussianPrivacyLoss. Do we need separate tests for each class?