Paper 2024/1127
Curl: Private LLMs through Wavelet-Encoded Look-Up Tables
Abstract
Recent advancements in transformers have revolutionized machine learning, forming the core of Large language models (LLMs). However, integrating these systems into everyday applications raises privacy concerns as client queries are exposed to model owners. Secure multiparty computation (MPC) allows parties to evaluate machine learning applications while keeping sensitive user inputs and proprietary models private. Due to inherent MPC costs, recent works introduce model-specific optimizations that hinder widespread adoption by machine learning researchers. CrypTen (NeurIPS'21) aimed to solve this problem by exposing MPC primitives via common machine learning abstractions such as tensors and modular neural networks. Unfortunately, CrypTen and many other MPC frameworks rely on polynomial approximations of the non-linear functions, resulting in high errors and communication complexity. This paper introduces Curl, an easy-to-use MPC framework that evaluates non-linear functions as lookup tables, resulting in better approximations and significant round and communication reduction. Curl exposes a similar programming model as CrypTen and is highly parallelizable through tensors. At its core, Curl relies on discrete wavelet transformations to reduce the lookup table size without sacrificing accuracy, which results in up to $19\times$ round and communication reduction compared to CrypTen for non-linear functions such as logarithms and reciprocals. We evaluate Curl on a diverse set of LLMs, including BERT, GPT-2, and GPT Neo, and compare against state-of-the-art related works such as Iron (NeurIPS'22) and Bolt (S&P'24) achieving at least $1.9\times$ less communication and latency. Finally, we resolve a long-standing debate regarding the security of widely used probabilistic truncation protocols by proving their security in the stand-alone model. This is of independent interest as many related works rely on this truncation style.
Metadata
- Available format(s)
- Category
- Cryptographic protocols
- Publication info
- Published elsewhere. Conference on Applied Machine Learning for Information Security (CAMLIS) 2024
- Keywords
- large language modelsprivacy-enhancing technologiessecure multiparty computation
- Contact author(s)
-
manuel santos @ nillion com
dimitris @ nillion com
memo @ nillion com
stanislaw jarecki @ nillion com
jose reis @ nillion com
ssengupta @ meta com
miguel @ nillion com - History
- 2024-09-18: revised
- 2024-07-10: received
- See all versions
- Short URL
- https://ia.cr/2024/1127
- License
-
CC BY
BibTeX
@misc{cryptoeprint:2024/1127, author = {Manuel B. Santos and Dimitris Mouris and Mehmet Ugurbil and Stanislaw Jarecki and José Reis and Shubho Sengupta and Miguel de Vega}, title = {Curl: Private {LLMs} through Wavelet-Encoded Look-Up Tables}, howpublished = {Cryptology {ePrint} Archive, Paper 2024/1127}, year = {2024}, url = {https://eprint.iacr.org/2024/1127} }