Manuscript Offprint

arXiv:2608.21236

RARE: Decoupling Representation Steering from Expert Routing in Mixture-of-Experts Language Models

Zhibo Zhang, Zhen Ouyang, Ling Shi, Kailong Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Representation engineering offers a lightweight means of controlling language-model behavior by modifying intermediate hidden states, but its direct application to Mixture-of-Experts (MoE) models introduces a structural mismatch. We first verify this failure mode through a series of empirical studies and find that preserving clean routing substantially recovers steering performance and that routing is more sensitive to semantic content than to behavioral changes under controlled content. Motivated by these findings, we introduce RARE, a router-agnostic representation engineering framework for MoE language models. RARE projects arbitrary behavioral perturbations onto the null space of the router matrix, thereby removing router-visible components, and further corrects routing drift propagated to selected downstream layers. To decide the best perturbation estimator in this framework, we evaluate five estimators on six heterogeneous open-weight MoE models across three steering scenarios: harmfulness, truthfulness, and factual editing. On harmfulness steering, RARE reaches an average attack success rate of 53.3%53.3\% while retaining 67.8%67.8\% MMLU accuracy, yielding a stronger aggregate effectiveness–utility trade-off than baselines. It further improves average TruthfulQA MC1 accuracy from 41.0%41.0\% to 58.6%58.6\% and CounterFact efficacy from 16.8%16.8\% to 96.3%96.3\%. These results support routing consistency as an important architectural consideration for adapting representation engineering to MoE models.

1 Introduction

Large Language Models (LLMs) are increasingly built with Mixture-of-Experts (MoE) architectures, where each token is routed to a sparse subset of feed-forward experts. This conditional-computation paradigm enables models to scale capacity while keeping inference cost tractable, and has become a central design choice in recent large-scale systems such as GPT (OpenAI, 2025), DeepSeek (DeepSeek-AI, 2024), and Qwen (Qwen Team, 2025).

Representation engineering provides a lightweight mechanism for controlling language-model behavior by intervening on intermediate hidden states, and has achieved notable performance on dense LLMs (Zou et al., 2023a; Turner et al., 2024; Arditi et al., 2024; Stoehr et al., 2024). However, conditional computation architecture makes steering MoE models especially challenging. Directly transferring paradigms designed for dense models to MoEs introduces an architectural complication: the steering direction estimated during clean inference would disrupt the router logits, redirecting tokens to different expert sets compared with the original clean states, thereby leading to poor steering effects. Figure 1(a) illustrates the steering failure mode caused by this mismatch. Recent MoE-specific steering studies treat expert allocation as the intervention interface by immediately controlling router logits to activate only intended experts (Fayyaz et al., 2025; Lai et al., 2025). While such interventions can effectively alter model behavior, they modify the native input-conditioned computation path and may consequently degrade response relevance and general capability. The central challenge is therefore how to coordinate representation-level control with the conditional routing mechanism of MoE models.

We investigate this challenge through three progressively connected research questions:

  • RQ1: How should routing be treated in MoE models for effective representation engineering?
  • RQ2: Which perturbation estimator is most suitable for router-agnostic MoE steering?
  • RQ3: Can router-agnostic representation engineering generalize across MoE architectures and behavioral control tasks?

To answer RQ1, we analyze perturbation-induced routing drift and conduct three controlled probes that disentangle request semantics from intended response behaviors. Across all probes, routing changes substantially less when response behavior changes under a fixed input query topic. This finding suggests that routing primarily allocates input-level semantic competence, while different behaviors can emerge along largely unchanged expert paths. Effective MoE steering should therefore modify representations without disturbing native routing. We use a controlled comparison in Figure 1(b) to illustrate this finding.

Motivated by this observation, we introduce RARE (Router-Agnostic Representation Engineering), a model behavior steering framework for MoE language models. By projecting raw perturbations onto the null space of the router matrix, RARE retains the generality of conventional manipulations while making representation intervention compatible with MoE conditional computation. The resulting direction modifies the hidden representation processed by the naturally selected experts without disrupting the local expert allocation.

For RQ2, we compare five perturbation estimators that differ in the geometry of targeted behavioral variation to investigate how different estimators interact with router-agnostic projection. Eventually, the second-order alignment yields the relatively strongest and most consistent steering performance. For RQ3, we evaluate RARE on six heterogeneous open-weight MoE models across harmfulness steering, truthfulness steering, and factual editing. Across these settings, RARE achieves an average harmfulness ASR of 53.3% while retaining 67.8% normal capacity accuracy, improves average TruthfulQA MC1 accuracy from 41.0% to 58.6%, and increases CounterFact efficacy from 16.8% to 96.3%. These consistent gains across architectures and tasks demonstrate that preserving native routing enables effective and broadly applicable representation control in MoE models.

Overall, our contributions are threefold:

  • We provide empirical evidence that MoE routing is more sensitive to semantic content of input queries than to response behaviors. These observations motivate routing preservation as a practical component when adapting representation engineering to MoEs.
  • We present RARE, a router-agnostic model steering framework that projects behavioral perturbations onto router-invisible subspaces and mitigates downstream routing drift. This design offers a feasible way to modify internal representations while largely preserving the model’s native expert allocation.
  • We study five perturbation estimators under the same router-agnostic framework and evaluate RARE across six heterogeneous MoE language models and three behavioral control tasks, with comparison to representative approaches. The results show that RARE achieves notable performance on all backbone models.

References (26)