Adds 'obliteratus identity-security', an opt-in research evaluation excluded from every default gate: identity-only paired prompts with commit-pinned generation settings, generated apps run only in a fail-closed, no-network Bubblewrap sandbox with resource limits, functional checks and executable exploits scored separately, and denominators, exclusions, intervals, Fisher/McNemar tests and Holm adjustment reported. Paired activation capture reuses capture_activations. Real-sandbox tests live in tests/conditional/; third-party results are documented as unverified claims. The weight-intervention arm is a follow-up.
Refs #427
Rebaselines the release suite and marker duration budgets to the slowest
measured hosted release time + 25% (run 45678651612; suite 3910 s on py3.11
and 5340 s on py3.12; cpu 2010, integration 700, unmarked 2460) and owns every
test whose time + 25% exceeds 15 s under #679 with a 90-day review (follow-up
#684). Speeds up test_smaller_change rank1 (geometry environments built lazily)
and the recipe-search fake edit step (a light helper module). The PR core gate
now enforces per-test budgets on each shard's JUnit with a new
--testcase-budgets-only mode; suite and marker totals stay release-only.
Refs #679
The pre-export refusal comparison judged harmless-refusal increases on
16 prompts against a 5% limit, so a single prompt changing (6.25%)
rejected edits that the 200-prompt verify-edit gates would judge. It
now rejects only when the paired Newcombe interval's lower bound
exceeds the limit (95% confidence by default), reports counts, rates
and bounds, and keeps the old point-estimate rule available as
refusal_check_mode: point. Both settings are v2 projection parameters,
normalized explicitly and recorded in resolution payloads and
checkpoint metadata. Also fixes the perplexity-weighting test, which
built a pipeline without the refusal sample attribute introduced in
46d6dc6 and failed in the full suite.
Fixes#587
qwen38_e01/e02/e03 were validated for Qwen/Qwen3.8-27B but ran on any
model. A single binding table now maps each preset to the pinned stock
identity. When run() would edit with a bound preset and the model
identity (explicit recipe_model_id/recipe_revision or a Hugging Face
snapshot path) is not the bound one, the edit is refused unless
allow_recipe_transfer is set, which records the transfer in metadata and
logs a warning. Construction and evaluation-only uses (checkpoint
evaluation) are unaffected. obliterate exposes the presets locally with
--allow-recipe-transfer; remote runs reject them. The campaign passes
its locked stock identity and sets transfer only for the small-model
rehearsal. The new options are appended to the constructor signature and
added to the refusal golden configs (tensors unchanged).
--recipe now labels a family recipe applied to a member with a passing
confirmation of the unchanged recipe confirmed-family-member instead of
family-application.
Fixes#542
On Llama-3.1-8B a basic all-layer edit raised refusal from 88.7% to 99.3%
and benign over-refusal by 84.5 points, and the built-in VERIFY did not
fail it; only the separate verify-edit did.
The stock baseline now measures refusal on a bounded deterministic
sample of the evaluation harmful and harmless prompts
(refusal_baseline_size, default 32; 0 disables). VERIFY measures the
edited model on the same sample with the same generation settings and
rejects the run with PipelineQualityRejectedError when either rate rises
by more than max_refusal_increase (default 0.05; None measures without
rejecting). A baseline skipped for admission or memory records its
reason and never rejects. Both options are appended to the constructor
signature, and the refusal golden configs gain them.
The beam-output qualification test now disables the gate, so it keeps
asserting its original scoring and post-verify probe behaviour; the
gate itself is covered by tests/test_refusal_increase_gate.py.
Refs #537
Resolve the refusal golden fixture: keep main's refusal_extraction_layer
config key (#538) and this branch's small_model_safeguards key and
recaptured E02/E03 tensors.
E03 is defined as E02 plus one variable (regularization); giving only E03
the flag broke that single-variable contract on stand-in models. E01, E02
and E03 now all set small_model_safeguards False. The constructor option
moves to the end of the signature so upstream positional callers keep
their bindings. The refusal golden config gains the resolved option for
every preset; E02/E03 subspace tensors are recaptured because the tiny
model no longer caps them to two directions (provenance in
tests/fixtures/refusal_golden.md).
The refusal golden test snapshots every scalar pipeline option, so the
new refusal_extraction_layer option (default None) joins the snapshot;
tensors and all other values are unchanged. The old contract that a
refusal run rejects extraction_layer is replaced by the new behaviour:
the override selects the global direction scope and leaves the concept
recipe untouched.
The refusal golden test snapshots every scalar pipeline option. The new
opt-in record_reference option (default False) belongs in that snapshot;
tensors and all other values are unchanged.
Add F21: architecture adapters that record tensor semantics and staged
support levels, MoE observation with explicit coverage, and transfer
dossiers compared against within-model baselines.
- Adapters record site meaning, block order, norm placement and module
roles (attention, MLP, router, routed and shared experts) and check
residual semantics on a real forward. Support is staged:
observation, then reversible intervention, then persistent editing.
Dense decoders support all three; sparse MoE decoders support
observation and residual intervention and refuse persistent editing.
- MoE observation reports per-expert routed tokens and rows with
intervals; experts below the coverage floor are insufficient coverage
with null effects, never no effect. Route and load changes, shared
expert contributions and routing restoration are measured.
- Transfer needs its own alignment-fit and test rows (refused on
overlap), the same row budget for a direction fitted directly on the
target, and must beat that baseline and random directions with
bootstrap intervals. Tested and untested conditions are listed;
experts listed as tested must be covered on the test rows; new
modalities need their own targets and scoring tasks.
- `obliteratus experiments transfer run` and `arch-profile`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Releases that read only 1.x manifests ignore the dataset declaration and
each row's role, so they extract from select, calibrate and locked test
rows. Gating dataset packs on a new major version makes those releases
reject the pack ("Unsupported schema_version") instead.
- Accept schema majors 1 and 2; 2.x keeps every 1.x field.
- manifest.dataset now requires schema_version 2.0+ (was 1.3+, never
released). 1.x packs without a dataset are unchanged.
- Compare versions as (major, minor) tuples. The selector gate in
pack.py compared only the minor number and would have rejected 2.0.
- Unknown-major tests now use 3.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lift the dense-only restriction for supported OLMoE, Qwen2-MoE and
Qwen3-MoE layouts: routing-aware extraction readout, per-expert
down-projection edits through the fused/ModuleList MoE paths, optional
router orthogonalization, expert gate checks, and routing-drift and
expert-load reports. Unsupported MoE layouts still fail closed.
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>
Preserve layer pins through informed selection and refinement, validate
pins against model depth, honour pins in concept extraction, record
pinning honestly in metadata, plumb --layers through self-improve and
remote runs, and keep positional API compatibility.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remote obliterate commands accept the folding opt-out, folded repair
candidates are validated after storage-dtype conversion, the refusal golden
fixtures record the new provenance key (numeric values unchanged), and the
risk map registers the shared post-norm module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-ups for the pain pack:
- The no-upstream-sentence guarantee now runs in CI without the pinned
checkout. A committed fingerprint fixture (SHA-256 only) covers
pain-specific upstream sentences of at least eight words: positives,
confounds/neighbours and the referenced batteries, but not generic neutral
controls. A repository-wide scan checks every tracked text file against it.
Manifest hashes are checked against the committed hash manifest of the
pinned commit.
- The pain pack loads lazily, so a broken pain pack warns and is excluded
while refusal and other packs stay usable.
- Selectors type-check their fields and fail closed with PackError.
- concepts baseline gains --cache-dir.
The GPU-lane baselines (RTX 4090, bf16, seed 232) are recorded under
.aiwg/testing/baselines/pain/ and summarised in the dataset card:
- Qwen2.5-7B-Instruct: CV layer 24, held-out AUC 0.980, cosine 0.9998 to
the authors' S2 vector at L24;
- Qwen3-8B-Base: CV layer 34, held-out AUC 0.994, cosine 0.9001 at L34.
Both verdicts are warn, because each upstream control set has 20 prompts.
These are representational baselines only, with no behavioural claim.
Closes#232
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>
Introduce obliteratus.concepts: ConceptTarget, ExtractionRecipe,
ConceptDirection (safetensors persistence plus a JSON sidecar; no pickle)
and an offline ConceptRegistry with refusal as the built-in core concept.
AbliterationPipeline gains concept= (a name, or a ConceptTarget, deep-copied)
and concept_registry=. concept=None and concept="refusal" build the refusal
target exactly as before: same prompt pairing, truncation and METHODS
resolution. Internal storage uses neutral concept_directions /
concept_subspaces names, with refusal_* aliases kept for every caller.
Metadata keeps the refusal technique and adds a concept block that records
the seed.
Non-refusal concepts reject refusal-only options (jailbreak contrast,
refusal-head and safety-expert identification, inversion), reject preset
extraction settings that conflict with the concept recipe after resolution,
and are dense-only for now; MoE refusal behaviour is unchanged.
A golden test checks that default and concept="refusal" runs match exactly
(config and direction tensors) for every CPU-runnable METHODS key on the
tiny offline fixture, and that both match a baseline captured from the base
commit (provenance in tests/fixtures/refusal_golden.md).
Refs #224
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0106e6ca601399048b0232b64bb15015bb92db4f)
Adapted for upstream: dropped docs/qualification/pristine-qwen-95/README.md and docs/qualification/pristine-qwen-95/inference-reconciliation.json (internal qualification README/receipts; the README conflicts with upstream where docs/qualification/ does not exist). Kept the qwen3_5 text-layer fallback in obliteratus/strategies/utils.py, the tests/fixtures/qwen38/config.json fixture (verified: no hostnames, paths, or URLs), and the regression test.
transformers 5 stores routed experts as fused 3D parameters
(experts.gate_up_proj / experts.down_proj) for Mixtral, Qwen3-MoE,
DeepSeek-V3, GLM-4 MoE, Llama 4, gpt-oss and OLMoE. When such a layer is
CPU- or disk-offloaded by Accelerate, EXCISE failed closed with
"offloaded fused expert tensors are not yet a supported surgery layout",
so every frontier MoE checkpoint large enough to need offload could not be
abliterated at all.
Route the three fused projections and the fused bias projection through the
existing LogicalParameterTransaction adapter: a meta-resident fused
parameter is resolved to a private copy of its authoritative backing value,
projected per expert, and committed atomically; the live parameter stays on
meta and quantized or unknown backing layouts still fail before mutation.
Thread offload_roots through the MoE dispatch call sites so parent-prefixed
Accelerate hooks resolve, and drop the preflight rejection of 3D meta
parameters (validate_offloaded_parameters already resolves them).
Tests: fused 3D, bias, granular and selective-inversion projections on
offloaded backing stores, bounded norm restoration, parent-prefixed hook
resolution, quantized fail-closed, commit-failure rollback, and a full
offline pipeline run on a disk-offloaded tiny Mixtral fixture that verifies
the saved checkpoint carries the updated experts with no meta tensors.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>