OSIC Data Explorer

Disease background

IPF: a deadly lung-scarring disease, tracked with a noisy test

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.

3.8 yrsMedian survival after diagnosis, US patients aged 65+ 1
46%Alive 5 years after diagnosis 2
210–240 mLFVC lost per year without treatment 4
–OSIC follow-up readings higher than the visit before
1

Scar replaces lung tissue

Soft, elastic lung tissue is gradually replaced by scar. The cause is unknown, which is what “idiopathic” means.

2

Lungs stiffen and shrink

Scarred lungs are stiff, so each breath holds less air. Patients become breathless and often need oxygen.

3

FVC falls

The lost volume shows up as a falling FVC: the air a person can blow out after the deepest possible breath.

4

Slowed, not stopped

Current drugs slow the decline by about half. A lung transplant is the only treatment that changes the course.

1

How serious is IPF?

Survival after an IPF diagnosis is in the same range as several common cancers.

Alive 5 years after diagnosis

published statistics

Reading this comparison

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

2

What FVC measures

Take the deepest possible breath, then blow out as hard and as long as possible. The total volume blown out is the FVC.

One forced breath, recorded by a spirometer

schematic

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.

Why the test is noisy

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

3

FVC readings bounce around

Real OSIC data 6: readings move up and down far more than the disease itself changes over the same time.

Same patient, same week, two readings

OSIC Tier A

Change from one visit to the next

OSIC Tier A

Three typical patients over one year

same scale in every panel

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.

When does the decline beat the noise?

OSIC Tier A

Why trials last a year

4

Patients decline at very different speeds

Some lose almost nothing in a year; others lose more than half a litre.

Yearly FVC change per patient

OSIC Tier A

Why this matters for trials

5

Treatment slows the decline but does not stop it

Approved drugs roughly halve the yearly loss of lung volume.

Yearly FVC loss in the nintedanib trials

published trials

A small effect inside a noisy measurement

Sources

  1. Raghu G, et al. Idiopathic pulmonary fibrosis in US Medicare beneficiaries aged 65 years and older: incidence, prevalence, and survival, 2001–11. Lancet Respir Med 2014;2(7):566–572. PubMed 24875841
  2. Zheng Q, et al. Mortality and survival in idiopathic pulmonary fibrosis: a systematic review and meta-analysis. ERJ Open Res 2022;8(1):00591-2021. Pooled 5-year survival 45.6% (95% CI 41.5–49.7). PMC8918939
  3. National Cancer Institute. SEER Cancer Stat Facts: 5-year relative survival for patients diagnosed in 2016–2022, all stages combined. seer.cancer.gov/statfacts
  4. Richeldi L, et al. Efficacy and safety of nintedanib in idiopathic pulmonary fibrosis (INPULSIS-1 and INPULSIS-2). N Engl J Med 2014;370(22):2071–2082. PubMed 24836310
  5. Graham BL, et al. Standardization of spirometry 2019 update: an official ATS/ERS technical statement. Am J Respir Crit Care Med 2019;200(8):e70–e88. PubMed 31613151
  6. OSIC Pulmonary Fibrosis Progression dataset (Kaggle, 2020), Tier A patients as analysed in this project. kaggle.com
  7. Mazurek JM, et al. Idiopathic pulmonary fibrosis mortality by industry and occupation — United States, 2020–2022. MMWR 2025;74(7):109–115. 38,869 deaths with IPF as the underlying cause. cdc.gov
  8. Richeldi L, et al. Nerandomilast in patients with idiopathic pulmonary fibrosis (FIBRONEER-IPF). N Engl J Med 2025;392(22):2193–2202. PubMed 40387033; US approval: FDA letter, NDA 218764, 7 Oct 2025

OSIC charts use the 136 Tier A patients only; the 40 Tier B gate patients remain sealed.

Patients

Scroll within the table to see all patients.

Patient Tier Age Sex Smoking Visits Baseline FVC Slope (mL/wk)

Select a patient

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

Predict FVC change near week 52 without updating a CT encoder

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.

Observed versus predicted FVC change

in-sample fit

The dotted diagonal marks perfect prediction; points closer to it are more accurate.

Patient-level error change

per patient

Positive values mean the frozen-CT fusion reduced absolute error for that patient; negative values mean clinical-only was better.

Eligible patients

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

Select a patient

Lines connect observed measurements only. Diamonds are each model's predicted FVC at that patient's endpoint week.

Prognostic enrichment

Enroll the patients most likely to decline

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.

Tier B sealed No gate patient was used for model selection, weighting, or UI optimization.

Decline enrichment

most negative predicted change

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.

Enrichment detail

Selected Model Patients Observed mean Δ ≥200 mL decline

How enrichment works

Patients

Scroll within the table to see all patients.

Patient Manufacturer Model Kernel Slices

Select a patient

Generated report Astra

Checking report service...

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.

Select a patient to load its volume

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

One global scan view, five anatomy-ordered local views

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.

5lobe patches
32³voxels each
512feature width

Local inputs

Five-lobe patch map

illustrative
Right upper lobe

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

Scan representation at a glance

code-backed
CT volumesame examination
GLOBAL TEACHER Frozen CT-CLIP full scan → 512-D target
LOCAL STUDENT Shared 3D patch encoder 5 crops → 5 regional tokens
R1R2R3 R4R5
mean or scalar-attention pooling
zglobalfrozen target
↔
zlocaltrainable output
What is shared? The 3D convolution weights are shared across lobes. A learned lobe ID embedding preserves which token came from which anatomical region.

Feature flow

Patch model and its training signals

not to scale
INPUTS
Full CTglobal context
5 lobe crops[B, 5, 32, 32, 32]
ENCODERS
frozen CT-CLIP visual tower full-volume representation
trainable + shared 3× Conv3D blocks 16 → 32 → 64 channels
FEATURES
Global target zglobal ∈ R512
Regional tokens
R ∈ R5×512 + lobe IDs
HEADS
Scan pooling mean / learned scalar attention zlocal ∈ R512
Regional projection LayerNorm + Linear 5 projected tokens
OBJECTIVES
O2 Scan alignment local ↔ frozen global
O4 Regional text alignment lobe token ↔ matched sentence
O2

Scan-level distillation

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.

O4

Lobe-to-text alignment

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.

F

Bounded fusion experiment

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

Frozen token lattice → ordered within-lobe features

separate path
Frozen CT-CLIP tokens 24 × 24 × 24 × 512
→
Lobe-mask weighting five ordered anatomical masks
→
4 bins per lobe inferior/superior × central/peripheral
→
Separate heads scan head + regional head

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.