Calibrated Interval-Change Tests for Chest X-Rays via Contrastive Subspace Transport

When a radiologist compares today's chest X-ray with last month's, the first question is binary and statistical: has anything actually changed, or is the difference just the patient standing differently? Current longitudinal models do not answer that question as a test. Instead they train a classifier or a report generator end to end and hope it learns the distinction. We propose an explicit change test. Each scan is treated as a cloud of a few hundred image-patch features. The two clouds are compared with optimal transport, a distance that measures how much "mass" must move to turn one cloud into the other. The comparison is made only inside a low-dimensional subspace learned to contain disease change and exclude positioning change. The resulting statistic is calibrated against a null distribution of clinically stable pairs, so that "worse," "better," and "stable" come with a controlled false-alarm rate.

Dimension-independent sample complexity is what makes this workable, and it is the reason the idea is more than a metaphor. One image gives only $n \approx 200$ patch tokens in a feature space of $d \approx 500$ or more dimensions. Plain empirical Wasserstein distance converges at roughly $n^{-1/d}$, so at that size it is mostly noise. Two known fixes make per-pair estimation stable. Entropic regularization gives $O(n^{-1/2})$ error regardless of $d$ (Mena and Weed; Genevay et al.). Projecting to a $k$-dimensional subspace makes the rate depend on $k$ instead of $d$ (Lin et al.). Longitudinal radiology is a natural setting where this few-samples-per-object regime is the binding constraint.

Core Claim

A single subspace $U \in \mathbb{R}^{d\times k}$, shared across patients and learned contrastively from weakly labeled "changed" versus "stable" scan pairs, turns entropic optimal transport between two scans' patch tokens into a reliable test of interval change. The test should be robust to posteroanterior-to-anteroposterior (PA→AP) view switches, need far fewer labels than a supervised classifier, and hold a nominal false-alarm rate on stable pairs.

Existing subspace methods do not do this. Subspace Robust Wasserstein, or SRW (Paty and Cuturi), picks, for each pair of distributions, the subspace in which they differ most. The research file suggests SRW would "ignore positioning noise," but applied per pair it would do the opposite. A PA→AP switch makes the two token clouds differ a great deal, so a per-pair maximizer would lock onto exactly the nuisance we want removed. Our subspace instead maximizes transport on changed pairs relative to stable pairs, including stable pairs that switch views. That is a different objective from Paty and Cuturi's and is the main methodological change.

The Statistic

Let $X=\{(x_i, s_i)\}$ and $Y=\{(y_j, r_j)\}$ be the prior and current patch tokens, where $x_i, y_j \in \mathbb{R}^d$ are frozen-encoder features and $s_i, r_j$ are normalized lung-field coordinates. We define the transport cost

$$c_U\big((x,s),(y,r)\big)=\|U^\top(x-y)\|^2+\lambda\|s-r\|^2,$$

where $\lambda$ sets how far mass may move spatially. This spatial term is a soft, mass-preserving version of the hard neighborhood masks in CoCa-CXR. The change statistic $T_U(X,Y)$ is the debiased Sinkhorn divergence under $c_U$ with regularization $\epsilon$.

The subspace is learned from labeled pair sets $\mathcal{C}$ (changed) and $\mathcal{S}$ (stable, deliberately enriched for view switches):

$$\max_{U^\top U=I_k}\ \frac{1}{|\mathcal{C}|}\sum_{\mathcal{C}}T_U-\frac{\beta}{|\mathcal{S}|}\sum_{\mathcal{S}}T_U,$$

where $\beta$ trades detection power against stability. We optimize this objective by Riemannian gradient ascent on the set of orthonormal frames, differentiating through Sinkhorn. Direction of change (improving versus worsening) comes from the sign of the mean transport displacement projected onto a single "worsening" axis inside $U$, fit by logistic regression on the few labeled MS-CXR-T pairs.

For calibration we do not lean on the entropic central limit theorem of Mena and Weed. Patch tokens within one image are spatially correlated, not independent draws, so the theorem's assumptions fail. We report the theorem-based intervals only as a reference. The main threshold is set by split-conformal calibration on held-out stable pairs, stratified by whether the view changed. The dimension-free rate still matters even without independence. It is the reason the null distribution of $T_U$ is narrow enough to leave room for real change, and Experiment 2 checks that directly.

Research Program

The change subspace is learned from weak labels drawn from MIMIC-Diff-VQA (Expert Knowledge-Aware Image Difference Graph Representation Learning), whose 164,324 image pairs come with difference answers. "Nothing has changed" answers give stable pairs, and answers naming new or resolved findings give changed pairs. View metadata from MIMIC-CXR lets us oversample stable PA→AP pairs. Encoders stay frozen: the BioViL-T image encoder (BioViL-T) and one general-purpose encoder. This keeps the comparison about the distance, not about representation learning.

We will vary $k$, $\epsilon$, $\lambda$, and $\beta$. For choosing $k$ we replace the elbow heuristic that Paty and Cuturi leave open with a criterion on held-out data: the smallest $k$ at which power at fixed false-alarm rate stops improving.

As a secondary application, we will use the test as a gate on a longitudinal report or question-answering model. When the test does not reject "stable," the model is constrained to stable phrasing. This targets the temporal hallucinations described for BioViL-T.

