Learning deformable registration of medical images with anatomical constraints

Lucas Mansilla, Diego H. Milone, Enzo Ferrante

Abstract

Deformable image registration is critical for medical AI, yet deep learning models often produce anatomically implausible results by focusing solely on pixel-level similarity. We present AC-RegNet, a framework that incorporates global anatomical constraints via denoising autoencoders. By learning a latent representation of valid anatomical shapes, AC-RegNet ensures that registration outputs are both mathematically aligned and biologically realistic. Evaluated on chest X-ray datasets, AC-RegNet significantly outperforms standard baselines in both accuracy and topological consistency.

Introduction

Deformable image registration—the process of aligning two medical images (like X-rays from different patients or different times)—is a cornerstone of medical AI. While traditional methods are slow and iterative, modern deep learning (DL) models are lightning-fast. However, DL models often focus on minimizing pixel-level differences without understanding the underlying biology. This leads to results that are mathematically "accurate" but anatomically impossible—such as lungs being unnaturally stretched or organs being "cut" during the warping process. Existing solutions use local metrics like the Dice coefficient, but these fail to capture the global context and topology of human organs.

Methods

AC-RegNet extends standard registration networks with a novel anatomical constraint. The architecture consists of two primary components: a base registration network and an anatomical constraint extension.

The AC-RegNet architecture, featuring the base registration network and the anatomical constraint extension using denoising autoencoders.
  1. The Base Architecture: A "VectorCNN" (an encoder-decoder similar to U-Net) predicts a deformation field $\mathcal{T}$, which is then applied to a source image $I$ using a differentiable warper to produce the warped image $I \circ \mathcal{T}$.
  2. The Anatomical Constraint (Global Loss): To teach the model about anatomy, the authors first train a Denoising Autoencoder (DAE) on thousands of segmentation masks. This DAE learns a compact, non-linear "latent representation" (a code) of valid human chest anatomy.
  3. The Hybrid Loss Function: During training, the model is optimized using four distinct signals:
  4. Intensity Similarity: Ensuring pixels look alike (Negative Normalized Cross-Correlation).
  5. Smoothness: Preventing jagged, unrealistic deformations.
  6. Local Segmentation Loss ($L_{ce}$): Ensuring specific organ boundaries align.
  7. Global Anatomical Loss ($L_{ae}$): This core innovation compares the "latent code" of the warped source mask to the target mask. If the warped anatomy doesn't fit the learned manifold of real human shapes, the model is penalized.

Results

The model was evaluated on three prominent chest X-ray datasets: JSRT (247 images), Montgomery County (138 images), and Shenzhen Hospital (662 images). These datasets present significant challenges due to high inter-subject anatomical variability.

AC-RegNet consistently outperformed both traditional methods (SimpleElastix) and standard DL baselines (RegNet) across all metrics:

  • Accuracy: On the JSRT dataset, AC-RegNet achieved a Dice Similarity Coefficient (DSC) of 0.943, significantly higher than the basic RegNet (0.809).
  • Surface Distance: It showed a dramatic reduction in Hausdorff Distance (HD), meaning organ boundaries were much more accurately aligned.
  • Qualitative Realism: Visual inspections showed that AC-RegNet avoided the "stretching" and "cutting" artifacts common in other models, preserving the natural curvature of the lungs and heart.

Discussion and Key Insights

A key insight of this work is the complementarity of local and global losses. The authors demonstrate that local losses (like Dice) can be identical for both "plausible" and "implausible" deformations. For example, a small hole in the middle of a lung might have the same pixel-error as a slight erosion of the lung's edge, but the former is anatomically impossible. The global $L_{ae}$ loss successfully discriminates between these cases, ensuring the overall "shape" remains realistic while local losses handle fine-grained boundary alignment.

Furthermore, the latent representations learned by the autoencoder aren't just for registration—they can also be used for downstream tasks like pathology classification (e.g., detecting cardiomegaly).

Limitations and Future Work

While successful in 2D chest X-rays, extending the method to 3D (like CT or MRI scans) would require significantly more computational power and 3D segmentation data. Additionally, the current work focuses on monomodal registration (X-ray to X-ray); future work could explore if these anatomical priors help when aligning different types of scans (e.g., CT to MRI). Finally, the quality of the "anatomical awareness" is limited by the diversity and quality of the masks used during the pre-training of the autoencoder.

Summary updated

BibTeX
@article{mansilla2020learning,
  author = {Lucas Mansilla and Diego H. Milone and Enzo Ferrante},
  title = {{Learning deformable registration of medical images with anatomical constraints}},
  journal = {Neural Networks},
  year = {2020},
  doi = {10.1016/j.neunet.2020.01.023},
}
Figure