Paper: PUMA: Secure Inference of LLaMA-7B in Five Minutes (ICLR-2024)

Reviewer comment (Novelty):
It is dubious whether the ability to generate one token from a language model in 5 minutes between three parties in the semi-honest honest majority model is likely to have any applications in the imminent future, though this is a step closer to something practical being possible.

Author response:
Thank you for your reviewing efforts and comments. 

Yes practical general-purpose privacy-preserving LLMs is like a "holy grail" and hard to achieve, we are still far from that.
But PUMA does not use any GPUs or quantization methods, so it is very likely that we could benefit from powerful GPUs and ML algorithm optimizations in the future. Once PUMA could be accelarated by one or two magnitudes, it could be possible to support analysis tasks that are not time-sensitive but require private data, e.g., business document or personal chat history processing.

Reviewer comment (Experiments):
Compared with the baseline, the protocol advantages seem to all come from RSS.

Author response:
No, it is not true that "the protocol advantages seem to all come from RSS". RSS-based 3PC could save some communication at the **linear** layers compared to MPCFormer's dealer-mode 3PC protocol, but our major advantages come from the lightweight and accurate **non-linear** approximations. We did an experiment on Llama-7B (8-token input) to replace our GeLU(SiLU) optimization with protocols built on faithful exponent operations (like CrypTen in MPCFormer), and it will increase the overall communication cost drastically (from 1.794GB to 4.303GB).

Reviewer comment (Evaluation):
Overclaim the experimental performance. The title of this paper is Secure Inference of LLaMA-7B in Five Minutes. However, it is overclaimed. 5 minutes is only when the input and output are 4 and 1 token respectively, which is obviously not in line with the practical service setting.

Author response:
Describing the cost of LLM in a  "per token" way is a common practice. We argue that a paper should be judged by its merits, rather than whether it's in line with the practical service.

Reviewer comment (Experiments):
Does the polynomial approximation of GELU affect the accuracy of large models such as LLaMA-7B because it seems to cause a relatively large error?

Author response:
Thank you for your reviewing efforts and comments.  
## For Q2:  
Yes even a small perturbation in the activation function could lead to different output. As mentioned in the general response, if we replace our GeLU/SiLU approximation with Quad polynomial approximation like MPCFormer(ICLR23) , the result would be like this:  

- Q: What is the largest animal?  
- A: THER grape contend Iraves Grahaminthshireilton ChurchillTHER grape contendinthshireinthshireinthshireinthshireinthshireinthshireinthshireinthshireinth  

It serves as an evidence that finding proper approximations is a non-trivial task.

Reviewer comment (Evaluation):
While it claims to perform twice as fast as MPCformer, the paper lacks precise explanations of why each technique is superior to the existing ones, making it challenging to assess their effectiveness.

Author response:
For Q1 and Q3: 

There are many optimization details under PUMA, roughly speaking, GeLU and softmax contribute to the efficiency gains, while embedding, and layernorm are vital to usability. In fact embedding and layernorm decrease efficiency because they are absent in previous works, but we cannot output meaningful results without them. The potion of cost for each module varies with different models. Due to the space limit, we cannot afford to discuss these costs one by one, but GeLU usually contributes the major part in efficiency gains.

We did an experiment on Llama-7B (8-token input) to replace our GeLU(SiLU) optimization with protocols built on faithful exponent operations (like CrypTen in MPCFormer), and it will increase the overall communication drastically (from 1.794GB to 4.303GB).

Reviewer comment (Experiments):
The primary technical contribution seems to be the approximation of the GELU function. However, without a clear comparison to existing approximations, it is challenging to assess the value of this technique. The paper introduces variations in polynomial computation based on the range of x, but it is not evident how this approach is superior to the conventional method of approximating the GELU function in terms of computational efficiency.

Author response:
For Q1 and Q3: 

There are many optimization details under PUMA, roughly speaking, GeLU and softmax contribute to the efficiency gains, while embedding, and layernorm are vital to usability. In fact embedding and layernorm decrease efficiency because they are absent in previous works, but we cannot output meaningful results without them. The potion of cost for each module varies with different models. Due to the space limit, we cannot afford to discuss these costs one by one, but GeLU usually contributes the major part in efficiency gains.

We did an experiment on Llama-7B (8-token input) to replace our GeLU(SiLU) optimization with protocols built on faithful exponent operations (like CrypTen in MPCFormer), and it will increase the overall communication drastically (from 1.794GB to 4.303GB).

Reviewer comment (Evaluation):
Provide numerical evidence of how the computations involved in our method for approximating the GELU function offer advantages in terms of computational and communication costs compared to existing techniques that achieve the same level of accuracy.

Author response:
For Q1 and Q3: 

There are many optimization details under PUMA, roughly speaking, GeLU and softmax contribute to the efficiency gains, while embedding, and layernorm are vital to usability. In fact embedding and layernorm decrease efficiency because they are absent in previous works, but we cannot output meaningful results without them. The potion of cost for each module varies with different models. Due to the space limit, we cannot afford to discuss these costs one by one, but GeLU usually contributes the major part in efficiency gains.

We did an experiment on Llama-7B (8-token input) to replace our GeLU(SiLU) optimization with protocols built on faithful exponent operations (like CrypTen in MPCFormer), and it will increase the overall communication drastically (from 1.794GB to 4.303GB).