Learning Chest X-ray Edits from Patients' Own Follow-up Scans

When a radiologist reads a follow-up chest X-ray, the report usually describes what changed since the last scan: a pleural effusion has grown, a catheter was removed, an opacity has cleared. This proposal trains an image generator to make exactly that kind of change. It takes a patient's earlier scan plus a structured description of the change, and it renders what the later scan should look like. The training signal comes from real pairs of scans of the same patient taken at two times. The change description is the difference between the two reports' extracted findings, and a language model pre-trained on clinical text encodes it. The result would be an editor for medical images whose edits are anchored in how disease actually evolves in real patients, instead of being invented from a single report or a classifier's gradient. Because the real later scan exists, every edit can also be scored against ground truth.

This matters because existing chest X-ray generators describe states, not changes. Report-conditioned diffusion models (generators that learn by gradually removing noise from random images) such as RoentGen and Cheff render an entire image from an entire report. Chest X-ray editors either transplant pixel patches with no notion of anatomy (Patchhealer) or push along a single linear direction in a low-resolution GAN, which is a generator trained against a discriminator (Saboo et al.). Neither kind of system knows which findings should change, where they should change, or what should stay fixed. A generator that learns "this finding appears at this anatomy, everything else stays" from real follow-ups is useful in three ways: for counterfactual explanations of classifiers, for controlled data augmentation, and for testing whether diagnostic models respond to the right findings.

Core Claim

Diffusion edits of chest X-rays become more precise and more faithful to the true follow-up when two things hold. First, the edit is trained on same-patient longitudinal pairs. Second, the edit is conditioned on a finding-level change, meaning the set difference between the two reports' entity-relation graphs, encoded by a domain-pretrained clinical language model. This beats conditioning on the full target report, on a target class label, or on a general-domain encoding of the same change. The new ingredient is the conditioning object, a change rather than a state, together with the supervision source, real paired follow-ups rather than synthetic or unpaired edits. Domain-specific pre-training plays a narrower, testable role: it is the encoder that must represent terse, telegraphic change statements such as "new left basilar opacity" correctly.

The finding graphs come from RadGraph. It turns radiology reports into Anatomy and Observation entities linked by Located_At, Suggestive_Of and Modify relations, using a PubMedBERT-initialized extractor. On the MIMIC-CXR test set it reports entity F1 of 0.94 and relation F1 of 0.82, and its schema covers roughly 87–92% of report sentences. It also reports expert agreement of only 0.397 Cohen's kappa for relations on CheXpert reports and a drop in extraction quality across hospitals. So the graph delta is a noisy label, and the program must measure how much that noise costs.

Relation to Prior Work

Three lines of work motivate the gap. RoentGen fine-tunes Stable Diffusion on MIMIC-CXR and compares clinical text encoders (RadBERT, SapBERT) against CLIP. It reaches FID 3.6 against 47.7 for unadapted Stable Diffusion, and it notes artifacts on medical hardware. Cheff adds cascaded 1024-pixel synthesis and report-guided inpainting. Both show that domain-adapted text conditioning helps. Both condition on a description of the whole image, and neither uses the patient's own prior scan as an input. This proposal reuses their backbone recipe and changes what the model is conditioned on.

Exemplar editing in natural images supplies the idea of learning an edit, a "verb," from a before/after pair. VISII optimizes a text token from one image pair on top of InstructPix2Pix, at about 540 seconds per edit. REEDIT does this feedforward with a general vision-language model (LLaVA) and CLIP edit vectors, at about 120 seconds, and reports LPIPS 0.26 and SSIM 0.51 on its benchmark. Both infer an edit from one exemplar pair at test time. We instead train on many real pairs, and we express the edit in a clinical vocabulary rather than in CLIP space. General encoders are known to miss subtle continuous abnormalities: BERTHop argues this, and reports a 6.46% gain from swapping general BERT for BlueBERT.

