Training MRI Purifiers Without Clean Scans

Deep networks that reconstruct MRI images from fast, partial scans can be knocked badly off course by small, carefully chosen corruptions of the raw scanner data. The most effective fix so far is a purifier: a diffusion model (a generator that learns to turn random noise into images by removing noise step by step) placed in front of the frozen reconstruction network. The purifier partly noises the incoming image and then denoises it back onto the space of realistic anatomy. This defense has one hidden requirement. The purifier must first be trained on large sets of fully sampled, clean scans, and in many clinical and scientific settings those scans are exactly what cannot be acquired.

This note proposes to train the purifier from undersampled scans alone. Each training scan is incomplete, and its holes fall in different places. We hold out part of each scan's measured data as a supervision target, and we train three parts together as one generative model: a compact encoder, a decoder, and a diffusion prior over the encoder's outputs. The central argument is that in this setting, training all three jointly is required rather than optional. When the loss only checks measured frequencies, nothing in the reconstruction term tells the decoder what to put in the unmeasured part of the image. The learned prior, pooled across many scans with different sampling patterns, is the only component that fills those gaps. We also make the decoder's weights uncertain rather than fixed. Where the prior is guessing, the system can then say so, and it can scale back how aggressively it purifies.

Core Claim

A latent diffusion purifier trained end to end from measurement-split undersampled k-space (the raw frequency-domain MRI data), with no fully sampled references, can defend frozen MRI reconstructors against worst-case k-space perturbations and acceleration shifts. We expect it to come within a small margin of a purifier trained on clean data. It should also preserve small pathologies better than a purifier trained on pseudo-clean images produced by a self-supervised reconstructor. Uncertainty over the decoder's weights, measured as disagreement between sampled weight settings, should localize the regions where the purifier invents structure.

The closest existing system is RODIO. It purifies aliased zero-filled MRI images with a pixel-space score model and physics data-consistency projections, and it selects the purification depth $t^*$ with a distribution-distance test. RODIO's purifier is trained on fully sampled knee scans. It is a separate stage from the reconstructor, and its weights are deterministic. Our proposal keeps RODIO's plug-in placement and its data-consistency step. It changes how the purifier is obtained (no clean data), what it models (a jointly learned latent prior), and what it reports (per-region epistemic uncertainty).

Why Joint Training Is the Mechanism, Not Decoration

The method rests on two lines of work. The first is joint latent diffusion. LSGM trains an encoder, a decoder and a latent score model under a single evidence lower bound, and it reports 2.10 FID on CIFAR-10. We borrow its objective and its mixed score parameterization. We replace its pixel reconstruction term, which assumes clean targets exist.

The second line is self-supervision without ground truth, and it sets the constraints. Self-supervised physics-based MRI reconstruction splits each scan's measured k-space into an input set $\Theta$ and a loss set $\Lambda$, and it finds a 60/40 split works best. Equivariant Splitting shows that splitting alone cannot recover the part of the image the scanner never sees (the nullspace of the forward operator). It adds equivariance to rotations and similar transforms and proves this combination gives an unbiased estimate of the supervised loss. On DIV2K inpainting it reaches 27.45 dB against 28.46 dB supervised.

We write the training loss for scan $i$ as

$$\mathcal{L}_i = \big\| P_{\Lambda_i} A_i D_\theta(z) - y_{i,\Lambda_i} \big\|^2 + \lambda_{\mathrm{eq}}\, \mathcal{L}_{\mathrm{eq}}(\theta,\phi) + \mathrm{CE}_\psi(z), \qquad z \sim q_\phi(z \mid A_i^{H} y_{i,\Theta_i}).$$

The symbols are defined as follows. $y_i$ is the measured k-space. $A_i$ is the forward operator, meaning coil sensitivities, Fourier transform and sampling mask. $P_{\Lambda_i}$ keeps only the held-out loss frequencies. $q_\phi$ is the encoder applied to the zero-filled image built from the input frequencies. $D_\theta$ is the decoder. $\mathcal{L}_{\mathrm{eq}}$ is the Equivariant Splitting consistency term under random rotations and flips. $\mathrm{CE}_\psi$ is LSGM's cross-entropy between the encoder's latent distribution and the diffusion prior with score network $\psi$.

