Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
4ede3b9
research(AMM-06): preregister selective reliability gate and independ…
patrickdugan Nov 18, 2026
77a1f2c
feat(AMM-06): freeze new independent recurrent roots, 8-pair calibrat…
patrickdugan Nov 18, 2026
8e1eeb6
feat(AMM-06): preserve equal-dose casewise BPD interventions and audi…
patrickdugan Nov 18, 2026
3de2ac1
feat(AMM-06): freeze validation likelihood gate and matched-budget no…
patrickdugan Nov 18, 2026
eedc861
feat(AMM-06): source-lock root-level selective gate, training memory …
patrickdugan Nov 18, 2026
0da5751
test(AMM-06): preregister 15 excluded-root proofs of trust, leakage, …
patrickdugan Nov 18, 2026
7f9aa4a
chore(AMM-06): align model constants with preregistered trust compari…
patrickdugan Nov 18, 2026
f215033
docs(AMM-06): record experimental code and sealed-cohort reproducibil…
patrickdugan Nov 18, 2026
10b2253
docs(AMM-06): record experimental code and sealed-cohort reproducibil…
patrickdugan Nov 18, 2026
5fd8294
ci(AMM-06): stage frozen training, source tests, independent developm…
patrickdugan Nov 18, 2026
28eb88b
results(AMM-06): lock hosted 64-root training memory before independe…
patrickdugan Nov 18, 2026
0b78a1c
results(AMM-06): lock source-replayed development and 95/95 EvalMath …
patrickdugan Nov 18, 2026
138e606
results(AMM-06): lock source-replayed development and 95/95 EvalMath …
patrickdugan Nov 18, 2026
fecfce2
docs(AMM-06): register 64-root selective-trust developmental null and…
patrickdugan Nov 18, 2026
7e78ea2
docs(AMM-06): publish development stop and preserve sealed 128-root c…
patrickdugan Nov 18, 2026
f411826
docs(agents): enforce AMM06 negative preflight and confirmation seal
patrickdugan Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions .github/workflows/bpd-amm06-selective-trust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: BPD-AMM-06 selective trust gate and EvalMath root audit

on:
pull_request:
paths:
- 'mechinterp/bpd/experiments/amm06_selective_trust/**'
- '.github/workflows/bpd-amm06-selective-trust.yml'
workflow_dispatch:

