TL;DR
UFO is a novel private inference framework that co-optimizes secure two-party computation (2PC) protocols and quantization algorithms. By combining Winograd convolution with low-precision mixed quantization and graph-level protocol fusion, it achieves up to an 11.7× reduction in communication overhead while simultaneously improving model accuracy.
What Problem Does This Paper Address?
Private Inference (PI) allows a client to run a neural network model deployed on a server without revealing their private input data, while also protecting the server's proprietary model weights. Secure two-party computation (2PC) is a leading cryptographic approach for this, but it suffers from massive communication bottlenecks—primarily driven by the heavy multiplication demands of convolution layers.
To make PI practical, researchers often turn to two standard deep learning optimization techniques: quantization (reducing bit-widths) and Winograd convolution (an algorithm that mathematically reduces multiplication counts). However, naively smashing these two techniques together in a 2PC environment backfires:
- Inference Overflow & Overhead: Winograd transformations introduce extensive local additions. To prevent cryptographic overflow, the system must frequently extend bit-widths and perform communication-heavy re-quantization protocols.
- Weight Outliers: Winograd transformations distort weight distributions, creating massive outliers that make standard quantization-aware training (QAT) highly unstable, leading to severe accuracy drops.
Methods
UFO resolves these challenges through a hardware-software style co-optimization approach split across the protocol and algorithm levels.
1. Protocol-Level Optimizations (QWinConv)
- Graph-Level Protocol Fusion: UFO identifies consecutive or closely located bit-width conversion steps in the execution graph and fuses them, completely eliminating redundant online communication.
- Simplified Residual Protocol: Instead of using complex, multi-step alignment protocols for residual connections, UFO directly aligns the bit-width and scale of the residual path to the convolution output, bypassing heavy intermediate conversions.
- MSB-Known Optimization: By tracking the sign of activations (e.g., knowing that post-ReLU values are always non-negative), UFO optimizes the underlying truncation and extension protocols.
2. Algorithm-Level Optimizations
- Sensitivity-Based Mixed-Precision: Not all layers are equally sensitive to quantization. UFO measures layer sensitivity using the trace of the Hessian matrix and solves an Integer Linear Programming (ILP) problem to assign optimal mixed-precision bit-widths under a strict communication budget.
- 2PC-Friendly Bit Re-weighting: To handle Winograd weight outliers without increasing bit-widths, UFO adjusts the mathematical "importance" (the $2^b$ factor) of individual bits during training. This expands the representation range flexibly without adding a single bit to the communication payload.
Datasets
The authors evaluated UFO across several standard image classification benchmarks:
- CIFAR-10 (using MiniONN and ResNet-20)
- CIFAR-100 (using ResNet-32)
- Tiny-ImageNet (using ResNet-18)
- ImageNet (using ResNet-18)
Key Insights and Ideas
- The Winograd Tax in 2PC: Winograd is a free lunch in plaintext inference because additions are cheap. In 2PC, those additions force bit extensions that make a naive implementation actually increase online communication. Protocol fusion is mandatory to reap Winograd's benefits.
- Bit Re-weighting as a "Free" Fix: Because Oblivious Transfer (OT) processes weights bit-by-bit, we can change how those bits are interpreted mathematically during training. This lets us accommodate massive outliers without increasing the actual bit-width or communication payload.
- Why OT Beats HE for Quantization: Homomorphic Encryption (HE) struggles with low-precision (like 4-bit) quantization because it requires massive ciphertext bit-widths to guarantee decryption correctness. OT scales linearly with bit-width, making it the perfect match for aggressive quantization.
Key Results
UFO establishes a new state-of-the-art Pareto front for private inference efficiency and accuracy:
- vs. SiRNN: On CIFAR-100, UFO achieves an 11.7× communication reduction while delivering 1.29% higher accuracy.
- vs. COINN & CoPriv: UFO achieves 3.6× and 6.3× communication reductions, outperforming them in accuracy by 1.16% and 1.29%, respectively.
- Scalability to ImageNet: On the highly challenging ImageNet dataset with a ResNet-18 backbone, UFO cuts communication by 4.88× compared to SiRNN and 2.96× compared to CoPriv, all while maintaining a slight accuracy advantage (+0.15%).
Limitations and Future Work
- CNN Specificity: UFO relies heavily on the Winograd algorithm, which is structurally tailored to convolutions. Consequently, these specific optimizations do not directly translate to Transformer architectures (like ViTs or LLMs) that rely on self-attention.
- Future Directions: The authors note that extending this co-optimization methodology to Transformers is a priority. Additionally, they plan to explore adapting Winograd optimizations to HE-based frameworks, which will require designing specialized, HE-friendly encoding and quantization algorithms.
Summary updated