Diffeomorphic Image Registration using Lipschitz Continuous Residual Networks

Ankita Joshi, Yi Hong · MIDL (PMLR 172) · 2022

In one paragraph

Registration warps one image onto another with a smooth, invertible map (a diffeomorphism), so no tissue is torn or folded. The classical way to build such a map is to integrate a velocity field over time. This paper notes that a residual network is exactly an Euler discretisation of an ODE, so a stack of ResNet blocks can be the integrator, and makes each block “Lipschitz” with spectral normalisation so the map stays well behaved.

The picture, intuition first

Imagine every pixel carried along by a river. A velocity field v_t(x) says how fast and in which direction the water moves at each point at time t. Following the flow from t=0 to t=1 moves each pixel to a new place. If the water never tears and never crosses itself, the end result is a smooth, invertible warp, a diffeomorphism.

In symbols (their Eq. 2 and 3):

The first is what LDDMM uses; the second is what most deep unsupervised methods (including VoxelMorph) use, and it is evaluated with an expensive “scaling and squaring” step that is why those methods often work at half resolution.

The link to ResNets (Section 3). A residual block computes x_{l+1}=x_l+F(x_l,\theta_l). That is one forward Euler step of an ODE with step size one: “current position plus a small displacement.” So k residual blocks in a row integrate the flow in k steps.

The architecture (Fig. 1)

  1. A U-Net takes the two images and outputs a mean and variance of an initial velocity field (as in VoxelMorph’s variational set-up), from which a velocity field is sampled.
  2. k=7 ResNet blocks integrate it. Each block is conv, leaky ReLU, conv, tanh, then divide by 2, added to the input.
  3. The result deforms the source image by interpolation.

Lipschitz constraint. Every convolution inside a block is spectrally normalised: its weights are divided by their largest singular value, so the layer cannot stretch any input by more than a factor of 1. Intuition: a function F is Lipschitz with constant L if \lVert F(a)-F(b)\rVert\le L\lVert a-b\rVert, so nearby inputs give nearby outputs. The paper’s argument is that this controls smoothness, which (via the Cauchy–Lipschitz theorem on ODEs) makes the flow well defined, and that it makes the space of admissible velocities an RKHS, the setting LDDMM works in.

Loss. Image similarity (L_2) plus a KL term pulling the velocity distribution towards a standard normal, plus a penalty on the number of places where the Jacobian determinant of the warp is negative (a negative determinant means the warp has locally folded space). Weights [2,1,1].

Results (OASIS brain MRI, 414 subjects, 100 test pairs)

Method RMSE (\times10^{-3}) Folded voxels Dice Inference per pair Training memory
SyN (classical) 1.08 47.7 ± 145.1 0.67 10 min (CPU) n/a
VoxelMorph 1.10 51.4 ± 83.8 0.72 450 ms + 1440 ms 8.6 GB
SVF-R2Net 1.54 28.4 ± 17.6 0.69 900 ms 7.9 GB
NSVF-R2Net 1.34 27.2 ± 47.4 0.70 900 ms 8.5 GB

The authors describe it as comparable image matching with smoother deformations and efficient computation.

Questions and doubts

Takeaways