Introduction
Predicting the future in high-dimensional visual spaces, such as video, is a fundamental challenge for autonomous agents. Most current predictive models attempt to generate video frame-by-frame. However, in any given sequence, the vast majority of frames are redundant or contain predictable, uninteresting motion. For a robot attempting to plan a complex task—such as pushing an object around an obstacle—reasoning about every pixel change at every millisecond is computationally exhausting and prone to accumulating errors.
This research introduces KEYIN (Keyframe-Inpainter), a hierarchical model designed to achieve temporal abstraction. By automatically discovering "keyframes"—the most informative bottleneck moments in a scene—KEYIN allows agents to ignore predictable "filler" and focus on critical subgoals, significantly improving the efficiency and success of long-horizon robotic planning.
The KEYIN Framework
KEYIN is a hierarchical generative model composed of two primary components that work in tandem to represent long video sequences efficiently:
- The Keyframe Predictor: A stochastic latent variable model that predicts a sequence of $N$ keyframes and the specific timesteps ($\tau$) at which they occur.
- The Sequence Inpainter: A simpler network that takes two consecutive keyframes and "fills in" the frames between them.
Differentiable Keyframe Discovery
A core technical challenge in learning keyframes is that selecting a specific frame index is a discrete, non-differentiable operation, which typically breaks standard backpropagation. KEYIN overcomes this using a continuous relaxation. Instead of selecting a single frame, the model predicts a probability distribution over timesteps. During training, the model compares its predicted keyframe to a "target" created by linearly interpolating between ground-truth frames based on that distribution. This allows the entire system to be trained end-to-end.
Experimental Evaluation
The model was evaluated across three distinct environments to test its ability to discover events and facilitate planning:
- Structured Brownian Motion (SBM): A 2D environment where objects move linearly but change direction at random intervals.
- Egocentric Gridworld: A first-person navigation task involving object interaction.
- Simulated Robotic Pushing: A complex MuJoCo-based task where a robot arm must push a puck around a central barrier to a goal.
Key Results
KEYIN demonstrated superior performance in both identifying critical events and executing complex plans:
- Event Discovery: On the SBM dataset, KEYIN achieved an F1 score of 0.94 in identifying ground-truth event frames, significantly outperforming baselines like surprise-based detection (0.73).
- Planning Success: In the robotic pushing task, KEYIN achieved a 64.2% success rate. This drastically outperformed a "Flat" planner (no hierarchy), which only succeeded 15% of the time, and a standard "Jumpy" model (fixed frame skipping) at 58.8%.
- Multi-modal Reasoning: Qualitative analysis shows that KEYIN successfully models multiple paths to a goal (e.g., pushing a puck around either side of a barrier), a common failure point for deterministic models.
Discussion and Future Work
By using inpainting as a training signal, KEYIN forces the predictor to identify the "hardest" moments to predict—the true bottlenecks of a sequence. This temporal flexibility allows the model to cluster keyframes during high-action moments and spread them out during steady motion.
While successful in simulation, current limitations include the requirement for a pre-specified number of keyframes and a two-stage training process. Future research will focus on making the number of keyframes dynamic and scaling the generative components to handle the visual complexity of high-resolution, real-world video.
Summary updated