private-attribution / ipa

A raw implementation of Interoperable Private Attribution
MIT License
40 stars 23 forks source link

num_bernoulli from epsilon, delta #1113

Closed bmcase closed 3 months ago

bmcase commented 3 months ago

Small PR to implement Thm 1 of this paper https://arxiv.org/pdf/1805.10559 which allows us to go from an epsilon, delta and other parameters to the minimum number of bernoulli samples we need to achieve that level of DP. See this doc for more discussion. https://docs.google.com/document/d/116qQIgVoz3uV8axbmVWfif6dTjBVww5THecPqC0kERw/edit Much of this PR is a translation into Rust of this earlier python script https://github.com/private-attribution/ipa/compare/main...bmcase:raw-ipa:binomial_variable_p

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 99.37888% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.28%. Comparing base (b50beae) to head (ae972b9). Report is 2 commits behind head on main.

:exclamation: Current head ae972b9 differs from pull request most recent head e00f2b1

Please upload reports for the commit e00f2b1 to get more accurate results.

Files Patch % Lines
ipa-core/src/protocol/ipa_prf/dp/mod.rs 99.37% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1113 +/- ## ========================================== + Coverage 91.22% 91.28% +0.05% ========================================== Files 187 187 Lines 26554 26712 +158 ========================================== + Hits 24224 24383 +159 + Misses 2330 2329 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bmcase commented 3 months ago

@benjaminsavage converted to binary search for finding the smallest num_beroulli and added a couple more tests for that.