Allow packs and the CLI to pin per-model extraction layers, recorded as
pinned or selected, and add grouped layer CV. The pain pack pins the
paper's layers for Qwen2.5-7B-Instruct, Gemma-2-2B-it and Gemma-2-9B-it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A calibration spike on Qwen2.5-1.5B-Instruct (842 prompts per class)
confirmed the AUC and percentile thresholds, but found four gate defects:
- Arbitrary SVD/eigen signs failed valid directions. Directions are now
oriented on training rows only, so the positive class projects higher.
Reference and neighbour cosines keep the sign of the supplied vector.
- Supplied vectors were validated by refitting the recipe, so random
vectors scored held-out AUC 0.99. A supplied vector is now scored as-is
on held-out folds, and recipe-refit CV AUC is reported separately.
- A suffix-only lexical confound scored AUC 1.0 and only warned. A seeded,
cross-validated text-only lexical baseline now flags lexical_confound
when wording alone is about as separable as the activation direction.
- The default is now 1000 norm-matched null draws, up from 20.
Power floors: fail below 16 per class, warn below 32. The refusal default
(off) is unchanged. The docs and the ADR-004 amendment record the
calibration.
Closes#256
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Any contrast set yields a direction, and separability can come from
wording. The gate (obliteratus/concepts/gate.py) checks a concept direction
on cached activations before any weight edit:
- in-sample and held-out k-fold AUC, refitting the full recipe per fold;
- percentile against N seeded, norm-matched random directions;
- semantic-control AUCs, and neighbour-concept cosine and AUC;
- a confound scan (discriminating tokens, masked AUC) comparing
final-token and mean-pool readouts;
- an optional reference-vector cosine.
It returns pass | warn | fail with reasons and writes validation.json,
including the effective thresholds and a fixed statement of what validation
does not establish (causal use, behavioural effect, anything about
experience). Thresholds come from the pack, falling back to the initial
defaults, and await calibration.
Modes: enforce (default for concept entry points) stops the run after
DISTILL and before EXCISE unless --override-gate "<reason>" is given, and
the reason is recorded. report never blocks. off records validation:
skipped. Legacy refusal runs, including concept="refusal", default to off;
report is opt-in, so existing runs are never blocked and pay no gate cost.
Non-gate validation errors are raised as PipelineFailure with cleanup.
New obliterate flags: --concept, --override-gate and --gate-mode. ADR-004
gains an amendment documenting the neighbour forward-pass budget and the
refusal default.
Closes#228
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>