This work is about two-time-point comparison only. It does not address multi-year timelines, and it does not compete with continuous forecasting work such as CRONOS, which predicts future volumes rather than testing for change. It also differs from Unscrambling disease progression at scale, which uses Sinkhorn iterations as a differentiable relaxation of event orderings across a cohort, not as a statistically efficient distance between one patient's two scans. OTCXR uses transport between augmented views of a single scan for self-supervision. That is the closest use of transport on chest-X-ray dense features, but it never compares visits.

Baselines

The naive reference is "always predict stable," together with a threshold on cosine distance between globally pooled embeddings of the two scans. Any method that fails to beat pooled cosine distance has not shown that token-level comparison matters.

The strongest existing method is CoCa-CXR, a contrastive captioner with regional cross-attention between prior and current tokens. It reports 65.0% average progression accuracy on MS-CXR-T (CoCa-CXR). The same paper implies 60.2% for BioViL-T, from its stated 4.8-point margin. CoCa-CXR is trained end to end with far more supervision than our method, so we treat the 65.0% figure as a ceiling reference rather than a like-for-like comparison.

The fair head-to-head baseline is a supervised probe on the same frozen tokens. This is a small cross-attention or concatenate-and-MLP head in the style of Controllable Chest X-Ray Report Generation from Longitudinal Representations. It gets the same MIMIC-Diff-VQA weak labels, the same MS-CXR-T label subsets, and the same hyperparameter search budget as our method. Beating it means one of two things. Either the test has higher accuracy at 1–10% of MS-CXR-T labels while staying within two points at full labels, or it has higher accuracy on view-switch pairs at every label budget. In both cases the test must also hold its stated false-alarm rate on stable pairs, which the probe cannot guarantee by construction.

Distance baselines isolate the transport ingredients. They are unregularized empirical Wasserstein distance on full $d$; entropic transport on full $d$ with no subspace; per-pair SRW; and Maximum Mean Discrepancy (MMD, a kernel two-sample distance) with the same spatial kernel term. Ablations remove the contrastive stable-pair term (setting $\beta=0$), remove the spatial cost (setting $\lambda=0$), and replace the learned $U$ with principal components of the changed-pair displacements.

Why not just…?

Why not just train a classifier on concatenated prior and current features? That is the supervised probe above, and with abundant labels it may well win on raw accuracy. MS-CXR-T has only 1,326 labeled pairs, though. A classifier also produces no calibrated statement about stable pairs, and it can absorb view-switch artifacts as signal. The label-budget curves and the view-stratified split settle whether the test's advantages are real. If the probe dominates everywhere, including on view switches, the proposal's practical claim fails and only the calibration result survives.

Why not just use MMD, which is also dimension-free? This is the most serious threat. Genevay et al. show that Sinkhorn divergences interpolate between transport and MMD, so a large-$\epsilon$ test is close to MMD anyway. We run MMD with the same learned subspace and spatial kernel. If it matches the transport test, we will report that the contrastive subspace and spatial locality are the contribution and transport is optional. The case for transport rests on preserving mass: a lesion that shifts slightly between neighboring regions should cost little, whereas a kernel distance with narrow bandwidth counts the shift as a disappearance plus a new appearance.

Why not just project out the top principal components of stable-pair differences? This cheap nuisance-removal baseline is included as an ablation. It removes high-variance directions but never asks which directions separate changed from stable pairs, so disease-relevant directions that happen to vary under positioning would also be discarded. The comparison on view-switch pairs shows whether that matters.

Why not just prompt a vision-language model with the prior report? Prior-report conditioning helps generation, raising CheXbert factuality from 29.3 to 35.86 in BioViL-T. But Medical Large Vision Language Models with Multi-Image Visual Ability and LUMEN show that untuned models compare images poorly: the NVILA-8B baseline scores about 3.2 on difference questions, versus LUMEN's 4.611. We treat the vision-language model as a downstream consumer of our test, not a competitor for it.

Proposed Experiments

Experiment 1 is three-way progression accuracy on MS-CXR-T, measured as a function of labeled-pair budget (1%, 10%, 100%) and stratified by same-view versus view-switch pairs. No reported result was found on Lacuna for view-stratified MS-CXR-T accuracy, so all stratified numbers will be produced here.

Experiment 2 is the decisive check that the sample-complexity theory is doing work. We subsample patch tokens per image ($n$ from 25 to the full count) and vary feature dimension $d$ through random projections of the encoder output. For each setting we measure the spread of the statistic on stable pairs and detection power at a fixed false-alarm rate. The prediction is that unregularized full-$d$ transport loses power as $d$ grows and $n$ shrinks, while subspace-entropic transport stays roughly flat in $d$. That shape follows from the $n^{-1/d}$ versus $n^{-1/2}$ (or $k$-dependent) rates. If the curves do not separate, the theoretical motivation is irrelevant in practice and we will say so.

Experiment 3 checks calibration. We measure the empirical false-alarm rate on held-out stable pairs against the nominal 5% and 10% levels, both overall and within view-switch pairs. No reported calibration result was found on Lacuna for any longitudinal chest-X-ray model.

Experiment 4 tests whether the subspace matters. We compare the learned contrastive $U$ with per-pair SRW on view-switch stable pairs, expecting per-pair SRW to raise false alarms there. That result would confirm the correction to the "SRW ignores positioning noise" reading.

Experiment 5 measures downstream gains from gating the difference-question model on MIMIC-Diff-VQA, using CIDEr on difference questions (1.027 reported for the image difference graph model) and the rate of "changed" claims on pairs that the test calls stable.