Mixing Implicit and Explicit Deep Learning with Skip DEQs and Infinite Time Neural ODEs (Continuous DEQs)

Avik Pal, Alan Edelman, Christopher RackauckasarXiv 2022

Abstract

Implicit models, such as Neural Ordinary Differential Equations (ODEs) and Deep Equilibrium Models (DEQs), offer significant advantages in memory efficiency and adaptive computation. However, their high computational cost during training remains a major barrier to widespread adoption. This paper introduces Continuous DEQs and Skip-DEQs to address these efficiency bottlenecks. Continuous DEQs reformulate the equilibrium search as an infinite-time ODE, enabling the use of efficient adaptive solvers and a simplified backward pass. Skip-DEQs incorporate an explicit "warm start" network to accelerate convergence to the steady state. Our results demonstrate that these methods can speed up training by up to 8x and accelerate backward passes by up to 36x compared to standard Neural ODEs, while maintaining or improving accuracy on benchmarks like CIFAR-10 and ImageNet.

Introduction

Traditional deep learning architectures rely on explicit layers where the output is a direct function of the input. In contrast, implicit models define the output through a condition, such as the fixed point of a transformation or the solution to a differential equation. While implicit models are memory-efficient and can adapt their depth to input complexity, they are notoriously slow. The iterative solvers required for the forward pass and the complex gradient calculations for the backward pass create a significant computational overhead. This work proposes a hybrid approach that integrates explicit predictions with implicit refinements to achieve state-of-the-art efficiency.

Methodology

Continuous DEQs: The Paradox of Infinity

Standard DEQs find a steady state $z^*$ such that $z^* = f_\theta(z^*, x)$ using discrete iterations. The authors propose modeling this process as a continuous-time ODE: $$\frac{dz}{dt} = f_\theta(z, x) - z$$ By integrating this system to $t \to \infty$, the model naturally converges to the same steady state. Paradoxically, this infinite integration is more efficient than finite-time integration. It allows for the use of high-performance adaptive ODE solvers in the forward pass. Crucially, the backward pass becomes a simple linear system solve that depends only on the final steady state, bypassing the need to backpropagate through the entire ODE trajectory.

Skip-DEQ and Skip Regularization

A common bottleneck in DEQs is the "cold start" problem, where the solver begins from a generic initial guess (e.g., zero). Skip-DEQ addresses this by using a small, explicit neural network to predict a "warm start" initial condition $z_0$. This explicit prediction provides a high-quality starting point, drastically reducing the number of iterations required for the implicit solver to reach equilibrium.

Architecture of the Skip-DEQ model, where an explicit network provides a warm start for the equilibrium solver.

To ensure stability and further speed up convergence, the authors introduce Skip Regularization (Skip Reg). This technique adds a loss term that encourages the explicit skip network's output to stay close to the actual steady state. This regularization incentivizes the model to learn simpler dynamics that are easier for the solver to handle, avoiding the heavy computational cost of traditional Jacobian regularization.

Results

The proposed methods were evaluated on MNIST, CIFAR-10, and ImageNet. The results consistently show that Continuous DEQs and Skip-DEQs outperform standard implicit models in both speed and efficiency.

Training and backward pass time relative to Continuous DEQ across various datasets, highlighting the efficiency gains over Neural ODEs.

As shown in the figure above, Continuous DEQs significantly reduce training and backward pass times compared to Neural ODEs. On the CIFAR-10 (Large) architecture, training was 4.1x to 7.98x faster. The backward pass speedup was even more pronounced, reaching up to 36.5x in large-scale scenarios. Despite these speedups, accuracy remained comparable or superior; for instance, Skip Reg. Continuous DEQs achieved the highest accuracy among DEQ variants on CIFAR-10 (Small).

Discussion and Limitations

While Continuous DEQs offer substantial speedups, they are specifically designed for problems where only the final steady state is relevant. Applications requiring the tracking of intermediate states or specific trajectories cannot utilize the "infinite-time" integration approach. Additionally, while faster than Neural ODEs, these models may still be slower than purely discrete architectures for certain very large-scale models unless the continuous formulation provides a specific structural advantage. Future work involves extending these "Infinite Time" models to scientific machine learning and stiff physical simulations where implicit stability is critical.

Summary updated

BibTeX
@misc{pal2022mixing,
  author = {Avik Pal and Alan Edelman and Christopher Rackauckas},
  title = {{Mixing Implicit and Explicit Deep Learning with Skip DEQs and Infinite Time Neural ODEs (Continuous DEQs)}},
  year = {2022},
  url = {https://openreview.net/forum?id=E8Qzu5Ko5r},
}
Figure