Introduction
Deep learning currently faces a significant "memory wall." Standard backpropagation requires storing intermediate activations for every layer, leading to memory usage that scales linearly with network depth ($O(Depth)$). This constraint limits the depth of models and the batch sizes feasible on modern hardware. While reversible architectures like RevNets offer a solution by recomputing activations, they often impose restrictive structural requirements and can be unstable during optimization.
Momentum Residual Neural Networks (MoResNets) address these challenges by introducing a simple momentum term to the standard ResNet forward rule. This modification makes the architecture perfectly invertible, enabling the training of extremely deep networks with a near-constant memory footprint. Furthermore, MoResNets expand the model's mathematical representation power, capturing complex dynamics that standard ResNets and Neural ODEs cannot.
Methodology
The core innovation of MoResNets is a "momentum" tweak to the standard residual connection. In a standard ResNet, the state transition is defined as $x_{n+1} = x_n + f(x_n, \theta_n)$. MoResNets introduce a velocity term $v$:
- $v_{n+1} = \gamma v_n + (1 - \gamma)f(x_n, \theta_n)$
- $x_{n+1} = x_n + v_{n+1}$
Here, $\gamma$ is the momentum parameter. This discrete-time dynamical system is exactly invertible. To maintain bit-accurate reversibility despite floating-point precision loss during division, the authors implement an "information buffer" algorithm.
As illustrated in the framework above, MoResNets can be viewed as second-order ODEs in the continuous limit, whereas standard ResNets correspond to first-order ODEs.
Key Insights
- Second-Order Dynamics: By controlling "acceleration" rather than just "velocity," MoResNets allow data trajectories to cross. This enables the network to learn non-homeomorphic mappings, such as the "nested rings" problem, which are impossible for first-order models.
- Drop-in Replacement: MoResNets do not require altering the internal structure of residual blocks. A pre-trained ResNet can be converted into a MoResNet with minimal additional training (refitting).
- Stability: The momentum term provides "friction," making MoResNets more stable than other reversible models in tasks requiring convergence to a fixed point, such as learned optimization.
Key Results
The primary advantage of MoResNets is their memory efficiency. As shown in the figure below, while standard ResNet memory usage grows linearly with depth, MoResNet maintains a nearly constant footprint.
Empirical evaluations demonstrate that MoResNets match the performance of standard ResNets on large-scale datasets like ImageNet while using significantly less memory. For instance, a MoResNet-101 achieves a top-1 error of ~23%, matching the performance of standard ResNets and RevNets while using significantly less memory. On hardware with limited RAM, this efficiency translates to faster training; MoResNets can handle larger batch sizes, effectively doubling training speed in some scenarios.
Conclusion
MoResNets provide a robust solution to the memory limitations of deep neural networks without sacrificing architectural flexibility or mathematical power. By leveraging second-order dynamics, they offer superior representation capabilities and stability. Future work may further explore the transition between discrete and continuous regimes and optimize the overhead of the information buffer.
Summary updated