Back

Towards Compositional Steepest Descent

6.1.2026
Ben Keigwin*,  Li Yang*,  Dhruv Pai*,  Yunzhe Zhang*,  Alec DeWulf
* Core Contributor; Correspondence to ben@tilderesearch.com, li@tilderesearch.com

TL;DR

  • We introduce Compositional Muon (CM), which extends Muon-style steepest descent from individual matrices to composed transformer circuits such as WQWKW_QW_K^\top and WOWVW_OW_V.
  • CM derives partner-whitened update rules that rescale each factor's gradient by the spectral geometry of its partner.
  • CM achieves consistent pretraining gains over Muon at 340M and 1B scale, and sets a new state of the art on the nanoGPT speedrun.
  • Code is available at github.com/tilde-research/comp-muon-release.
W_QW_KM = W_Q W_Kᵀσ(W_Q)ε ✓σ(W_K)ε ✓σ(M)ε ?

Outline

  1. Introduction — Motivation and the compositional stability problem
  2. Composed Perturbations — The rank obstruction and achievable tangent space
  3. Half-Split Composed Muon — Partner-whitened update rules for QK and OV
  4. Gauge Motion and Momentum — Representative motion, momentum, and practical gauge correction
  5. Experiments — 340M/1B pretraining, nanoGPT speedrun, ablations

0. Towards Optimizing Compositions

Today, many of the most capable language models are trained with the Muon optimizer [2]. From Kimi K2 [20] to DeepSeek V4 [21], Muon has demonstrated strong performance at scale over the previous mainstream optimizer AdamW [22][8].

A key insight behind Muon is to treat matrices in neural networks as linear operators, instead of collections of independent scalars. In particular, while Adam treats every weight as its own optimization problem, updating each entry proportionally to its gradient and second moment, Muon's optimization problem directly utilizes the matrix structure of a parameter it is optimizing.

Muon’s update rule follows from formulating steepest descent for a single linear map, y=Wxy = Wx. But many natural model operations are compositional: their behavior depends on how several pieces interact. In those cases, the object of interest is the composition itself, so we should formulate the optimization problem at the level of the composed operation rather than only at the level of its individual factors.

In this manner, we introduce Compositional Muon (CM) which extends Muon’s core principle to composed circuits. Instead of controlling the operator norm and trust region of each weight matrix separately, where applicable it controls the optimization of the composition. For the QK and OV products in attention, this leads to dynamic partner-whitened update rules that adapt step sizes for each matrix based on the geometry of its partner.

By designing around composed circuits, CM improves the spectral behavior of these updates and suggests a rich design space for compositional optimizers.

1. The Compositional Stability Problem

1.1 Steepest Descent for a Single Linear Layer

Consider a single linear layer y=Wxy = Wx. The parameter WW and the input-output function are the same object: any perturbation ΔW\Delta W directly changes what the layer computes. The resulting optimization question is then: what update ΔW\Delta W decreases the loss most rapidly, subject to the layer's function not changing too much?

minΔWGW,ΔWs.t.ΔWopϵ(1)\min_{\Delta W} \langle G_W, \Delta W \rangle \quad \text{s.t.} \quad \|\Delta W\|_{\text{op}} \leq \epsilon \tag{1}

The operator norm is the right constraint since it bounds the worst-case output perturbation over all unit inputs. The solution is ΔW=ϵUV\Delta W^* = -\epsilon \, UV^\top, where GW=UΣVG_W = U\Sigma V^\top is the (thin) SVD of the gradient. This solution replaces all singular values with 1s, yielding a unit-operator-norm update maximally aligned with the gradient [3]. The resulting optimizer is Muon [2] (in practice, it (semi-)orthogonalizes the momentum buffer rather than the raw gradient).

One of the key properties that makes this work is that for a single linear layer, the parameter perturbation is the functional perturbation. For compositions of multiple operations, this is no longer necessarily true.

1.2 Composed Functional Perturbations

In a neural network, no layer operates in isolation. The function the loss evaluates is a composition of maps, and perturbations to one layer's parameters affect the behavior of all subsequent layers. Beyond controlling the operator norm of each parameter's update separately, one possible solution would be to control the perturbation of the entire composition itself.1

Take the QK product in one attention head of a Transformer [1] (ignoring RoPE and QK-norm for now; see Appendix F for discussion on these design choices). The loss sees WQW_Q and WKW_K only through their product M=WQWKM = W_Q W_K^\top. A perturbation (ΔWQ,ΔWK)(\Delta W_Q, \Delta W_K) induces (ignoring the higher-order term) a first-order functional change

ΔM=ΔWQWK+WQΔWK(2)\Delta M = \Delta W_Q W_K^\top + W_Q \Delta W_K^\top \tag{2}

Controlling ΔWQop\|\Delta W_Q\|_{\text{op}} and ΔWKop\|\Delta W_K\|_{\text{op}} separately only bounds ΔMop\|\Delta M\|_{\text{op}} through the partner norms:

ΔMopΔWQopWKop+WQopΔWKop.\|\Delta M\|_{\mathrm{op}} \leq \|\Delta W_Q\|_{\mathrm{op}}\|W_K\|_{\mathrm{op}} + \|W_Q\|_{\mathrm{op}}\|\Delta W_K\|_{\mathrm{op}}.

In particular, the same factor-level update size can induce very different functional perturbations depending on the current spectral geometry of the partner matrix.

The “compositional steepest descent problem” asks for the update that controls the functional perturbation directly:

minΔWQ,ΔWKGQ,ΔWQ+GK,ΔWKs.t.ΔMopϵ\min_{\Delta W_Q, \Delta W_K} \langle G_Q, \Delta W_Q \rangle + \langle G_K, \Delta W_K \rangle \quad \text{s.t.} \quad \|\Delta M\|_{\text{op}} \leq \epsilon

This is harder than the single-layer case, but it admits tractable formulations. The same composition principle applies to the OV product WOWVW_O W_V, and analogues exist for diagonal RMSNorm scales [9] (Appendix G) and activation-gated MLPs (Appendix H).

2. Composed Perturbations

2.1 The Product Structure and Rank Obstruction

Recall that a perturbation (ΔWQ,ΔWK)(\Delta W_Q, \Delta W_K) induces the first-order functional change (2)

ΔM=ΔWQWK+WQΔWK,\Delta M = \Delta W_Q W_K^\top + W_Q \Delta W_K^\top,

and the steepest descent problem in terms of the product gradient GM=MLG_M = \nabla_M \mathcal{L} is

minΔMTMGM,ΔMs.t.ΔMopϵ,\min_{\Delta M \in T_M} \langle G_M, \Delta M \rangle \quad \text{s.t.} \quad \|\Delta M\|_{\text{op}} \leq \epsilon,

where TM:={ΔWQWK+WQΔWK}T_M := \{\Delta W_Q W_K^\top + W_Q \Delta W_K^\top\} is the set of achievable first-order product perturbations.

If we could optimize over ΔM\Delta M freely, the solution would be

ΔM=ϵmsign(GM)\Delta M^* = -\epsilon \, \operatorname{msign}(G_M)

where msign(A)=UV\operatorname{msign}(A)=UV^\top for the thin SVD A=UΣVA=U\Sigma V^\top. The natural next step would be to decompose ΔM\Delta M^* into factor updates but this fails for rank deficiency reasons: each of ΔWQWK\Delta W_Q W_K^\top and WQΔWKW_Q \Delta W_K^\top has rank at most dhd_h. In particular, the achievable perturbations have rank at most 2dhd2d_h \ll d, while msign(GM)\operatorname{msign}(G_M) is generically full-rank.2

full-rankmatricesrank-d_h manifoldT_Mmsign(G)(full rank)ΔM*(achievable)M

Instead, we optimize directly over (ΔWQ,ΔWK)(\Delta W_Q, \Delta W_K) from the start. The difficulty is that ΔMopϵ\|\Delta M\|_{\text{op}} \leq \epsilon constrains the operator norm of a sum, ΔWQWK+WQΔWK\Delta W_Q W_K^\top + W_Q \Delta W_K^\top, so the feasible updates are jointly determined rather than separable factor-wise; moreover, each piece carries the partner matrix, so how severely a given ΔWQ\Delta W_Q or ΔWK\Delta W_K perturbs the product depends on the spectral geometry of WKW_K and WQW_Q.

2.2 The Achievable Set as a Tangent Space

Before continuing, it is worth seeing what TMT_M actually is. It is the tangent space at MM to the manifold of rank-dhd_h matrices,

Mdh={XRd×d:rank(X)=dh}.\mathcal{M}_{d_h} = \{X \in \mathbb{R}^{d \times d} : \operatorname{rank}(X) = d_h\}.

Differentiating a factorization X=ABX = AB^\top produces {A˙B+AB˙}\{\dot A B^\top + A \dot B^\top\}, and at A=WQA = W_Q, B=WKB = W_K this is exactly TMT_M. The rank obstruction from §2.1 is then just the statement that tangent vectors to Mdh\mathcal{M}_{d_h} have rank at most 2dh2d_h, so the full-rank msign(GM)\operatorname{msign}(G_M) is off the tangent space and cannot be a feasible step.

