MoEcho: Exploiting Side-Channel Attacks to Compromise User Privacy in Mixture-of-Experts LLMs

Ruyi Ding, Tianhong Xu, Xinyi Shen, Aidong Adam Ding, Yunsi Fei

Abstract

As Large Language Models (LLMs) scale, Mixture-of-Experts (MoE) architectures have emerged as a dominant solution for maintaining computational efficiency. By activating only a subset of specialized "experts" for each input token, MoE models significantly reduce inference costs. However, this paper introduces MoEcho, a novel side-channel attack framework that reveals a critical privacy vulnerability inherent in the MoE routing mechanism. By monitoring hardware execution traces on both CPUs and GPUs, MoEcho can infer sensitive prompt attributes with up to 99.9% accuracy and reconstruct model responses with 92.8% accuracy. Our findings demonstrate that the semantic specialization of MoE experts creates a distinct hardware footprint that can be exploited by co-located attackers to compromise user data.

Introduction

Modern LLMs like DeepSeek, Mixtral, and Grok rely on Mixture-of-Experts (MoE) to handle massive parameter counts without a proportional increase in compute requirements. In these architectures, a router directs each token to a specific subnetwork (an expert) based on its semantic content. While efficient, this routing creates a deterministic link between the meaning of an input and the hardware resources utilized during processing.

MoEcho exploits this link. Because experts are often trained to specialize in specific semantic domains—such as medical terminology, code, or financial data—the activation of a specific expert serves as a "semantic fingerprint." If an attacker can observe which experts are being called, they can reverse-engineer the underlying text or visual data being processed by the model.

The MoEcho Framework

MoEcho identifies and exploits four distinct architectural side-channels across CPU and GPU environments to capture these expert activation patterns.

CPU Side-Channels

  1. Cache Occupancy (L1/L2): The attacker measures the execution time of experts by creating cache contention. Since the execution time is proportional to the number of tokens an expert processes (the "Expert Load"), this reveals the distribution of tokens across the expert layer.
  2. Pageout+Reload: This method exploits Linux memory management. An attacker forces expert memory to be "paged out." When the victim's model executes, only the activated experts are brought back into physical memory. By timing the reload of each expert's memory page, the attacker identifies exactly which experts were utilized.

GPU Side-Channels

  1. Performance Counters: Using tools like NVIDIA Nsight, the attacker monitors thread usage. In GPU-based MoE implementations, experts often run in parallel; the number of active threads correlates directly with the token load per expert.
  2. TLB Evict+Reload: This is a sophisticated attack on the Translation Lookaside Buffer (TLB). By evicting TLB entries and measuring the time required for the victim to reload them, the attacker can pinpoint which memory blocks—and consequently which experts—were accessed during the inference cycle.

Attack Methodology

The MoEcho attack is executed in two primary phases:

  1. Profiling Phase: The attacker uses public datasets to build a dictionary of expert activation patterns. This phase establishes a baseline for how specific tokens or semantic attributes map to expert sequences.
  2. Attacking Phase: The attacker observes the victim's side-channel traces in real-time and uses the pre-built dictionary to map these hardware footprints back to specific tokens, attributes, or sequences.

Experimental Evaluation

The researchers evaluated MoEcho across several open-source models, including DeepSeek-V2 Lite, Qwen1.5-MoE, TinyMixtral, and DeepSeek-VL2. The evaluation focused on three primary attack vectors:

Prompt Inference Attack (PIA)

Using a synthetic dataset of healthcare records (covering 116 illnesses, age, and blood types), the attack attempted to identify sensitive user attributes from templated prompts. On DeepSeek-V2 Lite, MoEcho achieved a 99.9% success rate in identifying specific medical conditions.

Response Reconstruction Attack (RRA)

This attack targets the decoding phase, where the model generates a response token-by-token. By tracking the "Expert Sequence," MoEcho reconstructed LLM responses with an Attack Success Rate (ASR) of 92.8% using CPU side-channels. Even when exact word matches failed, the attack consistently produced semantically similar terms (e.g., substituting "home" for "house"), highlighting the deep semantic leakage of the routing mechanism.

Visual Inference in VLMs

Testing on Vision-Language Models (VLMs) using the CelebA dataset, MoEcho proved capable of inferring facial attributes (such as gender or accessories) with 85.34% accuracy. Furthermore, the side-channel data significantly improved the quality of reconstructed images compared to standard "blind" inpainting techniques.

Discussion and Limitations

MoEcho represents a significant threat due to its stealth; the side-channel measurements introduce a negligible performance overhead (1.2% to 7.9%), making detection difficult for the end-user. However, the attack requires the attacker to be co-located on the same physical hardware or shared cloud server as the victim.

While the Profiling Phase for Prompt Inference is relatively fast (~1 hour), the Response Reconstruction profiling is computationally intensive, requiring nearly 193 hours for a full dataset on DeepSeek-V2. Potential mitigations, such as adding noise to the router (Differential Privacy) or randomizing expert execution, are possible but often come at the cost of model accuracy or increased latency.

Conclusion

MoEcho demonstrates that the very architectural features that make MoE models efficient also make them inherently vulnerable to side-channel exploitation. As MoE becomes the standard for high-performance LLMs in cloud environments, addressing the privacy implications of semantic routing is a critical challenge for the research community.

Summary updated

BibTeX
@inproceedings{ding2025moecho,
  author = {Ruyi Ding and Tianhong Xu and Xinyi Shen and Aidong Adam Ding and Yunsi Fei},
  title = {{MoEcho: Exploiting Side-Channel Attacks to Compromise User Privacy in Mixture-of-Experts LLMs}},
  booktitle = {CCS},
  year = {2025},
  doi = {10.1145/3719027.3765174},
}
Figure