Computing Large Deformation Metric Mappings via Geodesic Flows of Diffeomorphisms

Mirza Faisal Beg, Michael I. Miller, Alain Trouvé, Laurent Younes · IJCV 61(2):139–157 · 2005

Beg, Miller, Trouvé and Younes, Computing Large Deformation Metric Mappings via Geodesic Flows of Diffeomorphisms, IJCV 2005.

In one paragraph

Registration looks for a warp \varphi that bends a template image I_0 onto a target I_1. Finding \varphi directly allows folds and tears, and a single displacement field only works for small motions. The paper builds \varphi as the end point of a flow: pick a time-varying velocity field v_t, let every point ride it from time 0 to 1, and take \varphi=\phi_1. If v_t is smooth, the flow cannot fold, so \varphi is a diffeomorphism by construction. The velocity is chosen to minimise “total smoothness cost along the way” plus “mismatch at the end”. The authors derive the equation the best velocity must satisfy (Euler–Lagrange), turn it into a gradient algorithm, and show that the cost of the best path is a genuine distance between images.

The picture, intuition first

A warp as a journey. Mark every point of the template. Over time t\in[0,1] each point moves, and at each time its motion is read off a velocity field: \dot\phi_t(x)=v_t(\phi_t(x)). After the journey the template has been carried to I_0\circ\varphi^{-1}. Smooth velocity means neighbouring points move almost alike, so neighbours stay neighbours and nothing crosses. Compare the “big step” in section 1 of the interactive page: the same field applied once, as x+v(x), can turn cells inside out; applied as a flow it cannot.

The cost of a journey. Moving fast and roughly is expensive. Each moment costs \lVert v_t\rVert_V^2, where the norm \lVert\cdot\rVert_V is large for rough fields. The total cost \int_0^1\lVert v_t\rVert_V^2\,dt is the energy of the path. The cheapest way of reaching a given warp is a shortest path, a geodesic, and its length \int_0^1\lVert v_t\rVert_V\,dt measures how far the warp is from doing nothing.

The compromise. Zero cost means no warp; perfect matching may cost a lot. So minimise E(v)=\int_0^1\lVert v_t\rVert_V^2\,dt+\frac1{\sigma^2}\big\lVert I_0\circ\varphi_1^{-1}-I_1\big\rVert_{L^2}^2 \qquad(\text{their Eq. 1 and 8}). \sigma sets how much a leftover mismatch is tolerated: small \sigma means matching dominates.

Notation in plain words

Derivation of the Euler–Lagrange equation (Section 2), step by step

Step 1: what a nudge to the velocity does to the flow (Lemma 2.1). Nudge v by \epsilon h and ask how \phi_{s,t} changes. The result (Eq. 3) is \partial_h\phi^v_{s,t}=D\phi^v_{s,t}\int_s^t\big(D\phi^v_{s,u}\big)^{-1}\,h_u\circ\phi^v_{s,u}\,du. Reading it: a nudge h_u applied at time u shifts the particle at that moment; (D\phi_{s,u})^{-1} and D\phi_{s,t} transport that shift along the rest of the flow (a push at time u is stretched by how the flow stretches space between u and t). Adding up over u gives the total shift. The proof checks that this expression solves the linear ODE (their Eq. 4) satisfied by the derivative of the flow equation with respect to \epsilon.

Step 2: the smoothness term. E^1(v)=\int\lVert v_t\rVert_V^2dt has \partial_hE^1=2\int\langle v_t,h_t\rangle_V\,dt, the derivative of a square.

Step 3: the matching term. With E^2=\frac1{\sigma^2}\lVert I_0\circ\phi_{1,0}-I_1\rVert^2, the chain rule gives \frac2{\sigma^2}\langle I_0\circ\phi_{1,0}-I_1,\ D(I_0\circ\phi_{1,0})\,\partial_h\phi_{1,0}\rangle. Substitute Step 1, then change variables so that the integral over space is expressed at time t (the factor |D\phi_{t,1}| is the Jacobian of that change of variables). The result is \partial_hE^2=-\int_0^1\Big\langle\frac2{\sigma^2}\,|D\phi_{t,1}|\,\big(J^0_t-J^1_t\big)\,\nabla J^0_t,\ h_t\Big\rangle_{L^2}dt.

Step 4: move the pairing from L^2 to V. Because \langle a,b\rangle_{L^2}=\langle Ka,b\rangle_V, the same expression equals a V pairing with K applied to the force. So (Eq. 10) \nabla_vE_t=2v_t-K\Big[\frac2{\sigma^2}|D\phi_{t,1}|\,\nabla J^0_t\,\big(J^0_t-J^1_t\big)\Big], and the optimum satisfies \nabla_vE_t=0, which is Eq. 9: v_t=\frac1{\sigma^2}K[\ldots].

