TL;DR
Imagine teaching a single robot 50 different chores just by showing it old, messy video logs—no live practice allowed. Most researchers try to build bigger, fancier brains for the robot, overlooking the fact that the training logs themselves are chaotic and poorly packaged. DaCe-DT flips the script, dynamically tailoring how historical data is retrieved, trimmed, and stitched together at every decision step, boosting task success rates by over 13 percentage points on imperfect data.
What Problem Does This Paper Address?
In Offline Multi-Task Reinforcement Learning (Offline MTRL), the goal is to train a single generalist policy across many tasks using only static, pre-recorded datasets. A popular tool here is the Decision Transformer (DT), which treats RL like text generation: give it a "prompt" (a snippet of a past trajectory to show what task it’s doing) and a target score (Return-to-Go, or RTG), and it predicts the next best action.
Existing methods treat prompts in a rigid, one-size-fits-all way, creating three major data bottlenecks:
- Prompt Length Mismatch: Simple tasks (like reaching a button) only need a tiny hint; long prompts distract the model's attention. Complex multi-stage tasks (like pushing a coffee mug) starve without longer historical context.
- Semantic Irrelevance: Standard methods grab the final K steps of a high-scoring trajectory as the prompt. If the agent is currently at the beginning of a task, showing it the end acts like noise rather than helpful guidance.
- Broken Trajectories: Offline logs are often full of half-good attempts (e.g., Trajectory A starts great and fails; Trajectory B starts poorly and finishes strong). Standard DTs can't easily "stitch" A's beginning to B's ending because jumping to a higher target score mid-stream pushes the model out-of-distribution.
Methods
Instead of overhauling the Transformer architecture, DaCe-DT introduces three coordinated, data-centric mechanisms built atop a standard GPT-2 backbone:
- Length-Gated Prompt Masking (LGPM): Learns a single differentiable parameter per task that acts like a sliding curtain—an attention mask that hides older, redundant prompt tokens. Combined with a sparsity penalty, each task automatically settles on its "minimal sufficient context."
- Retrieval-Augmented Prompt Construction (RAPC): Rather than using a static prompt, DaCe-DT builds a search index of high-return trajectory slices using the model's own GPT-2 embedding layer. At each step, it dynamically retrieves the past snippet most semantically similar to the agent's current situation.
- Value-Adaptive Return Calibration (VARC): Before training the policy, the authors train a separate Transformer value function using expectile regression (a way to estimate upper-bound achievable scores rather than averages, with a learnable conservatism dial per task). At test time, VARC checks if a better outcome is suddenly within reach; if so, it bumps up the target RTG—unlocking trajectory stitching—and filters RAPC to only retrieve prompts matching that higher ambition.
Datasets
- Meta-World (MT5, MT30, MT50): Robotic manipulation benchmarks spanning 5, 30, and 50 distinct tasks with randomized goals. Tested under two regimes: Near-optimal (mixed expert and random SAC-Replay logs) and Sub-optimal (early-stage logs keeping only 50% of expert demos).
- Continuous Control Transfer: Cheetah-dir, Cheetah-vel, and Ant-dir benchmarks for testing generalization to unseen tasks.
- Custom Maze2D: Eight custom maze layouts with strictly sparse rewards to stress-test retrieval without dense reward signals.
Key Insights and Ideas
- One prompt size fits nobody: Sweeping prompt lengths reveals wildly opposite needs across tasks. On Reach, length $K=5$ hits 100% success while $K=30$ drops to 50%. On Coffee-Push, $K=5$ gets 20%, whereas $K=30$ hits 80%.
- Bad prompts are essentially noise: Standard "last-K" prompts have a dismal 0.361 cosine similarity to the agent's active trajectory—worse than random sampling (0.462)! RAPC boosts alignment to 0.741, accelerating training and improving final success by 9.6% on its own.
- Self-hosted retrieval works: You don't need an external encoder for RAG in RL; once warmed up, the policy's own token embeddings are rich enough to fetch stage-aligned behavioral hints, doubling Prompt-DT's score (36.9 vs. 18.2) even in sparse-reward mazes.
Key Results
DaCe-DT consistently beats state-of-the-art offline MTRL baselines (like HarmoDT and MTDIFF) and even surpasses several online MTRL methods:
- Meta-World MT30: Achieves 93.33% success on near-optimal data (+11.73 percentage points over HarmoDT) and 75.67% on sub-optimal data (+13.34 points).
- Meta-World MT50: Reaches 88.40% (near-optimal, +9.60 points) and 64.00% (sub-optimal, +6.50 points).
- Unseen Task Transfer: Outperforms baselines by 9.27% in average return when adapting to held-out locomotion tasks using expert prompt snippets.
- Clean Synergy: On MT30, adding LGPM, RAPC, or VARC individually lifts the 71.3% baseline to 83.7%, 85.3%, and 82.6%, respectively; combining all three hits 93.3%.
Limitations and Future Work
While the paper does not include a dedicated limitations section, two explicit boundaries are noted in the methodology and experiments:
- Task-level (not state-level) prompt lengths: LGPM learns a fixed optimal prompt length per task during training; it does not dynamically expand or shrink the prompt window step-by-step within a single evaluation rollout.
- Reliance on demonstrations for transfer: When generalizing to unseen tasks, DaCe-DT requires a budget of expert demonstration segments to build its retrieval index—it is not designed for strict zero-shot generalization without demonstrations.
Summary updated