VoxelMorph: A Learning Framework for Deformable Medical Image Registration
Paper · 2019 · Guha Balakrishnan, Amy Zhao, Mert Rory Sabuncu et al.
Summary
When researchers compare brain scans, the same structure can occupy different positions and have a different shape in each image. A global adjustment can bring the brains into roughly the same orientation and scale, but comparing individual structures requires local adjustments throughout the scan. VoxelMorph learns to make those adjustments. It takes a fixed scan and a moving scan and predicts a displacement at each location. The displacements tell it where to sample the moving scan to reconstruct it on the fixed scan’s grid. Conventional methods search for those displacements separately for every new pair. VoxelMorph learns a shared registration function from a collection of scans, then applies that function directly to each new pair.
The authors train the network in two ways. The first uses the scans themselves. The network predicts a displacement field, warps the moving scan, and receives feedback based on how closely the result resembles the fixed scan and how smoothly the displacements vary across space. The second approach adds anatomical segmentations, which mark the regions occupied by structures such as the ventricles. During training, the network also receives feedback on how well corresponding regions overlap after warping. In both cases, the trained network needs only the scans to register a new pair.
In the main experiment, the authors align held-out brain MRI scans to a common reference image called an atlas. They measure success with the Dice score, which quantifies how much two delineations of the same structure overlap. VoxelMorph trained with local cross-correlation achieves an average Dice score of 0.753, compared with 0.749 for ANTs and 0.755 for NiftyReg. After the shared preprocessing step, this VoxelMorph variant takes an average of 57 seconds per registration on the CPU and 0.45 seconds on the GPU. The corresponding CPU averages are 9059 seconds for ANTs and 2347 seconds for NiftyReg. Separate tests examine registration between individual subjects and registration assessed with expert-drawn anatomical boundaries.
Anatomical labels give the network a way to learn correspondences that are harder to infer from image intensities alone. On the general test set, training with broad tissue groups yields a mean Dice score of 0.78±0.03 when evaluated on the finer FreeSurfer structures. The benefit depends on how much weight the training objective gives the labels. At moderate weights, overlap can improve even for structures whose labels were withheld during training. When training relies completely on label overlap, the resulting deformations contain substantially more local folding. The experiments therefore evaluate both what lines up and how the warp achieves that alignment.
Deep dive: VoxelMorph: A Learning Framework for Deformable Medical Image Registration
VoxelMorph learns to align brain MRI scans in a single network pass, matching iterative methods on anatomical overlap with much shorter runtimes. · about 35 minutes to read
The problem and its context
What it means to align two scans
A brain MRI scan is a volume of measurements on a grid. Each grid location, or voxel, has an intensity. Two scans can show the same anatomical structure at different coordinates because the subjects’ brains differ in shape. The paper illustrates this with coronal views, which show slices through the brain from side to side. Outlines around structures such as the white matter, ventricles, and hippocampi make the differences visible. The scans in that example have already undergone global alignment. The remaining discrepancies occur at the scale of individual structures.
This matters when researchers want to compare anatomy across people or follow anatomical changes within a person over time. A comparison at matching image coordinates is meaningful only insofar as those coordinates refer to comparable anatomy. Registering each participant to a common reference gives a population study a common coordinate system in which to make its comparisons. Registering scans directly to one another addresses a different setup, in which either image can vary from pair to pair. The paper treats both as instances of the same problem of estimating spatial correspondence.
The authors distinguish global affine alignment from deformable registration. An affine transformation applies a single coordinate rule across the volume. It can account for differences in position, orientation, and overall geometry. A deformable transformation has more degrees of freedom, so it can stretch or compress one region while making a different adjustment elsewhere. VoxelMorph takes affinely aligned images as input and handles this second stage. The apparent motion in the output is a correspondence between images. A warp between different subjects, for example, describes how to bring their scanned structures into alignment.
The image that supplies the output coordinate grid is called the fixed image. The moving image supplies the intensities to be sampled on that grid. These names describe their roles in registration. In an atlas experiment, the atlas is fixed across pairs and a different subject scan serves as the moving image each time. In the subject-to-subject experiment, the fixed image is itself an individual scan. In both cases, the paper uses the same coordinate convention. A location in the fixed image points to a location to sample in the moving image. Filling the fixed grid with those samples produces the warped moving image.
The search performed by conventional registration
The conventional formulation starts with an objective for a particular pair. An image-matching term evaluates whether the warped scan looks like the fixed scan. A regularization term favors transformations with desirable spatial properties. With image agreement as the sole criterion, a search can exploit local changes that make the intensities look more alike while producing an implausible coordinate map. Regularization can discourage neighboring locations from moving in very different ways. The chosen balance affects which warp the optimizer favors.
The paper describes several ways earlier work represents the warp. Elastic approaches, free-form splines, discrete methods, and the Demons algorithm are among the examples it discusses in connection with displacement fields. A different family constructs a transformation by integrating a velocity field. In the paper’s account, diffeomorphic approaches aim to preserve topology and give an invertible map. The authors place large diffeomorphic distance metric mapping, DARTEL, and symmetric normalization within that family. The distinction concerns the space of transformations available to the procedure, as well as the objective used to choose among them.
The appearance criterion can also vary. Mean squared error compares the intensities at corresponding locations directly. Cross-correlation compares intensity variation in nearby parts of the images, and mutual information offers another way to assess how the intensities relate. The paper points to cross-correlation and mutual information as useful when scans differ in contrast or intensity distribution. Choosing a representation and a similarity criterion still leaves the work of finding a suitable transformation. Conventional procedures repeat that search whenever the input pair changes.
This repeated search is particularly consequential for population studies, where the deformable stage has to run for many scans. The paper describes CPU runtimes for accurate conventional methods on the scale of tens of minutes to hours per pair. It also discusses earlier GPU implementations that brought runtimes down to minutes when a GPU was available for each registration. VoxelMorph addresses the cost at a different point in the workflow. It uses a collection of examples to fit a function in advance, then spends the cost of evaluating that function on each new pair.
What learning-based registration had already made possible
Earlier machine learning approaches had already shown how a network could predict a warp. Many trained their networks to reproduce reference displacement fields. The paper describes two ways to obtain such targets. One is to simulate a deformation and use it to create a training example. The other is to run a conventional registration algorithm and use the resulting warp as the target. Simulation determines which kinds of changes the network sees. Conventional registration adds a calculation for producing targets and can carry the assumptions of the target-generating procedure into the learned predictor. Some earlier methods also used similarity between the images as part of training.
The paper identifies earlier unsupervised registration systems that used a convolutional network together with a differentiable image warp. The reported demonstrations covered limited portions of volumes or individual image slices, and one of the methods addressed only small transformations. The authors also draw a connection to optical flow, where the goal is to estimate apparent displacement between images. Work on optical flow provided examples of learning from image agreement and motion smoothness, while spatial transformer work supplied the machinery for warping an image within a trainable system. VoxelMorph applies these ideas to dense volumetric registration.
Earlier segmentation-driven work addressed a related question in a different setup. The paper describes systems that learned to align MRI and ultrasound from the same subject using anatomical labels. VoxelMorph investigates how labels help when different subjects are aligned to an atlas and only some structures, or only broad tissue classes, are marked during training. This makes the choice of training information part of the research question. Regions with supplied labels can be scored separately from regions whose alignment must be learned through image appearance and the spatial relationship among nearby structures.
The method, step by step
From a pair of volumes to a coordinate map
The input consists of two grayscale volumes that have already undergone affine alignment. VoxelMorph stacks them as separate channels so that the network receives both intensity values at each grid location. A convolutional encoder builds progressively coarser representations of the pair. A decoder uses those representations along with features retained at finer scales to produce a displacement at each voxel on the fixed grid. A spatial transformer uses those displacements to construct the warped moving image.
During training, the quality of that warped image supplies a learning signal. The procedure compares it with the fixed image and checks how abruptly the displacements change from voxel to voxel. If anatomical labels are available for the training objective, the same coordinate map also warps those labels so that their overlap can be scored. The training procedure uses the resulting loss to update the shared network weights. When it receives unseen images, VoxelMorph uses the fitted weights to predict their displacement field.
How VoxelMorph learns a registration function
The steps in order.
Let the fixed volume be f and the moving volume be m. The paper defines them over a spatial domain Ω contained in ℝⁿ, where ℝⁿ is the space of coordinates with n components. The experiments use n = 3. A voxel position in Ω is denoted by p. The authors formulate the method so that the spatial dimension can vary, although the brain registration tests use volumes throughout.
gθ(f, m) = u
Here gθ is the registration function and θ represents its trainable convolutional weights. Its inputs f and m are the fixed and moving volumes. Its output u is the displacement field, which stores a vector at each voxel. The field has a spatial grid and a component axis. A displacement vector can specify a different offset along each spatial direction.
φ = Id + u
The symbol φ denotes the map from fixed-image coordinates to moving-image coordinates. Id is the identity transformation, which returns the input coordinate unchanged, and u adds the predicted offset at that coordinate. Thus φ gives a sampling location while u gives the change from the original location. This explains why a map pointing from fixed coordinates towards moving coordinates produces an image described as the moving image warped to the fixed image. Each output voxel pulls an intensity from the moving scan.
How the network captures large and small adjustments
The architecture is based on U-Net. In the experiments the input array has size 160 × 192 × 224 × 2. The spatial dimensions are those of a preprocessed scan, and the final dimension holds the fixed and moving image channels. The network uses volumetric convolutions. A convolution applies the same learned local operation at successive locations, producing features that summarize patterns in its input. The paper specifies a kernel size of 3. In the encoder, stride 2 reduces the spatial resolution at successive stages. Convolutions are followed by LeakyReLU activations with parameter 0.2. These activations allow the network to combine convolutional responses nonlinearly while retaining a scaled response to negative inputs.
A coarse encoder feature can depend on a larger portion of the original image than an early feature. This is important when corresponding anatomy lies farther apart than the local neighborhood visible to an early convolution. The paper describes the coarsest stage as operating on a volume whose size is (1/16)³ of the input volume. It relates the choice of depth to the expected displacement. Features in the coarsest stage should have access to a region of the input large enough to span the expected separation between corresponding voxels. That region of influence is the receptive field.
The decoder restores spatial resolution in stages. The architecture description includes several convolutions with 32 filters during this reconstruction. Skip connections concatenate features from the encoder with decoder features at corresponding scales. The decoder can therefore use features that represent broad context together with features that retain finer spatial detail. After the decoder reaches full resolution, further convolutions refine the output. The final grid describes the displacement, which the spatial transformer then uses to resample the moving scan. The authors use this architecture for their experiments and emphasize the registration framework’s ability to accommodate other architectures.
How the spatial transformer samples the moving scan
The predicted sampling location can fall between grid points. In that case, the moving scan has no intensity stored at the exact coordinate. The spatial transformer estimates the intensity from the surrounding voxels. In the volumetric case, trilinear interpolation uses the eight corners around the sampling point. The contribution of each corner depends on the distance from that corner along each axis. As the point moves within the grid cell, the weights change with it.
p′ = p + u(p)
Here p is a coordinate in the fixed grid, u(p) is its predicted displacement, and p′ is the resulting coordinate in the moving grid. The prime distinguishes the sampling coordinate from the location where the sampled value will be placed.
(m ∘ φ)(p) = ∑_{q ∈ Z(p′)} m(q) ∏_{d ∈ {x,y,z}} (1 − |p′_d − q_d|)
In this equation m ∘ φ is the warped moving image and the composition symbol ∘ means that m is sampled at the coordinate returned by φ. The set Z(p′) contains the neighboring grid points around p′. The summation ∑ adds their contributions, with q denoting each neighbor and m(q) its intensity. The product ∏ combines the interpolation weights along spatial axes x, y and z. The subscript d selects the component along the current axis. The absolute value gives the distance along that axis, and subtracting it from 1 gives that axis’s contribution to the interpolation weight.
Interpolation makes it possible to trace an image mismatch back to a change in the predicted coordinates. A small change to a displacement can change the interpolated intensity, which changes the loss. Gradients of the loss can then pass back through the warp to the weights of the network. At the point where the absolute value has a corner, the authors implement its subgradient at 0 as 0. This operation connects the appearance of the warped image directly to the parameters responsible for the coordinate map.
The objective used to learn from intensities
The paper presents its method in relation to the usual pair-specific optimization problem. This formulation makes clear what changes when the authors introduce a learned function. The quantities used to judge a warp can remain familiar even though the search is moved to training.
φ̂ = arg min_φ L(f, m, φ)
The hat on φ̂ denotes the estimated minimizing transformation. The operator arg min_φ asks for the choice of φ that minimizes L, the registration objective for the fixed volume f and moving volume m. In a conventional calculation, the images stay fixed and the transformation is the variable being optimized.
φ̂ = arg min_φ [L_sim(f, m ∘ φ) + λ L_smooth(φ)]
Here L_sim is an image-matching loss, which compares f with the warped moving image m ∘ φ. The term L_smooth penalizes spatial variation in the transformation φ. The coefficient λ controls how much the smoothness penalty counts in the objective. The brackets group the two terms whose sum the optimizer minimizes.
The intensity-only VoxelMorph objective uses the same ingredients. The network supplies the transformation, the spatial transformer supplies the warped image, and the loss scores the result. The paper calls this training unsupervised because the network can learn from the inputs and its own warp without reference displacement fields.
L_us(f, m, φ) = L_sim(f, m ∘ φ) + λ L_smooth(φ)
The subscript us denotes the unsupervised loss. The volumes f and m identify the pair being registered. The transformation φ determines both the warped volume compared by L_sim and the field assessed by L_smooth. The coefficient λ sets the relative contribution of that second term. A larger value puts more pressure on the predictor to keep neighboring displacements similar.
The first appearance loss in the experiments is mean squared error, abbreviated MSE. The operation compares the intensity at each fixed-grid voxel with the intensity sampled from the moving scan for that voxel. The loss is suitable for scans with similar intensity distributions and local contrast.
MSE(f, m ∘ φ) = (1 / |Ω|) ∑_{p ∈ Ω} [f(p) − (m ∘ φ)(p)]²
Here Ω is the voxel domain, |Ω| is its number of locations, and p runs over those locations. The value f(p) is the fixed intensity and (m ∘ φ)(p) is the corresponding warped intensity. The superscript ² squares their difference. The factor 1 / |Ω| converts the sum into a mean. When the authors train with MSE, this expression supplies L_sim.
The other appearance criterion is local cross-correlation, abbreviated CC. It describes how intensities vary together within a window around a voxel. Each image is centered on its own local mean. The resulting comparison emphasizes local patterns of variation that can survive differences in the intensity distributions of the scans. For the formulas below, w denotes the warped volume m ∘ φ.
ā(p) = (1 / n³) ∑_{pᵢ ∈ W(p)} a(pᵢ)
The symbol a stands for the image whose mean is being calculated, either f or w. The bar in ā(p) marks its local mean at location p. The set W(p) is the cubic window around p and pᵢ denotes a voxel in that window. In this formula n is the window’s side length, with n = 9 in the experiments. Its cube n³ is the number of voxels used to calculate the mean. Here the window size and the earlier use of n to denote spatial dimension are distinct.
CC(f, w) = ∑_{p ∈ Ω} { [∑_{pᵢ ∈ W(p)} (f(pᵢ) − f̄(p))(w(pᵢ) − w̄(p))]² / ([∑_{pᵢ ∈ W(p)} (f(pᵢ) − f̄(p))²] [∑_{pᵢ ∈ W(p)} (w(pᵢ) − w̄(p))²]) }
In this expression f̄(p) and w̄(p) are the respective means within the window W(p). The numerator multiplies the centered intensities of f and w at each window location pᵢ, sums those products, and squares the result. The denominator multiplies the two sums of squared centered intensities. This normalizes the local comparison by the strength of the intensity variation in each image. The outer sum adds the comparisons for window centers p throughout Ω.
L_sim(f, w) = −CC(f, w)
The term L_sim is the appearance loss in the cross-correlation variant. CC is the local correlation score for the fixed volume f and warped volume w. The minus sign makes a higher correlation score correspond to a lower loss. Both variants optimize the same kind of displacement field. Their image terms differ in the evidence they use to score a proposed match.
Why the loss penalizes changes between neighboring displacements
Intensity agreement tells the network which sampled image looks more like the target. The smoothness term supplies information about the warp that produced that image. It penalizes large spatial changes in the displacement vectors. If a region moves by a similar amount throughout, the penalty within the region is small even if the region shifts considerably. If neighboring voxels receive sharply different offsets, the penalty grows.
L_smooth(φ) = ∑_{p ∈ Ω} ‖∇u(p)‖²
The function L_smooth is the diffusion regularizer for the transformation φ. The symbol ∇u(p) represents the spatial derivatives of the displacement field u at voxel p. The squared norm ‖ · ‖² combines the squared derivative values, and the sum adds the penalty over the voxel domain Ω. Since a displacement is a vector, a derivative along a spatial axis records how all displacement components change as one moves along that axis.
∂u(p) / ∂x ≈ u(pₓ + 1, pᵧ, p_z) − u(pₓ, pᵧ, p_z)
Here ∂u(p) / ∂x is the derivative of u along the x axis. The symbols pₓ, pᵧ and p_z are the coordinates of voxel p, and ≈ indicates an approximation. The term pₓ + 1 selects the next voxel along x while holding the other coordinates fixed. The authors apply the corresponding neighbor differences along the other axes. The regularizer makes abrupt variation expensive, while the displacement representation still permits a field to fold.
How anatomical labels enter training
A segmentation assigns voxels to anatomical structures. If the hippocampus has been marked in both training scans, for example, the registration can be assessed by checking whether the warped moving hippocampus occupies the same region as the fixed hippocampus. The authors quantify agreement with Dice. A score of 1 means that the regions coincide and a score of 0 means that they are disjoint.
Dice(s_fᵏ, s_mᵏ ∘ φ) = 2 · |s_fᵏ ∩ (s_mᵏ ∘ φ)| / (|s_fᵏ| + |s_mᵏ ∘ φ|)
Here k indexes an anatomical structure. The set s_fᵏ contains its voxels in the fixed segmentation, and s_mᵏ contains its voxels in the moving segmentation. The composition s_mᵏ ∘ φ places the moving region on the fixed grid, using the same map φ as for the intensities. The intersection ∩ selects voxels common to the two regions. The bars give the number of voxels in a set. Twice the overlap is divided by the sum of the two region sizes, so the score depends on how much of both delineations the overlap accounts for.
Integer structure labels identify categories. Their numerical order carries no information about anatomical similarity. To interpolate those labels during training, the authors store a separate binary mask for each structure. They warp each moving mask independently, so the interpolated values express partial membership in that mask. The training version of the Dice calculation adds products of fixed and warped mask values to measure overlap and adds the mask values to measure the sizes. This gives the training procedure gradients that can pass through the warped masks.
L_seg(s_f, s_m ∘ φ) = −(1 / K) ∑_{k=1}^K Dice(s_fᵏ, s_mᵏ ∘ φ)
The function L_seg is the segmentation loss. The symbols s_f and s_m denote the collections of fixed and moving masks, and K is the number of structures included in the loss. The index k runs from 1 through K, and 1 / K gives each included structure equal weight in the average. The minus sign makes better overlap reduce the loss. The experiment can change which structures enter this average by supplying a different set of masks.
L_a(f, m, s_f, s_m, φ) = L_us(f, m, φ) + γ L_seg(s_f, s_m ∘ φ)
The symbol L_a is the objective with auxiliary anatomical information. The pair of volumes is f and m, and their associated masks are s_f and s_m. The term L_us still scores image agreement and spatial smoothness for the predicted transformation φ. The weight γ determines the contribution of the segmentation loss L_seg. When γ is zero, training reduces to the intensity-based procedure. The authors also examine an endpoint that keeps only the segmentation objective, implemented by dropping the intensity and smoothness terms.
The label masks take part in scoring the warp during training. The input to the registration function is still the pair of intensity images. When a trained network sees a new pair, neither a fixed label mask nor a moving label mask is required to obtain the displacement. In the evaluation, the authors can warp withheld segmentations and calculate Dice afterward. Those segmentations measure the result and play no part in generating the prediction.
How training spreads the cost across pairs
Rather than choosing a transformation directly for a single training pair, VoxelMorph fits weights that can produce transformations for many pairs. One way to write the intensity-only training problem is as follows.
θ̂ = arg min_θ E_{f,m}[L_us(f, m, Id + gθ(f, m))]
Here θ̂ denotes fitted network weights, and arg min_θ indicates that the optimization searches over possible θ. The symbol E denotes the expected loss over training pairs consisting of f and m. The function gθ predicts a displacement, and adding Id makes it a coordinate map for L_us to score. In the auxiliary version, the loss being averaged is L_a with the corresponding training masks. The expectation is approximated by updates on sampled training examples.
The authors use one pair of volumes per training batch. For atlas registration, every such pair uses the same fixed reference and a moving subject scan. For subject-to-subject registration, the pairs are sampled from the training subjects. The implementation uses Keras with a TensorFlow backend and an extension of the spatial transformer for volumetric interpolation. The authors train with Adam at a learning rate of 10⁻⁴ and give 150,000 as the implementation’s default number of iterations. They make the VoxelMorph code and trained parameters available.
The authors describe the shared training process as amortized optimization. Training pays the cost of learning how to infer a warp from image pairs drawn from the data of interest. Each new pair then requires an evaluation of the learned function. Because the same weights serve across pairs, details that help only a particular scan cannot be fitted as independently as they can be in a separate search for each pair. The authors view this sharing as a source of implicit regularization.
The predicted field can also serve as the starting point for a pair-specific search. The authors refine it by treating the displacement values themselves as variables and taking gradient steps on the objective for the new pair. The shared weights determine the initialization and stay fixed during this procedure. The authors use the term amortization gap for the difference between the predicted solution and the optimum a separate search would seek. Their refinement experiment tests how much can be gained by continuing the search from the network’s output.
Experiments and results
The scans and the evaluation setup
The main collection comprises 3731 T1-weighted brain MRI scans from public studies. The sources include ABIDE, Harvard GSP, OASIS, and HABS. The collection also draws on PPMI, the FreeSurfer Buckner40 set, MCIC, and ADHD200. The contributing studies differ in acquisition details and in the ages and health conditions of their participants. This variety gives the paper a basis for evaluating registration across a heterogeneous set of brain scans within a common imaging and preprocessing setup.
The authors resampled the scans to a 256 × 256 × 256 grid with isotropic 1mm voxels. Isotropic means the spacing is the same along all spatial axes. They used FreeSurfer for affine spatial normalization and brain extraction, then cropped the volumes to 160 × 192 × 224. They used FreeSurfer anatomical segmentations to support evaluation and, in the auxiliary experiments, to supply the training masks. Visual quality checks targeted gross errors in automatic segmentation and affine alignment.
The reported split is 3231 volumes for training, 250 for validation, and 250 for testing. Buckner40 is reserved for testing, where it supplies expert-drawn delineations. For the main evaluation, the authors retain anatomical structures that occupy at least 100 voxels in every test subject. This produces a set of 30 structures for scoring. In the atlas experiments the fixed image comes from an external dataset, and each moving image is a subject scan from the study collection.
The main accuracy metric is Dice averaged over structures and subjects. The authors use this anatomical measure because several dense coordinate maps can produce similarly convincing warped images, and an unambiguous reference field is unavailable for these scans. A high overlap score gives evidence that a structure lands in the right region. The paper also examines its visual examples and measures local deformation regularity, which let a reader assess aspects of the warp that an average Dice score leaves unresolved.
Jφ(p) = ∇φ(p) ∈ ℝ³ˣ³
Here Jφ(p) is the Jacobian matrix of the map φ at voxel p. The gradient ∇φ(p) contains the derivatives of the transformed coordinates with respect to the original coordinates. The relation ∈ ℝ³ˣ³ means that the matrix has real entries and has three rows and three columns for the three spatial axes. The matrix describes how the map changes in a small neighborhood around a voxel.
det Jφ(p) ≤ 0
The expression det Jφ(p) denotes the determinant of that matrix, and ≤ 0 selects non-positive values. The determinant summarizes the local change of volume and orientation. A zero determinant signals local collapse, and a negative one signals a reversal of orientation. The paper counts non-background voxels that meet this condition and reports the percentage as a way to quantify local folding or degeneracy.
What the baselines do
The affine-only result measures how much anatomical overlap is already present after the common preprocessing. Symmetric Normalization, or SyN, is the first deformable baseline. The authors run its ANTs implementation with a cross-correlation objective and use settings found through a parameter sweep on multiple datasets. The configured step size is 0.25, with Gaussian parameters (9, 0.2), and the run uses three scales with at most 201 iterations at each scale.
The second deformable baseline is NiftyReg. The authors build a multithreaded CPU version because a usable GPU implementation was unavailable to them. After searching settings, they select cross-correlation as the cost function, a grid spacing of 5, and 500 iterations. For VoxelMorph, they train networks with different smoothness weights and choose the setting that gives the best validation Dice for the atlas comparison. Test Dice then measures the accuracy of the selected networks on held-out scans.
Atlas registration and anatomical overlap
The main atlas comparison asks whether the direct prediction retains the anatomical overlap obtained by conventional iterative registration. The starting point, affine alignment alone, gives a mean Dice of 0.584 on the general test split. Both VoxelMorph intensity losses produce scores close to the two deformable baselines. The figures below average over the included structures and test subjects.
Atlas registration on the general test set by mean Dice
Both VoxelMorph variants fall within the range of the iterative baselines.
The numbers
| System or setting | Dice |
|---|---|
| Affine only | 0.584 |
| ANTs SyN with cross-correlation | 0.749 |
| NiftyReg with cross-correlation | 0.755 |
| VoxelMorph with cross-correlation (this paper) | 0.753 |
| VoxelMorph with mean squared error | 0.752 |
The paper gives standard deviations across subjects and structures of 0.157 for affine alone, 0.136 for ANTs, 0.143 for NiftyReg, 0.145 for VoxelMorph with cross-correlation, and 0.140 for VoxelMorph with MSE. Those values describe variation across the underlying scores. The authors also report paired comparisons. The VoxelMorph variants score slightly higher than ANTs, with p-values of 0.003 for cross-correlation and 0.008 for MSE. Comparing cross-correlation VoxelMorph with NiftyReg gives a p-value of 0.21. Comparing the two VoxelMorph losses gives 0.09. The paper describes the latter comparisons as yielding no significant difference.
The authors show overlap distributions for individual structures as well. For visualization, they combine the left and right scores of the same structure. The overall proximity of the methods is visible across those distributions, with some anatomical differences. VoxelMorph does relatively well on the lateral ventricles and less well on the hippocampi. Visual examples help explain what the average covers. The warped scans illustrate the adjustment of ventricles that appear expanded or compressed relative to the atlas and the stretching needed to bring hippocampal outlines closer together. The figures display slices through the resulting volumes, while the actual transformations operate throughout the volume.
The runtime and regularity of the atlas warps
The timings start after the common affine preprocessing. The CPU is an Intel Xeon E5-2680, and VoxelMorph’s GPU timing uses an NVIDIA TitanX. The CPU comparison is especially informative about the difference in procedure. All the deformable methods start from the same kind of global alignment, and VoxelMorph can produce its field by evaluating a previously trained network on the CPU.
CPU runtime after preprocessing for atlas registration on the general test set
Direct evaluation of VoxelMorph takes less time than either iterative baseline.
The numbers
| System or setting | seconds |
|---|---|
| ANTs SyN with cross-correlation | 9059 |
| NiftyReg with cross-correlation | 2347 |
| VoxelMorph with cross-correlation (this paper) | 57 |
| VoxelMorph with mean squared error | 57 |
The reported standard deviations of the CPU times are 2023 seconds for ANTs, 202 seconds for NiftyReg, and 1 second for each VoxelMorph variant. ANTs runtime varies with the difficulty of the particular pair and the convergence of the optimization. On the GPU, both VoxelMorph variants average 0.45 seconds, with a standard deviation of 0.01 seconds. The authors report CPU speedups of 150 times over ANTs and 40 times over NiftyReg for their settings. These are comparisons of the deformable stage. Training and shared preprocessing fall outside the timed interval.
The authors evaluate the geometry of the same atlas warps across volumes with 5.2 million voxels within the brain. They report mean percentages of voxels with non-positive Jacobian determinants of 0.140 for ANTs and 0.600 for NiftyReg. For VoxelMorph, the corresponding percentages are 0.366 with cross-correlation and 0.184 with MSE. In mean voxel counts, the table gives 9662 for ANTs, 41251 for NiftyReg, 19077 for cross-correlation VoxelMorph, and 9606 for MSE VoxelMorph. The differences in these figures matter because methods with similar average overlap can have different local behavior. The visual examples show small islands of irregularity alongside generally smooth displacement patterns.
The paper notes that the baseline packages have settings that can enforce or more strongly encourage diffeomorphic warps. The authors report that such settings affected runtime or the quality measures during their searches. The atlas comparison uses the baseline configurations that performed best on Dice in their search and reports regularity alongside that choice. The reported runtimes therefore describe particular implementations and objectives in the authors’ setup.
Testing against expert delineations
The paper repeats the atlas evaluation on 39 unseen Buckner40 scans with manual delineations of the same anatomical structures. The VoxelMorph networks come from the previous atlas experiment. Expert delineations supply a different basis for measuring whether a warp places a structure in the correct region. In this experiment the manual boundaries are used for evaluation, after the displacement has been predicted.
For Buckner40, affine alone gives a mean Dice of 0.608. ANTs and NiftyReg each achieve 0.776. Direct VoxelMorph prediction gives 0.766 with MSE and 0.774 with cross-correlation. Refining each predicted field separately raises the MSE variant to 0.776 and the cross-correlation variant to 0.786. The reported standard deviation for the best mean is 0.132 across structures and subjects. The broad comparison with the iterative baselines thus carries over to expert-drawn anatomy, with cross-correlation giving the stronger direct result on this particular set.
The expert-label experiment addresses a concern distinct from sample size. In the larger collection, FreeSurfer defines the structures that enter the overlap calculation. A method can agree with those boundaries because it has recovered genuinely corresponding regions or because its output happens to agree with systematic features of the automatic delineations. The manual test changes the source of the boundaries. It supports the atlas comparison under that change and gives a separate estimate of the benefit of refining an individual registration.
When both images vary
In the subject-to-subject experiment, the procedure learns from pairs of training subjects and is evaluated on 250 randomly selected test pairs. Both the fixed and moving volumes can change across cases. This expands the range of appearances and deformations the network must handle relative to training with a recurring atlas. The authors compare the usual feature counts with a network that doubles the number of features at each layer. They also test pair-specific refinement of the wider network.
On these test pairs, affine-only alignment scores 0.579 mean Dice. ANTs gives 0.761 and NiftyReg gives 0.772. The original-width VoxelMorph yields 0.727 with MSE and 0.737 with cross-correlation. Doubling the features raises the scores to 0.750 and 0.763, respectively. With refinement, the wider MSE variant scores 0.764, and the wider cross-correlation variant reaches 0.772. Those scores show where network capacity, the appearance criterion, and additional optimization matter in this experiment. Direct cross-correlation prediction with the wider network is close to ANTs, and refining its output matches the reported NiftyReg mean.
What the ablations show
Smoothness from the loss and from shared training
The authors vary λ and measure Dice on the validation set. Over a broad range of values, overlap changes gradually. Even with λ = 0, where the loss contains no explicit smoothness term, the learned registration improves substantially over affine alignment. The authors attribute this partly to sharing network weights. The predictor has to serve many training pairs, so a fit that only works for a particular scan is less useful to the training objective.
The comparison supports a distinction between the explicit penalty and the restrictions imposed by the training setup. The explicit penalty measures neighbor-to-neighbor changes in the displacement. Shared training restricts how those displacements are generated, because they must all come from the same learned function. Validation Dice indicates how well the result aligns the measured structures. A separate look at the Jacobians is needed to see how regular the individual fields are. The validation result at λ = 0 therefore tells more about anatomical overlap than about the local geometry of the deformation.
The amount of training data and the benefit of refinement
For this experiment the authors use MSE, since it performed similarly to cross-correlation in the main atlas comparison. They train on subsets of the available scans and look at three quantities. They measure Dice on the subset used to train each network, then on the held-out test set with direct predictions, and finally on the test set after optimizing each predicted displacement field separately. This setup lets them examine how the fitted registration generalizes and how much room remains for improving the predicted field on an individual example.
Training with 10 scans yields somewhat lower training and test Dice than training with larger subsets. The authors report no significant Dice difference between training with 100 scans and training with the full training set in this atlas experiment. The task repeatedly uses the same fixed image, and the scans have already been affinely aligned. Within that setup, the measured overlap reaches the level of the full-data experiment with 100 training images. The study tests a different source of variation in its subject-to-subject setup, where the fixed image also changes, but it does not repeat the training-size comparison there.
Pair-specific refinement improves the held-out Dice across the training sizes tested. It uses 100 gradient steps per pair and takes 23.7 ± 0.4 seconds on the GPU or 628.0 ± 4.2 seconds on a single-threaded CPU. These are the timings for the refinement procedure. The paper describes its gain as one Dice point. The result shows that the fast prediction captures much of the attainable anatomical overlap in the experiment and that a further search from this initialization still finds useful adjustments. The overlap comparison measures the practical effect of refinement, while the underlying mathematical optimum of the registration objective remains unknown.
When appearance and capacity matter more
The atlas results place the MSE and cross-correlation variants close together. The subject-to-subject experiment changes the comparison by varying both inputs. Under that condition, the cross-correlation variant scores higher at the usual feature count, at the doubled feature count, and after refinement of the wider network. This is consistent with the authors’ account of local cross-correlation as a more robust choice when intensity patterns vary across scans.
Doubling the network’s feature counts also improves both appearance-loss variants on subject-to-subject pairs. This is a capacity comparison within the same general architecture. The wider predictor can learn more features at each layer, and in the paper’s setup those features improve held-out overlap. Refinement then improves the wider networks further. The experiment shows that both the representation available to the predictor and the criterion it uses for image agreement can affect accuracy when the reference image varies.
Which labels help, and where the gains appear
The auxiliary experiments keep the general training, validation, and test split. The authors train with FreeSurfer labels and use MSE for image matching, with the smoothness coefficient fixed at 0.02. They then vary γ, which governs the contribution of label overlap, and vary the anatomical detail available to the loss. During testing, the prediction still takes only the two images. The authors distinguish observed structures, whose labels entered training, from unobserved structures, whose labels were withheld from that objective.
The sparse-label condition uses a single kind of anatomical structure at a time. The authors use distinct folds for each of four structures: the ventricles, the hippocampi, the cerebral white matter, and the cerebral cortex. A second condition supplies 15 of the 30 structures, drawing a different random subset for each of five folds. A third condition provides all 30 structures. This setup allows the authors to vary label coverage at training time while still using the full anatomical evaluation to see where the benefits extend.
On observed structures, test Dice generally improves as γ increases. The authors report a largest p-value smaller than 10⁻⁹ across the four settings for their comparisons with unsupervised VoxelMorph and ANTs on observed anatomy. For a range of weights, Dice also improves on unobserved structures in the partially labeled experiments. A plausible explanation within the setup is that a shared, spatially coupled field has to accommodate the changes needed to align the labeled regions alongside the appearance of their surroundings. The measured gain is in the overlap of those surrounding structures. The experiment does not establish which anatomical relationships the network used to obtain it.
At a higher weight, the gain becomes more selective. The paper reports declining accuracy on unobserved structures in the range log γ ∈ [−3, −2] even as overlap on observed anatomy continues to improve. The authors interpret this as the training objective beginning to overfit the structures it sees. Supplying labels for all evaluated structures changes what the overlap score can reveal about that tradeoff. High Dice can show that the supplied structures line up well, while the regularity measure can still expose undesirable behavior within and between them.
The coarse-label condition asks whether useful supervision requires the same anatomical categories used in evaluation. The authors merge the finer regions into white matter, gray matter, cerebrospinal fluid, and brain stem. Training uses those broad masks, while evaluation uses the original 30 structures. At γ = 0.01, the general test results reach a mean Dice of 0.78±0.03 on the FreeSurfer structures. The authors describe this as roughly a 3 Dice point improvement over training without the auxiliary information and report a p-value smaller than 10⁻¹⁰. The network can therefore benefit from boundaries that are less detailed than the anatomical delineations it will later be judged on.
The authors also evaluate the auxiliary variants using the manual Buckner40 delineations. The pattern is similar, with smaller Dice gains than in the general test using FreeSurfer labels. They suggest that the higher starting Dice scores on Buckner40 could contribute to the smaller gains. This test matters because the labels supplied at training still come from FreeSurfer, while the manual delineations give a different source of evidence for the improvement at test time.
A higher Dice score can accompany more folding
The regularity experiment tracks the percentage of voxels with non-positive Jacobian determinants as γ changes. Increasing the weight makes alignment of the supplied labels count more heavily in the optimization. Across observation settings, the authors see the most irregular maps when label overlap alone guides training. This is consistent with the information available to the label objective. It can reward moving a region into the correct outline while placing relatively few constraints on how the interior of that region is mapped.
Non-positive Jacobian determinants on the general test set with coarse training labels
Folded or collapsed voxels become more common as training relies more heavily on label overlap.
The numbers
| System or setting | percent of voxels |
|---|---|
| No auxiliary loss | 0.18 |
| Gamma 0.001 | 0.18 |
| Gamma 0.01 (this paper) | 0.29 |
| Gamma 0.1 | 1.47 |
| Segmentation loss only | 10.82 |
The highlighted coarse-label setting is the one the authors identify as a compromise between accuracy and deformation regularity. The smallest percentage alone would favor a different setting. At γ = 0.01, the reported percentages with non-positive determinants are 0.44 in the single-structure setting, 0.34 with half of the structures, 0.37 with all of them, and 0.29 with coarse labels. With label overlap as the sole loss, the corresponding percentages are 13.14, 9.90, 10.13, and 10.82. The size of the increase varies across settings, while its direction is consistent.
The visual comparison illustrates the same effect. The moderate-weight warp yields a more coherent image and a smoother displacement pattern. With the segmentation-only objective, the observed regions can achieve strong overlap even as the warped image becomes less coherent. The paper shows this comparison for hippocampal labels, a subset containing half the structures, all of the evaluated labels, and the coarse tissue groups. The combination of Dice and Jacobian measurements makes it possible to see why optimizing only the labeled overlap would give an incomplete account of registration quality.
Limitations
Limits identified by the authors
The authors point out that several displacement fields can produce similarly plausible registered images and that a dense reference warp is difficult to define for these data. They evaluate overlap of named anatomical regions and count voxels with non-positive Jacobian determinants. These measurements support claims about region placement and local deformation regularity. Fine correspondence inside a region remains an open question even when its enclosing mask overlaps well.
The displacement representation in this paper has no explicit diffeomorphic constraint. Smoothness discourages abrupt changes, and most voxels have a positive Jacobian determinant in the reported intensity-only atlas experiment. Some locations still fold or collapse. A percentage summarizes the extent of this behavior without identifying where the affected voxels lie or how the warp behaves throughout a specific structure. The authors mention their related velocity-based diffeomorphic approach as a possible way to address this issue. The numerical results reported here describe the displacement-based formulation tested in the paper.
The authors also state that the gains from auxiliary information depend on the number and quality of the labels and on the choice of weight in the loss. Observed-region overlap can continue improving in a regime where alignment of other anatomy deteriorates. Foldings also become more common as the segmentation objective takes over. The reported gains therefore concern settings in which the label loss, image term, and smoothness penalty are balanced for the task being measured.
Finally, the authors identify the dependence of generalization on the training data. They discuss cardiac MRI, lung CT, and multimodal registration as possible applications. For the multimodal case, they suggest a similarity function such as mutual information. They also describe keypoints and additional modalities as possible sources of auxiliary information. Those possibilities follow from how the framework is defined. The experimental evidence here concerns preprocessed brain MRI and auxiliary anatomical masks.
Limits apparent from the experimental design
The evaluations start from scans with common spatial normalization, brain extraction, resampling, and cropping. This defines the registration task before any network prediction is made. It also establishes the conditions under which the timing result applies. A task beginning with scans in very different poses or with failed brain extraction would raise questions about the preprocessing and the range of deformations the network can handle. The experiments establish how the deformable stage performs on the inputs prepared for it.
Similarly, the data draw on several studies, but the reported aggregate test scores chiefly address performance on held-out scans from the assembled collection. The general test average leaves open how performance changes from site to site or with a new acquisition protocol. Buckner40 provides a useful separate evaluation because it is reserved for testing and uses expert boundaries. It remains a brain MRI evaluation over the same kinds of anatomical structures. Transfer to a new anatomy or a substantially different imaging distribution would require its own evaluation.
The way structures are selected and averaged also shapes the interpretation of the Dice values. The size filter ensures that every included structure has a minimum volume in all test subjects. Consequently the reported mean represents those consistently represented regions. The per-structure plots show variation that can be concealed by a mean, and the combined hemispheric display leaves hemispheric differences outside the plotted comparison. Applications that depend on individual structures, small landmarks, or fine correspondence within masks pose more specific questions than the reported average can answer.
The coarse-label masks are assembled from the available automatic segmentations. This isolates the effect of supplying broad anatomical categories within the same data pipeline. It also leaves open how the training would respond to coarse labels produced by another annotation procedure or to inconsistent boundaries. The manual test gives an independent check on the alignment of the outputs, while the training-label source stays the same.
The speed measurements are specific to the authors’ selected baseline configurations and hardware. They document a large gain in the cost of registering a new pair once the predictor is trained. Total computation for a project would also depend on how many scans it registers, how often the predictor needs to be trained again, and whether pair-specific refinement is used. The CPU measurements show the benefit of direct evaluation without relying on GPU availability. A comparison with equivalently tuned GPU implementations of the iterative methods remains open, as does a comparison under a common requirement for global invertibility.
What came after
Arridge and colleagues’ work on data-driven inverse problems cites VoxelMorph. The connection is that deformable registration asks for an unknown coordinate map given observed images. The conventional formulation searches for that map by optimizing an objective for the observed pair. VoxelMorph uses examples to learn a function that estimates the map, while keeping image agreement and spatial regularity in the training objective. This places a familiar inverse problem in a setting where some of the computational work can be shared across instances.
The citation establishes a link to that broader literature. The specific role of VoxelMorph in the citing work, including whether it reuses the method or evaluates a related procedure, is unspecified. Within the registration study itself, the optional refinement experiment gives a concrete example of how learning and iterative optimization can work together. The learned function supplies a fast estimate for a new pair, and a subsequent search can improve that estimate when the application can afford additional computation.
Cite
Cite as Guha Balakrishnan, Amy Zhao, Mert Rory Sabuncu, John V. Guttag and Adrian Vasile Dalca. 2019. VoxelMorph: A Learning Framework for Deformable Medical Image Registration. IEEE Transactions on Medical Imaging.
@article{balakrishnan2019voxelmorph,
title = {{VoxelMorph: A Learning Framework for Deformable Medical Image Registration}},
author = {Guha Balakrishnan, Amy Zhao, Mert Rory Sabuncu, John V. Guttag and Adrian Vasile Dalca},
journal = {IEEE Transactions on Medical Imaging},
year = {2019},
doi = {10.1109/tmi.2019.2897538},
eprint = {1809.05231},
archivePrefix = {arXiv},
url = {https://doi.org/10.1109/tmi.2019.2897538}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/balakrishnan-2019-voxelmorph-learning-framework-deformable-medical/