This viewpoint also suggests a Manifold-Muon [4]-inspired update is possible, whereby one mandates that the update lie in the tangent space to the current point on the weight manifold.

3. Half-Split Composed Muon

In this section, we develop the half-split and hybrid half-split composed Muon update rules. We begin with a discussion of polar decompositions for the QK product, and then turn to the OV pathway, where the head structure forces a "hybrid" update rule. See Table 1 for the concrete update rules.

3.1 Polar Decompositions and Half-Split Composed Muon

Observe that the product-gradient objective decomposes as

GM,ΔWQWK+WQΔWK=GMWK,ΔWQ+GMWQ,ΔWK.\left\langle G_M,\Delta W_Q W_K^\top + W_Q\Delta W_K^\top\right\rangle = \left\langle G_M W_K,\Delta W_Q\right\rangle + \left\langle G_M^\top W_Q,\Delta W_K\right\rangle.

This decomposition suggests a simple surrogate: split the update into two separately budgeted steps, one for QQ and one for KK. This is generally not the optimal solution to the original problem, since the original constraint is on the sum of the two product perturbations, not on each term separately.

Let us treat the first term on the right-hand side first. If we allocate equal perturbation budgets to the two terms, the corresponding optimization problem is

minΔWQGM,ΔWQWKs.t.ΔWQWKopϵ/2.\min_{\Delta W_Q}\left\langle G_M, \Delta W_Q W_K^\top \right\rangle\quad \text{s.t.} \quad\left\| \Delta W_Q W_K^\top \right\|_{\mathrm{op}} \leq \epsilon/2 .

Using polar decompositions, we can formulate an equivalent problem that is closer in structure to the original Muon problem. Write

WK=UKCK,UKUK=I,CK=(WKWK)1/2.W_K = U_K C_K, \qquad U_K^\top U_K = I, \qquad C_K = (W_K^\top W_K)^{1/2}.

Here UKRd×dhU_K \in \mathbb{R}^{d \times d_h} and CKRdh×dhC_K \in \mathbb{R}^{d_h \times d_h} is symmetric positive semi-definite. We have

ΔWQWK=(ΔWQCK)UK.\Delta W_Q W_K^\top = (\Delta W_Q \, C_K) \, U_K^\top.

The objective becomes

GM,ΔWQWK=GMUK,ΔWQCK=GQCK1,ΔWQCK,\left\langle G_M, \Delta W_Q W_K^\top \right\rangle = \left\langle G_M U_K, \Delta W_Q C_K \right\rangle = \left\langle G_Q C_K^{-1}, \Delta W_Q C_K \right\rangle,

where GQ=GMWK=GMUKCKG_Q = G_M W_K = G_M U_K C_K.

Since UKRdh×dU_K^\top \in \mathbb{R}^{d_h \times d} has orthonormal rows, right-multiplication by it preserves operator norms, so

ΔWQWKop=ΔWQCKop.\|\Delta W_Q W_K^\top\|_{\text{op}} = \|\Delta W_Q \, C_K\|_{\text{op}}.

Thus, with ZQ=ΔWQCKZ_Q = \Delta W_Q C_K, the original problem may be reformulated as

GQCK1,ZQs.t.ZQopϵ/2,\langle G_Q C_K^{-1}, Z_Q \rangle\quad \text{s.t.} \quad\left\| Z_Q \right\|_{\mathrm{op}} \leq \epsilon/2,

The problem is now in the standard Muon form, with the solution

ZQ=ϵ2msign(GQCK1)Z_Q^* = -\frac{\epsilon}{2} \, \operatorname{msign}(G_Q C_K^{-1}). Undoing the change of variables (ΔWQ=ZQCK1\Delta W_Q = Z_Q C_K^{-1}):

ΔWQ=ϵ2msign(GQCK1)CK1\Delta W_Q = -\frac{\epsilon}{2} \, \operatorname{msign}(G_Q C_K^{-1}) \, C_K^{-1}

A similar analysis can be applied to the second term on the right-hand side, yielding

ΔWK=ϵ2msign(GKCQ1)CQ1\Delta W_K = -\frac{\epsilon}{2} \, \operatorname{msign}(G_K C_Q^{-1}) \, C_Q^{-1}

This analysis yields the first composition-derived update rule, which we call “half-split”.3.

Muon: ‖ΔW_Q‖ ≤ ε(uniform in W_Q space)ΔM aspect ratio: 4.0:1partner κ(W_K) = 4.0CM: ‖ΔM‖ ≤ ε(uniform in M space)ΔM aspect ratio: 1:1
κ4.0

The main limitation of this approach is that the 50/50 budget split is arbitrary. If the gradient is more informative on one side, half the budget is wasted on the other. One can drop the per-side budgets in favor of a single jointly constrained spectral step on the concatenated whitened factors, sidestepping the allocation question at the cost of a slightly looser worst-case product bound; we work this variant out in Appendix B. For grouped-query attention, the half-split idea suggests allocating budgets by query group; see Appendix D.

3.2 The Hybrid Case: VV Per-Head, OO Per-Matrix

For QK, everything above was deduced per-head: each head has its own query-key product, produces its own attention matrix, and therefore defines its own composed map

MQK,h=WQ,hWK,h.M_{QK,h}=W_{Q,h}W_{K,h}^\top.

Thus the natural way to perform the optimization is per-head.

The OV pathway is different. The value matrices still act head-by-head, but the output projection is the operation that merges all heads back into the residual stream. This creates an asymmetry: the VV-side perturbation is naturally head-local, while the OO-side perturbation is naturally matrix-global.

For token ii, write the head-hh context and value feature as

x~h,i=j=1Nαh,ijxj,vh,i=WV,hx~h,i.\tilde{x}_{h,i}=\sum_{j=1}^N \alpha_{h,ij}x_j, \qquad v_{h,i}=W_{V,h}\tilde{x}_{h,i}.

The OV output is

yi=h=1HWO,hvh,i=[WO,1WO,H][v1,ivH,i].y_i= \sum_{h=1}^H W_{O,h}v_{h,i} = [\,W_{O,1}\mid\cdots\mid W_{O,H}\,] \begin{bmatrix} v_{1,i}\\ \vdots\\ v_{H,i} \end{bmatrix}.

This equation suggests a hybrid approach to the OV pathway. Before WOW_O, the heads are still separate; at WOW_O, they are not. The model sees one stacked value vector and one output projection into the residual stream.

First consider a VV-side perturbation. Since WV,hW_{V,h} is applied before head hh's value feature is merged with the others, the first-order change is

Δyi,V=h=1HWO,hΔWV,hx~h,i.\Delta y_{i,V} = \sum_{h=1}^H W_{O,h}\Delta W_{V,h}\tilde{x}_{h,i}.

Each term has its own input x~h,i\tilde{x}_{h,i}, its own value matrix WV,hW_{V,h}, and its own output block WO,hW_{O,h}. The heads may attend to different tokens, so their effective context vectors x~h,i\tilde{x}_{h,i} should be treated as separate directions. This gives the headwise bound

Δyi,V2h=1HWO,hΔWV,hopx~h,i2.\|\Delta y_{i,V}\|_2 \leq \sum_{h=1}^H \|W_{O,h}\Delta W_{V,h}\|_{\mathrm{op}}\|\tilde{x}_{h,i}\|_2.

The natural VV-side question is therefore local to each head. Applying the half-split rule to each head gives

ΔWV,hhs=ϵ2CO,h1msign(CO,h1GV,h),\Delta W_{V,h}^{\mathrm{hs}} = -\frac{\epsilon}{2}C_{O,h}^{-1}\operatorname{msign}(C_{O,h}^{-1}G_{V,h}),

where

CO,h=(WO,hWO,h)1/2.C_{O,h}=(W_{O,h}^\top W_{O,h})^{1/2}.

Here ϵ\epsilon is the optimizer scale for the head-local rule. The formula controls the shape of each head's value update; the overall scale of the summed OV perturbation is set by the learning rate and CM multiplier.

For an OO-side perturbation, the value features have already been formed. The first-order change is

Δyi,O=h=1HΔWO,hvh,i=[ΔWO,1ΔWO,H][v1,ivH,i].\Delta y_{i,O} = \sum_{h=1}^H \Delta W_{O,h}v_{h,i} = [\,\Delta W_{O,1}\mid\cdots\mid\Delta W_{O,H}\,] \begin{bmatrix} v_{1,i}\\ \vdots\\ v_{H,i} \end{bmatrix}.

Now the heads enter as blocks of one stacked vector. The output projection is one linear map from the concatenated head space back to the residual stream. Thus the natural OO-side question is global.

For each head, define

CV,h=(WV,hWV,h)1/2.C_{V,h}=(W_{V,h}W_{V,h}^\top)^{1/2}.

Whiten the OO gradients per head, concatenate them, and take one matrix sign:

G~O=[GO,1CV,11GO,HCV,H1],S=msign(G~O).\widetilde G_O = [\,G_{O,1}C_{V,1}^{-1}\mid\cdots\mid G_{O,H}C_{V,H}^{-1}\,], \qquad S=\operatorname{msign}(\widetilde G_O).

