This paper introduces the Quality-Diversity Transformer (QDT), a single model that combines the strengths of evolutionary algorithms and causal Transformers to generate a vast repertoire of robotic behaviors on demand. By prioritizing behavioral consistency during training, the authors create an agent that is not only more robust than its predecessors but also capable of interpolating between distinct skills with high accuracy.
TL;DR
The Quality-Diversity Transformer (QDT) compresses a diverse library of robotic policies into a single, behavior-conditioned Transformer. By training on "consistent" trajectories evolved through a new variant of MAP-Elites, the QDT can execute a wide range of tasks on demand and even generalize to behaviors it hasn't explicitly seen.
What Problem Does This Paper Address?
Quality-Diversity (QD) algorithms, such as MAP-Elites, are designed to "illuminate" a search space by finding a diverse set of high-performing solutions (e.g., a robot finding 1,000 different ways to walk). However, these algorithms face two major hurdles in "uncertain" or noisy environments:
- The Reproducibility Problem: Standard QD often evaluates a policy only once. In complex simulations, a robot might reach a target by pure luck. When you try to run that same policy again with a slightly different starting position, it often fails.
- Discontinuity: A QD repertoire is a discrete "library" of individual policies. There is no easy way to find a middle ground between two distinct behaviors or to achieve a behavior that falls between the entries in the library.
Methods
The authors propose a two-stage pipeline to solve these issues:
- MAP-Elites Low-Spread (ME-LS): This is a new QD variant that optimizes for both performance and consistency. It evaluates candidate policies multiple times and calculates their "spread"—the variance in their behavior across different starting states. It only saves policies that are both high-performing and highly repeatable.
- Quality-Diversity Transformer (QDT): Inspired by the Decision Transformer, the QDT is a causal Transformer (based on GPT-2) trained via supervised learning on trajectories from the ME-LS repertoire. Unlike the original Decision Transformer, which is conditioned on a "return-to-go," the QDT is conditioned on a continuous Behavior Descriptor (BD). This allows a user to simply tell the model what behavior they want (e.g., "walk to coordinates X, Y"), and the model autoregressively predicts the necessary motor actions.
Datasets
The researchers evaluated their method using the Brax physics engine on two challenging locomotion benchmarks:
- Ant-Omni: A four-legged robot that must learn to reach any (x, y) coordinate on a 2D plane.
- Halfcheetah-Uni: A bipedal robot tasked with discovering different running styles (gaits), defined by the proportion of time each foot spends on the ground.
Key Insights and Ideas
- Consistency is the Best Teacher: The most critical finding is that the quality of training data matters immensely for Transformers in robotics. Training a QDT on the erratic, "lucky" trajectories of standard QD leads to poor results. Training on the "clean," low-spread trajectories from ME-LS allows the model to truly understand the underlying physics.
- Interpolation Power: The QDT isn't just a compression tool; it's an interpolator. Because it operates in a continuous behavior space, it can successfully execute behaviors that were never explicitly present in its training data by "averaging" between known skills.
- Emergent Accuracy: Surprisingly, the QDT often achieves target behaviors more accurately than the individual policies that were used to train it. It effectively "denoises" the demonstrations it receives.
Key Results
- Superior Accuracy: In the Ant-Omni task, QDT(ME-LS) achieved an average distance to target of ~2.86 units, significantly outperforming the original MAP-Elites policies, which averaged ~6.38 units.
- Reduced Variance: The ME-LS algorithm reduced behavioral variance (spread) by nearly 40% compared to standard methods, creating a much more reliable training set.
- Data Efficiency: The model demonstrated strong interpolation capabilities, maintaining high accuracy even when trained on a dataset where 90% of the original behavior space had been removed.
Limitations and Future Work
While the QDT excels at interpolation, its extrapolation abilities—reaching behaviors far outside its training distribution—remain limited. The authors also noted that generalization is harder in gait-based spaces (like Halfcheetah) than in position-based spaces (like Ant). This is because small changes in gait timing can sometimes lead to radically different physical outcomes (like a backflip vs. a normal run), creating "gaps" in the behavior manifold that are difficult for the model to bridge. Future research may explore applying QDT to deterministic domains or finding ways to push the model's boundaries beyond the training data.
Summary updated