One router, two destinations
Each example is either a bag (label = the most frequent group; order doesn't matter) or an order example (label = the first token's group; order matters). A regime cue rides in the input, so the router can tell them apart. It emits a gate q = [q_silo, q_plain]; at inference we hard-route to the preferred expert and pay only that expert's attention.
Router vs. always-silo vs. always-plain
All three trained from scratch on the same mixed set, both arms to convergence (300 epochs). silo-only is cheap but can't do the order half; plain-only does both but always pays; the router sends each example to the right expert. Bars below are seed 0; the callout gives the range across 5 seeds. Accuracy bars (red line = chance); the orange bar is average attention pairs, relative to plain's 81.
What's real — and the honest caveats
What's real
The router is genuinely trained: selftest.py gradient-checks the full router-MoE backprop — with and without the compute penalty — against numerical gradients (< 1e-5). It routes the two regimes near-perfectly (seed 0: bag→silo 100%, order→plain 100%), and — verified across 5 seeds — spends ~40% less average attention than always-plain on every seed while staying within a few points of it. It reliably beats the always-cheap silo. Reproducible: python train.py, python sweep.py.
The caveats
Not a guaranteed accuracy win: router − plain runs −3 to +9 pts across seeds — it trails plain on 1 of 5. And a router can only route because the regime is detectable in the input (a cue carries it); if nothing carried it, no router could tell. The compute penalty is standard cost-aware routing, not magic; the router adds a second head + gate (428 vs 386 params) over a shared encoder. Synthetic probes, tiny models — a demonstration, not a benchmark.
model.py (shared encoder + silo & plain heads + the <ono> router, gradient-checked) · tasks.py (mixed-regime data + regime cue) · train.py → results.json · selftest.py. The pentalogy: build (v1) · measure (v2) · train one silo (v3) · two in parallel (v4) · route between them (v5).