Address simulated referee reports: same-information point ties, wording, benchmark sigma_a stress

- Exploratory analyses, each declared and hashed before computing and kept
  outside every lock: sharpening transfer, permutation null of the decision
  rules and a truth-free warp check (script 42); BCa and t intervals and the
  comparison with the anchor-only mean (43); point ties with the same
  information as the SMC posterior, SMC-MAP and Anchor-LS (44); a powered
  independence test for the Berkson structure and sign, Wilcoxon and paired-t
  power for the number of blind wells (45).
- Findings: the mode of the SMC posterior already gives most of the gain over
  deterministic ties and averaging adds at most 3%; no sharpening was seen
  and the tie error is not independent of the data; paired tests need 25-50%
  fewer blind wells than the sign test.
- Paper: "hash-locked" replaces "pre-registered"; Berkson sharpening is a
  prediction that failed where testable; new Sec. 3.3 on the benchmark
  package; abstract, introduction, Secs. 5-7, App. C and conclusions revised;
  eight further verified references.
- Benchmark package: two anchor-uncertainty settings (R10__sa3.5, R10__sa14);
  658 tasks, 1316 content hashes (no earlier hash changed), 46,320 reference
  runs.
- Reproduction package: post-review outputs archived, six new verify steps;
  the clean-room check passes 18/18 steps with no differing file.
- Record the Fable (R4) and Opus (R5) referee reports.

No verdict, threshold or locked protocol changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 14:47:07 +00:00
parent 894fbdfc59
commit 760dbfea4f
46 changed files with 4768 additions and 124 deletions

View File

