Skip to content

feat(eval): per-site faithfulness observability (rel/abs Frobenius) - #993

Open
claude-spd1 wants to merge 2 commits into
feature/jaxfrom
bridge/task-per-site-faith-observability
Open

feat(eval): per-site faithfulness observability (rel/abs Frobenius)#993
claude-spd1 wants to merge 2 commits into
feature/jaxfrom
bridge/task-per-site-faith-observability

Conversation

@claude-spd1

Copy link
Copy Markdown
Collaborator

Summary

Reopens #934 (closed unmerged in a bulk stale-PR sweep on 2026-07-24, no comments/review) rebased onto current feature/jax tip. Same content, no behavior changes from the original.

Per-site faithfulness observability: turns the opaque aggregate FaithfulnessLoss into per-site signal.

  • New param_decomp/per_site_faith_eval.py: make_per_site_faith_step(lm, co) → jitted (model, components) -> {site: ‖Δ_s‖²_F}, reusing model.weight_deltas — the SAME deltas the global FaithfulnessLoss reduces (Σ_s / Σ_s numel == FaithfulnessLoss, asserted in tests). ‖W_s‖²_F via the same step on a zeroed vu (Δ=W−0), cached once per run.
  • Wired into the LM in-loop eval (_make_lm_eval_fn). Always-on at eval cadence: logs eval/faith/rel_frob_top{1..8} (rank-indexed, stable line keys; top1==max), eval/faith/abs_frob_max, and eval/faith/rel_frob_bar_chart (rank-0, all-site, site-labeled — avoids a 224-key wandb explosion).
  • Tests (parity + rel-Frobenius sanity), make check clean.

Context

Follow-up from the investigation that found global per-element-MSE faith hid 4 sites carrying ~99% of unmasked KL. This PR is genuine weight-space observability but — per that investigation — does NOT by itself rank the behavioral culprits (worst rel-Frob sites were inert). It's a foundation; the actual culprit-ranking probe (a per-site delta-ablation/KL-sensitivity measure) is still pending a go/no-go from Oli — see bridge task #55 for that open decision.

Testing

ruff check/ruff format --check clean on the touched files. Could not execute the JAX test suite in this environment (no AVX support on this node — jaxlib refuses to load); relying on CI (the original #934 run was CI-green on the identical diff pre-rebase; this rebase only resolved a two-line merge conflict against _make_arithmetic_eval in run.py, no logic change).

Crew-Address: agent/6pmp

ocg-goodfire and others added 2 commits July 28, 2026 14:34
The global FaithfulnessLoss (Σ_s‖Δ_s‖²/Σ_s numel) hides catastrophically
broken small-norm sites (lore 2026-07-03--unmasked-kl-vs-faith-no-eval-bug-4-culprit-sites:
4 of 224 sites carried ~all of the 6.6 unmasked KL while faith sat at ~1e-8).

Add per_site_faith_eval.make_per_site_faith_step: a jitted (model, components) ->
{site: ‖Δ_s‖²_F} reusing model.weight_deltas — the SAME per-site deltas the global
FaithfulnessLoss reduces, so Σ_s/Σ_s numel == FaithfulnessLoss exactly. ‖W_s‖²_F (the
constant relative denominator) comes from the same step on a zeroed vu (Δ=W−0), cached
once in the LM eval_fn closure.

The LM in-loop eval logs, at eval cadence (always-on, cheap — one faith-loss-sized
materialization per eval, which already runs every train step):
- eval/faith/rel_frob_top{1..8} — 8 largest rel-Frobenius, RANK-indexed (stable line keys)
- eval/faith/abs_frob_max
- eval/faith/rel_frob_bar_chart — all-site, site-labeled (rank 0)

Observability only — relative Frobenius is per-site WEIGHT-space error, NOT behavioral
sensitivity (the culprit sites above were behaviorally inert on rel-Frobenius). The
KL-under-delta-ablation probe is the diagnostic that ranks behavioral sensitivity;
deferred pending a compute/design decision.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…transformer split)

llama_site_specs moved/renamed to glu_site_specs and mlp_family_site_cs moved to
targets.glu_transformer since this branch's original base — the test's imports were
stale after rebasing onto current feature/jax.

Crew-Address: agent/6pmp
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.

2 participants