Tim Lau
Menu
Blog/

Choosing an optimizer for each layer of a language model

How layer symmetries guide optimizer choices, with pre-training results from Qwen3, Gemma 3, OLMoE, and gpt-oss.

Imagine swapping the IDs of two tokens and moving their embedding and output rows with them. Every sentence keeps the same probability. What should happen on the next optimizer step?

Weijie Su and I asked for two things in our NeurIPS paper. When a layer’s coordinates change, its update should change along with them. When several parameter values give exactly the same prediction, the update should spend its effort on differences the model can use. A token embedding, an output head, an intermediate neuron, and an expert router each put those requirements to a different test.

The clearest replicated result came from changing just the embedding and output-head optimizers in a Gemma 3 1B-style model. Across three seeds, the change lowered mean validation loss by 0.0422 nats per token. The sparse models raised a different question. If two updates reach similar losses, do they also train the same share of experts? In downsized gpt-oss, the method with the best loss and the methods that reached every expert were different.

Gemma 3 1B-style mean validation loss by embedding and output-head optimizer. AdamW 2.7588, RowNormM 2.7254, HybridPolarGradM 2.7166.
We trained the same model with three choices for the embedding and output-head optimizer. Lower loss means the model assigned higher probability to the held-out tokens, on average.

When should two updates agree?

Let DD be a gradient or momentum matrix, and let U\scrU turn it into an update. For an orthogonal change of coordinates gg, there are two ways to obtain the update in the new coordinates. We can transform the gradient and run the optimizer there, or run the optimizer first and then transform its output. We ask that both paths give the same answer.

U(g⋅D)=g⋅U(D).\scrU(g \cdot D) = g \cdot \scrU(D).

Taking the sign of each coordinate gives a small counterexample. We use sgn⁡(0)=0\operatorname{sgn}(0)=0. Start with the vector (1,0)⊤(1,0)^\top and rotate it to (35,45)⊤\bigl(\tfrac{3}{5},\tfrac{4}{5}\bigr)^\top. Taking signs before rotating gives (35,45)⊤\bigl(\tfrac{3}{5},\tfrac{4}{5}\bigr)^\top. Taking signs after rotating gives (1,1)⊤(1,1)^\top. Both steps point into the first quadrant, but they move in different directions. The choice of feature axes has entered the update.

What orthogonal symmetry forces

Take a matrix WW representing a linear map between two feature spaces. Change their bases by invertible matrices PP and QQ. The new matrix is W~=PWQ−1\widetilde W=PWQ^{-1}. The chain rule for the same loss expressed in the new coordinates gives G~=P−⊤GQ⊤\widetilde G=P^{-\top}GQ^\top. For orthogonal P,QP,Q, both the gradient and the parameter step therefore transform by X↦PXQ⊤X\mapsto PXQ^\top. This calculation compares two coordinate descriptions of the same model. Rotating a single weight in a fixed network can change its predictions.

Now suppose that our update is a continuous, single-valued function of one matrix DD. This input can be the gradient or an accumulated direction such as momentum. We require equivariance for every pair of orthogonal matrices on the two sides. Theorem 3.2 of the conference paper characterizes exactly which rules satisfy this requirement. Write D=UDiag⁡(s)V⊤D=U\Diag(s)V^\top using a thin singular value decomposition with ss of length min⁡(m,n)\min(m,n). Then every compatible rule has the form

U(D)=UDiag⁡(ψ(s))V⊤.\scrU(D)=U\Diag\bigl(\psi(s)\bigr)V^\top.

The vector map ψ\psi commutes with signed permutations of its arguments. Its coefficient for one direction can depend on the entire spectrum. Equal singular values must receive equal coefficients, and a zero singular value must receive coefficient zero.

