Residual Q-Learning: Offline and Online Policy Customization without Value

Imitation Learning (IL) is a widely used framework for learning imitative behavior from demonstrations. It is especially appealing for solving complex real-world tasks where handcrafting reward function is difficult, or when the goal is to mimic human expert behavior. However, the learned imitative policy can only follow the behavior in the demonstration. When applying the imitative policy, we may need to customize the policy behavior to meet different requirements coming from diverse downstream tasks. Meanwhile, we still want the customized policy to maintain its imitative nature. To this end, we formulate a new problem setting called policy customization. It defines the learning task as training a policy that inherits the characteristics of the prior policy while satisfying some additional requirements imposed by a target downstream task. We propose a novel and principled approach to interpret and determine the trade-off between the two task objectives. Specifically, we formulate the customization problem as a Markov Decision Process (MDP) with a reward function that combines 1) the inherent reward of the demonstration; and 2) the add-on reward specified by the downstream task. We propose a novel framework, Residual Q-learning, which can solve the formulated MDP by leveraging the prior policy without knowing the inherent reward or value function of the prior policy. We derive a family of residual Q-learning algorithms that can realize offline and online policy customization, and show that the proposed algorithms can effectively accomplish policy customization tasks in various environments. Demo videos and code are available on our website: https://sites.google.com/view/residualq-learning.

Paper

References (60)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer sftZ4/10 · confidence 5/52023-07-02

Summary

This paper proposes a problem setting called policy customization, which involves training a policy that inherits the characteristics of a prior policy while satisfying additional requirements imposed by a target downstream task. They present a novel approach to interpreting and determining the two task objectives' trade-offs. Specifically, they formulate the customization problem as a Markov Decision Process (MDP) with a reward function that combines the inherent reward of the demonstration and the additional reward specified by the downstream task. The authors introduce a new framework called Residual Q-learning that leverages the prior policy to solve the formulated MDP without knowledge of the prior policy's inherent reward or value function. They derive a family of residual Q-learning algorithms capable of offline and online policy customization, demonstrating their effectiveness in accomplishing policy customization tasks in various environments.

Strengths

1. The paper introduces a novel problem setting, policy customization, which addresses an important issue in imitation learning. This innovative approach better meets the personalized requirements of imitation policies in practical applications. 2. The paper provides experimental validation by conducting experiments in various environments, demonstrating the effectiveness of the proposed algorithms in achieving policy customization for real-world tasks. These experiments verify the practicality and adaptability of the methodology, providing strong support for further research and applications. 3. The proposed methodology in the paper is shown to be feasible and scalable. It does not rely on specific assumptions or constraints, making it applicable to different scenarios and tasks. The scalability of the approach allows for its extension and adaptation to more complex and diverse environments.

Weaknesses

1. The derivation process in Equation 5 lacks clarity, particularly the transition from eq. 5b to eq. 5c and eq. 5d. It is necessary to provide a more detailed and step-by-step derivation to enhance the understanding of the readers. A comprehensive explanation of the intermediate steps and the mathematical transformations involved would greatly improve the transparency and rigor of the derivations. 2. While the proposed setting in the paper is intriguing, there is a need for further clarification on the rationale behind its adoption. It is unclear why the chosen measure is employed, and it would be beneficial to provide a clear justification for this decision. Additionally, if a prior policy is available, elaborating on how policy expansion can be utilized to address the problem posed in the paper would help readers grasp the underlying reasoning. 3. The experimental evaluation in this paper is limited in its scope. To substantiate the claims made, it is recommended to conduct more comprehensive experiments and provide extensive results. Expanding the experimental analysis with diverse scenarios, benchmark datasets, and evaluation metrics would contribute to a more thorough evaluation and provide stronger evidence to support the proposed approach. 4. The derived forms of Residual SQL and SAC in Eq. 7-10 appear to be similar to the original formulations. It is necessary to provide a clear explanation of how to interpret and understand the derived results. Highlighting the differences, if any, and elucidating the implications of the derived forms compared to the original ones would enhance the clarity and significance of the proposed modifications.

Questions

Please refer to the Weakness.

Rating

4: Borderline reject: Technically solid paper where reasons to reject, e.g., limited evaluation, outweigh reasons to accept, e.g., good evaluation. Please use sparingly.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

2 fair

Presentation

3 good

Contribution

2 fair

Limitations

Please refer to the Weakness.

Reviewer ePZC8/10 · confidence 4/52023-07-04

Summary

This paper proposes a new problem setting called pulicy customization, where the goal is to train a policy that inherits the characteristics of a prior policy while satisfying some additional requirements imposed by a downstream task. To solve this problem, this paper uses a novel and principled framework by formulating it as a MDP with a reward function that combines the inherent reward of the demonstration and the add-on reward of the downstream task. The framework is consistent with many prior RL algorithms, and leads to residual Q-learning, residual SAC, and residual ME MCTS. A comprehensive evaluation of the proposed residual Q-learning framework is conducted on various types of environments, and algorithms with residual Q outperform the prior RL or IL policies in all of them.

Strengths

- It introduces a novel and general problem setting of policy customization that can be applied to various domains and tasks. - It proposes a principled and flexible framework of residual Q-learning that can customize a policy without knowing the reward or value function of the prior policy, which can be easily added to existing algorithms. - Following the previous point, it provides a family of algorithms that can learn the residual Q-function and customize the policy. - For experiments, it demonstrates the effectiveness and robustness of the residual Q-learning framework on both discrete and continuous tasks, showing that the customized policies can inherit the characteristics of the prior policy while satisfying the downstream task requirements.

Weaknesses

While this paper has some vague weaknesses and limitations, they are fully discussed in Section 6 (Discussion and Limitations). So I would like to leave blank here.

Questions

There is no direct questions but I am curious about the following points. - Does the performance of residual-Q highly rely on the performance of the prior policy? For example, if the prior policy is learned from a mediocre dataset in an offline manner, will the residual Q-learning solve the following downstream task? - What is the relationship between the policy customization problem and the continuous learning problem? Is the policy customization a special case of continuous RL or transfer RL?

Rating

8: Strong Accept: Technically strong paper, with novel ideas, excellent impact on at least one area, or high-to-excellent impact on multiple areas, with excellent evaluation, resources, and reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

4 excellent

Contribution

3 good

Limitations

Yes.

Reviewer QjWD7/10 · confidence 4/52023-07-05

Summary

<< I have read the authors' rebuttal and have raised my score based on the discussion >> This paper introduces a novel problem setting, named 'policy customization,' which seeks to train a new policy that inherits the properties of an existing pre-trained policy and meets additional requirements from a given downstream task. The policy customization is formulated as a Markov Decision Process (MDP), with a reward function that combines the inherent reward of the demonstration and an additional reward defined by the downstream task. To address the challenge of solving the MDP without knowledge of the underlying reward of the imitative policy, the paper proposes a novel Residual Q-Learning framework. This includes defining a residual Q-function that, when combined with the log-likelihood of the prior policy, can construct the maximum-entropy policy for the target MDP. The paper presents two model-free policy customization algorithms, namely, 'residual soft Q-learning' and 'residual soft actor-critic' and empirically demonstrates that the proposed residual Q-learning algorithms effectively customize the policies toward the additional task objective, while preserving their performance on the original tasks for which the prior policies were trained.

Strengths

S1. Clarity of Presentation: The paper is commendably articulated, offering clear motivations for the research and a thorough explanation of the proposed solution. The technical details are presented in a digestible manner, which significantly enhances the reading experience. S2. Technical Soundness: The paper exhibits robust technical soundness. The equations and underlying logic are laid out explicitly, providing a comprehensive understanding of the objectives. The problem formulation adheres to rigorous technical standards. S3. Novelty: The paper contributes original research to a specific problem domain - policy customization - and I have not seen papers targeting this problem. As such, the solution proposed is novel. Overall, the paper provides a compelling read and I found the research intriguing. However, some concerns about the experimental setup were noted (refer to the 'Weaknesses' section for details).

Weaknesses

Despite the innovative approach presented in this paper, certain aspects of the experimental setup present potential limitations: W1. The selection of relatively simple problems for testing constrains the perceived impact of the work. With more complex environments like Atari and Procgen games now serving as standard test suites, the study's relevance might be diminished due to the primitive nature of the chosen experimental domains. W2. The paper lacks a comparison with a directly relevant baseline — RL fine-tuning combined with the IL objective of the prior policy used as heuristics. Given that RL or IL prior policies are trained on objectives distinct from the downstream task, their performance on the latter is likely to be sub-optimal. A head-to-head comparison with this method, which is a natural consideration for the policy customization problem, would better establish the strengths and limitations of the proposed Residual Q-learning framework.

Questions

