Commit Graph
5 Commits
Author SHA1 Message Date
Joseph MaglyandClaude Opus 5.5 d1504faf88 feat(concepts): rank-k subspace and affine (LEACE / mean-centred) erasure (#335)
Remove whole per-layer subspaces in project, orthogonalize and lora
modes; add mean-centred orthogonal and LEACE erasure at inference time
and, where a native bias exists, as a permanent edit with recorded
reference provenance. k=1 zero-origin paths are unchanged. Adds the
Pain Axis Appendix D script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:07:11 -04:00
Joseph MaglyandClaude Opus 5.5 5f558a78db feat(concepts): apply #223 maintainer rulings on publication, leace and steering
Maintainer decisions for epic #223 (2026-10-15):

- Q1: `leace` is a deprecated alias of the Fisher LDA direction. It keeps
  its numerical behaviour, warns once per public resolution with a
  DeprecationWarning naming `fisher_lda` and `leace_exact`, and will be
  removed in a future minor release.
- Q4: a collateral FAIL blocks both the model card and any Hub push of
  modified weights or adapters on every path (pipeline, export_run, both
  CLIs, Concept Lab, the Hub UI and tourney uploads), checked before any
  network call. `--allow-collateral-fail REASON` (and the matching API
  argument and UI field) overrides the block and stamps the FAIL and
  reason into the card, checkpoint metadata and provenance. Local save
  and export are never blocked.
- Q5: research-tier packs no longer carry publication or local-export
  restrictions; the tier is provenance only and Q4 applies to every pack.
- Steering defaults are removal-first: `steer` defaults to alpha -1 and
  the default dose ladder is non-positive. Positive doses stay available
  explicitly; `project` keeps its positive removal strength.
- Q3 (gate modes) and Q7 (dense only, follow-up #310) are unchanged and
  documented.

Refs #223

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:37:51 -04:00
Joseph MaglyandClaude Opus 5.5 d531158d30 docs(concepts): add concept workflow and interpretation guide
docs/CONCEPT_WORKFLOW.md walks a concept from definition to export
(define, extract, validate, intervene, evaluate, repair, compare/export),
with offline CLI examples. Its interpretation guide covers what
validation, ablation and steering do and do not show: behavioural nulls
as first-class results, hidden KV-cache channels, steering fragility, and
why "direction removed" is not "experience removed". A responsible-use
section covers user-defined concepts.

Every literature claim is cited by arXiv id or DOI. The existing concept
docs link to the guide, and the README gains a short "Concept vectors
beyond refusal" section. A test runs the outcome-language lint over the
concept docs, resolves local links and anchors, checks that every
documented `obliteratus` command parses, and checks the required
citations.

Closes #235

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 23:50:49 -04:00
Joseph MaglyandClaude Opus 5.5 691c75129d fix(concepts): calibrate the validation gate against the refusal baseline
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>
2026-10-05 21:17:58 -04:00
Joseph MaglyandClaude Opus 5.5 13a20bc147 feat(concepts): add validation gate and report before intervention
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>
2026-10-05 20:06:19 -04:00