Local inputs
Five-lobe patch map
An anatomy-centered 32³ crop encoded with the same weights as the other four lobes.
The colors identify ordered feature slots; they are not segmentation predictions or pathology heatmaps.
Scroll within the table to see all patients.
| Patient | Tier | Age | Sex | Smoking | Visits | Baseline FVC | Slope (mL/wk) |
|---|
Points: observed FVC. Dashed line: clinical-only null
model prediction (walls/null/model.json), if built.
Drag to zoom, double-click to reset, hover for exact values.
Scroll within the table to see all patients.
| Patient | Manufacturer | Model | Kernel | Slices |
|---|
Research output — not a diagnosis.
Astra
is a CT report-generation model trained on 90,678 thoracoabdominal
CT–report pairs. It was not trained or validated on an
IPF cohort, and OSIC is out of its distribution. Across all 175
OSIC scans it produced a report for, 21.7%
(38/175) asserted COVID-19 — impossible for this
pre-2020 cohort — and its wording showed no detectable
relationship to disease severity (Spearman ρ = −0.08 vs
baseline FVC % predicted). On synthetic volumes
containing no anatomy it still invented masses with specific
dimensions: it never declines to report. Read it as a language
model's output on an unfamiliar cohort, not as a radiology read.
Nothing here feeds the modelling pipeline — see
explorer/astra/README.md.
High-contrast wireframes over this patient's real CT. Approximate anatomy-proportional placement only: they show the physical scale and five-slot layout of the local model, not patient-specific lobe segmentations or exact training crops.
GPU-accelerated volume rendering (WebGL2, via Niivue). First load per patient builds and caches a NIfTI volume server-side — can take a few seconds for large series (up to ~1000 slices). Orientation is approximate (voxel-scale-correct, not a full DICOM-orientation-aware affine) — see journal/2026-09-14-hu-range-and-pixel-sanity.md for why slice ordering needed fixing in the first place. Drag to rotate in 3D Render mode; scroll to zoom in any mode. The optional five-region overlay uses translucent browser-generated meshes registered to the displayed volume.
Implemented Stage 1 representation paths
The local model receives one 32³ crop per lung lobe. A shared 3D encoder keeps the five outputs separate as regional tokens, then pools them into a scan vector trained against a frozen full-CT representation. The diagram below distinguishes this patch model from the newer frozen CT-CLIP spatial-feature experiment.
Local inputs
An anatomy-centered 32³ crop encoded with the same weights as the other four lobes.
The colors identify ordered feature slots; they are not segmentation predictions or pathology heatmaps.
Global + local
Feature flow
The pooled five-lobe representation learns to match the frozen full-scan CT-CLIP vector.
Lcos = 1 - cos(zlocal, zglobal)
Optional rank or relational terms can be added, but the implementation rejects enabling both together.
Each projected lobe token is compared only with anatomy-matched regional sentences using a symmetric multi-positive contrastive loss.
LO4 = ½[MPCE(S) + MPCE(ST)]
Repeated descriptions of the same region or content group are treated as positives, not false negatives.
The global vector queries the five retained local tokens through 8-head attention, then adds the result through a learned scalar gate.
zfused = norm(zg + σ(g) Attn(zg, R, R))
This is a separate frozen-feature experiment trained with symmetric image/report contrastive loss, not part of every Stage 1 run.
Current spatial-feature experiment
This path consumes frozen CT-CLIP features rather than raw 32³ patches. Its four-bin regional head preserves coarse within-lobe order; it should not be read as the same network as the patch encoder.
Diagram grounded in stage1_model.py,
stage1_objective.py, stage1_train.py,
fusion.py, and ctclip_spatial_lobes.py.
It explains implemented research code; it is not a clinical workflow
or evidence of model qualification.