snwagh / falcon-public

Implementation of protocols in Falcon
90 stars 46 forks source link

How to calculate the communication? #7

Closed ciciwell closed 3 years ago

ciciwell commented 3 years ago

Hi Wagh I use preloading data to execute the Falcon inference phase in the LAN environment. But the communication obtained through the source code is very large (the specific output is shown in the figure below). This one is too far from the results in Table 2 in your paper. Did I miss something in the calculation process? Could you guide me on how to calculate the communication?

キャプチャ

Very grateful for your help!

snwagh commented 3 years ago

@ciciwell The communication reported is that of a single image and hence is amortized by the batch size. The above numbers seem right when using a batch size of 128, is that what you've used?

ciciwell commented 3 years ago

Yes, I use the batch size of 128. According to your guide, I calculated the communication for a single image. I got the results in the table below. But there are still some differences compared with the results in your paper, for example, communication of malicious (the red numbers) in the following table, seems to be smaller. Could you help me confirm whether the results in the table below are correct? Could you tell me the factors that affect communication (for example, is it related to the CUP of the computer or PRNG)?

comm

Thank you very much for your help.

snwagh commented 3 years ago

The numbers generally look good. The numbers in the paper might be under-reporting for a few reasons (1) the numbers reported in the paper are non-amortized (2) the network parameters do make a difference (latency) (3) Network-A is fairly small and might have something else going on.

I do not believe the CPU and PRNG should make that big a difference but you should be able to profile your code. Finally, this is probably not the reason for the discrepancy but the malicious version does have some bugs that I have not had the chance to fix so these numbers will give you only a good estimate.

ciciwell commented 3 years ago

@snwagh Thank you very much for your guidance! Happy Christmas and Prosperous New Year!