Control-Cost Laguerre MoE Routing
Implementation & benchmark of arXiv:2607.09139 — Control Laguerre Tessellation: Semi-discrete Optimal Transport Over Control Systems
Source paper: Control Laguerre Tessellation: Semi-discrete Optimal Transport Over Control Systems arXiv:2607.09139 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Route tokens to experts using Laguerre cells defined by the minimum control energy needed to move a token embedding to each expert prototype, rather than by Euclidean distance or an unconstrained learned router logit. Per-expert dual weights deform the cells so that minibatch routing follows prescribed expert capacities, giving a geometrically interpretable alternative to auxiliary load-balancing losses.
Formulas
Mathematical statement
The paper's semi-discrete optimal transport problem is $\min_{T:\mathcal{X}\to\{\bm y_i\}_{i=1}^r,\,T_\#\mu=\nu}\int_{\mathcal X}c(\bm x,T(\bm x))\,d\mu$, where $\mu$ is the continuous source distribution of token embeddings, $\bm y_i$ are $r$ discrete target prototypes or experts, $c(x,y_i)$ is the transport ground cost, and $\nu=(\nu_1,\ldots,\nu_r)$ is the desired simplex of expert capacities. For a control-induced cost satisfying the twist condition, define the Control Laguerre cell $C_i(\psi)=\{x:c(x,y_i)-\psi_i\le c(x,y_j)-\psi_j\ \forall j\}$, where $\psi_i$ is a scalar dual weight. The routed map is $T(x)=y_i$ for $x\in C_i(\psi)$. A concrete minimum-energy linear-control cost for dynamics $\dot z=Az+Bu$ over horizon $\tau$ is $c_\tau(x,y)=\frac12(y-e^{A\tau}x)^\top W_\tau^{-1}(y-e^{A\tau}x)$, with controllability Gramian $W_\tau=\int_0^\tau e^{As}BB^\top e^{A^\top s}\,ds$. The capacity dual can be optimized with minibatch cell masses $\hat m_i=\frac1B\sum_{b=1}^B\mathbf 1[x_b\in C_i(\psi)]$ using $\psi_i\leftarrow\psi_i+\eta_\psi(\nu_i-\hat m_i)$; increasing $\psi_i$ enlarges expert $i$'s cell. The twist condition is the structural assumption that makes the cell assignment a valid almost-everywhere transport map rather than an arbitrary tie-breaking rule.
Implementation notes
(1) Integration point: replace the top-1 router in a sparse MoE layer. Let the preceding transformer block produce token vectors $h_b\in\mathbb R^d$. Add a projection $x_b=P h_b$ into a lower-dimensional routing space, maintain one prototype $y_i\in\mathbb R^d$ per expert, and compute the control cost to every expert. Use $A,B,\tau$ as fixed small matrices or learn them from a stable parameterization; precompute $F=e^{A\tau}$ and $G=W_\tau^{-1}$, so the cost is a batched quadratic form. (2) Pseudocode: initialize $\psi_i=0$ and capacities $\nu_i=1/r$; for each batch compute $q_b=F x_b$, $d_{bi}=0.5(y_i-q_b)^\top G(y_i-q_b)-\psi_i$; assign $a_b=\arg\min_i d_{bi}$; dispatch tokens by $a_b$; estimate $\hat m_i=B^{-1}\sum_b1[a_b=i]$; update $\psi_i\leftarrow\psi_i+\eta_\psi(\nu_i-\hat m_i)$ and optionally center $\psi\leftarrow\psi-\mathrm{mean}(\psi)$. Train the experts and projection with the ordinary task loss. Use a straight-through assignment or stop-gradient through routing. (3) Computed from the mathematics: $F$ and $G$ come from matrix exponential and controllability-Gramian calculations; cells and assignments use the exact Control Laguerre rule; only minibatch masses and learned prototypes are estimated or optimized empirically. If $W_\tau$ is ill-conditioned, use $(W_\tau+\epsilon I)^{-1}$. (4) First experiment: compare this router against Switch top-1 routing with its standard load-balancing loss on a 4- or 8-expert small Transformer trained on CIFAR-100 text labels, WikiText-2, or a synthetic mixture with clusters connected by anisotropic dynamics. Measure validation loss or perplexity, coefficient of variation of expert loads, dropped-token fraction, router overhead, and training stability across seeds. Success means lower load variance and fewer dropped tokens at equal capacity, with equal or better validation loss and no extra all-to-all communication.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Significant win ✓
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
How to read this: The implementation beat the baseline, but the claimed mechanism did not reproduce at benchmark scale. The gain may come from another effect; treat the cause as unresolved.
Stage 1 — Mechanism check agent confidence 8/10
Built a minimum-energy Control-Cost Laguerre router with exact matrix-exponential dynamics, controllability Gramian costs, Laguerre assignments, and dual capacity updates. The mechanism manifested: numerical Gramian error was 5.3e-10, weaker second-coordinate actuation increased the measured cost ratio from 1.39 to 16.92, and dual ascent at eta=1.5 reduced maximum capacity error to 0.0018. In the synthetic capacity-drop comparison, Euclidean routing dropped 24.69% of tokens versus 4.23% for the dual Laguerre router, but no downstream neural task accuracy or wall-clock overhead win was tested.
- Agent confidence
- 8/10
- Baseline
- Euclidean nearest-prototype loads [0.4969, 0.1531, 0.2492, 0.1008], max capacity error 0.2469, drop fraction 0.2469
- Idea
- Control-Laguerre with dual weights loads [0.2713, 0.2291, 0.2710, 0.2286], max capacity error 0.0018 at eta=1.5, drop fraction 0.0423, assignment disagreement with baseline 0.3229; Gramian relative error 5.3e-10
Limitations: Only a deterministic 2D synthetic mixture with four fixed prototypes was tested. There was no learned projection/prototype training, Transformer or language-model task, multi-seed analysis, GPU benchmark, communication measurement, or comparison with a learned Switch router and auxiliary load-balancing loss.
How to run: python3 experiment.py > results.json
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.09139)
Beats the tuned baseline by 67.4% (p=0.0152, wins 7 / 8 paired seeds; metric: lower is better).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0011
- Idea mean
- 0
- Effect (Δ)
- -0.0007 (−67.4%; negative = idea better)
- Wins
- 7 / 8 paired seeds
- p-value
- 0.0152 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±35.2%
- Mechanism
- Not confirmed ✗
- Practical effect
- Helps
- Baseline tuning
- swept over 3 configs
The experiment was forced to CPU after an illegal-instruction crash during GPU execution, so GPU routing overhead and throughput were not measured. Only the built-in dynamics track, one small GRU architecture, four experts, 12 epochs, and eight seeds were tested. The mechanism signature was false: mean realized idea load CV was about 1.00 versus 0.38 for baseline, and mean idea capacity error was about 0.37 versus 0.12. Thus the significant MSE win does not demonstrate the promised capacity-balancing effect.
How to run: python3 bench_experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Worked ✓
Agent confidence: 7/10
The Control-Cost Laguerre router was implemented as an end-to-end MoE modification on the structurally matched controlled-pendulum dynamics track, using identical GRU/expert systems and paired eight-seed evaluation. With parity-compliant three-point learning-rate sweeps for both methods, the idea achieved significantly lower test MSE: delta_mean=-0.0007396963, permutation p=0.0152, and 7/8 paired wins. The trained-model mechanism signature was not confirmed because realized expert-load balance was worse for the idea.
- Baseline
- Test MSE mean 0.0010972076, std 0.0003763537, best lr 0.006
- Idea
- Test MSE mean 0.0003575112, std 0.0001011662, best lr 0.006; 7/8 paired wins; delta=-0.0007396963; p=0.0152
Benchmark result
Beats the tuned baseline by 67.4% (p=0.0152, wins 7 / 8 paired seeds; metric: lower is better).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0011
- Idea mean
- 0
- Effect (Δ)
- -0.0007 (−67.4%; negative = idea better)
- Wins
- 7 / 8 paired seeds
- p-value
- 0.0152 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±35.2%
- Mechanism
- Not confirmed ✗
- Practical effect
- Helps
- Baseline tuning
- swept over 3 configs
The experiment was forced to CPU after an illegal-instruction crash during GPU execution, so GPU routing overhead and throughput were not measured. Only the built-in dynamics track, one small GRU architecture, four experts, 12 epochs, and eight seeds were tested. The mechanism signature was false: mean realized idea load CV was about 1.00 versus 0.38 for baseline, and mean idea capacity error was about 0.37 versus 0.12. Thus the significant MSE win does not demonstrate the promised capacity-balancing effect.
How to run: python3 bench_experiment.py
Artifacts
- README.md 0.9 KB View
- bench_experiment.py 6.8 KB View Raw
- bench_report.json 5.0 KB View Raw
- experiment.py 4.2 KB View Raw
- report.md 1.6 KB View
- report_bench_2026-08-31T001031.md 4.2 KB View
- results.json 6.6 KB View Raw