# Reproducing CARVE Syn-2Cap Results Follow [`.cursor/BUILD-PLAN.md`](.cursor/BUILD-PLAN.md) Phase B–C for the full commit sequence. For commit/report/README rituals after each milestone, see [`.cursor/PROJECT-WORKFLOW.md`](.cursor/PROJECT-WORKFLOW.md). ## Environment ```bash pip install -e ".[dev]" python .cursor/scripts/check_env.py ``` ## Syn-2Cap construction 1. Train LoRA_A on capability A only → save `delta_a.pt` with key `delta_w` 2. Train LoRA_B on capability B only → save `delta_b.pt` 3. Merge: ```bash python scripts/synthetic_entangle.py merge \ --delta-a delta_a.pt \ --delta-b delta_b.pt \ --output results/syn2cap/entangled_adapter \ --config configs/syn2cap_1.5b.yaml ``` ## Eigenvalue diagnostic (no cut) ```bash python scripts/synthetic_entangle.py diagnostic-only \ --s-f path/to/S_f.pt \ --s-r path/to/S_r.pt \ --layer layer0 \ --output results/diagnostic ``` ## CARVE go/no-go (GPU) Targets: **FE ≥ 0.90**, **RF ≥ 0.95**, CARVE Pareto-dominates Maat-SVD at matched |J|. ```bash pytest tests/test_synthetic_e2e.py -m gpu -v ``` ## Reproduced result — complete proof suite (2026-07-17) ```bash pip install -e ".[dev]" python scripts/run_complete_proof.py \ --adapter results/gate_c_live/entangled_adapter \ --probes results/gate_c_live/probes ``` Expect `all_behavioral_pass: true` in `results/complete_proof_*/complete_proof_summary.json`. Full MLP win uses selective soft-γ + short retain repair. See [`report/2026-07-17-complete-proof.md`](report/2026-07-17-complete-proof.md). --- ## Reproduced result — publishable Syn-2Cap suite (2026-07-17) Decision **PASS**. Figures in `report/assets/syn2cap_*.png`. Summary: `results/publish_live/publish_summary.json`. ```bash pip install -e ".[dev]" python scripts/run_publishable_eval.py \ --adapter results/gate_c_live/entangled_adapter \ --probes results/gate_c_live/probes \ --output results/publish_live \ --lambda-threshold 1.5 ``` Expected (λ=1.5 CARVE): FE≈1.0, RF≈1.0; Maat-SVD RF≈0; relearning forget acc rises by step 30. Full MLP confirmation (slower): ```bash python scripts/run_publishable_eval.py --full-mlp --skip-pareto --skip-relearn \ --adapter results/gate_c_live/entangled_adapter \ --probes results/gate_c_live/probes \ --output results/publish_full_mlp \ --lambda-threshold 1.5 ``` --- ## Reproduced result — Syn-2Cap Gate C (2026-07-16) **Hardware:** NVIDIA GPU ≥6GB VRAM (tested RTX 4050 Laptop). **Decision:** `PASS` — see `results/gate_c_live/gate_c_summary.json` and [`report/2026-07-16-syn2cap-gate-c.md`](report/2026-07-16-syn2cap-gate-c.md). ```bash pip install -e ".[dev]" python scripts/run_syn2cap_gate_c.py --steps 100 --rank 8 --lambda-threshold 1.5 \ --output results/gate_c_live ``` Expected ablation (approximate; small holdout is noisy): | Method | FE | RF | |--------|-----|-----| | CARVE | ≥0.90 | ≥0.95 | | Maat-SVD | lower FE or much lower RF | — | If Cap A/B already trained under `results/gate_c_live/lora_{a,b}/adapter`: ```bash python scripts/run_syn2cap_gate_c.py --merge-only --output results/gate_c_live --lambda-threshold 1.5 ``` --- ## Reproduced result — separability diagnostic (2026-07-05) Toy synthetic run; certificate `SURGERY_VIABLE`. Figure committed at `report/assets/synthetic_spectrum_20260705.png`. ```bash pip install -e ".[dev]" python scripts/synthetic_entangle.py diagnostic-only \ --s-f results/full_eval_20260705_083435/S_f.pt \ --s-r results/full_eval_20260705_083435/S_r.pt \ --layer synthetic \ --output results/diagnostic_run ``` Expected: `certificate.json` with `status: SURGERY_VIABLE`, `synthetic_spectrum.png` in output dir. > Re-run `scripts/run_full_eval.py` first if `S_f.pt` / `S_r.pt` are missing locally (`results/` is gitignored). --- ## Full pipeline CLI ```bash python scripts/run_carve.py \ --base-model Qwen/Qwen2.5-1.5B-Instruct \ --adapter results/syn2cap/entangled_adapter \ --forget-data data/probes/D_f_train.jsonl \ --retain-data data/probes/D_r_train.jsonl \ --forget-holdout data/probes/D_f_holdout.jsonl \ --retain-holdout data/probes/D_r_holdout.jsonl \ --output results/carve_out ``` Results land in `results//` with `preregistration.yaml`, `metrics.yaml`, `report.md`.