NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Predictive Coding for Decision Transformer

Tung Minh Luu, Donghoon Lee, Chang D. YooOpenReview 2024

TL;DR

This paper introduces Predictive Coding for Decision Transformer (PCDT), a novel framework for offline reinforcement learning that conditions policies on "predictive codings" derived from future trajectory information, rather than just historical returns. PCDT significantly improves performance on challenging goal-conditioned tasks, especially those requiring temporal compositionality, by better guiding policy learning with future expectations.

What Problem Does This Paper Address?

Offline reinforcement learning (RL) aims to train agents from pre-collected datasets without further interaction with the environment. A recent successful approach, the Decision Transformer (DT), frames this as a supervised learning problem, conditioning policies on desired future returns. However, DT struggles with complex scenarios like long-horizon tasks and datasets with sparse or suboptimal rewards. This is because relying solely on returns for conditioning is inefficient for guiding policy learning, particularly when the agent needs to learn to "stitch" together behaviors from different demonstrations (temporal compositionality). This limitation is especially pronounced in goal-conditioned RL, where the agent must learn to achieve various goals from a single dataset.

Methods

The core innovation of PCDT is its use of "predictive codings" as the conditioning signal for the Decision Transformer. Instead of using the return-to-go, PCDT first trains a trajectory autoencoder. This autoencoder, built with bidirectional transformers, takes a sequence of past states and a target goal as input. Crucially, it's trained to not only reconstruct the input states but also to predict future states. The latent representations from this autoencoder, the "predictive codings," are then used to condition the main policy network (a causal transformer, similar to DT). This allows the policy to reason about future states and behaviors, providing a more robust signal for learning, especially in unstructured or sparse-reward environments. The training process involves two stages: first, training the trajectory autoencoder, and then training the policy using the learned predictive codings.

Datasets

The paper evaluates PCDT on eight datasets from two challenging environments:

  • AntMaze: Long-horizon navigation tasks with sparse rewards, requiring an 8-DoF Ant robot to reach a goal.
  • FrankaKitchen: Long-horizon manipulation tasks, involving a 9-DoF Franka robot completing subtasks like closing a microwave.

Additionally, PCDT is validated on a real-world Sawyer robot performing a goal-reaching task. The datasets are noted to be suboptimal and undirected, meaning demonstrations may not always be optimal for the evaluation tasks.

Key Insights and Ideas

  • Future prediction as a better signal than returns: The paper strongly suggests that conditioning on predicted future states (via predictive codings) is more effective for policy learning than conditioning on cumulative future returns, especially for tasks requiring complex behavior.
  • Bridging the gap in temporal compositionality: PCDT's ability to "look ahead" and predict future states directly addresses the temporal compositionality challenge that DT faces, enabling better stitching of behaviors.
  • Leveraging unstructured data: By moving away from return conditioning, PCDT can effectively learn from datasets that are suboptimal or where rewards are sparse and uninformative, making it more applicable to real-world scenarios.
  • Generalization through prediction: The predictive codings seem to encourage generalization by forcing the model to understand the underlying dynamics and future outcomes, rather than just memorizing specific return-achieving trajectories.

Key Results

  • State-of-the-art performance: PCDT achieves performance on par with or surpassing existing value-based and transformer-based methods across eight benchmark datasets.
  • Significant improvement over baselines: PCDT shows a substantial improvement of 26.1% over the top-performing value-based method (IQL) and significant gains on challenging datasets requiring stitching.
  • Robotics validation: The method demonstrates effectiveness on a real-world Sawyer robot, highlighting its practical applicability.
  • Ablation studies confirm effectiveness: Varying the length of future states used for prediction shows that longer prediction horizons generally lead to better performance, and future prediction is crucial for good performance.

Limitations and Future Work

  • Action-free data utilization: The authors mention that their predictive coding framework can be trained using only state data, which could allow for leveraging large amounts of action-free data. This is noted as a direction for future work.
  • Hyperparameter sensitivity: While generally robust, the paper notes that certain hyperparameters, like the number of transformer layers, can impact performance, particularly on more challenging datasets.
  • Computational cost: Training a trajectory autoencoder in addition to the policy might increase computational requirements, though this is not explicitly detailed as a limitation.

Summary updated

BibTeX
@misc{luu2024predictive,
  author = {Tung Minh Luu and Donghoon Lee and Chang D. Yoo},
  title = {{Predictive Coding for Decision Transformer}},
  year = {2024},
  eprint = {2410.03408},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.03408},
  howpublished = {OpenReview},
}
Figure