Writing

S=[S1SH],S=[\,S_1\mid\cdots\mid S_H\,],

the corresponding blockwise update is

ΔWO,hhs=ϵ2ShCV,h1.\Delta W_{O,h}^{\mathrm{hs}} = -\frac{\epsilon}{2}S_hC_{V,h}^{-1}.

The difference from the VV rule is where the matrix sign is taken. On the VV side, each head is orthogonalized separately because the value map acts before head aggregation. On the OO side, the whitened gradients are concatenated and orthogonalized once because WOW_O is the map that performs the aggregation.

Table 1. Concrete half-split and hybrid update rules. Here msign(A)\operatorname{msign}(A) denotes the polar factor of AA. For the OV rule, ϵ\epsilon denotes the optimizer step scale; the overall scale of the residual-stream perturbation is set by the learning rate and CM multiplier.


QK half-split, per head. Define

CQ=(WQWQ)1/2,CK=(WKWK)1/2.C_Q=(W_Q^\top W_Q)^{1/2}, \qquad C_K=(W_K^\top W_K)^{1/2}.

Then

ΔWQhs=ϵ2msign(GQCK1)CK1,ΔWKhs=ϵ2msign(GKCQ1)CQ1.\Delta W_Q^{\mathrm{hs}} = -\frac{\epsilon}{2}\operatorname{msign}(G_QC_K^{-1})C_K^{-1}, \qquad \Delta W_K^{\mathrm{hs}} = -\frac{\epsilon}{2}\operatorname{msign}(G_KC_Q^{-1})C_Q^{-1}.

OV hybrid half-split. For each head hh, define

CV,h=(WV,hWV,h)1/2,CO,h=(WO,hWO,h)1/2.C_{V,h}=(W_{V,h}W_{V,h}^\top)^{1/2}, \qquad C_{O,h}=(W_{O,h}^\top W_{O,h})^{1/2}.

Whiten the OO gradients per head, concatenate, and take one matrix sign:

G~O=[GO,1CV,11GO,HCV,H1],S=msign(G~O),\widetilde G_O = [\,G_{O,1}C_{V,1}^{-1}\mid\cdots\mid G_{O,H}C_{V,H}^{-1}\,], \qquad S=\operatorname{msign}(\widetilde G_O),

with

S=[S1SH].S=[\,S_1\mid\cdots\mid S_H\,].

The hybrid updates are

ΔWO,hhs=ϵ2ShCV,h1,ΔWV,hhs=ϵ2CO,h1msign(CO,h1GV,h).\Delta W_{O,h}^{\mathrm{hs}} = -\frac{\epsilon}{2}S_hC_{V,h}^{-1}, \qquad \Delta W_{V,h}^{\mathrm{hs}} = -\frac{\epsilon}{2}C_{O,h}^{-1}\operatorname{msign}(C_{O,h}^{-1}G_{V,h}).
Per-head vs. hybrid O ablationValidation loss2.5372.5522.5672.5822.5972.612+0.00142.6017lr 2×2.6004lr 2×-0.01762.5828lr 1× mp 4-0.03052.5699lr 1× mp 24no qk-norm + ALiBi+0.01112.6001lr 2×2.5891lr 2×-0.00702.5821lr 1× mp 2-0.02212.5670lr 1× mp 8no qk-norm + RoPE+0.00602.5635lr 1×2.5575lr 1×+0.00242.5599lr 1× mp 1-0.00982.5477lr 1× mp 3qk-norm + RoPE
Muon per-head
Muon
CM OV+QK per-head
CM OV+QK
Figure 1. OV ablation comparing per-head vs. per-matrix W_O for vanilla Muon and CM. 340M parameters, base LR 8e-3.

3.3 Isotropic Approximation

The full half-split rules use inverse square roots of partner Gram matrices. However, we may also attempt to approximate the partner Gram matrix by a scaled isometry. For a tall factor

WRd×dh,W\in\mathbb R^{d\times d_h},

if the columns of WW are approximately orthogonal and have comparable norms, then

WWc2Idh,c2=WF2dh.W^\top W \approx c^2I_{d_h}, \qquad c^2=\frac{\|W\|_F^2}{d_h}.

Thus

(WW)1/2c1I.(W^\top W)^{-1/2}\approx c^{-1}I.

and under this assumption, we may approximate the QK partners via

CQ=(WQWQ)1/2,CK=(WKWK)1/2,C_Q=(W_Q^\top W_Q)^{1/2}, \qquad C_K=(W_K^\top W_K)^{1/2},

and the VV-side OV partner via

CO,h=(WO,hWO,h)1/2.C_{O,h}=(W_{O,h}^\top W_{O,h})^{1/2}.

On the OO-side of the OV update, the partner is

WV,hRdh×d,W_{V,h}\in\mathbb R^{d_h\times d},

and the relevant Gram matrix is therefore the row Gram

WV,hWV,h.W_{V,h}W_{V,h}^\top.

The isotropic approximation in this case is

WV,hWV,hcV,h2Idh,cV,h2=WV,hF2dh.W_{V,h}W_{V,h}^\top \approx c_{V,h}^2I_{d_h}, \qquad c_{V,h}^2 = \frac{\|W_{V,h}\|_F^2}{d_h}.

Under this approximation, every partner inverse root becomes a scalar multiplier:

C1c1I.C^{-1}\approx c^{-1}I.

and because msign\operatorname{msign} is scale-invariant, the scalar inside the spectral sign drops out. What remains is ordinary Muon, but with a partner-dependent effective learning rate.

For QK, the full rule

ΔWQhs=ϵ2msign(GQCK1)CK1\Delta W_Q^{\mathrm{hs}} = -\frac{\epsilon}{2} \operatorname{msign}(G_QC_K^{-1})C_K^{-1}

becomes

ΔWQiso=ϵ2cK1msign(GQ),\Delta W_Q^{\mathrm{iso}} = -\frac{\epsilon}{2} c_K^{-1} \operatorname{msign}(G_Q),

and similarly

ΔWKiso=ϵ2cQ1msign(GK).\Delta W_K^{\mathrm{iso}} = -\frac{\epsilon}{2} c_Q^{-1} \operatorname{msign}(G_K).

For OV, the VV-side update becomes

ΔWV,hiso=ϵ2cO,h1msign(GV,h).\Delta W_{V,h}^{\mathrm{iso}} = -\frac{\epsilon}{2} c_{O,h}^{-1} \operatorname{msign}(G_{V,h}).

The OO-side remains global across heads, but the per-head whitening factors become scalars:

G~O=[cV,11GO,1cV,H1GO,H],S=msign(G~O),\widetilde G_O = [\,c_{V,1}^{-1}G_{O,1} \mid \cdots \mid c_{V,H}^{-1}G_{O,H}\,], \qquad S=\operatorname{msign}(\widetilde G_O), ΔWO,hiso=ϵ2cV,h1Sh.\Delta W_{O,h}^{\mathrm{iso}} = -\frac{\epsilon}{2} c_{V,h}^{-1}S_h.

Empirically, the isotropic approximation performs similarly to the full CM update.

Isotropic approximation ablationValidation loss2.5382.5522.5672.5812.5962.6102.6004lr 2×-0.03052.5699lr 1× mp 24-0.02912.5713lr 1× mp 24no qk-norm + ALiBi2.5891lr 2×-0.02212.5670lr 1× mp 8-0.02452.5645lr 1× mp 8no qk-norm + RoPE2.5575lr 1×-0.00982.5477lr 1× mp 3-0.00942.5481lr 1× mp 3qk-norm + RoPE
Muon
CM OV+QK
Isotropic CM OV + QK
Figure 2. Isotropic approximation vs. full CM. 340M parameters, base LR 8e-3.

To check whether the isotropic assumption holds in practice, we plot the relevant partner Gram for a representative layer/head below.

Loading...
Figure 3. Gram-matrix evolution for a representative layer/head (V-side), comparing Muon, isotropic CM, and full CM. Isotropic CM sits between Muon and full CM and recovers nearly all of the gains.

The scalar factors also give a useful effective-learning-rate interpretation. For example, the VV-side effective learning rate is

ηV,heff=η12mp(cO,h2+λ)1/2,\eta^{\mathrm{eff}}_{V,h} = \eta\cdot \frac{1}{2}\cdot mp\cdot(c_{O,h}^2+\lambda)^{-1/2},

where η\eta is the raw WSD learning rate, 1/21/2 is the half-split quota, mpmp is the CM multiplier, and cO,hc_{O,h} is the scalar approximation to the OO-partner Gram root.

Loading...
Figure 4. Effective learning-rate schedule induced by the isotropic approximation, compared with the raw WSD learning rate. The shaded region indicates the distribution of individual effective learning rates across layer/head combinations.

4. Gauge Motion and Momentum

So far we have treated the factors WQW_Q and WKW_K as if they were fixed coordinates for the product update. But the loss does not see these coordinates directly. It sees only M=WQWKM = W_QW_K^\top, and this representation is not unique: for any invertible matrix RGL(dh)R\in GL(d_h),

WQWQR,WKWKRW_Q \mapsto W_QR, \qquad W_K\mapsto W_KR^{-\top}

