Introduction
Privacy-preserving inference (PI) is a critical requirement in modern machine learning, where service providers seek to protect proprietary models (adapters) while users demand confidentiality for their input data. While Secure Multi-Party Computation (MPC) provides a theoretical framework for this, it often suffers from prohibitive communication overhead and computational inefficiency, particularly when handling non-linear functions like Softmax or GELU.
The Bottleneck in Private Inference
Existing Parameter-Efficient Fine-Tuning (PEFT) methods, such as LoRA or AdaptFormer, are highly effective in plaintext environments but struggle in private settings. The primary issue is the Two-Way Communication (TWC) requirement: data must flow from the model backbone to the adapter and back again. In a private setting, this necessitates either massive encrypted computations across the entire model or frequent, slow intermediate decryptions that may compromise privacy.
As illustrated in the figure above, traditional private inference (c) involves significant overhead due to the bidirectional data flow between the user (MU) and the server (MS). CRYPTPEFT identifies this bidirectional flow as the fundamental bottleneck preventing PEFT from scaling to private, real-world applications.
The CryptPEFT Framework
To address these challenges, the authors introduce CRYPTPEFT, a framework specifically designed for private PEFT. It incorporates three major innovations:
1. One-Way Communication (OWC) Policy
CRYPTPEFT eliminates the "ping-pong" effect of TWC by enforcing a unidirectional data flow. The user processes the public backbone in plaintext and transmits intermediate results to the service provider. The provider then processes these results through the private adapter using MPC. By ensuring data never flows back to the backbone, CRYPTPEFT significantly reduces communication rounds, which is crucial for performance in high-latency networks.
2. LinAtten: Learnable Linear Attention
Standard attention mechanisms rely on the Softmax function, which is computationally expensive in MPC. CRYPTPEFT replaces Softmax with LinAtten, a lightweight linear alternative using only additions and multiplications. A learnable linear transformation replaces the normalization term, preserving the model's expressive power without the MPC-unfriendly Softmax.
3. Cost-Aware Neural Architecture Search (NAS)
Private inference costs are primarily driven by communication rounds and bandwidth rather than just parameter count. CRYPTPEFT employs a NAS algorithm with a custom latency model to optimize adapter configurations (heads, rank, and placement) for specific network environments, such as Local Area Networks (LAN) or Wide Area Networks (WAN).
Evaluation and Results
The framework was evaluated using a Vision Transformer (ViT-B-16) backbone across several benchmark datasets, including CIFAR-10/100, Food-101, SVHN, and Flowers-102.
Key Performance Metrics
- Massive Speedups: CRYPTPEFT achieved speedups of 20.62x to 291.48x over traditional PEFT baselines, with the most dramatic improvements seen in high-latency WAN environments.
- High Utility: On CIFAR-100, the system maintained a high accuracy of 85.47% with an inference latency of only 2.26 seconds in a simulated WAN.
- Parameter Efficiency: The architecture reduced parameters involved in encrypted computation by 88.81% compared to standard last-layer fine-tuning.
- Superiority over SOTA: CRYPTPEFT outperformed MPCViT, providing higher accuracy and a 9.19x to 13.14x speedup.
Conclusion and Future Directions
CRYPTPEFT demonstrates that redesigning model architectures to be "MPC-native" is more effective than simply approximating complex functions. By prioritizing communication efficiency through OWC and linear attention, it makes private inference viable for real-world applications.
While highly effective for Vision Transformers, future work includes extending the framework to Large Language Models (LLMs) and hardening the security model against malicious adversaries using techniques like homomorphic MACs.
Summary updated