Commit Graph
1174 Commits
Author SHA1 Message Date
Joseph MaglyandClaude Opus 5.5 77d788b22c feat(experiments): confirmation and maturation registry
Add the confirmation registry (F15): freeze what decides a confirmation
before its results are unlocked, track exposure of confirmation data,
and compute maturity from referenced evidence.

- Append-only registry under <run>/registry with a schema file as
  authority. A registration freezes, by digest, the dossier binding,
  the full intervention spec, scorers, threshold, direction, margins,
  decision dose, target task, seeds and the confirmation row set (text
  digests only). Edited registrations fail their id; changes need an
  amendment, counted as a new comparison.
- Unlocking requires a matching frozen registration: the result must
  come from the frozen spec after registration, on the frozen rows, with
  an unchanged dossier, and its verdict is recomputed from its records.
- Every evaluation and unlock is logged as an exposure. Exposed rows are
  refused as inputs to discovery, example selection and causal maps,
  and for any later confirmation of any target. Runs without a registry
  are unchanged; an optional registry_dir covers outputs outside the
  run.
- Replications must reuse the recipe with different seeds and disjoint
  rows. Non-supported verdicts are negative entries that mark the target
  for re-investigation and require fresh data.
- Maturity per (target, method, model revision, task, backend) is
  computed: hypothesis, candidate, causal, replicated, persistent-pilot
  eligible (which also needs a current dossier). Fixture results never
  count by default; claims above the computed level are refused.
- The pain pack's declared protocol registers as the first candidate
  after reference and prompt-digest verification; with no answer keys it
  stays at hypothesis, marked descriptive only.
- `obliteratus experiments registry register|unlock|replicate|status`,
  a Python API and an Explorer section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 22:15:04 -05:00
Joseph Magly d00bf7c5f9 Merge pull request #471 from elder-plinius/feat/f13-causal-map
Causal targeting map with Holm-corrected cells
2026-11-15 21:08:17 -05:00
Joseph MaglyandClaude Opus 5.5 4a6938e63a fix(experiments): attach causal-map cells only through the map's correction
A map runs one controlled intervention per row, and each row result was
attachable on its own with `intervene attach`, which would let a single
cell be picked from the grid without the map's Holm correction.

- Map rows set an optional `family` (kind causal_map, map digest) in
  their intervention spec; the runner copies it into the result.
- `attach_result` refuses a result carrying a family unless the caller
  supplies the map reference, cell and Holm-adjusted p; `map attach`
  does. The family is stored in the dossier entry.
- Every assessment re-reads the map, checks its digest, and confirms the
  cell is still supported with the recorded adjusted p; an edited or
  missing family makes the attachment invalid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 20:43:18 -05:00
Joseph MaglyandClaude Opus 5.5 9c82617ca3 Merge main into feat/f13-causal-map
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 20:40:01 -05:00
Joseph Magly 755bd38115 Merge pull request #470 from elder-plinius/feat/intervention-directions
Controlled interventions on direction and subspace estimates
2026-11-15 20:36:07 -05:00
Joseph MaglyandClaude Opus 5.5 7d5dee7630 feat(experiments): causal targeting map across token scopes and doses
Add the causal targeting map (F13): measure a dossier estimate's
controlled-intervention effects across a declared grid and show benefit,
side effects, uncertainty and restoration together.

- Versioned map spec (sites x token scopes x doses, operation, decision
  dose, cell budget). Each (site, token scope) row runs through the
  existing harness with the grid's doses as its ladder, so every cell
  has its own matched control, restoration check and replay. Results are
  stored by path and sha256 and cells are rebuilt (and verdicts
  recomputed) on every read.
- Only the estimate's own site runs; other sites are recorded as
  untested "exploratory (transferred coordinate)" cells that can never
  attach to a dossier.
