Abstract
Deep equilibrium models (DEQs) have proven to be very powerful for learning data representations. The idea is to replace traditional (explicit) feedforward neural networks with an implicit fixed-point equation, which allows to decouple the forward and backward passes. In particular, training DEQ layers becomes very memory-efficient via the implicit function theorem. However, backpropagation through DEQ layers still requires solving an expensive Jacobian-based equation. In this paper, we introduce a simple but effective strategy to avoid this computational burden. Our method relies on the Jacobian approximation of Broyden's method after the forward pass to compute the gradients during the backward pass. Experiments show that simply re-using this approximation can significantly speed up the training while not causing any performance degradation.
Introduction
Deep Equilibrium Models (DEQs) represent a shift from traditional explicit architectures to implicit ones. Instead of defining a fixed sequence of layers, DEQs define an equilibrium point—a fixed point—that the network's state must reach. This approach offers the theoretical power of infinite-depth networks with a constant memory footprint, as intermediate activations do not need to be stored for backpropagation.
Despite these advantages, DEQs face a significant "Jacobian bottleneck." Calculating gradients during the backward pass requires computing an inverse Jacobian matrix, a process that is computationally intensive for high-dimensional data. Previous attempts to mitigate this have either sacrificed gradient quality or relied on slow iterative solvers. We propose GDEQ (Gradient Deep Equilibrium Models), a method that recycles computational artifacts from the forward pass to eliminate this bottleneck.
Methodology: Recycling Jacobian Approximations
The core innovation of GDEQ lies in the reuse of the quasi-Newton numerical solver's state. To find the equilibrium point during the forward pass, researchers typically employ Broyden’s method. As this method iteratively approaches a solution, it constructs an approximation of the inverse Jacobian matrix ($B_T^{-1}$).
While standard DEQ training discarded this approximation and initiated a new iterative process for the backward pass, GDEQ simply re-uses the final $B_T^{-1}$ from the forward pass. This transformation reduces the most expensive part of the training cycle to a single matrix multiplication, making the backward pass nearly "free" in terms of additional computation.
Experimental Results
We evaluated GDEQ using the Multiscale Deep Equilibrium Model (MDEQ) backbone on the CIFAR-10 image classification dataset. Our results demonstrate that GDEQ achieves a significant speedup without compromising model performance.
As shown in the figure above, GDEQ (represented by the brown line) converges much faster than the standard implicit differentiation method. Specifically, GDEQ reached peak accuracy in approximately 6.7 hours, compared to 14.6 hours for the standard method—a 2.16x speedup. Furthermore, GDEQ achieved a superior accuracy of 93.08%, outperforming both the standard implicit method (92.29%) and other approximations like Jacobian-Free Backpropagation (JFB, 91.99%).
Analysis of Gradient Alignment
The success of GDEQ is rooted in the high quality of the recycled Jacobian approximation. We measured the "cosine similarity" between GDEQ’s approximated gradients and the exact gradients to determine how closely they align.
The density plots above illustrate that the approximated gradients remain remarkably close to the exact gradients throughout the training process, with similarity scores consistently peaking around 0.85. This high degree of alignment explains why the model maintains training stability and high accuracy despite the aggressive computational shortcut.
Conclusion and Future Work
GDEQ provides a simple yet effective strategy for accelerating DEQ training by recycling the inverse Jacobian approximation from Broyden's method. While highly effective on image classification tasks, the method's reliance on the convergence of the forward-pass solver suggests areas for future theoretical exploration. Future work will focus on providing formal convergence guarantees and scaling the method to larger datasets and more complex architectures, such as Transformer-based DEQs.
Summary updated