Secure Outlier-Aware Large Language Model Inference

Lifan Zhao, Zhixuan FangICLR 2026

Introduction

As Large Language Models (LLMs) become central to modern productivity, a massive privacy gap has emerged. Users are hesitant to send sensitive data to cloud providers, while providers refuse to expose their proprietary, multi-million-dollar model weights. Secure Multi-Party Computation (MPC) offers a cryptographic solution, allowing both parties to compute results without ever exposing raw data to one another.

However, MPC is notoriously slow—sometimes hundreds of times slower than standard "plain text" inference. The primary bottleneck lies not in basic arithmetic, but in non-linear operations like Softmax, SiLU activations, and RMSNorm. In MPC, these functions are typically approximated using lookup tables (LUTs) or iterative methods. Because LLM activations can vary by many orders of magnitude (from $10^{-5}$ to $10^3$), these protocols must cover a massive "input domain," leading to huge lookup tables or excessive computational rounds.

To solve this, researchers introduce SOAL (Secure Outlier-Aware Large Language Model Inference), a framework that significantly speeds up private LLM inference by exploiting a quirk of transformer models: most data stays in a narrow range, while "outliers" are highly predictable. By isolating these outliers, SOAL accelerates key operations by up to 5× without requiring any model fine-tuning.

The SOAL Framework

The authors designed SOAL as a two-stage framework that tackles the "outlier" problem head-on to shrink the mathematical domain MPC has to handle.

1. Preparation Stage: Addressing Outliers

Instead of trying to suppress outliers through re-training (which often degrades accuracy), SOAL treats them as a predictable architectural property of decoder-only transformers.

  • Special-Token Outliers: The researchers observed that outliers in normalization layers aren't random; they consistently appear at specific tokens like periods (.), newlines (\n), or the "Beginning of Sentence" (bos) token.
  • The "Attention Sink" Lever: The bos token acts as an "attention sink," absorbing massive attention scores. This allows the framework to simplify the Softmax "max-finding" operation—usually a major MPC headache. SOAL identifies that the maximum value almost always occurs at specific positions (the bos token, the first token, or the last two tokens) and uses these "local" maxima as a proxy for the global maximum.
Outlier phenomena across GPT-2 and Llama2-7B, highlighting massive activations concentrated on specific special tokens.
  • Prefixing Strategy: By prefixing these "outlier-prone" tokens to a user's prompt, the model absorbs the extreme values into the KV-cache. This leaves the actual user input with a much narrower, more predictable distribution.

2. Inference Stage: Optimized Protocols

With the input domain significantly reduced, the authors designed custom, highly efficient MPC protocols.

The SOAL framework architecture, demonstrating the prefixing of special tokens into the KV cache to absorb outliers during secure inference.
  • Faster Approximations: By using "scaling secrets" to shift and shrink the input domain, SOAL makes iterative approximations converge much faster. For example, they use a third-degree polynomial to get a "warm start" for reciprocal square roots in RMSNorm, requiring only two Newton-Raphson iterations to reach high precision.
  • Secret Math: They implemented a new "Secret Sigmoid" and "Secret Exponential" that handle both positive and negative values more efficiently by splitting numbers into integer and fractional parts.

Key Results and Evaluation

The authors validated SOAL using datasets like RedPajama, WikiText-2, and C4, alongside downstream benchmarks (Arc Challenge, HellaSwag, PIQA, etc.) to ensure the model's logic remained intact.

  • Significant Speedups: Compared to the standard CrypTen baseline, SOAL accelerates Softmax by >5×, and both SiLU/GeLU and RMSNorm by ~2×.
  • End-to-End Efficiency: For a 512-token prompt on Llama2-7B, SOAL reduced total inference time from ~429 seconds to ~194 seconds.
  • Zero Degradation: SOAL maintains nearly identical performance to the original "plain text" models. On the Arc Challenge benchmark, SOAL achieved a score of 0.4343 compared to the original 0.4334.
  • No Fine-Tuning Required: Unlike previous works (e.g., MPCFormer, SecFormer) that require expensive re-training or knowledge distillation to make models "MPC-friendly," SOAL works entirely with off-the-shelf weights.

Limitations and Future Work

While highly effective, SOAL currently focuses on decoder-only transformers (like GPT and Llama). Adapting these techniques for encoder-decoder models like T5 may require further adjustments. Additionally, the current Two-Party Computation (2PC) setup relies on a "trusted dealer" to provide correlated randomness; moving to a completely dealer-less setup is a natural next step.

Finally, while the prefixing strategy requires storing a few extra tokens in the KV-cache, this memory cost is negligible. As models scale to 70B+ parameters, massive activations become even more prominent, suggesting SOAL's outlier-aware approach will yield even greater relative benefits at scale.

Summary updated

BibTeX
@inproceedings{zhao2026secure,
  author = {Lifan Zhao and Zhixuan Fang},
  title = {{Secure Outlier-Aware Large Language Model Inference}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=Tmrjxq4d7w},
}
Figure