Localized Dynamics-Aware Domain Adaption for Off-Dynamics Offline Reinforcement Learning

Zhangjie Xia, Yu Yang, Pan Xu

TL;DR

This paper introduces LoDADA, a novel method for off-dynamics offline reinforcement learning that addresses the challenge of learning in a new environment with different dynamics using existing data. By clustering data points and analyzing localized dynamics differences, LoDADA effectively filters out irrelevant source data, leading to significantly improved policy performance compared to existing methods.

What Problem Does This Paper Address?

Reinforcement learning (RL) agents learn by interacting with an environment. However, in real-world scenarios like autonomous driving or healthcare, direct interaction can be dangerous or costly. This leads to the use of "offline RL," where agents learn from pre-collected datasets. A common challenge is "off-dynamics RL," where the agent needs to learn a policy for a target environment but has access to abundant data from a source environment with different transition dynamics (how the environment changes based on actions). Existing methods often try to fix this mismatch either by making global assumptions about the entire state-action space or by filtering data point-by-point, which can be computationally expensive or miss important localized similarities. This paper tackles the problem of efficiently and effectively transferring knowledge from a source domain to a target domain with different dynamics in an offline setting, specifically by addressing the limitations of global and pointwise filtering approaches.

Methods

The core of LoDADA is its Localized Dynamics-Aware Domain Adaptation strategy. It works in two main phases:

  1. Clustering and Localized KL Divergence Estimation:
    • The source and target datasets are merged, and K-means clustering is applied to the next states (s'). This groups similar outcomes together.
  2. Within each cluster, a classifier is trained to distinguish between source and target samples. This classifier's output is used to estimate the local KL divergence between the source and target dynamics for that specific cluster. KL divergence is a measure of how one probability distribution differs from another.
  3. Clusters with low KL divergence are considered more similar to the target domain.
  4. Adaptive Data Filtering and Policy Optimization:
    • Source data points are filtered based on the KL divergence of their assigned clusters. Samples from low-divergence clusters are retained with higher probability, while those from high-divergence clusters are filtered out. This is done in a fine-grained manner, allowing for selective retention.
  5. The retained source data is then used alongside the target data to train an RL policy. To further improve performance, LoDADA incorporates:
  6. Divergence-weighted losses: Source samples are assigned importance weights based on their estimated KL divergence, giving more influence to more relevant data.
  7. Policy regularization: A term is added to encourage the learned policy to stay close to the target domain's behavior policy, preventing it from deviating too much.

The method uses Implicit Q-Learning (IQL) as a backbone for policy optimization.

Datasets

The paper evaluates LoDADA on several standard benchmarks:

  • MuJoCo environments: Specifically, locomotion tasks like HalfCheetah, Ant, Walker2D, and Hopper. These environments are used with various types and levels of dynamics shifts (gravity, friction, morphology, and localized perturbations).
  • AntMaze: Navigation tasks with different map layouts.
  • Adroit: Manipulation tasks (pen and door) with kinematic and morphological shifts.

The source datasets are typically from D4RL, and target datasets are generated by behavior policies in dynamics-shifted environments.

Key Insights and Ideas

  • Localized Mismatch is Key: The paper's central insight is that dynamics mismatch is often not uniform across the entire state-action space. Focusing on localized differences through clustering allows for more nuanced and effective data filtering than global or purely pointwise methods.
  • Clustering Next States: Clustering based on next states (s') is a clever way to group transitions that lead to similar outcomes, thus implicitly capturing similar dynamics within those groups.
  • Balancing Filtering and Coverage: LoDADA aims to filter out problematic source data without discarding too much useful information, striking a balance between reducing bias and maintaining data coverage for robust learning.
  • Theoretical Justification: The paper provides theoretical bounds that motivate the clustering-based filtering approach, showing how reducing dynamics deviation leads to better performance guarantees.

Key Results

  • Consistent Performance Gains: LoDADA consistently outperforms state-of-the-art off-dynamics offline RL methods across various environments and dynamics shift types.
  • Significant Improvements:
    • On MuJoCo locomotion tasks with gravity and friction shifts, LoDADA achieved an average of 19.9% improvement over the second-best method.
  • On morphology shifts, it yielded a 32.7% improvement.
  • On localized perturbations, it showed a 29.3% improvement, highlighting its effectiveness in heterogeneous dynamics.
  • On AntMaze navigation tasks, it achieved an 8.4% improvement.
  • On Adroit manipulation tasks, it showed a substantial improvement over the second-best method.
  • Robustness: LoDADA demonstrates strong robustness to different types and levels of dynamics shifts, including complex morphology and kinematic changes.
  • Computational Efficiency: While not the absolute fastest, LoDADA offers a good balance between performance and runtime compared to methods like OTDF, which scales poorly with data size.

Limitations and Future Work

  • Hyperparameter Sensitivity: The paper notes that LoDADA can be sensitive to hyperparameters like the number of clusters (K) and the policy regularization weight (λ). While they provide reasonable defaults, optimal values might vary across tasks.
  • Future Directions: The authors suggest exploring LoDADA's effectiveness in real-world environments and investigating more principled clustering mechanisms to better capture fine-grained state-action structures. They also mention the potential for further research into adapting the method for more complex dynamics shifts.

Summary updated

BibTeX
@inproceedings{xia2026localized,
  author = {Zhangjie Xia and Yu Yang and Pan Xu},
  title = {{Localized Dynamics-Aware Domain Adaption for Off-Dynamics Offline Reinforcement Learning}},
  booktitle = {CAO @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=8qQwXDeLp8},
}
Figure