Skip to content

Add route_error state-metrics scenario (model-error routing) - #7

Merged
PowerMaxZ merged 1 commit into
mainfrom
state-metrics-route-error
Jul 14, 2026
Merged

Add route_error state-metrics scenario (model-error routing)#7
PowerMaxZ merged 1 commit into
mainfrom
state-metrics-route-error

Conversation

@PowerMaxZ

Copy link
Copy Markdown
Member

Scenario #3 — model-error routing

Implements David's modify the BPS model, not the log instruction. Generate ground truth with the correct case_type XOR routing, then continue the ongoing cases with a model whose routing is inverted, and ask whether the metric detects the deviation.

What's here

  • tools/generate_route_error.pycase_type-driven XOR chain (default 3 gateways) with structurally-distinct but timing-symmetric branches; correct routing (red→A, blue→B) baked in via branch_rules.
  • perturb.build_route_error_params — inverts red/blue routing on the first N gateways; level 0 = verbatim copy.
  • Wired as a simulator-driven param family (dispatch in _prepare_params_for_level), DatasetSpec synthetic_route_error, CLI --perturbation route_error.
  • 4 unit tests; full state_metrics suite green (91 passed).
  • Scenario docs synced to the final set (drop old XOR-redistribution / temporal-drift; Web application version #4 redesigned to compensating front/back branches).

Validation (Scope A, 5 runs, invert 0–3 gateways)

Metric c-index
state activity_case (pairing) 0.933 (top)
state activity_type 0.913
baseline ngd_n2 0.917 (blind at low levels)
baseline cycle_time / red / rtd 0.500 (exactly 0 every level)

The core SOTA timing-aggregation metrics are dead blind (timing-symmetric branches); the per-case pairing metric activity_case is the single top-ranked metric. Basic sim confirmed zero-crossover routing.

Caveat: ngd_n2 partially co-detects because real re-routing genuinely shifts activity composition — perfect ngd-blindness stays with the pure tag-swap oracles (case_route/label_swap).

Scenario #3 per David's 'modify the BPS model, not the log' instruction:
generate GT with the correct case_type routing, then continue the ongoing
cases with a model whose XOR routing is inverted, and detect the deviation.

- tools/generate_route_error.py: case_type-driven XOR chain with
  structurally-distinct but timing-symmetric branches (correct routing baked
  in via branch_rules).
- perturb.build_route_error_params: invert red/blue routing on the first N
  gateways (level 0 = verbatim copy).
- Wired as a simulator-driven param family (dispatch in
  _prepare_params_for_level), DatasetSpec synthetic_route_error, CLI choice.
- Unit tests for the builder.
- Docs (PAPER_SCENARIOS.md / EXPERIMENT_SCENARIOS.md) synced to David's
  final scenario set: drop old XOR-redistribution / temporal-drift, redesign
  #4 to compensating front/back branches.

Validated (Scope A, 5 runs, invert 0-3 gateways): timing baselines
(cycle_time/red/rtd) exactly blind; state activity_case top metric (0.933);
ngd_n2 co-detects (0.917) but ranks below and is blind at low levels.
@PowerMaxZ
PowerMaxZ merged commit cf7f082 into main Jul 14, 2026
2 checks passed
@PowerMaxZ
PowerMaxZ deleted the state-metrics-route-error branch July 14, 2026 14:45
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