MaIL: Improving Imitation Learning with Selective State Space Models

Xiaogang Jia, Qian Wang, Atalay Donat, Bowen Xing, Ge Li, Hongyi Zhou, Onur Celik, Denis Blessing, Rudolf Lioutikov, Gerhard Neumann

TL;DR

MaIL (Mamba Imitation Learning) replaces Transformer backbones with selective state-space models (Mamba) for visual imitation learning policies. By introducing a novel sequence-alignment mechanism that enables an encoder-decoder Mamba structure, MaIL matches or outperforms Transformers across behavioral cloning and diffusion policies—especially in data-scarce settings and under visual occlusions.

What Problem Does This Paper Address?

Robot imitation learning (IL) from human demonstrations must handle multi-modal, non-Markovian behaviors, which has led modern methods to rely heavily on Transformer backbones (e.g., Diffusion Policy). However, Transformers suffer from two practical pitfalls in robotics:

  1. Data hunger: Dense self- and cross-attention mechanisms often overfit or learn sub-optimal representations when demonstration datasets are small.
  2. Computational overhead: Transformers scale quadratically with sequence length, making them resource-intensive.

While selective State Space Models (SSMs) like Mamba offer linear-time sequence modeling and selective feature filtering, they are naturally designed as sequence-to-sequence causal models. Extending SSMs to flexible encoder-decoder setups (critical for processing multimodal conditioning and predicting action sequences of differing lengths) has remained non-trivial.

Methods

The authors propose MaIL, supporting two primary policy formulations—Behavioral Cloning (BC) and Denoising Diffusion Policies (DDP)—under two architectural variants:

  • Decoder-Only Mamba (D-Ma): Concatenates time embeddings, ResNet-18 visual observation embeddings (with positional encoding), and noisy action tokens, running them sequentially through stacked Mamba blocks followed by a linear projection layer.
  • Encoder-Decoder Mamba (ED-Ma) & Mamba Aggregation: Standard Mamba requires input and output sequences to match in length. To build an encoder-decoder variant:
  • Encoder: Processes observation features and diffusion timestep embeddings, padded with learnable action variables to match the total sequence length.
  • Decoder: Processes noisy actions, padded with learnable state and time variables.
  • Outputs are combined via element-wise addition ($\mathbf{E}_s + \mathbf{E}_a$) before passing through subsequent Mamba decoder layers, enabling cross-sequence information flow analogous to cross-attention.

Datasets

  • LIBERO Benchmark (Simulation): Five task suites evaluated in Robosuite—LIBERO-Spatial, LIBERO-Object, LIBERO-Goal, LIBERO-Long (10 tasks each), and LIBERO-90 (90 tasks). The primary evaluation focuses on low-data regimes using only 20% of demonstrations (10 trajectories per task), with full-data comparisons provided in the appendix. Language conditioning is provided via pre-trained CLIP embeddings.
  • Real Robot Manipulation: Evaluated on a 7-DoF Franka Emika Panda robot with two RGB camera views (128×256 and 256×256) across three tasks:
  • Pick-Place & Two-stage Pick-Place: Placing bananas and carrots into bowls/plates.
  • Inserting: Grasping and inserting a block into a LEGO box hole.
  • CupStacking: Stacking three different sized cups sequentially.

Key Insights and Ideas

  • Superior generalization from small datasets: With only 20% demonstration data, Mamba-based policies substantially outperform Transformers. The selective filtering mechanism in Mamba acts as an inductive bias, preventing the policy from memorizing spurious correlations.
  • Robustness to sensory dropout: When images are artificially corrupted with random rectangular occlusions, Transformer performance degrades sharply, whereas Mamba maintains higher success rates. Mamba effectively filters and propagates informative historical features even when frames are partially masked.
  • More structured latent spaces: t-SNE visualizations of the latent activations right before the action head reveal that MaIL forms smooth, continuous manifolds tracking the task progression, whereas Transformers produce scattered, fragmented clusters.

Key Results

  • Simulation (LIBERO with 20% data):
  • Under BC, ED-Ma achieves 61.8% success on LIBERO-Object vs. 48.0% for ED-Tr, and 59.9% on LIBERO-90 vs. 28.4% for D-Tr (a >30% absolute improvement).
  • Under DDP, ED-Ma achieves 60.3% on LIBERO-90 (vs. 39.9% for ED-Tr) and 56.5% on LIBERO-Goal (vs. 47.8% for ED-Tr).
  • On full-data regimes, MaIL performs on par with or slightly better than Transformers (e.g., DDP-H5 ED-Ma hits 89.3% on LIBERO-Goal vs. 87.3% for ED-Tr).
  • Real Robot Hardware:
  • Inserting: ED-Ma achieved 60% overall task success (Stage 2) compared to 35% for ED-Tr.
  • Pick-Place (Carrot): ED-Ma reached 70% success vs. 25% for ED-Tr.
  • CupStacking: ED-Ma achieved 55% complete two-stage stacking vs. 40% for ED-Tr.

Limitations and Future Work

  • Diminishing returns with large datasets: As demonstration volume scales up to 100%, Transformers close the performance gap, performing similarly to Mamba.
  • Limited inference speedup in short-horizon settings: While SSMs theoretically scale linearly ($O(L)$ vs. $O(L^2)$), typical robot policy horizons are relatively short ($K \le 5$ history states, $J \le 16$ actions). At these sequence lengths, Mamba's wall-clock latency is roughly comparable to standard Transformers rather than significantly faster.

Summary updated

BibTeX
@inproceedings{jia2024mail,
  author = {Xiaogang Jia and Qian Wang and Atalay Donat and Bowen Xing and Ge Li and Hongyi Zhou and Onur Celik and Denis Blessing and Rudolf Lioutikov and Gerhard Neumann},
  title = {{MaIL: Improving Imitation Learning with Selective State Space Models}},
  booktitle = {Conference on Robot Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=tyEaxqhcb3},
}

Loading related content...

Figure