[Paper Review] Off-Dynamics Reinforcement Learning: Training for Transfer with Domain Classifiers
This paper proposes DARC (Domain Adaptation with Rewards from Classifiers), a method that improves policy transfer in reinforcement learning by modifying the reward function using classifiers to distinguish source- from target-domain transitions. By penalizing source-like dynamics, DARC enables policies trained in a safer source domain to generalize effectively to a target domain with different dynamics, achieving near-optimal performance with theoretical guarantees under mild assumptions.
We propose a simple, practical, and intuitive approach for domain adaptation in reinforcement learning. Our approach stems from the idea that the agent's experience in the source domain should look similar to its experience in the target domain. Building off of a probabilistic view of RL, we formally show that we can achieve this goal by compensating for the difference in dynamics by modifying the reward function. This modified reward function is simple to estimate by learning auxiliary classifiers that distinguish source-domain transitions from target-domain transitions. Intuitively, the modified reward function penalizes the agent for visiting states and taking actions in the source domain which are not possible in the target domain. Said another way, the agent is penalized for transitions that would indicate that the agent is interacting with the source domain, rather than the target domain. Our approach is applicable to domains with continuous states and actions and does not require learning an explicit model of the dynamics. On discrete and continuous control tasks, we illustrate the mechanics of our approach and demonstrate its scalability to high-dimensional tasks.
Motivation & Objective
- To address the challenge of transferring policies from a source domain (e.g., simulator) to a target domain with different dynamics, where direct training in the target domain is costly or unsafe.
- To develop a method that compensates for dynamics differences without modeling transition probabilities, enabling scalable transfer in high-dimensional control tasks.
- To provide a theoretically grounded approach that guarantees near-optimal performance in the target domain under a lightweight assumption.
- To demonstrate that reward modification via learned classifiers can implicitly learn safe and effective behaviors without explicit reward shaping.
Proposed method
- The method uses two binary classifiers to distinguish transitions from the source domain versus the target domain, trained on state-action-next-state tuples.
- The logarithm of the density ratio estimated by these classifiers is used to modify the reward function, penalizing transitions that resemble source-domain dynamics.
- The modified reward function is derived from a variational lower bound on the expected return, ensuring alignment between source and target domain policies.
- The approach does not require explicit modeling of dynamics or transition probabilities, making it scalable to high-dimensional continuous control tasks.
- The method is applied during training in the source domain, with the goal of producing a policy that generalizes well to the target domain.
- The classifier is conditioned on both state and action, which is critical for distinguishing dynamics differences when marginal state distributions are similar.
Experimental results
Research questions
- RQ1Can we achieve effective domain adaptation in reinforcement learning by modifying the reward function based on learned classifiers of source vs. target transitions?
- RQ2Under what conditions does reward modification via classifier-based density ratio estimation lead to a near-optimal policy in the target domain?
- RQ3How does conditioning the classifier on both state and action improve performance compared to action-agnostic approaches in dynamics adaptation?
- RQ4Can this method generalize to high-dimensional continuous control tasks without explicit dynamics modeling?
- RQ5Does the method implicitly learn safe behaviors even without explicit safety rewards?
Key findings
- DARC successfully transfers policies from a source domain to a target domain with different dynamics, achieving near-optimal performance on both discrete and continuous control tasks.
- On a 111-dimensional Ant task, DARC scaled effectively without requiring dynamics model estimation, outperforming model-based baselines in terms of sample efficiency and stability.
- In a gridworld environment with reversed action effects, DARC succeeded in 80% of trials, while MATL—lacking action conditioning—failed in 100% of trials.
- The method enabled agents to avoid unsafe behaviors in the source domain that would lead to episode termination in the target domain, suggesting emergent safety without explicit reward shaping.
- Experiments showed that DARC outperformed baselines such as MATL and standard RL on all evaluated tasks, including those with stochastic policies and subtle dynamics shifts.
- The theoretical analysis guarantees that under a lightweight assumption, DARC yields a policy with performance close to optimal in the target domain.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.