The pain pack declares a battery, a follow-on battery and a steering
dose ladder for run_concept_evaluation_battery, but the hook did not
exist (TODO #230 in the baseline).
- run_concept_evaluation_battery resolves the pack's evaluation
references through the existing pinned fetch and hash checks and
refuses missing, unfetched or mismatched references before any model
work.
- Batteries run on the unmodified model. Packs may map battery fields
to registered scorers through an optional evaluation.scoring section;
without objective targets (as for pain) records are descriptive:
final-token projection, greedy completion digest, invalid-output and
refusal flags. No scoring code comes from the pack.
- Each declared coefficient runs through the existing temporary steering
dose ladder; after every dose the parameter/buffer digest, hook counts
and probe logits must match the pristine model, or the run stops.
- Results go to concept-evaluation.json with pack, reference, model and
direction identities; the baseline's three artifacts are unchanged.
`concepts baseline --evaluate` (and the Python API) opts in; without
it the baseline is byte-identical.
The pain pack's deferral notes are replaced, which updates its dataset
card hash; its pinned upstream references are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve ExtractionRecipe conflict with #329: keep collateral_margin and
steering_scale and validate both in __post_init__.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve ExtractionRecipe conflicts with #329/#330: keep
collateral_margin and extraction_layer, and keep the entry-point
special_token_policy pop before the extraction_layer pop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Add an optional BOS policy to pack entry points (schema 1.2), warn or
fail on EOS-as-BOS and policy mismatches, and persist resolved special
tokens through extraction, run and export provenance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace significance-only FAIL with a configurable non-inferiority
decision (default 3 points): PASS, FAIL, INCONCLUSIVE, UNDERPOWERED.
Plumb the margin through recipes, CLI, reports, cards, metadata and the
Q4 export gate, and add 'concepts rescore' for saved batteries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add scale=residual_norm|raw|vector to concept steering across the API,
CLI, recipes and run metadata, recording effective vector norms. The
default residual-norm path is unchanged. The Pain Axis resteer stage now
uses the concept API with identical arithmetic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Concept Pack can now declare how to locate and activate its latent
representation, as schema v1.1 (v1 packs and refusal are unchanged):
- `entry_point.messages`: a system message and prior turns wrapping each
prompt, rendered with the chat template (plain-text fallback recorded).
- `entry_point.prefill`: assistant prefill so readout can happen at an
assistant position.
- `entry_point.readout`: final_token, mean_pool, span:<name> (a marked
span in the template) or last_k:<k>.
- `entry_point.template`: `{variable}` rendering over prompt record fields.
- `entry_point.group_by`: grouped CV folds and held-out validation, so
related samples never straddle folds.
Record annotations (person, split, group) now survive pack loading and
selectors. Unknown recipe and entry-point keys are rejected instead of
silently ignored. The entry point is part of activation identity, direction
metadata and provenance, so changing it invalidates cached activations and
saved directions. Generated-state readout is documented as not yet
supported.
Fixes#311
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
Ship `pain` as a research-tier Concept Pack for the representational
direction reported in The Pain Axis (Tagliabue, Dung & Berg,
arXiv:2609.16247). No third-party sentences are committed. The manifest
references valen-research/Pain-axis at pinned commit 4d75cd90, with a
per-file SHA-256 for every positive, control, confound/neighbour, battery
and reference file. Data is fetched only by an explicit step, then cached
and verified; a mismatch fails closed.
Remote references gain a declarative, data-only JSON selector (path,
category filter, text field) applied after hash verification. Selectors are
bounded and strictly validated, with no code execution. This is an additive
schema change.
The recipe mirrors the replication spike (signed cosine 0.972 against the
published Qwen2.5-7B-Instruct vector): raw prompts, final-token readout
after " I feel:" with a mean-pool comparison, pooled controls, 50%
control-PC denoising, cv_auc layer selection, and a norm_ratio 0.6
intervention layer for steering. The first-party dataset card records
intended use, confounds (numbness and injury-without-pain wording), the
upstream MIT licence, citations and differences from the authors' grouped
CV. Caveat: the pack identifies a representational direction; it does not
measure or remove pain or any experience.
`obliteratus concepts baseline` fetches explicitly, extracts with the pack
recipe, runs the gate in report mode and writes validation.json plus
direction files. A test checks that no upstream sentence is committed.
Refs #232
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>
Concept Packs are data-only directories or byte-deterministic .cvpack zips:
manifest.yaml, positive.jsonl, controls/*.jsonl, and optional neighbours,
battery, baseline and reference files, plus a dataset card. Every file
carries a SHA-256 and an SPDX licence. A packaged JSON Schema and built-in
validation gate the schema_version major. Tiers: core (refusal only),
research, and user (namespaced user/<id>).
Loading treats packs as untrusted. It rejects hash mismatches, missing
licences, executable content, symlinks, hardlinks, special files, nested
archives, path traversal, duplicate and colliding names, unsafe YAML,
control characters in decoded text, oversized members and unknown major
versions.
A data file may instead be a pinned remote reference (https repository,
40-hex commit, path, sha256). It is fetched only by an explicit fetch step,
cached atomically and verified, and a mismatch fails closed; lint works
before fetch. URL import requires --sha256, and installs are exclusive.
The built-in refusal pack is generated from the built-in harmful and
harmless sets and equals the #224 refusal target. New CLI group: concepts
list | show | init | lint | pack | import | fetch. Ids resolve before paths,
and corrupt cache entries are skipped with a warning. DatasetSource gains an
optional licence field. No new runtime dependencies.
Closes#225
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>