Tree-Structured Exact Expert Router
Implementation & benchmark of arXiv:2608.22815 — Convexification of mixed-integer quadratic optimization via decision diagrams
Source paper: Convexification of mixed-integer quadratic optimization via decision diagrams arXiv:2608.22815 ⓘ · analyzed Aug 29, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace independent top-k expert selection with a decision-diagram router that optimizes a quadratic surrogate over binary expert activations and continuous assignment weights. When expert redundancy or communication costs form a tree, partial routing decisions are merged whenever they have the same separator state, turning exponentially many candidate masks into a dynamic program over a small number of graph cuts.
Formulas
Mathematical statement
The paper optimizes the gated quadratic set X_F,Z = {(x_0,x,z): z is in Z subset of {0,1}^n, ||F^T x||_2^2 <= x_0, and x_i(1-z_i)=0 for every i}, with objective d^T x + c^T z + x_0; after eliminating x_0 this is d^T x + c^T z + ||F^T x||_2^2. Here z_i indicates whether expert i is active, x_i is its continuous routing weight, F is a feature or cost factor, d is a linear routing preference, and c is an activation penalty. For Q = FF^T, Theorem 2 states that if supp(Q) is a connected tree, the state after a partial assignment v in {0,1}^{ell-1} depends only on the one-cut S = S_1^ell(v), with H^ell(v) = F_[ell:n] - Q_[ell:n],S (Q_S,S)^(-1) F_S. Thus different partial masks sharing the separator can be merged without changing the downstream quadratic problem. The adapted router uses this state-equivalence rule to compute the minimum-cost feasible mask and routing weights.
Implementation notes
Integrate this at the MoE router, before dispatching tokens to experts. Use one routing problem per token group or microbatch, with n experts and binary z_i indicating whether expert i may receive traffic. Build a symmetric interaction matrix Q from a calibration set: Q_ij can be an empirical covariance or cosine-similarity penalty between expert outputs, augmented with diagonal dispatch costs. Factor Q approximately as F F^T, or use a low-rank factor F directly. Let d_i be the negative router logit for expert i, c_i be the fixed activation or communication cost, and x_i be a nonnegative routing weight. Add sum_i x_i = 1, 0 <= x_i <= U_i z_i, and at most k active experts. Choose an expert ordering for which supp(Q) is a tree or has small separators. Enumerate partial binary assignments in this order. For every partial assignment v, compute its separator S_1^ell(v) and state H^ell(v) using H^ell(v) = F_[ell:n] - Q_[ell:n],S Q_S,S^(-1) F_S; hash states with identical separators and tolerance-rounded H matrices, and retain only the lowest-cost representative. For every retained state, solve the small local convex quadratic problem over newly activated experts, then propagate its cost. Backtrack the best terminal state to obtain z and x, and dispatch only to experts with z_i = 1. The separator rule and quadratic state update come from the paper; Q estimation, state tolerances, and ordering are empirical. First test on an 8-expert Switch-Transformer-style model using CIFAR-100 or WikiText-2, comparing against top-2 routing at equal active experts. Measure router wall time, expert FLOPs, load imbalance, validation loss, and unique state count. Success requires lower redundancy or communication and equal-or-better accuracy without router overhead dominating dispatch savings.
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 8-expert path-tree quadratic router MVP, with exact support optimization versus standard top-2 routing. The separator-state formula and Schur-complement residual identity both passed numerical checks to machine precision; exact routing improved mean surrogate objective by 0.01938, but required about 31.5x the router time and slightly worsened load CV. Thus the quality signal is real on this synthetic setup, but the promised efficient routing win was not demonstrated because the MVP’s exact search is exhaustive and overhead dominates.
- Agent confidence
- 9/10
- Baseline
- mean objective -0.28731; load CV 0.1581; router time 0.475s; 2.0 active experts/token
- Idea
- mean objective -0.30669; load CV 0.2057; router time 14.976s; 1.983 active experts/token; 0.01938 lower objective; 25.8% strict wins over baseline
Limitations: Synthetic quadratic objective only; no trained MoE, CIFAR/WikiText, expert-output calibration, communication measurement, non-path trees, or actual merged-state dynamic program was tested. The exact support solver uses scipy SLSQP and exhaustive masks, so its runtime is a correctness reference rather than a production router.
How to run: python3 tree_router_experiment.py
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
- tree_router_experiment.py 6.0 KB View Raw