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

> Motion Mamba 2.0 achieves real-time long-horizon humanoid control via persistent content memory, reaching 94% physical task success with a 6.1x inference speedup.

- **Source:** [arXiv](https://arxiv.org/abs/2611.29897)
- **Published:** 2026-11-25
- **Permalink:** https://picx.dev/p/V3yWcx
- **Whiteboard:** https://picx.dev/p/V3yWcx/image

## Summary

## Summary (Overview)

- **Motion Mamba 2.0** is a Mamba-based autoregressive diffusion architecture for long-horizon, real-time controllable humanoid (Unitree G1) motion generation, integrating local attention, resumable Mamba-3 recurrent states, and a novel **Persistent Content Memory (PCM)** mechanism.
- The method achieves accurate terminal spatial control over rollouts up to **39.52 seconds**, with Root CE of 7.55 cm and End CE of 13.64 cm on retargeted HiPHI, outperforming all compared baselines.
- A hardware-aware inference pipeline combining **CUDA Graph replay, fused kernels, and execution-flow simplification** reduces median complete-window latency from 1685.35 ms to **276.14 ms** on an RTX 4090, achieving a **6.138× median paired speedup**.
- Real-world deployment on a physical Unitree G1 demonstrates **94% full-task success across 100 trials** with no observed falls, supporting sequential text-guided action composition and interactive keyboard/mouse control.
- The work extends the authors' ECCV 2024 paper (Motion Mamba) with a reformulated autoregressive root–body diffusion framework, architectural redesign, and comprehensive evaluation across three G1 motion benchmarks.

## Introduction and Theoretical Foundation

### Background and Motivation

Interactive humanoid control requires a motion generator that can:
- Interpret action descriptions and accommodate spatial constraints
- Continue from already-produced motion while incorporating new commands
- Provide references quickly enough for interactive use and downstream tracking

Existing autoregressive diffusion methods face two fundamental difficulties:
1. **Bounded attention caches** discard older motion features, while unbounded caches grow storage/computation with sequence length
2. **Repeated denoising** of short windows incurs substantial execution overhead even when individual model evaluations are small

### Key Theoretical Insight

State-space models (SSMs) offer an alternative to storing every historical token by summarizing sequences in a recurrent state. However, 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. This motivates a **learned interface** between accumulated recurrent motion state and attention-accessible content.

A critical distinction for diffusion: successive noisy candidates describe alternatives for the *same* output window, not successive moments of the accepted motion stream. Therefore, the boundary between prediction and history commitment must be part of the model's streaming formulation.

### Streaming Formulation

The conditional distribution is factorized over windows:

$$
p_{\theta}\left(\mathbf{x}_{0: T} \mid \mathbf{s}, \mathbf{g}, \mathbf{v}\right) = \prod_{t = 0}^{T} p_{\theta}\left(\mathbf{x}_{t} \mid s_{t}, \mathbf{g}_{t}, \mathbf{v}_{t}; \mathcal{M}_{t - 1}\right)\tag{1}
$$

where $\mathbf{s}$ is the text instruction, $\mathbf{g}$ spatial targets, $\mathbf{v}$ validity masks, and $\mathcal{M}_{t-1}$ the memory from the accepted motion prefix.

### Motion Representation

The hybrid root–body representation retains an explicit root trajectory and compresses articulation with a causal motion codec:

$$
\mathbf{m}_{r} = [\mathbf{p}; \cos \psi ; \sin \psi ], \quad \mathbf{x}_{i} = [\mathbf{r}_{i}; \mathbf{b}_{i}]\tag{2}
$$

where $\mathbf{p} \in \mathbb{R}^{3}$ is position, $\psi$ heading, $\mathbf{r}_{i} \in \mathbb{R}^{5P}$ a root patch, and $\mathbf{b}_{i} \in \mathbb{R}^{L}$ a body latent.

## Methodology

### Two-Stage Recurrent Root–Body Denoising

Each diffusion evaluation first predicts the global root, then predicts articulation conditioned on that root:

$$
\begin{array}{r} \widehat{\mathbf{r}}_{t, 0} = \mathcal{F}_{\theta}^{r}(\mathbf{u}_{t, \tau}^{r}, \mathbf{c}_{t, \tau}; \mathcal{M}_{t - 1}^{r}), \\ \widehat{\mathbf{b}}_{t, 0} = \mathcal{F}_{\theta}^{b}(\mathbf{u}_{t, \tau}^{b}, \mathbf{c}_{t, \tau}; \mathcal{M}_{t - 1}^{b}). \end{array}\tag{5}
$$

### Mamba-3 Recurrence

The resumable SISO Mamba-3 scan uses trapezoidal state updates with accumulated phase rotations:

$$
\begin{array}{l} \phi_{i} = \phi_{i - 1} + \pi \Delta_{i} \tanh (\boldsymbol{\theta}_{i}), \\ \widetilde{\mathbf{B}}_{i} = \mathcal{R}(\phi_{i}) \mathbf{B}_{i}, \quad \widetilde{\mathbf{C}}_{i} = \mathcal{R}(\phi_{i}) \mathbf{C}_{i}, \\ \alpha_{i} = \exp (\Delta_{i} A_{i}), \quad \beta_{i} = (1 - \lambda_{i}) \Delta_{i} \alpha_{i}, \quad \gamma_{i} = \lambda_{i} \Delta_{i}, \\ \mathbf{H}_{i} = \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}, \\ \mathbf{y}_{i} = \mathbf{H}_{i} \widetilde{\mathbf{C}}_{i} + D \mathbf{u}_{i}. \end{array}\tag{6}
$$

