Machine learning and spatial decomposition for large CT scans.

Eric C. Cyr, Gary Saavedra2021

Abstract

Training deep learning models on high-resolution 3D Computed Tomography (CT) scans often encounters a "memory wall," where the memory requirements of intermediate activations exceed the capacity of even the most advanced GPUs. This paper investigates the application of spatial decomposition—partitioning large 3D volumes across thousands of processors—to enable the training of complex architectures like UNets on massive datasets. Using the DistDL (Distributed Deep Learning) framework, we demonstrate that spatial parallelism can significantly reduce per-node memory footprints and provide tangible speedups, scaling effectively to over 4,000 processors.

Introduction

In fields ranging from medical imaging to industrial non-destructive evaluation, the resolution of 3D CT scans is increasing rapidly. While deep learning architectures, particularly the UNet, have shown exceptional performance in segmenting these images, their memory consumption scales exponentially with image resolution. For instance, a $1024^3$ voxel volume can require the memory capacity of nearly 20 high-end NVIDIA A100 GPUs just to store the activations for a single training step.

Traditionally, researchers have bypassed this bottleneck by downsampling images or processing them as 2D slices. However, these methods sacrifice either fine-grained detail or critical 3D context. This research addresses the challenge of processing full-resolution 3D volumes by distributing the computational workload across a supercomputing cluster using spatial decomposition.

Methods

The core of this approach is the implementation of spatial parallelism via the DistDL framework, a library designed to extend PyTorch for high-performance computing (HPC) environments. Unlike standard data parallelism, which distributes different images to different GPUs, spatial decomposition partitions a single large 3D volume into smaller sub-blocks.

Spatial Partitioning and Distributed Convolution

The 3D volume is split into a grid of sub-images, each assigned to a specific processor. To maintain the integrity of the neural network's receptive field, the framework implements "distributed convolutions." This involves halo exchanges, where neighboring processors swap boundary data (voxels) at the edges of their respective sub-blocks. This ensures that convolution filters can slide across partition boundaries seamlessly, allowing the model to behave as if it were processing a single contiguous volume.

Experimental Results

Dataset and Benchmarking

The framework was evaluated using a synthetic ellipse segmentation dataset. This allowed for precise control over image dimensions (ranging from $128^3$ to $1024^3$) and complexity, facilitating rigorous benchmarking of memory usage and compute time.

Memory Efficiency and Scaling

The study quantified the "memory wall" and demonstrated that spatial decomposition effectively breaks it. For a UNet with 64 channels, the researchers achieved significant results:

  • Memory Reduction: Increasing the number of processors led to a reduction in the memory footprint per process by 3.4x to 4.2x, depending on the specific network configuration.
  • Performance Gains: Parallelization resulted in speedups of 2.4x to 3.4x during the forward propagation phase.
  • Massive Scalability: The system successfully scaled to 4,000+ processors, proving that spatial decomposition is a viable path for training on extremely large 3D volumes that were previously intractable.

Discussion and Future Work

While spatial decomposition solves the primary memory bottleneck, it introduces a trade-off in the form of communication overhead. The frequent halo exchanges require the high-speed interconnects typically found in supercomputing environments, meaning this approach is currently best suited for HPC clusters rather than local multi-GPU workstations.

Future research will focus on applying this framework to real-world medical and industrial CT scans to evaluate its performance against the nuances of non-synthetic data. Additionally, the integration of spatial multigrid methods is being explored. By processing data at multiple scales simultaneously within the distributed framework, it may be possible to achieve even greater computational efficiency and faster convergence.

Conclusion

Spatial decomposition represents a necessary architectural shift for deep learning on "big data" in 3D. By distributing the spatial dimensions of a volume across a cluster, researchers can overcome hardware limitations to process high-resolution scans in their entirety, preserving the full 3D context and detail necessary for advanced image analysis.

Summary updated

BibTeX
@misc{cyr2021machine,
  author = {Eric C. Cyr and Gary Saavedra},
  title = {{Machine learning and spatial decomposition for large CT scans.}},
  year = {2021},
  doi = {10.2172/1903090},
}
Figure