<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Interpretability | Yingru Li</title><link>https://richardli.xyz/tag/interpretability/</link><atom:link href="https://richardli.xyz/tag/interpretability/index.xml" rel="self" type="application/rss+xml"/><description>Interpretability</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Fri, 27 Nov 2026 00:00:00 +0000</lastBuildDate><image><url>https://richardli.xyz/media/og-default.png</url><title>Interpretability</title><link>https://richardli.xyz/tag/interpretability/</link></image><item><title>Mixture of Experts does not work the way its name says</title><link>https://richardli.xyz/post/how-moe-actually-works/</link><pubDate>Fri, 27 Nov 2026 00:00:00 +0000</pubDate><guid>https://richardli.xyz/post/how-moe-actually-works/</guid><description>&lt;div class="alert alert-note">
&lt;div>
&lt;ol>
&lt;li>The design story predicts subject experts, context-driven routing, and a router that has to be learned well. None of the three holds up cleanly in measurements.&lt;/li>
&lt;li>An MoE layer is exactly one very wide feed-forward layer with a block mask. Read that way, the gain comes from storing &lt;em>M&lt;/em> blocks while computing &lt;em>K&lt;/em>.&lt;/li>
&lt;li>Specialization is real, at the level of small operations, with many distinct ones in each expert. It looks like a by-product of sparsity more than the plan behind it.&lt;/li>
&lt;li>The router is trained by a policy gradient restricted to the experts it already picked. It gets no signal about the others, so experts it ignores stay untrained, and without outside pressure some of them die.&lt;/li>
&lt;li>Eight things to try follow, six for pre-training and two for RL. The cheapest: center the router&amp;rsquo;s input, count tokens per expert, and replay the sampler&amp;rsquo;s routing.&lt;/li>
&lt;/ol>
&lt;/div>
&lt;/div>
&lt;p>A sparse MoE layer was designed as a team of specialists with a learned dispatcher. Measured on real models, the specialists are not subject specialists, and in several published tests a fixed hash of the token does as well as the dispatcher. This post works out what carries the gain instead, what the experts turn into, why training ends up there, and what to do about it in pre-training and in RL.&lt;/p>
&lt;p>Each claim carries its standing: &lt;span class="claim-tag claim-tag--m">measured&lt;/span> reported in a paper, &lt;span class="claim-tag claim-tag--d">derived&lt;/span> worked out here and checked by code, &lt;span class="claim-tag claim-tag--t">toy&lt;/span> a small MoE trained for this post, &lt;span class="claim-tag claim-tag--i">interpretation&lt;/span> a reading that fits the evidence.&lt;/p>
&lt;h2 id="1-the-layer-and-the-story-behind-it">1. The layer, and the story behind it&lt;/h2>
&lt;p>A Transformer block applies attention and then a feed-forward network (FFN) to each token&amp;rsquo;s vector. A sparse MoE layer replaces that one FFN with
$M$ of them, the experts, and adds a router that picks
$K$ of them for each token.&lt;/p>
$$
h = W_r\,x,
$$
$$
S = \text{top-}K(h),
$$
$$
g_i = \frac{e^{h_i}}{\sum_{j\in S} e^{h_j}},
$$
$$
y = \sum_{i\in S} g_i\,E_i(x)
$$
&lt;ul>
&lt;li>
$x$: the token&amp;rsquo;s vector entering the layer&lt;/li>
&lt;li>
$E_1,\dots,E_M$: the experts, each a small MLP;
$M$ of them are stored&lt;/li>
&lt;li>
$h$: router logits, one score per expert, from a single linear map
$W_r$&lt;/li>
&lt;li>
$S$: the
$K$ experts with the highest scores; only these run&lt;/li>
&lt;li>
$g_i$: the gates, a softmax over the selected scores&lt;/li>
&lt;li>
$y$: the layer&amp;rsquo;s output, a gate-weighted sum&lt;/li>
&lt;/ul>
&lt;figure class="livefig">
&lt;iframe id="livefig-moe-forward-13" src="https://richardli.xyz/figs/embed/moe-forward.html" title="One token through an MoE layer: every expert is scored, a few run" loading="lazy" sandbox="allow-scripts" style="height:520px">&lt;/iframe>&lt;figcaption>&lt;strong>Figure 1. One token through an MoE layer: every expert is scored, a few run.&lt;/strong> Scoring is one matrix multiply, so it is cheap to score all &lt;i>M&lt;/i> experts. Running them is the expensive part, and only &lt;i>K&lt;/i> run. The logits here are random numbers seeded by the token, for illustration.&lt;/figcaption>
&lt;script>(function(){var f=document.getElementById('livefig-moe-forward-13');window.addEventListener('message',function(e){if(e.source===f.contentWindow&amp;&amp;e.data&amp;&amp;e.data.h)f.style.height=Math.ceil(e.data.h)+'px';});})();&lt;/script>
&lt;/figure>
&lt;p>Two numbers describe the layer.
$M$ sets how many parameters are stored.
$K$ sets how much is computed for a token. &lt;span class="claim-tag claim-tag--m">measured&lt;/span> &lt;a href="https://arxiv.org/abs/2401.04088" target="_blank" rel="noopener">Mixtral 8x7B&lt;/a> stores 8 experts per layer and runs 2. &lt;a href="https://arxiv.org/abs/2412.19437" target="_blank" rel="noopener">DeepSeek-V3&lt;/a> is far sparser: each MoE layer has 1 shared expert and 256 routed ones, and 8 of the routed ones run for a token.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Model&lt;/th>
&lt;th style="text-align:right">Parameters stored&lt;/th>
&lt;th style="text-align:right">Touched per token&lt;/th>
&lt;th style="text-align:right">Share&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Mixtral 8x7B&lt;/td>
&lt;td style="text-align:right">47B&lt;/td>
&lt;td style="text-align:right">13B&lt;/td>
&lt;td style="text-align:right">28%&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>DeepSeek-V3&lt;/td>
&lt;td style="text-align:right">671B&lt;/td>
&lt;td style="text-align:right">37B&lt;/td>
&lt;td style="text-align:right">5.5%&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The idea is from 1991. Jacobs, Jordan, Nowlan and Hinton let a gate split the input space into regions and let each expert become good on its own region. &lt;a href="https://arxiv.org/abs/1701.06538" target="_blank" rel="noopener">Shazeer et al. (2017)&lt;/a> made the gate sparse so that only
$K$ experts run. The name carries a strong picture: the experts know different things, and the router learns who knows what. That picture makes three predictions that can be tested.&lt;/p>
&lt;h2 id="2-three-predictions-and-what-is-measured">2. Three predictions, and what is measured&lt;/h2>
&lt;h3 id="prediction-1-experts-specialize-by-subject">Prediction 1: experts specialize by subject&lt;/h3>
&lt;p>&lt;span class="claim-tag claim-tag--m">measured&lt;/span> The &lt;a href="https://arxiv.org/abs/2401.04088" target="_blank" rel="noopener">Mixtral&lt;/a> authors counted which experts fire on eight subsets of The Pile (ArXiv, GitHub, PubMed abstracts, philosophy papers and others) at layers 0, 15 and 31. The expert distributions are nearly the same across subsets. Only the synthetic DM Mathematics set differs slightly. Routing tracks syntax instead: Python indentation tokens go to the same experts, and at layer 15 consecutive tokens share a first-choice expert 23.6–28.4% of the time against 12.5% by chance.&lt;/p>
&lt;p>&lt;a href="https://arxiv.org/abs/2402.01739" target="_blank" rel="noopener">OpenMoE&lt;/a> found the same flat picture across its pre-training domains. &lt;a href="https://arxiv.org/abs/2610.11775" target="_blank" rel="noopener">RouterInterp&lt;/a> repeated the Pile test on gpt-oss-20b in 2026. Routing stayed close to corpus-proportional, with a few experts spiking on GitHub or ArXiv. Earlier, &lt;a href="https://arxiv.org/abs/2202.08906" target="_blank" rel="noopener">ST-MoE&lt;/a> reported that some encoder experts pick up categories such as punctuation, verbs and proper names, while decoder experts show no meaningful specialization.&lt;/p>
&lt;h3 id="prediction-2-the-route-depends-on-what-a-token-means-in-context">Prediction 2: the route depends on what a token means in context&lt;/h3>
&lt;p>&lt;span class="claim-tag claim-tag--m">measured&lt;/span> In &lt;a href="https://arxiv.org/abs/2402.01739" target="_blank" rel="noopener">OpenMoE&lt;/a>, a token such as “ed”, “an” or a comma goes to the same few experts whatever surrounds it. Experts collect lexically similar tokens: “can”, “will” and “would” sit in one, “have”, “has” and “had” in another. The assignment was already in place at the first saved checkpoint, 200B tokens in, and looked the same at 1T, through a change of data mix (52.25% code down to 20%) and a change of training objective. The evidence is two figures, for the tokens “ed” and “an”, and checkpoints exist only every 200B tokens, so “early” is the authors&amp;rsquo; inference.&lt;/p>
&lt;p>Later work complicates this. &lt;a href="https://arxiv.org/abs/2502.10928" target="_blank" rel="noopener">Olson et al.&lt;/a> held a word fixed and changed its sense, across six models from three families. Experts overlap more when the meaning is preserved. The effect is statistically clear, with p &amp;lt; 0.001 in every model, and strongest in the middle layers. Read off the paper&amp;rsquo;s Figure 2, it is small in absolute size: a difference of about 0.02 to 0.05 in chance-normalized overlap. In the RouterInterp paper, a probe on sparse-autoencoder features predicts routing in gpt-oss-20b at layer 12 with macro-F1 0.73, against 0.30 for a unigram baseline. The gap is narrower at some other layers, 0.57 against 0.47 at layer 4. Token identity explains a lot of routing, most of all in early open models. Context adds a measurable share in newer ones.&lt;/p>
&lt;h3 id="prediction-3-the-router-has-to-learn-a-good-assignment">Prediction 3: the router has to learn a good assignment&lt;/h3>
&lt;p>&lt;span class="claim-tag claim-tag--m">measured&lt;/span> &lt;a href="https://arxiv.org/abs/2106.04426" target="_blank" rel="noopener">Hash Layers&lt;/a> (Roller et al., NeurIPS 2021) removed the router. The expert is chosen by a fixed hash of the token ID. On Reddit data with 64 experts in one sparse layer (751M parameters), a hash balanced by token frequency reaches 23.16 validation perplexity. Switch Transformer with its learned router reaches 23.65. With 128 experts (1.28B parameters) the gap grows to about 0.6. The result is mixed elsewhere: Switch wins with five sparse layers of 16 experts (23.00 against 23.21), and with one sparse layer on WikiText-103 with its full vocabulary (31.76 against 32.32). The largest model in the paper has 4.5B parameters.&lt;/p>
&lt;p>Two rows in that paper say more than the headline. Hashing by &lt;em>k&lt;/em>-means clusters of token embeddings puts similar tokens in the same expert, as the design story recommends. It is worse than a purely random hash: 23.90 against 23.22. Spreading each cluster across all experts recovers the loss (23.17). The authors&amp;rsquo; hypothesis, for which they call this partial evidence, is that the fine distinctions a model has to make are between similar tokens, so similar tokens should get different parameters. And when the Switch router is fed the token identity instead of the hidden state, it improves from 23.65 to 23.43.&lt;/p>
&lt;p>&lt;span class="claim-tag claim-tag--t">toy&lt;/span> The same ordering appears in a small MoE trained for this post (setup in Section 5). Tokens come in clusters of look-alikes, and each token needs its own answer. With one fixed expert per token, routing by cluster ends at loss 0.79, a random hash at 0.45, and a hash that splits every cluster across the experts at 0.39, averaged over 8 seeds. The gap widens as the look-alikes get closer: 1.51 against 0.66 and 0.56. Routing by cluster loses to the random hash in 6 of the 8 seeds, and in all 8 when the look-alikes are closest. The extra gain from splitting clusters on purpose is smaller than the spread between seeds.&lt;/p>
&lt;figure class="livefig">
&lt;iframe id="livefig-moe-routes-17" src="https://richardli.xyz/figs/embed/moe-routes.html" title="The same three passages, routed by subject and routed by token identity" loading="lazy" sandbox="allow-scripts" style="height:560px">&lt;/iframe>&lt;figcaption>&lt;strong>Figure 2. The same three passages, routed by subject and routed by token identity.&lt;/strong> Tokens are routed one at a time and colored by their first-choice expert out of eight. Bars give each expert&amp;rsquo;s share of the passage so far. Under subject routing every passage belongs to one expert. Under token routing the three histograms look alike, and “the” has one color everywhere. That flat histogram is what Mixtral and OpenMoE measured. The second rule is literally a Hash Layer. This figure illustrates the two rules. It is not data from a model.&lt;/figcaption>
&lt;script>(function(){var f=document.getElementById('livefig-moe-routes-17');window.addEventListener('message',function(e){if(e.source===f.contentWindow&amp;&amp;e.data&amp;&amp;e.data.h)f.style.height=Math.ceil(e.data.h)+'px';});})();&lt;/script>
&lt;/figure>
&lt;p>&lt;strong>Table 1. The design story against the measurements.&lt;/strong>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>The design story predicts&lt;/th>
&lt;th>What was measured&lt;/th>
&lt;th>Outcome&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Experts divide the data by subject&lt;/td>
&lt;td>Expert usage is nearly identical across subject corpora in Mixtral, OpenMoE and a 2026 replication&lt;/td>
&lt;td>Not found&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>The route depends on meaning in context&lt;/td>
&lt;td>Token identity fixes the route in OpenMoE. Context has a clear but small effect in six later models&lt;/td>
&lt;td>Small effect&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>A learned router is needed&lt;/td>
&lt;td>A fixed hash of the token matches or beats a learned router in most tests with one sparse layer, up to 1.28B parameters. The learned router wins with five sparse layers and on one large-vocabulary test. Not tested at frontier scale&lt;/td>
&lt;td>Often not, at tested scale&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="3-what-carries-the-gain">3. What carries the gain&lt;/h2>
&lt;h3 id="one-wide-layer-with-a-block-mask">One wide layer with a block mask&lt;/h3>
&lt;p>&lt;span class="claim-tag claim-tag--d">derived&lt;/span> Write each expert as a two-layer MLP,
$E_i(x) = V_i \sigma (U_i x)$. Stack the input matrices into one tall matrix
$U$ and place the output matrices side by side in
$V$. Then the whole layer is&lt;/p>
$$
y \;=\; V\,\big(m(x)\odot\sigma(U x)\big)
$$
&lt;p>where the mask
$m(x)$ holds
$g_i$ on every hidden unit of block
$i$ when expert
$i$ is selected, and 0 on all other blocks. This is an identity. An MoE layer is a single FFN whose hidden layer is
$M$ times wider, multiplied by a mask that zeroes all but
$K$ blocks. The zeros are known before the blocks are computed, and that is the whole saving.&lt;/p>
&lt;p class="claim-check">Check: both sides computed on 200 random layers. Largest difference
$7 \times 10^{-15}$.&lt;/p>
&lt;p>The FFN is where a Transformer keeps most of its weights, two-thirds of them in the original design. &lt;a href="https://arxiv.org/abs/2012.14913" target="_blank" rel="noopener">Geva et al.&lt;/a> showed that it behaves as a key–value memory: each hidden unit&amp;rsquo;s input weights detect a pattern and its output weights write a correction. &lt;span class="claim-tag claim-tag--i">interpretation&lt;/span> Read that way, the router is a coarse address that says which blocks to open, and the activation function is the fine address that says which units inside respond.&lt;/p>
&lt;figure class="livefig">
&lt;iframe id="livefig-moe-wide-29" src="https://richardli.xyz/figs/embed/moe-wide.html" title="An MoE layer drawn as one wide hidden layer. Cutting the blocks smaller keeps the cost and multiplies the addresses" loading="lazy" sandbox="allow-scripts" style="height:400px">&lt;/iframe>&lt;figcaption>&lt;strong>Figure 3. An MoE layer drawn as one wide hidden layer. Cutting the blocks smaller keeps the cost and multiplies the addresses.&lt;/strong> A new token arrives every two seconds and opens a different set of blocks. All three settings store 64 hidden units and compute 16. What changes is how many distinct sets of units a token can be given. This count is the argument DeepSeekMoE makes for fine-grained experts.&lt;/figcaption>
&lt;script>(function(){var f=document.getElementById('livefig-moe-wide-29');window.addEventListener('message',function(e){if(e.source===f.contentWindow&amp;&amp;e.data&amp;&amp;e.data.h)f.style.height=Math.ceil(e.data.h)+'px';});})();&lt;/script>
&lt;/figure>
&lt;p>&lt;span class="claim-tag claim-tag--i">interpretation&lt;/span> Three things follow from the wide-layer view, and each matches something measured. The results are from the papers. Connecting them to this view is a reading.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Capacity grows faster than cost.&lt;/strong> In the &lt;a href="https://arxiv.org/abs/2402.07871" target="_blank" rel="noopener">scaling-law fit&lt;/a> of Krajewski et al., a compute-optimal MoE at
$10^{20}$ FLOPs matches a dense model trained with about 20 times more compute, and the gap widens with scale.&lt;/li>
&lt;li>&lt;strong>Any stable, balanced address works to first order.&lt;/strong> A hash is a stable, balanced address. Hash Layers also found that hashing&amp;rsquo;s lead over the learned router grows with the number of experts.&lt;/li>
&lt;li>&lt;strong>A finer address is worth more than a smarter one.&lt;/strong> &lt;a href="https://arxiv.org/abs/2401.06066" target="_blank" rel="noopener">DeepSeekMoE&lt;/a> cuts each expert into smaller ones, opens proportionally more, and adds shared experts that are always on. Its 16B model matches LLaMA2 7B with about 40% of the computation. The scaling-law study found that experts as wide as the original FFN are almost never the best choice, and that the best granularity rises with the compute budget. Hash Layers had the same move in 2021 under the name MultiHash: split each expert into segments chosen by independent hashes. In a 32-expert model at a fixed parameter count, perplexity went from 23.58 to 23.28 with eight segments.&lt;/li>
&lt;/ul>
&lt;h3 id="where-the-theory-fits">Where the theory fits&lt;/h3>
&lt;p>&lt;span class="claim-tag claim-tag--i">interpretation&lt;/span> The main theory result is &lt;a href="https://arxiv.org/abs/2208.02813" target="_blank" rel="noopener">Chen et al. (NeurIPS 2022)&lt;/a>. They build a classification problem out of clusters that each need a different rule. A single two-layer network fails on it. An MoE succeeds, the router provably learns the cluster centers, and the experts have to be nonlinear. That confirms the design story for data where inputs that look alike need the same function.&lt;/p>
&lt;p>The clustering row in Hash Layers says language is different in one respect: tokens that look alike need different handling. Both results fit one statement. A good partition makes each expert&amp;rsquo;s own sub-problem easy. Whether that means grouping similar inputs or separating them depends on the task. RouterInterp&amp;rsquo;s authors propose the direct test: do experts group tokens by what has to be done with them, instead of by how they look?&lt;/p>
&lt;h2 id="4-what-the-experts-become">4. What the experts become&lt;/h2>
&lt;p>&lt;span class="claim-tag claim-tag--m">measured&lt;/span> Experts are not subject specialists, and they are not interchangeable either. Four results from 2025 and 2026 say what they are.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Operations, not subjects.&lt;/strong> &lt;a href="https://arxiv.org/abs/2604.02178" target="_blank" rel="noopener">Herbst et al. (ICML 2026)&lt;/a> probed twelve models, labeled hundreds of experts automatically in three of them, and checked the labels by attribution. Experts are neither subject specialists nor plain token processors. They carry out fine-grained operations. An expert may be confined to LaTeX, but its job is closing delimiters.&lt;/li>
&lt;li>&lt;strong>Cleaner units, and cleaner as routing gets sparser.&lt;/strong> In the same study, neurons inside experts are less polysemantic than neurons in dense FFNs. Mixtral, where a quarter of the experts are active, scores noticeably lower than Qwen3-30B-A3B, where about 6% are. OLMoE with 1B active parameters beats the dense OLMo-7B, which points to sparsity and not size. A &lt;a href="https://arxiv.org/abs/2510.23671" target="_blank" rel="noopener">toy-model study&lt;/a> finds the same direction.&lt;/li>
&lt;li>&lt;strong>Many distinct jobs per expert.&lt;/strong> &lt;a href="https://arxiv.org/abs/2610.11775" target="_blank" rel="noopener">RouterInterp&lt;/a> explains each expert&amp;rsquo;s routing with sparse-autoencoder features. An expert&amp;rsquo;s top 20 features fall into about 11 semantically distinct clusters on average, where random assignment would give about 17. A subject expert would give one.&lt;/li>
&lt;li>&lt;strong>A core and a periphery.&lt;/strong> &lt;a href="https://arxiv.org/abs/2601.03425" target="_blank" rel="noopener">Wang et al. (2026)&lt;/a> find that two to five experts per layer, a “standing committee”, take a large share of the routing weight on every subject of MMLU: up to 70.5% in DeepSeek-V2-Lite, up to 67.0% in Qwen3-30B-A3B, and 30–44% in OLMoE. The committee takes question words, question marks and common function words. Peripheral experts are called in for chemical symbols, biomedical identifiers and financial terms.&lt;/li>
&lt;/ul>
&lt;figure class="livefig">
&lt;iframe id="livefig-moe-found-31" src="https://richardli.xyz/figs/embed/moe-found.html" title="Experts, named by what they were found to do" loading="lazy" sandbox="allow-scripts" style="height:420px">&lt;/iframe>&lt;figcaption>&lt;strong>Figure 4. Experts, named by what they were found to do.&lt;/strong> Five experts from two papers (Herbst et al. 2026 and OpenMoE), next to the kind of expert the name suggests. The examples under each card are the ones the papers give: the highlighted trigger, then the tokens the expert promotes.&lt;/figcaption>
&lt;script>(function(){var f=document.getElementById('livefig-moe-found-31');window.addEventListener('message',function(e){if(e.source===f.contentWindow&amp;&amp;e.data&amp;&amp;e.data.h)f.style.height=Math.ceil(e.data.h)+'px';});})();&lt;/script>
&lt;/figure>
&lt;blockquote>
&lt;p>&lt;span class="claim-tag claim-tag--i">interpretation&lt;/span> A block that is open for only a slice of the tokens has fewer things to represent at once, so its features interfere less. For that to help, the router does not have to group related things. The slice only has to be stable. This one mechanism accounts for four of the findings so far: a random hash works, clustering similar tokens hurts, finer blocks help, and an expert&amp;rsquo;s contents look like a bag of many small jobs. Specialization is what sparsity produces. It is not what the router was aiming at.&lt;/p>
&lt;/blockquote>
&lt;h2 id="5-why-training-ends-up-there">5. Why training ends up there&lt;/h2>
&lt;h3 id="the-routers-gradient">The router&amp;rsquo;s gradient&lt;/h3>
&lt;p>&lt;span class="claim-tag claim-tag--d">derived&lt;/span> Differentiate the loss
$L$ through the layer of Section 1 with respect to one router logit:&lt;/p>
$$
\frac{\partial L}{\partial h_k} \;=\; g_k\,\big\langle \nabla_y L,\; E_k(x) - y \big\rangle \quad \text{for } k\in S,
$$
$$
\frac{\partial L}{\partial h_k} = 0 \quad \text{for } k\notin S.
$$
&lt;p>Define
$r_k = -\langle \nabla_y L, E_k(x)\rangle$, the first-order drop in loss per unit of expert
$k$&amp;rsquo;s output added to
$y$. A gradient step of size
$\eta$ taken on the logits changes them by&lt;/p>
$$
\Delta h_k \;=\; \eta\, g_k\,\big(r_k - \bar r\big),
$$
$$
\bar r = \sum_{j\in S} g_j\, r_j .
$$
&lt;p class="claim-check">Check: automatic differentiation on 300 random layers with a non-quadratic loss. Largest error below
$10^{-15}$. The gradient on every unselected expert is exactly 0.&lt;/p>
&lt;p>This has the form of the policy gradient for a softmax policy. The actions are experts, the reward is
$r_k$, and the baseline
$\bar r$ is the reward of the current mixture. It carries no sampling noise, because the layer averages over the selected experts instead of sampling one. It is also truncated to the set
$S$. Five points follow.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>No counterfactual.&lt;/strong> An expert outside the top-
$K$ sends nothing back for that token, however good its output would have been.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>The update is zero-sum inside
$S$.&lt;/strong> The changes add to zero,
$\sum_{k\in S} \Delta h_k = 0$. A token cannot lift its selected experts above the rest as a group. One rises, another sinks, and the selected expert with the lowest reward drifts down toward the outsiders.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Outsiders get their turn, exponentially slowly.&lt;/strong> Take
$K = 2$: selected experts
$a$ and
$b$ with frozen rewards
$r_a > r_b$ and logit gap
$d_0 = h_a - h_b$, and an outsider sitting
$\Delta$ below
$b$. In continuous time,
$b$ sinks far enough to be replaced after&lt;/p>
$$
t(\Delta) \;=\; \frac{F(d_0+2\Delta) - F(d_0)}{2\,\eta\,(r_a - r_b)},
$$
$$
F(d) = e^{d} + 2d - e^{-d}
$$
&lt;p>steps, which grows as
$e^{2\Delta}$. The size of the router&amp;rsquo;s logits is therefore an exploration setting.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>With one expert and a renormalized gate there is no gradient.&lt;/strong> If
$K = 1$ then
$g = 1$ and
$y = E_k(x)$, so the bracket is zero. Shazeer et al. note that the gates have non-zero derivatives when more than one expert is chosen. &lt;a href="https://arxiv.org/abs/2101.03961" target="_blank" rel="noopener">Switch Transformer&lt;/a> trains with
$K = 1$ by gating with the probability
$p_i$ taken over all
$M$ experts,
$y = p_i E_i(x)$. The update becomes
$\Delta h_i = \eta p_i(1 - p_i) r_i$: the chosen expert is reinforced whenever its output helps at all. The baseline is zero, there is still no counterfactual, and while its output helps, nothing pushes the chosen expert back down. The other logits move only through the normalization and learn nothing about their own experts.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>The fixes are exploration or estimated counterfactuals.&lt;/strong> &lt;span class="claim-tag claim-tag--m">measured&lt;/span> Shazeer et al. add noise to the logits. The Switch paper compares argmax, sampling, input dropout and input jitter in an appendix and calls the problem by its name, an exploration–exploitation dilemma. &lt;a href="https://arxiv.org/abs/2504.12463" target="_blank" rel="noopener">Default MoE&lt;/a> fills in each unselected expert&amp;rsquo;s output with a running average of its past outputs, so every logit gets a signal. At 2B parameters with 8 experts and one selected, that raised the average of 13 benchmarks from 46.9 to 47.9 and reached the target perplexity with about 9% fewer tokens. With 32 experts and 4 selected, the average moved from 49.4 to 49.5.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p class="claim-check">Checks: the zero-sum property holds to
$2 \times 10^{-16}$ in 300 cases. The time formula gives 1,112 steps at
$\Delta = 3$ where a direct simulation takes 1,110. The Switch-gate formula matches automatic differentiation to within
$10^{-15}$.&lt;/p>
&lt;figure class="livefig">
&lt;iframe id="livefig-moe-grad-67" src="https://richardli.xyz/figs/embed/moe-grad.html" title="The derived update, iterated. The router reaches a better expert only by pushing losers down" loading="lazy" sandbox="allow-scripts" style="height:470px">&lt;/iframe>&lt;figcaption>&lt;strong>Figure 5. The derived update, iterated. The router reaches a better expert only by pushing losers down.&lt;/strong> The expert outputs and the loss direction are frozen, so only the router moves, for 600 steps of the update above. Left: the outputs of five experts for one token, the direction that lowers the loss, and the mixture &lt;i>y&lt;/i>. Right, top: each expert&amp;rsquo;s reward &lt;i>r&lt;sub>k&lt;/sub>&lt;/i>. Right, bottom: its router logit. Filled bars are selected. E4 is the best expert and starts fourth. At &lt;i>K&lt;/i> = 2, with the logits as drawn, it is first tried at step 46 and takes over. With logits twice as large that takes 310 steps, and three times as large 2,753, long after this animation ends. In real training the selected experts also fit the token, the loss gradient shrinks, and the signal fades before the slow demotion finishes.&lt;/figcaption>
&lt;script>(function(){var f=document.getElementById('livefig-moe-grad-67');window.addEventListener('message',function(e){if(e.source===f.contentWindow&amp;&amp;e.data&amp;&amp;e.data.h)f.style.height=Math.ceil(e.data.h)+'px';});})();&lt;/script>
&lt;/figure>
&lt;h3 id="the-feedback-loop">The feedback loop&lt;/h3>
&lt;p>A greedy learner with this kind of feedback has a known failure. Whatever is picked early gets the data, gets better, and gets picked again. &lt;span class="claim-tag claim-tag--m">measured&lt;/span> Shazeer et al. reported it in 2017: the gate converges to giving large weights to “the same few experts”, and the imbalance feeds itself because the favored experts train faster. The recipes cited here all add pressure against it. Switch adds an auxiliary loss on the product of each expert&amp;rsquo;s token share and its average router probability. &lt;a href="https://arxiv.org/abs/2408.15664" target="_blank" rel="noopener">DeepSeek&lt;/a> replaced the loss with a per-expert bias that is added only when choosing the top-
$K$ and is nudged down when an expert is overloaded. Their reason is that a strong auxiliary loss sends gradients into the model that hurt it. DeepSeek-V3 still keeps a very small balance loss per sequence beside the bias.&lt;/p>
&lt;figure class="livefig">
&lt;iframe id="livefig-moe-loop-69" src="https://richardli.xyz/figs/embed/moe-loop.html" title="The feedback loop, and where each training trick cuts into it" loading="lazy" sandbox="allow-scripts" style="height:260px">&lt;/iframe>&lt;figcaption>&lt;strong>Figure 6. The feedback loop, and where each training trick cuts into it.&lt;/strong> The table lists the tricks.&lt;/figcaption>
&lt;script>(function(){var f=document.getElementById('livefig-moe-loop-69');window.addEventListener('message',function(e){if(e.source===f.contentWindow&amp;&amp;e.data&amp;&amp;e.data.h)f.style.height=Math.ceil(e.data.h)+'px';});})();&lt;/script>
&lt;/figure>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Trick&lt;/th>
&lt;th>What it changes in the loop&lt;/th>
&lt;th>Used in&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Noise on logits, input jitter, input dropout&lt;/td>
&lt;td>Lets experts outside the top-
$K$ be selected sometimes&lt;/td>
&lt;td>Shazeer 2017, Switch&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Default vector for unselected experts&lt;/td>
&lt;td>Gives every router logit a signal from an estimate of the missing output&lt;/td>
&lt;td>Default MoE&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Auxiliary balance loss&lt;/td>
&lt;td>Pushes average router probabilities toward uniform, through the model&amp;rsquo;s gradients&lt;/td>
&lt;td>Shazeer 2017, Switch&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Capacity limit per expert&lt;/td>
&lt;td>Tokens over an expert&amp;rsquo;s quota skip the layer&lt;/td>
&lt;td>Switch, OpenMoE&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Load bias on selection only&lt;/td>
&lt;td>Moves tokens off overloaded experts without touching the model&amp;rsquo;s gradients&lt;/td>
&lt;td>DeepSeek-V3&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="a-tiny-moe-trained-for-real">A tiny MoE, trained for real&lt;/h3>
&lt;p>&lt;span class="claim-tag claim-tag--t">toy&lt;/span> To see the loop under real gradients, this post trains a small MoE layer: 96 token types with Zipf frequencies, 8 experts of width 8, 2 selected per token, Adam, 4,000 steps, 8 seeds. Each token vector is a shared component plus a cluster center plus a token-specific part, as in a residual stream, and each token has its own target.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Experts die without balance pressure.&lt;/strong> With no balancing, 1.6 of the 8 experts end with no tokens and the loss is 0.44. With Switch&amp;rsquo;s auxiliary loss none die and the loss is 0.21.&lt;/li>
&lt;li>&lt;strong>The shared component of the token vectors is what kills them.&lt;/strong> In a separate sweep of 3,000 steps, 0.1 experts die with the shared component removed, 1.75 at its default size, and 3.4 at double. &lt;span class="claim-tag claim-tag--d">derived&lt;/span> The router is linear, so a step on token
$x$ changes expert
$k$&amp;rsquo;s logit on any other token
$x'$ in proportion to
$\langle x, x'\rangle$. A shared component adds the same positive term to every pair&amp;rsquo;s inner product, so each win raises the expert on every token.&lt;/li>
&lt;li>&lt;strong>Centering the router&amp;rsquo;s input fixes it without a balance term.&lt;/strong> Subtract the mean token vector before routing: no dead experts and loss 0.15, the best of the six combinations of balancing (none, auxiliary loss, load bias) and centering.&lt;/li>
&lt;li>&lt;strong>An untrained expert looks bad.&lt;/strong> At the end of the default runs in that sweep, swapping a token&amp;rsquo;s weakest selected expert for the best outsider lowers the loss for 6% of the token mass. The median swap multiplies the loss by 2.7. This is the barrier OpenMoE proposed as the cause of lock-in.&lt;/li>
&lt;li>&lt;strong>Routing did not freeze early here.&lt;/strong> A tenth of the way in, a third of the token mass had its final pair of experts. Halfway, two-thirds. Routing kept drifting while the loss was falling, ten times more slowly by the end. Whatever happened in OpenMoE&amp;rsquo;s model, early lock-in does not follow from the mechanism.&lt;/li>
&lt;li>&lt;strong>A change of data mix unbalances the load and leaves most of the routing alone.&lt;/strong> Permuting the token frequencies at step 2,000 of 4,000 about triples the loss at that step. The effective number of experts in use, the inverse of the sum of squared load shares, drops from 7.2 to 6.4 with a centered router input. By the end the loss is back within noise of the unchanged run, 0.16 against 0.15. The routing does not reorganize: 28% of the token types changed experts in the second half, against 26% with no change of mix. With the auxiliary loss it is 40% against 26%. The balance pressure moves tokens. The new data alone does not. OpenMoE saw the assignment survive a change of data mix at scale.&lt;/li>
&lt;li>&lt;strong>The load bias did not settle at any update rate.&lt;/strong> Six rates from
$10^{-4}$ to
$2 \times 10^{-2}$ were tried. The paper that introduced the bias uses
$10^{-3}$, and reports
$10^{-4}$ as too slow and
$10^{-2}$ as fluctuating. The two smallest did little: loss 0.41 and 0.39, close to the 0.44 of no balancing. Every rate from
$10^{-3}$ up kept all experts alive and kept moving tokens. In the last quarter of training, 17 to 20% of the token mass changed experts between evaluations 50 steps apart, against 10% with the auxiliary loss and 3% with no balancing. The best loss was 0.25, against 0.21 for the auxiliary loss. The bias moves by the sign of the load error in one batch of 128 tokens, which is a noisy estimate. Large batches make it far less noisy, so this result is about the toy.&lt;/li>
&lt;/ul>
&lt;figure class="livefig">
&lt;iframe id="livefig-moe-toy-81" src="https://richardli.xyz/figs/embed/moe-toy.html" title="One training run of the tiny MoE, three ways: how the load spreads over eight experts" loading="lazy" sandbox="allow-scripts" style="height:330px">&lt;/iframe>&lt;figcaption>&lt;strong>Figure 7. One training run of the tiny MoE, three ways: how the load spreads over eight experts.&lt;/strong> The same data and seed under three settings, 3,000 steps of Adam. Each bar is an expert&amp;rsquo;s share of the token slots; the line marks the fair share of one eighth. Without balancing, experts 4 and 8 lose their tokens within the first 50 steps and never get them back. Expert 3 is also empty until step 1,750 and then recovers. This is one seed, and in it the auxiliary loss ends lower than centering. Over eight seeds and 4,000 steps the order is the reverse. The averages are in the text.&lt;/figcaption>
&lt;script>(function(){var f=document.getElementById('livefig-moe-toy-81');window.addEventListener('message',function(e){if(e.source===f.contentWindow&amp;&amp;e.data&amp;&amp;e.data.h)f.style.height=Math.ceil(e.data.h)+'px';});})();&lt;/script>
&lt;/figure>
&lt;p>Whether uniform load is the right target is open. The standing-committee study argues that balance losses may be fighting a natural split into a general core and a specialized periphery. The authors did not test that claim, and their masking experiment has no random-expert control. DeepSeekMoE&amp;rsquo;s shared experts are an architectural version of the same idea: the core is made explicit and always on.&lt;/p>
&lt;h2 id="6-what-sparsity-costs-choosing-k">6. What sparsity costs: choosing K&lt;/h2>
&lt;p>&lt;a href="https://openreview.net/forum?id=dNLXIVeCqn" target="_blank" rel="noopener">Zhu et al. (ICML 2026)&lt;/a> ask how
$K$ changes the convergence of SGD on a deep MoE. &lt;span class="claim-tag claim-tag--m">measured&lt;/span> Their bound on the average squared gradient norm after
$T$ steps, in the form of their second corollary, has three parts: the initial gap
$Z_1$, gradient noise
$Z_2$, and a routing term
$Z_3$ that comes from tokens switching experts between steps.&lt;/p>
$$
\frac1T\sum_{t \lt T}\mathbb{E}\,\Vert\nabla F(w^t)\Vert^2 \;\le\; \mathcal{O}\!\left(\Big(Z_1 + Z_3\big(1-\tfrac KM\big)\Big)\,\frac{1+\frac MK}{\sqrt T}\right) + \mathcal{O}\!\left(\frac{Z_2}{\sqrt T}\right)
$$
&lt;p>Read at face value it says two things. More experts per token converge faster per step, by the factor
$1 + M/K$. And under a fixed compute budget
$R$, where a token costs
$r_0 = r_s + N r_g + K N r_e$ for the non-MoE parts,
$N$ routers and
$KN$ experts, there is a best
$K$. Bounding
$1 - K/M$ by 1 and dropping constants as the paper does, the bound is proportional to&lt;/p>
$$
b(K) \;=\; \Big(1 + \frac MK + \rho\Big)\,\sqrt{c + K},
$$
$$
\rho = \frac{Z_2}{Z_1+Z_3},
$$
$$
c = \frac{r_s + N r_g}{N r_e}.
$$
&lt;p>Here
$\rho$ is the ratio of the noise term to the other two and
$c$ is the fixed cost of a token, counted in experts per layer.&lt;/p>
&lt;figure class="livefig">
&lt;iframe id="livefig-moe-bound-98" src="https://richardli.xyz/figs/embed/moe-bound.html" title="At a fixed compute budget, the paper&amp;#39;s bound puts the best K below M only through its noise term" loading="lazy" sandbox="allow-scripts" style="height:430px">&lt;/iframe>&lt;figcaption>&lt;strong>Figure 8. At a fixed compute budget, the paper&amp;rsquo;s bound puts the best K below M only through its noise term.&lt;/strong> Each curve is divided by its own minimum, so 1.0 marks the best &lt;i>K&lt;/i>. &lt;i>M&lt;/i> = 16, as in the paper&amp;rsquo;s language-model experiments. The sweep shows the best &lt;i>K&lt;/i> sliding from &lt;i>M&lt;/i> toward 1 as the noise ratio grows.&lt;/figcaption>
&lt;script>(function(){var f=document.getElementById('livefig-moe-bound-98');window.addEventListener('message',function(e){if(e.source===f.contentWindow&amp;&amp;e.data&amp;&amp;e.data.h)f.style.height=Math.ceil(e.data.h)+'px';});})();&lt;/script>
&lt;/figure>
&lt;h3 id="what-the-bound-does-and-does-not-establish">What the bound does and does not establish&lt;/h3>
&lt;p>&lt;span class="claim-tag claim-tag--d">derived&lt;/span> These points come from reading the appendix proofs line by line. The algebra behind the first, third, fourth and sixth is checked by code. The rest are readings of the paper.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>The dependence on
$K$ comes from a loose step.&lt;/strong> The proof bounds the gradient of each expert&amp;rsquo;s own loss, averaged over the tokens routed to it, and adds that to the bound for the shared parameters. But the gradient of the full loss with respect to expert
$i$ is that quantity times the expert&amp;rsquo;s token share
$\ell_i$, which is about
$K/M$. The sum is still a valid upper bound. On the expert part it is loose by
$1/\ell_i^2$ in squared norm, about
$(M/K)^2$ when the load is balanced, and the
$M/K$ in the factor
$1 + M/K$ comes from this step. With the exact conversion it becomes
$(M/K)(K/M)^2 = K/M$, which points the other way.&lt;/li>
&lt;li>&lt;strong>The step-size cap depends on
$K$ and is then held constant.&lt;/strong> The theorem needs the learning rate below a cap, and two of the cap&amp;rsquo;s four terms fall as
$1/(NK)$. The corollaries vary
$K$ with the learning rate fixed.&lt;/li>
&lt;li>&lt;strong>The headline rate alone has no interior optimum.&lt;/strong> With
$\rho = 0$ and
$c = 0$ the curve is
$\sqrt{K} + M/\sqrt{K}$, which keeps falling until
$K = M$. That is dense routing.&lt;/li>
&lt;li>&lt;strong>The optimum comes from the noise term.&lt;/strong> With
$c = 0$ the minimum is at
$K^\ast = M/(1 + \rho)$. The paper observes
$K^\ast = 2$ at
$M = 16$, which corresponds to
$\rho = 7$. Nothing measures
$\rho$, so the bound fits any observed
$K^\ast$.&lt;/li>
&lt;li>&lt;strong>The routing term is handled by assumption.&lt;/strong> A corollary bounds each unselected expert&amp;rsquo;s weight by
$\delta^t/M$, and the theorem needs the
$\delta^t$ to sum to a constant over training. The appendix obtains that by supposing each step&amp;rsquo;s routing discrepancy is no larger than that step&amp;rsquo;s drop in loss. The corollary also states the inequality as ≤ where its proof writes ≥. Only ≤, applied to the unselected experts, gives the stated bound.&lt;/li>
&lt;li>&lt;strong>At
$K = 1$ the paper&amp;rsquo;s own gate gives the router no gradient.&lt;/strong> Its gate is a softmax over the selected experts, so Section 5 applies and the router stays at its random initialization. The paper describes no auxiliary loss and no routing noise, so as described its
$K = 1$ curves are runs with a frozen random router.&lt;/li>
&lt;li>&lt;strong>The cost model fixes the size of an expert.&lt;/strong> More experts per token then means more compute. Real designs hold the active parameters fixed and change the granularity, as in Section 3.&lt;/li>
&lt;li>&lt;strong>One experiment disagrees with the trend.&lt;/strong> In the paper&amp;rsquo;s own first figure,
$K = 1$ has the smallest loss gap to dense routing. The experiments run from 3M to about 3B parameters, always with 8 or 16 experts and 10,000 steps, and the best
$K$ is 2 in the language runs.&lt;/li>
&lt;/ul>
&lt;p class="claim-check">Checks: the token-share identity holds to
$10^{-15}$ in the toy. The minimizer
$M/(1 + \rho)$ and the sign of the derivative at
$\rho = 0$ were confirmed symbolically and by grid search. The one-layer output bound used in the proof of the paper's first theorem, stated in Section 7, was never violated in 20,000 random cases; the tightest reached 0.87 of the bound.&lt;/p>
&lt;h3 id="what-a-toy-says">What a toy says&lt;/h3>
&lt;p>&lt;span class="claim-tag claim-tag--t">toy&lt;/span> The same sweep in the tiny MoE, with compute proportional to
$K$ and the router input centered, which keeps every expert alive at
$K \ge 2$.&lt;/p>
&lt;p>&lt;strong>Table 2. The tiny MoE at fixed compute: 8 experts stored, 6,000 ÷
$K$ steps, mean loss over 8 seeds.&lt;/strong>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>
$K$&lt;/th>
&lt;th style="text-align:right">Steps&lt;/th>
&lt;th style="text-align:right">Loss, softmax over selected&lt;/th>
&lt;th style="text-align:right">Loss, Switch gate&lt;/th>
&lt;th style="text-align:right">Loss after 750 steps&lt;/th>
&lt;th>Router&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1&lt;/td>
&lt;td style="text-align:right">6,000&lt;/td>
&lt;td style="text-align:right">0.68&lt;/td>
&lt;td style="text-align:right">0.73&lt;/td>
&lt;td style="text-align:right">1.43&lt;/td>
&lt;td>weights moved by exactly 0 with the softmax gate&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2&lt;/td>
&lt;td style="text-align:right">3,000&lt;/td>
&lt;td style="text-align:right">0.27&lt;/td>
&lt;td style="text-align:right">0.23&lt;/td>
&lt;td style="text-align:right">1.37&lt;/td>
&lt;td>trains&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>4&lt;/td>
&lt;td style="text-align:right">1,500&lt;/td>
&lt;td style="text-align:right">0.66&lt;/td>
&lt;td style="text-align:right">0.63&lt;/td>
&lt;td style="text-align:right">1.44&lt;/td>
&lt;td>trains&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>8&lt;/td>
&lt;td style="text-align:right">750&lt;/td>
&lt;td style="text-align:right">1.52&lt;/td>
&lt;td style="text-align:right">1.52&lt;/td>
&lt;td style="text-align:right">1.52&lt;/td>
&lt;td>trains, dense&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>At equal compute
$K = 2$ wins, as in the paper. At equal steps more experts per token did not help:
$K = 8$ is the worst. A
$K = 1$ router that can learn, with the Switch gate, does no better on average than the frozen one, 0.73 ± 0.48 against 0.68 ± 0.16 across seeds, and it leaves 1.4 experts dead against 0.1. So in this toy, unfreezing the router did not remove the
$K = 1$ penalty.&lt;/p>
&lt;h3 id="what-is-solid-each-expert-sees-only-its-share">What is solid: each expert sees only its share&lt;/h3>
&lt;p>&lt;span class="claim-tag claim-tag--d">derived&lt;/span> The gradient of the batch loss for expert
$i$ is a sum over the tokens routed to it. With batch size
$B$ and token share
$\ell_i$, its signal-to-noise ratio is&lt;/p>
$$
\mathrm{SNR}_i \;\approx\; B\,\ell_i\;\frac{\Vert\bar g_i\Vert^2}{\sigma_i^2} \quad \text{for small } \ell_i ,
$$
&lt;p>where
$\bar g_i$ is the mean per-token gradient over the expert&amp;rsquo;s tokens and
$\sigma_i^2$ their mean squared norm. An expert in a layer with
$M/K = 32$ learns from a batch 32 times smaller than the attention weights next to it. This is the real cost of sparsity that the bound was reaching for.&lt;/p>
&lt;p class="claim-check">Check: 300 minibatches for each of 120 experts, in toy layers of 2 to 16 experts. The log–log slope of signal-to-noise against token share is 1.01.&lt;/p>
&lt;h2 id="7-what-to-do-with-this">7. What to do with this&lt;/h2>
&lt;p>Each item says where it comes from. None has been tested at scale here.&lt;/p>
&lt;h3 id="in-pre-training">In pre-training&lt;/h3>
&lt;ol>
&lt;li>&lt;strong>Center the router&amp;rsquo;s input.&lt;/strong> &lt;span class="claim-tag claim-tag--t">toy&lt;/span> Route on
$x - \mu$, with
$\mu$ a running mean of the layer&amp;rsquo;s input. The shared component of the residual stream ties every token&amp;rsquo;s logits together, and that coupling is what let experts die in the toy. Removing it took dead experts from 1.6 to 0 and gave the lowest loss without any balance term. One line of code, and the cheapest ablation on this list.&lt;/li>
&lt;li>&lt;strong>Count tokens per expert, not per batch.&lt;/strong> &lt;span class="claim-tag claim-tag--d">derived&lt;/span> An expert&amp;rsquo;s gradient has signal-to-noise proportional to
$B \cdot K/M$. When you raise
$M/K$, raise the batch with it or lower the experts&amp;rsquo; learning rate. Expect rarely used experts to be the noisiest parameters in the model.&lt;/li>
&lt;li>&lt;strong>Treat the size of router logits as an exploration setting.&lt;/strong> &lt;span class="claim-tag claim-tag--d">derived&lt;/span> The wait before an outsider is tried grows as
$e^{2\Delta}$ in the logit gap. A small router initialization, a temperature, or a penalty on logit size keeps that wait short early in training. ST-MoE&amp;rsquo;s router z-loss is such a penalty, the squared log-sum-exp of the router logits, introduced there for numerical stability. Log the margin between the
$K$-th and
$(K+1)$-th logit.&lt;/li>
&lt;li>&lt;strong>Choose the gate&amp;rsquo;s normalization on purpose.&lt;/strong> &lt;span class="claim-tag claim-tag--d">derived&lt;/span> A softmax over the selected set compares experts with each other. It is zero-sum, it pushes losers down, and it cannot train a router at
$K = 1$. A gate that is not renormalized over the selected set, as in Switch, compares the chosen expert with nothing and entrenches whatever was chosen. When two values of
$K$ are compared, check that the router receives a gradient at both.&lt;/li>
&lt;li>&lt;strong>Give the router the token.&lt;/strong> &lt;span class="claim-tag claim-tag--m">measured&lt;/span> The Switch router fed the token identity, and the clustering row in Hash Layers, both suggest that a stable address which separates look-alikes does better than a context-aware one at that scale. Add a token-identity term to the router logits, or start routing from a balanced hash, and let the hidden state adjust it.&lt;/li>
&lt;li>&lt;strong>Log the softmax mass outside the top-
$K$.&lt;/strong> &lt;span class="claim-tag claim-tag--d">derived&lt;/span> For one layer, sparse and dense routing differ in output by at most twice that mass times the largest expert output norm. This is a step in the proof of Zhu et al.&amp;rsquo;s first theorem, re-derived here. It measures how far training is from dense, and it gives a per-token rule for
$K$: take experts until the remaining mass is under a budget.&lt;/li>
&lt;/ol>
&lt;h3 id="in-rl-on-an-moe">In RL on an MoE&lt;/h3>
&lt;ol start="7">
&lt;li>&lt;strong>Make routing part of the recorded trajectory.&lt;/strong> &lt;span class="claim-tag claim-tag--m">measured&lt;/span> A token whose
$K$-th and
$(K+1)$-th logits are nearly tied flips experts under any numerical difference between sampler and trainer. The output then jumps by
$g_K\Vert E_K - E_{K+1}\Vert$, however small the difference was. &lt;a href="https://arxiv.org/abs/2510.11370" target="_blank" rel="noopener">Ma et al.&lt;/a> measured this on Qwen3-30B-A3B: about 10% of the routers select different experts in the trainer than in the sampler, and 94% of tokens differ in at least one layer. The sampler–trainer policy gap was larger than in dense models. Replaying the sampler&amp;rsquo;s top-
$K$ mask in the trainer, with the gates still computed from the trainer&amp;rsquo;s logits, stopped the RL collapses. Log the flip rate and the tie margin either way.&lt;/li>
&lt;li>&lt;strong>Count tokens per expert in the RL batch.&lt;/strong> &lt;span class="claim-tag claim-tag--i">interpretation&lt;/span> RL batches are small and far from the pre-training mix. By item 2, experts hit by a handful of tokens get high-variance updates, and OpenMoE showed that load goes out of balance on inputs unlike the pre-training data, and the toy moves the same way when its token frequencies are permuted. Log per-expert token counts per update. Accumulating over more tokens before updating rarely hit experts, or scaling their learning rate by load, follows from the same accounting.&lt;/li>
&lt;/ol>
&lt;h3 id="open-questions">Open questions&lt;/h3>
&lt;ul>
&lt;li>Does centering the router input remove the need for balance pressure at scale, or only in a toy?&lt;/li>
&lt;li>Does a learned router beat a hash at frontier scale, or does the hash&amp;rsquo;s lead keep growing as experts multiply?&lt;/li>
&lt;li>What makes routing sensitive to context: model size, depth, starting from a dense model (OpenMoE saw weaker token-level specialization in Mixtral and suggested this as the reason), or the training recipe?&lt;/li>
&lt;li>Is uniform balance suppressing a useful core and periphery?&lt;/li>
&lt;li>Is there a theory in which separating similar inputs is optimal, to set beside the cluster theory of Chen et al.?&lt;/li>
&lt;/ul>
&lt;h2 id="what-was-checked-and-how">What was checked, and how&lt;/h2>
&lt;p>&lt;strong>Table 3. The derived claims, the check, and the result.&lt;/strong>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Claim&lt;/th>
&lt;th>How it was checked&lt;/th>
&lt;th>Result&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>MoE layer = wide FFN with a block mask&lt;/td>
&lt;td>Both sides computed on 200 random layers&lt;/td>
&lt;td>Largest difference
$7 \times 10^{-15}$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Router gradient, and zero outside the top-
$K$&lt;/td>
&lt;td>Automatic differentiation, 300 random layers, log-cosh loss&lt;/td>
&lt;td>Error below
$10^{-15}$; exactly 0 outside&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Policy-gradient form with mixture baseline&lt;/td>
&lt;td>Same runs&lt;/td>
&lt;td>Error below
$10^{-15}$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Zero-sum inside the selected set&lt;/td>
&lt;td>300 random cases&lt;/td>
&lt;td>Sum below
$2 \times 10^{-16}$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>No router gradient at
$K = 1$ with a renormalized gate&lt;/td>
&lt;td>Automatic differentiation; 6,000 training steps of the toy&lt;/td>
&lt;td>Exactly 0; router weights unchanged&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Switch-gate update&lt;/td>
&lt;td>Automatic differentiation, 300 cases&lt;/td>
&lt;td>Error below
$10^{-15}$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Time for an outsider to be tried&lt;/td>
&lt;td>Direct simulation of the update at five gaps&lt;/td>
&lt;td>1,110 steps simulated, 1,112 predicted at
$\Delta = 3$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Best
$K = M/(1 + \rho)$; none inside when
$\rho = 0$&lt;/td>
&lt;td>Symbolic differentiation and grid search&lt;/td>
&lt;td>Exact&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Full gradient of an expert = token share × its own gradient&lt;/td>
&lt;td>Automatic differentiation, 8 seeds of 8 experts&lt;/td>
&lt;td>Difference below
$10^{-15}$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>One-layer sparse–dense gap ≤ 2 × norm × outside mass&lt;/td>
&lt;td>20,000 random cases&lt;/td>
&lt;td>Never violated; tightest 0.87&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Expert signal-to-noise ∝ batch × token share&lt;/td>
&lt;td>300 minibatches, 120 experts in layers of 2 to 16&lt;/td>
&lt;td>Log–log slope 1.01&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The toy is one MoE layer in NumPy with automatic differentiation: 96 token types in 8 clusters, 16-dimensional inputs, 8-dimensional targets, 8 experts of width 8, batch 128, Adam at
$3 \times 10^{-3}$. Its results show that a mechanism can occur under real gradients. They say nothing about its size in a large model.&lt;/p>
&lt;h2 id="reading-list">Reading list&lt;/h2>
&lt;p>&lt;strong>The case against the design story&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://arxiv.org/abs/2106.04426" target="_blank" rel="noopener">Hash Layers For Large Sparse Models&lt;/a>, Roller, Sukhbaatar, Szlam, Weston, NeurIPS 2021. Tables 1 and 3 are the ones to read.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2401.04088" target="_blank" rel="noopener">Mixtral of Experts&lt;/a>, Jiang et al., 2024. Section 5, routing analysis.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2402.01739" target="_blank" rel="noopener">OpenMoE&lt;/a>, Xue et al., ICML 2024. Section 4: token-level routing, early lock-in, dropped tokens.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2202.08906" target="_blank" rel="noopener">ST-MoE&lt;/a>, Zoph et al., 2022. Section 7 on encoder and decoder experts.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>What experts do&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://arxiv.org/abs/2604.02178" target="_blank" rel="noopener">The Expert Strikes Back&lt;/a>, Herbst, Wermter, Lee, ICML 2026.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2610.11775" target="_blank" rel="noopener">RouterInterp: Understanding Superposed Specialisation in Mixture of Experts Routing&lt;/a>, Lasy, Cai, Ayonrinde, ICML 2026.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2601.03425" target="_blank" rel="noopener">The Illusion of Specialization: the Standing Committee&lt;/a>, 2026.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2502.10928" target="_blank" rel="noopener">Probing Semantic Routing in Large MoE Models&lt;/a>, Olson et al., 2025.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2510.23671" target="_blank" rel="noopener">Sparsity and Superposition in Mixture of Experts&lt;/a>, Chaudhari, Nuer, Thorstenson, NeurIPS 2025 workshop.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Training dynamics&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://arxiv.org/abs/1701.06538" target="_blank" rel="noopener">Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer&lt;/a>, Shazeer et al., 2017. Section 4 on self-reinforcing imbalance.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2101.03961" target="_blank" rel="noopener">Switch Transformers&lt;/a>, Fedus, Zoph, Shazeer, 2021. Section 2 and Appendix C on exploration.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2504.12463" target="_blank" rel="noopener">Dense Backpropagation Improves Training for Sparse MoE&lt;/a>, Panda et al., NeurIPS 2025.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2408.15664" target="_blank" rel="noopener">Auxiliary-Loss-Free Load Balancing&lt;/a>, Wang et al., 2024, and the &lt;a href="https://arxiv.org/abs/2412.19437" target="_blank" rel="noopener">DeepSeek-V3 report&lt;/a>.&lt;/li>
&lt;li>&lt;a href="https://openreview.net/forum?id=dNLXIVeCqn" target="_blank" rel="noopener">Rethinking Convergence in MoE Training: The Role of Routing Sparsity&lt;/a>, Zhu et al., ICML 2026.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2510.11370" target="_blank" rel="noopener">Stabilizing MoE Reinforcement Learning by Aligning Training and Inference Routers&lt;/a>, Ma et al., ICML 2026.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Scaling, design, theory&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://arxiv.org/abs/2402.07871" target="_blank" rel="noopener">Scaling Laws for Fine-Grained Mixture of Experts&lt;/a>, Krajewski et al., 2024.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2401.06066" target="_blank" rel="noopener">DeepSeekMoE&lt;/a>, Dai et al., 2024.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2208.02813" target="_blank" rel="noopener">Towards Understanding the Mixture-of-Experts Layer in Deep Learning&lt;/a>, Chen, Deng, Wu, Gu, Li, NeurIPS 2022.&lt;/li>
&lt;li>&lt;a href="https://arxiv.org/abs/2012.14913" target="_blank" rel="noopener">Transformer Feed-Forward Layers Are Key-Value Memories&lt;/a>, Geva et al., EMNLP 2021.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Introductions&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Cameron Wolfe: &lt;a href="https://cameronrwolfe.substack.com/p/conditional-computation-the-birth" target="_blank" rel="noopener">The Birth and Rise of Conditional Computation&lt;/a>, &lt;a href="https://cameronrwolfe.substack.com/p/moe-llms" target="_blank" rel="noopener">Mixture-of-Experts LLMs&lt;/a>, and &lt;a href="https://cameronrwolfe.substack.com/p/nano-moe" target="_blank" rel="noopener">nanoMoE&lt;/a>, a from-scratch PyTorch implementation.&lt;/li>
&lt;li>Maarten Grootendorst: &lt;a href="https://newsletter.maartengrootendorst.com/p/a-visual-guide-to-mixture-of-experts" target="_blank" rel="noopener">A Visual Guide to Mixture of Experts&lt;/a>.&lt;/li>
&lt;/ul>
&lt;p>&lt;em>Sources checked 27 November 2026.&lt;/em>&lt;/p></description></item></channel></rss>