Skip to content
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

Generate Binomial Noise Function #1082

Merged
merged 84 commits into from
May 30, 2024

Conversation

bmcase
Copy link
Contributor

@bmcase bmcase commented May 21, 2024

This PR includes the generation of Binomial noise in MPC. There will be a separate PR to apply the noise to outputs.

More tests will be added to this PR to test the gen_binomial_noise function but this is anyway a working version of it if folks want to start reviewing.

This PR will also get smaller after #1076, #1067 and #1072 are merged separately and rebased on.

@bmcase
Copy link
Contributor Author

bmcase commented May 29, 2024

@martinthomson I think I addressed most of your earlier feedback. But two things I'd like to put in separate PRs

  1. moving around code for the two different DP modules we have now. Moving DP in MPC code out of ipa_prf and moving DP for OPRF into ipa_prf.
  2. looking more into Binomials with p < 1/2 success probability and if promising will bring as an improvement.

Working to resolve a few more clippy errors and then hoping we can merge this PR.

Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 99.27007% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 91.00%. Comparing base (2af7b98) to head (af5f690).

Files Patch % Lines
ipa-core/src/protocol/ipa_prf/dp/mod.rs 99.27% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1082      +/-   ##
==========================================
+ Coverage   90.95%   91.00%   +0.05%     
==========================================
  Files         184      185       +1     
  Lines       26079    26216     +137     
==========================================
+ Hits        23720    23858     +138     
+ Misses       2359     2358       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmcase
Copy link
Contributor Author

bmcase commented May 29, 2024

All tests are passing now

@bmcase bmcase requested a review from martinthomson May 29, 2024 03:11
@bmcase
Copy link
Contributor Author

bmcase commented May 29, 2024

  1. looking more into Binomials with p < 1/2 success probability and if promising will bring as an improvement.

@martinthomson I looked into this some more and somewhat surprisingly it doesn't seem that (at least in the 1 dimensional case) we can decrease the error by decreasing p with the same epsilon. See
i) this doc
ii) this script

Copy link
Collaborator

@benjaminsavage benjaminsavage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Very straightforward logic.

ipa-core/src/protocol/ipa_prf/dp_in_mpc/README.md Outdated Show resolved Hide resolved
#[cfg(test)]
pub async fn gen_binomial_noise<'ctx, const B: usize, OV>(
ctx: UpgradedSemiHonestContext<'ctx, NotSharded, Boolean>,
_never_used_input: BitDecomposed<Replicated<Boolean, B>>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bmcase - can you explain what's going on with _never_used_input?

@benjaminsavage benjaminsavage merged commit 6657e45 into private-attribution:main May 30, 2024
11 checks passed
@bmcase bmcase mentioned this pull request Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants