Enabling Stateful Behaviors for Diffusion-based Policy Learning

Xiao Liu, Fabian Clemens Weigend, Yifan Zhou, Heni Ben Amor

TL;DR

Standard diffusion policies for robots are highly expressive but suffer from temporal inconsistency because they are inherently stateless. Diff-Control solves this by integrating a ControlNet architecture to condition action generation on past actions, effectively turning the policy into a stateful recursive Bayesian filter. This simple modification drastically improves a robot's robustness to visual occlusions and its ability to perform periodic or highly dynamic tasks.

What Problem Does This Paper Address?

Diffusion models have become a go-to choice for robotic imitation learning because they excel at capturing complex, multimodal action distributions (i.e., multiple valid ways to complete a task). However, they face a major hurdle in practice: temporal inconsistency.

Because standard diffusion policies generate action sequences based purely on the current observation, they are stateless. They don't inherently know what they did a fraction of a second ago. In volatile, high-dynamic environments, or when human demonstrations contain varied contexts, this statelessness leads to jerky trajectories, erratic behaviors, or complete failure when faced with sudden changes or sensory blockages.

Previous fixes tried altering action representations (like action chunking or waypoint prediction), but they don't fix the underlying model's lack of memory. This paper asks: Can we explicitly build temporal consistency directly into the diffusion process?

Methods

The authors introduce Diff-Control, a policy framework that models action generation through a recursive Bayesian filter lens.

Instead of throwing away past actions, Diff-Control uses them as a historical anchor. It achieves this by adapting ControlNet—a popular architecture in computer vision used to add spatial conditioning (like edge maps or poses) to text-to-image diffusion models. Here, ControlNet is cleverly repurposed for temporal conditioning in action space.

The Diff-Control architecture uses a trainable replica of the base policy's encoders connected via zero-convolution layers to inject past action history.

The architecture consists of two main parts:

  1. Base Policy: A standard 1D temporal convolutional U-Net diffusion policy trained to map observations (images and language) to actions. Once trained, its weights are frozen.
  2. Transition Model (ControlNet): A trainable replica of the base policy's encoder blocks. It takes the previously executed action sequence ($a_{[W_{t-h}]}$) as a "prompt" and passes its features into the frozen base policy via zero-convolution layers (convolutional layers initialized with weights set to zero so they don't disrupt the frozen model at the start of training).

During inference, the ControlNet module guides the frozen base policy to ensure that the newly generated action sequence smoothly and logically continues from the previous one.

Datasets

The model was evaluated using a physical UR5 robot arm across two distinct, custom-designed real-world tasks meant to challenge temporal consistency:

  1. Duck Scooping (Dynamic Task): The robot uses a ladle to scoop a rubber duck out of a water tank. The fluid dynamics create unpredictable water currents that move the duck around as the ladle enters, requiring reactive, precise adjustments. (50 expert demonstrations).
  2. Drum Beats (Periodic Task): The robot must hit a drum exactly three times and then stop. This requires the policy to keep track of its internal state (counting) to know when to cease action. (150 expert demonstrations).

Key Insights and Ideas

  • Actions as State Variables: Treating a history of actions as the system's latent state allows the network to maintain a continuous behavioral thread without needing complex, explicit recurrent state tracking (like LSTMs), which often struggle with diffusion backbones.
  • Repurposing Vision Tools for Time: ControlNet's ability to guide image generation without destroying a base model's prior knowledge translates perfectly to guiding robot trajectories over time.
  • Robustness Through "Muscle Memory": Because the model learns an internal action transition dynamic, it develops a form of blind execution or "muscle memory." If the camera view is suddenly blocked, the transition model can carry the robot through the motion safely based on its trajectory history.
A toy problem approximating a cosine wave demonstrates how stateless diffusion policies split between modes, whereas Diff-Control utilizes prior trajectories to accurately continue the sequence.

Key Results

The authors compared Diff-Control against standard Diffusion Policies, Image-BC, ModAttn, and a BC-Z variant utilizing an LSTM.

  • Periodic Task Mastery: On the Drum Beats task, Diff-Control achieved a 72% success rate. Standard Diffusion Policy only managed 24% because it couldn't reliably decide whether to ascend or descend after a hit, often drumming indefinitely. All other baselines scored 0%.
  • Dynamic Handling: On the Duck Scooping task, Diff-Control hit an 84% success rate, outperforming standard Diffusion Policy (76%) and drastically beating the LSTM baseline (36%).
  • Resilience to Perturbations: When the authors applied visual occlusion (blocking the camera view mid-task), Diff-Control maintained an impressive 80% success rate. Standard Diffusion Policy dropped to 50%, while the non-diffusion baselines plummeted to 0-10%.

Limitations and Future Work

The limitations of the approach are not explicitly detailed in the paper's conclusion. However, based on the architecture, potential areas for future exploration include evaluating how the policy handles much longer execution horizons, scaling the method to multi-task settings with larger action spaces, and analyzing the computational overhead added by running the parallel ControlNet encoder blocks during real-time robot inference.

Summary updated

Abstract

While imitation learning provides a simple and effective framework for policy learning, acquiring consistent actions during robot execution remains a challenging task. Existing approaches primarily focus on either modifying the action representation at data curation stage or altering the model itself, both of which do not fully address the scalability of consistent action generation. To overcome this limitation, we introduce the Diff-Control policy, which utilizes a diffusion-based model to learn the action representation from a state-space modeling viewpoint. We demonstrate that we can reduce diffusion-based policies' uncertainty by making it stateful through a Bayesian formulation facilitated by ControlNet, leading to improved robustness and success rates. Our experimental results demonstrate the significance of incorporating action statefulness in policy learning, where Diff-Control shows improved performance across various tasks. Specifically, Diff-Control achieves an average success rate of 72% and 84% on stateful and dynamic tasks, respectively. Project page: https://github.com/ir-lab/Diff-Control
BibTeX
@misc{liu2024enabling,
  author = {Xiao Liu and Fabian Clemens Weigend and Yifan Zhou and Heni Ben Amor},
  title = {{Enabling Stateful Behaviors for Diffusion-based Policy Learning}},
  year = {2024},
  eprint = {2404.12539},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.12539},
}
Figure