Abstract
Deep Equilibrium Models (DEQs) offer a memory-efficient alternative to traditional deep networks by replacing stacked layers with a single iterated layer that converges to a fixed point. However, the computational cost of finding this fixed point often limits their practical application. This paper demonstrates how Anderson Extrapolation (AE), when optimized for GPU architectures, can significantly accelerate DEQ convergence. By utilizing a history-based window to predict fixed-point states, we achieve an 8.6x speedup in training and a 2x speedup in inference on the CIFAR-10 benchmark, while simultaneously improving model accuracy and stability.
Introduction
Deep Equilibrium Models (DEQs) represent a paradigm shift in neural network design. Instead of a fixed sequence of layers, a DEQ defines a single transformation $z_{k+1} = f(z_k, x)$ and iterates it until it reaches a steady state, or fixed point. This approach is highly memory-efficient as it eliminates the need to store intermediate activations for backpropagation. Despite their mathematical elegance, DEQs suffer from slow convergence when using standard forward iteration, making them computationally expensive compared to explicit models like ResNet.
Methodology: Anderson Extrapolation
To address the speed bottleneck, we employ Anderson Extrapolation (AE). Rather than relying solely on the most recent iteration, AE maintains a "window" of previous states (typically $m=5$). It formulates the search for a fixed point as a least-squares problem, finding a linear combination of these past states that minimizes the residual error.
Technical Advantages
- Matrix-Free Computation: Unlike second-order methods such as Newton’s method, AE does not require the inversion of large Hessian matrices. It only requires solving a small linear system proportional to the window size $m$.
- GPU Suitability: AE consists of uniform vector operations that map efficiently to high-throughput GPU architectures. Our findings indicate that GPUs are 100-150x faster than CPUs at reaching target residuals using this method.
- Mixing Parameter ($\beta$): A mixing parameter is introduced to provide "inertia," ensuring stability during the extrapolation process and preventing divergence in volatile training phases.
Convergence Dynamics and the Crossover Point
A critical observation in our study is the trade-off between per-iteration complexity and total convergence time. Anderson Extrapolation is computationally more demanding per step than simple forward iteration due to the overhead of solving the internal least-squares problem. This overhead is termed the algorithmic historical mixing penalty.
As shown in the figure above, there is a distinct crossover point. Initially, standard iteration may appear faster in wall-clock time, but the accelerated algorithmic loss eventually drops much more sharply. The "smarter" iterations provided by AE allow the model to converge in significantly fewer total steps, ultimately saving between 50% and 88% of total compute.
Experimental Results
We evaluated our approach using the CIFAR-10 dataset. The results highlight a substantial improvement in both efficiency and performance over standard DEQ baselines:
- Training Efficiency: Accelerated training was completed in approximately 1,400 seconds, compared to 12,000 seconds for standard iteration—an 8.6x speedup.
- Inference Performance: Inference latency was reduced by 50%, dropping from 1.0 second to 0.5 seconds.
- Accuracy Gains: The accelerated DEQ reached 96.3% training accuracy and 79.1% testing accuracy. In contrast, the standard DEQ baseline only achieved 64.7% and 64.2% respectively within the same training window. This suggests that the extrapolation window helps the model navigate complex loss landscapes and avoid suboptimal local minima.
Conclusion and Future Work
Anderson Extrapolation effectively mitigates the primary weakness of Deep Equilibrium Models. By leveraging GPU-optimized vector operations, we can achieve order-of-magnitude improvements in training speed. Future research will focus on the sensitivity of hyperparameters like window size and the potential for scaling these matrix-free techniques across multi-GPU clusters. Additionally, exploring stochastic variants of Anderson acceleration may provide further robustness in large-scale, noisy training environments.
Summary updated