Scar replaces lung tissue
Soft, elastic lung tissue is gradually replaced by scar. The cause is unknown, which is what “idiopathic” means.
Disease background
Idiopathic pulmonary fibrosis (IPF) slowly replaces healthy lung tissue with scar. The lungs stiffen and hold less air, breathing gets harder, and many patients die within a few years of diagnosis. The disease is tracked with a simple breathing test, forced vital capacity (FVC), whose readings bounce around from visit to visit.
Soft, elastic lung tissue is gradually replaced by scar. The cause is unknown, which is what “idiopathic” means.
Scarred lungs are stiff, so each breath holds less air. Patients become breathless and often need oxygen.
The lost volume shows up as a falling FVC: the air a person can blow out after the deepest possible breath.
Current drugs slow the decline by about half. A lung transplant is the only treatment that changes the course.
Survival after an IPF diagnosis is in the same range as several common cancers.
More than half of IPF patients die within five years of diagnosis, placing IPF between stomach and ovarian cancer on this chart. 2,3
Grey bars: US cancer patients diagnosed in 2016–2022. 3 Red bar: 62 studies with 63,307 IPF patients in 20 countries; the thin line shows the likely range. 2
The cancer figures leave out deaths that would have happened anyway; the IPF figure counts every death. Measured the cancer way, IPF would score somewhat higher, so read this as “same range”, not an exact ranking.
In US Medicare patients aged 65 and over, half were still alive 3.8 years after an IPF diagnosis. 1 The CDC counted about 13,000 US deaths a year from IPF in 2020–2022. 7
Take the deepest possible breath, then blow out as hard and as long as possible. The total volume blown out is the FVC.
Curve shapes are illustrative. Plateau heights are OSIC Tier A medians: the predicted value for a healthy person of the same age, sex and height, and the measured value at enrollment.
The result depends on effort. Coaching, motivation, tiredness and even a passing cold change the number.
A test session needs at least three blows. The two best may differ by up to 150 mL and still pass the international quality standard. 5
Real OSIC data 6: readings move up and down far more than the disease itself changes over the same time.
Chosen automatically: the Tier A patients whose yearly decline and visit-to-visit wobble are both closest to the cohort median. Dots are readings; the dashed line is each patient's straight-line trend.
Some lose almost nothing in a year; others lose more than half a litre.
Approved drugs roughly halve the yearly loss of lung volume.
OSIC charts use the 136 Tier A patients only; the 40 Tier B gate patients remain sealed.
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.
Frozen foundation-model embeddings
Cached TANGERINE and CT-CLIP representations are fused with enrollment clinical variables through a PLS readout with FiLM-style CT × clinical interactions, fitted on all eligible Tier A patients. No CT encoder is retrained, and the 40-patient Tier B gate remains sealed.
The dotted diagonal marks perfect prediction; points closer to it are more accurate.
Positive values mean the frozen-CT fusion reduced absolute error for that patient; negative values mean clinical-only was better.
Only patients with a baseline visit within ±13 weeks of CT week 0 and an endpoint within ±13 weeks of week 52 are shown.
| Patient | Baseline FVC | Observed Δ | Clinical prediction Δ | CT + clinical prediction Δ | Error gain |
|---|
Lines connect observed measurements only. Diamonds are each model's predicted FVC at that patient's endpoint week.
Prognostic enrichment
Each eligible patient is ranked by held-out predicted 52-week FVC change. Ranking with frozen CT embeddings plus clinical variables selects cohorts with much larger observed decline than ranking with clinical variables alone.
Observed mean FVC change among patients selected by each model's predicted decline. More negative values indicate a higher-decline cohort, not a treatment-responsive subgroup.
| Selected | Model | Patients | Observed mean Δ | ≥200 mL decline |
|---|
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.