GithubHelp home page GithubHelp logo

Comments (7)

xieyxclack avatar xieyxclack commented on April 28, 2024

Thanks for your interest!
The random numbers are used in secret sharing to "hide" the plain number, which might cause the arithmetic overflow due to the summing up operation. Thus we confine the range of random numbers and apply the mod operation. The range can be adjusted according to the applications. And we encourage setting a large upper bound to ensure the privacy protection strength.

from federatedscope.

YongGuCheng avatar YongGuCheng commented on April 28, 2024

If you confine the range of the random numbers, then it is not safe any more, in the sense that the distribution of the random numbers is no longer uniform. Particularly, the random numbers should also take negative values (and then take mod operation).

from federatedscope.

xieyxclack avatar xieyxclack commented on April 28, 2024

Thanks for your suggestions! Maybe we can improve our implementation later.
BTW, such ''no longer uniform'' phenomenon is caused by the implementation of np.random.randint ?

from federatedscope.

YongGuCheng avatar YongGuCheng commented on April 28, 2024

Thanks for your suggestions! Maybe we can improve our implementation later. BTW, such ''no longer uniform'' phenomenon is caused by the implementation of np.random.randint ?

Due to the confinement of "low=0".
For example, maybe use "np.random.randint(low=-self.mod_number, high=self.mod_number, size=shape)", and "np.random.randint(low=-2*self.mod_number, high=2*self.mod_number, size=shape)", etc.

from federatedscope.

xieyxclack avatar xieyxclack commented on April 28, 2024

Got it. I have misunderstood the ''confine'' (refer to the high=mod_number) before.
Thanks again for your comments :)

from federatedscope.

YongGuCheng avatar YongGuCheng commented on April 28, 2024

Got it. I have misunderstood the ''confine'' (refer to the high=mod_number) before. Thanks again for your comments :)

You are more than welcome.
For "high=self.mod_number", it is fine, since we need a "high end (range)" anyway in practical implementations.

from federatedscope.

tanjuntao avatar tanjuntao commented on April 28, 2024

都是国人,非要用英文来交流吗🤣

from federatedscope.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.