RagMe: Retrieval Augmented Video Generation for Enhanced Motion Realism

Elia Peruzzo, Dejia Xu, Xingqian Xu, Humphrey Shi, Nicu Sebe

Introduction: Bridging the Motion Gap

Text-to-video (T2V) generation has reached a point of visual brilliance, yet it often stumbles on the "motion gap." While models like Sora produce stunning imagery, the resulting videos frequently lack physical plausibility or complex temporal dynamics, often appearing as high-resolution "moving posters." RAGME (Retrieval Augmented Generation for Motion Enhancement) addresses this by grounding generative models with real-world video examples, effectively teaching the model how objects move without requiring massive increases in parameter count or compute.

The RAGME Framework

RAGME introduces a semi-parametric pipeline designed to be integrated into existing T2V diffusion models. The architecture consists of three core components that work in tandem to inject realistic motion semantics into the generation process.

The RAGME pipeline architecture, illustrating the retrieval mechanism (a) and the retrieval-augmented conditioning within the T2V model (b).
  1. Retrieval Mechanism (RM): For any given text prompt, the system utilizes CLIP embeddings to query a large-scale database (such as WebVid10M), retrieving the top $K$ most relevant videos.
  2. Retrieval Augmented Conditioning (RagCA): These retrieved videos are passed through a transformer-based temporal enhancer. This module extracts high-level motion features, which are then integrated into the T2V model's existing blocks via new cross-attention layers. These layers are carefully initialized to preserve the base model's original capabilities before fine-tuning.
  3. RAG Noise Initialization (RagInit): Instead of starting from standard Gaussian noise, RAGME "warms up" the diffusion process. It averages the latents of the retrieved videos and diffuses them back to the initial timestep, providing a structural prior that aligns with the reference motion.

Key Insights: Motion over Pixels

A fundamental philosophy of RAGME is the prioritization of high-level action over low-level pixel replication. By leveraging CLIP embeddings and specific architectural bottlenecks, the model learns the semantics of movement—such as the gait of a walking person—rather than simply copying the background or identity of the retrieved source.

The authors identified a "sweet spot" at $K=5$ retrieved videos. While a single video ($K=1$) can lead to over-fitting or "copy-pasting," a very large set (e.g., $K=50$) introduces excessive noise. Five videos provide the optimal balance between grounding the motion in reality and maintaining the model's creative flexibility.

Evaluation and Results

The framework was evaluated using the WebVid10M dataset and the comprehensive VBench benchmark. RAGME demonstrates a significant quantitative leap over base models and existing enhancement techniques.

Quantitative comparison of RAGME against the base model and other enhancement techniques, demonstrating significant improvements in FVD and motion alignment.

On the WebVid10M validation set, RAGME reduced the Fréchet Video Distance (FVD)—a primary metric for video quality—from 613.15 in the base model to 270.26. Furthermore, VBench scores highlight substantial gains in motion-specific dimensions: the "Dynamic Degree" score rose from 0.367 to 0.692, and "Human Action" improved from 0.922 to 0.974. Qualitatively, RAGME-generated videos exhibit much more active and plausible movements, such as a person realistically performing a task rather than merely posing with an object.

Efficiency and Versatility

Unlike "training-free" methods like FreeInit, which often require multiple expensive denoising passes, RAGME is highly efficient, adding only approximately 20% latency to the generation process. Additionally, the model shows remarkable zero-shot capabilities; it can be adapted for motion transfer tasks with 8x fewer fine-tuning iterations than specialized state-of-the-art models like Motion Director.

Limitations and Future Outlook

While RAGME significantly enhances motion, it faces some challenges. Training on datasets like WebVid10M can occasionally result in faint watermark leakage from stock footage. There is also a minor "consistency tax," where the focus on complex motion can slightly reduce background stability. Future iterations aim to handle more complex, multi-subject compositions and utilize cleaner, higher-quality datasets to eliminate artifacts.

Summary updated

BibTeX
@inproceedings{peruzzo2025ragme,
  author = {Elia Peruzzo and Dejia Xu and Xingqian Xu and Humphrey Shi and Nicu Sebe},
  title = {{RagMe: Retrieval Augmented Video Generation for Enhanced Motion Realism}},
  booktitle = {ICMR},
  year = {2025},
  doi = {10.1145/3731715.3733417},
}
Figure