What the force means. At time t, compare the template carried forward (J^0_t) with the target carried back (J^1_t): they are two images that should coincide if the path is right. Where they differ, the term \nabla J^0_t\,(J^0_t-J^1_t) is the classical optical-flow direction that moves template edges toward the target; |D\phi_{t,1}| rescales for volume change between t and the end. Applying K smooths this rough force into an admissible velocity. So the best path at every instant is “move along a smoothed version of the correction needed to make the two time-t images agree”, and it meets in the middle rather than chasing the target.

The algorithm (Section 3), in outline

Discretise time into N steps with a piecewise-constant velocity. Repeat: compute \phi_{t,0} forward and \phi_{t,1} backward by transporting the identity along v (a semi-Lagrangian scheme: follow each grid point backwards along the field for one step and interpolate), form J^0_t,J^1_t, build the force, apply K by division in the Fourier domain (the symbol of L^\dagger L is A(k)^2 with A(k)=\gamma+2\alpha\sum_i(1-\cos(2\pi k_i/N_i))/\Delta x_i^2), and take a gradient step. Every 10 iterations, re-time the path to constant speed (below). Stop when the gradient is small.

Why constant speed. Cauchy–Schwarz gives \int_0^1\lVert v_t\rVert^2dt\ge(\int_0^1\lVert v_t\rVert dt)^2 with equality only for constant speed. Re-timing the path changes how fast it is travelled but not where it goes, so \phi_1, the matching term and the length are all unchanged, while the energy drops to the minimum for that path. Geodesics are constant-speed, so this speeds convergence. Section 3 of the interactive page shows the gap as the variance of the speed.

Why the gradient is taken in V (Section 6.1)

The L^2 gradient is 2L^\dagger Lv_t+b_t and the V (Hilbert or Sobolev) gradient is K applied to it, 2v_t+Kb_t, where b_t is the matching force. In a basis of eigenfunctions of L^\dagger L with eigenvalues \lambda_i\to\infty, the L^2 gradient multiplies the high-frequency parts of v_t by \lambda_i (amplifying them), whereas the V gradient divides the force’s parts by \lambda_i (smoothing them). Large \lambda_i make the L^2 problem stiff: a step size small enough for the highest frequency makes progress on the low ones crawl. Section 2 of the interactive page plots the two factors.

Metric, and comparison with Christensen’s algorithm

Metric. With the right-invariant \rho_G(\varphi_0,\varphi_1)=\inf\{\int_0^1\lVert v_t\rVert_V\,dt:\ \varphi_1=\phi^v_1\circ\varphi_0\} the paper defines \rho_I(I_0,I_1)=\inf\{\rho_G(\mathrm{id},\varphi):I_1=I_0\circ\varphi^{-1}\} on the orbit of images. Symmetry and the triangle inequality follow from right-invariance (if I_1=I_0\circ\varphi^{-1} and I_2=I_1\circ\psi^{-1} then I_2=I_0\circ(\psi\varphi)^{-1} and \rho_G(\mathrm{id},\psi\varphi)\le\rho_G(\mathrm{id},\varphi)+\rho_G(\varphi,\psi\varphi), with \rho_G(\varphi,\psi\varphi)=\rho_G(\mathrm{id},\psi)); positivity needs that the infimum is attained, which is cited to Younes 1999.

GEC (Section 5). Christensen’s method solves, at each time step independently, the local problem L^\dagger Lv_t+b_t=0 with force b_t=-\zeta(J^0_t-J^1_1)\nabla J^0_t, then integrates forward. The authors show it is a Riemannian gradient descent on the matching term alone along the manifold of diffeomorphisms, taking the locally best step at each moment (greedy). It gives a path to a matching warp but not the shortest one, and it is not the solution of a global variational problem, so it cannot give the metric.

Results reported

Experiment (2D) L Image error left Estimated distance Iterations Time
Parallel translation -0.01\nabla^2+0.1I 1.97% 0.769 70 0.2 min
Heart (canine, normal vs failing) -0.01\nabla^2+I 7.12% 6.122 159 3.7 min
Schizophrenia hippocampus -0.01\nabla^2+I 3.01% 4.891 277 4.2 min
Alzheimer hippocampus -0.01\nabla^2+I 2.69% 5.592 255 3.9 min
Macaque cortex -0.01\nabla^2+I 3.64% 6.869 134 3.2 min
LDDMM against GEC at comparable final image error Final error LDDMM / GEC Path length LDDMM / GEC Time (s) LDDMM / GEC
Parallel translation 5.648% / 5.65% 0.7223 / 0.7228 12 / 1
Heart 11.558% / 11.799% 4.631 / 6.7145 120 / 2.4
Macaque cortex 9.55% / 9.53% 4.636 / 5.45 98 / 1.2

The mitochondria experiment (Fig. 8) orders eight target shapes by estimated distance, which the authors say agrees with human judgements of near and far. 3D hippocampus volumes (80×128×128) take half an hour to a few hours on 8 processors.

Questions and doubts

Takeaways