Abstract
Registration is a fundamental task in medical imaging, and recent machine learning methods have become the state-of-the-art. However, these approaches are often not interpretable, lack robustness to large misalignments, and do not incorporate symmetries of the problem. In this work, we propose KeyMorph, an unsupervised end-to-end learning-based image registration framework that relies on automatically detecting corresponding keypoints. Our core insight is straightforward: matching keypoints between images can be used to obtain the optimal transformation via a differentiable closed-form expression. We use this observation to drive the unsupervised learning of anatomically-consistent keypoints from images. This not only leads to substantially more robust registration but also yields better interpretability, since the keypoints reveal which parts of the image are driving the final alignment. Moreover, KeyMorph can be designed to be equivariant under image translations and/or symmetric with respect to the input image ordering. We demonstrate the proposed framework in solving 3D affine registration of multi-modal brain MRI scans. Remarkably, we show that this strategy leads to consistent keypoints, even across modalities. We demonstrate registration accuracy that surpasses current state-of-the-art methods, especially in the context of large displacements. Our code is available at https://github.com/evanmy/keymorph
Introduction
Image registration—the process of aligning two or more images into a common coordinate system—is a cornerstone of medical imaging. While classical methods like ANTs are highly accurate, they are computationally expensive and slow because they rely on iterative optimization for every new pair of images.
Recent deep learning (DL) approaches have significantly increased registration speed, but they face three major hurdles: robustness to large misalignments, lack of interpretability, and a failure to respect underlying geometric symmetries (e.g., translation equivariance). KeyMorph addresses these issues by replacing "black-box" parameter regression with an interpretable, keypoint-based approach.
Methods
KeyMorph is an end-to-end unsupervised framework consisting of two primary components:
- Keypoint Detector Network: A Convolutional Neural Network (CNN) that predicts $K$ corresponding keypoints for a "moving" image and a "fixed" image. Instead of standard fully-connected layers, KeyMorph utilizes a Center-of-Mass (CoM) layer. This layer computes the weighted average of voxel coordinates based on activation maps, providing a geometric inductive bias that makes the network approximately translation equivariant and superior at precise localization.
- Affine Computation Layer: Once keypoints are detected, the optimal affine transformation (rotation, translation, scaling, and shearing) is calculated using a differentiable closed-form expression (a least-squares solution). Because this step is differentiable, the entire pipeline can be trained via backpropagation.
The model is trained in two stages: a self-supervised pre-training phase where the network learns to find keypoints on randomly transformed versions of the same image, followed by an unsupervised phase minimizing the Mean Squared Error (MSE) between the moved image and the fixed target.
Evaluation and Key Insights
The study utilized the IXI brain MRI dataset (577 subjects) with T1, T2, and PD-weighted scans. Evaluation was performed by calculating the Dice score (volume overlap) for 23 brain regions of interest (ROIs) segmented via a pre-trained SynthSeg model.
Interpretability and Consistency
Unlike typical DL methods, KeyMorph allows researchers to visualize detected keypoints. A significant finding was cross-modal consistency: even when trained only on same-modality pairs, the network learned to detect anatomically consistent keypoints across different modalities (e.g., T1 to T2). The points consistently "stuck" to the same brain structures regardless of scan type.
Optimal Keypoint Density
Performance was found to be sensitive to the number of keypoints. Dice scores improved as the number of keypoints increased up to 64, but began to decline at 128, suggesting a "sweet spot" for the number of distinct anatomical landmarks a network can reliably identify across individuals.
Key Results
KeyMorph demonstrates superior robustness and speed compared to both classical and modern baselines:
- Robustness to Large Rotation: As shown in the performance plots, KeyMorph maintains high Dice scores even with 180-degree rotations. In contrast, standard DL models (DLIR) and classical tools (ANTs) see performance plummet once rotations exceed 45 degrees.
- Speed: On a GPU, KeyMorph performs registration in approximately 0.2 seconds, a 300x speedup over the CPU-based ANTs baseline.
- Accuracy: In multi-modal registration tasks, KeyMorph consistently outperformed or matched state-of-the-art baselines across various levels of initial misalignment.
Discussion
While this implementation focuses on affine registration (global alignment), it serves as a critical first step for medical imaging pipelines. The authors suggest that KeyMorph’s keypoint-based strategy could be extended to non-linear (deformable) registration by using the keypoints as control points for thin-plate splines. Future work will involve testing the framework on more complex data, such as abdominal scans or images containing large pathologies like tumors.
Summary updated