To see why, first apply the rule to a diagonal input. Flipping a matching pair of left and right coordinate signs leaves the input fixed, so the output must survive the same flip. That forces off-diagonal entries to vanish. Swapping two tied coordinates also leaves the input fixed, forcing equal diagonal entries there. At a zero coordinate we can flip just one side, forcing its output to vanish. Finally, transporting the diagonal result through UU and VV gives the displayed formula. In the other direction, changing bases simply rotates the two singular-vector frames of a spectral rule. Spectral characterization and examples.

There is a useful connection to scalar objectives. For a convex function ff of the singular values that is invariant under signs and permutations, let F(W)=f(σ(W))F(W)=f(\sigma(W)). The classical spectral gradient formula, recalled as Theorem 3.1 in the conference paper, says that FF is differentiable at WW precisely when ff is differentiable at s=σ(W)s=\sigma(W). At such a point, the coefficient map in its matrix gradient is ψ(s)=∇f(s)\psi(s)=\nabla f(s). For example, F(W)=12⦀W⦀F2F(W)=\tfrac12\fronorm{W}^2 returns the gradient WW. The classification goes further by asking what form an update must take from its transformation law alone.

Two step constraints with the same symmetry

What does the classification leave us free to choose? For matrices of the same shape, the Frobenius inner product is ⟪A,B⟫F=tr(A⊤B)\dotpF{A}{B}=\tr(A^\top B). Take DD to be the gradient and maximize the first-order decrease ⟪D,Z⟫F\dotpF{D}{Z}, where −Z-Z is the proposed step. For D≠0D\ne0, the Frobenius unit ball gives the unique maximizer D/⦀D⦀FD/\fronorm{D}. The spectral-norm unit ball gives

max⁡⦀Z⦀S⩽1 ⟪D,Z⟫F=∑isi=⦀D⦀nuc.\max_{\specnorm{Z}\leqslant 1}\,\dotpF{D}{Z} = \sum_i s_i = \nucnorm{D}.

One maximizer is the canonical polar factor formed from the singular-vector pairs with positive singular values. If those values are 44 and 11, the Frobenius-ball step keeps their 4:14{:}1 ratio, while the polar step gives both directions unit weight. Both balls are invariant under independent orthogonal basis changes, so the optimization problems transform consistently. At rank deficiency the spectral ball can have several maximizers. The canonical choice sets the coefficients of the null directions to zero. The ideal polar map jumps when a singular value reaches zero. Its damped version uses si/si2+εs_i/\sqrt{s_i^2+\varepsilon} for ε>0\varepsilon>0 and is continuous through the rank change. Connection to spectral-norm steepest descent.

Momentum fits because a linear combination of consistently transformed gradients transforms in the same way. The theorem then applies to the map acting on that one momentum matrix. An optimizer such as Shampoo carries additional left and right preconditioners learned from past gradients. Its update can transform consistently with those states and have different singular vectors from the current gradient. Direction-wise and stateful examples.

What changes when the rows have names?

Mixing two vocabulary rows with an arbitrary rotation would mix the embeddings of two distinct tokens. Their IDs can, however, be relabeled. We therefore let a permutation PP act on the rows and an orthogonal matrix RR change the feature basis. A useful construction is UR(D)=DΦ(D⊤D)\scrU_{\mathrm R}(D)=D\Phi(D^\top D), where Φ(RCR⊤)=RΦ(C)R⊤\Phi(RCR^\top)=R\Phi(C)R^\top for every positive semidefinite CC and orthogonal RR. Indeed, the Gram matrix of PDR⊤PDR^\top is R(D⊤D)R⊤R(D^\top D)R^\top. Substitution gives exactly the required transformation of the step. For vv token rows and dd features, all the spectral work here fits in a d×dd\times d matrix.

The weaker symmetry admits genuinely different rules. Take two one-dimensional token rows with D=(1,2)⊤D=(1,2)^\top. A step of the form DΦ(D⊤D)D\Phi(D^\top D) can only multiply both entries by the same scalar. Normalizing each nonzero row to unit length gives (1,1)⊤(1,1)^\top. Relabeling the tokens still relabels their steps, and reversing the feature axis still reverses both signs. Theorem 4.1 and Proposition 4.2 of the conference paper give us a construction here. Right-spectral maps and rules that rescale each row by the same function of its length are compatible, and composing compatible maps yields another compatible map. This is how a token-specific scale and a global feature correction can enter the same update. Vocabulary symmetries and hybrid updates.