### Persistent Content Memory (PCM)

PCM learns a state-to-attention mapping that converts:
1. **State summaries** — pooled accepted recurrent matrix: $\overline{\mathbf{s}}_{t}^{\ell} = \Pi^{\ell}(\mathbf{H}_{t}^{\ell})$
2. **State differences** — latest accepted transition: $\mathbf{d}_{t}^{\ell} = \overline{\mathbf{s}}_{t}^{\ell} - \overline{\mathbf{s}}_{t - 1}^{\ell}$
3. **Text-conditioned features** — modulated via learned parameters

The write path (Eqs. 9–12) uses featurewise modulation and a gated update:

$$
\begin{array}{l} \mathbf{w}_{t}^{\ell} = \eta \, \sigma \left(f_{w}^{\ell}\left([\mathbf{j}_{t}^{\ell}; \mathrm{vec}(\mathbf{P}_{t - 1}^{\ell})]\right)\right), \\ \mathbf{P}_{t}^{\ell} = (1 - \mathbf{w}_{t}^{\ell}) \odot \mathbf{P}_{t - 1}^{\ell} + \mathbf{w}_{t}^{\ell} \odot \mathbf{Z}_{t}^{\ell}. \end{array}\tag{12}
$$

The residual attention readout combines base attention, PCM-augmented attention, and Mamba outputs:

$$
\mathbf{Y}^{\ell} = \mathbf{A}_{0}^{\ell} + \tanh (\rho_{\ell})(\mathbf{A}_{P}^{\ell} - \mathbf{A}_{0}^{\ell}) + \sigma(\zeta_{\ell}) \mathbf{M}^{\ell}\tag{13}
$$

### Accepted-Only State Updates

During denoising, all historical states are frozen. The cache, recurrent states, and PCM slots are committed **only after a clean motion window is accepted**, separating diffusion sampling iterations from temporal evolution of generated motion.

### Learning Objective

$$\mathcal{L} = \lambda_{\mathrm{hyb}} \mathcal{L}_{\mathrm{hyb}} + \lambda_{\mathrm{body}} \mathcal{L}_{\mathrm{body}} + \lambda_{\mathrm{goal}} \mathcal{L}_{\mathrm{goal}} + \lambda_{\mathrm{FK}} \mathcal{L}_{\mathrm{FK}}\tag{15}$$

### Inference Optimizations

1. **Read-only execution**: avoids materializing unused state proposals during denoising
2. **Fusion kernel**: fuses Mamba transition preprocessing into a single traversal
3. **CUDA Graph replay**: captures root and body DiT stacks separately, with the three CFG branches executed serially

## Empirical Validation / Results

### Datasets and Retargeting

- **29-DoF G1 representation** with 414 physical features at 25 Hz
- Training pool: 156,819 motion records, 588.92 stored hours
- Composition: 124,658 BONES Seed, 14,612 HumanML3D, 17,549 HiPHI records
- Retargeting quality: cross-clip median ankle residuals of 1.49 cm (HumanML3D) and 0.93 cm (HiPHI)

### Main Results on HiPHI (Table 1)

| Duration | Root CE (cm) | End CE (cm) | Cmd. (%) | R@3 (%) |
|----------|-------------|-------------|----------|---------|
| 2.08 s | **2.78** | **7.19** | **86.96** | **35.58** |
| 8.32 s | **2.53** | **7.11** | **48.82** | **21.35** |
| 18.72 s | **2.87** | **8.45** | **47.11** | **23.05** |
| 39.52 s | **7.55** | **13.64** | **46.05** | **23.68** |

