Randomized Conditional Flow Matching for Video Prediction

Aram Davtyan, Sepehr Sameni, Paolo Favaro · DOI

Abstract

Video prediction requires modeling complex physical interactions and long-term dependencies, often at a high computational cost. We present RIVER (Random frame conditioned flow Integration for VidEo pRediction), a novel generative model that achieves state-of-the-art video prediction efficiency. RIVER combines Latent Flow Matching with a unique sparse conditioning strategy that randomly samples context frames during the generation process. This approach allows the model to leverage extensive historical information without the memory bottlenecks typical of recurrent or transformer-based architectures. Our results on standard benchmarks like BAIR and KTH demonstrate that RIVER can achieve competitive video quality while requiring significantly less training compute than existing diffusion-based models.

Introduction

Predicting future frames in a video is a fundamental task for artificial intelligence, requiring a deep understanding of physics, object permanence, and intent. However, the computational cost of ensuring temporal consistency is often staggering. To maintain coherence, models typically need to "look back" at many past frames. In traditional architectures like RNNs or Transformers, conditioning on a long history leads to massive memory bottlenecks or vanishing gradients. Even modern diffusion models struggle with this trade-off, often requiring fixed-size windows of past frames that make them expensive to train and difficult to scale to longer sequences. RIVER was developed to break this dependency between video quality and the "compute tax" of modeling the past.

Methods

RIVER introduces three key architectural shifts to streamline video generation:

  1. Latent Flow Matching (LFM): Instead of standard Diffusion, RIVER utilizes Flow Matching—a simpler, faster alternative that learns to map noise to data along straight paths. To handle high-resolution video efficiently, the model operates in the latent space of a pretrained VQGAN.
  2. Sparsely Conditioned Integration: During the ODE (Ordinary Differential Equation) integration process used to generate a frame, the model does not look at the entire past simultaneously. Instead, at each integration step, it queries the network using only two frames: the immediate predecessor (the "reference frame") and one other randomly chosen frame from the further past (the "context frame"). By varying this random context frame at every step, the model effectively "sees" the entire history over the course of the generation process without the associated memory overhead.
  3. Warm-Start Sampling: Leveraging the fact that video frames change slowly, RIVER starts the integration from a noisy version of the previous frame rather than pure Gaussian noise. This allows the model to reach the target frame in fewer steps, significantly accelerating inference.
The RIVER architecture utilizes a sparse conditioning strategy where a random context frame is sampled at each integration step to inform the generation process.

Datasets and Evaluation

The model was evaluated on three standard benchmarks:

  • KTH: Human action sequences (e.g., walking, waving).
  • BAIR: A robot arm pushing toys, characterized by high stochasticity.
  • CLEVRER: Synthetic collisions of geometric objects, testing physical interaction and long-term planning.

Key Results

The primary advantage of RIVER is its exceptional efficiency-to-quality ratio. On the BAIR dataset, RIVER achieved a competitive Fréchet Video Distance (FVD) of 106 using only 625 GBHours of compute. In contrast, the previous state-of-the-art model, FitVid, required nearly 300,000 GBHours to reach a similar quality level.

Comparison of FVD vs. Training Compute. RIVER (red star) achieves state-of-the-art quality with an order of magnitude less computational power than previous diffusion-based models.

Beyond efficiency, RIVER outperformed established models like MCVD and SRVP on the KTH dataset in both FVD and PSNR. The model also demonstrated versatility in tasks beyond simple prediction, such as visual planning (infilling frames between a start and end image) and unconditional video generation.

Discussion and Insights

The Power of Randomization: A key finding is that distributing history across generation steps via random sampling allows the model to condition on an arbitrarily large number of past frames at test time without increasing the per-step computational cost.

Reference vs. Context: The immediate previous frame (reference) is vital for maintaining motion direction and preventing "jumping" objects, while random context frames provide broader scene layout and long-term trajectories.

Limitations: Despite its efficiency, RIVER can exhibit slight temporal flickering due to the frame-wise nature of the VQGAN encoder. Additionally, in highly complex scenes, the model may occasionally "hallucinate" new objects. Future work involves exploring natively temporal latent spaces and end-to-end training with refinement networks to further improve consistency.

Summary updated

BibTeX
@inproceedings{davtyan2023randomized,
  author = {Aram Davtyan and Sepehr Sameni and Paolo Favaro},
  title = {{Randomized Conditional Flow Matching for Video Prediction}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
  doi = {10.1109/iccv51070.2023.02126},
}
Figure