A token row and a softmax head

In an embedding matrix, row ii represents token ii. A permutation reorders whole rows. Rotating the feature basis changes a row’s coordinates but preserves its length. That suggests an inexpensive update that gives each momentum row its own scale. For momentum MM, our RowNormM direction for row ii is

[Urow(M)]i:=Mi:∥Mi:∥2+ε.\bigl[\scrU_{\mathrm{row}}(M)\bigr]_{i:} = \frac{M_{i:}}{\euclidnorm{M_{i:}} + \varepsilon}.

Here MM is an exponential moving average of stochastic gradients, and ε>0\varepsilon>0 damps the step for a small row. RowNormM needs one norm per token. HybridPolarGradM adds a second operation on the feature axis. Put the normalized rows in ZZ and form their Gram matrix CC. The row-first vocabulary hybrid uses the idealized direction

C=Z⊤Z,R=(C+εId)−1/2,ν=max⁡{tr(CR),ε},H=ναZR.\begin{aligned} C &= Z^\top Z, & R &= (C+\varepsilon I_d)^{-1/2},\\ \nu &= \max\{\tr(CR),\varepsilon\}, & H &= \nu^\alpha ZR . \end{aligned}

Row normalization decides how much weight each token contributes to CC. The inverse square root then rescales feature directions shared across tokens. The trace factor approximates the nuclear norm of ZZ when damping is small. With α=0\alpha=0 the step drops this scale, while the Gemma vocabulary hybrid uses α=1\alpha=1. If the vocabulary is split across devices, each shard can form its local Zs⊤ZsZ_s^\top Z_s and the global Gram is their sum. For Gemma that sum is only 1,152×1,1521{,}152\times1{,}152, even though there are 262,144 token rows. Multiplying by ZZ and processing its rows still cost time. The wall-clock measurements below show how much. Practical optimizers and inverse-square-root iterations.

What does the output head throw away?

An untied output head has the same shape as the embedding, yet it has an additional freedom. Add the same row a⊤a^\top to every output row. For any hidden vector hh, each logit rises by the same scalar a⊤ha^\top h. The common factor cancels between the numerator and denominator of softmax. Writing vv for vocabulary size,

softmax⁡(z+c1v)=softmax⁡(z).\operatorname{softmax}(z+c\One_v)=\operatorname{softmax}(z).

You can see this with a three-token vocabulary.

What happens when every logit shifts?
TokenLogitProbability
river
+1.0
66.5%
sea
0.0
24.5%
lake
−1.0
9.0%

A shared shift preserves the differences between logits, so each token keeps the same probability.

To keep the update in the directions that change probabilities, subtract the mean row of the momentum, normalize each row, and subtract the mean again. The second subtraction matters. With one feature and three rows, the vector (2,−1,−1)⊤(2,-1,-1)^\top already has mean zero. Exact row normalization gives (1,−1,−1)⊤(1,-1,-1)^\top, whose mean is −13-\tfrac{1}{3}. Centering again gives (43,−23,−23)⊤\bigl(\tfrac{4}{3},-\tfrac{2}{3},-\tfrac{2}{3}\bigr)^\top.

In matrix form, the projector Πv⊥=Iv−1v1v⊤/v\Pi_v^\perp=I_v-\One_v\One_v^\top/v removes that common row. The projected row update is

Hhead=Πv⊥Urow(Πv⊥M),1v⊤Hhead=0.H_{\mathrm{head}}=\Pi_v^\perp\scrU_{\mathrm{row}}(\Pi_v^\perp M), \qquad \One_v^\top H_{\mathrm{head}}=0.

