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

Bug on Zeroes Multiplication #308

Closed
anmolagarwalcp810 opened this issue Sep 15, 2021 · 3 comments
Closed

Bug on Zeroes Multiplication #308

anmolagarwalcp810 opened this issue Sep 15, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@anmolagarwalcp810
Copy link

On multiplying two zero tensors from source 0 in 5 party setting, I was getting large +/- values (4.2950e+09). I have also attached the jupyter notebook containing the code and requirements.txt file containing dependencies information.

Jupyter Notebook

Python: 3.7.11
Dependencies

Please help. Thanks in advance.

@knottb knottb added the bug Something isn't working label Sep 16, 2021
@knottb
Copy link
Contributor

knottb commented Sep 16, 2021

Thanks for pointing this out. I am able to reproduce this. This only happens in the 3+ party setting implying it may be a result of the division protocol. However, I'm not sure why this would happen in this case. Looking into it now.

knottb added a commit to knottb/CrypTen-2 that referenced this issue Sep 27, 2021
Summary:
Fixes bug described in facebookresearch#308

This bug causes wrap-around errors in 3+ party division. Upon inspection, it became clear that this bug is caused by a change in the scaling logic introduced in D29064976 (facebookresearch@a632bf4).

This bug happened because the correction applied to wraps has different scaling than the input tensor, and the new logic rescales accordingly. This can be fixed by applying the arithmetic on the shares rather than the ASTs.

To ensure bugs like this won't be reproduced again, I've introduced 3PC tests into test_mpc.py as well. These will increase runtime of the test harness, making it more necessary to upgrade the testing framework for easier submissions.

Differential Revision: D31206649

fbshipit-source-id: b7fdc92daebe169d8a95ff8bcb131391ceb831e8
This was referenced Sep 27, 2021
facebook-github-bot pushed a commit that referenced this issue Sep 28, 2021
Summary:
Pull Request resolved: #313

Pull Request resolved: fairinternal/CrypTen#243

Fixes bug described in #308

This bug causes wrap-around errors in 3+ party division. Upon inspection, it became clear that this bug is caused by a change in the scaling logic introduced in D29064976 (a632bf4).

This bug happened because the correction applied to wraps has different scaling than the input tensor, and the new logic rescales accordingly. This can be fixed by applying the arithmetic on the shares rather than the ASTs.

To ensure bugs like this won't be reproduced again, I've introduced 3PC tests into test_mpc.py as well. These will increase runtime of the test harness, making it more necessary to upgrade the testing framework for easier submissions.

Reviewed By: shubho

Differential Revision: D31206649

fbshipit-source-id: 59e85ac6f7fb07591aa55fda1181eb3e3a9aeb00
@knottb
Copy link
Contributor

knottb commented Sep 30, 2021

This should be fixed in #313. Closing this issue.

@knottb knottb closed this as completed Sep 30, 2021
@anmolagarwalcp810
Copy link
Author

Thanks a lot for fixing the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants