KeyIn: Discovering Subgoal Structure with Keyframe-based Video Prediction

Karl Pertsch, Oleh Rybkin, Jingyun Yang, Konstantinos G. Derpanis, Joseph J. Lim, Kostas Daniilidis, Andrew Jaegle

Abstract

Temporal observations such as videos contain essential information about the dynamics of the underlying scene, but they are often interleaved with inessential, predictable details. One way of dealing with this problem is by focusing on the most informative moments in a sequence. We propose a model that learns to discover these important events and the times when they occur and uses them to represent the full sequence. We do so using a hierarchical Keyframe-Inpainter (KeyIn) model that first generates a video's keyframes and then inpaints the rest by generating the frames at the intervening times. We propose a fully differentiable formulation to efficiently learn this procedure. We show that KeyIn finds informative keyframes in several datasets with different dynamics and visual properties. KeyIn outperforms other recent hierarchical predictive models for planning.

Introduction

Predicting the future in high-dimensional spaces like video is a significant challenge due to temporal redundancy. Standard video prediction models typically operate frame-by-frame, treating every millisecond with equal importance. This "flat" approach is computationally expensive and leads to rapid error compounding, making long-term planning difficult.

Humans, by contrast, plan using temporal abstractions or "keyframes"—identifying critical bottleneck moments like "grasping a handle" or "opening a door." The KeyIn (Keyframe-Inpainter) model addresses the challenge of identifying these critical moments and their timing automatically, without human labels, to facilitate effective long-horizon planning.

Methodology

The KEYIN architecture is a hierarchical model consisting of two primary components:

  1. Keyframe Predictor: A stochastic latent variable model (implemented via an LSTM) that predicts a sequence of keyframes ($K$) and the specific time steps ($\tau$) at which they occur.
  2. Sequence Inpainter: A deterministic network that "fills in" the frames between the predicted keyframes.
The KEYIN architecture: The Keyframe Predictor identifies bottleneck frames, while the Sequence Inpainter reconstructs the intervening frames.

To encourage the discovery of meaningful keyframes, the model utilizes an information bottleneck. Since the inpainter is deterministic and simple, the Keyframe Predictor is forced to capture all complex, non-linear scene dynamics within the keyframes themselves. Training is made fully differentiable through a continuous relaxation: instead of selecting a discrete time step, the model uses a weighted average of frames around the predicted time, allowing gradient-based optimization of keyframe timing.

For planning, the model employs the Cross-Entropy Method (CEM) to search the latent space for keyframe sequences that achieve a target visual goal, followed by a low-level controller to navigate between these subgoals.

Experiments and Results

The model was evaluated on three datasets: Structured Brownian Motion (SBM), a Gridworld navigation task, and a MuJoCo-based robotic pushing task.

Keyframe Discovery

On the SBM dataset, KEYIN achieved an F1 score of 0.94 in identifying ground-truth event times, significantly outperforming surprise-based baselines (0.73) and fixed-interval skipping (0.21). The model demonstrates adaptive skipping, placing keyframes closer together during complex interactions and further apart during linear motion.

Planning Performance

In the robotic pushing task, where an arm must navigate a puck around barriers, KEYIN achieved a 64.2% success rate. This substantially outperforms "flat" planners (15% success) and other hierarchical methods like Time-Agnostic Prediction (TAP), which reached only 23.3%.

Reconstruction Quality

Despite its hierarchical focus, KEYIN maintains competitive visual reconstruction quality (SSIM and PSNR) compared to dense, non-hierarchical video prediction models.

Conclusion and Future Work

KEYIN demonstrates that the most informative frames for reconstruction serve as effective subgoals for planning. While the current model requires a pre-defined number of keyframes, future iterations could dynamically determine the number of events. Additionally, scaling the simple inpainter to more visually complex, real-world environments remains a promising direction for future research.

Summary updated

BibTeX
@inproceedings{pertsch2020keyin,
  author = {Karl Pertsch and Oleh Rybkin and Jingyun Yang and Konstantinos G. Derpanis and Joseph J. Lim and Kostas Daniilidis and Andrew Jaegle},
  title = {{KeyIn: Discovering Subgoal Structure with Keyframe-based Video Prediction}},
  booktitle = {L4DC},
  year = {2020},
}
Figure