Multi-Node Multi-GPU Diffeomorphic Image Registration for Large-Scale Imaging Problems

Malte Brunn, Naveen Himthani, George Biros, Miriam Mehl, Andreas MangarXiv 2020 · DOI

TL;DR

This paper introduces a highly scalable, multi-node multi-GPU framework for diffeomorphic image registration, enabling the processing of massive medical datasets at unprecedented speeds. By combining a novel Hessian preconditioner with optimized communication kernels, the authors achieved a 70% speedup over previous state-of-the-art GPU solvers and successfully registered images with 25 billion unknowns—a problem size 152× larger than previous benchmarks.

What Problem Does This Paper Address?

Image registration is the process of finding a spatial transformation that aligns two or more images, such as mapping a patient's brain scan to a standard anatomical atlas. In clinical research, this is essential for tracking neurodegenerative diseases or studying population-wide morphological changes.

The challenge lies in the "Large-Deformation Diffeomorphic Metric Mapping" (LDDMM) framework. While LDDMM ensures that the resulting maps are smooth and biologically plausible (diffeomorphisms), it is computationally brutal. Registering standard clinical volumes ($256^3$) involves millions of unknowns and can take minutes on high-end CPUs. Emerging high-resolution datasets, like CLARITY imaging of murine brains, push this into the trillions of unknowns, far exceeding the memory and processing power of single-node systems.

Methods

The authors extend the CLAIRE library, moving from a single-GPU implementation to a distributed, multi-node multi-GPU architecture. Their approach centers on a Gauss-Newton-Krylov solver and includes several key innovations:

  1. Novel Preconditioning (InvH0 & 2LInvH0): They introduced a new preconditioner for the reduced-space Hessian system based on a "zero-velocity approximation." This allows the solver to skip expensive incremental PDE solves during the preconditioning step. A two-level version (2LInvH0) further amortizes costs by performing calculations on a coarser grid.
  2. Kernel Optimization: The team optimized the three most critical computational kernels:
  3. Interpolation (IP): Using Lagrange polynomial-based cubic interpolation, hardware-accelerated via GPU texture units.
  4. Finite Differences (FD): Replacing traditional FFT-based derivatives with 8th-order central difference schemes to reduce communication overhead.
  5. Fast Fourier Transforms (FFT): Implementing a custom 2D slab decomposition that utilizes CUDA-aware MPI and peer-to-peer communication to bypass slow host-to-device transfers.
  6. Communication Strategy: They utilized CUDA-aware MPI and custom peer-to-peer routines for all-to-all communication, which proved faster than standard vendor MPI implementations for their specific data volumes.

Datasets

  • SYN: A synthetic test problem used to verify numerical accuracy and scaling.
  • NIREP: A standardized repository of 16 T1-weighted MR neuroimaging datasets ($256 \times 300 \times 256$ voxels) used for benchmarking registration accuracy.
  • CLARITY: Massive biomedical imaging datasets of murine brains with resolutions up to $20\text{K} \times 20\text{K} \times 1\text{K}$.
Fig. 2: 3D image registration problem for murine CLARITY imaging data. We illustrate a multi-subject registration problem. In panel (A), we show the Allen Mouse Brain Atlas [41] with a grid size of 800 × 1140 × 1320. We show a volume rendering (top left), annotations of anatomical regions (bottom left), an axial view (middle) and a coronal view (right). In panel (B), we show a coronal and an axial view (after affine pre-registration to the atlas image), as well as a closeup of a subregion in full resolution. This CLARITY volume (Control 189) has a resolution of 585 nm × 585 nm × 5 µm with a grid size of 20 084 × 24 618 × 1333. Once we have found the diffeomorphism, we can transfer the annotations of the anatomical regions identified in the atlas (see panel (A)) to the CLARITY dataset, and study anatomical subregions.

Key Insights and Ideas

  • Algorithmic vs. Hardware Scaling: The authors highlight that simply throwing more GPUs at the problem isn't enough. The new InvH0 preconditioner was vital because it reduced the number of iterations needed to reach convergence, effectively "doing less work" rather than just "doing work faster."
  • Communication is the Bottleneck: As problem sizes grow, the time spent moving data between GPUs (especially for FFTs) dominates the runtime. Switching from spectral (FFT) derivatives to Finite Differences was a strategic move to trade a bit of local computation for a significant reduction in global communication.
  • The "Sweet Spot" for GPU Workloads: The paper notes that for high-performance scaling, each GPU must hold enough data to keep its computational kernels busy. If the "slab" of data per GPU becomes too thin, communication costs overwhelm the speed of the kernels, leading to poor scaling.
Fig. 3: Convergence plots showing that the new 2LInvH0 preconditioner (green) leads to faster residual reduction across various grid sizes compared to the baseline InvA (red).

Key Results

  • Single-GPU Speed: Registered a $256^3$ volume in just 5 seconds on an NVIDIA Tesla V100, a 70% improvement over the previous state-of-the-art.
  • Massive Scale: Successfully registered $2048^3$ images (25 billion unknowns) using 256 GPUs on the TACC Longhorn system.
  • Comparative Performance: The solver is 34× faster than the original CPU version of CLAIRE and 50× faster than other exemplary GPU-accelerated LDDMM implementations.
  • Efficiency: The runtime is dominated by the three optimized kernels (FFT, SL, FD), as shown in the runtime breakdown.
Fig. 4: Runtime breakdown for different grid sizes. The "PC" (Preconditioner) and "Hessian" segments represent the bulk of the Newton step computation.

Limitations and Future Work

While the framework achieves incredible scale, the authors acknowledge a few constraints:

  • Stationary Velocities: CLAIRE currently uses stationary velocity fields. While efficient, this imposes some theoretical limitations on the types of diffeomorphisms that can be represented compared to time-dependent velocity fields.
  • Memory Pressure: Even with optimizations, the memory footprint is high ($74 + N_t$ words per grid point). Future work aims to share memory across external libraries and explore parallel-in-time integration to further reduce this pressure.
  • Hardware Specificity: Some kernels (like interpolation) rely on specific GPU hardware features (texture memory), meaning the code would require porting to run on other accelerators like AMD or Intel GPUs.

Summary updated

BibTeX
@misc{brunn2020multi,
  author = {Malte Brunn and Naveen Himthani and George Biros and Miriam Mehl and Andreas Mang},
  title = {{Multi-Node Multi-GPU Diffeomorphic Image Registration for Large-Scale Imaging Problems}},
  year = {2020},
  eprint = {2008.12820},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2008.12820},
}
Figure