TL;DR
Hyper-Decision Transformer (HDT) is a novel framework that enables large-scale Decision Transformers to adapt to brand-new tasks using just a handful of demonstrations. By using a "hyper-network" to initialize tiny adapter modules, HDT achieves state-of-the-art performance while fine-tuning only 0.5% of the model's parameters, even when expert actions are completely missing from the demonstrations.
The Generalization Gap in Decision Transformers
Decision Transformers (DT) have revolutionized offline reinforcement learning by treating policy generation as a sequence modeling problem. However, they face a significant "generalization gap": when a pre-trained DT encounters a task it hasn't seen before (e.g., a robot trying to open a new type of drawer), it often fails to adapt effectively.
Standard solutions usually involve fine-tuning the entire model on new data. This is problematic for two main reasons:
- Computational Cost: Modern transformers are massive. Updating millions of parameters for every new task is slow, expensive, and risks catastrophic forgetting of previously learned skills.
- Data Scarcity: In the real world, we might only have a few "videos" (state-only demonstrations) of a task without knowing exactly what actions the expert took. This is known as Learning-from-Observation (LfO), and most existing adaptation methods struggle when action labels are missing.
HDT aims to make adaptation both parameter-efficient (updating very few weights) and data-efficient (learning from very few, potentially action-free, examples).
The Hyper-Decision Transformer Architecture
The authors introduce three core components to augment the standard Decision Transformer architecture:
- The Base DT: A large, frozen transformer pre-trained on a diverse set of tasks to provide a foundation of general "world knowledge."
- Adaptation Modules (Adapters): Small bottleneck layers inserted into each transformer block. These include FiLM (Feature-wise Linear Modulation) layers that help the model selectively manipulate features based on the specific task at hand.
- The Hyper-network: This is the "brain" of the adaptation process. It takes a few demonstrations (sequences of states and rewards) as input and generates the initial weights for the Adapters.
The Workflow: When a new task arrives, the Hyper-network looks at the demonstrations and provides a "warm start" by initializing the Adapters. Then, the agent performs a small number of online trials, and only the Adapters are fine-tuned. The massive base model remains entirely frozen, preventing the loss of its original, generalized skills.
Evaluation Benchmarks
The researchers evaluated HDT on two primary benchmarks:
- Meta-World (ML45): A challenging suite of 45 robotic manipulation tasks (like pushing buttons, opening doors, and picking up objects). They tested the model on 5 completely unseen tasks involving new objects or different goals.
- D4RL Pointmaze: A locomotion benchmark where an agent must navigate a maze to reach varying goal positions.
Key Insights and Performance
- Hyper-networks as Meta-Learners: Instead of starting adapters from scratch (random initialization), the hyper-network learns the pattern of how tasks differ. This allows it to provide a highly effective starting point for the weights, drastically reducing the number of trials needed to succeed.
- Action-Free is Enough: One of the most surprising findings is that the hyper-network can generate effective initializations even if it only sees the results of an expert's behavior (states) rather than the specific controls (actions). This makes HDT highly applicable to "Learning-from-Observation" scenarios.
- The Power of 0.5%: The authors show that you don't need to change the whole "brain" to learn a new skill. By tweaking just 0.5% of the parameters (the adapters), the model can adapt faster and more reliably than if it tried to update everything.
- Superior Success Rates: In the "Meta-LfO" setting (no expert actions provided), HDT achieved an average success rate of 80%, while the best baseline (Prompt-DT) struggled at around 9%.
- Speed of Adaptation: HDT typically found a successful strategy within 20 to 80 online episodes, whereas standard fine-tuning methods often required thousands.
- Parameter Efficiency: HDT updated only 69K parameters compared to the 13M parameters required for full fine-tuning of the base DT, yet it reached higher success rates faster.
Limitations and Future Directions
While highly effective, HDT's performance is heavily tied to the diversity of its pre-training tasks. If the training set is too narrow, the hyper-network may not generalize well to truly "wild" new environments. Additionally, while efficient, HDT still requires some online trials to reach peak performance in the most complex tasks (like "hand-insert").
For future work, the authors suggest scaling HDT to handle high-dimensional inputs, such as raw camera images (egocentric video). This would move the framework closer to seamless integration in real-world robotic applications.
Summary updated