leaves the product unchanged:

(WQR)(WKR)=WQRR1WK=WQWK.(W_QR)(W_KR^{-\top})^\top = W_QRR^{-1}W_K^\top = W_QW_K^\top.

Differentiating this action gives the corresponding pure-coordinate, or vertical, directions

δWQ=WQX,δWK=WKX,XRdh×dh.\delta W_Q = W_QX, \qquad \delta W_K = -W_KX^\top, \qquad X\in\mathbb R^{d_h\times d_h}.

These directions are nonzero in parameter space, but invisible to the product to first order:

δWQWK+WQδWK=WQXWKWQXWK=0.\delta W_QW_K^\top + W_Q\delta W_K^\top = W_QXW_K^\top - W_QXW_K^\top = 0.

More specifically, if we let P=Rd×dh×Rd×dh\mathcal P = \mathbb R^{d\times d_h}\times\mathbb R^{d\times d_h} be the space of factor pairs, and π(WQ,WK)=WQWK\pi(W_Q,W_K)=W_QW_K^\top be the product map, then the natural object is not P\mathcal P, but rather the quotient P/GL(dh)\mathcal P / GL(d_h).

However, in practice we utilize objects that at implementation time are stored in factor coordinates, e.g. momentum buffers. In particular, even though one can show (see Appendix E) that the undamped half-split update is not coordinate-dependent, the resulting optimizer with momentum, damping, and finite Newton-Schulz iterations is coordinate dependent.

Hence, we need to provide a prescription for how to perform quotient-level motion in redundant coordinates. We may do so via a connection. Namely, given a point (WQ,WK)(W_Q, W_K) on P\mathcal P, one defines the vertical directions

V(WQ,WK)={(WQX,WKX):XRdh×dh}.V_{(W_Q,W_K)} = \{(W_QX,-W_KX^\top):X\in\mathbb R^{d_h\times d_h}\}.

A connection then smoothly assigns a complementary horizontal subspace H(WQ,WK)H_{(W_Q,W_K)}, so that every factor update decomposes as

Δ=ΔH+ΔV,\Delta = \Delta^H+\Delta^V,

where ΔV\Delta^V is pure gauge motion and ΔH\Delta^H is the chosen representative of the product-level motion.

One simple choice of connection is to declare horizontal directions to be those Frobenius-orthogonal to the gauge directions.

For tangent vectors (δQ,δK)(\delta_Q,\delta_K) and (δQ,δK)(\delta_Q',\delta_K'), we have the flat Frobenius inner product

(δQ,δK),(δQ,δK)F=δQ,δQF+δK,δKF.\langle(\delta_Q,\delta_K),(\delta_Q',\delta_K')\rangle_F = \langle\delta_Q,\delta_Q'\rangle_F + \langle\delta_K,\delta_K'\rangle_F.

An update (ΔWQ,ΔWK)(\Delta W_Q,\Delta W_K) is then horizontal, by definition, if

(ΔWQ,ΔWK),(WQY,WKY)F=0for all YRdh×dh.\left\langle (\Delta W_Q,\Delta W_K), (W_QY,-W_KY^\top) \right\rangle_F = 0 \qquad \text{for all }Y\in\mathbb R^{d_h\times d_h}.

Expanding the traces gives the horizontality condition

ΔWQWQ=WKΔWK.\Delta W_Q^\top W_Q = W_K^\top \Delta W_K.

For ordinary gradient descent, the factor gradients are

GQ=GMWK,GK=GMWQ.G_Q=G_MW_K, \qquad G_K=G_M^\top W_Q.

Therefore

GQWQ=WKGMWQ=WKGK.G_Q^\top W_Q = W_K^\top G_M^\top W_Q = W_K^\top G_K.

So the raw negative gradient is horizontal for the Frobenius connection.

However, in the case of momentum, even if it is horizontal at one step, it is not generally horizontal at the next step, because the horizontal subspace itself depends on the current factors. If

mQWQ=WKmKm_Q^\top W_Q = W_K^\top m_K

at the current point, then after an update

WQ+=WQ+ΔWQ,WK+=WK+ΔWK,W_Q^+ = W_Q+\Delta W_Q, \qquad W_K^+ = W_K+\Delta W_K,

the same buffer would need to satisfy

mQWQ+=(WK+)mK.m_Q^\top W_Q^+ = (W_K^+)^\top m_K.

Using the old horizontality condition, this reduces to

mQΔWQ=ΔWKmK,m_Q^\top \Delta W_Q = \Delta W_K^\top m_K,

which need not hold. So momentum can accumulate vertical components even when each fresh raw gradient is horizontal.

This creates two practical issues. First, the buffer can drift into vertical directions because the horizontal space moves with the factors. Second, a whitened update is tied to the partner geometry at the step where it was computed. A term whitened using CK(t1)C_K^{(t-1)} is not naturally comparable to one whitened using CK(t)C_K^{(t)}.

We handle the second issue by accumulating raw gradients rather than already-whitened updates:

mQ,t=βmQ,t1+GQ,t,mK,t=βmK,t1+GK,t.m_{Q,t} = \beta m_{Q,t-1}+G_{Q,t}, \qquad m_{K,t} = \beta m_{K,t-1}+G_{K,t}.

The half-split update is then formed using the current partner geometry:

ΔWQ=ϵ2msign(mQ,tCK1)CK1,ΔWK=ϵ2msign(mK,tCQ1)CQ1.\Delta W_Q = -\frac{\epsilon}{2} \operatorname{msign}(m_{Q,t}C_K^{-1})C_K^{-1}, \qquad \Delta W_K = -\frac{\epsilon}{2} \operatorname{msign}(m_{K,t}C_Q^{-1})C_Q^{-1}.

Vertical drift can be handled separately by projecting the buffer or update back onto the horizontal space. Concretely, given (mQ,mK)(m_Q,m_K), choose XX so that

mQH=mQWQX,mKH=mK+WKXm_Q^H=m_Q-W_QX, \qquad m_K^H=m_K+W_KX^\top

satisfies

(mQH)WQ=WKmKH.(m_Q^H)^\top W_Q = W_K^\top m_K^H.

Writing S=XS=X^\top, this gives

CK2S+SCQ2=mQWQWKmK.C_K^2S+SC_Q^2 = m_Q^\top W_Q-W_K^\top m_K.

The correction is vertical, so it leaves the first-order product perturbation unchanged. It only changes the representative of that perturbation in factor coordinates.

5. Experiments

5.1 Architecture ablations

We ran experiments to ablate two common design choices in the QK pathway, QK-norm [7] and the positional method (ALiBi vs. RoPE [6][5]), while also comparing whether CM is applied to OV only or to both OV+QK. We evaluated three architecture settings:

  • No QK-norm + ALiBi
  • No QK-norm + RoPE
  • QK-norm + RoPE

In each setting, we report the best validation loss and the corresponding hyperparameters.

Circuit Muon — best HP per settingValidation loss2.5382.5532.5682.5822.5972.6122.6004lr 2×-0.02452.5759lr 1× mp 16-0.03052.5699lr 1× mp 24no qk-norm + ALiBi2.5891lr 2×+0.01252.6015lr 1× mp 2-0.02212.5670lr 1× mp 8no qk-norm + RoPE2.5575lr 1×-0.00852.5490lr 1× mp 4-0.00982.5477lr 1× mp 3qk-norm + RoPE
Muon
CM OV
CM OV+QK
Figure 5. Best validation loss and hyperparameters for each architecture setting. 340M parameters, base LR 8e-3.

Across all three settings, CM on both OV+QK beats vanilla Muon by a clear margin. In the cleanest setup for the theory (no QK-norm + ALiBi, where the learned QK logits remain a plain matrix product), OV-only CM already outperforms Muon, and adding QK CM further improves. With RoPE (no QK-norm + RoPE), OV-only CM underperforms Muon, but OV+QK CM still wins; this suggests a non-trivial interaction between CM and RoPE that we do not yet fully understand (TODO: root cause). In the most realistic setup (QK-norm + RoPE), OV-only CM improves over Muon, while adding QK CM does not provide additional gains, consistent with the possibility that QK-norm reduces or removes the benefit of applying CM on the QK circuit.

To understand the effect of CM on the composed update ΔMh\Delta M_h, we track its singular values and Frobenius norm throughout training. This is the quantity the loss actually sees through the circuit, so stable composed-update spectra are evidence that CM is controlling the functional step rather than merely the individual factor steps. Under CM, both the spectrum and the norm stay stable, and the coefficient of variation of the per-head update norm across heads within a layer remains small:

CV({ΔMOV,hF}h)=stdh[ΔMOV,hF]meanh[ΔMOV,hF]\mathrm{CV}(\{\|\Delta M_{OV,h}\|_F\}_h)=\frac{\operatorname{std}_h\bigl[\|\Delta M_{OV,h}\|_F\bigr]}{\operatorname{mean}_h\bigl[\|\Delta M_{OV,h}\|_F\bigr]}
Loading dashboard data…
Figure 6. Stability of the composed update under CM, shown for the OV circuit. 340M parameters, base LR 8e-3.