jobs:
cpu-source-and-registered-replay:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install CPU-only PyTorch and numpy
run: python -m pip install --index-url https://download.pytorch.org/whl/cpu 'torch==2.10.0+cpu' 'numpy>=1.26'
- name: Run excluded engineering-root native parity and hard seal tests
run: python -m unittest mechinterp.bpd.experiments.amm06_selective_trust.test_experiment -v
- name: Fit sixty-four new training model roots, reconstruct frozen memory
shell: bash
run: |
python -m mechinterp.bpd.experiments.amm06_selective_trust.experiment --phase training --out /tmp/amm06_training.json
python - <<'PY'
import json, pathlib
from mechinterp.bpd.experiments.amm06_selective_trust import experiment as e
train=json.load(open('/tmp/amm06_training.json'))
lock=e.compact(train)
print('AMM06_TRAINING_LOCK='+json.dumps(lock,sort_keys=True))
expected=pathlib.Path('mechinterp/bpd/experiments/amm06_selective_trust/results/TRAINING_LOCK.json')
if expected.exists():
assert lock==json.loads(expected.read_text()),'locked source/training changed'
print('AMM06 frozen training memory PASS')
else:
print('AMM06 source-only training; no independent development until a training lock is committed')
PY
- name: Evaluate independent development only after training source lock
shell: bash
run: |
if test -f mechinterp/bpd/experiments/amm06_selective_trust/results/TRAINING_LOCK.json; then
python -m mechinterp.bpd.experiments.amm06_selective_trust.experiment \
--phase development --memory /tmp/amm06_training.json \
--out /tmp/amm06_development.json
python - <<'PY'
import json,pathlib
from mechinterp.bpd.experiments.amm06_selective_trust import experiment as e
dev=json.load(open('/tmp/amm06_development.json'))
lock=e.compact(dev)
print('AMM06_DEVELOPMENT_LOCK='+json.dumps(lock,sort_keys=True))
expected=pathlib.Path('mechinterp/bpd/experiments/amm06_selective_trust/results/DEVELOPMENT_LOCK.json')
if expected.exists():
assert lock==json.loads(expected.read_text()), 'full-case confirmation/provenance drift'
print('AMM06 development all-case hash replay PASS')
else:
print('AMM06 first independent development receipt; use this source-locked CI artifact')
PY
else
echo 'AMM06 development blocked until 64-root training lock is committed'
fi
- name: Check corrected EvalMath 95/95 independent-root gate
shell: bash
run: |
if test -f /tmp/amm06_development.json; then
curl -fsSL https://raw.githubusercontent.com/MoralityLabAI/EvalMath/6d9c28dbe8e4c42b3fba76ae7adb84aed9f0921a/skills/evalmath-mechinterp-power/scripts/preflight.py -o /tmp/amm06_evalmath.py
python - <<'PY'
import json
dev=json.load(open('/tmp/amm06_development.json'))
json.dump(dev['preflight_input'],open('/tmp/amm06_pilot.json','w'))
PY
python /tmp/amm06_evalmath.py --pilot /tmp/amm06_pilot.json --out /tmp/amm06_preflight.json
python - <<'PY'
import json,pathlib
pf=json.load(open('/tmp/amm06_preflight.json'))
print('AMM06_PREFLIGHT='+json.dumps(pf,sort_keys=True))
expected=pathlib.Path('mechinterp/bpd/experiments/amm06_selective_trust/results/PREFLIGHT.json')
if expected.exists():
assert pf==json.loads(expected.read_text()),'pinned independent-root preflight changed'
print('AMM06 pinned EvalMath preflight replay PASS')
print('Confirmation remains sealed; never run release from CI')
PY
else
echo 'AMM06 preflight waits for independent development roots'
fi
- name: Archive complete training, development and preflight evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: amm06-registered-cpu-receipts
if-no-files-found: ignore
retention-days: 30
path: |
/tmp/amm06_training.json
/tmp/amm06_development.json
/tmp/amm06_pilot.json
/tmp/amm06_preflight.json
Comment on lines +12 to +98
12 changes: 12 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ does not thereby repair clean reasoning. Observational probes and exact
linear-algebraic BPD witnesses belong to different evidence classes from
native model-causal claims.

AMM-06's 128 independent confirmation model roots are **SEALED**.
The preregistered 64-root development study measured a +0.81pp
selective-trust advantage over always updating noisy local feedback,
well below the corrected EvalMath 12.5pp independent-root variation
floor, with only 7 accepted roots and insufficient judge-quality
discrimination. The strict planner returned
`REDESIGN_OR_PILOT_ONLY`. Do not run AMM-06 `--phase confirmation`,
construct its release manifest, reuse any protected root population,
or relabel this pilot as a confirmed mechanism. Review
`mechinterp/bpd/experiments/amm06_selective_trust/RESULTS.md`
and the locked `results/PREFLIGHT.json` before new work.

AMM-05's 128-model confirmation roots are **sealed**. Its 64 independent
development models yielded a positive +5.87pp memory-over-local ridge
direction, but the independent-root repeatability variation floor was
Expand Down
179 changes: 179 additions & 0 deletions mechinterp/bpd/experiments/amm06_selective_trust/PROTOCOL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
# BPD-AMM-06: selective trust of noisy calibration in case-conditioned causal memory

**Registered 2026-11-18, protocol-first, before AMM-06 source or model scoring.**
AMM-05's registered 64-root development found +5.87pp memory+local over
local ridge, with a 14.06pp independent-root repeatability variation
floor. Its training-only memory (3796/8192) exceeded always-updated
memory (3641/8192). AMM-05's 128 confirmation roots remain sealed.
AMM-06 tests a *fixed selective trust* gate that accepts a local update
only when source-disjoint calibration feedback gives heldout predictive
evidence supporting it.

## Independently trained recurrent causal task

