CAGE: Unsupervised Visual Composition and Animation for Controllable Video Generation

Aram Davtyan, Sepehr Sameni, Björn Ommer, Paolo Favaro

TL;DR

CAGE (Composition and Animation for video GEneration) is a novel unsupervised framework that generates controllable videos by "inpainting" around sparse visual tokens. By leveraging self-supervised DINOv2 features as a unified control signal, it can both compose new scenes from scratch and animate objects with high precision, all without requiring manual annotations like text or bounding boxes.

What Problem Does This Paper Address?

Generating high-quality video is hard; controlling exactly what happens in that video is even harder. Most current state-of-the-art models rely on heavy supervision—think thousands of hours of human-labeled text descriptions, bounding boxes, or motion vectors. This creates a massive bottleneck for scaling models to new domains where such data doesn't exist.

Furthermore, existing unsupervised methods are often specialized: they might be good at moving an object (animation) but fail at creating a scene from disparate parts (composition). The authors of CAGE set out to create a single, unified, and entirely unsupervised mechanism that handles both tasks simultaneously.

Methods

CAGE treats video generation as a conditional "inpainting" task within a Conditional Flow Matching (CFM) framework—a generative approach similar to diffusion but focused on learning the straight-line trajectories between noise and data.

The core innovation is the unified control format:

  1. Sparse Visual Tokens: Instead of text, the model is conditioned on a sparse subset of DINOv2 spatial features. These features act as "visual anchors" that tell the model what an object looks like and where it should be in space and time.
  2. Training via Inpainting: During training, the model is given only a few random feature patches from future frames. It must then learn to generate the entire video by filling in the missing spatial (surrounding pixels) and temporal (motion between frames) information.
  3. Scale and Position Invariance: To ensure the model doesn't just memorize where an object was in a source image, the authors calculate features on random crops. This forces the model to learn how to adapt an object's appearance (size, lighting, shadows) to its new target location.
Figure 2: Overall pipeline of CAGE. The model takes all the colored frames and processes them equally and in parallel. The pipeline for a single frame (xi, in red) is illustrated. CAGE is trained to predict the denoising direction for the future frames (xi:i+2) in the CFM (Lipman et al. 2022) framework conditioned on the past frames (context and reference) and sparse random sets of DINOv2 (Oquab et al. 2023) features. The frames communicate with each other via the Temporal Blocks while being separately processed by the Spatial Blocks. The controls are incorporated through Cross-Attention.

Datasets

The authors evaluated CAGE across three distinct environments to test different capabilities:

  • CLEVRER: A synthetic dataset of geometric objects colliding, perfect for testing multi-object interactions and scene composition.
  • BAIR: Real-world footage of a robotic arm moving toys, used to test handling of complex real-world dynamics and out-of-distribution (OOD) controls.
  • EPIC-KITCHENS: Egocentric (first-person) videos of kitchen activities, providing a challenge for realism and camera motion.
  • ROBONET: Used specifically to demonstrate cross-domain transfer, where features from one dataset are used to generate videos in another.

Key Insights and Ideas

  • DINOv2 is the "Secret Sauce": Unlike CLIP (which is text-aligned) or MAE (which preserves too much pixel-level detail), DINOv2 features are abstract enough to represent an object's identity while remaining invariant to minor visual changes. This allows for "zero-shot" transfer—taking a toy from a real photo and placing it into a simulated environment.
  • Unified Control: By using the same feature tokens for both the initial frame and future frames, the model naturally treats "composition" (where is it now?) and "animation" (where is it going?) as the same mathematical problem.
  • Learning Physics through Sparsity: Because the model only receives ~10% of the visual information as control, it is forced to learn the underlying "prior" of the world—how shadows fall, how objects collide, and how backgrounds remain stable.
Figure 1: Scene composition and animation with CAGE on the CLEVRER and the BAIR datasets. CAGE is able to combine multiple object features from different source im- ages and use them to compose and animate the scene in a controllable way. The selected features are shown as over- laying red patches. Blue patches in the controls correspond to the intended future locations of the objects. Notice the ability of the model to carefully adjust the appearances (e.g., sizes, shadows and lights) of the objects based on their loca- tion in the target layout. Use the Acrobat Reader to play the first images in the generated sequences as videos.

Key Results

CAGE significantly outperforms prior unsupervised models in both video quality and controllability:

  • Superior Realism: On the BAIR dataset, CAGE achieved a Frechet Video Distance (FVD) of 136, nearly doubling the performance of the previous best unsupervised model, YODA (FVD 264).
  • Zero-Shot Composition: The model can take object features from entirely unseen domains (e.g., a real-world "toy pistol") and realistically integrate them into a different dataset's environment, correctly handling occlusions and lighting.
  • Generalization: Using Classifier-Free Guidance (CFG), CAGE can follow "out-of-distribution" controls, such as moving background objects that never moved in the original training data.
Figure 4: The effect of CFG on the generalization to out of distribution controls on the BAIR dataset. While the robotic arm can be controlled with no guidance (w = 0.0), with larger w the model is also able to move the background ob- jects not moving on their own in the training data. Click on the images to play them as videos in Acrobat Reader.

Limitations and Future Work

While powerful, CAGE has a few hurdles to clear:

  • Dataset Scale: Due to compute limits, the model was tested on relatively small, specialized datasets. Scaling this to "in-the-wild" internet video is the next logical step.
  • Complex Geometry: Very irregular shapes (like a Rubik's dodecahedron) can sometimes "fragment" into multiple objects during cross-domain transfer because the sparse tokens don't capture the full structural complexity.
  • Autoregressive Drift: Like many video models, generating extremely long sequences can eventually lead to a loss of coherence, though the authors demonstrated stability up to 512 frames.

The authors hope CAGE paves the way for "large-scale unsupervised foundation models" that can be controlled as intuitively as moving pieces on a board.

Summary updated

Abstract

The field of video generation has expanded significantly in recent years, with controllable and compositional video generation garnering considerable interest. Most methods rely on leveraging annotations such as text, objects' bounding boxes, and motion cues, which require substantial human effort and thus limit their scalability. In contrast, we address the challenge of controllable and compositional video generation without any annotations by introducing a novel unsupervised approach. Our model is trained from scratch on a dataset of unannotated videos. At inference time, it can compose plausible novel scenes and animate objects by placing object parts at the desired locations in space and time. The core innovation of our method lies in the unified control format and the training process, where video generation is conditioned on a randomly selected subset of pre-trained self-supervised local features. This conditioning compels the model to learn how to inpaint the missing information in the video both spatially and temporally, thereby learning the inherent compositionality of a scene and the dynamics of moving objects. The abstraction level and the imposed invariance of the conditioning input to minor visual perturbations enable control over object motion by simply using the same features at all the desired future locations. We call our model CAGE, which stands for visual Composition and Animation for video GEneration. We conduct extensive experiments to validate the effectiveness of CAGE across various scenarios, demonstrating its capability to accurately follow the control and to generate high-quality videos that exhibit coherent scene composition and realistic animation.
BibTeX
@inproceedings{davtyan2025cage,
  author = {Aram Davtyan and Sepehr Sameni and Björn Ommer and Paolo Favaro},
  title = {{CAGE: Unsupervised Visual Composition and Animation for Controllable Video Generation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i15.33775},
}
Figure