For a head hybrid, first center the momentum, normalize its rows, and center again to obtain ZZ in the Gram formula. Right multiplication by RR preserves zero row mean in exact arithmetic. The algorithm also projects the final direction. This argument uses an untied head and ordinary, uncapped softmax logits. With tied weights, a shared-row shift changes the input embeddings too. With a nonlinear logit cap, adding a common offset before the cap can change the gaps after it. The Gemma diagnostics measure the common offset separately from the logit differences.

Why a gated MLP has a row rule and a column rule

A SwiGLU block forms two vectors, multiplies them element by element, and projects the result back into the residual stream. If WgW_g and WuW_u are the gate and up matrices and WdW_d is the down matrix, its output is

F(x)=Wd(SiLU⁡(Wgx)⊙Wux).F(x)=W_d\bigl(\operatorname{SiLU}(W_gx)\odot W_ux\bigr).

Pick a permutation PP of the intermediate neurons. Replace the three matrices by PWg, PWu, WdP⊤PW_g,\ PW_u,\ W_dP^\top. Both branches reorder their outputs in the same way, the elementwise product keeps that order, and the final P⊤P^\top undoes it. Thus F(x)F(x) is identical for every input. An arbitrary rotation of the neurons generally fails this test because the elementwise nonlinearity and product single out the neuron coordinates.

The neuron index labels rows of the gate and up matrices and columns of the down matrix. We can use the vocabulary-style rule on the first two and apply the same rule to the transpose of the down momentum, then transpose its update back. There is no softmax in this argument and hence no shared-logit projection. The neuron-permutation argument also works with a different elementwise gate, including the GeGLU variant used in our Gemma model. Gated MLP symmetries and updates.

Why a router uses the expert-side Gram matrix

A softmax router with ee experts and dd input features has weights W∈Re×dW\in\mathbb R^{e\times d}. Under the change W↦PW+1ea⊤W\mapsto PW+\One_e a^\top, the permutation relabels the experts and the shared row adds the same scalar to every score for a given input. Relabel the expert networks along with their scores and the routing probabilities describe the same choices. The intrinsic update should therefore move the contrasts between expert rows.

Let Dc=Πe⊥DD_c=\Pi_e^\perp D denote the centered router direction. A centered left-spectral rule can be written

UL(D)=Ψ(DcDc⊤)Dc.\scrU_{\mathrm L}(D)=\Psi(D_cD_c^\top)D_c.

When experts are relabeled, their Gram matrix changes from CC to PCP⊤PCP^\top. If Ψ\Psi transforms by the same conjugation and maps the zero-mean expert subspace into itself, the resulting step permutes correctly and stays centered. A regularized inverse square root satisfies these requirements. Here e≪de\ll d, so the router can take its spectral step using an e×ee\times e matrix. The vocabulary hybrid used the other side because d≪vd\ll v. For a given centered matrix the ideal left and right polar formulas agree on the active singular directions. Which side we compute changes the size of the matrix operation.

Two simpler comparisons help isolate what this buys. Projected RowNormM treats each expert row independently before recentering. An uncentered left-polar baseline keeps the spectral operation and omits the projection. We tested both in gpt-oss, including runs with an auxiliary objective that acts on the common score. Router-compatible update families.

When does a compatible update decrease the loss?

Two rules can respect exactly the same symmetries and take very different steps. In Appendix F of the extended arXiv version, we compare their descent on a single matrix WW with gradient G=∇f(W)G=\nabla f(W). Suppose ff has a finite lower bound f⋆=inf⁡ff^\star=\inf f and an LL-Lipschitz gradient in the Frobenius norm. For a step W+=W−γHW^+=W-\gamma H, smoothness gives

f(W+)⩽f(W)−γ⟪G,H⟫F+Lγ22⦀H⦀F2.f(W^+) \leqslant f(W)-\gamma\dotpF{G}{H} +\frac{L\gamma^2}{2}\fronorm{H}^2.

