Modern optimizer stacks match geometry to parameter class, giving dense hidden matrices a spectral duality map and vectors coordinatewise adaptivity, yet doubly stochastic routing blocks, whose natural atoms are permutations, are still trained by applying AdamW to an unconstrained Sinkhorn score. We construct the missing member of the stack from those atoms. The central symmetrization of the Birkhoff polytope is the unit ball of a matching norm whose exact smooth duality map is a Gibbs expectation over permutations with a matrix permanent as its potential, and an exact identity splits that potential into Sinkhorn free energy plus permanent structure of the scaled matrix. Rook replaces the intractable part with a fractional-Bethe map whose coefficient \(\gamma_n=-(n-1)/n\) is uniquely fixed by exact permutation covariance, and which stays Lipschitz in the score where the hard assignment oracle jumps across ties. The construction pays off where routing has to adapt. After the routed streams are rewired from a shared checkpoint, Rook lowers post-shift cross-entropy from \(0.415\) to \(0.156\) against Muon+AdamW and recovers \(2.96\times\) sooner, on all ten paired seeds and at \(7.1\%\) lower step time. Under batch-32 gradient noise it reduces direction chatter by \(62.4\%\) relative to that oracle and halves final test loss. On stationary training AdamW on the scores stays ahead.
Some neural routers and residual-stream mixers are constrained to the Birkhoff polytope
where \(\mathcal P_n\) is the set of permutation matrices. Their atoms are assignments, not coordinates and not orthogonal matrices, yet the common implementation forms \(B=\operatorname{Sinkhorn}(S/T)\) and applies AdamW to the score \(S\).
\(\mathcal B_n\) is not centrally symmetric, so it cannot serve as a signed unit ball. Its central symmetrization \(\mathcal K_n=\tfrac12(\mathcal B_n-\mathcal B_n)\) contains a neighborhood of zero in the tangent space and is therefore the unit ball of a norm on the tangent space, the matching norm. Its dual norm is the assignment spread
computable by two assignment solves, and its linear oracle is the signed difference of extreme assignments, which we call the hard LMO. This is the polytope analogue of choosing updates from the norm ball induced by a parameter class’s own atoms. Orthogonal matrices give the spectral ball and the polar factor (Muon), and permutations give \(\mathcal B_n\) and a difference of assignments.
For \(\tau>0\) the smooth matching potential and its marginal are
with Hessian \(\tfrac1\tau\operatorname{Var}_{q_G}(\langle\cdot,P\rangle)\): the geometry of the block is the covariance of a Gibbs law over assignments. The omitted term is exact:
Differentiating gives the exact marginal correction, and each of its entries depends on a global \((n{-}1)\times(n{-}1)\) subpermanent, which is why coordinatewise corrections are structurally wrong.
Raw Bethe over-responds by \((n-1)^2/[n(n-2)]\); Rook removes that finite-width error, and since \(\gamma_n\in[-1,-\tfrac12]\) its potential stays inside the certified bracket containing the true permanent.
Hyperparameters are selected on development seeds and frozen before held-out evaluation; exact permanents and Gibbs marginals appear only in validation oracles, never in training. Every comparison is paired. Arms are cloned from one checkpoint and receive identical minibatches, so only the optimizer assignment varies.
For \(n\in\{4,6,8\}\), five temperatures spanning the deployed range, and 50 held-out tangent matrices per cell, we compare signed directions against exact permutation enumeration. Rook wins 748/750 paired cases, cutting Sinkhorn’s mean relative error from \(0.2169\) to \(0.0395\) and raw Bethe’s by \(72.8\%\).
| Map | Mean cosine ↑ | Minimum cosine ↑ | Mean rel. error ↓ |
|---|---|---|---|
| Sinkhorn (\(\gamma=0\)) | 0.987724 | 0.928120 | 0.216913 |
| Classical Bethe (\(\gamma=-1\)) | 0.990092 | 0.859468 | 0.145470 |
| Rook (\(\gamma_n\)) | 0.998802 | 0.983241 | 0.039506 |
Four ordered image streams feed a learned \(4\times4\) Birkhoff router, a residual MLP, and a classifier; one Muon+AdamW checkpoint per seed is cloned into every arm and the stream order is rewired. Rook lowers mean post-shift CE by \(62.5\%\) and recovers \(2.96\times\) sooner, winning loss and recovery on 10/10 paired seeds at \(7.1\%\) lower step time, and matches the exact Gibbs reference to four decimals. The score-cap control rules out clipping.
| Stack | Post-shift CE ↓ | Recovery (ep.) ↓ | Accuracy (%) ↑ | ms/step |
|---|---|---|---|---|
| AdamW | .406±.009 | 6.9±.5 | 94.44±.36 | 2.882 |
| Muon+AdamW | .415±.015 | 7.1±.5 | 95.91±.20 | 3.915 |
| + score cap | .270±.011 | 5.3±.3 | 96.42±.19 | 4.056 |
| + hard LMO | .174±.008 | 2.6±.2 | 97.42±.13 | 3.640 |
| + Rook | .156±.006 | 2.4±.3 | 97.16±.24 | 3.639 |
| + exact Gibbs | .156±.006 | 2.2±.2 | 97.09±.23 | 3.941 |
What separates the two matching-norm maps is continuity. We clone the same checkpoints, feed identical minibatches to both, and reduce the post-shift batch from 128 to 32 without retuning; chatter is the mean of \(1-\cos(d_t,d_{t-1})\) over consecutive directions. At batch 128 Rook reduces chatter by \(80.1\%\) with lower trajectory CE in 9/10 seeds; at batch 32 it reduces chatter by \(62.4\%\), halves final test loss, and improves accuracy by \(2.42\) points in all ten paired seeds, while the hard LMO reaches the recovery threshold \(0.3\) epoch sooner. The two maps therefore sit at different points of a speed and stability tradeoff, the smooth map trading a little threshold speed for continuity, steadier directions, and better final quality once gradients are noisy.
| Batch | Map | Chatter ↓ | Test CE ↓ | Accuracy (%) ↑ |
|---|---|---|---|---|
| 128 | Hard LMO | .178±.013 | .110±.013 | 96.98±.59 |
| 128 | Rook | .035±.002 | .098±.005 | 97.47±.24 |
| 32 | Hard LMO | .182±.004 | .149±.034 | 95.42±1.06 |
| 32 | Rook | .069±.001 | .073±.008 | 97.84±.29 |
We repeated the protocol on a 5M-parameter byte-level model on enwik8, six layers of width 256 split into four 64-wide streams, each mixing through a learned \(4\times4\) Birkhoff block, over three seeds. Muon’s learning rate on the scores is flat across a \(30\times\) grid, so that baseline is not undertuned; Rook’s tuned step size here is \(0.25\), and at that value it reaches the best \(8{,}000\)-step endpoint of any arm. Under six recurring rewirings it pays a one-time cost in the first cycle, then leads in every later cycle by \(+0.16\) to \(+0.20\) mean CE.
The solver targets widths up to a few dozen, the evidence isolates optimizer behavior under rewiring and noise, and the transformer study is a single 5M-parameter model, not a pretraining claim. Rook’s step size does not transfer across scale, and stationary runs favor AdamW. We do not compare against projected gradient or mirror descent on \(\mathcal B_n\), so the advantage cannot yet be separated from primal updating in general; rectangular transportation polytopes also remain open.
@misc{kandukoori2026rook,
title = {Rook: Global Permutation Geometry for Neural Routing},
author = {Kandukoori, Sushaan and Patel, Aarya},
year = {2026},
note = {Preprint}
}