a5: explain generalisation mechanism in caption + ≡0 marker on zero bars

Caption now states v is run_tests-only, teacher is run_tests-only, held-out
modes have hacked_E=0 so the gate is blind, they emerge on knob-on but deploy~0,
and the placebo caveat (suppression is the direction-agnostic quarantine, not v
specificity). Bar plot tags invisible zero-height bars with ≡0.

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
wassname
2026-06-05 02:46:57 +00:00
parent aa6bf57a73
commit 5f478f4bd0
2 changed files with 19 additions and 9 deletions
+7 -3
View File
@@ -79,9 +79,13 @@ def _panel(ax, by_arm, modes, arms, field, title, ylabel):
bars = ax.bar(x + i * w, means, w, label=f"{label} (n={n_seed})", color=color,
yerr=yerr, capsize=2, error_kw=dict(lw=0.8, alpha=0.8))
for b, v in zip(bars, means):
if not np.isnan(v):
ax.annotate(f"{v:.2f}", (b.get_x() + b.get_width() / 2, v), fontsize=6,
ha="center", va="bottom", color=color)
if np.isnan(v):
continue
# a zero-height bar is invisible -- mark it "≡0" so the reader sees a
# finding, not a missing bar (same convention as the line plots).
txt = "≡0" if v < 5e-3 else f"{v:.2f}"
ax.annotate(txt, (b.get_x() + b.get_width() / 2, v), fontsize=6,
ha="center", va="bottom", color=color)
ax.set_xticks(x + 0.4 - w / 2)
ax.set_xticklabels([f"{m}\n{'IN' if m == 'run_tests' else 'held-out'}" for m in modes], fontsize=8)
ax.set_title(title, fontsize=10)