How to do Physics-based Learning

Michael R. Kellman, Michael Lustig, Laura WallerarXiv 2020

Abstract

Physics-based learning bridges the gap between classical imaging physics and modern deep learning by "unrolling" iterative optimization algorithms into neural network layers. This tutorial provides a practical roadmap for implementing these networks in PyTorch, demonstrating how to leverage automatic differentiation twice to learn both physical hardware parameters and reconstruction priors simultaneously.

Introduction

In computational imaging fields such as MRI or tomography, data acquisition is an encoding process defined by a physical forward model. Recovering the original signal requires solving an inverse problem. Historically, researchers faced a trade-off between classical model-based reconstruction—which is physically grounded but computationally expensive—and deep learning, which offers speed but often lacks physical constraints.

"Algorithm unrolling" offers a solution by transforming the iterations of a classical optimization algorithm into the layers of a deep neural network. This approach ensures the model remains "physics-aware" while benefiting from the learnability of neural networks. However, implementation can be mathematically complex. This work addresses these hurdles by demonstrating how to build unrolled systems using automatic differentiation (AD) to avoid manual derivation of gradients.

Methods: Algorithm Unrolling

The core methodology involves unrolling Proximal Gradient Descent. A standard iterative solver is treated as a network with $N$ layers, where each layer corresponds to a single iteration.

The architecture of an unrolled network, showing the sequence of iterations and the internal structure of the $n^{th}$ block consisting of Data and Prior Updates.

As shown in the figure above, each unrolled "layer" consists of two primary components:

  1. Data Update: A gradient descent step based on the system's forward physical model, ensuring data consistency.
  2. Prior Update: A proximal or "denoising" step that enforces constraints such as sparsity or smoothness.

The "Double Auto-Diff" Trick

A key implementation insight is the dual use of automatic differentiation:

  • Inner AD: Used within the network to calculate the gradient of the data consistency term. This allows users to define only the forward physical process; the framework automatically handles the "inversion" during reconstruction.
  • Outer AD: Used to train the network's global parameters (e.g., measurement matrices, step sizes, or sparsity penalties) by backpropagating through the entire unrolled sequence.

In PyTorch, this is achieved by setting create_graph=True during the inner gradient calculation, allowing the outer training loop to differentiate through the optimization steps.

Experimental Setup

The framework was validated using a synthetic sparse recovery task, a classic compressed sensing problem. The goal was to recover sparse signals from noisy, under-determined linear Gaussian random measurements. The network was tasked with learning the optimal measurement matrix $A$, the step size $\alpha$, and the sparsity penalty $\lambda$.

Results and Discussion

The tutorial successfully demonstrates a functional "minimum working example." Key findings include:

  • Physics-Aware Design: By embedding the forward model, the network is constrained to produce physically plausible results.
  • Hardware Learning: The measurement matrix $A$ can be treated as a learnable parameter, enabling the network to optimize experimental design (e.g., illumination patterns).
  • Rapid Prototyping: The reliance on autograd allows researchers to easily swap physical models without re-deriving complex mathematical gradients.

Limitations

Despite its advantages, unrolling is memory-intensive. Storing intermediate states for $N$ iterations during backpropagation can exceed GPU memory limits for high-resolution 3D imaging. Future work involves integrating memory-efficient techniques like invertible networks or gradient checkpointing.

Conclusion

Physics-based learning via algorithm unrolling provides a robust framework for computational imaging. By leveraging modern AD tools, researchers can create models that are both physically grounded and highly optimized, paving the way for "learned" hardware and more efficient reconstruction algorithms.

Summary updated

BibTeX
@misc{kellman2020how,
  author = {Michael R. Kellman and Michael Lustig and Laura Waller},
  title = {{How to do Physics-based Learning}},
  year = {2020},
  eprint = {2005.13531},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.13531},
}
Figure