5.2 1B pretraining

To check that Compositional Muon’s gains survive scale, we repeat the comparison at 1B parameters (QK-norm + RoPE, 70B tokens). We test two CM parameterizations against a tuned Muon baseline: (i) full-whitening OV+QK, and (ii) isotropic OV gauge, which uses the isotropic approximation plus a scalar gauge rebalance on the V↔O pair. Both beat Muon throughout training: the curves separate early and remain separated through the end.

Loading...
Figure 7. 1B pretraining validation loss (qk-norm + RoPE).

We also tested at 1B parameters (no QK-norm + ALiBi, 70B tokens), and observed even larger gains from CM on both OV+QK—suggesting an additional benefit from applying CM to the QK circuit in this setting.

Loading...
Figure 8. 1B pretraining validation loss (no QK-norm + ALiBi).

We summarize the final loss of the two settings as follows.

1B final loss summaryValidation loss2.2792.2902.3012.3132.3242.3352.3269lr 2×-0.02322.3038lr 1× mp 8no qk-norm + ALiBi2.2917lr 1×-0.00522.2866lr 1× mp 3qk-norm + RoPE
Muon
CM OV+QK
Figure 9. Final loss summary for the two 1B settings.

5.3 Hyperparameter sweeps

The following shows a CM multiplier sweep comparing CM and isotropic CM; the results agree well across different mp values.

Loading...
Figure 10. CM multiplier sweep: full CM vs. isotropic CM. 340M parameters, loss vs. circuit LR multiplier.

The following shows a CM multiplier sweep comparing isotropic CM (no gauge) and isotropic CM (gauge); the results agree well across different mp values.

Loading...
Figure 11. CM multiplier sweep: isotropic CM (no gauge) vs. isotropic CM (gauge). 340M parameters.

5.4 NanoGPT optimization track

We entered Compositional Muon (CM) in the modded-nanogpt speedrun track 3 optimization benchmark. Starting from the #309 baseline, our submission (PR #311) adds a single coupled update for the attention WVW_VWOW_O pair. Over 20 seeds, it reaches the leaderboard threshold at step 2875 (mean loss 3.27901) vs. step 2890 for the baseline (~15 steps later).

