Ahmed Doghri Logo Image
Ahmed Doghri

taskrouter

Average three specialists and you erase what made them useful. taskrouter picks the expert from input similarity and removes 80.2% of the merge error.

taskrouter reproduced benchmark result

Averaging Specialists Produces A Generalist Nobody Hired

Model merging promises multiple skills without multiple deployments. Static averaging is cheap, but conflicting task vectors can cancel the exact behavior worth keeping.

taskrouter builds three transparent experts with distinct input regions. The baseline averages every prediction. The router chooses the nearest expert prototype without training another network.

Route First, Merge Second

Similarity is enough when task regions are separable. The route is logged, the expert functions are readable, and there is no calibration set quietly training a gate.

The benchmark also makes its limit obvious: overlapping task regions would require uncertainty or abstention. Training-free does not mean assumption-free.

The Number

Static merging produces 1.399 mean absolute error across 240 noisy requests. Similarity routing produces 0.276 mean absolute error on the same separated-task benchmark, an 80.2% reduction.

The source paper is current research rather than settled consensus. The repository labels that status and keeps the claim scoped to its synthetic test.

I Stress-Tested The Easy Assumption Myself

The published scenario keeps task regions spaced far enough apart that nearest-prototype routing is correct 100% of the time, on every seed checked — not circular, since the error still depends on genuine label noise, but it never has to face real ambiguity about which expert to pick.

So I pushed the input jitter until prototype regions genuinely overlapped, dropping routing accuracy to about 77% — real, seed-varying confusion. The advantage held up: a mean 71% error reduction across 40 tuning seeds and a disjoint 30-seed holdout evaluated once, never falling below 61%. I also checked whether static merging was just a weak strawman by comparing against "always use one fixed expert" — it isn't; routing still beats even the single best fixed expert by a real margin. This wasn't a bug fix, just confirmation that the claim survives harder conditions than the one it shipped with.

Research Basis

Inspired by the 2026 TR-Merging submission. The portfolio number above comes from this repository's own controlled benchmark, not from the paper.

Tools Used

Python
Model Merging
Expert Routing
Mixture of Experts
Similarity Search
Robustness Testing
unittest