The inner product measures how much the linear approximation predicts we will gain. The squared length bounds what curvature can cost. Both quantities can be computed exactly for nuclear-norm-scaled PolarGrad. Write G=UrΣrVr⊤G=U_r\Sigma_r V_r^\top using just its rr positive singular values, let s=⦀G⦀nucs=\nucnorm{G} be their sum, and take H=sUrVr⊤H=sU_rV_r^\top. In these singular coordinates, HH takes a step of size ss in each of the rr active directions. Its alignment is s2s^2 and its squared length is rs2rs^2. Thus a sufficient condition for descent at a nonzero gradient is 0<γ<2/(Lr)0\lt\gamma\lt 2/(Lr). A zero gradient gives a zero update.

For a concrete rate, suppose the gradient rank stays at most rˉ⩾1\bar r\geqslant 1. Choose the constant step γ=1/(Lrˉ)\gamma=1/(L\bar r). Every step decreases the loss by at least ⦀G⦀nuc2/(2Lrˉ)\nucnorm{G}^2/(2L\bar r). Summing over TT steps and using ⦀G⦀F⩽⦀G⦀nuc\fronorm{G}\leqslant\nucnorm{G} gives

min⁡0⩽k<T⦀∇f(Wk)⦀F2⩽2Lrˉ [f(W0)−f⋆]T.\min_{0\leqslant k\lt T}\fronorm{\nabla f(W_k)}^2 \leqslant \frac{2L\bar r\,[f(W_0)-f^\star]}{T}.

This controls the smallest squared gradient norm along the trajectory. A stronger conclusion needs a link from gradient size to remaining loss. Under the Polyak–Łojasiewicz inequality, ⦀∇f(W)⦀F2⩾2μ[f(W)−f⋆]\fronorm{\nabla f(W)}^2\geqslant 2\mu[f(W)-f^\star], the same argument contracts the loss gap by a factor of at most 1−μ/(Lrˉ)1-\mu/(L\bar r) per step. PolarGrad descent and stationarity bounds.

The vocabulary hybrid introduces one more issue. It takes its polar factor after row scaling, so the singular directions belong to a modified gradient G~\widetilde G, while descent is measured against the original GG. The hybrid bound requires uniform positive alignment and a rank bound for the transformed gradients. To control stationarity in the original coordinates, we also require ⦀G~⦀nuc⩾κ⦀G⦀F\nucnorm{\widetilde G}\geqslant\kappa\fronorm{G} along the iterates for some κ>0\kappa>0. We prove these rates for exact gradients without momentum. In pre-training we use minibatches and momentum. Even an unbiased minibatch gradient can become a biased direction after a nonlinear operation such as row normalization. Hybrid analysis · Assumptions and stochastic gradients.

How does the vocabulary optimizer change Qwen3 training?

We started with a Qwen3-0.6B-style model. We untied the embedding from the output head so we could assign updates to each matrix independently. Each then had 151,936 token rows and 1,024 feature columns. To keep the model near its original parameter count, we reduced its depth from 28 layers to 20. We trained the resulting 626M-parameter model from scratch for 30,000 steps, or 6.88 billion FineWeb-Edu tokens, using sequences of length 1,024 on eight H200 GPUs.

We ran a two-by-three comparison. We chose Muon or HybridPolarGradM for the SwiGLU projections. Within each choice, we assigned AdamW, RowNormM or HybridPolarGradM to both vocabulary matrices. Attention used Muon throughout and scalars and vectors used AdamW. The embedding and the head could use different learning rates even when they used the same update rule.

Qwen3-0.6B-style · final validation loss, one run per cell
Embedding and headMuon MLPHybrid MLP
AdamW2.79962.8009
RowNormM2.79432.7927
HybridPolarGradM2.77742.7710
With hybrid MLPs fixed, Qwen3 validation loss falls for all three methods. HybridPolarGradM finishes lowest, followed by RowNormM and AdamW.
Qwen3 validation loss against tokens consumed. Each curve follows one run with the hybrid MLP. We varied the optimizer assigned to the input embedding and the output head together. From the presentation materials for Figure 9(b) of the conference paper. Qwen3 training curves in the arXiv version

