mpc-msri / EzPC

MIT License
400 stars 121 forks source link

[SIRNN] Questions about the mixed bit-width #110

Closed llCurious closed 3 years ago

llCurious commented 3 years ago

Hey, @bhatuzdaname ✋🏻. I recently read the paper SIRNN and the work is particularly interesting. However, I just have several questions about the paper and the code implementation. Look forward to receiving your answers~

Thanks a lot anyway, really hope you can answer these questions

deevashwer commented 3 years ago

Hi,

Thanks for your interest in our work. The answers to your questions are as follows:

  1. It is correct that mixed-bitwidth protocols from SIRNN reduce communication at the expense of more rounds of communication. This makes sense for SIRNN as in the inference of ML models, the computation is wide enough that the cost of rounds is easily amortized and communication is the bottleneck. In a WAN environment, the cost of rounds will be higher, but at the same time, the bandwidth will also be constrained. Even if you have a WAN which has very high latency (and cost of rounds) and moderate bandwidth (and cost of communication), you can always batch multiple inference tasks, which will linearly increase the communication, but the cost of rounds will remain the same. Overall, it depends on your computation. If it is wide enough for your network or can be made wide enough (example, through batching), mixed-bitwidth protocols from SIRNN work great. If rounds are the bottleneck, you might be better off with garbled circuits and its constant rounds.
  2. We're using uint64t for all rings Z{2^ell} with ell <= 64. You'll see additional parameters in each function specifying the bitwidth ell. This works because x mod 2^{ell} is equivalent to (x mod 2^{64}) mod 2^{ell} for ell <= 64.
  3. No, we didn't compare with (honest-majority) 3PC works as they provide weaker security guarantees than 2PC.
llCurious commented 3 years ago

Hey, happy to receive your reply. Thank a lot and this greatly answers many of my questions.

Great work deserves more thinkings. Looking forward to your answers~~

llCurious commented 3 years ago

Sry, i idiot. The second point is my misunderstanding and forget about it. SecureML truncates to take the most significant several bits, while you here use mask to take the least significant several bits. The carry bit does not have negative effects indeed.