- Holm correction across tested decision-dose cells. A cell reads
  supported only when the recomputed harness verdict is supported and
  its adjusted p < 0.05; other doses are descriptive; untested cells
  carry a reason and no number.
- Cells report difference, interval, rates, collateral and invalid-output
  status, restoration, a link to the comparison and failure example ids.
- Resumable: completed rows are reused only on matching row and result
  digests; a different spec is refused.
- Candidate re-ranking across a dossier's maps, scoped to tested
  conditions; an Explorer heatmap per token scope.
- `obliteratus experiments map run|show|attach|rank` and a Python API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 20:28:28 -05:00
Joseph MaglyandClaude Opus 5.5 5f0eafe14b feat(experiments): controlled interventions on direction and subspace estimates
Extend the controlled intervention harness beyond single channels.

- Fixed directions (rows of the pack's stored basis) and rank-k
  subspaces load from their direction artifact before the model does.
  The artifact must match the file, tensor and metadata digests that the
  dossier's source report recorded; discovery and subspace reports now
  record that binding, and reports without it are refused. Refitted
  difference-of-means directions stay refused.
- Subspace ablation removes the dose fraction of the projection onto the
  whole span. Steering a rank > 1 span needs one declared direction
  inside it (within 1e-4).
- Random controls are rank- and norm-matched: a seeded rank-k span
  orthogonal to the target span, and for a declared steering direction a
  rank-1 vector orthogonal to the whole span. Mismatched controls are
  refused before the arms run and at attachment.
- Each arm records target kind, rank, digests and orthogonalization.
  Evaluation rows on the artifact's own fit role and revision are
  refused. Channel specs and digests are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 20:26:07 -05:00
Joseph Magly 3a693ffa8a Merge pull request #467 from elder-plinius/feat/f12-intervention-harness
Controlled intervention harness with matched controls and restoration checks
2026-11-15 19:27:06 -05:00
Joseph MaglyandClaude Opus 5.5 878796adb2 feat(experiments): controlled intervention harness with matched controls and restoration checks
Start milestone 3 (F12): run a temporary intervention on a ready
dossier estimate and record the result as the only route to a
"controlled intervention result" label.

- Versioned intervention spec (own schema; baseline observation specs
  unchanged) for steering or ablating a channel estimate at its site
  through the existing hook manager. Four arms on the same examples:
  baseline, intended, a seeded norm- and rank-matched random control
  orthogonal to the target, and a fresh-baseline replay that must
  reproduce the baseline exactly. Each arm records site, module, hook,
  token scope, units, dose and ordering.
- Dose ladders with paired scorecards against the baseline. The deciding
  dose and target task must equal the values pre-registered in the
  dossier hypothesis, alongside its effect threshold, direction and
  collateral margin.
- Restoration (parameter/buffer digest, hook counts, probe logits) is
  checked after every arm through a helper shared with pack evaluation.
  Exceptions and cancellation remove hooks and leave a recorded attempt.
- Refused before any forward pass: stale or unready dossiers, geometry
  mismatches (site, width, model, dtype, fingerprint, tokenizer,
  readout, device), evaluation rows overlapping discovery inputs, and
  evaluation on the dossier's confirmation rows.
- A minimal last-token activation-patching experiment with an explicit
  corruption strategy and logit-difference metric (descriptive only).
- Dossiers attach results by reference and recompute the verdict from
  per-example records on every assessment. The label is granted only if
  the intended arm beats the control by the threshold (one-sided exact
  McNemar), collateral endpoints pass and restoration held. Fixture or
  local models are software-contract results that never upgrade a label
  by default.
- `obliteratus experiments intervene` and a Python API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 18:09:42 -05:00
Joseph Magly 85e492d11b Merge pull request #440 from regents-ai/fix/lm-eval-metric-selection
fix(lm-eval): never score document counts; keep missing results unavailable
2026-11-15 17:56:39 -05:00
Joseph Magly 1e962859e2 Merge branch 'main' into fix/lm-eval-metric-selection 2026-11-15 17:53:12 -05:00
Joseph Magly a1fd42a0fe Merge pull request #465 from elder-plinius/feat/f11-target-dossiers
Target dossiers with evidence provenance and experiment readiness
2026-11-15 15:23:54 -05:00
Joseph MaglyandClaude Opus 5.5 c94ce6dfd1 feat(analysis): target dossiers with evidence provenance and experiment readiness
Add versioned target dossiers (F11), the readiness gate between target
discovery and controlled causal experiments.

- Schema-validated JSON separating the hypothesis (intended behavior,
  bounded task, falsification test) from one or more estimates
  (channel, residual direction or subspace at a site). Evidence is
  stored by reference (path, sha256, JSON pointer into the source
  report), never as copied numbers. Provenance covers the pack, dataset
  revision, model identity with weight fingerprint, labeled sets and
  report digests; confounds, coverage, counterexamples, rejected
  alternatives and open questions are recorded.
- Evidence labels follow the roadmap vocabulary, defined once in
  evidence_levels.py. "Independently validated predictor" requires
  independent confirmation beating the shuffled-label null; claims may
  not exceed the computed label, and causal or intervention labels are
  refused without an intervention result.
- Confirmation must be independent: overlapping roles of one revision,
  legacy packs, another model, or a new revision reusing discovery
  inputs are refused.
- Readiness is computed with a checklist of what is missing; accepted
  confounds stay visible with their reasons. Missing geometry research
  never blocks.
- Changed or missing sources, a different weight fingerprint or model
  revision, or a different dataset revision mark a dossier stale and
  its evidence unsupported.
- `obliteratus experiments dossier build|show|check` and a Python API;
  the Explorer shows each dossier with its readiness checklist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:01:45 -05:00
Joseph Magly ce9d379c13 Merge pull request #463 from elder-plinius/feat/460-example-selection
Example selection study against random and lexical baselines
2026-11-15 11:48:44 -05:00
Joseph MaglyandClaude Opus 5.5 9c6ef0acc6 Merge main into feat/460-example-selection
Resolve additive conflicts with #462 in experiments/cli.py (register and
dispatch both discover and select-examples) and ci/test-risk-map.json
(list both docs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 11:44:41 -05:00
Joseph Magly 5d80b97206 Merge pull request #462 from elder-plinius/feat/459-candidate-discovery
Dataset-level candidate discovery with confound and null baselines
2026-11-15 11:39:30 -05:00
Joseph MaglyandClaude Opus 5.5 bb9dff57e5 feat(analysis): example selection study against random and lexical baselines
Add optimization study O02: does choosing fewer, better examples
preserve targeting quality at lower cost?

- Arms at matched budgets over fit rows only: uniform stratified
  sampling (exact inclusion probabilities), lexical max-min diversity
  on hashed n-grams (no text kept), and representation arms (k-means
  representatives, k-center coreset, boundary hard negatives fitted on
  a disjoint half).
- Quality is held-out: a difference-of-means direction fitted on the
  selection is scored on select rows or a fixed group-disjoint holdout
  no arm sees. In-sample AUC is reported as optimistic and never used.
- Cost counts forward passes and activation bytes (representation arms
  pay for embedding the pool unless amortization is declared); host
  timings are reported but excluded from the verdict and digest.
- Coverage limits (every set, rare sets) flag arms that drop cases.
- The verdict is "no improvement" unless a representation arm beats
  both baselines beyond seed spread at equal or lower cost without a
  coverage flag. Locked test is refused; reports are reproducible.
- `obliteratus experiments select-examples` and a Python API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 11:06:17 -05:00
Joseph MaglyandClaude Opus 5.5 477eb753c8 feat(analysis): dataset-level candidate discovery with confound and null baselines
Extend candidate scanning from two prompts to distributions over a
labeled activation set (F07).

- Candidates with explicit coordinate identities: individual channels
  at a site and residual directions (a difference-of-means refit and
  the pack's stored basis rows). Binary (positive vs controls) or
  per-set contrasts.
- Measures reported separately, never combined: held-out AUC and
  balanced accuracy over group-disjoint folds, standardized mean
  difference, group-bootstrap intervals and fold stability. Everything
  fitted is refitted per training fold; recipe_top1 reports the honest
  held-out score of each fold's own top channel. Independent validation
  uses select rows; in-sample and basis-overlap scores are labelled.
- Nulls: a group-level shuffled-label null rerunning the full recipe
  (max over channels for channels) and random-direction/channel nulls,
  each with the observed quantile.
- Confounds: token-count and hashed-token lexical baselines plus length
  correlation, flagged beside each candidate; features are built in
  memory and no text is stored.
- Locked test is refused for discovery and excluded from acknowledged
  sets. Caps bound channels, bootstraps and permutations.
- `obliteratus experiments discover` and a Python API write versioned
  candidate tables; the Explorer lists them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 11:05:30 -05:00
Joseph Magly 30566c07c1 Merge pull request #461 from elder-plinius/feat/458-labeled-subspace
Labeled activation sets and model-level subspace validation
2026-11-15 11:04:51 -05:00
Joseph MaglyandClaude Opus 5.5 ca94280c9b feat(analysis): labeled activation sets and model-level subspace validation
Connect the full-subspace report to real captured activations (F08b)
and add the labeled-activation foundation that candidate discovery and
example selection build on.

- Labeled sets: capture a pack's positive, control, neighbour and
  optional battery sets for declared dataset roles. Labels (set, kind,
  role, group, family, record id, input digest) live in a sidecar whose
  digest, the capture identity and the dataset revision are bound in a
  labeled-set manifest; prompt text is never stored. Locked test needs
  explicit acknowledgement. Legacy packs are fit-only, bound to the pack
  bytes.
- Loader: recomputes rows and capture identity and refuses any
  mismatch, naming the field. Selection helpers pick rows by role, set
  and kind, and build deterministic group-disjoint folds. A capture that
  failed or was cancelled is replaced on retry; complete sets never are.
- Subspace report on a labeled set with the pack's extracted rank-k
  basis; groups come from dataset independence units, and the
  basis-fit overlap is read from the basis's dataset access receipt.
- `obliteratus experiments subspace` and a Python API write versioned
  reports next to the run; the Explorer lists them as a descriptive
  table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:46:05 -05:00
Joseph Magly 293384fa0f Merge pull request #456 from elder-plinius/feat/f06-evidence-explorer
Evidence explorer from failing scores to activations and replayable specs
2026-11-13 21:16:57 -05:00
Joseph Magly e4bf0f7dca Merge pull request #457 from elder-plinius/feat/pain-evaluation
Run a pack's declared evaluation battery and dose ladder
2026-11-13 21:13:03 -05:00
Joseph MaglyandClaude Opus 5.5 4fb564b800 feat(concepts): run a pack's declared evaluation battery and dose ladder
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>
2026-11-13 17:28:12 -05:00
Joseph MaglyandClaude Opus 5.5 4ac544d9bf feat(ui): evidence explorer from failing scores to activations and replayable specs
Add an Explorer sub-tab under Concept Lab (F06) that reads a finished
observation run without loading a model. Pure handlers (no Gradio
import) cover loading, scorecards, filters, example records, text,
activations, saved views, export and comparison; the layout only wires
them.

- Start from the scorecard; every aggregate and group drills down to
  exactly the examples it counts. Filter by outcome (failed, excluded,
  abstained, invalid), task, group and evidence status.
- Drill into an example's record and its captured activations as a
  per-site table and an HTML heatmap, labelled descriptive. Anything not
  measured reads "unavailable: <reason>"; a measured zero reads 0.
- Text is hidden by default, verified against the recorded digest when
  shown, and refused for locked test data and on public deployments
  (Hugging Face Space or a share link, which now sets a flag at launch).
- Saved views are versioned JSON next to the run, validated on load.
- Export writes the run's exact spec (same run identity, checked) with
  the view in a sidecar, and shows the matching CLI command.
- The runner now records the ordered example ids in the capture summary
  so activations map to examples without reconstructing the order;
  older results fall back to the runner's order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 17:26:14 -05:00
Joseph Magly 4c3bbdc906 Merge pull request #452 from elder-plinius/feat/obs-ui
Observations tab with CLI parity
2026-11-13 17:02:45 -05:00
Joseph MaglyandClaude Opus 5.5 ca5a6d0dc0 Merge main into feat/obs-ui and add execution options to the form
Bring in chat templates, sampling, batching, CUDA and the weight
fingerprint (#451, #453), and give the Observations form controls for
them: device, decoding strategy with temperature/top-p/top-k, batch
size, chat template with an optional system message, and fingerprint
mode. Options at their defaults stay out of the spec JSON, so a
default form leaves the run identity unchanged; greedy decoding never
carries sampling settings; and a system message without the chat
template is refused. The schema still validates everything through the
same load_spec path as the CLI.

Resolve the OBSERVATION_RUNS.md conflict by keeping the updated limits
and the tab section, now listing the execution options.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:58:05 -05:00
Joseph Magly 3e9666284d Merge pull request #453 from elder-plinius/feat/obs-execution
Chat templates, seeded sampling, batching and CUDA observation
2026-11-13 16:51:25 -05:00
Joseph MaglyandClaude Opus 5.5 a559c7fd6c Merge main into feat/obs-execution and unify device-aware model identity
Integrate the weight fingerprint from #451 with CUDA execution:

- model_identity is now device-aware (require_dense_device) and always
  includes the weight fingerprint, so CUDA runs carry it too;
  execution_identity simply delegates. The fingerprint is
  device-independent: the same weights give the same digest on CPU and
  CUDA.
- New optional spec setting model.fingerprint ("sampled" default,
  "full"), dropped from the filled spec at its default so existing
  digests are unchanged. It applies to the run's model identity and
  therefore every step's reuse check; capture manifests keep a sampled
  fingerprint.
- Resolve additive conflicts in capture_identity.py, inputs.py, the risk
  map and OBSERVATION_RUNS.md by keeping both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:47:38 -05:00
Joseph Magly a8cf648d58 Merge pull request #451 from elder-plinius/feat/obs-identity-lifecycle
Weight fingerprint, capture retention and attempt pruning
2026-11-13 16:42:24 -05:00
Joseph MaglyandClaude Opus 5.5 1cb2a7356b test(experiments): assert fingerprint work instead of recording junit properties
record_property warns under the xunit2 junit family CI uses, and the
suite treats warnings as errors. Assert that sampled mode hashes far
fewer elements than full mode, which hashes every element.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:38:55 -05:00
Joseph MaglyandClaude Opus 5.5 2539cdb2b7 feat(experiments): chat templates, seeded sampling, batching and CUDA observation
Remove the observation runner's execution limits.

- Chat templates: an optional prompt section renders each prompt
  through the tokenizer's chat template (optional system message,
  generation prompt), tokenized without extra special tokens. The
  rendered-prompt digest joins the generation step identity and each
  record; capture uses the same rendered prompts.
- Decoding: seeded sampling (temperature, top-p, top-k) alongside
  greedy, with a per-example seed derived from the spec seed and example
  id. Comparison treats sampled outcomes as exact only when strategy,
  device, dtype and seed match, and says why otherwise.
- Batching: optional left-padded greedy batches with an explicit,
  recorded pad token; rows are cut at their first eos so batched and
  unbatched outcomes agree. Sampling with batches is refused because
  per-example seeds cannot hold.
- Devices: dense CUDA for the runner and capture, with shards written
  from CPU copies and device/dtype recorded. Quantized, offloaded,
  dispatched, meta, split-device and MPS models are refused with
  explicit reasons.

The schema stays additive within version 1; options at their defaults
are dropped from the filled spec, so existing spec digests are
unchanged (pinned in tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:33:51 -05:00
Joseph MaglyandClaude Opus 5.5 c1cbf94fae feat(ui): Observations tab with CLI parity
Add an Observations sub-tab under Concept Lab for baseline observation
runs. Handlers live in ui_observation_runs.py with no Gradio import;
the layout only reformats their output. Every action calls the same
functions as `obliteratus experiments run|compare|history`: the editor
text is validated through load_spec, runs go through run_observation,
and history, scorecards and comparisons read the same store.

The JSON editor is what runs; the form overwrites only its own fields,
so new spec fields pass through unchanged. Locked test is offered only
after explicit acknowledgement, scorecard views show no prompt or
completion text, and Cancel (or closing the stream) cancels the attempt
cooperatively. Runs take the app's exclusive model-operation claim, so
they cannot overlap other model jobs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:32:03 -05:00
Joseph MaglyandClaude Opus 5.5 434e4a7235 feat(experiments): weight fingerprint, capture retention and attempt pruning
Weights edited in place under the same model id and revision were not
detected, expired captures still loaded, and run stores could not be
pruned because reused steps reference earlier attempts.

- Fingerprint: a deterministic fingerprint of every parameter and
  buffer (names, shapes, dtypes and a fixed strided sample of each
  tensor, with an optional full digest) joins the capture identity and
  the runner's model identity. Captures and steps from before the
  fingerprint are refused or recomputed with a recorded reason. The
  pipeline's entry-point cache identity is unchanged.
- Retention: load_capture refuses captures past expires_at unless
  inspection is requested; comparison inspects stored captures
  regardless of expiry.
- Pruning: `obliteratus experiments prune` (dry run by default) keeps
  the latest complete attempt, the newest N, active attempts and every
  attempt a kept one reuses, records a pruned event before deleting,
  and finishes interrupted removals on the next applied prune.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:28:26 -05:00
Joseph Magly d311c9433c Merge pull request #447 from elder-plinius/feat/f05-observation-runner
Baseline observation runner with resumable run records
2026-11-13 15:34:43 -05:00
Joseph Magly 0ab3b5fb9e Merge pull request #446 from elder-plinius/fix/443-geometry-audit-2
Exact Gaussian W2 and honest labels for transfer and projection search
2026-11-13 15:30:15 -05:00
Joseph MaglyandClaude Opus 5.5 29eab4ac37 feat(experiments): baseline observation runner with resumable run records
Add a shared observation spec, runner, run store and comparison so one
baseline observation can be specified once, run from the CLI or Python,
resumed after interruption and compared across runs.

- Spec: versioned JSON with a single schema file as authority. It
  references a pack, dataset revision and role (locked test only with
  acknowledgement), model id/revision/dtype, greedy decoding, registered
  scorer tasks, optional activation capture and profiling, and a seed.
  The canonical digest of the defaulted spec is the run identity.
- Runner: baseline only. It refuses models with forward/backward hooks,
  global module hooks, an interrupted-surgery marker or active adapters
  before any generation, then scores generation per task (single-arm,
  descriptive scorecards with Wilson intervals) and optionally captures
  activations and profile counters.
- Store: one directory per run identity, append-only attempt events,
  pending/running/complete/failed/cancelled transitions under a lock.
  Abandoned attempts are recorded as failed. A new attempt reuses a step
  only when it is complete, identity-matched and its files still verify.
- Compare: exact equality for identities, counts and per-example
  outcomes; explicit tolerances for rates and activations, reported per
  field.
- CLI: `obliteratus experiments run|compare|history`, sharing one
  Python code path a UI can call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:26:40 -05:00
Joseph MaglyandClaude Opus 5.5 6aaeb813d7 fix(analysis): exact Gaussian W2 and honest labels for transfer and projection search
Finish the measurement-validity audit for the two remaining geometry
modules.

wasserstein_transfer:
- The Gaussian W2 paired sorted eigenvalues and underestimated the
  distance for non-commuting covariances (0 for a 45-degree rotation of
  diag(100, 1)). Compute the exact closed form with a stable PSD square
  root, from each side's own mean and covariance.
- Mismatched widths gave a truncated value and failures gave 0; both are
  now None with a reason. Failed map inversion no longer falls back to
  the raw cross-covariance. Fidelity is exact Pearson correlation.
- The "transport map" is a ridge least-squares map, not a Gaussian Monge
  map. Viability, fidelity and recommendations are labelled heuristics
  and are None unless their inputs exist; refusal-removal estimates that
  measured nothing are unsupported and always None.

bayesian_kernel_projection:
- Relabel as seeded random search with local perturbation over a
  partial linear projection (no surrogate or kernel). The Pareto front
  could keep a dominated trial on reduction ties; fixed. With no signal
  or no input, best results are None with a reason instead of score 0.

Both modules now carry measurement evidence and catalog rows checked by
the registry test, and the app overview no longer claims a Monge map or
TPE optimization.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:22:50 -05:00
Joseph Magly 99040d510f Merge pull request #444 from elder-plinius/fix/435-geometry-audit
Label geometry measurements and null unsupported values
2026-11-13 11:26:05 -05:00
Joseph MaglyandClaude Opus 5.5 e70674fcb2 Merge main into fix/435-geometry-audit
Resolve additive conflicts with #442 in ci/test-risk-map.json and
docs/geometry-measurement-validity.md by keeping both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 11:21:08 -05:00
Joseph Magly bf7b59a786 Merge pull request #442 from elder-plinius/feat/436-subspace-report
Full-subspace spectrum and stability report
2026-11-13 11:17:19 -05:00
Joseph Magly a127dea318 Merge pull request #441 from elder-plinius/feat/437-profile-counters
Fill baseline profile work counters
2026-11-13 11:12:39 -05:00
Joseph MaglyandClaude Opus 5.5 40744bac67 fix(analysis): label geometry measurements and null unsupported values
Extend the measurement-validity treatment from riemannian_manifold.py
to concept_geometry, the LEACE paths, cross_layer and
wasserstein_optimal. Each audited result carries measurement evidence,
every reported field has a catalog entry, and a registry test fails
when either is missing.

- concept_geometry: the cone "solid angle" is a cap around the mean
  axis, not a minimal enclosing cone; relabelled. Placeholder defaults
  (cosine 1.0, specificity 1.0, linear/polyhedral flags, layer indices 0)
  become None when there is too little data. The informed pipeline skips
  unavailable flags; decisions on valid inputs are unchanged.
- cross_layer: persistence, adjacent cosine and angle path length are
  None with fewer than two layers instead of 0.0/1.0; zero or non-finite
  directions are rejected instead of reported as orthogonal.
- leace: the Fisher "erasure loss" is relabelled as variance along the
  direction; exact and multiclass LEACE gain erasure oracles.
- wasserstein_optimal: a layer with no signal reported a cost ratio of 0
  and could be chosen as best_layer; it is now None and excluded. The
  W2 cost is exact for any direction (closed-form oracle), and the
  comment calling it a bound is corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:45:45 -05:00
Joseph MaglyandClaude Opus 5.5 b040115db8 feat(analysis): full-subspace spectrum and stability report
Rank-k extraction stores a basis, but the gate validates only its
primary direction, so an informative first vector plus unrelated
dimensions could pass as a whole subspace.

Add a standalone, versioned subspace report (not wired into the gate):
spectrum and conditioning, PCA-threshold and entropy effective rank,
bootstrap principal-angle stability, held-out multivariate prediction
per rank, rank-matched random-subspace nulls, and joint/interaction
diagnostics for direction pairs. The verdict reports the supported rank
("supported_rank: s of k"), counting only consecutive ranks whose
held-out increment beats both their null and a minimum increment. The
report compares the primary-vector, PCA-threshold, entropy-rank and
prediction arms side by side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:37:32 -05:00
Joseph MaglyandClaude Opus 5.5 bbb0177915 feat(analysis): fill baseline profile work counters
Baseline profiles reported unique examples, token presentations,
forwards, generated tokens and tensor bytes as null. Count them from
load completion through cleanup with pass-through observers: a forward
pre-hook on the loaded model and instance-level wrappers on generate and
activation collection, all removed on exit and after failures.

Counters are recorded per stage and totalled. A counter that cannot be
observed stays null with a reason (stages before load, calls without an
attention mask or input ids, batched generation, forwards outside
activation collection, or embedding calls that bypass the watched
model). Changes are additive within profile schema version 1; default
baseline artifacts are unchanged, profiled or not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:35:46 -05:00
Joseph Magly fa045675b3 Merge pull request #439 from elder-plinius/feat/433-task-scorers
Versioned task scorers and paired scorecards
2026-11-12 15:22:14 -05:00
Joseph Magly a70f484251 Merge pull request #438 from elder-plinius/feat/434-activation-capture
Versioned activation capture with identity-checked reuse
2026-11-12 15:15:15 -05:00
Joseph MaglyandClaude Opus 5.5 6f925caf1d feat(concepts): versioned task scorers and paired scorecards
The behavioural battery treated any greedy-text difference as an effect,
so a punctuation-only edit looked like a change and nothing measured
task success.

Add a local, versioned scorer registry with deterministic exact-answer
and structured-output (JSON + declared schema) scorers. Each completion
yields separate endpoints: task success, invalid output and abstention;
raw text change is reported as descriptive only. Paired summaries use a
one-sided exact McNemar test and Wilson bounds against a declared
per-task margin; min_pairs defaults to the smallest sample that could
pass that margin, and untested or underpowered endpoints never aggregate
to PASS. Every aggregate keeps its per-example records.

EvaluationBattery(scorers=...) writes behavioural["scorecard"]; without
scorers nothing changes. Pipeline admission refuses batteries that carry
scorers until their generation is modelled. Dataset-built examples read
select/calibrate rows; locked test still needs explicit acknowledgement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 21:44:52 -05:00
Joseph MaglyandClaude Opus 5.5 8d3f052c93 feat(analysis): versioned activation capture with identity-checked reuse
Add an on-disk activation capture built on observe_activations. Each run
writes one safetensors shard per batch under raw/ and a manifest binding
model id/revision and loaded dtype, tokenizer and chat template, special
tokens, adapter state, readout, layer sites, input digests and the
dataset revision. The manifest records running/complete/cancelled/failed
state, a labelled byte estimate, measured bytes and wall time, and
retention.

The loader refuses incomplete captures unless asked to inspect them, any
identity difference (naming the first differing field), unknown adapter
state, digest mismatches, and shard paths outside raw/. Capture refuses
meta, offloaded, quantized and non-CPU models, and runs nothing when the
estimate exceeds the budget.

Tokenizer and checkpoint identity move into a shared helper that the
pipeline's entry-point cache identity also uses, with identical keys and
values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 21:42:21 -05:00
Joseph Magly 2bdfa52cd0 Merge pull request #432 from elder-plinius/feat/concept-pack-schema-2
Require concept pack schema 2.0 for dataset declarations
2026-11-11 21:01:28 -05:00
Joseph MaglyandClaude Opus 5.5 ae9d774609 feat(concepts): require pack schema 2.0 for dataset declarations
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>
2026-11-11 20:46:10 -05:00