With either MLP optimizer, AdamW on the vocabulary pair was competitive early in training. By the token budget, the vocabulary hybrid led AdamW by 0.0222 nats per token with Muon MLPs and by 0.0299 with hybrid MLPs. The two settings also let us ask what happened when only the MLP assignment changed. With hybrid vocabulary updates, the hybrid MLP lowered final loss by 0.0064. With AdamW on the vocabulary pair, the same MLP change raised it by 0.0013. These small cross-MLP differences come from one run per setting. For interpreting the extra cost of the spectral computation, Gemma gives us a timed comparison and repeated seeds.

What do learning rates and extra seeds tell us on Gemma 3?

Gemma gives the two vocabulary matrices 262,144 rows and 1,152 columns apiece. Its gated MLP expands the hidden representation sixfold, from 1,152 to 6,912 features, compared with the threefold expansion in Qwen3. We used 18 layers and untied weights for a total of 1.09B parameters. We repeated the two-by-three experiment on eight H200s for 50,000 steps, or 7.37 billion FineWeb-Edu tokens. For each vocabulary optimizer and MLP setting, we swept four base learning rates, using the same rate on the embedding and the head within each run. The table reports the selected runs.

Gemma 3 1B-style · final validation loss, selected run per cell
Embedding and headMuon MLPHybrid MLP
AdamW2.77612.7562
RowNormM2.74342.7251
HybridPolarGradM2.74922.7160

The ranking between the two symmetry-compatible rules reversed when we changed the MLP optimizer. RowNormM led with Muon on the MLP. HybridPolarGradM led when the MLP also used a hybrid update. That reversal is one reason to report the whole stack. In the latter setting, the selected common learning rates were 0.001 for AdamW, 0.005 for RowNormM and 0.00005 for HybridPolarGradM. A comparison at one shared learning rate would have missed the different scales of these updates. Full learning-rate sweep (conference Table 2, with the same sweep on arXiv)

Validation loss against tokens. The vocabulary hybrid finishes lowest, followed by RowNormM and then AdamW. The same runs against elapsed hours. RowNormM and AdamW finish near 4.2 hours, and HybridPolarGradM near 4.6 hours.
Validation loss against tokens consumed and elapsed time with the hybrid MLP fixed. Each curve is one run. The panels come from the presentation deck and show Figure 4(b) of the conference paper.
Gemma 3 1B-style · hybrid MLP · 7.37B tokens
Embedding and headMean loss ± sample SD
3 seeds
Wall time
selected run
AdamW2.7588 ± 0.00254.191 h
RowNormM2.7254 ± 0.00124.216 h
HybridPolarGradM2.7166 ± 0.00064.566 h

We repeated the hybrid-MLP comparison with two additional seeds. The ordering held in all three. HybridPolarGradM improved mean loss by 0.0422 nats per token over AdamW. RowNormM recovered about four-fifths of that improvement. In the timed runs it added 1.5 minutes over AdamW, while the hybrid added 22.5 minutes. This gives a practical reason to try the row-only update even when the hybrid attains the lowest loss. Losses by seed (conference Table 3, reproduced on arXiv)

Which of the two vocabulary matrices mattered?

In a single-seed ablation with the same hybrid MLP, AdamW on both matrices gave 2.7562. Changing only the output head to HybridPolarGradM lowered loss to 2.7216. Changing both gave 2.7160, whereas changing only the embedding raised loss to 2.8131. RowNormM also gained more from the head. The head-only change gave 2.7275, the embedding-only change 2.7497, and the paired change 2.7251. The head accounted for most of the improvement at these settings. The mixed assignments inherited their learning rates from the paired configurations, so these runs do not establish the best attainable loss for each mixed stack. Embedding/head ablation (conference Table 5, reproduced on arXiv)

