Pretraining Deformable Image Registration Networks with Random Images

Junyu Chen, Shuwen Wei, Yihao Liu, Aaron Carass, Yong Du

TL;DR

Training deep learning models for medical image registration typically requires large, curated clinical datasets or carefully tuned synthetic anatomy. This paper demonstrates that pretraining an encoder on simple, randomly generated geometric noise patterns creates an effective foundation model for deformable registration. Fine-tuning this pretrained encoder accelerates convergence, matches full-dataset performance using only 10% of domain data, and improves registration accuracy across both brain MRI and lung CT.

What Problem Does This Paper Address?

Deformable medical image registration aligns two images (e.g., mapping a patient's scan to an anatomical atlas) by finding a dense spatial deformation field. Deep learning methods can perform this alignment in seconds, but they usually require large training cohorts of domain-specific medical images.

While prior work (such as SynthMorph) showed that models can be trained on purely synthetic data without clinical scans, creating these synthetic images is tedious: researchers must meticulously tune noise, resolution, and contrast parameters to mimic realistic anatomy. The authors ask: Can we use trivial, purely random geometric patterns as a self-supervised proxy task to pretrain a registration foundation model, which is then fine-tuned on downstream clinical tasks?

Methods

Instead of designing anatomy-mimicking textures or pretraining via image reconstruction (like masked autoencoders), the authors pretrain the encoder directly on a proxy registration task:

  1. Procedural Random Image Generation: Multi-channel Perlin noise is generated on the fly. An argmax collapse across channels yields 3D label-like shapes, each assigned a constant intensity. Unlike previous methods, no complex Gaussian noise or MRI-like bias fields are added.
  2. Synthetic Deformation Fields: Three-channel Perlin noise is integrated into a smooth, diffeomorphic deformation field via scaling-and-squaring, creating deformed image pairs on the fly.
  3. Asymmetric Encoder-Only Pretraining: The backbone network (TransMorph) has its encoder detached and fitted with lightweight, temporary decoders at each resolution stage. This forces the encoder to extract rich multi-scale representations while keeping pretraining fast ($0.012\text{ min/pair}$ vs. $0.022\text{ min/pair}$ for full-model pretraining).
  4. Self-Distillation Objective: Each temporary decoder predicts a Gaussian distribution (mean and variance) over the deformation field. The training loss combines:
  5. Normalized Cross-Correlation (NCC) loss between fixed and warped images.
  6. Diffusion regularization for deformation smoothness.
  7. Kullback–Leibler (KL) divergence penalizing differences between each stage's prediction and the ensemble distribution across all decoders.

After pretraining, the auxiliary decoders are discarded, and the encoder is plugged back into the full registration network for fine-tuning.

Multi-Channel Perlin Noise ──> argmax ──> Random Shape Volumes (m, f)
                                                    │
                 ┌──────────────────────────────────┴──────────────────────────────────┐
                 ▼                                                                     ▼
           Stage 1 Features ──> Lightweight Dec 1 ──> ϕ₁ (μ, σ²)                 Stage K Features ──> Lightweight Dec K ──> ϕₖ (μ, σ²)
                 └──────────────────────────────────┬──────────────────────────────────┘
                                                    ▼
                               Ensemble Field (μ_ens, σ²_ens)
                                                    │
                               ┌────────────────────┴────────────────────┐
                               ▼                                         ▼
                     L_NCC + L_smoothness                              L_KL

Datasets

  • Pretraining: Procedurally generated 3D random shapes (3,000 pairs generated on-the-fly per epoch).
  • IXI Dataset: T1-weighted brain MRIs (403 training, 58 validation, 115 test) used for primary fine-tuning and data-efficiency benchmarks.
  • NIMH Healthy Volunteer Dataset: External brain MRI dataset used as an in-domain pretraining comparison baseline.
  • 4DCT Dataset: 10 lung CT cases with landmark annotations (4 training, 6 validation) used to test transfer to an extreme low-data regime.

Key Insights and Ideas

  • Anatomy is not required for geometric pretraining: The network does not need to see realistic brain folds or CT textures to learn how to track deformations. Registering randomized geometric shapes teaches fundamental multi-scale coordinate matching.
  • Fine-tuning remains essential: Training purely on random images without downstream fine-tuning yields poor performance (Dice of $0.653$ vs. $0.751$). Pretraining builds the foundational spatial features, but fine-tuning adapts them to true tissue contrasts.
  • Massive data savings: Because the encoder already understands spatial transformations, it requires far fewer domain-specific images to achieve high performance.

Key Results

  • Drastic Reduction in Data Needs: On the IXI dataset, fine-tuning the pretrained model with only 10% of the data (40 scans) matched the performance of training from scratch on 100% of the data ($0.747$ vs. $0.749$ Dice). Using just 5% of the data matched training from scratch on 40% data.
  • Faster Convergence: Pretrained models reached lower training losses and higher validation Dice scores much earlier in downstream training.
  • Comparable to In-Domain Pretraining: Pretraining on random shapes achieved a test Dice of $0.751 \pm 0.124$, nearly matching an encoder pretrained on actual in-domain brain MRIs ($0.753 \pm 0.124$).
  • Benchmark Comparison: TransMorph with random pretraining ($0.751$ Dice) outperformed deedsBCV ($0.740$), SynthMorph ($0.688$), and ConvexAdam ($0.749$), while maintaining $0.00\%$ non-diffeomorphic volume.
  • Low-Data Lung CT (4DCT): When trained on only 4 lung CT cases, the pretrained model reduced Target Registration Error (TRE) from $2.753\text{ mm}$ (from scratch) down to $2.116\text{ mm}$ (initial TRE was $7.278\text{ mm}$).

Limitations and Future Work

  • Gap with Classical Optimization in Tiny Cohorts: On the 4DCT benchmark with only 4 training subjects, while pretraining substantially outperformed training from scratch, it still lagged behind dedicated pairwise optimization tools (ConvexAdam: $1.338\text{ mm}$; deedsBCV: $1.419\text{ mm}$).
  • Distillation Loss Sensitivity: Ablation studies showed that while the self-distillation KL loss lowered pretraining training loss, it slightly depressed validation Dice, indicating an imperfect alignment between the ensemble variance objective and downstream overlap metrics.
  • Future Directions: The authors suggest integrating instance-specific test-time optimization, initialized by this pretrained network, to bridge the gap in extreme low-data scenarios.

Summary updated

BibTeX
@inproceedings{chen2025pretraining,
  author = {Junyu Chen and Shuwen Wei and Yihao Liu and Aaron Carass and Yong Du},
  title = {{Pretraining Deformable Image Registration Networks with Random Images}},
  booktitle = {MIDL - Short Papers},
  year = {2025},
  url = {https://openreview.net/forum?id=NJANlZzxfi},
}
Figure