Memory-Efficient Learning for Large-Scale Computational Imaging

Michael R. Kellman, Kevin Zhang, Eric Markley, Jonathan I. Tamir, Emrah Bostan, Michael Lustig, Laura Waller

TL;DR

Training deep "Physics-based Networks" (PbNs) for high-resolution imaging often hits a hard wall: GPU memory limits. This paper introduces a memory-efficient learning strategy that avoids storing intermediate activations by "reversing" the network's layers during backpropagation, enabling the design of large-scale imaging systems on consumer-grade hardware.

What Problem Does This Paper Address?

In computational imaging (like MRI or high-end microscopy), we don't just take a picture; we solve an inverse problem to reconstruct an image from raw sensor data. Recently, researchers have started "unrolling" these iterative reconstruction algorithms into neural networks called Physics-based Networks (PbNs). This allows them to learn optimal hardware settings or image priors directly from data.

The catch? These networks are massive. To compute gradients for training (backpropagation), standard frameworks store every intermediate variable (activations) for every layer. For gigapixel-scale microscopy or 3D MRI, this can require terabytes of memory—far exceeding the 12GB to 80GB found on modern GPUs. This forces researchers to either use smaller, less effective models or buy prohibitively expensive hardware.

Methods

The authors propose a reverse recalculation scheme. Instead of storing all intermediate variables during the forward pass, they recompute them on-the-fly during the backward pass.

Key technical contributions include:

  • Inverting Gradient Layers: They show that a gradient descent step can be viewed as a "forward Euler" step. To go backward, they use a Fixed Point Method (Algorithm 2) to solve the implicit equation and recover the previous state.
  • Inverting Proximal Layers: Proximal operators (used for denoising or enforcing priors) are treated as "backward Euler" steps. Their inverse can often be expressed as a simple "forward" step, provided the function is bijective.
  • Hybrid Checkpointing: Because floating-point math isn't perfect, small errors can accumulate during recalculation. The authors introduce a hybrid scheme that saves "checkpoints" every few layers to reset the state and maintain numerical stability.

Datasets

The paper demonstrates the method on two large-scale computational imaging tasks:

  1. Super-resolution Optical Microscopy (Fourier Ptychography): Learning the optimal LED illumination patterns to beat the diffraction limit of a standard microscope.
  2. Multi-channel MRI: Learning deep image priors to speed up MRI scans by reconstructing high-quality images from undersampled data.

The authors primarily use these to reproduce results from previous studies (e.g., Kellman et al., 2019; Aggarwal et al., 2018) to prove their memory-efficient version reaches the same accuracy.

Key Insights and Ideas

  • Structure is a Feature: Unlike "black-box" neural networks, PbNs are built from known physical models and optimization steps. The authors realized this mathematical structure makes the layers inherently more "invertible" than a random sequence of ReLUs and Convolutions.
  • The Memory-Time Trade-off: The core "aha" moment is that we can trade a modest increase in computation time (re-running parts of the math) for a massive reduction in spatial complexity (memory). In many large-scale fields, memory is a "hard" constraint (it won't run at all), while time is a "soft" constraint (it just runs slower).
  • Inversion as Optimization: Treating the reversal of a layer as its own mini-optimization problem (the fixed-point iteration) allows them to handle layers that don't have a simple closed-form inverse.

Key Results

The method allows training on hardware that was previously insufficient:

  • Microscopy: Reduced memory usage from 6.26 GB to 0.627 GB (a 10x reduction). Training time only increased by a factor of 2.
  • MRI: Reduced memory usage from 10.77 GB to 2.11 GB (a 5x reduction). While training took longer (8.25 hours vs 3.5 hours), it enabled the model to fit comfortably on a standard consumer GPU.
  • Accuracy: In both cases, the final image quality and loss curves were nearly identical to standard, memory-heavy backpropagation.

Limitations and Future Work

  • Numerical Drift: For extremely deep networks, the reverse recalculation can become "ill-posed," leading to numerical errors. While checkpointing helps, there is a limit to how far a state can be reversed accurately.
  • Convergence Requirements: The mathematical proof for inverting gradient layers relies on the Lipschitz constant of the forward model. If the step size is too large or the model is too complex, the fixed-point algorithm might not converge.
  • Complexity of Subroutines: The current work focuses on Proximal Gradient Descent. The authors note that future work could extend this to more complex solvers, such as those involving linear system inversions (e.g., Conjugate Gradient).

Summary updated

BibTeX
@article{kellman2020memory,
  author = {Michael R. Kellman and Kevin Zhang and Eric Markley and Jonathan I. Tamir and Emrah Bostan and Michael Lustig and Laura Waller},
  title = {{Memory-Efficient Learning for Large-Scale Computational Imaging}},
  journal = {IEEE Trans. Computational Imaging},
  year = {2020},
  url = {https://openreview.net/forum?id=-_e4eUL9mc},
}
Figure