@@ -74,6 +74,11 @@ CUDA_VISIBLE_DEVICES= .venv/bin/python scripts/37_bench_package.py score --pred
CUDA_VISIBLE_DEVICES= .venv/bin/python scripts/38_bench_figures.py [--only bench_s1,bench_s8] [--flipband] # hình Thí nghiệm 3 của bài → paper/figures/; --flipband in bảng cos/cos² của S8
CUDA_VISIBLE_DEVICES= OMP_NUM_THREADS=2 .venv/bin/python scripts/39_repro_package.py build | verify # P5 gói tái lập: archive dữ liệu dẫn xuất → outputs/repro/, manifest repro/MANIFEST.json; phòng sạch → repro/verify_report.md (hướng dẫn: repro/README.md)
CUDA_VISIBLE_DEVICES= OMP_NUM_THREADS=2 .venv/bin/python scripts/40_band_spectra.py # post hoc: phổ trong dải địa chấn của nhãn F3, nhãn synthetic và dự đoán Oracle → outputs/band_spectra/ (bảng tab:bandspectra của bài)
CUDA_VISIBLE_DEVICES=0 OMP_NUM_THREADS=2 .venv/bin/python scripts/41_lambda_limit.py --stage all --workers 4 --device cuda:0 # exploratory: nhánh λ → 0 của bank SMC (khai báo docs/research/lambda-limit.md) → outputs/lambda_limit/
CUDA_VISIBLE_DEVICES= OMP_NUM_THREADS=2 .venv/bin/python scripts/42_referee_r4.py --stage all --workers 12 # exploratory: ba phân tích theo referee R4 (khai báo docs/research/referee-r4-analyses.md) → outputs/referee_r4/
CUDA_VISIBLE_DEVICES= OMP_NUM_THREADS=2 .venv/bin/python scripts/43_referee_r5_ci.py # exploratory: BCa và t-interval cho 38 tỉ số chính, đối chiếu anchor mean (khai báo docs/research/referee-r5-ci.md) → outputs/referee_r5/
CUDA_VISIBLE_DEVICES=0 OMP_NUM_THREADS=2 .venv/bin/python scripts/44_point_tie_arm.py --stage all --workers 4 --device cuda:0 # exploratory: tie điểm cùng thông tin (SMC-MAP, Anchor-LS; khai báo docs/research/point-tie-arm.md) → outputs/point_tie/
CUDA_VISIBLE_DEVICES= OMP_NUM_THREADS=2 .venv/bin/python scripts/45_referee_r5_followups.py --stage all --workers 8 # exploratory: kiểm độc lập Berkson (F1) và n* theo Wilcoxon/t cặp (F2) (khai báo docs/research/referee-r5-followups.md) → outputs/referee_r5/
# Run dài: chạy trong tmux server của người dùng, ví dụ tmux new-session -d -s p6_s2 -c $PWD "env STUDIES=S2 DEVICE=cuda:0 WORKERS=2 MEM_GB=2 scripts/run_bench.sh posterior train >> logs/bench_s2_cuda0.out 2>&1"
# (setsid nohup bị dừng khi phiên agent kết thúc, 29/10). operations/p6_s1_watcher.sh khởi động S1 khi GPU có chỗ trống (đã dùng 15:43–16:06 UTC 29/10, rồi bỏ khi GPU trống).
# operations/p6_supervisor.py (tmux p6_supervisor): mỗi 5 phút chạy lại driver P6 chết và dồn worker khi một study xong; log logs/p6_supervisor.out. Đã dừng 02:16 UTC 30/10 khi P6 xong. Lỗi đã biết: khi dồn worker, nó khởi động lại driver kể cả lúc số worker không đổi, làm mất job đang dở.
@@ -132,9 +137,14 @@ Biến môi trường máy đặt sẵn `OMP_NUM_THREADS=40` (cả MKL, OpenBLAS
| `scripts/34_run_bench.py <stage…> [--studies S1 S2 S3 S4 S8] [--device] [--workers] [--gpu-mem-gb] [--dev --rids 902…]` | Runner của `configs/protocol_bench.yaml` (P6, mức B): `lock` (khoá: `.sha256` + `.lock.json` gồm code, môi trường, input, artifact P2r tham chiếu, fingerprint bộ sinh danh nghĩa), `posterior` (SMC như scripts/14, nhánh estR, P = 1024, lưu hạt γ = 1/κ), `train` (như scripts/15 + B4a–d, nhánh S8 hai mode, backbone TCN), `summarize` (luật đã khai báo trước → `outputs/bench/summary/`), `repro` (ô tái lập P2r → `outputs/bench/repro/comparison.json`), `dev-budgets` (ngân sách TCN trên dev). Realization 8–15 chỉ chạy sau khi khoá; `--dev` chỉ nhận 900–905 và ghi vào `outputs/bench/dev/`. Resume theo fingerprint + checksum. Mã: `ml_porosity/benchmark/` |
| `scripts/35_bench_calibration.py [--rids 902 903 904 905]` | Bảng hiệu chuẩn mức S2 (dev): gộp `outputs/bench/dev/smc_qc_rid*.json` (scripts/33 `--smc`) thành `calibration.{csv,md}`: sai số mô hình trong họ so với nhiễu regime, SMC warp RMSE / coverage90 / σ_post / overconfidence, phase_R, B3c, theo preset × regime |
| `scripts/36_bench_verdicts.py` | Verdict cuối của protocol_bench (02/11/2026): kiểm lock (`freeze(check=True)`), đọc `verdict.json` của summarize và áp đúng lời phát biểu ở ba chỗ code đã khoá khác (S1-H1 lọc N ∈ {4, 16}; S2-H1 theo từng trục; S3-H1 đối thủ {B3b, B3c, B3c-R, B4a–d}, không có Ctl-GP) bằng chính hàm của `ml_porosity/benchmark/summary.py` → `outputs/bench/summary/{verdict_final.json,verdict_final.md,s3_h2a_stated.csv}`. Ngoài tập hash của lock; không sửa output của summarize (`docs/plan.md` §12 ý 28) |
| `scripts/37_bench_package.py <lệnh> [--out DIR]` (generate, check, tables, score, selftest) | S7 đóng gói benchmark (02/11/2026; ngoài lock, generate và tables kiểm lock trước): `generate` ghi 630 task (test 8–15, dev 900–905; 5 regime danh nghĩa × 5 c, 14 setting S2, 6 setting S8), truth ẩn, input và `inputs/analyst.json` vào `outputs/bench/package/` (khoảng 845 MB), rồi so sha256 nội dung với `benchmark/MANIFEST.json` (lần đầu thì ghi); `check` kiểm một bản tải về; `tables` gộp 45.200 run tham chiếu → `reference/runs.csv.gz`, `benchmark/reference/{cells.csv,main_table.md}`; `score --pred DIR --name TÊN` chấm dự đoán `r<rid>_c<c>_n<N>_s<seed>.npz` (metric của scripts/11, luật ô H2a và luật better của `summary.py`) → `DIR/score/`; `selftest` chép dự đoán tham chiếu đã lưu thành bài nộp và kiểm metric, truth và luật khớp. Hướng dẫn cho người dùng: `benchmark/README.md` |
| `scripts/37_bench_package.py <lệnh> [--out DIR]` (generate, check, tables, score, selftest) | S7 đóng gói benchmark (02/11/2026; ngoài lock, generate và tables kiểm lock trước): `generate` ghi 658 task (test 8–15, dev 900–905; 5 regime danh nghĩa × 5 c, 14 setting S2, 6 setting S8, 2 setting σ_a sai), truth công khai, input và `inputs/analyst.json` vào `outputs/bench/package/` (khoảng 845 MB), rồi so sha256 nội dung với `benchmark/MANIFEST.json` (lần đầu thì ghi); `check` kiểm một bản tải về; `tables` gộp 46.320 run tham chiếu → `reference/runs.csv.gz`, `benchmark/reference/{cells.csv,main_table.md}`; `score --pred DIR --name TÊN` chấm dự đoán `r<rid>_c<c>_n<N>_s<seed>.npz` (metric của scripts/11, luật ô H2a và luật better của `summary.py`) → `DIR/score/`; `selftest` chép dự đoán tham chiếu đã lưu thành bài nộp và kiểm metric, truth và luật khớp. Hướng dẫn cho người dùng: `benchmark/README.md` |
| `scripts/38_bench_figures.py [--only bench_s1,bench_s8] [--flipband]` | Hình Thí nghiệm 3 của bài (02/11/2026; ngoài lock, kiểm lock trước, không ghi vào `outputs/`): `bench_s1` (phase diagram S1 từ `outputs/bench/summary/s1_cells.csv`) và `bench_s8` (hàm truyền hai mode từ `s8_transfer_curves.json`; băng dùng được tính lại từ file dự đoán S8 như `summary.py`) → `paper/figures/{bench_s1,bench_s8}.pdf`, cùng style với scripts/22. `--flipband` chỉ in ra stdout bảng post hoc của Sec. 6.5: trung bình cos(πfΔ), cos²(πfΔ) (Hệ quả 3) và transfer đo được của PM2/BK2/HM2 trong băng 1/(2Δ) < f < 3/(2Δ) (D-14) |
| `scripts/39_repro_package.py <lệnh> [--out DIR]` (build, check, verify, code) | P5 gói tái lập (02/11/2026; ngoài mọi lock, không train, không ghi vào `outputs/` gốc): `build` chọn file của `outputs/` theo `RULES` và ghi 5 archive tar.gz tất định theo giấy phép dữ liệu (f3_results, f3_predictions, f3_volume: CC BY-SA 3.0; volve: CC BY-NC-SA 4.0; teapot: CC0, cần kiểm) vào `outputs/repro/`, cùng `repro/MANIFEST.json` (11.112 file, sha256 từng file, script sinh ra); `check --root DIR` kiểm một cây đã giải nén; `verify [--only …] [--keep]` dựng phòng sạch (code + archive, không SEG-Y/Volve/Teapot thô), chạy lại 12 bước tổng hợp, post hoc, bảng và hình, theo dõi file mở bằng audit hook rồi so với bản gốc → `repro/verify_report.md` (02/11: 12/12 bước khớp, 63 file trùng byte, 3 trùng giá trị, 0 khác); `code --rev REV` ghi `git archive` của một commit. Hướng dẫn cho người đọc (tiếng Anh): `repro/README.md` |
| `scripts/40_band_spectra.py` | Mô tả post hoc (09/11/2026; ngoài mọi lock và ngoài các archive tái lập, không train): phân bố công suất trên 6 Hz trong cửa sổ 600–1100 ms của `PHIE_DT` F3 (4 giếng), nhãn synthetic và dự đoán Oracle ($N$ = 16, $c$ = 1; R10, R0, Rm5), cùng cách ước lượng periodogram với `scripts/31_p2r_posthoc.py` → `outputs/band_spectra/{table.csv,groups.csv,meta.json}`; dùng cho bảng `tab:bandspectra` (Phụ lục C) và mục "Band of the benchmark" của bài. |
| `scripts/41_lambda_limit.py --stage all` | Exploratory (09–10/11/2026; ngoài mọi lock và archive tái lập): huấn luyện lại bank SMC ở λ = 10⁻³ và MSE trên nhãn trung bình của bank ở 8 ô rộng + 3 ô hẹp của P2r, kiểm hash khai báo `docs/research/lambda-limit.md` trước khi chạy; resume theo ô. Kết quả `docs/research/lambda-limit-results.md`. |
| `scripts/42_referee_r4.py --stage all|b1|b2|b3` | Exploratory (10/11/2026; ngoài mọi lock và archive tái lập, không train, CPU khoảng 4 phút): B1 hàm truyền Ĥ của mạng SMC mean so với Oracle (kiểm sharpening), B2 xác suất pass dưới null hoán vị của các luật, B3 độ lệch warp SMC–correlation tie không dùng truth; kiểm hash khai báo `docs/research/referee-r4-analyses.md` trước khi tính. Kết quả `docs/research/referee-r4-results.md`. |
| `scripts/43_referee_r5_ci.py` | Exploratory (10/11/2026; ngoài mọi lock và archive tái lập, không train, CPU 10 s): khoảng percentile, BCa và t-interval (log tỉ số, 7 bậc tự do) cho 38 tỉ số chính của bài; tỉ số B3d-Sa/B3d; band RMSE trên Oracle ở c = 0; kiểm hash khai báo `docs/research/referee-r5-ci.md`. Kết quả `docs/research/referee-r5-ci-results.md`. |
| `scripts/44_point_tie_arm.py --stage all|train|summary` | Exploratory (10/11/2026; ngoài mọi lock và archive tái lập; GPU, 17 phút): huấn luyện nhãn tại SMC-MAP (hạt tốt nhất theo log mục tiêu tempered) và Anchor-LS (cực trị posterior chỉ anchor) ở 96 ô–realization và so với các phương pháp đã đăng ký; kiểm tái lập B3d-Sa. Kết quả `docs/research/point-tie-arm-results.md`. |
| `scripts/45_referee_r5_followups.py --stage all|f1|f2` | Exploratory (10/11/2026; ngoài mọi lock; CPU, 16 phút): F1 kiểm độc lập sai số tie với dữ liệu (cần file hạt posterior), F2 số giếng mù theo kiểm định dấu, Wilcoxon và t cặp. Kết quả `docs/research/referee-r5-followups-results.md`. |
`code_thesis/` là bản lưu trữ code luận văn. Giữ nguyên nội dung để đối chiếu: các script này còn đường dẫn máy cũ và ghi vào `outputs/`, nên cần một bản sao đã điều chỉnh đường dẫn nếu muốn chạy lại. Kiểm tra bộ artifact hiện có bằng `python scripts/00_data_manifest.py --dataset thesis --check`.