Deep Equilibrium Optical Flow Estimation

Shaojie Bai, Zhengyang Geng, Yash Savani, J. Zico Kolter · DOI

Abstract

Many recent state-of-the-art (SOTA) optical flow models use finite-step recurrent update operations to emulate traditional algorithms by encouraging iterative refinements toward a stable flow estimation. However, these RNNs impose large computation and memory overheads, and are not directly trained to model such “stable estimation”. They can converge poorly and thereby suffer from performance degradation. To combat these drawbacks, we propose deep equilibrium (DEQ) flow estimators, an approach that directly solves for the flow as the infinite-level fixed point of an implicit layer (using any black-box solver), and differentiates through this fixed point analytically (thus requiring $O(1)$ training memory). This implicit-depth approach is not predicated on any specific model, and thus can be applied to a wide range of SOTA flow estimation model designs (e.g., RAFT and GMA). The use of these DEQflow estimators allows us to compute the flow faster using, e.g., fixed-point reuse and inexact gradients, consumes $4\sim 6\times less$ training memory than the recurrent counterpart, and achieves better results with the same computation budget. In addition, we propose a novel, sparse fixed-point correction scheme to stabilize our DEQ flow estimators, which addresses a longstanding challenge for DEQ models in general. We test our approach in various realistic settings and show that it improves SOTA methods on Sintel and KITTI datasets with substantially better computational and memory efficiency.

Introduction

Optical flow—the task of predicting pixel-level motion between consecutive video frames—is a fundamental challenge in computer vision. Modern state-of-the-art (SOTA) models, such as RAFT, typically rely on Gated Recurrent Units (GRUs) to iteratively refine flow estimates. While effective, these recurrent models suffer from significant limitations:

  1. Memory Inefficiency: Training requires Backpropagation Through Time (BPTT), storing every intermediate step and limiting scalability.
  2. Path Dependency: Models are trained to reach a solution in a fixed number of steps rather than finding a truly stable equilibrium.
  3. Numerical Instability: Iterative updates often oscillate rather than converging to a single optimal estimate.

The DEQ-Flow Framework

To address these issues, we introduce DEQ-Flow, which treats optical flow as an "infinite-depth" process. Instead of unrolling a fixed number of GRU steps, we define the flow as a fixed point of a transformation: $z^* = f_\theta(z^*, x)$. This allows the model to find a stable equilibrium state directly.

The DEQ Flow architecture utilizes black-box solvers (e.g., Anderson, Broyden) to find the fixed-point flow estimation, enabling O(1) training memory via implicit differentiation.

Technical Innovations

  • Black-Box Solvers: We employ advanced root-finding algorithms like Anderson acceleration to find the equilibrium state significantly faster than simple iteration.
  • Implicit Differentiation: By leveraging the Implicit Function Theorem (IFT), we calculate gradients for training based solely on the final fixed point. This reduces training memory requirements from $O(L)$ to $O(1)$, a $4\sim 6\times$ reduction.
  • Sparse Fixed-Point Correction: To stabilize training—a common hurdle for DEQ models—we introduce a novel loss term that penalizes errors at random points along the solver's path. This provides a "coarse-grained" guide for the solver without the overhead of full Jacobian regularization.
  • Fixed-Point Reuse: In video sequences, the solution for one frame serves as a "warm start" for the next, significantly accelerating inference through temporal continuity.

Experimental Results

We evaluated DEQ-Flow on standard benchmarks including MPI Sintel and KITTI 2015. Our approach demonstrates superior efficiency and accuracy across the board.

Qualitative and quantitative comparison between DEQ-RAFT and the baseline RAFT. DEQ-RAFT achieves lower End-Point Error (EPE) more rapidly as the number of refinement steps increases.

Key Performance Metrics

  • Accuracy: On the KITTI-15 benchmark, DEQ-RAFT reduced the F1-all error by 21.0% compared to the original RAFT. It also showed exceptional zero-shot generalization on unseen datasets.
  • Efficiency: Beyond the massive memory savings during training, inference is approximately 20% faster than standard models, increasing to 1.6\times faster when utilizing fixed-point reuse.
  • Stability: The sparse correction scheme reduced fixed-point residual errors by over 60%, ensuring more reliable convergence than traditional recurrent methods.

Conclusion

DEQ-Flow represents a shift from emulating optimization to performing it directly. By modeling the stable state of optical flow, we achieve a more robust representation of motion with substantially lower computational costs. While implementing DEQ models requires careful solver management, the gains in memory efficiency and accuracy make it a compelling alternative for high-resolution, real-time computer vision tasks.

Summary updated

BibTeX
@misc{bai2022deep,
  author = {Shaojie Bai and Zhengyang Geng and Yash Savani and J. Zico Kolter},
  title = {{Deep Equilibrium Optical Flow Estimation}},
  year = {2022},
  eprint = {2204.08442},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.08442},
}
Figure