The first term puts no constraint on $D_\theta$ in directions that $A_i$ cannot see. Those directions are shaped only by $\mathrm{CE}_\psi$, which pulls latents toward regions the prior finds likely, and by $\mathcal{L}_{\mathrm{eq}}$. A two-stage pipeline trains the autoencoder first on the first term alone, so its nullspace content is arbitrary. The prior trained afterwards then learns to model that arbitrary content. This argument is testable, and the ablation below tests it.

ReSample is a constraint. It shows that measurement consistency through a nonlinear decoder is non-convex, and it solves this with hard optimization over latents initialized by Tweedie's formula. We reuse its hard data-consistency step at purification time. The risk it raises for training is that an encoder maps aliasing artifacts into latents that the prior then learns to reproduce. We monitor this directly as aliasing energy in the decoded images.

Uncertain Weights Where They Pay Off

Making every network Bayesian would be expensive and unstable. VeBNN shows that jointly fitting a mean and a variance has saddle-shaped loss surfaces. Adversarial Sampling shows that random weight draws from the tails of the distribution drag performance down. It fixes this by training against worst-case reparameterization noise, raising CIFAR-100 ensemble accuracy from 53.21% to 58.63%.

We therefore put a variational distribution only on the last blocks of the decoder, trained with Adversarial Sampling's worst-case weight-noise term. The encoder and score network stay deterministic. Following VeBNN's staged recipe, we first fit a noise-variance map from the held-out residuals on $\Lambda$. That map is then held fixed while the weight distribution is fit. This keeps measurement noise (aleatoric) separate from the model's ignorance (epistemic).

At test time, the spread of decoded images across weight samples gives an epistemic map. We use it for two purposes. It is an output reported to the reader of the scan. It also sets purification depth: $t^*$ is lowered when epistemic spread in the nullspace is high. This matters because When Does Diffusion Purification Amplify Perturbations? shows the gap between clean and attacked trajectories peaks mid-trajectory, rising from about 2.1 to about 26.0 over a 200-step run. Deep purification is therefore riskiest exactly where the prior is weakest. The uncertainty-driven $t^*$ competes directly against RODIO's distribution-distance selector.

Research Program

The build has three parts.

The first is the joint purifier. It combines an LSGM-style latent model with a small NVAE-like backbone at 320×320 knee resolution, the splitting loss, the equivariance term, and the Bayesian decoder head. It is trained on fastMRI knee multi-coil data after retrospective undersampling at 4× with per-scan random masks. The fully sampled references are withheld from training entirely and used only for evaluation. We build on the Equivariant Splitting code for splitting and transforms. We use the SMRD code for sensitivity-map estimation and score-based data consistency.

The second is the purification procedure. Following RODIO, we noise the latent of the zero-filled input to $t^*$ and run a shortened reverse process with ReSample-style hard consistency to the measured k-space. We then hand the result to a frozen reconstructor (MoDL and a VarNet-class model) that we never modify.

The third is the analysis. We ask whether joint training actually changes nullspace content relative to two-stage training, whether epistemic spread tracks true error, and whether the purifier survives adaptive attacks. The attacks differentiate through the purifier using DiffPure-style adjoint gradients and average over weight samples, so that the defense's randomness does not hide the gradient and give a false sense of security.

Baselines

The naive reference point is the frozen reconstructor with no defense. On fastMRI knee under PGD k-space noise at $\epsilon=0.02$, vanilla MoDL falls to 22.28 dB PSNR (RODIO). We rerun this under our exact attack, masks and coil maps, and do not rely on the transcribed value.

Adversarial training of the reconstructor is the non-modular competitor. RODIO reports 29.47 dB for it under the same attack, and at most about 23 dB when a model trained at 4× is tested at 2×. We rerun it with PGD in the training loop at matched GPU-hours.

The strongest existing method is RODIO itself, at 32.88 dB under the $\epsilon=0.02$ PGD attack and about 32 dB under the 4×→2× shift. It is run with its purifier trained on fully sampled knee data. Because it uses information our method forbids itself, it serves as an oracle upper bound rather than a fair competitor. Matching it within about 1 dB without clean data would be the headline result.

