Trust Guided Decision Transformer

Chainesh Gautam, Raghuram Bharadwaj Diddigi, Chandramouli Kamanchi, Pankaj Dayama, Sumanta Mukherjee, Kameshwaran Sampath

TL;DR

The Trust Guided Decision Transformer (TGDT) addresses a major flaw in Decision Transformers: performance collapse during long rollouts caused by "context drift." By using next-state prediction error as a real-time reliability sensor, TGDT filters out unreliable history lengths and only allows a critic to rank actions generated from "trusted" contexts, significantly improving stability and returns in offline reinforcement learning.

What Problem Does This Paper Address?

Decision Transformers (DTs) treat reinforcement learning as a sequence modeling problem, predicting actions based on a "context" of past states, actions, and rewards. While they perform well on offline data, they often fail during live evaluation rollouts.

The authors identify the culprit as rollout context mismatch. During evaluation, the model generates its own history one step at a time. Eventually, these self-generated sequences drift away from the distribution of the offline training data. When the context becomes "out-of-distribution," the model's predictions become unconstrained and unreliable. Existing fixes usually focus on improving action quality (using critics or regularization), but they ignore a fundamental "garbage in, garbage out" problem: if the context itself is untrustworthy, even the best critic can't save the decision.

Methods

TGDT introduces a "trust-then-value" paradigm. It consists of two main phases:

  1. Augmented Training: The DT is trained with three extra components:
  2. Internal Reliability Head: A module that predicts the next state. High prediction error serves as a signal that the current context is unreliable.
  3. Frozen Critic: An offline critic (trained via Implicit Q-Learning) used to rank candidate actions.
  4. Behavior-Regularized Action Head: This keeps predicted actions near the offline data distribution, ensuring that prediction errors reflect context drift rather than just "weird" actions.
  5. Trust-Filtered Context Selection (Inference): At each timestep, the model doesn't just look at the full history. Instead, it evaluates several context suffixes (e.g., the last 1, 5, 10, or 20 steps).

  6. The Filter: It calculates a rolling next-state prediction error for each suffix. If a suffix's error exceeds a threshold (calibrated using the 95th percentile of errors on held-out offline data), it is rejected.

  7. The Selection: Among the remaining "trusted" suffixes, the frozen critic selects the action with the highest expected value. If all long contexts are rejected, it falls back to the shortest, most robust context ($L=1$).

Datasets

The authors evaluated TGDT on the standard D4RL (Datasets for Deep Data-Driven Reinforcement Learning) benchmark, specifically:

  • Gym Tasks: HalfCheetah, Hopper, and Walker2d (locomotion).
  • Maze2D & AntMaze: Navigation tasks requiring long-horizon "stitching" of trajectories.
  • Adroit & Kitchen: Complex dexterous manipulation and multi-step tasks.

Key Insights and Ideas

  • Prediction Error as a Precursor: The authors found that a rise in next-state prediction error consistently precedes a collapse in performance. This error acts as a "canary in the coal mine" for context drift.
  • Trust Before Value: This is the paper's core philosophical shift. Previous "elastic" methods used a critic to pick the best context length. TGDT argues that the critic's opinion is irrelevant if the context is unreliable. Filtering for trust first prevents the agent from confidently taking a "high-value" action that is actually based on a hallucinated history.
  • Elasticity, Not Just Resets: Unlike "hard reset" methods that simply wipe the memory when things go wrong, TGDT is "elastic." It can temporarily shorten its context to regain stability and then return to longer contexts once the rolling error drops.

Key Results

TGDT consistently outperforms vanilla DTs and value-guided baselines, particularly in tasks where long-horizon planning is critical.

  • Maze2D & AntMaze: TGDT showed the most significant gains here. For example, on antmaze-medium-diverse-v0, TGDT achieved a score of 60.0, doubling the performance of the next best sequence-modeling baseline (VDT at 30.0).
  • Reducing Failure Runs: In Maze2D-medium, TGDT reduced the length of "above-threshold" high-error stretches by approximately 8x compared to critic-only selection.
  • Efficiency: Despite evaluating multiple context lengths, the computational overhead is a small constant factor, making it practical for real-time use.

The table below highlights TGDT's competitive performance across various D4RL domains:

D4RL performance comparison across Gym, Adroit, Kitchen, Maze2D, and AntMaze tasks.

Limitations and Future Work

  • Exchangeability Assumption: The reliability threshold is calculated on offline data (teacher-forced), but used in a closed-loop rollout. This violates the "exchangeability" assumption required for formal conformal prediction guarantees. The authors suggest "Adaptive Conformal Inference" as a future path to fix this.
  • State-Based Focus: The current work focuses on state-based observations. Extending this to high-dimensional image-based inputs or non-stationary environments remains an open challenge.
  • Compute Scalability: While the overhead is currently manageable ($|L|=4$), the cost scales linearly with the number of context lengths evaluated, which could be a bottleneck for massive models or very high-frequency control.

Summary updated

BibTeX
@inproceedings{gautam2026trust,
  author = {Chainesh Gautam and Raghuram Bharadwaj Diddigi and Chandramouli Kamanchi and Pankaj Dayama and Sumanta Mukherjee and Kameshwaran Sampath},
  title = {{Trust Guided Decision Transformer}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=XQWFbB5mIO},
}
Figure