Follow AMM-05's frozen scientific instrument with *fresh* SHA256
\`AMM06/<phase>/<index>/...\` streams. Every root independently
Adam-trains a 4D rank-two shared physical recurrent operator
\`h -> (h@I)@O\` (200 steps, batch 96, LR=.035, .0002 weight regularizer)
to external two-readout labels from sources (a,b), and trains a distinct
V[4,2],U[2,4] BPD factorization (140 steps, batch 96, LR=.035, full
teacher trajectory plus .5 reconstructed-weight MSE). Families remain
wren q(h1)=a,q(h2)=b and basalt q(h1)=b,q(h2)=a, with q(h)=h[0].
Canonicalize full VU by float64 SVD before any component-index
decision and check GL2 gauge-shear/recanonicalization parity.

Each donor pair changes the externally defined second-pass target
source coordinate by signed 0.30..0.45 and an independent nuisance
coordinate by signed 0.15..0.80. The true donor target is defined
directly from input data *before teacher/BPD fitting*. At a fixed
unit pair, choose one of two component patches from
\`z_c=(((h_d-h_r)@V)_c)U_c\`. Set the immediate readout coordinate
to zero and renormalize to the same per-pair physical dose
\`D=||F_BPD(h_d)-F_BPD(h_r)||_2\` for both candidates and equal-dose
random dark controls. A zero projection uses fixed e1*D; all zero-dose
and degenerate cases remain in the ITT denominator. Score
\`abs(q(F_BPD(h1_rec+patch_c))-donor_y2)<=0.18\`.

## Exactly matched local information and hidden reliability regimes

Each evaluated root has **eight** new, disjoint calibration donor pairs
(16 binary component feedback observations); no test pair reappears in
calibration. Judge reliability is a *hidden root-level regime*, balanced
with family using \`(index//2)%2\`: quality LOW_NOISE flips each
binary label independently with p=.10; quality HIGH_NOISE flips
independently with p=.45. Family is determined by index parity, so
each phase has exactly 1/4 of roots in each family×quality stratum.

The policy receives only the 16 noisy labels, the two component's
eleven-dimensional AMM-05 SVD-canonical causal-response features,
and three unlabeled continuation readouts per donor pair
(one unpatched reference, two candidate continuations). Both
strategies receive exactly the same physical input and local
observation budget. **The hidden judge regime, clean calibration
labels, donor future continuation, true donor target and all test
successes are audit-only, never passed into a decision function.**
Both sides know the *population mixture* (.10,.45), not the root's
regime. The cross-model memory has the additional disclosed amortized
64-training-root corpus.

## Frozen global memory and local update

Fit AMM-05's *exact* 11-feature ridge model with lambda=10, free
intercept on 64 *fresh* independent TRAIN roots, 128 clean labeled
donor cases/root, both candidate actions scored. Freeze the 11
coefficients, pooled best component and training receipt digest.
Clip the memory's predicted per-component true success probability
to [0,1] before any local feedback update.

For local estimation use the known *marginal* noise probability
\`eta=(.10+.45)/2=.275\`, with de-noised binary target
\`(noisy_y-eta)/(1-2eta)\`. A λ=20 ridge with all 11 coefficients
penalized fits the difference of this target from the memory
prediction; **always_update** fits all 16 noisy labels and
selects \`argmax_c(p_memory + residual)\` per test case.
**memory_only** selects \`argmax_c(p_memory)\` and ignores calibration.
A full λ=2 local ridge with free intercept fits the same 16 labels
without memory, giving the equal-local-budget **local_ridge** control.
All policies have the same 3 unlabeled candidate readout probes
per test case.

## Fixed heldout-likelihood trust gate (primary arm)

The **selective_trust** arm splits calibration into the *first four*
pairs (fit) and *last four* pairs (gate validation), identified by
the independent local-calibration stream before seeing labels.
It fits a λ=20 residual on the eight *fit* labels, with the same
marginal noise correction, then predicts the validation eight noisy
labels under two hypotheses: H0=memory probabilities and H1=
memory+fit residual (clipped to [0,1] for likelihood evaluation).

For each H, compute the joint calibration validation likelihood
under an unknown but *shared root-level* judge regime:
\`L(H)=.5*prod_j Bern(y_j| .10+.80*p_Hj)
+.5*prod_j Bern(y_j|.45+.10*p_Hj)\`.
Use a numerically stable log-sum-exp with all eight validation bits;
clip predictive observation probabilities to [1e-9,1-1e-9].
Define log Bayes factor \`B=log L(H1)-log L(H0)\`.
The **fixed, theory-selected threshold is log(2)**.
If \`B>log(2)\`, choose the same **always_update** policy fitted
on *all 16* noisy calibration labels; otherwise use **memory_only**.
The gate cannot access confirmation, development outcomes, audit-only
clean calibration labels or quality labels. The threshold and
training/calibration split are frozen before AMM06 source scoring.

The source should retain the scalar B per root, accept/reject flag,
full per-case action traces, and hidden quality only in audit receipts.

## Arms, sample sizes and inference

Frozen arms: \`selective_trust\` (primary), \`always_update\`,
\`memory_only\`, \`local_ridge\`, \`pooled\`, \`random_component\`,
\`random_dark\`, \`random_dark_b\`, \`sham\`, \`full_donor\`.
The full donor intermediate replacement is a different-dose
contextual ceiling, not an equal-dose control.

Independent roots: 8 EXCLUDED engineering for tests only,
64 TRAIN (128 cases/root), 64 DEVELOPMENT and **128 protected
CONFIRMATION**. Each development/confirmation root has eight
calibration pairs, 256 fresh heldout test pairs and **256 additional
independent repeatability test pairs**. Pair scores are repeated
measurements nested in the one model root. Test root keys and
confirmation computations are forbidden from source tests and
invalid-preflight paths, including indirect calls.

Primary registered signed root effect:
\`selective_trust - always_update\` true heldout success rate.
Two secondary registered signed root effects:
\`selective_trust - memory_only\` and
\`selective_trust - local_ridge\`.
Three one-sided exact independent-root sign tests, familywise .05
Holm adjustment, plus 2000 seeded paired root-bootstrap 95% CIs.
Minimum meaningful gain **+0.08** probability, planning target
**+0.15**, measurement resolution 1/256. Negative and zero results
are all retained. Report performance separately in the two hidden
judge-reliability strata *as posthoc descriptive diagnostics*,
including gate acceptance and discrimination.

For each independent development root, evaluate the same frozen
\`always_update\` policy on 256 primary test pairs and on 256
independent repeatability pairs; record their absolute success-rate
difference. Over the 64 roots, the sample maximum calibrates the
95th population quantile with >=95% confidence (95/95 tolerance).
The variation floor is max(+.08, 1/256, upper tolerance).
Use **corrected EvalMath** preflight pinned to merged commit
\`6d9c28dbe8e4c42b3fba76ae7adb84aed9f0921a\`.
A \`REDESIGN_OR_PILOT_ONLY\` blocks all confirmation scoring,
regardless of repeated-case totals.

Additional preregistered **scientific admission vetoes** even if
EvalMath returns READY: (1) at least eight of 64 independent
development roots accept a local update, (2) gate acceptance
fraction in LOW_NOISE minus HIGH_NOISE >= .10, and
(3) development casewise oracle gap above always_update >= .08.
These are *veto-only*, never opportunities to optimize thresholds
on the development cohort.

A positive confirmation claim requires primary Holm p<.05,
its paired-root bootstrap lower 95% limit above the registered
variation floor, and no dose/parity/source integrity failure.
No preexisting source-locked confirmation population may be opened
without a separately committed, explicit human-approved release
manifest that binds its model roots, training-memory SHA, source SHA
and EvalMath receipt. In this conversation, any gate failure leaves
all 128 independent confirmation roots unopened.

## Evidence, provenance and security

Source and protocol must be committed **before** new training.
Freeze training-memory source and digest in Git **before** any
development world is trained or scored. Preserve every case-bit
trace, selected component, calibration feedback, heldout/repeat
outcomes, zero dose and gauge tests. Native BPDModel and
TiedComponentLinear PassMaskSchedule execution must agree with the
independent factors on engineering roots to <=1e-5.
No ARG-03-N protected case or AMM03/04/05 sealed confirmation root
may be accessed. Evidence remains **synthetic trained linear tied
recurrent causality with an explicitly modeled noisy feedback
channel**. It cannot establish agent learning between real LLMs,
nonlinear transformer mechanistic transfer, or live Buzz/Nostr
memory transport.
56 changes: 56 additions & 0 deletions mechinterp/bpd/experiments/amm06_selective_trust/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# AMM-06: selective trust of noisy causal feedback

[PROTOCOL.md](PROTOCOL.md) was registered first on 2026-11-18 at commit `4ede3b9290903dbf22a81c44811c9a00246ac2ee`, before implementation or experimental model training. AMM-05's directional result found that cross-model memory alone outscored an always-updated local policy; its 128-model confirmation cohort remains sealed.

AMM-06 tests a **preregistered, held-out local-feedback trust gate**. The model receives 8 source-disjoint calibration donor pairs with 16 noisy binary component labels. A root-level hidden judge has either .10 or .45 flip probability, balanced independently of the source family. The decision model is blind to the regime and receives the same 16 noisy labels and eleven-dimensional SVD-canonical causal-response features as the always-updated and local-ridge controls.

The global memory is ridge regression on 64 freshly trained synthetic 4D rank-two recurrent model roots, each with 128 independently generated donor pairs. For each new model, the trust gate fits a residual from the *first four* calibration pairs, evaluates its noisy predictive likelihood against frozen memory on the *last four*, and accepts the full 16-label update only when the **mixture log Bayes factor exceeds ln 2**. Both accepted and rejected paths choose one causal BPD component per test case using the same three unlabeled continuation readouts. The true donor label and donor-future continuation are audit-only; all active candidate patches have the same L2 dose.

## Completed development study and scientific hold

[RESULTS.md](RESULTS.md) and the exact source-locked receipts under
`results/` record all 64 independently trained development models.
The selective gate gained **0.81 percentage points** over always
updating local feedback, with 23 positive, 17 negative and 24 tied
roots. Frozen training-only memory remained ahead by 0.45 points.

The corrected 64-root EvalMath preflight returned
**`REDESIGN_OR_PILOT_ONLY`**, with a 12.5-point 95/95 repeatability
floor against a registered 8-point minimum and 15-point target.
The gate accepted only seven roots (minimum eight), and the
low-noise minus high-noise acceptance difference was 9.375 points
(minimum ten). Every negative and failed factor-fit root remains
in the receipts.

**All 128 independent AMM-06 confirmation roots remain SEALED.
Do not execute `--phase confirmation`, create a release manifest,
or interpret the negative planner receipt as authorization.**
The original source files remain unchanged so hosted CI can
replay training and development deterministically.

## Source-locked CPU workflow

Requires Python 3.12 and PyTorch CPU:

```bash
python -m unittest mechinterp.bpd.experiments.amm06_selective_trust.test_experiment -v