The fair strongest competitor is a pseudo-clean RODIO. We train Equivariant Splitting on exactly our undersampled data, treat its reconstructions as clean images, and train a RODIO pixel purifier on them. It gets the same data, the same GPU-hour budget and the same number of hyperparameter trials.

Two ablations isolate the proposal's key ingredients. The first is two-stage training: the autoencoder is trained with the splitting and equivariance terms, frozen, and then a latent diffusion model is trained on top. Everything else is held fixed. The second removes weight uncertainty: a deterministic decoder, with $t^*$ chosen by RODIO's selector.

Beating the fair baselines means three things. Under adaptive attack, we need higher PSNR and SSIM than pseudo-clean RODIO and the two-stage ablation, with the difference holding across three training seeds. We need higher lesion-region PSNR on fastMRI+ brain scans. We need an epistemic map that predicts error better than the ensemble alternative described below.

Why not just…?

Why not just adversarially train the reconstructor? It needs no generative model and no clean data. RODIO's numbers, however, show it trailing purification by about 3.4 dB under PGD and collapsing under acceleration shift, and it gives up modularity because every deployed reconstructor must be retrained. We include it at matched compute. We expect it to stay competitive only on the exact attack it was trained against.

Why not just train a RODIO purifier on self-supervised reconstructions as if they were clean? This is the most serious threat. It is simple and could plausibly work. Our reason to doubt it is that Equivariant Splitting's outputs carry that reconstructor's own biases in the unseen part of the image, typically smoothing, as the self-supervised MRI literature cautions. A purifier trained on them would learn to project inputs onto a smoothed manifold and erase small lesions. The lesion-region comparison on fastMRI+ settles this directly. If pseudo-clean RODIO matches us there and under attack, the joint model is unnecessary, and we would report that the simple pipeline suffices.

Why not just pre-train the autoencoder and then fit a latent diffusion model? This is the two-stage ablation. We argued above that, without clean targets, nothing constrains the decoder's unmeasured content in two-stage training. We test the argument by measuring the energy of decoded images in the complement of each scan's sampling mask against fully sampled truth, as well as downstream PSNR. If the two pipelines produce the same results, the central claim fails.

Why not just use a deep ensemble of deterministic decoders for uncertainty? Ensembles are easier to train than Bayesian layers, and VeBNN's argument that they cannot separate noise from ignorance comes from a different, regression-style setting. We train a five-member ensemble at matched parameter count and inference cost. If it matches the Bayesian head on error-prediction AUROC and on adaptive-$t^*$ gains, we adopt the ensemble.

Proposed Experiments

The first decisive check is the gap from clean data. We compare our purifier with oracle RODIO on fastMRI knee under PGD at several $\epsilon$ and under 4×→2× and 4×→8× shifts, reporting PSNR, SSIM and NMSE with MoDL and VarNet held frozen. A gap of about 1 dB or less, together with a win over pseudo-clean RODIO, supports the claim.

The second check is pathology preservation. We train on knee only and test on fastMRI brain and fastMRI+ lesion annotations. RODIO reports a 1.2 dB margin over its second-best baseline in this setting. We report lesion-region PSNR and a count of lesions lost or invented according to the annotations.

The third check is uncertainty. We compute AUROC for predicting pixels whose error exceeds a fixed percentile, compare against the ensemble, and ask whether uncertainty-driven $t^*$ beats RODIO's selector under adaptive attack.

The fourth check is mechanism. We compare nullspace energy error between joint and two-stage training and track aliasing energy in the decoded images over the course of training.

We report latency against RODIO-DDIM's figure of under 60 seconds per image. For robustness on the simpler 2D setting, we report no transfer to DIV2K inpainting beyond citing Equivariant Splitting's 27.45 dB. For the self-supervised MRI splitting method there is no reported result found on Lacuna for fastMRI PSNR, so we rerun it ourselves. The project fails cleanly if pseudo-clean RODIO matches us on lesions and attacks, or if the two-stage ablation matches joint training.