Motion Mamba 2.0 achieves the lowest Root CE at every duration and the lowest or tied-lowest End CE, demonstrating accurate terminal constraint satisfaction over extended rollouts.

### Architectural Ablations (HiPHI, 39.52 s)

| Variant | Root CE↓ | End CE↓ | Cmd.↑ | R@3↑ |
|---------|----------|---------|-------|------|
| Minimal (no Mamba) | 60.00 | 64.86 | 35.27 | 17.26 |
| Native (Mamba, no PCM) | 9.36 | 15.54 | 32.20 | 17.44 |
| Native + PCM (w/o text) | 8.62 | 14.62 | 33.34 | 21.18 |
| Native + PCM (w/o delta) | 8.30 | 14.18 | 32.65 | 21.11 |
| **Motion Mamba 2.0** | **7.55** | **13.64** | **46.05** | **23.68** |

Key findings:
- **Recurrent modeling** reduces Root CE from 60.00 to 9.36 cm at 39.52 s (vs. Minimal)
- **PCM** further reduces Root CE by 19.3% and improves Cmd. from 32.20% to 46.05%
- Text conditioning and state-difference features both contribute to long-horizon control

### Inference Efficiency (Table 7)

| Flow | Fusion | Graph | p50 (ms) | p95 (ms) | Speedup |
|------|--------|-------|----------|----------|---------|
| — | — | — | 1685.35 | 2471.65 | 1.000× |
| ✓ | — | — | 1102.82 | 1647.52 | 1.525× |
| ✓ | ✓ | — | 1069.52 | 1588.74 | 1.578× |
| ✓ | — | ✓ | 285.20 | 352.22 | 5.943× |
| ✓ | ✓ | ✓ | **276.14** | **345.82** | **6.138×** |

The optimized path preserves **bitwise-identical** generated outputs and committed states across four 100-window rollouts.

### Real-World Evaluation (Tables 8–9)

| Task | Full Success | Stages | Text Switches | Falls |
|------|-------------|--------|---------------|-------|
| T1: Action composition | 18/20 (90.0%) | 136/140 | 117/120 | 0 |
| T2: Expressive motion | 19/20 (95.0%) | 99/100 | 78/80 | 0 |
| T3: Keyboard control | 29/30 (96.7%) | 59/60 | 30/30 | 0 |
| T4: Mouse control | 28/30 (93.3%) | 58/60 | 29/30 | 0 |

Interactive control metrics: Speed RMSE of 0.041/0.045 m/s (keyboard/mouse), heading MAE of 4.6°/5.1°, median physical-response latencies of 351/360 ms, and 98.7%/97.3% events within the 1.5-s deadline.

## Theoretical and Practical Implications

### Theoretical Contributions

1. **State-attention interface**: PCM provides a principled learned mapping between compressed recurrent state and attention-accessible content, addressing the complementary roles of SSM recurrence and attention retrieval
2. **Accepted-only history updates**: Formal separation of diffusion sampling iterations from temporal motion evolution prevents intermediate noisy candidates from corrupting the history
3. **Bounded computational context**: Fixed-size recurrent states, cache, and PCM slots bound memory/computation per window regardless of elapsed generation time

### Practical Implications

- **Real-time interactive control**: 276.14 ms per 2.08-s window (0.133 real-time factor) enables responsive humanoid control on consumer hardware (RTX 4090)
- **Physical deployment**: Successful multi-stage text-guided execution and interactive locomotion on a real Unitree G1 demonstrate practical viability
- **Dataset contribution**: Unified 29-DoF G1 representation across three benchmarks with retargeting assessment provides a standardized evaluation protocol

## Conclusion

Motion Mamba 2.0 presents an autoregressive diffusion framework combining local attention, resumable Mamba-3 states, and persistent content memory for long-horizon controllable humanoid motion generation. Key achievements include:
- Lowest Root/End CE across all evaluated horizons (up to 39.52 s) on HiPHI
- 6.138× median paired inference speedup via state-preserving optimizations
- 94% full-task success on physical G1 with no falls

**Future work** will focus on whole-body loco-manipulation, coordinating locomotion with object manipulation—extending beyond the current scope of controllable motion generation without object interaction.

---

_Markdown view of https://picx.dev/p/V3yWcx, served by PicX — AI-generated visual whiteboard summaries of research papers._
