A counterfactual explanation shows a clinician how an image would have to change for a diagnostic model to change its answer: the same spine CT with the fracture healed, or the same chest X-ray without the pacemaker. These explanations are useful only if two things hold. They must arrive fast enough to be used during reading, and they must not invent anatomy. Today's diffusion-based explainers fail on both counts. They run dozens to hundreds of sequential denoising steps, and they sometimes produce biologically impossible edits. In one documented case, "healing" a lumbar fracture painted lung tissue onto the lower spine. We argue that these two problems are linked, and that a mechanism from language-model alignment explains both. Likelihood displacement is the finding that training a model to prefer one output over another can push probability onto a third, unintended output. A counterfactual objective that only asks the classifier to prefer the target label over the original label has the same structure. The objective can be satisfied by moving the image toward any region the classifier reads as "not fractured," including thoracic anatomy.
The proposal is to build a one-step counterfactual editor for real-time clinical use and to test a specific prediction. Amortizing counterfactual search into a single fast network, which is exactly what latency demands, should make displacement worse. Per-image iterative guidance can correct itself over many steps. A network trained once over a whole dataset learns the global shortcut toward the third option. We then fix the problem with an adaptive plausibility anchor adapted from displacement-resistant preference objectives. We also test whether a representation-similarity score computed before generation predicts which patients will receive hallucinated explanations.
Core Claim
A counterfactual objective built only on a classifier margin, of the form $m(x') = \log f(c' \mid x') - \log f(c \mid x')$, is under-specified in the way DPO is. Here $x'$ is the edited image, $f$ is the frozen diagnostic classifier, $c$ is the original label and $c'$ is the target label. Nothing in $m$ anchors how plausible $x'$ is for this patient and anatomical location. The file's language-model evidence shows what happens in that case. The paper on unintentional unalignment through likelihood displacement in DPO shows that when preferred and rejected outputs have similar internal representations, probability moves to unintended third options. In that work, refusal rates on SORRY-Bench fell from 74.4% to 33.4% after DPO on similar refusal pairs. Its similarity score, Centered Hidden Embedding Similarity (CHES), flags risky pairs in advance.
We make three claims:
- The lung-on-lumbar hallucination reported for diffusion-autoencoder counterfactuals is an instance of this displacement.
- Its rate rises when counterfactual search is amortized into a one-step editor.
- It is predicted by a CHES-style similarity computed in the classifier's feature space, and largely removed by a plausibility penalty that grows with the size of the plausibility deficit.
The novelty is not "apply DPO to medical images." It is treating counterfactual validity as a relative-margin problem, measuring its displacement failure mode directly, and showing that the fast regime makes the failure worse.
Research Program
Building the editor. We build an amortized editor $G_\phi(x, c')$ that maps a factual image and a target label to a counterfactual in a single network evaluation. Two backbones are planned:
- MeanFlow backbone. The main variant is initialized from a MeanFlow model. MeanFlow learns average rather than instantaneous velocity so that it can generate in one step without distillation. It reached a one-step FID of 3.43 on ImageNet 256×256. We train it on the medical domain.
- Fallback backbone. A fallback variant edits the semantic latent of a diffusion autoencoder and decodes in few steps. It exists because work on the MeanFlow curvature bottleneck warns that highly curved target distributions break one-step transport. That work constrains our design: if one-step fidelity on CT fails, the displacement study still runs on the few-step editor.
Measuring plausibility. Plausibility is measured by a frozen, multi-step diffusion model conditioned on anatomical context $a$. For example, $a$ is the vertebral level in VerSe or the view position in chest X-rays. We use its denoising-based likelihood estimate $\log p(\cdot \mid a)$ and define the deficit as
$$\Delta(x, x') = \log p(x' \mid a) - \log p(x \mid a),$$
which is negative when the counterfactual is less plausible for that anatomy than the original image was. Conditioning on $a$ is the point of the design. Lung tissue is plausible in a thoracic crop and implausible in a lumbar one, so an unconditional density could miss exactly the failure we care about.
Training objective. The editor is trained with
$$\mathcal{L}(\phi) = \mathbb{E}_x\Big[-\log \sigma\big(\beta\, m(x')\big) + \tfrac{\lambda}{2}\,\min\big(0, \Delta(x, x')\big)^2\Big], \quad x' = G_\phi(x, c'),$$
where $\sigma$ is the logistic function, $\beta$ is a margin temperature and $\lambda$ weights the anchor. The quadratic one-sided penalty follows the logic of SquaredPO. SquaredPO uses $f(t)=\tfrac12(\log t)^2$ so that the corrective gradient grows as the preferred response's likelihood ratio drops. Its authors show this prevents the collapse DPO suffers under extended training on TL;DR: DPO fell from about 52% to about 35% win rate against the base model, while SquaredPO stayed at about 51%. We reuse the mechanism and change what is anchored. They anchor a text response's probability; we anchor an image's anatomically conditioned plausibility. Our penalty is also one-sided, because counterfactuals that become more plausible are harmless. A proximity term, LPIPS to $x$, is kept in all variants so that no method wins by ignoring patient identity.
Predicting risk before generation. In parallel, we compute a CHES analogue for each patient. It is the centered similarity between the classifier's penultimate-layer embedding of $x$ and the embeddings of its nearest target-class training images. The test is whether this score, computed before any generation, predicts which cases a margin-only editor will hallucinate on. This is the image counterpart of the text-model finding that high-CHES pairs are the ones that displace.
Baselines
Naive reference. The do-nothing reference is the margin-only one-step editor, trained with the objective above at $\lambda = 0$ and with the same LPIPS proximity term. It is the natural thing anyone would build for speed. Our hypothesis predicts it hallucinates most, so it is both the naive reference and the main ablation of the key ingredient.
Multi-step baseline. The second baseline is linear traversal in a diffusion autoencoder's semantic latent with DDIM decoding, as in diffusion-autoencoder counterfactuals. That paper reports VerSe reconstruction LPIPS of 0.040, against 0.098 for StyleGAN2, and fracture AUC of 0.96 for a linear probe on its latent. It is the published method on our primary dataset and the source of the hallucination we are explaining.
Strongest existing method. The strongest competitor is FastDiME. It guides the reverse diffusion chain with classifier gradients taken through one-step denoised estimates and confines edits with a self-optimized soft mask. It reports processing 1,000 images in about 35 minutes, against more than 12 hours for earlier diffusion counterfactuals. By our arithmetic from those figures this is roughly 2 seconds per image. It also reports that removing a pacemaker dropped a shortcut-trained classifier's confidence from 0.80 to 0.19. It is the strongest baseline because it already addresses both latency and off-target edits, the latter through masking.
Fairness. All methods use the same frozen classifier, the same training images for any generative component and the same GPU. Each method gets an equal hyperparameter budget, tuned on a shared validation split. We report its time per image alongside ours.
Ablations. Two ablations isolate our ingredient:
- Fixed-weight anchor. Replace the quadratic anchor with a linear plausibility term, $-\lambda\Delta$, whose gradient is constant. This is the image analogue of adding SFT regularization to DPO.
- Bounded-winner anchor. Replace the anchor with the mixture lower bound used by Diff-BDPO. That paper showed winner-likelihood collapse and blurring in diffusion DPO. It reports that its simpler variant raised PickScore on SD1.5 to 22.24 from 21.01 for Diffusion-DPO.
What counts as winning. Beating FastDiME means two things together. The first is a lower off-target hallucination rate at matched classifier-flip rate and matched LPIPS. The second is at least an order of magnitude lower time per image. Beating the fixed-weight ablation at matched flip rate is what shows that the adaptive shape of the anchor, and not merely its presence, is responsible.
Why not just…?
Why not just use saliency maps, which are already instantaneous? Saliency maps answer a different question. FastDiME reports that SmoothGrad-style maps are diffuse and give no quantitative measure of a feature's influence. The diffusion-autoencoder study notes they cannot depict an alternative patient state or ordinal progression. We include SmoothGrad in the shortcut-detection comparison, which asks whether the method ranks pacemaker-reliant classifiers correctly, but not as a competitor for counterfactual images.
Why not just filter hallucinated outputs with an anatomical segmenter after generation? This is a real threat, and we treat it as a baseline rather than dismissing it. A filter detects bad counterfactuals but does not produce good ones. We therefore measure yield: the fraction of patients who receive a valid, plausible counterfactual within a fixed compute budget, with a margin-only editor plus rejection-and-resample. If filtering matches our yield at equal wall-clock time, the anchored objective is unnecessary and we will say so. We expect it to fail specifically on high-CHES cases, where resampling from a displaced editor keeps landing on the third option. Filtering also needs a separate segmenter for every anatomy.
Why not just use the multi-step guided method with more steps? Per-image iterative guidance may displace less, and our hypothesis predicts exactly that. The cost is the latency the clinical setting cannot absorb. We report hallucination rate against the number of network evaluations for the diffusion autoencoder and FastDiME at several step counts, which traces out the trade-off our editor has to beat. If our one-step editor cannot reach the hallucination rate of the many-step methods, the result is a characterized trade-off rather than a free lunch.
Why not just add a fixed plausibility or reconstruction penalty? This is the direct analogue of adding SFT loss to DPO. In text it underperformed CHES filtering on SORRY-Bench (likelihood displacement study), and DPO still collapsed on TL;DR under its own regularization (nonconvex f-divergence study). Images might behave differently. The fixed-weight ablation, swept over $\lambda$, settles it: if some fixed weight matches our Pareto front of flip rate against hallucination rate, the adaptive shape adds nothing.
Proposed Experiments
Datasets and hallucination labels. The primary testbed is VerSe CT, where the documented hallucination lives. Here "off-target hallucination" is labeled by a tissue classifier and vertebra segmenter applied outside the fracture region. A blinded radiologist audits a random subset to estimate label error.
The second testbed is the chest X-ray pacemaker shortcut on CheXpert and NIH (CheXpert). It follows FastDiME's protocol and measures changes outside the device mask and the shift in classifier confidence. No reported off-target-change rate for FastDiME was found on Lacuna for this benchmark, so we rerun it. RetinaMNIST ordinal grading is a third, diffuse-pathology setting where FastDiME's masks are known to struggle. No reported counterfactual result was found on Lacuna for RetinaMNIST.
Metrics. We report:
- classifier flip rate;
- off-target hallucination rate;
- LPIPS to the factual image;
- anatomically conditioned plausibility deficit;
- number of network evaluations and wall-clock time per image.
Decisive checks. Three checks decide the proposal:
- Does amortization amplify displacement? At matched flip rate, the margin-only one-step editor should hallucinate more than per-image iterative guidance. If it does not, the core causal story is wrong.
- Does the CHES-analogue score predict it? Its AUROC for predicting which patients hallucinate under the margin-only editor should clearly exceed that of pixel-space distance to the nearest target-class image. This mirrors the text finding that edit distance failed where CHES succeeded.
- Does the adaptive anchor fix it? It should move the Pareto front of flip rate against hallucination rate beyond both the fixed-weight and bounded-winner ablations. It should do so while keeping one-step latency and proximity comparable to FastDiME.
A small reader study with radiologists rating anatomical plausibility on VerSe and CheXpert provides the final check that the automatic hallucination label tracks clinical judgment.
References
- Unintentional Unalignment: Likelihood Displacement in Direct Preference Optimization
- Counterfactual Explanations for Medical Image Classification and Regression using Diffusion Autoencoder
- Mean Flows for One-step Generative Modeling
- Overcoming the Curvature Bottleneck in MeanFlow
- Displacement-Resistant Extensions of DPO with Nonconvex $f$-Divergences
- Fast Diffusion-Based Counterfactuals for Shortcut Removal and Generation
- Diffusion Negative Preference Optimization Made Simple
- CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison