Retrieving Semantics from the Deep: an RAG Solution for Gesture Synthesis

Muhammad Hamza Mughal, Rishabh Dabral, Merel C. J. Scholman, Vera Demberg, Christian Theobalt · DOI

Abstract

Co-speech gesture synthesis is a critical component for creating believable virtual characters. While modern neural models excel at generating rhythmic "beat" gestures, they often fail to produce "semantic" gestures—movements tied to specific linguistic meanings—due to their sparse occurrence in training data. We introduce RAG-GESTURE, a novel framework that leverages Retrieval Augmented Generation (RAG) to inject semantically relevant motion exemplars into a Latent Diffusion Model at inference time. By utilizing Large Language Models (LLMs) and discourse analysis for retrieval, and DDIM inversion for seamless integration, RAG-GESTURE achieves a superior balance between physical fluidity and semantic accuracy.

Introduction

Human communication is inherently multi-modal, where speech is complemented by a rich tapestry of gestures. These gestures generally fall into two categories: beat gestures, which align with the prosody and rhythm of speech, and semantic gestures (iconic, metaphoric, or deictic), which convey specific meanings.

Current state-of-the-art AI models, while proficient at capturing the rhythmic patterns of beat gestures, often "average out" semantic gestures because they appear infrequently and are highly context-dependent. This leads to synthesized motions that feel repetitive or semantically hollow. RAG-GESTURE addresses this by treating semantic gesture synthesis as a retrieval-augmented task, ensuring that rare but meaningful movements are preserved and naturally integrated into the generated sequence.

Methodology

The RAG-GESTURE framework operates in three distinct stages: base generation, semantic retrieval, and retrieval-based augmentation.

The RAG-GESTURE framework combines semantic guidance from LLMs or discourse parsers with a retrieval process to augment diffusion-based gesture generation.

1. Base Diffusion Model

The core of the system is a Latent Diffusion Model trained on the BEAT2 dataset, a large-scale multi-modal dataset containing high-quality motion capture for 25 speakers. To manage the high dimensionality of human motion, the system decouples the body into four regions—upper body, hands, face, and lower body—using specialized Variational Autoencoders (VAEs). This allows for high-fidelity motion synthesis conditioned on both audio and text.

2. Semantic Retrieval

The system identifies "gesture-worthy" moments using two primary strategies:

  • LLM-driven: A Large Language Model (e.g., GPT-4) identifies words likely to trigger semantic gestures and predicts their type (e.g., "iconic" for a shape).
  • Discourse-based: The system identifies "discourse connectives" (words like because or while) which historically correlate with specific spatial gestures.

3. Retrieval Augmentation via DDIM Inversion

To integrate retrieved motions without creating visual artifacts or "jerky" transitions, the framework employs DDIM Inversion. The retrieved motion exemplar is mapped back into the latent noise space of the diffusion model.

Technical architecture showing the DDIM inversion process and the retrieval guidance mechanism used to blend retrieved exemplars with generated motion.

During the denoising process, Retrieval Guidance is applied. This allows the system to precisely control the influence of the retrieved exemplar, ensuring the final motion follows the semantic intent of the retrieval while maintaining the stylistic consistency and fluidity of the base diffusion model.

Experimental Results

RAG-GESTURE was evaluated against several competitive baselines, including CaMN, EMAGE, and ReMoDiffuse.

  • Quantitative Performance: The model demonstrated superior performance in Fréchet Inception Distance (FID), indicating higher motion quality, and showed significant improvements in motion diversity across different speakers.
  • Human Perception: User studies revealed a strong preference for RAG-GESTURE. Notably, the system scored significantly higher in "Appropriateness"—participants noted that the gestures felt more aligned with the spoken content compared to purely data-driven baselines.
  • Computational Efficiency: The system is designed for practical use; the discourse-based retrieval is nearly instantaneous (0.03s), while the LLM-based path remains viable for near-real-time applications despite API latencies.

Conclusion

RAG-GESTURE represents a significant step toward "neuro-explicit" animation, combining the creative flexibility of deep learning with the precision of explicit retrieval. By anchoring generation in linguistic and discourse structures, the model overcomes the data sparsity issues that plague traditional semantic gesture synthesis. Future work will explore extending this framework to referential gestures in 3D environments and incorporating emotional conditioning to further enhance the expressive range of virtual agents.

Summary updated

BibTeX
@inproceedings{mughal2025retrieving,
  author = {Muhammad Hamza Mughal and Rishabh Dabral and Merel C. J. Scholman and Vera Demberg and Christian Theobalt},
  title = {{Retrieving Semantics from the Deep: an RAG Solution for Gesture Synthesis}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01545},
}
Figure