Privacy-Preserving LLMs Routing

Xidong Wu, Yukuan Zhang, Yuqiong Ji, Reza Shirkavand, Qian Lou, Shangqian GaoarXiv 2026

TL;DR

LLM routing optimizes performance and cost by dynamically directing user queries to the most suitable model, but it introduces severe privacy risks via intermediate third-party routers. This paper presents PPRoute, a privacy-preserving LLM routing framework using Secure Multi-Party Computation (MPC) that achieves a ~20× speedup over naïve MPC implementations while maintaining near-identical routing quality.

What Problem Does This Paper Address?

As the ecosystem of Large Language Models (LLMs) expands, routing frameworks have become essential for balancing cost and capability—sending simple prompts to lightweight models (like Gemma) and reserving heavy-duty models (like GPT-4 or Claude) for complex reasoning.

However, this routing layer is typically managed by a third party, creating a massive privacy vulnerability: user queries and their corresponding vector embeddings are exposed to an intermediate entity. While cryptographic techniques like Secure Multi-Party Computation (MPC) can perform private inference, applying them directly to LLM routers introduces prohibitive computational and communication overhead. Specifically, non-linear operations (like Softmax and GeLU) and secure nearest-neighbor sorting create massive latency bottlenecks, making real-time private routing impractical.

Methods

To overcome these bottlenecks, the authors propose PPRoute (Privacy-Preserving LLM Routing), which optimizes both the encoder inference and the nearest-neighbor search phases:

  1. MPC-Friendly Operations: Standard transformer operations are replaced with hardware/cryptography-friendly alternatives. The authors substitute the computationally expensive Softmax with 2ReLU ($ReLU(x) / \sum ReLU(x)$) and replace GeLU activations with standard ReLU.
  2. Multi-Stage Distillation Training: Because modifying activation functions degrades model performance, PPRoute uses a teacher-student training paradigm. A standard "teacher" router guides an approximated "student" router via knowledge distillation in plaintext before deployment, recovering the lost accuracy.
  3. Unsorted Top-k Algorithm: Traditional secure sorting algorithms (like Bitonic Sort) require thousands of communication rounds. PPRoute introduces a novel algorithm that restructures sorting into highly parallelizable matrix operations (duplication, cyclic shifting, and element-wise comparison). This reduces the communication complexity to a constant $O(1)$ rounds.
Figure 1. Overview of Privacy-Preserving LLMs Routing (PPRoute) Training. 1) Train the MLP layer in the teacher model. 2) The student model uses the MPC-friendly operations in the approximated encoder, and model training follows Equation (2). 3) Train the MLP layers only and encrypt the model to serve under the MPC.

Datasets

The framework was evaluated using three standard LLM routing benchmark datasets:

  • EmbedLLM: Used to evaluate compact representations of LLMs.
  • MixInstruct: A dataset focused on instruction-following capabilities across multiple models.
  • RouterBench: A benchmark designed to evaluate multi-LLM routing systems using perplexity-based descriptors.

For evaluation, the authors sampled 192 probes from the validation/training splits of these datasets to simulate live user queries.

Key Insights and Ideas

  • Shifting the Bottleneck from Latency to Bandwidth: By designing an unsorted Top-k algorithm with $O(1)$ communication rounds, the bottleneck of secure sorting shifts entirely away from network round-trip latency to local bandwidth, which is highly beneficial for small model pools.
  • The Power of Distillation in the Encrypted Domain: Directly deploying an MPC-friendly model severely hurts accuracy. However, enforcing a trust-region constraint during plaintext training allows the student model to approximate the teacher's decision boundaries almost perfectly.
Figure 3. The Unsorted Top-k Algorithm Workflow

Key Results

The authors integrated PPRoute into two state-of-the-art routing frameworks: CSCR and UniRoute.

Speedup Performance

PPRoute achieved massive reductions in execution time compared to standard MPC baselines:

  • CSCR Integration: Reduced routing latency from ~185–199 seconds down to ~9.1–9.3 seconds (a 20.1× to 21.2× speedup).
  • UniRoute Integration: Reduced latency from ~186–190 seconds down to ~8.0–9.9 seconds (a 19.2× to 23.3× speedup).
  • Sorting Efficiency: The proposed Unsorted Top-k algorithm executed in just 0.248 seconds, vastly outperforming Bitonic Sort (43.5 seconds) and DB Bubble sort (10.6 seconds).

Routing Quality

Despite the approximations, PPRoute maintained virtually identical routing quality to its unencrypted (plaintext) counterparts across metrics like Area Under the Deferral Curve (AUDC) and Peak Accuracy.

Limitations and Future Work

  • Scale of the Model Pool: The Unsorted Top-k algorithm relies on an $O(n^2)$ computation matrix. While highly parallelizable and efficient for typical routing scenarios (where the model pool $n$ is small, e.g., less than 20 models), it may face scalability challenges if the router needs to select from hundreds of models simultaneously.
  • Future Directions: The authors suggest that future work could explore integrating approximate nearest neighbor (ANN) search graph structures to handle larger-scale model pools without sacrificing the $O(1)$ communication round advantage.

Summary updated

BibTeX
@misc{wu2026privacy,
  author = {Xidong Wu and Yukuan Zhang and Yuqiong Ji and Reza Shirkavand and Qian Lou and Shangqian Gao},
  title = {{Privacy-Preserving LLMs Routing}},
  year = {2026},
  eprint = {2604.15728},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.15728},
}
Figure