Motion Mamba 2.0: Autoregressive Diffusion Mamba for Long-Horizon Humanoid Control

Media reports Hugging Face Papers Source language: Chinese

Motion Mamba 2.0 introduces a Mamba-based root-body diffusion architecture for long-horizon humanoid control, achieving a 6.138x speedup on an RTX 4090.

Full text

Motion Mamba 2.0: Autoregressive Diffusion Mamba for Long-Horizon Humanoid Control

Yue Huang* Tianshan Zhang* Zeyu Zhang Jayeon Kang Akide Liu Sungjoon Choi Dacheng Tao Hao Tang ††thanks: *Equal contribution. $ˆ†$Project lead. $ˆ‡$Corresponding author, E-mail: bjdxtanghao@gmail.com. Yue Huang, Tianshan Zhang, Zeyu Zhang, and Hao Tang are with the School of Computer Science, Peking University, Beijing 100871, China. Jayeon Kang and Sungjoon Choi are with the Department of Artificial Intelligence, Korea University, Seoul 02841, Korea. Akide Liu is with the Department of Data Science and AI, Monash University, Melbourne VIC 3800, Australia. Dacheng Tao is with the College of Computing and Data Science, Nanyang Technological University, Singapore.

Abstract

Long-horizon, real-time controllable motion generation is essential for interactive animation and humanoid robotics, where an agent must respond to changing instructions and spatial goals while moving. Existing autoregressive diffusion methods generate motion incrementally, but bounded attention caches limit access to distant history, while repeated denoising introduces substantial inference overhead. We present Motion Mamba 2.0, a Mamba-based root–body diffusion architecture that integrates local attention, resumable recurrent states, and persistent content memory (PCM) for long-horizon controllable motion generation. PCM transforms compressed motion history from Mamba recurrent states, together with state changes and text-conditioned features, into dynamically updated content slots accessible to local attention. To enable efficient inference, we further develop an execution scheme tailored to this architecture, combining CUDA Graph replay, fused kernels, and execution-flow simplification while preserving the canonical history update. Evaluations on retargeted HiPHI demonstrate accurate terminal control over rollouts of up to 39.52 s, while short-horizon comparisons on BONES Seed and retargeted HumanML3D show that the model also retains strong spatial control and text–motion matching. On an RTX 4090, the optimized execution reduces median complete-window latency from 1685.35 to 276.14 ms, achieving a median paired speedup of 6.138×\times while preserving identical outputs and committed states in the tested rollouts. Moreover, we conduct extensive real-world evaluation on the Unitree G1, demonstrating sequential text-guided action composition, expressive motion, and interactive locomotion through keyboard and mouse control. Code: https://github.com/AIGeeksGroup/MotionMamba2.0. Website: https://aigeeksgroup.github.io/MotionMamba2.0.

Index Terms: Long-Horizon, Interactive, Human Motion, Humanoid Control, Efficient, Mamba, Diffusion.

I Introduction

Generating long-horizon motion from changing instructions is a central problem in interactive animation and humanoid robotics. A useful generator must interpret an action description, accommodate spatial constraints, and continue from the motion already produced. These requirements extend beyond synthesizing an isolated clip: a user may change direction during walking, request an upper-body action, or specify a future target while the current motion is still being executed. The resulting references must be available quickly enough for interactive use and remain compatible with a downstream tracking system. Unlike offline text-to-motion synthesis, the future instruction sequence need not be known when generation begins. An interactive generator must therefore preserve useful context while incorporating newly arriving commands, rather than simply replaying a completed trajectory.

Diffusion models produce diverse text-conditioned human motion [1, 2, 3]. Recent methods extend this formulation through temporal composition, autoregressive prediction, and direct spatial conditioning [4, 5, 6, 7]. Temporal composition allows multiple descriptions to define a longer sequence, while causal latent models and hierarchical motion tokens support incremental synthesis [8, 9]. Spatially constrained methods further specify where selected joints or the character should move [10, 11, 12, 7]. In particular, generating one window at a time provides a practical interface for online instructions. However, two difficulties remain closely connected. A bounded attention cache discards older motion features, whereas an unbounded cache increases storage and computation as the sequence grows. Moreover, repeated denoising of short windows can incur substantial execution overhead even when each individual model evaluation is small. An interactive system therefore requires both a suitable representation of motion history and an efficient implementation of its repeated updates. These requirements concern different aspects of the problem: reducing the number of sampling steps does not extend the history available to the model, and a compact historical state alone does not eliminate denoising overhead.

Fig. 2: Interactive motion generation with Motion Mamba 2.0. Text instructions specify the requested actions, while spatial controls constrain root motion and selected joint positions. From left to right, the panels show root trajectories, root waypoints, full-body pose sequences, and selected joint positions. Blue-to-gray poses indicate temporal progression, while red overlays visualize trajectories, waypoints, and joint locations. The panels show Viser motion references and a rollout tracked w
Fig. 2: Interactive motion generation with Motion Mamba 2.0. Text instructions specify the requested actions, while spatial controls constrain root motion and selected joint positions. From left to right, the panels show root trajectories, root waypoints, full-body pose sequences, and selected joint positions. Blue-to-gray poses indicate temporal progression, while red overlays visualize trajectories, waypoints, and joint locations. The panels show Viser motion references and a rollout tracked w

Fig. 2: Interactive motion generation with Motion Mamba 2.0. Text instructions specify the requested actions, while spatial controls constrain root motion and selected joint positions. From left to right, the panels show root trajectories, root waypoints, full-body pose sequences, and selected joint positions. Blue-to-gray poses indicate temporal progression, while red overlays visualize trajectories, waypoints, and joint locations. The panels show Viser motion references and a rollout tracked with SONIC.

State-space models provide an alternative to storing every historical token by summarizing a sequence in a recurrent state [13, 14]. Their use in motion generation has shown the value of efficient temporal modeling [15, 16]. Recent studies also combine Mamba with autoregressive diffusion or use recurrent temporal representations for sustained and interactive motion [17, 18, 19]. Nevertheless, a compressed recurrent state and an attention cache expose history differently: the former carries evolving context, while the latter permits direct retrieval of explicit features. Simply placing both branches in a network does not make the recurrent history directly accessible to attention. This distinction motivates a learned interface between accumulated recurrent motion state and attention-accessible content, rather than relying on either mechanism alone. Diffusion introduces an additional requirement: successive noisy candidates describe alternatives for the same output window, not successive moments of the accepted motion stream. Persisting those intermediate candidates would mix sampling iterations with physical time. We therefore treat the boundary between prediction and history commitment as part of the model’s streaming formulation.

We propose Motion Mamba 2.0, an autoregressive diffusion model for long-horizon, real-time controllable G1 motion. The model follows a root–body decomposition [7]: explicit root predictions determine local trajectory features for body generation. Within both denoisers, local attention is combined with a resumable Mamba branch. Our persistent content memory (PCM) learns to map compressed Mamba state summaries, successive state changes, and text-conditioned features into dynamically updated slots accessible to local attention. The slots complement recent motion features in the bounded cache and aim to support terminal spatial constraint satisfaction and command-conditioned generation over extended rollouts; they are not designed to reproduce arbitrary early instructions verbatim. Recurrent states, cached features, and slots are committed only after a clean motion window is accepted; intermediate denoising candidates read the same immutable history snapshot. The fixed-size recurrent state, cache, and PCM slots bound stored context without guaranteeing retention of every detail from arbitrarily distant motion. The accepted-history separation also guides efficient inference. Read-only denoising avoids materializing unused state proposals, selective fusion reduces intermediate memory traffic, and CUDA Graphs reduce repeated host dispatch [20, 21]. These changes preserve root-to-body ordering and the canonical clean-history update. Our objective is to accelerate the same sampling computation, complementing methods that obtain faster generation through compact representations or altered sampling procedures [3, 22, 23]. We measure their contributions separately, since the effect of local fusion differs from that of graph replay. The complete scheme generates a 52-frame window in 276.14 ms at the median on an RTX 4090; this steady-state generation time is distinct from the delay between a user command and its visible execution.

We evaluate the method on three G1 motion benchmarks under a matched 100,000-update training budget (App. C). We first examine short- and long-horizon generation on retargeted HiPHI [24], followed by short-horizon comparisons on BONES Seed [25] and retargeted HumanML3D [26]; BONES Seed retains its officially provided G1 trajectories. The results demonstrate accurate control over extended rollouts together with strong short-horizon performance, while architectural ablations examine the contributions of recurrent state and history-dependent content memory. Finally, we conduct real-world evaluation on a physical Unitree G1, which demonstrates sequential text-guided action composition, expressive motion, and interactive locomotion through keyboard and mouse control.

In summary, our contributions are threefold:

•

We propose Motion Mamba 2.0, a Mamba-based autoregressive diffusion model with persistent content memory, connecting accepted recurrent history to local attention for long-horizon, real-time controllable motion generation.

•

We develop and evaluate state-preserving inference optimizations for this architecture, combining execution-flow simplification, fusion kernel, and CUDA Graph replay. On an RTX 4090, the complete optimization achieves a 6.138×6.138\times median paired speedup.

•

We evaluate the proposed framework on a physical Unitree G1 through multi-stage text-guided action composition and interactive keyboard/mouse control, demonstrating continuous motion execution under changing instructions and spatial commands. The system achieves 94% full-task success across 100 trials without observed falls.

A preliminary version of this work appeared in our ECCV 2024 conference paper, Motion Mamba [15]. The present manuscript substantially extends the conference version in both methodology and experimental evaluation in the following six aspects. (1) We reformulate the original text-conditioned latent diffusion framework into an autoregressive root–body diffusion architecture for long-horizon humanoid motion generation. Instead of synthesizing a motion sequence as a single clip, the new framework generates successive 52-frame windows while accommodating changing text instructions and time-indexed spatial constraints. (2) We redesign the temporal modeling architecture beyond the original Hierarchical Temporal Mamba (HTM) and Bidirectional Spatial Mamba (BSM) blocks. The new denoisers integrate resumable Mamba-3 recurrence with local attention and persistent content memory (PCM). PCM converts accepted recurrent-state summaries and their changes into gated content slots, providing attention-accessible representations of compressed motion history alongside the sliding cache. (3) We introduce an accepted-only history update mechanism for autoregressive diffusion. Intermediate noisy predictions read an immutable historical snapshot, whereas the attention cache, recurrent states, and PCM slots are updated together only after a clean motion window is accepted. This separates diffusion sampling iterations from the temporal evolution of generated motion. (4) We develop a hardware-aware inference pipeline that combines execution-flow simplification, custom fused kernel and CUDA Graph replay across three guidance branches. (5) We extend the evaluation from the original HumanML3D and KIT-ML text-to-motion benchmarks to a unified G1 motion setting involving retargeted HiPHI, BONES Seed and retargeted HumanML3D. The new protocol evaluates spatial controllability, instruction matching, motion quality, and inference efficiency over autoregressive rollouts of up to 39.52 s. (6) We further extend our evaluation to physics-based simulation and real-world deployment on a Unitree G1 humanoid, assessing multi-stage text-guided actions alongside interactive spatial control via keyboard and mouse.

II Related Work

II-A Efficient Long-Horizon Motion Generation

Text-conditioned diffusion models learn expressive motion distributions from paired language and motion data [1, 2, 3]. Their representations and sampling procedures determine both the cost of synthesis and how motion can be extended in time. Discrete motion representations offer a complementary formulation, with autoregressive token prediction in T2M-GPT [27] and masked token completion in MMM [28]. Longer sequences can be constructed by composing action-conditioned segments, extending textual context, or refining overlapping motion intervals [29, 30, 31, 4, 32, 33]. Past-conditioned diffusion and temporal motion fields further address continuity beyond isolated clips [34, 35, 36]. In particular, Lagrangian Motion Fields represent longer sequences through compact supermotions, whereas FlowMDM blends positional encodings to improve transitions between described segments [36, 4]. These approaches make temporal composition more flexible, but an interactive application additionally requires new conditions to affect a stream that has already begun.

Autoregressive diffusion and accelerated sampling support incremental synthesis with lower per-update cost [5, 23, 37, 22, 6]. Recent streaming methods introduce causal representations, historical context, or spatial conditioning to accommodate continuous generation [8, 7, 38, 39]. MOGO instead uses a hierarchical causal Transformer over quantized motion tokens for real-time, extended generation [9]. These developments show that motion representation, temporal factorization, and sampling efficiency offer complementary routes to reducing generation cost.

Controllability introduces a further requirement: trajectory and joint targets must influence future motion while preserving the current action. Guided Motion Diffusion incorporates spatial constraints through representation design and diffusion guidance [10], while OmniControl combines spatial and realism guidance to constrain different joints at different times [11]. COMET studies extended joint targets for long-term generation, while ARDY exposes text and flexible kinematic constraints through a hybrid representation [12, 7]. We build on ARDY’s explicit-root and latent-body representation to study how recurrent state, bounded attention, and persistent content can be integrated into its denoising process. The accompanying execution optimizations target repeated inference while preserving the architecture’s sampling and history-update semantics. For a controlled comparison, all methods use independently trained G1 adaptations with the same 100,000-update budget; none uses its original pretrained release.

II-B State-Space Models for Motion

Structured state-space models connect recurrent, convolutional, and continuous-time sequence processing [40, 41, 42, 43]. Mamba introduces input-dependent state updates, and subsequent models extend selective scanning to visual and multidimensional data [13, 44, 45, 46]. Mamba-2 connects structured state-space models with attention through state-space duality [47]. Mamba-3 improves the underlying sequence model through state-space discretization and rotary dynamics [14]. We use this scan as a temporal modeling component; its recurrence is not a contribution of this work.

In motion generation, state-space models have been applied to temporal and spatial dependencies, hybrid architectures, and text-conditioned synthesis [15, 16, 48, 18]. Memory-oriented variants also consider longer sequences and the retention of earlier context [49, 50]. MADM combines Mamba with autoregressive diffusion for text-to-motion generation, while Dyadic Mamba and InterMamba extend state-space modeling to interactions between people [17, 19, 51].

Cross-segment memory has also been studied in sequence models: Transformer-XL reuses earlier hidden representations through segment-level recurrence [52], while Recurrent Memory Transformer propagates dedicated memory tokens between segments [53]. Our focus is the interface between compressed recurrent motion state and attention during autoregressive diffusion, where intermediate noisy candidates and accepted motion history require separate update rules. PCM converts accepted state summaries, state changes, and text conditions into dynamically updated content slots, while a bounded attention cache preserves recent motion features. These slots evolve with accepted motion rather than remaining static, providing dynamically updated motion context without explicitly storing arbitrary past tasks for exact recall.

II-C Humanoid Motion Tracking and Control

Humanoid control combines motion planning with the physical constraints of balance, actuation, and contact [54]. In physics-based character animation, DeepMimic learns control policies that imitate example motions while pursuing task objectives [55]. Learning-based systems have advanced whole-body teleoperation, human-motion imitation, and expressive tracking [56, 57, 58, 59]. Retargeting methods such as GMR [60] align human recordings with a robot embodiment, but kinematic agreement alone does not establish dynamic feasibility. Large-scale trackers such as SONIC [61] provide an execution layer for diverse motion references. This distinction between kinematic generation and physical tracking is important: accurate reference poses do not by themselves guarantee balance or appropriate foot contact after execution.

Motion generation and physical tracking can also be coupled within a control framework. CLoSD uses a diffusion planner with simulated feedback for multi-task character control [62], while OMG studies multimodal motion generation for humanoids [63]. In contrast, our work focuses on generating continuous kinematic references from changing instructions and constraints. These references are executed by an existing tracking system, allowing us to evaluate generation accuracy and inference cost separately from the qualitative simulation and hardware demonstrations of physical execution.

Fig. 3: Fused G1 Datasets and Retargeting Assessment. (a) Training-set composition by stored duration, including mirrors. (b) Ankle (left, logarithmic axis) and pelvis (right) mapped-target residual distributions over all 38,028 admitted human-source records; dots mark cross-clip medians. (c) Selected poses replayed from stored G1 trajectories. Metric definitions appear in App. A.
Fig. 3: Fused G1 Datasets and Retargeting Assessment. (a) Training-set composition by stored duration, including mirrors. (b) Ankle (left, logarithmic axis) and pelvis (right) mapped-target residual distributions over all 38,028 admitted human-source records; dots mark cross-clip medians. (c) Selected poses replayed from stored G1 trajectories. Metric definitions appear in App. A.

Fig. 3: Fused G1 Datasets and Retargeting Assessment. (a) Training-set composition by stored duration, including mirrors. (b) Ankle (left, logarithmic axis) and pelvis (right) mapped-target residual distributions over all 38,028 admitted human-source records; dots mark cross-clip medians. (c) Selected poses replayed from stored G1 trajectories. Metric definitions appear in App. A.

III Datasets and Retargeting

Learning a common motion generator from human and robot recordings requires a consistent embodiment, temporal resolution, and feature representation. We combine BONES Seed [25], HumanML3D [26], and HiPHI [24] in a 29-DoF G1 representation with 414 physical features at 25 Hz. The resulting training pool contains 156,819 motion records and 588.92 stored hours, including admitted mirrored records. Fig. 3 summarizes the corpus, quantifies lower-body target alignment, and illustrates stored retargeted motions.

III-A Dataset Construction

BONES Seed provides robot motion references, while HumanML3D and HiPHI contribute human motion recordings and their associated descriptions. For HiPHI, we select only the high-precision human-motion subset and exclude the object-interaction subset. We retarget the selected human body motions to G1; object trajectories and object-interaction supervision are not part of the resulting motion-generation dataset. The training pool comprises 124,658 BONES Seed records, 14,612 HumanML3D records, and 17,549 HiPHI records. We retain the source captions, mirror identities, and transformation provenance with each exported record. The validation and test manifests contain 9,998 and 12,831 additional records, respectively, and are excluded from the training pool. Counts include admitted mirrors; duration measures stored frames rather than independent capture time. The complete split statistics are provided in App. A.

III-B Motion Retargeting

BONES Seed motions retain their official G1 trajectories through resampling and representation conversion. For HumanML3D and HiPHI, we use source-specific adapters built on General Motion Retargeting (GMR) [60]. HumanML3D motions are reconstructed from AMASS [64] parameters using the SMPL-H body-and-hand model [65], whereas HiPHI motions are reconstructed using BVH forward kinematics. Rest-pose transforms and pelvis-height scaling align the human skeletons with the common robot asset. Root translations and local rotations are resampled to 25 Hz before retargeting. The solver combines position and orientation objectives under joint limits, followed by temporal refinement and bounded ground and rate corrections. App. A details the asset checks and conversion procedure.

III-C Retargeting Assessment

We assess mapped-target alignment over all 18,525 admitted HumanML3D and 19,503 admitted HiPHI records across the training, validation, and test splits. For each clip, we compute the 95th-percentile distance between a robot body origin and its scaled, offset human target; paired ankles use the worse side, and clips receive equal weight. Fig. 3(b) shows the ankle and pelvis distributions for the complete admitted cohorts, without selecting low-error clips. The cross-clip median ankle residuals are 1.49 cm on HumanML3D and 0.93 cm on HiPHI; the corresponding cross-clip 95th percentiles are 3.37 and 2.39 cm. Median pelvis residuals are 0.99 and 0.56 cm, respectively. These statistics quantify alignment to the mapped lower-body objectives.

The stored examples in Fig. 3(c) illustrate leg extension, stepping, and coordinated arm motion. Such pose-level evidence and mapped-target position residuals describe different aspects of retargeting: a target offset alone does not establish loss of the depicted action, and recognizable poses do not establish precise hand contact. Separately, conversion between the stored motion formats and the 414-D representation has a maximum round-trip position discrepancy of 1.31×10−61.31\times 10^{-6} m over the admitted human-source records.

IV The Proposed Method

As shown in Fig. 4, Motion Mamba 2.0 combines autoregressive root–body diffusion with local attention, resumable Mamba-3 states, and persistent content memory (PCM). Local attention retrieves recent motion, while PCM supplies attention-readable content derived from the accumulated recurrent state. The local cache remains bounded, while Mamba states and PCM slots carry forward information from accepted motion windows. All historical states are frozen during denoising and committed only after a clean motion window is accepted.

IV-A Streaming Formulation and Motion Representation

We divide the output into windows of CC tokens, with each token representing PP consecutive frames. At window tt, the conditions comprise a text instruction sts_{t}, spatial targets 𝐠t\mathbf{g}_{t}, and their validity mask 𝐯t\mathbf{v}_{t}. The memory ℳt−1\mathcal{M}_{t-1} is constructed from the accepted motion prefix. The conditional distribution is factorized over windows:

pθ(𝐱0:T∣𝐬,𝐠,𝐯)=∏t=0Tpθ(𝐱t∣st,𝐠t,𝐯t;ℳt−1).p_{\theta}(\mathbf{x}_{0:T}\mid\mathbf{s},\mathbf{g},\mathbf{v})=\prod_{t=0}^{T}p_{\theta}\bigl(\mathbf{x}_{t}\mid s_{t},\mathbf{g}_{t},\mathbf{v}_{t};\mathcal{M}_{t-1}\bigr). (1)

Text specifies the desired behavior, whereas spatial conditions identify selected quantities and their target times. Targets may lie within or beyond the current output window. They provide conditioning information without requiring the model to emit the intervening future motion in advance.

We adopt the hybrid representation of ARDY [7], retaining an explicit root trajectory and compressing articulation with a causal motion codec. At each frame, the root comprises position 𝐩∈ℝ3\mathbf{p}\in\mathbb{R}^{3} and heading ψ\psi. Body features include joint rotations, joint positions and velocities, and contact indicators. A token concatenates a root patch 𝐫i∈ℝ5​P\mathbf{r}_{i}\in\mathbb{R}^{5P} with a body latent 𝐛i∈ℝL\mathbf{b}_{i}\in\mathbb{R}^{L}:

𝐦r=[𝐩;cos⁡ψ;sin⁡ψ],𝐱i=[𝐫i;𝐛i].\mathbf{m}_{r}=[\mathbf{p};\cos\psi;\sin\psi],\quad\mathbf{x}_{i}=[\mathbf{r}_{i};\mathbf{b}_{i}]. (2)

The encoder ℰ\mathcal{E} maps explicit motion 𝐦\mathbf{m} to body latents. The decoder 𝒟\mathcal{D} reconstructs articulation from these latents and local root features computed by Local⁡(⋅)\operatorname{Local}(\cdot):

𝐛1:C=ℰ(𝐦1:C​P),𝐦^b,1:C​P=𝒟(𝐛1:C,Local(𝐫1:C)).\mathbf{b}_{1:C}=\mathcal{E}(\mathbf{m}_{1:CP}),\quad\widehat{\mathbf{m}}_{b,1:CP}=\mathcal{D}\bigl(\mathbf{b}_{1:C},\operatorname{Local}(\mathbf{r}_{1:C})\bigr). (3)

This representation exposes the trajectory directly to spatial control while reducing the dimensionality of articulated motion. Coordinates are expressed in the current canonical frame; the accumulated translation is retained separately to recover the world-space trajectory.

We use τ\tau for diffusion time and ℓ\ell for the layer index. Following the forward diffusion process [66], a clean hybrid window 𝐱t\mathbf{x}_{t} is perturbed with Gaussian noise according to a predefined diffusion noise schedule:

𝐳t,τ=α¯τ​𝐱t+1−α¯τ​ϵ,ϵ∼𝒩⁡(𝟎,𝐈).\mathbf{z}_{t,\tau}=\sqrt{\bar{\alpha}_{\tau}}\,\mathbf{x}_{t}+\sqrt{1-\bar{\alpha}_{\tau}}\,\bm{\epsilon},\quad\bm{\epsilon}\sim\mathcal{N}(\mathbf{0},\mathbf{I}). (4)

Here, α¯τ=∏s=1τ(1−βs)\bar{\alpha}_{\tau}=\prod_{s=1}^{\tau}(1-\beta_{s}), where βs\beta_{s} is the noise variance at diffusion step ss. The denoiser predicts clean hybrid features. A fixed sampling schedule repeatedly refines the noisy window while its accepted-history memory remains unchanged.

Fig. 4: Overview of Motion Mamba 2.0. Conditioned on text, spatial controls, and accepted motion history, the framework generates motion autoregressively through a two-stage diffusion denoiser. At each denoising step, the root network predicts the global trajectory, whose local features condition body prediction. Both networks combine attention and Mamba-3 through a hybrid sequence mixer. After each clean motion window is accepted, the history states are updated for subsequent generation.
Fig. 4: Overview of Motion Mamba 2.0. Conditioned on text, spatial controls, and accepted motion history, the framework generates motion autoregressively through a two-stage diffusion denoiser. At each denoising step, the root network predicts the global trajectory, whose local features condition body prediction. Both networks combine attention and Mamba-3 through a hybrid sequence mixer. After each clean motion window is accepted, the history states are updated for subsequent generation.

Fig. 4: Overview of Motion Mamba 2.0. Conditioned on text, spatial controls, and accepted motion history, the framework generates motion autoregressively through a two-stage diffusion denoiser. At each denoising step, the root network predicts the global trajectory, whose local features condition body prediction. Both networks combine attention and Mamba-3 through a hybrid sequence mixer. After each clean motion window is accepted, the history states are updated for subsequent generation.

IV-B Recurrent Root–Body Denoising

Two-stage prediction. Following the root–body decomposition, each diffusion evaluation first predicts the global root and then predicts articulation conditioned on that root. The conditioning vector 𝐜t,τ\mathbf{c}_{t,\tau} combines text, diffusion time, and the available initial heading. The root input 𝐮t,τr\mathbf{u}^{r}_{t,\tau} contains noisy hybrid features and temporally aligned controls. Valid root observations replace the corresponding noisy coordinates; body observations and their masks are supplied as aligned features. Observed future targets are embedded at their target positions, and empty future entries are masked out. The body input 𝐮t,τb\mathbf{u}^{b}_{t,\tau} concatenates local features of the predicted root, noisy body latents, and aligned observations. The root and body networks are denoted by ℱθr\mathcal{F}^{r}_{\theta} and ℱθb\mathcal{F}^{b}_{\theta}:

𝐫^t,0\displaystyle\widehat{\mathbf{r}}_{t,0} =ℱθr​(𝐮t,τr,𝐜t,τ,ℳt−1r),\displaystyle=\mathcal{F}^{r}_{\theta}(\mathbf{u}^{r}_{t,\tau},\mathbf{c}_{t,\tau};\mathcal{M}^{r}_{t-1}), (5)

𝐛^t,0\displaystyle\widehat{\mathbf{b}}_{t,0} =ℱθb​(𝐮t,τb,𝐜t,τ,ℳt−1b).\displaystyle=\mathcal{F}^{b}_{\theta}\bigl(\mathbf{u}^{b}_{t,\tau},\mathbf{c}_{t,\tau};\mathcal{M}^{b}_{t-1}\bigr).

The sampler consumes the concatenated clean prediction [𝐫^t,0;𝐛^t,0][\widehat{\mathbf{r}}_{t,0};\widehat{\mathbf{b}}_{t,0}]. Thus, root prediction is refreshed before body prediction at every diffusion step. The two stacks have separate parameters and layer-specific memories. This decomposition exposes global translation and heading for direct spatial conditioning, while allowing articulated motion to adapt to the predicted root trajectory. By updating the root-conditioned body input at each denoising step, the two predictions remain coupled throughout diffusion sampling rather than being combined only after generation.

Hybrid sequence layers. Each stack consists of diffusion transformer layers [67] with adaptive normalization and a gated residual multilayer perceptron. Inside the sequence mixer, attention and Mamba process the same normalized, condition-modulated features 𝐔t,τℓ\mathbf{U}^{\ell}_{t,\tau}. Attention retrieves recent features, whereas Mamba resumes its state from the accepted prefix. Their outputs are combined by a learned layerwise gate. PCM augments the attention path as described in Sec. IV-C and it does not replace the recurrent branch.

Mamba-3 recurrence. We adopt the resumable SISO Mamba-3 scan [14]. For one head, let 𝐮i\mathbf{u}_{i} denote the value projection, 𝐁i\mathbf{B}_{i} and 𝐂i\mathbf{C}_{i} the normalized state-input and readout vectors, Ai<0A_{i}<0 the decay, Δi>0\Delta_{i}>0 the step size, λi∈(0,1)\lambda_{i}\in(0,1) the trapezoidal coefficient, and 𝜽i\bm{\theta}_{i} the phase parameter. The operator ℛ\mathcal{R} rotates paired state coordinates. Omitting window, layer, and diffusion indices, the recurrence is

ϕi\displaystyle\bm{\phi}_{i} =ϕi−1+π​Δi​tanh⁡(𝜽i),\displaystyle=\bm{\phi}_{i-1}+\pi\Delta_{i}\tanh(\bm{\theta}_{i}), (6)

𝐁~i\displaystyle\widetilde{\mathbf{B}}_{i} =ℛ(ϕi)𝐁i,𝐂~i=ℛ(ϕi)𝐂i,\displaystyle=\mathcal{R}(\bm{\phi}_{i})\mathbf{B}_{i},\quad\widetilde{\mathbf{C}}_{i}=\mathcal{R}(\bm{\phi}_{i})\mathbf{C}_{i},

αi\displaystyle\alpha_{i} =exp(ΔiAi),βi=(1−λi)Δiαi,γi=λiΔi,\displaystyle=\exp(\Delta_{i}A_{i}),\quad\beta_{i}=(1-\lambda_{i})\Delta_{i}\alpha_{i},\quad\gamma_{i}=\lambda_{i}\Delta_{i},

𝐇i\displaystyle\mathbf{H}_{i} =αi​𝐇i−1+βi​𝐮i−1​𝐁~i−1⊤+γi​𝐮i​𝐁~i⊤,\displaystyle=\alpha_{i}\mathbf{H}_{i-1}+\beta_{i}\mathbf{u}_{i-1}\widetilde{\mathbf{B}}_{i-1}^{\top}+\gamma_{i}\mathbf{u}_{i}\widetilde{\mathbf{B}}_{i}^{\top},

𝐲i\displaystyle\mathbf{y}_{i} =𝐇i​𝐂~i+D​𝐮i.\displaystyle=\mathbf{H}_{i}\widetilde{\mathbf{C}}_{i}+D\mathbf{u}_{i}.

An output gate and projection map the head outputs back to the layer width. Eq. (6) combines adjacent state inputs through the trapezoidal update and represents relative phase through accumulated rotations. It provides a mechanism for retaining evolving dynamics; its contribution to motion generation is assessed empirically. The carried state includes the recurrent matrix, accumulated phase, and previous state-input and value vectors required to resume the scan. Its size is independent of the accepted sequence length.

IV-C Persistent Content Memory

Fig. 5: Streaming generation and hybrid attention–Mamba mixing. (a) Motion is generated window by window through root–body diffusion, with the history held fixed during denoising and updated only after the sampled window is accepted. (b) Base attention retrieves recent motion features, while PCM attention additionally accesses persistent content slots. Their gated residual difference is combined with the Mamba-3 output resumed from the committed recurrent state.

The recurrent state and attention cache play complementary roles. The bounded cache directly exposes recent keys and values but evicts older features; Mamba carries a fixed-size compressed representation of accepted motion history, which is not itself an attention token. PCM learns a state-to-attention mapping from recurrent summaries, their changes, and text conditions to content slots. These slots make the accumulated motion context available to subsequent windows without claiming exact recovery of arbitrary evicted events.

Local retrieval and static sinks. In each layer, the cache 𝒞t−1ℓ\mathcal{C}^{\ell}_{t-1} stores projected keys, values, and validity masks from the latest WW accepted windows. Let 𝐄ℓ\mathbf{E}^{\ell} be learned sink tokens, 𝐔ℓ\mathbf{U}^{\ell} the current noisy features, and 𝐐ℓ\mathbf{Q}^{\ell} their learned query projection. The functions Kℓ​(⋅)K^{\ell}(\cdot) and Vℓ​(⋅)V^{\ell}(\cdot) are shared by sinks, current tokens, and PCM slots. Historical keys and values are denoted by 𝐊hℓ\mathbf{K}^{\ell}_{h} and 𝐕hℓ\mathbf{V}^{\ell}_{h}. The base attention operator Attnℓ\operatorname{Attn}^{\ell} includes the output projection and token-validity mask:

𝐊0ℓ\displaystyle\mathbf{K}^{\ell}_{0} =[Kℓ​(𝐄ℓ);𝐊hℓ;Kℓ​(𝐔ℓ)],\displaystyle=[K^{\ell}(\mathbf{E}^{\ell});\mathbf{K}^{\ell}_{h};K^{\ell}(\mathbf{U}^{\ell})], (7)

𝐕0ℓ\displaystyle\mathbf{V}^{\ell}_{0} =[Vℓ​(𝐄ℓ);𝐕hℓ;Vℓ​(𝐔ℓ)],\displaystyle=[V^{\ell}(\mathbf{E}^{\ell});\mathbf{V}^{\ell}_{h};V^{\ell}(\mathbf{U}^{\ell})],

𝐀0ℓ\displaystyle\mathbf{A}^{\ell}_{0} =Attnℓ⁡(𝐐ℓ,𝐊0ℓ,𝐕0ℓ).\displaystyle=\operatorname{Attn}^{\ell}(\mathbf{Q}^{\ell},\mathbf{K}^{\ell}_{0},\mathbf{V}^{\ell}_{0}).

Current-window attention is bidirectional because the noisy window is denoised jointly. The sinks are static model parameters, distinct from history-dependent PCM slots. They remain available when the cache is short or empty; they do not store an episode’s past motion.

Content construction and gated writing. At layer ℓ\ell, PCM maintains SS memory slots 𝐏tℓ∈ℝS×d\mathbf{P}_{t}^{\ell}\in\mathbb{R}^{S\times d}, initialized to zero. The projector Πℓ\Pi^{\ell} pools the accepted recurrent matrix, applies a learned projection, and normalizes the resulting state summary. We compute this summary and its difference from the previous accepted window as

𝐬¯tℓ=Πℓ​(𝐇tℓ),𝐝tℓ=𝐬¯tℓ−𝐬¯t−1ℓ.\overline{\mathbf{s}}_{t}^{\ell}=\Pi^{\ell}(\mathbf{H}_{t}^{\ell}),\quad\mathbf{d}_{t}^{\ell}=\overline{\mathbf{s}}_{t}^{\ell}-\overline{\mathbf{s}}_{t-1}^{\ell}. (8)

The summary captures accumulated context, while the difference describes the latest accepted transition.

Let 𝐞t\mathbf{e}_{t} denote the pooled embedding of the active text instruction. The write path projects this embedding into a layer-specific representation and predicts featurewise modulation parameters:

𝐞tℓ=LN(Weℓ𝐞t+𝐛eℓ),fcℓ(𝐞tℓ)=[𝜸tℓ;𝜷tℓ].\displaystyle\mathbf{e}_{t}^{\ell}=\operatorname{LN}(W_{e}^{\ell}\mathbf{e}_{t}+\mathbf{b}_{e}^{\ell}),\quad f_{c}^{\ell}(\mathbf{e}_{t}^{\ell})=[\bm{\gamma}_{t}^{\ell};\bm{\beta}_{t}^{\ell}]. (9)

These parameters condition the normalized state difference on the active instruction:

𝐝~tℓ=(1+tanh⁡𝜸tℓ)⊙LN⁡(𝐝tℓ)+𝜷tℓ.\widetilde{\mathbf{d}}_{t}^{\ell}=(1+\tanh\bm{\gamma}_{t}^{\ell})\odot\operatorname{LN}(\mathbf{d}_{t}^{\ell})+\bm{\beta}_{t}^{\ell}. (10)

We concatenate the state summary, the text-modulated difference, and the projected text embedding to construct the candidate slot content:

𝐣tℓ\displaystyle\mathbf{j}_{t}^{\ell} =[𝐬¯tℓ;𝐝~tℓ;𝐞tℓ],𝐙tℓ=LN(fpℓ(𝐣tℓ)).\displaystyle=[\overline{\mathbf{s}}_{t}^{\ell};\widetilde{\mathbf{d}}_{t}^{\ell};\mathbf{e}_{t}^{\ell}],\quad\mathbf{Z}_{t}^{\ell}=\operatorname{LN}\bigl(f_{p}^{\ell}(\mathbf{j}_{t}^{\ell})\bigr). (11)

Slot normalization acts along the feature dimension.

Finally, a gate computed from the joint representation and the previous memory controls the write rate:

𝐰tℓ\displaystyle\mathbf{w}_{t}^{\ell} =η​σ​(fwℓ​([𝐣tℓ;vec⁡(𝐏t−1ℓ)])),\displaystyle=\eta\,\sigma\!\left(f_{w}^{\ell}\!\left([\mathbf{j}_{t}^{\ell};\operatorname{vec}(\mathbf{P}_{t-1}^{\ell})]\right)\right), (12)

𝐏tℓ\displaystyle\mathbf{P}_{t}^{\ell} =(1−𝐰tℓ)⊙𝐏t−1ℓ+𝐰tℓ⊙𝐙tℓ.\displaystyle=(1-\mathbf{w}_{t}^{\ell})\odot\mathbf{P}_{t-1}^{\ell}+\mathbf{w}_{t}^{\ell}\odot\mathbf{Z}_{t}^{\ell}.

The write-rate cap η∈(0,1]\eta\in(0,1] bounds each gate value, limiting the contribution of candidate content to each update. Text conditions both candidate-content generation and write gating, allowing the same state transition to produce different memory updates under different instructions. The slots therefore accumulate session-specific content rather than serving as fixed learned vectors. The text condition excludes diffusion-time and initial-heading embeddings. Implementation details appear in App. B.

Residual attention readout. The current window reads 𝐏t−1ℓ\mathbf{P}^{\ell}_{t-1} without modifying it. Augmented keys 𝐊Pℓ\mathbf{K}^{\ell}_{P} and values 𝐕Pℓ\mathbf{V}^{\ell}_{P} insert projected slots immediately after the sinks in Eq. (7). Base and augmented attention use the same query 𝐐ℓ\mathbf{Q}^{\ell}. A learned scalar ρℓ\rho_{\ell} controls the attention difference, and ζℓ\zeta_{\ell} controls the Mamba contribution 𝐌ℓ\mathbf{M}^{\ell}:

𝐀Pℓ\displaystyle\mathbf{A}^{\ell}_{P} =Attnℓ⁡(𝐐ℓ,𝐊Pℓ,𝐕Pℓ),\displaystyle=\operatorname{Attn}^{\ell}(\mathbf{Q}^{\ell},\mathbf{K}^{\ell}_{P},\mathbf{V}^{\ell}_{P}), (13)

𝐘ℓ\displaystyle\mathbf{Y}^{\ell} =𝐀0ℓ+tanh⁡(ρℓ)​(𝐀Pℓ−𝐀0ℓ)+σ⁡(ζℓ)​𝐌ℓ.\displaystyle=\mathbf{A}^{\ell}_{0}+\tanh(\rho_{\ell})(\mathbf{A}^{\ell}_{P}-\mathbf{A}^{\ell}_{0})+\sigma(\zeta_{\ell})\mathbf{M}^{\ell}.

Initializing ρℓ\rho_{\ell} to zero recovers the Native mixer output exactly, despite the additional slots. This differs from initializing slot values to zero, since extra keys can still change attention normalization. PCM leaves query construction unchanged; state summaries enter through content writing rather than through a separate state-dependent query. This formulation targets usable motion context instead of explicit indexing of past instructions.

Accepted-only state updates. Each denoising evaluation reads an immutable snapshot. The denoiser ℱθ\mathcal{F}_{\theta} may produce a temporary proposal ℳ~t,τ\widetilde{\mathcal{M}}_{t,\tau}, but this proposal is not committed during sampling:

(𝐱^t,0,ℳ~t,τ)=ℱθ​(𝐳t,τ,𝐜t,τ,ℳt−1).(\widehat{\mathbf{x}}_{t,0},\widetilde{\mathcal{M}}_{t,\tau})=\mathcal{F}_{\theta}(\mathbf{z}_{t,\tau},\mathbf{c}_{t,\tau};\mathcal{M}_{t-1}). (14)

After sampling, the accepted window is recentered and materialized as clean history in a canonical pass at diffusion time zero. This pass updates only accepted motion tokens. Layerwise cache append, recurrent-state replacement, and PCM writing are committed together across the root and body stacks. If the pass fails, both stacks retain their previous state. The streaming generation algorithm in App. B.2 summarizes the procedure.

The exact cache grows only to WW windows, and each recurrent state and slot bank has fixed size. For a fixed output window and conditioning budget, memory and computation per new window therefore do not grow with elapsed generation time. This bound concerns computational context; it does not imply error-free motion over arbitrary durations.

IV-D State-Preserving Efficient Inference

Repeated diffusion denoising incurs overhead from kernel launches, intermediate memory traffic, and unnecessary state materialization. We address these costs through state-preserving execution optimizations while maintaining root–body dependencies and accepted-only history updates.

Read-only execution. During denoising, we avoid materializing state proposals and diagnostics that are not consumed by either the prediction or a later commit. All recurrent computation contributing to predicted motion is retained. The canonical clean-history pass still constructs and commits the complete accepted state.

Fusion Kernel. We fuse Mamba transition preprocessing, including the decay activation, decay floor, step-size transformation, and product Δi​Ai\Delta_{i}A_{i}, into a single traversal. Intermediate values remain in FP32 registers before outputs are written in the scan’s required layout. Compatible scale–shift and gated-residual operations are also fused in the execution variants that pass the numerical checks. The attention operator and recurrent scan are retained. Exact preprocessing and precision boundaries are given in App. B.

Fig. 6: CUDA Graph and Kernel Fusion. Stack-level CUDA

Images from the source

Fig. 8: Real-world qualitative results on Unitree G1. (a) T1, sequential action composition; (b) T2, expressive motion; (c) T3, keyboard-controlled locomotion; and (d) T4, mouse-controlled locomotion. Each panel shows real-robot frames, Viser references, timestamps, and the complete prompt sequence.
Fig. 8: Real-world qualitative results on Unitree G1. (a) T1, sequential action composition; (b) T2, expressive motion; (c) T3, keyboard-controlled locomotion; and (d) T4, mouse-controlled locomotion. Each panel shows real-robot frames, Viser references, timestamps, and the complete prompt sequence.
Fig. 9: Simulated motion tracking with SONIC. Top left: forward to backward walking; top right: walking with a left turn; bottom left: waving followed by walking; bottom right: martial-arts motion followed by walking. Each quadrant compares simulated execution (upper row) with the corresponding Viser reference (lower row) at matching timestamps.
Fig. 9: Simulated motion tracking with SONIC. Top left: forward to backward walking; top right: walking with a left turn; bottom left: waving followed by walking; bottom right: martial-arts motion followed by walking. Each quadrant compares simulated execution (upper row) with the corresponding Viser reference (lower row) at matching timestamps.
[Uncaptioned image]
[Uncaptioned image]
[Uncaptioned image]
[Uncaptioned image]
[Uncaptioned image]
[Uncaptioned image]

Sources

← Back to Daily AI Report