Exact Multi-Population Hyperplane Router
Implementation & benchmark of arXiv:2607.02400 — From Ham-Sandwich to Centerpoints: Semialgebraic Algorithms for Cutting Polytopal Measures
Source paper: From Ham-Sandwich to Centerpoints: Semialgebraic Algorithms for Cutting Polytopal Measures arXiv:2607.02400 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace a learned binary MoE gate with a hyperplane whose two sides contain prescribed proportions of several token populations simultaneously. In a low-dimensional routing projection, solve the cap-volume equations directly, producing deterministic per-population load control without an auxiliary load-balancing loss. Recursively applying the construction yields a balanced binary expert tree.
Formulas
Mathematical statement
For an oriented hyperplane H(u=t), let u\in\mathbb S^{d-1} be a unit normal and define the negative halfspace P(u\le t)=\{x\in P:u^{\mathsf T}x\le t\}. For a convex polytopal measure P, its cap-volume function is C_P(u,t)=\operatorname{vol}(P\cap\{x:u^{\mathsf T}x\le t\}). On each cell of the arrangement determined by which polytope edges or faces are intersected, C_P(u,t) is a fixed rational function of (u,t). Given d polytopal measures P_1,\ldots,P_d and target fractions \alpha_i\in(0,1), the prescribed-proportion cut solves C_{P_i}(u,t)=\alpha_i\operatorname{vol}(P_i) for i=1,\ldots,d, together with u^{\mathsf T}u=1 and the inequalities defining the active cell. In the ML adaptation, P_i approximates the projected token distribution for population i, and routing is r(z)=\mathbf 1[u^{\mathsf T}z>t].
Implementation notes
Integrate this at the MoE router immediately before dispatching tokens to two experts. Learn or freeze a projection W\in\mathbb R^{d imes D}, with d=2 or 3, and compute z=W h for hidden state h. For every population i, maintain a reservoir of 32--128 projected tokens and form a convex hull P_i; use an axis-aligned box as the first MVP. Set target fractions alpha_i, such as 0.5 for balanced routing. Enumerate candidate arrangement cells induced by hull edges or faces. For each cell, clip P_i by u^T x\le t, evaluate the resulting polygon or polyhedron volume, and solve C_{P_i}(u,t)=alpha_i vol(P_i) for all i plus u^T u=1. Reject roots violating the cell inequalities. If no exact root exists, minimize the normalized residual sum_i(C_{P_i}(u,t)/vol(P_i)-alpha_i)^2 and select the best candidate. Pseudocode: build P_i; generate cells; solve equations; filter feasible roots; dispatch using r(h)=1[ u^T W h>t]. The paper supplies the cap equations and semialgebraic cell constraints; hull maintenance and root solving are numerical approximations. First test on CIFAR-10 or TinyStories with a two-expert MLP, comparing Top-1 gating plus load loss against this router at equal active FLOPs. Record routing fractions, overflow rate, validation loss, and routing overhead. Success means below 1% population load imbalance without an auxiliary loss and equal-or-lower validation loss.
Verification
Stage 1 · Toy mechanism gate: Failed ✗
Stage 2 · Mechanism transferred to benchmark: Not tested
Stage 2 · Practical benchmark result: Not run
Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built an exact two-dimensional box-cap router using polygon clipping and nonlinear solving, plus a reproducible two-expert synthetic regression benchmark. The cap equations matched the prescribed 0.5 fractions with zero solver residual and at most 0.00085 Monte Carlo error; routing was balanced across both populations without a load loss. However, validation MSE was 0.1344 versus 0.0737 for the learned baseline, so the promised accuracy win was not observed despite the clear load-control effect.
- Agent confidence
- 9/10
- Baseline
- MSE 0.07369; population expert-1 fractions [0.0570, 1.0000]; overall expert-1 load 0.5304
- Idea
- MSE 0.13440; population expert-1 fractions [0.4867, 0.5028]; overall expert-1 load 0.4948; cap solver residual 0; Monte Carlo max absolute cap error 0.000847
Limitations: Only a synthetic two-dimensional axis-aligned-box population model and linear two-expert regressors were tested; no CIFAR-10/TinyStories, learned projection, convex-hull reservoirs, recursive expert tree, overflow capacity test, wall-clock overhead, or equal-FLOP neural MoE comparison was evaluated.
How to run: python3 router_experiment.py > results.json
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- report.md 1.4 KB View
- results.json 0.8 KB View Raw
- router_experiment.py 5.4 KB View Raw