Manuscript Offprint

arXiv:2609.08365

ReMoMask-2: Latent Retrieval-Augmented Masked Motion Generation

Yiran Wang, Zeyu Zhang, Ling Shao, Hao Tang

Yiran Wang*, Zeyu Zhang*†, Ling Shao, Fellow, IEEE, Hao Tang‡

Abstract—Text-to-motion (T2M) generation maps a natural language description to a sequence of human joint movements, offering an intuitive interface for producing human motion in gaming, film production, virtual reality, and robotics. Retrieval-Augmented Text-to-Motion (RAG-T2M) models improve over conventional T2M approaches, particularly on uncommon and complex textual descriptions, by conditioning generation on motion-text pairs retrieved from an external database. However, existing RAG-T2M models remain limited by two challenges. First, retrieval and fusion are structurally inconsistent with motion topology: coarse-grained text-motion retrieval overlooks the hierarchical, part-level structure of human motion, and retrieved evidence is fused by mechanisms that ignore the spatial-temporal structure of the motion latent. Second, retrieved evidence typically resides in a contrastive semantic space learned separately from the latents the generator manipulates, leaving a representation gap between what is retrieved and what is generated. To address the first challenge, we present ReMoMask, a structure-aware RAG framework that couples Hierarchical Bidirectional Momentum (HBM) contrastive learning, which employs dual objectives to jointly align global motion semantics and fine-grained part-level features with text; Semantic Spatial-Temporal Attention (SSTA), a topology-aware fusion module that integrates retrieved knowledge via an asymmetric attention mechanism; and Topology Structured Masking (TSM), a training strategy that adaptively masks motion tokens based on semantic relevance, forcing the model to learn robust part-level grounding. To address the second challenge, we further present ReMoMask-2, which rebuilds the retrieval database directly within the generator's own pre-quantization latent space and aligns text queries to it via a lightweight projector distilled from the retriever, so that the generator consumes the semantic content of the retrieved motion rather than merely registering its presence. Extensive experiments on HumanML3D, KIT-ML, and SnapMoGen demonstrate that our retriever achieves state-of-the-art text-to-motion retrieval, and that ReMoMask-2 attains state-of-the-art generation fidelity among retrieval-augmented approaches and the lowest FID among all compared methods on KIT-ML and SnapMoGen, while its single mask-transformer stage, without any residual-refinement network, surpasses the full two-stage pipeline of ReMoMask and delivers the fastest inference among compared systems. Code: https://github.com/AIGeeksGroup/ReMoMask-2. Website: https://aigeeksgroup.github.io/ReMoMask-2.

Index Terms—Text-to-Motion Generation, Retrieval-Augmented Generation, Masked Motion Modeling, Contrastive Learning

1 INTRODUCTION

Human motion generation has attracted increasing attention due to its wide applicability in gaming, film production [1], virtual reality, and robotics. By synthesizing realistic and diverse human motions, these methods aim to significantly reduce the cost of manual animation while improving the efficiency and flexibility of content creation. Among various paradigms, text-to-motion (T2M) generation has emerged as a particularly intuitive setting, where a natural language description is directly mapped to a sequence of human joint movements.

Existing T2M methods can be broadly categorized into two lines of research. The first line consists of conventional T2M models, which focus on strengthening the generative backbone itself. Representative approaches include generative adversarial networks (GANs) [2], [3], [4], [5], [6], variational autoencoders (VAEs) [7], diffusion models [8], visual-language models [9], [10], motion language models [11], and masked generative models [12], [13], [14], [15]. In particular, masked generative models such as MMM [12] and Mo-

Figure

Fig. 1: ReMoMask vs ReMoMask-2. (a) ReMoMask retrieves motion clips from a database outside the generator, so every reference crosses the boundary between the two regions. (b) ReMoMask-2 rebuilds the database from the generator's own latents, so store, references and mask tokens share one substrate and nothing crosses.

  • Equal contribution. † Project lead. † Corresponding author, E-mail: bjdxtanghao@gmail.com. • Yiran Wang is with the University of Sydney, Camperdown 2006, Australia. • Zeyu Zhang and Hao Tang are with the School of Computer Science, Peking University, Beijing 100871, China. • Ling Shao is with the UCAS-Terminus AI Lab, University of Chinese Academy of Sciences, Beijing 101408, China.

Mask [13] discretize motion sequences into tokenized repre-

TABLE 1: Comparison of different architecture designs.

MethodRetrievalGeneration
Global AlignPart AlignMomentumSpaceFusionLatent
MDM [19]----concat1D
T2M-GPT [23]----concat1D
MoMask [1]----concat1D
MARDM [21]----concat1D
LaMP [22]----cross-attn1D
TMR [23]✓✗✗Semanticconcat1D
MoRAG [24]✗✗✗Semanticcross-attn1D
ReMoGPT [18]✓✗✗Semanticconcat1D
ReMoDiffuse [16]✓✗✗Semanticcross-attn1D
ReMoMask✓✓✓SemanticSSTA2D
ReMoMask-2✓✓✓LatentSSTA2D

sentations and perform masked token prediction, achieving high-fidelity and temporally coherent motion synthesis.

The second line of work, known as retrieval-augmented T2M (RAG-T2M), enhances generation by retrieving relevant motion-text pairs from an external database and injecting the retrieved evidence into the generative process. By conditioning generation on exemplar motions, RAG-based approaches improve robustness to uncommon or complex textual inputs. Representative methods include ReMoDiffuse [16], which performs retrieval via text-text similarity using CLIP [17], and ReMoGPT [18], which adopts a cross-modal text-motion retriever.

Despite their promising performance, existing RAG-T2M methods implicitly treat retrieval and fusion as independent modules and largely ignore the structural consistency between retrieval alignment and motion representation. Through careful analysis, we identify two fundamental design axes of this structural consistency in retrieval-augmented motion generation:

(1) Structural Granularity of Alignment. As shown in Table 1, most text-motion retrieval methods rely on contrastive learning to align global motion embeddings with text [23], [25]. However, human motion is inherently hierarchical, organized by skeletal topology and body-part dependencies. Purely global alignment overlooks fine-grained part-level semantics (e.g., left/right limbs or asymmetric actions), limiting retrieval discriminability. Although some works [18], [26] encode part-level motion features, these representations are typically aggregated without part-level cross-modal alignment, weakening structured correspondence.

(2) Structural Compatibility of Fusion. As depicted in Table 1, existing RAG-T2M methods often adopt simple concatenation or vanilla cross-attention, without systematically examining how motion latent structure (e.g., 1D vs. 2D spatial-temporal tokens) interacts with fusion mechanisms. This mismatch between retrieved information and motion representation can limit generation quality.

These observations suggest that performance improvements in RAG-T2M hinge on whether retrieval alignment and fusion design are structurally consistent with motion topology, beyond the strength of individual modules. Taken together, these two axes constitute the first challenge we address in this article.

Beyond these two axes, a second challenge remains, along a third design axis orthogonal to the structural ones: in existing RAG-T2M methods [16], [18], [24], the retrieved evidence lives in a contrastive semantic space learned separately from the latents the generator manipulates, so retrieved motions must cross a representation gap before they

can guide generation, as reflected by the Space column of Table 1. This gap persists even when retrieval alignment and fusion are both made structurally consistent with motion topology.

We propose ReMoMask, a retrieval-augmented masked generative framework for text-to-motion generation. To address alignment granularity, we introduce Hierarchical Bidirectional Momentum (HBM) alignment, a structured contrastive learning framework that jointly supervises instance-level (global) and part-level bidirectional text-motion correspondence under a momentum-based paradigm. To ensure structural compatibility during semantic conditioning, we conduct a systematic study (provided in Section 3) on motion latent representations and fusion strategies. Our analysis reveals that preserving motion as 2D spatial-temporal tokens, rather than flattening them into 1D sequences, significantly improves semantic injection and generation stability. Motivated by this observation, we design Semantic Spatial-Temporal Attention (SSTA), an attention mechanism tailored to inject retrieved motion semantics into the generative backbone. Meanwhile, to further strengthen structural modeling within this 2D formulation, we adopt a Topology Structured Masking (TSM) strategy, allowing the network to learn richer topological dependencies across body parts and time.

In this paper, we extend our ECCV 2026 conference framework [27], which inherits this gap, along the third axis of representation consistency and present ReMoMask-2 (Fig. 1), which performs retrieval directly in the generator's own pre-quantization latent space zez_e. Because retrieval keys are then produced by the same frozen encoder that supplies the generative latents, no cross-space translation has to be learned, and retrieved neighbors are directly comparable to the latents the generator predicts.

Our contributions are summarized as follows:

  • We present ReMoMask, first introduced in our conference version [27], a retrieval-augmented masked generative framework that enforces structural consistency along the two structural axes identified above: alignment granularity and fusion compatibility. It couples HBM, a hierarchical bidirectional momentum alignment framework that explicitly models both global and part-level text-motion correspondence for fine-grained semantic grounding, with SSTA, a topology-aware spatial-temporal attention mechanism built upon structured 2D motion tokens, and a TSM masking strategy that strengthens topological dependencies across body parts and time.

  • We present ReMoMask-2, which extends ReMoMask along the third design axis, representation consistency between the retrieval space and the generative latent space: it rebuilds the retrieval database in the frozen RVQ-VAE's pre-quantization latent space zez_e and aligns text queries to it with a lightweight projector distilled from the HBM retriever, closing the gap between retrieved evidence and the generative substrate.

  • Extensive experiments on HumanML3D, KIT-ML, and SnapMoGen show that our retriever attains state-of-the-art text-to-motion retrieval on all three benchmarks (R@1 18.49 on HumanML3D, against 11.00 for the next best), and that ReMoMask-2 is the strongest retrieval-

augmented generator on all three, with the lowest FID among all compared methods on KIT-ML (0.138) and SnapMoGen (13.174), surpassing the two-stage MoMask pipeline on HumanML3D (FID 0.042 versus 0.046, Top-1 0.528 versus 0.521) with a single generative stage.

As shown in Fig. 1, ReMoMask-2 extends our ReMoMask framework from retrieval in a separate semantic space to retrieval inside the generator's own latent space, which in turn makes a single generative stage sufficient. A preliminary version of this work was accepted to ECCV 2026 [27]. That conference version generates motion in two stages, a masked transformer followed by a residual-refinement transformer. The extension consists of two coupled changes: the retrieval database is rebuilt in the generator's pre-quantization latent space zez_e and text queries are aligned to it with a lightweight projector distilled from the conference-version retriever, so that retrieved evidence and the generated latents share a single representation; and the residual-refinement transformer is removed, in line with recent single-stage designs [12], [14], [26], since the retrieval-conditioned mask transformer already supplies the fine-grained correction that a residual stage is designed to provide. Our experiments bear this out: under a unified 20-repeat protocol on which we reproduce ReMoMask, the single-stage, mask-only ReMoMask-2 surpasses the full mask-plus-residual conference version, achieving a 65.9% and 75.4% improvement in FID on HumanML3D (0.123 → 0.042) and KIT-ML (0.562 → 0.138), respectively, while reducing per-sample inference time from roughly 0.14s to 0.05s, a saving to which the lighter retrieval front end of the latent-aligned design contributes alongside the removed stage; reattaching the residual-refinement transformer not only adds inference cost but actively hurts fidelity, raising FID from 0.042 to 0.068. Thus, ReMoMask-2 treats retrieval as a native part of the generative representation rather than as external evidence that must be translated into it.

References (33)