Skip to content

Auto-route recognition probes via a route-classification probe - #22

Merged
jdonaldson merged 1 commit into
mainfrom
auto-route-probe
Jun 27, 2026
Merged

Auto-route recognition probes via a route-classification probe#22
jdonaldson merged 1 commit into
mainfrom
auto-route-probe

Conversation

@jdonaldson

Copy link
Copy Markdown
Owner

Probe selection is now automatic — no manual use_probe/dropdown.

Why: symbolic solvers self-route by structural parse, but the 7 recognition-probe tasks all look like "MultipleChoice" and differ only in semantic content, so they needed an explicit task name.

What: a route-classification probe (last-token hidden-state classifier over the probe tasks). Its max-softmax confidence is the coverage gate — route only when confident, else fall through to pmi_floor. Extends commitment = coverage from the symbolic solvers to the probes.

  • route.py: RouteProbe (pure-numpy, serialized like other components) + calibrate_route_probe
  • ModelProfile.router slot; bundled into both fp16/fp32 profiles
  • _solve_choice auto-routes when no explicit probe is set (transient, can't leak)
  • DispatchTurnstyle.calibrate_router(); loads router on init
  • demo: snarks/movie examples now AUTO (showcase auto-detection); dropdown is an override (also folds in demo: friendly recognition-probe dropdown labels #21's friendly labels)

Validation: router 100% 7-way CV @l10; held-out probe prompts auto-route 90% / 86% correct (rest abstain at τ=0.9, never misroute); symbolic tasks never misroute; native BBH unchanged at 92.5%; 692 tests pass.

Supersedes #21 (friendly labels folded in here).

…manual select

Symbolic solvers self-route by structural parse; the recognition probes couldn't,
because all 7 probe tasks look like "MultipleChoice" and differ only in semantic
content — so probe selection was a manual use_probe(task) / demo dropdown.

Add a route-classification probe: a last-token hidden-state classifier over the
probe tasks whose max-softmax confidence is the COVERAGE GATE — route only when
confident, else fall through to pmi_floor. This extends commitment=coverage from
the symbolic solvers (gate on parse coverage) to the probes (gate on router
confidence).

- route.py: RouteProbe (pure-numpy inference, serialized like other components) +
  calibrate_route_probe (layer sweep, picks best by CV).
- ModelProfile.router slot (get/set/merge/persist); bundled into both fp16 + fp32
  profiles.
- dispatch: Ctx.router/route_lookup; _solve_choice auto-routes when no explicit
  probe is set (transient — cleared after, can't leak to the next prompt).
- DispatchTurnstyle: loads the router on init; calibrate_router().
- demo: snarks/movie examples now use AUTO (showcasing auto-detection); the
  dropdown is an override. (Also folds in the friendly-label dropdown from #21.)

Validation: router 100% 7-way CV @l10; held-out probe prompts auto-route 90% /
86% correct (the rest abstain to pmi_floor at τ=0.9, never misroute); symbolic
tasks (arithmetic/date/ordering/table_query/boolean) never misroute. Native BBH
unchanged at 92.5% (router doesn't engage where use_probe is explicit). 692 tests
pass.
@jdonaldson
jdonaldson merged commit 446a5d5 into main Jun 27, 2026
@jdonaldson
jdonaldson deleted the auto-route-probe branch June 27, 2026 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant