Gradient checkpointing is a method that reduces the memory used for training by saving only some of the activations (the outputs of each layer) computed in the forward pass and recomputing the rest during the backward pass. In exchange for a little extra computation, it allows deeper models and larger batch sizes to be trained within the same GPU memory.
In backpropagation, computing each layer's gradient uses that layer's inputs and outputs from the forward pass. Therefore, ordinary training keeps all intermediate results of the forward pass in memory until the backward pass is finished. For an -layer network, this memory grows in proportion to , and in deep models it becomes far larger than the weights.
In their 2016 paper "Training Deep Nets with Sublinear Memory Cost," Chen et al. showed a method that splits the network into segments and saves only the activations at the segment inputs. It reduces the activation memory of an -layer network to , at the cost of roughly one extra forward pass of computation per mini-batch. The underlying idea is a technique known as checkpointing in the field of automatic differentiation, which the paper brought to general neural network training.
As an analogy, instead of writing down every intermediate step of a long calculation, you note only the answers at a few breakpoints and recompute from a breakpoint when needed. You need less scratch paper (memory), at the cost of a bit more recomputation.

