HyperMorph: Amortized Hyperparameter Learning for Image Registration

Andrew Hoopes, Malte Hoffmann, Bruce Fischl, John Guttag, Adrian V. Dalca · DOI

Introduction

Deformable image registration is a cornerstone of medical image analysis, enabling the alignment of anatomical structures across different scans or subjects. A fundamental challenge in this process is the trade-off between image similarity (alignment accuracy) and regularization (deformation smoothness). This balance is typically controlled by a hyperparameter, $\lambda$. Finding the optimal $\lambda$ for a specific dataset or task traditionally requires an exhaustive grid search, involving the training of dozens of separate models. This process is computationally prohibitive and often leads to sub-optimal results due to the discrete nature of the search.

The Challenge of Hyperparameter Tuning

In traditional registration pipelines, researchers must train multiple independent models to explore the hyperparameter space. This "Traditional Strategy" is not only slow—often requiring hundreds of GPU hours—but also limits the user to a few pre-defined values.

Comparison between the traditional grid-search strategy and the proposed HyperMorph strategy.

HyperMorph addresses this by introducing an amortized approach. Instead of training multiple models, it learns a single model that can adapt its behavior across the entire continuous range of hyperparameters at test-time.

The HyperMorph Architecture

HyperMorph utilizes a hypernetwork architecture to achieve this flexibility. The system consists of two primary components:

  1. The Registration Network ($g$): A standard convolutional neural network (based on the VoxelMorph architecture) that takes a moving image ($m$) and a fixed image ($f$) as input and outputs a deformation field ($\phi$).
  2. The Hypernetwork ($h$): A small, fully connected network that takes the hyperparameter value $\Lambda$ as input. Rather than performing registration itself, the hypernetwork predicts the optimal weights ($\theta_g$) for the registration network for that specific $\Lambda$.
Detailed architecture of HyperMorph, where a hypernetwork predicts weights for the registration network based on the hyperparameter input.

During training, the model samples different hyperparameter values for every mini-batch. This forces the hypernetwork to learn a continuous mapping from the hyperparameter space to the space of registration network weights. At inference, the weights are generated instantaneously, allowing users to tune the registration smoothness in real-time using a simple slider.

Experimental Results and Insights

The authors evaluated HyperMorph using massive brain MR datasets, including over 30,000 T1-weighted scans. The results demonstrate several key advantages:

  • Efficiency: HyperMorph is significantly faster to train than traditional methods—up to 10.5x faster when optimizing for two hyperparameters simultaneously.
  • Accuracy: Despite being a single model, HyperMorph achieves Dice scores (a measure of anatomical overlap) that are virtually identical to individually tuned baseline models.
  • Robustness: Interestingly, the amortized learning process makes HyperMorph less sensitive to random weight initialization compared to standard models, as it must learn a consistent landscape of solutions across the hyperparameter range.
  • Anatomy-Specific Tuning: The model reveals that different brain structures (e.g., the Thalamus vs. White Matter) often have different optimal regularization weights. HyperMorph allows for the rapid identification of these structure-specific optima without retraining.

Conclusion and Future Directions

HyperMorph represents a significant shift in how hyperparameters are handled in deep learning-based registration. By amortizing the cost of hyperparameter search into a single training pass, it provides a powerful tool for rapid model deployment and fine-tuning. Future work may explore scaling this approach to even larger networks through weight-factorization strategies or extending it to support spatially varying hyperparameters, where different regions of an image receive different levels of regularization automatically.

Summary updated

BibTeX
@misc{hoopes2021hypermorph,
  author = {Andrew Hoopes and Malte Hoffmann and Bruce Fischl and John Guttag and Adrian V. Dalca},
  title = {{HyperMorph: Amortized Hyperparameter Learning for Image Registration}},
  year = {2021},
  eprint = {2101.01035},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2101.01035},
}
Figure