Q1. This work proves beneficial when the downstream task's objective is orthogonal to the prior policy's objective. However, what happens when the objectives conflict? For instance, suppose a prior policy for robot navigation is conservatively trained to minimize speed and avoid collision. If the downstream task necessitates rapid completion, wouldn't the prior policy potentially impede the optimization of the downstream task's objective? Q2. If possible, could you share the results of experiments where the Residual Q-learning framework is compared with RL fine-tuning combined with the IL objective of the prior policy used as heuristics? Such comparisons would provide a more comprehensive evaluation of the proposed approach. Q3. Based on the results, "RL with total reward" consistently outperforms the Residual Q-learning framework. Could you elucidate potential real-world scenarios where the Residual Q-learning framework would be more advantageous or preferred over the "RL with total reward" approach?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

4 excellent

Contribution

3 good

Limitations

The authors discussed the limitations of their work. No discussion needed regarding potential negative societal impact.

Reviewer 2HY54/10 · confidence 4/52023-07-06

Summary

This paper proposes a new problem setting called policy customization, where the goal is to train a new policy that inherits the characteristics of a prior policy while satisfying additional requirements imposed by a downstream task. The authors propose a novel Residual Q-Learning framework to solve this problem, which leverages the prior policy without knowing its inherent reward or value function. The authors derive a family of residual Q-learning algorithms for offline and online policy customization and show their effectiveness in various environments. The empirical results on four tested environments seem promising.

Strengths

- The paper introduces a new problem setting called policy customization, which addresses the need to customize a pre-trained policy to meet additional requirements imposed by a downstream task. - The Residual Q-Learning framework proposed in this paper provides a principled approach to interpret and design the policy customization objective, enabling the joint optimization of imitative and downstream task performance.

Weaknesses

- The evaluation for the proposed method is limited. It would be beneficial to see more extensive comparisons and discussions with more baselines in the field, such as EGPO [1] and TS2C [2]. Also it would be beneficial to include some larger-scale RL environments, such as MuJoCo or MetaDrive [3]. - A more comprehensive discussion with related works should be presented. There is a whole line of research that assumes the availability of an online expert policy to imitate [1,2,4,5,6]. With these methods, it will be natural to perform policy customization by adding task-specific rewards to the learning process.

Questions

- What is the advantage of Residual Q-Learning when compared with inverse-RL? One can learn the inherent reward function from interactions and combine it with the additional task-specific reward. - What does it mean by “principled way”? Why is Residual Q-Learning better than related works? - How is the prior policy $\pi$ used? Are you assuming you have an “online” policy to imitate? Then you may also need to compare with those papers focusing on RL with shared control [1,2,6].

Rating

4: Borderline reject: Technically solid paper where reasons to reject, e.g., limited evaluation, outweigh reasons to accept, e.g., good evaluation. Please use sparingly.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

2 fair

Limitations

References [1] Peng, Zhenghao, et al. "Safe driving via expert guided policy optimization." Conference on Robot Learning. PMLR, 2022. [2] Xue, Zhenghai, et al. "Guarded Policy Optimization with Imperfect Online Demonstrations." The Eleventh International Conference on Learning Representations. 2022. [3] Li, Quanyi, et al. "Metadrive: Composing diverse driving scenarios for generalizable reinforcement learning." IEEE transactions on pattern analysis and machine intelligence 45.3 (2022): 3461-3475. [4] Kelly, Michael, et al. "Hg-dagger: Interactive imitation learning with human experts." 2019 International Conference on Robotics and Automation (ICRA). IEEE, 2019. [5] Mandlekar, Ajay, et al. "Human-in-the-loop imitation learning using remote teleoperation." arXiv preprint arXiv:2012.06733 (2020). [6] Li, Quanyi, Zhenghao Peng, and Bolei Zhou. "Efficient learning of safe driving policy via human-ai copilot optimization." arXiv preprint arXiv:2202.10341 (2022).

Reviewer 6WQ55/10 · confidence 3/52023-07-06

Summary

This paper introduces a novel concept policy customization, which trains a new policy based on a pre-trained policy so as to solve the downstream tasks. Compared to RL fine-tuning algorithms, policy customization directly optimize the imitative objectives and downstream RL objectives jointly. The authors propose a new approach, Residual Q-learning, for policy customization. The proposed algorithm has shown effectiveness across 4 different environments in this work, suggesting their potential for efficient policy customization.

Strengths

1. The paper tackles an important problem in RL, learning new tasks based on given policy priors. 2. The formulation and theorem are sound. 3. The approach is based on a simple concept "residual optimization", yet appears to generate some benefits, especially in harder tasks.

Weaknesses