Did centering remove the shift we predicted?

For one context, the mean squared logit splits into its centered mean square and the squared vocabulary mean. We can therefore compare raw and centered logit RMS over held-out token positions to see where a large logit scale comes from. In a separate uncapped diagnostic with RowNormM on the input embedding, an AdamW head produced raw RMS 20.1984 and centered RMS 2.5737. With a projected RowNormM head, both were 4.4944 to the reported precision. The projected head allowed larger differences between tokens while suppressing the shared offset. Its validation loss in this diagnostic fell from 2.7556 to 2.7275.

We also enabled the nonlinear final-logit cap. Under the same two assignments, losses were 2.7530 and 2.7202 respectively. The lower loss with the projected head persisted, although a common shift before the cap can now change predicted probabilities. The uncapped experiment is the direct test of the exact softmax symmetry. Logit diagnostics (conference Table 4, reproduced on arXiv)

How much does the router contribute in OLMoE?

In a sparse mixture of experts, each token activates only a subset of the feed-forward networks. Changing the router can therefore change which experts receive training examples. We tested this on a reduced OLMoE-1B-7B-style model with 12 layers, 32 experts per layer, and 2.82 billion trainable parameters. The embedding and output head each have 50,304 token rows and 2,048 features. We trained from scratch on 4.92 billion FineWeb-Edu tokens over 30,000 steps, with the auxiliary load-balancing and router z-losses switched off.

We kept Muon on the other matrix parameters, including the expert MLPs, and AdamW on scalars and vectors. That gave us two comparisons. With RowNormM on both vocabulary matrices, the first three runs vary the router optimizer. With AdamW on the router, the last two runs vary the vocabulary pair.

OLMoE final validation loss, one run per assignment (extended paper, arXiv v5, Section 4.3)
Embedding and headRouterValidation loss
RowNormMRowNormM2.6654
RowNormMLeftPolarGradM2.6657
RowNormMAdamW2.6910
AdamWAdamW2.7003

Read the table from the bottom. With AdamW on the router, changing the vocabulary pair to RowNormM lowered final loss by 0.0093. With RowNormM on the vocabulary pair, switching the router from AdamW to RowNormM lowered it by a further 0.0256. Replacing the AdamW router with LeftPolarGradM achieved almost the same result. The 0.0003 gap between the two geometry-aware routers is much smaller than either gain over AdamW, and there is one run per assignment. OLMoE curves and endpoints.

Which experts get tokens in downsized gpt-oss?

Our second sparse model has 12 layers and 16 experts per layer. It keeps the query, key, value, and router biases of the gpt-oss architecture. The width is again 2,048, but the vocabulary grows to 201,088 tokens, nearly four times the OLMoE vocabulary. We trained its 3.47 billion parameters for 60,000 steps, consuming 3.93 billion FineWeb-Edu tokens. A router has only 16 rows here, so LeftPolarGradM can work with a 16×1616\times16 expert Gram matrix.

We first repeated the four stack assignments with both auxiliary losses off. AdamW on the vocabulary pair and router gave 2.9238 final validation loss. Keeping the AdamW router and changing the vocabulary pair to RowNormM brought this to 2.8862. With those vocabulary assignments fixed, a LeftPolarGradM router reached 2.8665 and a RowNormM router reached 2.8617. For this model, the vocabulary change accounted for 0.0376 of the 0.0621 reduction along the path to RowNormM on all three matrices. In OLMoE, the larger change along the same path came from the router. gpt-oss training curves · Optimizer settings

Separating language-model loss from expert use

A model can predict the next token accurately while leaving experts idle. To measure both outcomes, we ran a separate router-only comparison. We held the embedding and head at RowNormM and kept every other non-router assignment fixed. In each run we recorded the share fif_i of routed assignments sent to expert ii and its average softmax probability PiP_i. With EE experts, the load-balancing statistic E∑i=1EfiPiE\sum_{i=1}^{E} f_i P_i equals one for uniform assignments and uniform probabilities. We also measured the fraction of experts receiving zero assignments at the final evaluation. An expert can be unused at that evaluation even if it received tokens earlier in training.

