TL;DR
Offline off-dynamics reinforcement learning allows agents to learn in a target domain with scarce data by borrowing data from a dynamics-shifted source domain. This paper introduces REAG (Return Augmented Decision Transformer), which extends Return-Conditioned Supervised Learning (RCSL) by directly augmenting and aligning trajectory return distributions rather than individual rewards. Backed by theoretical sample-complexity guarantees, REAG—especially its moment-matching variant $\text{REAG}^*_{\text{MV}}$—significantly boosts performance across multiple Decision Transformer architectures.
What Problem Does This Paper Address?
In many high-stakes sequential decision-making domains (such as autonomous driving or healthcare), gathering vast amounts of real-world interaction data is costly, unsafe, or impossible. Practitioners often collect data in simulators (source domains), but discrepancies in physics or dynamics introduce a "sim-to-real" gap.
While traditional offline reinforcement learning (RL) algorithms grounded in dynamic programming handle dynamics shifts by modifying individual rewards (e.g., DARC and DARA), these approaches do not translate cleanly to Return-Conditioned Supervised Learning (RCSL) frameworks like the Decision Transformer (DT). DT does not learn value functions via Bellman backups; instead, it conditions directly on a desired return-to-go ($g$). Reward augmentation methods assume a single optimal policy trajectory distribution, whereas DT learns an entire family of policies indexed by varying return targets. This paper bridges the gap by deriving return-level augmentation techniques explicitly designed for DT-style models.
Methods
The authors propose the Return Augmented (REAG) framework, which replaces the source trajectory returns $g(\tau)$ with transformed returns $\psi(g(\tau))$ to match the target environment's return-to-go distribution:
$$\pi^S = \arg\min_\pi -\sum_{\tau \in \mathcal{D}^S} \sum_{1 \le t \le H} \log \pi(a_t \mid s_t, \psi(g(s_t)))$$
The paper introduces and compares two implementations:
- $\text{REAG}^*_{\text{Dara}}$ (Reward-level mapping): Adapts the classifier-based dynamics-aware reward augmentation of DARA. It trains binary classifiers ($q_{sas}, q_{sa}$) to detect whether transitions originate from the source or target domain, adding the log-density ratio directly into the cumulative trajectory return: $$\psi(g(s_t)) = \sum_{h=t}^H r_h + \eta \sum_{h=t}^H \Delta r(s_h, a_h, s_{h+1})$$
- $\text{REAG}^*_{\text{MV}}$ (Direct Return Distribution Matching): Directly aligns the cumulative distribution functions of the returns using a Gaussian/Laplace moment-matching approximation: $$\psi(g^S) := \frac{g^S - \mu^S(s, a)}{\sigma^S(s, a)} \cdot \sigma^T(s, a) + \mu^T(s, a)$$ The state-action return means ($\mu^S, \mu^T$) and variances ($\sigma^S, \sigma^T$) are estimated by training Conservative Q-Learning (CQL) models on the source and target datasets. To prevent destabilization from extreme variance ratios $\frac{\sigma^T(s,a)}{\sigma^S(s,a)}$, a clipping bound $[\theta_1, \theta_2]$ is enforced.
Theoretical Guarantee: The authors prove (Theorem 4.5) that when the source dataset size is much larger than the target dataset ($N^S \gg N^T$), REAG reduces the suboptimality gap from $O((N^T)^{-1/4})$ to $O((N^S)^{-1/4})$, recovering the sample efficiency of training directly in the target domain without a dynamics shift.
Datasets
The authors evaluated their approaches on standard D4RL Gym-MuJoCo locomotion benchmarks:
- Environments: Walker2D, Hopper, and HalfCheetah.
- Dataset Qualities: Medium (M), Medium-Replay (M-R), and Medium-Expert (M-E).
- Dynamics Shifts (Source Domain):
- BodyMass Shift: Scaling agent mass (e.g., altering torso/body mass parameters in the MuJoCo XML).
- JointNoise Shift: Adding uniform random perturbation $\in [-0.05, 0.05]$ to actions during data collection.
- Kinematic Shift (Ablation): Constraining joint motion ranges (e.g., restricting the HalfCheetah back thigh joint from $[-0.52, 1.05]$ to $[-0.0052, 0.0105]$).
- Target Splitting: The target dataset was partitioned into $10\text{T}$ (full dataset) and $1\text{T}$ ($1/10\text{th}$ scale). Unlike prior work that selected the tail timesteps of replay buffers (which introduces quality bias), the authors used uniform trajectory sampling to create a representative $1\text{T}$ dataset.
Key Insights and Ideas
- Return matching beats reward matching in sequence models: $\text{REAG}^*_{\text{MV}}$ consistently achieved better stability and higher scores than $\text{REAG}^*_{\text{Dara}}$. Directly transforming return-to-go respects the conditioning mechanics of Transformers across multiple policy modes far better than per-step reward tweaking.
- Strict temporal consistency is unnecessary: Standard DT enforces $R_{t+1} - R_t = -r_t$. Surprisingly, an ablation comparing $\text{REAG}^*_{\text{MV}}$ to a variant enforcing strict consistency from $t=1$ showed that independently augmenting each timestep's return without enforcing consistency yielded superior performance.
- Robustness to Q-function inaccuracies: Despite relying on auxiliary offline CQL models to estimate mean returns and variances, REAG's performance remained relatively insensitive across different CQL conservative penalties ($\alpha$) and sample budgets.
Key Results
Experiments were integrated across three DT architectures—Decision Transformer (DT), Reinformer, and Q-regularized Transformer (QT)—and compared against conventional offline RL baselines (BEAR, AWR, BCQ, CQL, MOPO, and their DARA variants) and domain-adaptation methods (H2O, DFDT, IGDF):
- Overall Benchmark Ranking: Across 22 evaluated methods, $\text{REAG}^{\text{QT}}_{\text{MV}}$ achieved the best normalized average rank score of 4.06, substantially outperforming standard QT (6.11), non-augmented DT (12.44), and DARA-augmented CQL (10.67).
- Scarcity Compensation: On Walker2D Medium with BodyMass shift, standard DT scored 78.77 on $1\text{T}10\text{S}$; adding $\text{REAG}^*_{\text{MV}}$ boosted it to 80.86 (surpassing the full target dataset baseline of $10\text{T}$ at 79.70).
- High-Shift Resilience: In Hopper Medium-Expert under BodyMass shift, standard DT scored 33.55, while $\text{REAG}^{\text{DT}}_{\text{MV}}$ raised performance to 52.87 (a >57% relative improvement).
Limitations and Future Work
- State-Action Overlap Dependency: If the source and target domains exhibit limited state-action overlap, return relabeling can introduce bias. This failure mode was observed on the Walker2D Medium-Replay dataset with Reinformer, where mixed-policy heterogeneity degraded performance.
- Gaussian Distribution Assumption: The Laplace/Gaussian approximation assumes unimodal, symmetric return distributions. While verified on D4RL locomotion tasks, this assumption may fail in complex, multimodal, or discrete-reward environments.
- Computational Overhead: Training auxiliary CQL models on both target and source datasets to estimate moments adds extra offline compute (~2.5 target GPU-hours and ~9.4 source GPU-hours on an RTX A5000).
- Future Directions: Validating REAG in visually complex or sparse-reward settings, and investigating non-parametric density estimation to relax the Gaussian assumption.
Summary updated