Certified dual-price MoE routing
Implementation & benchmark of arXiv:2607.16891 — Certified-Gap Dual-Price Policies for Real-Time Truckload Bid Acceptance with Relocating, Clock-Constrained Resources
Source paper: Certified-Gap Dual-Price Policies for Real-Time Truckload Bid Acceptance with Relocating, Clock-Constrained Resources arXiv:2607.16891 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace a capacity-penalty-only MoE router with a nonnegative shadow price for each expert, capacity bucket, or hardware resource. Route each token using predicted utility minus the relevant price, while computing a decomposed optimistic objective that certifies how much utility remains above the feasible routed value.
Formulas
Mathematical statement
The paper's Lagrangian decomposition is $$L(lambda; xi)=sum_t lambda_t+sum_k V^k_lambda(x_k(0); xi),$$ where t indexes coupled service constraints, lambda_t is a nonnegative shadow price, k indexes reusable resources, x_k(0) is resource k's initial state, xi is the realized instance, and V^k_lambda is the optimal value of resource k's independent subproblem after charging lambda_t for service. Weak duality gives $$V^star(xi)<=L(lambda; xi)$$ for every nonnegative lambda. For a neural router, let tokens be i=1,...,n, experts be e=1,...,E, u_ie be the router utility, a_ie be the assignment indicator, and C_e be expert capacity. The adapted relaxed objective is $$L(lambda)=sum_e lambda_e C_e+sum_i max_e(u_ie-lambda_e).$$ The feasible routed utility is $$P=sum_i sum_e a_ie u_ie$$ and satisfies P<=L(lambda). The price update is projected subgradient ascent: $$lambda_e <- max(0, lambda_e+rho(n_e-C_e)),$$ where n_e=sum_i a_ie is realized expert load and rho>0 is the dual step size.
Implementation notes
Integrate the method into the MoE router immediately before top-1 or top-2 expert selection. Let the router produce utility logits u_ie for every token i and expert e, and maintain one nonnegative price lambda_e per expert; prices can optionally be indexed by layer, sequence-length bucket, or hardware bucket. Compute adjusted logits s_ie=u_ie-lambda_e, select the top expert using the normal capacity rule, and record the realized count n_e. After each batch, update prices using lambda_e=max(0, lambda_e+rho(n_e-C_e)); use an exponential moving average of n_e when per-batch noise causes oscillation. For diagnosis, compute the feasible utility P=sum_i u_i,a_i for accepted assignments and the relaxed upper bound L=sum_e lambda_e C_e+sum_i max_e(u_ie-lambda_e). Report the absolute gap L-P and normalized gap (L-P)/(abs(L)+1e-8). The mathematical components are the relaxed upper bound and projected subgradient update; temperature, smoothing, tie-breaking, and overflow handling are empirical choices. First run a 12-layer small Transformer with 8 experts on WikiText-103 or a comparable language-modeling subset, comparing against standard top-1 routing with the usual load-balancing loss at identical expert capacity and FLOPs. Sweep rho over 0.001, 0.01, and 0.1. Success means lower expert-load variance, fewer dropped or overflowed tokens, and equal or better validation perplexity at the same capacity. Also check that the dual gap is stable rather than oscillatory and that routing latency does not increase materially.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Significantly worse ✗
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built a NumPy MVP for certified dual-price top-1 MoE routing, including projected expert-price updates, capacity enforcement, and the relaxed dual bound. Weak duality held in all 1,000 random trials, and the stability sweep showed bounded behavior for small rho and oscillatory collapse for large rho as predicted. In the matched toy comparison, rho=0.001 improved accepted utility, overflow, and load variance versus greedy routing, although the raw update can fail to rebalance discrete assignments and rho=0.1 was unstable.
- Agent confidence
- 8/10
- Baseline
- Accepted utility 60.42; overflow tokens 63.70; load variance 1434.55
- Idea
- rho=0.001: accepted utility 74.85; overflow tokens 10.40; load variance 56.47; mean dual gap 2.35. rho=0.01: utility 72.64; overflow 12.84; variance 66.31. rho=0.1: utility 21.85; overflow 95.75; variance 3058.69
Limitations: No Transformer or language-model perplexity experiment was run; top-2 routing, EMA price smoothing, wall-clock latency, FLOPs, and GPU performance were not tested. The toy utilities and capacity process do not establish production MoE gains.
How to run: python3 dual_moe_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.16891)
Significantly WORSE than the tuned baseline (n/a, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Router_regime_regression
- Model
- custom_routed_experts
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0.6642
- Effect (Δ)
- 0.0768 (n/a; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Not confirmed ✗
- Practical effect
- Hurts
- Baseline tuning
- swept over 0 configs
The experiment used a small synthetic four-expert regression benchmark rather than a full Transformer language-model MoE. Top-2 routing, EMA smoothing, wall-clock latency, FLOPs, and hardware buckets were not tested.
How to run: python3 stage2_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Implemented certified dual-price routing on the structurally matched router_regime_regression neural MoE benchmark. The best idea setting was significantly worse than the tuned baseline, and the trained-model mechanism signature did not confirm the predicted price/load relationship.
- Baseline
- Best lr=0.01, balance_weight=0.0; mean test MSE=0.587452
- Comparison
- Paired delta=+0.076754, 0/8 wins, permutation p=0.0081; idea worse (significant)
- Idea
- Best lr=0.01, rho=0.001; mean test MSE=0.664206
Benchmark result
Significantly WORSE than the tuned baseline (n/a, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Router_regime_regression
- Model
- custom_routed_experts
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0.6642
- Effect (Δ)
- 0.0768 (n/a; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Not confirmed ✗
- Practical effect
- Hurts
- Baseline tuning
- swept over 0 configs
The experiment used a small synthetic four-expert regression benchmark rather than a full Transformer language-model MoE. Top-2 routing, EMA smoothing, wall-clock latency, FLOPs, and hardware buckets were not tested.
How to run: python3 stage2_bench.py
Artifacts
- REPORT.md 3.0 KB View
- bench_report.json 48.0 KB View Raw
- dual_moe_experiment.py 4.8 KB View Raw
- report.md 1.4 KB View
- report_bench_2026-08-31T114837.md 2.4 KB View
- results.json 2.9 KB View Raw
- stage2_bench.py 6.5 KB View Raw