python -m mechinterp.bpd.experiments.amm06_selective_trust.experiment \
--phase training --out /tmp/amm06_train.json

# Only after results/TRAINING_LOCK.json has been committed:
python -m mechinterp.bpd.experiments.amm06_selective_trust.experiment \
--phase development --memory /tmp/amm06_train.json --out /tmp/amm06_dev.json

python -c 'import json; d=json.load(open("/tmp/amm06_dev.json")); json.dump(d["preflight_input"],open("/tmp/amm06_pilot.json","w"))'
python /path/to/pinned/EvalMath/skills/evalmath-mechinterp-power/scripts/preflight.py \
--pilot /tmp/amm06_pilot.json --strict --out /tmp/amm06_pf.json
```

Pinned corrected EvalMath planner: `MoralityLabAI/EvalMath@6d9c28dbe8e4c42b3fba76ae7adb84aed9f0921a`. The independent unit is one trained teacher/factor pair; 256 heldout cases per root and 256 disjoint repeatability cases are nested observations. The preregistered minimum effect is +8 percentage points, the target +15, with 64 independent development roots and a 95/95 sham tolerance envelope. Additional predeclared quality-stratum/acceptance/headroom *vetoes* must pass before any release is considered.

**All 128 prospective AMM-06 confirmation model roots remain sealed until a separate human-approved source-lock release manifest**. The CLI fails closed on a missing/invalid EvalMath receipt or release document before fitting any confirmation model. No AMM-03/04/05 protected confirmation root or ARG-03-N test data are used.

## Interpretation

This is a synthetically trained **linear** recurrent BPD causal-routing experiment with a modeled noisy judge. It does not establish a real agent's understanding, general neural mechinterp transfer, nonlinear transformer reasoning, or live Buzz/Nostr memory.
Loading
Loading