Inspiration
Medical imaging research has a chicken-and-egg problem: you cannot train or fairly evaluate a detector for a rare vascular finding without labeled examples, but the labeled examples barely exist. So we flipped the question. Instead of chasing scarce disease labels, we asked a bounded, honestly-answerable one:
Under controlled image-domain conditions, when can a compact PET/CT model localize a simulated vascular-like FDG source in a healthy scan, and what can deterministic code actually measure about it?
VascuTrace is our answer — a reproducible method-development prototype, not a diagnostic system. It is a research prototype trained and evaluated on simulated vascular-like sources, and no result here establishes clinical sensitivity, specificity, or patient benefit.
The second inspiration was about how rigorous research gets built. We wanted to see whether an AI agent could own the parts of research that usually bottleneck a small team — planning, architecture, scientific review, and report writing — while keeping a hard line: generated language must never be able to change a measured number. That "Work, Life and Productivity" angle — using Codex and GPT-5.6 as a disciplined research engine — is as much the project as the model is.
What it does
VascuTrace is an end-to-end PET/CT research pipeline on the public QUADRA healthy
test/retest cohort (Zenodo 16686025: 48 subjects, 96 sessions, 960 NIfTI files):
- Physical-coordinate geometry — PET and CT live on different grids, so every multimodal op uses patient RAS coordinates and named transforms, never matching array indices.
- Controlled synthetic-source engine — inserts a parameterized vascular-like FDG source (radius, uptake multiplier, blur) into raw SUV, giving ground truth by construction.
- A 2.5-D shared-weight Siamese U-Net ("B2", deep supervision) that reads five
adjacent PET and CT slices per bilateral branch and emits an uncalibrated
abnormality_scoremap. - Deterministic 3-D quantification that returns SUV statistics — or structured nulls with explicit QC reasons, never silent zeros.
- A product layer with an auditable tool trace, an executable evaluation suite, and a verifier that rejects any generated report whose numbers or claims drift.
On a freshly rebuilt, leakage-verified held-out validation cache (90 positive slices), the trained model reproduced the reported behavior:
| Metric | This run (real held-out) | Reported |
|---|---|---|
| Mean positive IoU | 0.583 | 0.615 |
| Component precision | 0.885 | 0.926 |
| Component F1 | 0.914 | 0.943 |
| Target-overlapping | 86 / 90 (95.6%) | 75 / 78 (96.2%) |
We report the misses too — the honest spread matters more than one aggregate.
How we built it
The division of labor was deliberate:
- Codex, powered by GPT-5.6 (
gpt-5.6-sol), owned every non-coding role: planning and architecture, primary technical decisions, scientific and critical review, report writing, and Git/release handling. It converted the research goal into bounded plans with explicit acceptance checks. - Claude implemented code only from those Codex-authored plans.
- The team kept final authority over every scientific, licensing, and submission decision.
The sanitized public receipt covers 11 Codex sessions on GPT-5.6 — 5,654 tool calls, 654 code patches, 629 bounded reviews, over 28,000 structured source records and 123.76 observed hours.
The core engineering principle is that measurement code is physically separate from generated prose. Numbers come from pure, side-effect-free functions; the language model may write interpretation, but a deterministic verifier compares every reported value against the source within tolerance and rejects prohibited claims. For example, laterality asymmetry is a fixed formula, not a model opinion:
\( \text{asymmetry_index} = \dfrac{\bar{S}{\text{target}} - \bar{S}{\text{contra}}}{\bar{S}_{\text{contra}} + \varepsilon} \)
and physical volume comes straight from the affine determinant, never a hardcoded spacing:
$$ V_{\text{mL}} = \frac{N_{\text{vox}} \,\lvert \det(A_{3\times3}) \rvert}{1000}. $$
Stack: Python 3.13, PyTorch + MONAI, NumPy/SciPy, nibabel/SimpleITK, Streamlit,
Pydantic, the Model Context Protocol, uv/ruff/pytest — 735 offline tests pass
deterministically on CPU with no data or weights required.
Challenges we ran into
- A 14 GB memory wall. Cropping one whole-body session peaked at ~14 GB and
OOM-killed our machine, blocking the entire real-data path. The culprit was the RAS
canonicalization: an exact signed-permutation remap that was materializing dense
whole-volume
float64coordinate grids. We replaced it with a transpose + per-axis flip — provably bit-identical (verified against the old path) — cutting the peak to ~3.6 GB and unblocking everything. - A data-leakage trap. The dataset split uses seed
20260713, but the training seed is20260716. Naively reusing the training seed would have put training subjects into the "held-out" evaluation. We caught it and verified every evaluated subject was genuinely held out. - Honest reproduction, not cherry-picking. Our independently rebuilt cache lands close to the reported numbers but not identical — and we show exactly why (a 15-vs-13-bundle cache and a known legacy-reflection gap) rather than papering over it.
- Keeping the scientific boundary intact end-to-end — every artifact carries the "simulated, not clinical" warning, and invalid measurements stay as structured nulls.
What we learned
- Determinism is a feature, not a constraint. Making measurement code incapable of being rewritten by an LLM — rather than merely instructing it not to — is what makes the pipeline trustworthy.
- AI can own the research scaffolding. Codex/GPT-5.6 tracing requirements, catching a statistical defect, and assembling an evidence-classed report genuinely accelerated the work — while a human kept final authority.
- Read the seeds. In imaging ML, a one-line seed mismatch is the difference between a held-out result and accidental leakage.
- Efficiency is correctness-adjacent. A ~14× memory blow-up hid inside an "obviously cheap" axis permutation.
What's next
The report is explicit about what would be needed before any promotion claim: native-space 3-D mask stitching, 26-connected component matching, a subject-clustered bootstrap on a sealed test split, a promotion-compliant threshold baseline, and wiring the standalone 3-D quantifier into the product path. Until then, VascuTrace is what it says it is: a disciplined, reproducible research prototype on simulated sources — not a diagnosis.
Log in or sign up for Devpost to join the conversation.