Build the failure views from the fused checkpoint's predictions - #81
Build the failure views from the fused checkpoint's predictions#81duckyquang wants to merge 3 commits into
Conversation
The taxonomy, complementarity matrix and dropout profile were only ever produced by the harness's Ridge, so the project's headline contribution was demonstrated on a model no reported table uses. The two disagree badly enough that it matters: drop-echo MAE 117.5 against the checkpoint's 20.55. With two modalities the harness only asks for the full set and each singleton, and the missing-modality eval has already scored exactly those three conditions and writes them per example. So --predictions re-reads that dump instead of fitting anything, and the views describe the checkpoint the paper reports. The harness takes modality names directly now -- it never read the embedding values, only the keys, and a caller holding predictions has no arrays to pass. Guarded the two ways this route can silently lie: the sanitized bundle copy has its per-example blocks stripped, and conditions whose labels drift out of order would compare different patients.
sebasmos
left a comment
There was a problem hiding this comment.
Read at bfd7df9 on top of b849306; 121 tests pass.
The route is right, and the case for it is stronger than the description makes it sound. The committed ridge report calls drop-echo 100 percent silent at MAE 117.5; the checkpoint calls the same condition loud at 20.55. They do not disagree on magnitude, they invert the paper's headline, so this is not a labelling tidy-up. Naming the artifact after its producer and giving the fused route its own default out dir is the correct fix, and reusing the already-scored conditions rather than refitting is what makes it a re-reading rather than a second model.
Two small things.
-
The order guard compares
lvefacross conditions but notef_le_40, so a dump whose gate vector drifted would still pass. -
Right to hold #79 open. Until
failure_report.fused.jsonexists nothing here has touched the real fold, and #76 is waiting on that file, not on this merge.
Approving to merge after #74.
kevzho
left a comment
There was a problem hiding this comment.
The fused failure-analysis route now correctly reuses the checkpoint’s per-example predictions without refitting a model, validates condition alignment, records provenance, and includes appropriate tests. The regenerated failure_report.fused.json is committed, and the updated SHA256SUMS includes the artifact. The implementation and reproducibility requirements are complete. Approving this PR for merge.
sebasmos
left a comment
There was a problem hiding this comment.
Re-approving at 322f6a4. 121 tests pass and all eight bundle lines verify with sha256sum -c.
failure_report.fused.json is the first time the three views describe the model the paper reports, and the result is the thesis rather than a restatement of it:
| Dropped | Induced critical | Silent | Silent rate | Marginal value |
|---|---|---|---|---|
| echo | 174 | 39 | 0.224 | 10.12 |
| ECG | 7 | 6 | 0.857 | 0.81 |
The modality worth almost nothing on average is the one whose loss hides. That is the separation between value and detectability the framework was built to measure, now measured on the reported checkpoint rather than on planted data.
The ridge report inverts both axes, 1.0 silent for drop-echo and 0.271 for drop-ECG, so it would have told the opposite story on both counts. #76 can only be built from this file.
One thing for the paper rather than for the code: 0.857 is 6 of 7 induced-critical cases. The denominator has to travel with that rate wherever it is printed, or it reads as a stable estimate and it is not.
Worth recording that the ridge report came through @kevzho's rerun byte-identical while every torch checkpoint moved, which is what localises that nondeterminism to probe training. Provenance here is internally consistent, 7cae4f92 with the same manifest, so this artifact and the regenerated bundle describe one run.
Merging this needs #74 first, and I have asked there for one docs commit before that.
Summary
The taxonomy, complementarity matrix and loud-vs-silent dropout profile — the three views that are the point of
src/primed_ai/failure/— were only ever produced by the harness's own Ridge. So the project's headline contribution was demonstrated on a model none of the reported tables use, and the two disagree badly enough that it matters: the ridge harness puts drop-echo MAE at117.5where the fused checkpoint gives20.55on the same 245 rows.This adds a
--predictionsroute that reads the per-example dumpevaluate_missing_modality.pyalready writes, so the views describe the checkpoint the paper reports. Nothing is refit. With two modalities the harness only ever asks for the full set and each singleton, and the eval has already scored exactly those three conditions, so it's a re-reading of the reported predictions rather than a second model:full→{echo, ecg}echo_dropped→{ecg}ecg_dropped→{echo}analyze_modality_failuretakes modality names directly now. It never read the embedding values, only the keys, and a caller holding predictions has no arrays to pass —list(embeddings)already did the right thing for both, so it's a rename and a docstring.Two ways this route could quietly lie, both guarded and tested: the sanitized
docs/results/copy has its per-example blocks stripped (it raises instead of half-running), and conditions whose label vectors drift out of order would silently compare different patients. The fused report also gets its own default output dir, so it can't land on top of the ridge one.Refs #79. I'd leave that issue open until the artifacts are regenerated — see Notes.
Notes
feat/eval-artifactsand the diff here is one commit. It depends on theprovenanceblock and thefailure_report.ridge.jsonnaming from that PR. GitHub will retarget the base tomainwhen Real fairness, calibration, and baseline-gap artifacts from the canonical run #74 merges.docs/results/still has nofailure_report.fused.json— the export path and the naming are in place, but the file itself needs a run. That's why I'm not auto-closing [E14] Failure harness on the fused checkpoint's per-example predictions #79: its first acceptance criterion is that the three views exist for the fused checkpoint on the real test fold, and that isn't true until someone reruns.python scripts/run_failure_analysis.py --predictions results/missing_modality.jsonthenpython scripts/export_result_bundle.pywould produce it. No existing metric should move.