Counterfactual generation both motivates and constrains the design. DVCE steers a diffusion model with classifier gradients to make minimal edits that flip a decision (FID 17.6 on ImageNet). Patchhealer flips a cardiomegaly classifier in 85% of cases by transplanting superpixels, and its authors describe the method as geometrically aware but semantically blind. The constraint these works impose is that flipping a classifier is easy and says little about whether an edit is clinically meaningful. We therefore score against real follow-ups rather than classifier flips alone.

EasyGen injects the hidden states of a large language model into a diffusion model through cross-attention; we reuse that conditioning path. BioBART found that shuffling sentences during pre-training hurt biomedical performance because clinical text depends on its order and structure. That finding motivates one specific design question below: how the condition should be dropped out during training.

Research Program

The data are longitudinal pairs from MIMIC-CXR, which contains repeated studies of the same patients with reports. We take frontal images from consecutive studies of one patient. The follow-up is affinely registered to the prior so that differences in positioning are not learned as "change." Pairs whose registration residual stays high are discarded. RadGraph is run on both reports. The change is the set of Observation–Anatomy tuples present in one graph and absent from the other, each marked as added or removed. The change is serialized as short ordered clinical phrases, for example "added: effusion located_at left base; removed: tube located_at trachea." Pairs whose graphs do not differ form an explicit "no change" class. That class teaches the model to preserve identity and gives a direct measure of how much the model changes images when told to change nothing.

The generator starts from a CXR-adapted latent diffusion model at 512 pixels, trained RoentGen-style. The prior image's latent is concatenated to the noisy input, as in InstructPix2Pix-style editors. The serialized change is encoded by a frozen domain-pretrained encoder (BlueBERT or PubMedBERT, with the BioBART encoder as a generative-LM variant) and fed through cross-attention, with an EasyGen-style adapter. The model is trained to denoise the registered follow-up.

Classifier-free guidance strengthens the condition at sampling time by contrasting conditioned and unconditioned predictions, and it requires randomly dropping the condition during training. We compare two ways of dropping it. Token-level dropout is the usual default. Finding-level dropout removes whole tuples. BioBART's result predicts that token-level corruption will blur which anatomy goes with which finding. Finding-level dropout also enables compositional sampling, where individual findings are guided separately.

The main analysis asks where the edit lands. Off-target change is measured as pixel and perceptual change outside the anatomical region named in the delta, using lung and heart segmentation masks from a separately trained segmenter. On-target change is measured with an independent pathology classifier trained on CheXpert labels, never used in training the editor. We also run RadGraph on reports produced by a held-out report-generation model applied to edited images, to check whether the intended tuple appears and no unintended ones do. This last check is noisy, and it is reported as secondary.

Baselines

The naive reference is the identity edit: return the prior scan unchanged. It has perfect preservation and zero on-target change. It is also a surprisingly strong predictor of the real follow-up, because most anatomy persists. Any method must beat it on similarity to the real follow-up within the target region, or the edit is adding noise rather than signal.

The strongest existing competitor is report-conditioned editing with a RoentGen-style model. It starts from the prior scan, partially noises it (SDEdit-style), or masks and inpaints the named anatomy (as Cheff does), and conditions on the follow-up's full report. This baseline is strongest because it uses the same domain-adapted backbone and the same information, since the target report implies the change. Its only differences from our method are the lack of paired training and the full-state condition. For fairness it is fine-tuned on the same MIMIC-CXR images, with the same encoder, compute and guidance-scale sweep, and its noise strength is tuned on the validation pairs. The reported reference point is RoentGen's FID of 3.6 on MIMIC-CXR. That number is for generation from text, not editing; there is no reported result found on Lacuna for longitudinal edit accuracy on MIMIC-CXR. We count ourselves as beating this baseline if, at matched off-target change, we achieve higher agreement between the edited image and the real follow-up on the target finding, measured as classifier-probability difference and target-region LPIPS. The margin must hold on both MIMIC-CXR and an out-of-institution test.

The second competitor is DVCE-style classifier guidance on the same backbone toward the target pathology label, with the same step budget. Here the published comparison is DVCE's ImageNet FID of 17.6, which is not transferable. We beat it if our edits achieve comparable flip rates, measured against Patchhealer's reported 85% flip rate as context rather than as a matched number, with lower off-target change and closer match to real follow-ups.