1. The author should clarify the significance of policy customization and make more arguments about the difference between policy customization and RL fine-tuning methods. The main difference between them seems that policy customization jointly trains the reward from the inherent rewards and add-on rewards, while RL fine-tuning methods learn from inherent rewards more intrinsically. Why is policy customization deserved to study, or why jointly combining the reward significant? Furthermore, I haven't noticed a detailed argument about the necessity of the proposed novel concept. 2. The experimental environments are simple. More complex tasks are better. Moreover, the authors should compare with some RL fine-tuning methods mentioned in related works.

Questions

The optimization is based on the assumption that the optimal policy pre-trained with IL follows a Boltzmann distribution. The imitation policies in experiments are from stable-baselines' library. But for some more practical or complex envs, such as CARLA and MuJoCo, this assumption is hard to satisfy since the expert demonstrations have more and larger bias. I'm wondering the Eq (6) cannot be satisfied, how to optimize the Residual Q-Learning problems?

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

2 fair

Contribution

2 fair

Limitations

1. The statement about the definition and significance of policy customization is poor. 2. The experiment environments are simple, lacking convincing. 3. The assumption in Eq 1 is strong.

Reviewer QjWD2023-08-14

Thanks for addressing the concerns

### Results on MuCoCo it appears that the performance comparison between Greedy and Residual Q is quite close. Aside from the Ant environment, there doesn't seem to be a clear dominance of Residual Q over Greedy. Could the authors specify the value of the hyperparameter used for the IL objective? ### General comment After reading the other reviews and the authors' rebuttals, I'd like to thank the authors for presenting their view in addressing the concerns. I concur with other reviewers that both the general motivation for policy customisation and the proposed method need better articulation, which would enhance the significance of Residual Q-learning. I've reviewed the experiments in appendix D.1-2 and believe they should be included in the main manuscript, as they represent key alternatives to Residual Q-learning for policy customisation. Residual Q-learning seems a more grounded approach to handling IL and downstream RL objectives. Nonetheless, I think the paper could benefit from broader and more complex experimental domains for comparison with the alternatives outlined in appendix D1-2, for clear or significant dominance over the alternatives. Due to these reasons, I'm maintaining my original score.

Authorsrebuttal2023-08-15

Thank you for your feedback! We would like to elaborate further on what the experimental results of greedy vs. residual-Q policies implies. When compared to RL fine-tuning (i.e., RL/IL greedy), residual Q-learning consistently achieves better performance when a sufficiently good prior is available. The advantages are particularly apparent in the Parking and Ant environments. Note that the performance advantage is also apparent in the Humanoid environment when the prior policy is trained with RL ---- the greedily customized policy has significantly larger variances in its rewards compared to the residual Q-learning policy. The performance gap between residual-Q and RL fine-tuning depends on the basic and add-on rewards. If the additional add-on reward does not significantly alter the optimal policy, policy divergence is a fairly reasonable IL objective and it is fairly easier to find a good trade-off between the IL and RL objectives, even though policy divergence is a heuristically designed IL objective. For example, it is the case in the Hopper environment ---- while the customized agents jump higher, the gaits are still similar to the prior policy. In contrast, if the add-on reward does significantly alter the optimal policy, regularizing the policy KL divergence does not necessarily maintain the customized policy's performance on the basic task. For example, in the Parking environment, because of the non-holonomic constraint and long task horizon, the agent's optimal behavior varies significantly when the additional non-collision constraint is imposed. Thus, RL fine-tuning fails to find a good customized policy that can reliably complete the basic parking tasks. Conversely, a good prior policy can still be used to encode the basic task objective in the residual Q-learning framework, which explains the dominance of the residual-Q policies over the greedy ones. Therefore, even though the greedy policies perform similarly to residual-Q in some environments, the fact that residual-Q can consistently outperform RL fine-tuning given a good prior validates that residual-Q is a more principled approach to handling the trade-off between IL and downstream RL objectives. Regarding your question on the hyperparameters used for the IL objective, could you let us know which hyperparameters you refer to and are most curious about?

Reviewer QjWD2023-08-19

Thank you for addressing my concerns. In my initial review, I referred to the λ parameter in eq. 25 and the β parameter in eq. 28. It is my understanding that these parameters determine the balance between retaining information from the prior policy and optimising the add-on RL objective.

Authorsrebuttal2023-08-20

In each environment tested, we set the value of $\lambda$ to be the same as the $\omega'$ value set in Residual Q-learning (see Table 4 in Appendix), so that Eqn. 27 is consistent with Eqn. 6 in terms of the weights of the prior policy likelihoods. Regarding $\beta$, we set it to be the same as $\omega'$ as well in the experiment reported in Fig. 2. Note that we have tested a wide range of $\beta$ values, and none of them gave satisfying results.

