Routing on the Principal Subspace: Making Expert Selection Robust to Noisy Inputs

A mixture-of-experts model (MoE) splits a network layer into many parallel sub-networks, called experts. A small scoring network, the router, sends each token to the few experts it scores highest. The router's choice is discrete, so a small corruption of the input, such as sensor noise, a damaged image, or a garbled token, can flip which experts run. The model then produces a very different computation for almost the same input. This note proposes computing that choice only from the part of each token's hidden representation that lies in the dominant principal subspace of recent hidden states. That subspace is spanned by the few directions that carry most of the variance, and the model tracks it online during training. The experts still receive the full representation. This is the classical low-rank denoising idea: keep the top singular directions and discard the trailing ones where diffuse noise lives. Here it is applied to one place, the input of the router, where a discrete decision makes noise especially costly.

The idea needs a precise case, because the obvious version of "low-rank routing" already exists. Routers that first project tokens into a small learned space (L2R, X-MoE) are low-rank, but their projection is free to align with any direction the task loss rewards, including directions that carry little variance and are therefore dominated by noise. The claim tested here is narrower and falsifiable. Routing flips under input corruption are driven mainly by energy in the trailing principal directions of the router's input. Pinning the router to the tracked leading directions should therefore cut flip rates and corrupted-input error, at little or no cost on clean data.

Core Claim

Let $h \in \mathbb{R}^d$ be a token's hidden state at an MoE layer. Let $P_r$ be the orthogonal projector onto the top-$r$ eigenvectors of the running covariance of $h$, and let $\lambda_1 \ge \dots \ge \lambda_d$ be that covariance's eigenvalues. Suppose a corruption adds roughly isotropic noise with variance $\sigma^2$ per dimension. Then any rank-$r$ projection lets through noise energy $r\sigma^2$. The principal projection lets through the most signal energy of any rank-$r$ projection, $\sum_{i\le r}\lambda_i$; this follows from the Eckart–Young optimality of the principal subspace. Among rank-$r$ router inputs, it therefore maximizes

$$\mathrm{SNR}_r = \frac{\sum_{i \le r} \lambda_i}{r\,\sigma^2}.$$

A learned projection $W_q$ has the same noise energy. Its signal energy, however, is the variance along whatever directions training chose, which can be far smaller. There is a real tension here. Routing needs directions that separate experts, and those need not be the highest-variance directions. The proposal is built so that this tension is measured, not assumed away.

The mechanism, which we call the principal-subspace router, scores experts from $P_r h$ rather than from $h$ or $W_q h$. Scoring uses L2R's bounded inner-product scoring against learnable expert anchors. $P_r$ is not a trained parameter. It is re-estimated every $N$ steps by a few randomized power iterations on an exponential moving average of the hidden-state covariance. This is the kind of cheap randomized low-rank projection that Fan et al. and PriviRec use on large matrices. The cost is one $d \times d$ covariance update per step and a small eigen-solve every $N$ steps, which is negligible next to the experts.

Relation to Prior Work

Three papers supply the motivation and the closest competitors. On the Representation Collapse of Sparse Mixture of Experts shows that dot-product routing gradients pull hidden states toward a low-dimensional span of expert centroids. It fixes this by routing in a learned 16-dimensional space with cosine scoring. L2R pushes the learned projection down to rank 2, adds a bounded scoring function, and reports gains on ImageNet-1K and OLMoE. Both learn the projection. Neither ties it to the data's variance structure, and neither measures routing stability under corrupted inputs. We keep L2R's scoring function and change only where the projection comes from, which makes L2R the right control.

Eigenvectors of Experts are Training-free Non-collapsing Routers (SSMoE) builds routing embeddings from the singular vectors of trained expert weights. It reports a +2.8% Recall@1 gain on noisy COCO retrieval. That result is the strongest existing evidence that spectral structure helps routing under noise. SSMoE, however, works post hoc on weights. Our subspace comes from activations and shapes routing throughout training.

MoE-SVD and MoORE apply SVD to expert weights, for compression and for building rank-one experts respectively. They show that weight spectra matter but say nothing about activation noise. MoE-SVD's observation that activation outliers make some layers fragile also warns that hidden states are not isotropic. For that reason we test structured corruptions as well as Gaussian ones.

Two further papers constrain the design. StableMoE finds that about 30% of tokens still switch experts at mid-training. Its fix is to freeze a router built on word embeddings, which loses context. A slowly tracked principal subspace is a softer route to the same stability, so we measure fluctuation with the same statistic StableMoE uses. The collapse result of Chi et al. poses a direct risk. If router gradients enlarge variance along centroid directions, the principal subspace could lock onto the router's own centroids and reinforce collapse. We therefore stop gradients from the router into $h$ by default and test the alternative.

From the denoising side, UA-LQE and GLSGNN show the method we reuse: truncation to a low-rank structure removes noise in value matrices and in poisoned graphs. GLSGNN reports a 4.6% AUC drop when its SVD module is removed. Both papers also warn that truncation can discard weak but genuine signal. That is exactly the clean-accuracy risk we must measure.

Research Program

The work has three stages, and each stage can stop the project.

The first stage is a diagnostic that requires no new architecture. We train a standard top-2 MoE vision transformer (ViT-S with 8 and 16 experts) and an L2R reimplementation on ImageNet-1K. On held-out images, we apply Gaussian noise, blur, and patch occlusion at several severities. For each token and layer, we split the resulting change in router input into its component inside the top-$r$ principal subspace and its component outside it. We then regress top-$k$ flips on the two components. If flips are explained mainly by the leading-subspace component, the premise fails and the project changes direction toward corruption-aware training rather than spectral routing.

The second stage builds the principal-subspace router and trains it from scratch under matched settings. It sweeps $r \in \{2, 8, 16, 32\}$ and refresh interval $N$, and it tests whether stopping the router gradient matters.

The third stage transfers the method to language using the OLMoE 10B-token setting from L2R. We evaluate on clean text and on text with character-level typos and inserted noise tokens. This stage tests whether a principal-subspace router, trained without any noise, holds up when noisy inputs appear only at test time.

Baselines

The naive reference point is a linear top-$k$ router on the full hidden state, trained with the usual auxiliary load-balancing loss. Everything else must beat it on corrupted inputs.

X-MoE's cosine router in a learned 16-dimensional space is the second baseline. It represents "normalize and reduce dimension" without any variance structure.

The strongest competitor is L2R with its bounded scoring function and multi-anchor heads. L2R reports 76.58% top-1 and 91.50% top-5 on ImageNet-1K with a ViT-S backbone, and it raises MMLU on OLMoE from 22.7% to 27.6%, in L2R. L2R also reports improved robustness to Gaussian noise, but the file gives no number for it; no reported result was found on Lacuna for L2R's corrupted-input accuracy. We therefore re-run it ourselves. It is the strongest competitor because it already routes in a rank-2 space with norm control, so any gain we find must come from where the subspace comes from, not from the low rank itself.

Every router gets the same backbone, the same data, the same number of training steps, and the same hyperparameter search budget: 12 configurations each over learning rate, rank, and temperature, run on 3 seeds. Beating L2R means matching its clean top-1 within 0.3 points while cutting corrupted-input flip rate and corrupted-input error by more than the spread across seeds, at two or more corruption types.

Three ablations isolate the key ingredient. First, a fixed random rank-$r$ projection checks whether any low-rank bottleneck suffices. Second, a projection initialized at the principal subspace but then learned freely checks whether the benefit disappears once training can move the subspace. Third, routing on the bottom-$r$ principal directions is a sign check that should hurt. For training stability we also compare against StableMoE's frozen distilled router, using StableMoE's token-fluctuation statistic.

Why not just…?

Why not just train L2R's learned router with noise augmentation? This is the real threat. If augmentation teaches $W_q$ to avoid noisy directions, the principal subspace adds nothing beyond "see corruptions during training." We include learned-projection-plus-augmentation as a baseline. The test that settles it is held-out corruption types, those not used in augmentation. A fixed spectral prior should generalize across corruptions, while augmentation often covers only the corruptions it saw. If augmentation matches us on held-out corruptions, we will report that plainly and drop the spectral claim.

Why not just use cosine routing on a hypersphere? Normalizing removes norm-driven competition but not directional noise. L2R found that pure cosine scoring underperforms its bounded scoring on ImageNet-1K. The X-MoE baseline and the flip-rate diagnostic show directly whether normalization alone stops corruption-driven flips.

Why not just apply SSMoE's weight eigenvectors after training? SSMoE needs no retraining and already reports a noisy-retrieval gain. It is therefore a cheap, real alternative. We will run it on our trained standard MoE as a post-hoc comparison. Its subspace, though, reflects what the experts compute, not where the input's signal lies, and SSMoE reports degradation on GSM8K when it prunes aggressively. If post-hoc SSMoE matches our training-time router on corrupted ImageNet, training-time tracking is not worth its complexity.

Why not just freeze the router as StableMoE does? Freezing reduces flips during training. A router built on word embeddings, however, cannot look at context, and freezing does nothing about corruption at test time. The fluctuation comparison and the corrupted-input comparison separate these two effects.

Proposed Experiments and Decisive Checks

The primary vision benchmark is ImageNet-1K with a ViT-S MoE, evaluated clean and under Gaussian noise, blur, and occlusion at five severities. Two corruption types are held out from any augmentation. The language benchmark is OLMoE pretraining on 10B tokens, with MMLU clean and under typo corruption. A secondary post-hoc comparison against SSMoE uses noisy COCO image-text retrieval, where SSMoE reports +2.8% Recall@1.

Metrics are clean and corrupted accuracy; routing flip rate between clean and corrupted versions of the same token; the fraction of tokens changing expert across checkpoints during training, as in StableMoE; load entropy across experts; and the effective rank of hidden states, which tracks the collapse Chi et al. describe.

Three results would decide the proposal. The diagnostic must show that trailing-subspace energy, not leading-subspace energy, predicts flips. The principal-subspace router must beat both the random-projection ablation and the learned-then-free ablation on held-out corruptions at matched clean accuracy. And effective rank must not fall relative to the linear baseline, which would rule out the self-reinforcing collapse risk. If the first result fails, the spectral story is wrong. If only the second fails, the benefit comes from the bottleneck rather than the denoising, and L2R already covers that.