A REEDIT-style exemplar editor is run on the prior using a different patient's before/after pair that shows the same finding change. It tests whether a general vision-language model plus CLIP edit vectors suffices. Its reported natural-image figures are LPIPS 0.26 and SSIM 0.51 on the REEDIT benchmark.

Four ablations isolate the proposal's ingredients. The first swaps the domain encoder for general BERT on the identical serialized change. The second replaces the graph change with the report's own free-text comparison sentences. The third conditions on the full target report while keeping paired training. The fourth replaces real pairs with synthetic ones made by generating a patient-matched image from a modified report. Together these separate the contribution of paired supervision, change-form conditioning, structured format and domain pre-training.

Why not just…?

Why not just inpaint the prior scan with the follow-up report, using an existing domain-adapted generator? This is the real threat. It already has domain pre-training and a strong backbone. What it lacks is any training signal about which parts of a patient's image stay fixed across time. It is also told the whole new state, so it tends to re-render findings that did not change. The third ablation, full target report with paired training, and the report-inpainting baseline together settle whether the gain comes from paired data or from change-form conditioning. If paired training with the full report matches our method, the claim shrinks to "train on longitudinal pairs," and we will report it that way.

Why not just use the free-text comparison sentences radiologists already write? Reports often say "interval increase in effusion" directly, and a domain encoder may read these well. That is plausible, and the second ablation tests it head-on. The graph offers two things free text does not: explicit anatomy for measuring off-target change, and separable findings for finding-level dropout and compositional guidance. If free text matches the graph on every metric, we drop the graph from the method and keep it only as an evaluation tool.

Why not just steer with a pathology classifier, as DVCE does? Class labels have no anatomy and no direction beyond "more of this class." Patchhealer shows that classifiers can be flipped with semantically blind edits covering about 30% of pixels. The off-target-change comparison at matched flip rate will show whether classifier guidance buys its flips with collateral change.

Why not just use a general LLM, or a general encoder with LoRA, instead of a clinical pre-trained model? The Python code-generation PEFT study (A Comparative Study of PEFT Methods for Python Code Generation) found that domain pre-training outweighed the choice of fine-tuning method. That result is from code, though, and our encoder only has to read short, templated phrases, where general models may be adequate. The first ablation, plus a LoRA-tuned general encoder at equal tuning budget, measures this directly. We expect the domain-encoder advantage to be smallest here and largest on out-of-institution text.

Proposed Experiments

Training and in-distribution testing use patient-disjoint splits of MIMIC-CXR longitudinal pairs. Out-of-institution testing uses longitudinal pairs from CheXpert and PadChest, drawn from the MaCheX collection. Findings are extracted with the same RadGraph model, so its known cross-hospital degradation becomes part of the test.

The primary metrics are four. Target-finding agreement is the difference between the independent classifier's probabilities on the edited image and on the real follow-up. Target-region and off-target LPIPS and SSIM are computed against the real follow-up and against the prior respectively. The false-change rate is measured on "no change" pairs. FID against real follow-ups tracks realism.

A reader study with radiologists, blinded to method, asks two questions: does the edit show the stated change, and is anything else altered? Given RadGraph's low inter-annotator agreement, we report agreement among readers alongside the scores.

The decisive checks are three. First, the method must beat report-conditioned inpainting on target agreement at matched off-target change, on both MIMIC-CXR and the external sets. Second, the domain encoder must beat the general one on the same serialized change, with the gap expected to widen out of institution. If it does not, the domain pre-training claim fails, even if the editor works. Third, finding-level dropout must reduce edits that land at the wrong anatomy relative to token-level dropout.

A final use test trains a pathology classifier with edited images as augmentation and compares it against augmentation with RoentGen-style generation. RoentGen reports a 5% gain from joint synthetic-plus-real training, which serves as context. This test checks whether finding-specific edits of real patients add more than whole-image synthesis.