We compared two training objectives. The first used only token cross-entropy. In the second, we added the load-balancing loss with weight 0.01 and the router z-loss with weight 0.001. The z-loss averages (log⁡∑iexp⁡zi)2\bigl(\log\sum_i\exp z_i\bigr)^2 over tokens. Adding a common offset to the logits leaves the softmax decisions unchanged, but it shifts their log-sum-exp by that offset. This explains how the auxiliary objective can act on a direction that routing probabilities cannot see. The language-model loss reported below is held-out token cross-entropy in both cases.

With auxiliary losses off, AdamW finishes with almost a quarter of experts unused. The other four router updates all finish below two percent.
Fraction of experts receiving zero routed assignments over training, with the auxiliary losses off. Each curve tracks one router-only run. Expert-assignment diagnostics in the paper
Router-only runs on downsized gpt-oss. “Off” and “on” refer to both auxiliary losses.
Router optimizerLoss, offLoss, onUnused experts, off
AdamW2.88582.869323.96%
RowNormM2.86312.86051.56%
HybridPolarGradM2.86062.86120.52%
LeftPolarGradM2.86702.86590%
LeftPolarGradM, uncentered2.86662.86580%

Without auxiliary losses, the hybrid router had the lowest cross-entropy. Both left-polar variants used every expert. Centered LeftPolarGradM reduced the coefficient of variation of expert load (standard deviation divided by mean) from 1.0373 with AdamW to 0.4971. The uncentered ablation reached 0.4940. Their similar outcomes show how much of this improvement the left-polar operation alone could reproduce in these runs. Centering has a separate mathematical justification in the shared-logit-shift symmetry.

With auxiliary losses enabled, every method used all experts at final evaluation. Load could still be uneven. Its coefficient of variation was 0.2398 for AdamW and 0.1954 for RowNormM. RowNormM had the lowest cross-entropy in this setting. HybridPolarGradM had the lowest validation load-balancing loss (1.0260) and z-loss (0.1376), yet its cross-entropy moved from 2.8606 to 2.8612 when we enabled the penalties. These are single-run endpoints, with a separately chosen learning rate for the hybrid. They establish that prediction, expert coverage, and load balance can rank router updates differently. Full routing diagnostics with and without auxiliary losses

What the four comparisons tell us

For an ordinary matrix, symmetry tightly restricts what a direction-wise update can do. Once rows name tokens or experts, there is room to choose how far each row moves. A softmax adds a second design decision. Which part of the proposed update can actually change a prediction? Projecting a head or router removes one such redundant direction, while a gated MLP derives its row and column rules from neuron relabeling.

Each architecture answered a different empirical question. Qwen3 showed a vocabulary-hybrid gain under both MLP assignments. Gemma supplied three-seed evidence for one stack and a head-only ablation that explained much of its advantage. OLMoE isolated a router gain with the vocabulary pair fixed. Downsized gpt-oss showed that the best validation loss and the most even expert use can call for different updates. These are comparisons within fixed training budgets on modified architectures. The three-seed Gemma result carries more evidence about run-to-run variation than a small gap between two single-run endpoints.

When we choose an optimizer for a new block, the first question I would ask is what its two indices mean. That determines which relabelings and basis changes a proposed step should survive. The next experiment can then compare compatible choices on held-out loss, elapsed time, and a diagnostic tied to the block’s job, such as logit differences or expert use.

Paper, slides, and code

This article draws on my NeurIPS 2026 talk about joint work with Weijie Su. The conference manuscript gives the spectral characterization in Theorem 3.2 and the layer-specific constructions in Section 4 and Appendices F–J. The extended arXiv version includes the convergence analysis in Appendix F and all four model studies in Section 4.