Modded-NanoGPT speedrun — CM (PR #311), precision-threshold zoom3.2763.2783.2803.2823.2843.2863.2883.2902750280028502900training step @ 0.5M batch sizevalidation losstarget = 3.28this PR clears @ 2875PR #309 clears @ 2890
CM (this PR)
PR #309 baseline
Figure 12. NanoGPT speedrun (track 3).

5.5 Effective learning rate on AdamW

To isolate which part of isotropic CM matters, we port the same partner-dependent rescaling idea to AdamW [8] (“partner-rescaled AdamW”). Concretely, we keep AdamW’s update rule fixed and only modify the OV leg’s per-head scale using the partner norm (the same scalar that appears in the isotropic approximation). This lets us test whether the gains are specific to Muon’s spectral sign, or more generally due to a better effective learning-rate allocation across heads/layers. Figure 13 shows that partner-rescaled AdamW improves over AdamW, though the gains are smaller than in the Muon setting; this may be due to suboptimal hyperparameter choices.

Partner-rescaled AdamWValidation loss2.61192.61262.61332.61412.61482.61552.6150-0.00192.6131-0.00242.6126-0.00262.6124
AdamW (baseline)
+OV partner cₕ
+OV cₕ (mean-norm)
+OV cₕ + gauge
Figure 13. Partner-rescaled AdamW improves over baseline via partner-dependent OV rescaling. 340M, QK-norm + RoPE, 10B tokens.
Loading...
Figure 14. Effective learning-rate schedule under partner-rescaled AdamW.

5.6 Downstream evals

We evaluate the best 340M checkpoints on four standard benchmarks (ARC-Challenge 25-shot, HellaSwag 10-shot, MMLU 5-shot, Winogrande 5-shot).

162534435230.030.130.730.7ARC-C25-shot43.244.445.245.9HellaSwag10-shot23.924.824.426.3MMLU5-shot52.353.753.153.5Winogrande5-shot37.438.338.439.1Avg
no qk-norm + ALiBi· Muon(lr 2×)
no qk-norm + ALiBi· CM(lr 1× mp 16)
qk-norm + RoPE· Muon(lr 1×)
qk-norm + RoPE· CM(lr 1/2× mp 4)
Figure 15. Downstream evaluation accuracy at 340M. Best-HP checkpoints for each architecture setting.

On these pretraining benchmarks CM and vanilla Muon are largely comparable, without a clear winner. For MMLU at this scale of model, the scores roughly amount to random guessing. We include these results for completeness and to avoid overstating pretraining gains from CM.

Certainly, this work owes quite a bit of intellectual debt to Muon [2][15]. Muon Split in GLM-5 [19] was, to our knowledge, the first work to apply Muon at scale with per-head Q/K/V updates and matrix-level WOW_O updates.

There are also several recent works studying how optimizer behavior depends on parameterization. Riemannion [11] makes this point for LoRA, where many low-rank factorizations represent the same adapter. Ji-Ha Kim, independently of us, discusses the analogous gauge issue for Transformer heads, showing that equivalent head bases can train differently under coordinate-based optimizers [23]. Modular duality and modular norm optimization [17][18] argue that updates should respect module structure, while symmetry-compatible optimizer design [12] derives optimizer rules from parameter-block equivariances.

7. Conclusion

The main perspective offered by Compositional Muon is that, when possible, one should directly control the functional perturbation of a composed circuit, rather than the individual pieces which constitute the circuit. For attention, this means treating WQWKW_QW_K^\top and WOWVW_OW_V as the natural objects of optimization, and then deriving factor-space update rules that approximate spectral steepest descent on those composed maps. The half-split and hybrid rules developed here are simple surrogates for this more general problem: they do not exhaust the possible choices, but they show that even a relatively direct approximation can produce better spectral behavior and potential pretraining gains over Muon. In particular, we suspect there are likely better surrogate problems than the ones discussed in this post.

More broadly, compositional optimization suggests a(nother) path toward optimizer-architecture co-design. Some circuits may be easier to optimize not only because of their expressivity, but because their composition-level perturbation geometry admits tractable update rules. This perspective could be combined with other optimizer ideas, such like Shampoo and SOAP, by asking not only how to precondition an individual parameter, but how to precondition the composed map in which that parameter participates.

References

  1. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., Polosukhin, I. (2017).
  2. Jordan, K., Jin, Y., Boza, V., You, J., Cesista, F., Newhouse, L., Bernstein, J. (2024).
  3. Bernstein, J., Newhouse, L. (2024).
  4. Thinking Machines Lab (2025), Includes a derivation of manifold Muon on the Stiefel manifold under a spectral-norm trust region.
  5. Su, J., Lu, Y., Pan, S., Murtadha, A., Wen, B., Liu, Y. (2021).
  6. Henry, A., Dachapally, P. R., Pawar, S., Chen, Y. (2020).
  7. Loshchilov, I., Hutter, F. (2019).
  8. Zhang, B., Sennrich, R. (2019).
  9. Hu, E. J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., Chen, W. (2021).
  10. Bogachev, V., Aletov, V., Molozhavenko, A., Bobkov, D., Soboleva, V., Alanov, A., Rakhuba, M. (2025).
  11. Gupta, V., Koren, T., Singer, Y. (2018).
  12. Bernstein, J. (2025).
  13. Liu, J., Su, J., Yao, X., Jiang, Z., Lai, G., Du, Y., Qin, Y., Xu, W., Lu, E., Yan, J., Chen, Y., Zheng, H., Liu, Y., Liu, S., Yin, B., He, W., Zhu, H., Wang, Y., Wang, J., Dong, M., Zhang, Z., Kang, Y., Zhang, H., Xu, X., Zhang, Y., Wu, Y., Zhou, X., Yang, Z. (2025).
  14. Bernstein, J., Newhouse, L. (2024).
  15. Large, T., Liu, Y., Huh, M., Bahng, H., Isola, P., Bernstein, J. (2024).
  16. GLM-5 Team, Zhipu AI and Tsinghua University (2026), Introduces Muon Split, applying Muon orthogonalization to independent attention-head projection matrices.
  17. Kingma, D. P., Ba, J. (2015).
  18. Vyas, N., Morwani, D., Zhao, R., Kwun, M., Shapira, I., Brandfonbrener, D., Janson, L., Kakade, S. (2024).

8. Appendices

Appendix A. Regularizing the Overdetermined Sylvester System

The decomposition

ΔWQWK+WQΔWK=ΔM\Delta W_QW_K^\top+W_Q\Delta W_K^\top = \Delta M^*

cannot generically exist for

ΔM=ϵmsign(GM),\Delta M^* = -\epsilon\,\operatorname{msign}(G_M),

because the right-hand side is typically full-rank while the left-hand side is tangent to the rank-dhd_h manifold. Still, it is useful to understand the associated linear system.

Let

LWQ,WK(ΔWQ,ΔWK)=ΔWQWK+WQΔWK.L_{W_Q,W_K}(\Delta W_Q,\Delta W_K) = \Delta W_QW_K^\top+W_Q\Delta W_K^\top.

The adjoint is

LWQ,WK(Z)=(ZWK,  ZWQ).L_{W_Q,W_K}^*(Z) = (ZW_K,\;Z^\top W_Q).

A minimum-norm solution, when it exists, lies in the image of this adjoint. Thus one can write

ΔWQ=HWK,ΔWK=HWQ\Delta W_Q=HW_K, \qquad \Delta W_K=H^\top W_Q

for some HRd×dH\in\mathbb R^{d\times d}. Substituting gives

H(WKWK)+(WQWQ)H=ΔM.H(W_KW_K^\top)+(W_QW_Q^\top)H = \Delta M^*.

This Sylvester equation is singular because both Gram matrices have rank at most dh<dd_h<d and hence have zero eigenvalues.

A regularized version is

Hλ(WKWK+λI)+(WQWQ+λI)Hλ=ΔM.H_\lambda(W_KW_K^\top+\lambda I) + (W_QW_Q^\top+\lambda I)H_\lambda = \Delta M^*.

Then the induced factor updates are

ΔWQ=HλWK,ΔWK=HλWQ.\Delta W_Q=H_\lambda W_K, \qquad \Delta W_K=H_\lambda^\top W_Q.

The achieved product perturbation is

ΔWQWK+WQΔWK=ΔM2λHλ.\Delta W_QW_K^\top+W_Q\Delta W_K^\top = \Delta M^*-2\lambda H_\lambda.

Thus the residual 2λHλ2\lambda H_\lambda is the price of regularization.


Appendix B. Joint Whitened Compositional Muon

The half-split rule solves two whitened subproblems separately, each with budget ϵ/2\epsilon/2. An alternative is to concatenate the whitened variables and apply one spectral sign.

Recall

ZQ=ΔWQCK,ZK=ΔWKCQ,Z_Q=\Delta W_QC_K, \qquad Z_K=\Delta W_KC_Q,

with whitened gradients

G~Q=GQCK1,G~K=GKCQ1.\widetilde G_Q=G_QC_K^{-1}, \qquad \widetilde G_K=G_KC_Q^{-1}.

Concatenate

G~=[G~QG~K],Z=[ZQZK].\widetilde G = [ \widetilde G_Q \mid \widetilde G_K ], \qquad Z = [ Z_Q \mid Z_K ].

Then

GQ,ΔWQ+GK,ΔWK=G~,Z.\langle G_Q,\Delta W_Q\rangle + \langle G_K,\Delta W_K\rangle = \langle \widetilde G,Z\rangle.

The joint whitened problem is

minZG~,Zs.t.Zopϵ.\min_Z \langle \widetilde G,Z\rangle \quad \text{s.t.} \quad \|Z\|_{\mathrm{op}}\leq \epsilon.

Its solution is

Z=ϵmsign(G~).Z^* = -\epsilon\,\operatorname{msign}(\widetilde G).

Splitting Z=[ZQZK]Z^*=[Z_Q^*\mid Z_K^*] and unwhitening gives

ΔWQ=ZQCK1,ΔWK=ZKCQ1.\Delta W_Q=Z_Q^*C_K^{-1}, \qquad \Delta W_K=Z_K^*C_Q^{-1}.

The joint SVD orthogonalizes shared directions across the Q and K whitened gradients together. If the two whitened gradients have orthogonal column spaces, the joint rule reduces to separate half-split steps at the same scale. If their column spaces overlap, the joint rule treats shared directions once rather than independently on each side.

The tradeoff is that the worst-case product bound becomes looser:

ΔMopZQop+ZKop.\|\Delta M\|_{\mathrm{op}} \leq \|Z_Q^*\|_{\mathrm{op}} + \|Z_K^*\|_{\mathrm{op}}.

Appendix C. Hybrid OV Derivation

The OV pathway differs from QK because the attention block returns a single residual-stream contribution, not HH independent outputs. For target token ii, the output is the sum over heads of the output projection applied to each head's attention-weighted value vectors:

yi=h=1HWO,h(j=1Nαh,ijWV,hxj)Rdy_i = \sum_{h=1}^H W_{O,h} \left( \sum_{j=1}^N \alpha_{h, ij} W_{V,h} x_j \right) \in \mathbb{R}^d

where xjx_j is the input vector of token jj, and αh,ij\alpha_{h,ij} is the scalar attention weight. Let x~h,i=j=1Nαh,ijxjRd\tilde{x}_{h,i} = \sum_{j=1}^N \alpha_{h,ij} x_j \in \mathbb{R}^d represent the attention-weighted context vector entering head hh. Because the attention weights are constrained by a softmax, x~h,i\tilde{x}_{h,i} is strictly a convex combination. Assuming bounded token inputs xj21\|x_j\|_2 \leq 1, the effective head inputs are bounded within the unit ball:

x~h,i21.\|\tilde{x}_{h,i}\|_2 \leq 1.

A first-order perturbation of the factor matrices (ΔWO,ΔWV)(\Delta W_O, \Delta W_V) induces a functional change in the output:

Δyi=h=1HΔWO,hWV,hx~h,iΔyi,O+h=1HWO,hΔWV,hx~h,iΔyi,V.\Delta y_i = \underbrace{\sum_{h=1}^H \Delta W_{O,h} W_{V,h} \tilde{x}_{h,i}}_{\Delta y_{i, O}} + \underbrace{\sum_{h=1}^H W_{O,h} \Delta W_{V,h} \tilde{x}_{h,i}}_{\Delta y_{i, V}}.

If we allocate equal perturbation budgets to the OO and VV pathways, the two sides require different geometric treatments.

C.1 The Global O-Side

Examine the OO-side perturbation: Δyi,O=h=1HΔWO,h(WV,hx~h,i)\Delta y_{i, O} = \sum_{h=1}^H \Delta W_{O,h} (W_{V,h} \tilde{x}_{h,i}). The full output projection WO=[WO,1WO,H]Rd×HdhW_O = [\,W_{O,1}\mid \cdots \mid W_{O,H}\,] \in \mathbb{R}^{d \times H d_h} is a single matrix. Because all head contributions sum directly within the residual stream and act on a shared spatial embedding, we can stack the active value features vh,i=WV,hx~h,iv_{h,i} = W_{V,h} \tilde{x}_{h,i} vertically into a single vector viv_i.

This allows the total OO-side change to be bounded by a single linear map. Using polar decompositions WV,h=CV,hUV,hW_{V,h} = C_{V,h} U_{V,h}^\top (where CV,h=(WV,hWV,h)1/2C_{V,h} = (W_{V,h} W_{V,h}^\top)^{1/2}), define the horizontally concatenated, partner-whitened block

ZO=[ΔWO,1CV,1ΔWO,HCV,H].Z_O = [\,\Delta W_{O,1} C_{V,1} \mid \dots \mid \Delta W_{O,H} C_{V,H}\,].

The aggregate OO-side change can be written as Δyi,O=ZOwi\Delta y_{i,O}=Z_Ow_i, where the stacked blocks are

wh,i=CV,h1vh,i=UV,hx~h,i.w_{h,i}=C_{V,h}^{-1}v_{h,i}=U_{V,h}^\top\tilde{x}_{h,i}.

Therefore

Δyi,O2ZOop(h=1HUV,hx~h,i22)1/2HZOop.\|\Delta y_{i,O}\|_2 \leq \|Z_O\|_{\mathrm{op}} \left(\sum_{h=1}^H \|U_{V,h}^\top\tilde{x}_{h,i}\|_2^2\right)^{1/2} \leq \sqrt H\,\|Z_O\|_{\mathrm{op}}.

Thus ZOop\|Z_O\|_{\mathrm{op}} gives a global bound relative to the stacked head-input norm. If one wants an ϵ/2\epsilon/2 worst-case output bound under only per-head unit bounds, the rule should use ZOopϵ/(2H)\|Z_O\|_{\mathrm{op}}\leq \epsilon/(2\sqrt H); in practice this constant is folded into the learning-rate scale. Consequently, a per-matrix msign on the full concatenated OO-gradient can coordinate updates across heads.

The update rule is: whiten per head, then orthogonalize per matrix. For each head, define G~O,h=GO,hCV,h1\widetilde G_{O,h} = G_{O,h} C_{V,h}^{-1}. Concatenate these horizontally to form G~ORd×Hdh\widetilde G_O \in \mathbb{R}^{d \times H d_h}, apply one spectral sign to the full matrix S=msign(G~O)S = \operatorname{msign}(\widetilde G_O), and split SS back into head blocks ShS_h. The update is:

ΔWO,hhs=ϵ2ShCV,h1.\Delta W_{O,h}^{\mathrm{hs}} = -\frac{\epsilon}{2}S_h C_{V,h}^{-1}.

C.2 The Head-Local V-Side

Conversely, the VV-side perturbation acts on the raw tokens before the multi-head aggregation occurs:

Δyi,V=h=1HWO,hΔWV,hx~h,i.\Delta y_{i, V} = \sum_{h=1}^H W_{O,h} \Delta W_{V,h} \tilde{x}_{h,i}.

Crucially, because the attention weights αh,ij\alpha_{h,ij} are computed independently across heads via separate QK projections, the effective inputs x~h,i\tilde{x}_{h,i} can vary independently across heads. There is no single shared input vector before the value step on which a global WVW_V operator norm acts.

Δyi,V2=h=1HWO,hΔWV,hx~h,i2h=1HWO,hΔWV,hopx~h,i2h=1HWO,hΔWV,hop.\|\Delta y_{i,V}\|_2 = \left\|\sum_{h=1}^H W_{O,h}\Delta W_{V,h}\tilde{x}_{h,i}\right\|_2 \leq \sum_{h=1}^H \|W_{O,h}\Delta W_{V,h}\|_{\mathrm{op}}\|\tilde{x}_{h,i}\|_2 \leq \sum_{h=1}^H \|W_{O,h}\Delta W_{V,h}\|_{\mathrm{op}}.

This bound is tight when the headwise worst-case output directions align, but it is not generally an equality for fixed weights. The important point is that the bound decomposes by head: each VV block is naturally controlled through its own partner WO,hW_{O,h}, rather than through one global matrix-level orthogonalization across all value blocks.

For each head, define CO,h=(WO,hWO,h)1/2C_{O,h} = (W_{O,h}^\top W_{O,h})^{1/2}. The VV-side update remains strictly local:

ΔWV,hhs=ϵ2CO,h1msign(CO,h1GV,h).\Delta W_{V,h}^{\mathrm{hs}} = -\frac{\epsilon}{2} C_{O,h}^{-1} \operatorname{msign}(C_{O,h}^{-1} G_{V,h}).

This hybrid rule gives a global stacked-input guarantee on the OO-side and a head-local guarantee on the VV-side. It should not be read as an ϵ/2\epsilon/2 bound on the summed VV-side residual perturbation unless the per-head budgets are divided or otherwise allocated across heads; the worst-case aggregate bound scales like HH, while the OO-side stacked bound scales like H\sqrt H.


Appendix D. Grouped-Query Attention

The QK derivation in the main text treats each attention head independently. In grouped-query attention (GQA), multiple query heads share the same key and value head. This changes the natural budget allocation.

For QK, suppose a key head KgK_g is shared by a group Hg\mathcal H_g of query heads. The learned products are

Mh=WQ,hWK,g,hHg.M_h = W_{Q,h}W_{K,g}^\top, \qquad h\in\mathcal H_g.

A perturbation of the shared key affects all products in the group:

ΔMh=ΔWQ,hWK,g+WQ,hΔWK,g.\Delta M_h = \Delta W_{Q,h}W_{K,g}^\top + W_{Q,h}\Delta W_{K,g}^\top.

Let Gg=HgG_g=|\mathcal H_g| be the number of query heads sharing this key head. The QQ-side remains head-local, so each query head can use the usual half-split budget for its own term ΔWQ,hWK,g\Delta W_{Q,h}W_{K,g}^\top. The shared KK-side is different: the same update ΔWK,g\Delta W_{K,g} appears in all GgG_g products.

WQ,hΔWK,gopϵ2Gg,hHg.\|W_{Q,h}\Delta W_{K,g}^\top\|_{\mathrm{op}} \leq \frac{\epsilon}{2G_g}, \qquad h\in\mathcal H_g.

If these per-product bounds are enforced, then the summed shared-key contribution is bounded by ϵ/2\epsilon/2 by the triangle inequality. This is a conservative budget allocation, not a complete closed-form solution for the shared ΔWK,g\Delta W_{K,g}; the actual shared update still involves the collection of partner matrices {WQ,h}hHg\{W_{Q,h}\}_{h\in\mathcal H_g}. Less conservative variants could allocate the same total group budget by gradient norm, or solve a grouped joint-whitened subproblem analogous to Appendix B.

The same principle applies to the OV pathway when values are shared by a group of query heads. Head-local parameters keep head-local budgets; shared parameters get a group budget, divided by the number of query heads that use them.


Appendix E. Equivariance of Exact Half-Split

The undamped full-whitening half-split rule is equivariant under the full GL(dh)GL(d_h) gauge action. We show this for the Q-side; the K-side is symmetric.

Write the polar decomposition

WK=UKCK,UKUK=I,CK=(WKWK)1/2.W_K = U_KC_K, \qquad U_K^\top U_K = I, \qquad C_K = (W_K^\top W_K)^{1/2}.

The Q-side half-split update is

ΔWQ=ϵ2msign(GQCK1)CK1.\Delta W_Q = -\frac{\epsilon}{2} \operatorname{msign}(G_QC_K^{-1})C_K^{-1}.

Since

GQ=GMWK=GMUKCK,G_Q = G_MW_K = G_MU_KC_K,

we have

GQCK1=GMUK.G_QC_K^{-1}=G_MU_K.

Therefore the induced Q-side product perturbation can be written as

ΔWQWK=ϵ2msign(GMUK)UK.\Delta W_QW_K^\top = -\frac{\epsilon}{2} \operatorname{msign}(G_MU_K)U_K^\top.

Equivalently, if PK=UKUKP_K=U_KU_K^\top is the orthogonal projector onto col(WK)\operatorname{col}(W_K), then

ΔWQWK=ϵ2msign(GMPK).\Delta W_QW_K^\top = -\frac{\epsilon}{2} \operatorname{msign}(G_MP_K).

This expression depends only on the product geometry: the column space of WKW_K, not the particular basis chosen for that column space. Under the gauge transformation WKWKRW_K\mapsto W_KR^{-\top}, the column space of WKW_K is unchanged, so the Q-side product update is unchanged.

At the factor level, the corresponding statement is covariance. Under

WQWQR,WKWKR,W_Q\mapsto W_QR, \qquad W_K\mapsto W_KR^{-\top},

the exact half-split update transforms as

ΔWQΔWQR.\Delta W_Q\mapsto \Delta W_QR.

The K-side update satisfies the symmetric transformation law

ΔWKΔWKR.\Delta W_K\mapsto \Delta W_KR^{-\top}.

Thus the exact undamped full-whitening half-split rule is already compatible with the quotient. It defines the same first-order product update regardless of the chosen head basis.


Appendix F. Practical Considerations

F.1 QK-Norm

With QK-norm [7], the attention logits are

ij=q^ik^j,q^i=qiqi,k^j=kjkj.\ell_{ij} = \hat q_i\cdot \hat k_j, \qquad \hat q_i=\frac{q_i}{\|q_i\|}, \qquad \hat k_j=\frac{k_j}{\|k_j\|}.

The logit sensitivity to ΔWQ\Delta W_Q now runs through the normalization map. Both the magnitude qi\|q_i\| and the direction q^i\hat q_i affect how far the normalized query moves under a parameter perturbation.

Unlike the unnormalized case, where the first-order QK product perturbation

ΔM=ΔWQWK+WQΔWK\Delta M=\Delta W_QW_K^\top+W_Q\Delta W_K^\top

is a single input-independent matrix, the effective perturbation with QK-norm varies from input to input through the normalization Jacobians:

Dnorm(q)=1q(Iq^q^),δq^i=1qi(Iq^iq^i)ΔWQxi.D\,\operatorname{norm}(q) = \frac{1}{\|q\|} \left(I-\hat q\hat q^\top\right), \qquad \delta \hat q_i = \frac{1}{\|q_i\|} \left(I-\hat q_i\hat q_i^\top\right)\Delta W_Qx_i.

The corresponding logit perturbation contains

δij=δq^ik^j+q^iδk^j.\delta \ell_{ij} = \delta \hat q_i^\top \hat k_j + \hat q_i^\top \delta \hat k_j.

No single input-independent matrix operator norm captures this worst case.

The partner-whitened rules can still control the unnormalized product

ΔWQCKop,\|\Delta W_QC_K\|_{\mathrm{op}},

but the true logit sensitivity carries extra input-dependent factors.

F.2 ALiBi Instead of RoPE

For some of the experiments here, we use ALiBi [6] rather than RoPE [5].

ALiBi, or Attention with Linear Biases, adds a fixed head-dependent linear position bias directly to the attention logits. Schematically, instead of using only

qikj,q_i^\top k_j,

one uses

qikj+bh(i,j),q_i^\top k_j + b_h(i,j),

where bh(i,j)b_h(i,j) is a predetermined bias depending on the head hh and the relative positions of tokens i,ji,j. Typically, this bias is a negative slope times the distance, so tokens farther away receive a larger penalty.

The important point for this framework is that ALiBi does not rotate or otherwise transform the Q and K feature spaces. The learned QK contribution remains the plain product

WQWK,W_QW_K^\top,

with an additive positional term in the logits. Therefore, the partner-whitened QK rules still apply directly to the learned product. The positional bias changes the attention pattern and, hence, the gradients produced by backpropagation, but it does not alter the algebraic product structure that the optimizer controls.

F.3 Interaction with Weight Decay

A coupled Frobenius penalty would add

λ(WQF2+WKF2)\lambda(\|W_Q\|_F^2+\|W_K\|_F^2)

to the objective. Decoupled AdamW-style weight decay [8] is implemented as a separate shrinkage step rather than as this exact loss penalty, but it has the same important feature for the present discussion: it is not gauge-invariant. Under

WQWQR,WKWKR,W_Q\to W_QR, \qquad W_K\to W_KR^{-\top},

the product is unchanged, but the Frobenius norms generally change.

Thus weight decay breaks the gauge symmetry that made the steepest-descent problem degenerate. Its effect is not only to shrink the product, but also to choose a preferred representative among all factor pairs that realize the same product. In fact, among all equivalent factorizations of a fixed product, the Frobenius penalty prefers balanced ones satisfying

WQWQ=WKWK.W_Q^\top W_Q = W_K^\top W_K.

Appendix G. RMSNorm

RMSNorm gives another simple compositional example. Consider a pre-norm linear layer, and take the input to the learned map to be the already RMS-normalized activation. The learned part of the map is

M=WΓ,Γ=diag(γ),M = W\Gamma, \qquad \Gamma=\operatorname{diag}(\gamma),

where γ\gamma is the RMSNorm scale vector. Thus the linear weight and the RMSNorm scale should not be viewed as completely independent parameters: Γ\Gamma rescales the columns of WW, and changes in γ\gamma are amplified by the current columns of WW.

A joint perturbation (ΔW,ΔΓ)(\Delta W,\Delta\Gamma) gives the exact product change

ΔMexact=(W+ΔW)(Γ+ΔΓ)WΓ=ΔWΓ+WΔΓ+ΔWΔΓ.\Delta M_{\mathrm{exact}} = (W+\Delta W)(\Gamma+\Delta\Gamma)-W\Gamma = \Delta W\Gamma+W\Delta\Gamma+\Delta W\Delta\Gamma.

The first-order CM analogue drops the quadratic term, giving

ΔMlin=ΔWΓ+WΔΓ.\Delta M_{\mathrm{lin}} = \Delta W\Gamma+W\Delta\Gamma.

This is the same compositional principle used for QK and OV: constrain the perturbation of the composed map MM, rather than the perturbations of WW and γ\gamma separately. A half-split version would allocate part of the budget to ΔWΓ\Delta W\Gamma and part to WΔΓW\Delta\Gamma. The WW side is just partner-scaled Muon on the columns of WW, while the γ\gamma side is a diagonal update whose effect is the column-scaled perturbation WΔΓW\Delta\Gamma.

The diagonal structure also gives a second option that is less natural in the full matrix-product setting: keep the quadratic term. Since both Γ\Gamma and ΔΓ\Delta\Gamma are diagonal, the exact update decomposes columnwise:

ΔM:,j=ΔW:,jγj+W:,jΔγj+ΔW:,jΔγj.\Delta M_{:,j} = \Delta W_{:,j}\gamma_j + W_{:,j}\Delta\gamma_j + \Delta W_{:,j}\Delta\gamma_j.

Thus, unlike QK or OV, the second-order interaction is not a dense matrix coupling. It is a per-column scalar interaction between ΔW:,j\Delta W_{:,j} and Δγj\Delta\gamma_j, so one can solve for an exact product update directly.

For example, suppose the desired composed step is ΔM\Delta M^*, such as ΔM=ϵmsign(GM)\Delta M^*=-\epsilon\,\operatorname{msign}(G_M). Choose any diagonal post-step scale

Γ+=Γ+ΔΓ\Gamma^+=\Gamma+\Delta\Gamma

with nonzero diagonal entries, and set

W+=(WΓ+ΔM)(Γ+)1.W^+=(W\Gamma+\Delta M^*)(\Gamma^+)^{-1}.

Then ΔW=W+W\Delta W=W^+-W satisfies

(W+ΔW)(Γ+ΔΓ)WΓ=ΔM.(W+\Delta W)(\Gamma+\Delta\Gamma)-W\Gamma=\Delta M^*.

Columnwise, this is simply

W:,j+=W:,jγj+ΔM:,jγj+.W^+_{:,j} = \frac{W_{:,j}\gamma_j+\Delta M^*_{:,j}}{\gamma_j^+}.

The choice of Γ+\Gamma^+ is not unique. This is the diagonal gauge redundancy of the product WΓW\Gamma: rescaling a column of WW and inversely rescaling the corresponding entry of γ\gamma leaves the composed matrix unchanged. One can fix this gauge by keeping Γ\Gamma fixed, by balancing column norms, or by applying a scalar connection as in the main text.

This also suggests a possible architectural consequence. In a Transformer block, the same RMSNorm scale often feeds several downstream maps, for example QQ, KK, and VV. In that case a single diagonal factor Γ\Gamma participates in several composed products at once:

WQΓ,WKΓ,WVΓ.W_Q\Gamma,\qquad W_K\Gamma,\qquad W_V\Gamma.

A change in γ\gamma is therefore shared across several circuits. From the compositional viewpoint, this couples the geometry of their effective updates. A cleaner factorization would give each downstream role its own diagonal partner, e.g.

WQΓQ,WKΓK,WVΓV,W_Q\Gamma_Q,\qquad W_K\Gamma_K,\qquad W_V\Gamma_V,

so that each composed map has its own scale degrees of freedom.


Appendix H. MLPs

For a standard MLP

f(x)=W2ϕ(W1x),f(x)=W_2\phi(W_1x),

there is no global matrix product analogous to QK or OV, because the nonlinearity sits between the two matrices. Still, CM can be applied locally by linearizing the nonlinearity around the current activations.

Let

a=W1x,Dϕ(x)=diag(ϕ(a)).a=W_1x, \qquad D_\phi(x)=\operatorname{diag}(\phi'(a)).

Then the first-order functional perturbation is

Δf(x)=ΔW2ϕ(a)+W2Dϕ(x)ΔW1x.\Delta f(x) = \Delta W_2\phi(a) + W_2D_\phi(x)\Delta W_1x.

This gives two natural choices. The conservative choice is to apply CM only to the output side, treating h=ϕ(W1x)h=\phi(W_1x) as the input to W2W_2 and controlling ΔW2h\Delta W_2h. This ignores the effect of changing W1W_1 through the activation pattern, but it is simple and directly matches the single-layer stability story.

The more compositional choice is to freeze the activation derivative on a batch and treat the local map as

f(x)W2Dϕ(x)W1x.f(x)\approx W_2D_\phi(x)W_1x.

For a fixed Dϕ(x)D_\phi(x), this is a gated product, and one can apply the same partner-weighted logic to the two pathways

ΔW2Dϕ(x)W1x,W2Dϕ(x)ΔW1x.\Delta W_2D_\phi(x)W_1x, \qquad W_2D_\phi(x)\Delta W_1x.

The caveat is that Dϕ(x)D_\phi(x) is input-dependent, so this is a batchwise or local approximation rather than a global product update. In practice, an MLP version of CM should therefore specify how the activation gates are aggregated, for example by using a batch average or a conservative worst-case bound. This is why MLPs are less canonical than QK, OV, or RMSNorm in the compositional framework.


Appendix I. Training Details

All experiments use the speedrun4M codebase with a WSD learning-rate schedule.

Parameter340M1B
Parameters (non-embedding)340M1B
Hidden dimension10242048
Layers2424
Heads1616
Head dimension64128
Sequence length40964096
Batch size (tokens)524k4M
Total tokens10B (FineWeb-Edu)70B (FineWeb-Edu)
Peak learning rate8e-38e-3
ScheduleWSD (warmup–stable–decay)WSD (warmup–stable–decay)
Weight decay0.010.01
Optimizer (non-attention)MuonMuon
Optimizer (attention)CM / Muon (per experiment)CM / Muon (per experiment)
CM multiplier (mp)swept per experimentswept per experiment
CM damping1e-21e-2

Architecture settings are ablated in Section 5.1: positional encoding (RoPE vs ALiBi) and QK-normalization (on vs off). All three combinations (no QK-norm + ALiBi, no QK-norm + RoPE, QK-norm + RoPE) share the hyperparameters above.


Appendix J. Code Release

An open-source implementation of Compositional Muon is available at github.com/tilde-research/comp-muon-release.


Cite this work

@article{keigwin2026compositional,
  title   = {Towards Compositional Steepest Descent},
  author  = {Keigwin, Ben and Yang, Li and Zhang, Yunzhe and Pai, Dhruv and DeWulf, Alec},
  year    = {2026},
  url     = {https://tilderesearch.com/blog/compositional-muon}
}

Footnotes

  1. In full generality, optimizing over the composed perturbation for the entire network is much harder than optimizing over the parameter perturbation for a single layer: we can have shared parameters between layers, nonlinearities, and in general, there is no reason to expect a clean closed-form solution for the entire network.

  2. A damped Sylvester solve can approximate the decomposition, with a residual controlled by the damping term. See Appendix A for the full treatment. We assume throughout that the head factors WQ,WKRd×dhW_Q,W_K \in \mathbb{R}^{d \times d_h} have full column rank.

  3. In practice, if WKW_K has small singular values, CK1C_K^{-1} may blow up; one can replace (WKWK)1/2(W_K^\top W_K)^{1/2} with (WKWK+λI)1/2(W_K^\top W_K + \lambda I)^{1/2} for a small damping λ>0\lambda > 0.