Reviewer ePZC2023-08-14

Thanks for your clear clarification! Now I think I have understood the details well.

Reviewer sftZ2023-08-17

Response

Thank you for your reply, which resolved some of my confusion. However, the entire manuscript still requires a significant amount of improvement. I have raised my score.

Reviewer 2HY52023-08-19

Response

Thank you for submitting your rebuttal. The authors have made a commendable effort to address and answer my concerns, which is greatly appreciated. I would also like to thank the authors for considering and discussing the related works. However, my other concerns remain as follows: - Additional Experiments: The improvements of Residual-Q over baseline algorithms are extremely minor. I would expect more convicing empirical results as the novelty of the algorithm is relatively limited. - Comparison with IL: The referred paper only demonstrate that IL shows worse performance than GAIL in certain environments. The authors may still need to discuss why Residual-Q, which require online policy queries, is a more preferred approach than IL. - Principled way: The trade-off between different rewards can also be challenging, considering the whole line of research in multi-objective RL. Due to the aforementioned reasons, I remain my rating towards rejection.

Authorsrebuttal2023-08-20

Thank you for your follow-up comments! Please find our responses to your remaining concerns as follows: **Improvement of Residual-Q over Baseline**: We respectfully disagree with your assessment that the improvements of Residual-Q over the RL fine-tuning baseline are extremely minor. When compared to RL fine-tuning, residual Q-learning consistently achieves better performance when a sufficiently good prior is available. The advantages are particularly apparent in the Parking and Ant environments. Note that the performance advantage is also apparent in the Humanoid environment when the prior policy is trained with RL ---- the greedily customized policy has significantly larger variances in its rewards compared to the residual Q-learning policy. The performance gap between residual-Q and RL fine-tuning depends on the basic and add-on rewards. If the additional add-on reward does not significantly alter the optimal policy, policy divergence is a fairly reasonable IL objective and it is fairly easier to find a good trade-off between the IL and RL objectives, even though policy divergence is a heuristically designed IL objective. For example, it is the case in the Hopper environment ---- while the customized agents jump higher, the gaits are still similar to the prior policy. In contrast, if the add-on reward does significantly alter the optimal policy, regularizing the policy KL divergence does not necessarily maintain the customized policy's performance on the basic task. For example, in the Parking environment, because of the non-holonomic constraint and long task horizon, the agent's optimal behavior varies significantly when the additional non-collision constraint is imposed. Thus, RL fine-tuning fails to find a good customized policy that can reliably complete the basic parking tasks. Conversely, a good prior policy can still be used to encode the basic task objective in the residual Q-learning framework, which explains the dominance of the residual-Q policies over the greedy ones. Therefore, even though the greedy policies perform similarly to residual-Q in some environments, the fact that residual-Q can consistently outperform RL fine-tuning given a good prior validates that residual-Q is a more principled approach to handling the trade-off between IL and downstream RL objectives. **Novelty**: The novelty of our work lies in both the new problem setting, policy customization, and the proposed solution, residual Q-learning. The residual-Q learning framework provides a theoretical ground to interpret and determine the trade-off between the imitative and add-on objectives, which has never been discussed in the related literature (e.g., RL fine-tuning). While the family of residual Q-learning algorithms is adapted from existing algorithms in a straightforward way, we consider the simplicity in algorithm design an advantage of our proposed residual-Q learning framework. As summarized by Reviewer ePZC, it shows that the proposed framework is flexible and can be easily added to existing maximum-entropy RL algorithms. **Comparison with IRL**: As mentioned in the author rebuttal thread, since the residual-Q framework does not require inferring the inherent reward from the demo, it allows flexible adoption of any maximum-entropy imitation learning algorithms depending on the environments, including AIRL. Thus, residual-Q should be able to consistently outperform policy customization methods that require explicitly inferring the inherent reward from the demo, since AIRL could perform significantly worse in certain environments. Besides, AIRL also needs to train a policy simultaneously while inferring the reward. Thus, we do not think the demand for a prior policy for online querying makes Residual-Q less favorable than IRL. **Principled Way**: We understand that determining the trade-off between different rewards can also be difficult in some scenarios. However, we want to emphasize that, compared to RL fine-tuning where the IL objective is added as a heuristic, interpreting the trade-off between IL and RL objectives as a trade-off in rewards as in Residual-Q is a more principled and theoretically sound approach. It has been validated by our experiments comparing Residual-Q versus RL fine-tuning.

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC