Contrastive Modules with Temporal Attention for Multi-Task Reinforcement Learning

In the field of multi-task reinforcement learning, the modular principle, which involves specializing functionalities into different modules and combining them appropriately, has been widely adopted as a promising approach to prevent the negative transfer problem that performance degradation due to conflicts between tasks. However, most of the existing multi-task RL methods only combine shared modules at the task level, ignoring that there may be conflicts within the task. In addition, these methods do not take into account that without constraints, some modules may learn similar functions, resulting in restricting the model's expressiveness and generalization capability of modular methods. In this paper, we propose the Contrastive Modules with Temporal Attention(CMTA) method to address these limitations. CMTA constrains the modules to be different from each other by contrastive learning and combining shared modules at a finer granularity than the task level with temporal attention, alleviating the negative transfer within the task and improving the generalization ability and the performance for multi-task RL. We conducted the experiment on Meta-World, a multi-task RL benchmark containing various robotics manipulation tasks. Experimental results show that CMTA outperforms learning each task individually for the first time and achieves substantial performance improvements over the baselines.

Paper

References (49)

Scroll for more · 37 remaining

Similar papers

Peer review

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

Summary

The paper studies modular multi-task reinforcement learning to address negative transfer problem. The proposed method has two components: 1. contrastive learning on module outputs, to encourage model expressiveness and generalization. 2. use temporal information to combine module outputs, to address negative transfer within tasks. Experiments in Meta-World shows that the proposed method outperforms other multi-task baselines and learning tasks individually.

Strengths

1. The motivation for modular learning with temporal attention to address negative transfer is clear. 2. The paper is very well-written, with relevant references and easy-to-follow narration. 3. The method is the only one outperforming single-task RL in Meta-World.

Weaknesses

1. The experiments don't reflect the claim that the method improves generalization. 2. Some previous works (e.g., Multi-Task Reinforcement Learning with Soft Modularization) also select different modules in different time steps in a task.

Questions

1. Why are the results in Figure 3 quite different to the results in "Soft Modularization". In that paper, Soft Modularization outperforms multi-task variants of SAC a lot. 2. Since most multi-task methods cannot outperform the individual-learning baseline, what are the benefits of multi-task RL? Can the learned multi-task model adapt to unseen tasks quicker?

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

3 good

Contribution

3 good

Limitations

The authors have addressed the limitations.

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

Summary

This work proposes to enhance the expressiveness and generalization capability of the modular methods in multi-task reinforcement learning by applying contrastive loss over different task modules and encode the task related information with a temporal attention module. This work shows by applying both techniques, the proposed CMTA method can learn modules producing different learned embeddings and outperform baselines in different benchmarks.

Strengths

* Different modules of the method are well-motivated, aligned with intuition and described with detail. Details provided for the community to reproduce the results. Using contrastive learning to enforce different module learn different skills is reasonable. * The visualization of learned encoding of different modules shows the contrastive learning term encourages the different modules to learn skills with different semantic meanings. * According to the experiment results, the proposed method CMTA outperformed different baselines by a large margin in different settings. * The overall writing of the work is easy to follow.

Weaknesses

1. Some experiment results are not well-explained: * According to the Sec 5, the Mixed version of MetaWorld benchmark is supposed to be more difficult than the fixed version. Why the Single-SAC is performing worse in the Fixed MT10, and it seems the Single-SAC results (in Fixed setting) is much worse than the reported in previous works. * All baselines perform worse in Mixed (compared with in Fixed), while the proposed method works better in Mixed Version. * Why the performance of all methods significantly drops after a certain stage for MT50-Mixed (similar phenomenon did not appear in MT10-Mixed). 2. Some components of the methods could be better ablated like, how does the number of experts affect the performance of the method. Since this work propose to learn more meaningful skills for different experts via contrastive learning, more discussion on this part would make the work stronger. 3. Visualization of the attention weight for different tasks is missing, which could help the audience understand the proposed method. 4. The use of different skill-use is discussed in previous work (Soft Modularization, where the state information and the task information are used at the same time to output the module selection), and no specific training objective (the difference with previous here seems to be the LSTM ) in this work is addressing this issue.

Questions

* Some explanation regarding the experiment results mentioned in the weakness section would be appreciated. * Additional visualization regarding the attention weights for different tasks. And since different modules have different semantic meaning (powered by the contrastive learning), some investigation on what kind of skill a specific expert represents would be interesting as well. * Though this work claims the method works without any loss weighting trick in the optimization, it would be interesting to see some results from that end, I would raise my rating if the authors could reasonably address part (given the limited time for rebuttal) or full of my concerns.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, 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

2 fair

Contribution

3 good

Limitations

This work propose a general multi-task RL method, in this case, I think no specific potential negative societal impact or similar things should be addressed. As the author indicated, the current method works well in multi-task RL (with a fixed number of tasks), and would like to see some extension in meta learning or open-vocabulary settings in the future.

Reviewer GQFL5/10 · confidence 2/52023-07-10

Summary

The paper introduces an approach for multi-task RL. Their approach is similar to CARE, which learns separate encoder modules, but they add a contrastive task loss on top of the encoders. They show this approach outperforms all reported baselines on Meta-World (MT-10 and MT-50) and a variant of Meta-World where the initializations are mixed throughout training.

Strengths

- The proposed approach outperforms all reported baselines and independent training on the metaworld tasks in the fully observed setting. - The proposed solution is straightforward to implement.

Weaknesses

- A lot of the methods section should be moved to a preliminary section because it is difficult to understand what is novel and not novel. The temporal attention section on L168-180 is one example. Overall I found the organization of the paper confusing. - There are not enough experimental results to fully validate the method (e.g., relevant baselines like PC-grad). In all of the comparisons to baselines the approach is still fairly overlapping with the error bars of other baselines and the meaning of the error bars is not described anywhere in the text. - It would help the reader to consolidate the terms. The modules are separately referred to as both experts and modules. I would find it more straightforward if the naming was consistent.

Questions

- On L143 "Notably, it surpasses the performance of learning each task individually for the first time in the Meta-World environment" Is this true in the case of MT10? E.g., Figure 3 of Gradient Surgery for Multi-Task Learning (Yu et. al., 2020). - What are the error bars in the figures?

Rating

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

Confidence

2: You are willing to defend your assessment, but it is quite likely that you did not understand the central 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

1 poor

Contribution

3 good

Limitations

N/A

Reviewer 4rda5/10 · confidence 4/52023-07-10

Summary

This paper proposes an approach to multi-task RL called Contrastive Modules with Temporal Attention that aims to address the issue of negative transfer between tasks in multi-task RL. The proposed method consists of two main components: contrastive learning and temporal attention. The contrastive learning component is used to ensure that the shared modules learned by the method are distinct from each other. This is achieved by applying a contrastive loss that encourages the modules to produce different outputs for the same input. The temporal attention component is used to dynamically combine the outputs of the different modules at each time step. This allows the method to adapt to the specific requirements of each task. The authors evaluate their method on the Meta-World benchmark, a widely used benchmark for multi-task RL. They compare the performance of their method with several baselines, including methods that train each task separately and methods that share all modules across tasks. The results show that CMTA outperforms the baselines in terms of both sample efficiency and performance.

Strengths

Originality - The paper presents a novel approach to multi-task RL by introducing contrastive modules with temporal attention. - The method addresses the issue of negative transfer between tasks, which is a significant challenge in multi-task RL. The authors propose a novel solution to this problem by constraining the modules to be different from each other and using temporal attention to dynamically combine them. Quality - The authors provide adequate experimental results on Meta-World, a widely-accepted continuous control robotics benchmark, and some ablation studies that support the effectiveness of their method. - The paper is well-referenced, indicating a thorough understanding of the existing literature. The authors clearly position their work within the context of previous research. Clarity: - The paper is well-organized and the writing is clear. The authors provide a clear explanation of their method and its advantages. - The figures and tables in the paper are informative and support the text well. They help to clarify the method and the experimental results. Significance: - The proposed method addresses a critical challenge in the field and shows superior performance compared to existing methods. - The method proposed by the authors, in particular the temporal attention mechanism, has the potential to be widely adopted in the field of multi-task RL. It could also inspire future research in this area.

Weaknesses

Limited insight into hyperparameter sensitivity: The paper would be stronger if it discussed the sensitivity of the proposed method to its hyperparameters. Understanding how changes in hyperparameters affect the performance of the model is crucial for reproducibility and for users who wish to apply the method to their own tasks. Lacking insight into soft attention weights: It would be interesting to see the general relationships of soft attention weights and other aspects of the problem, such as its temporal nature, the tasks involved, etc. Limited Discussion on Failure Cases: While the paper presents a number of successful results, it could discuss in detail the scenarios where the proposed method fails or performs sub-optimally. Such a discussion could provide valuable insights into the limitations of the method and guide future improvements. Lack of Comparison with Related Work: While the paper compares the proposed method with several baselines, it does not compare it with other multiple other methods that also use contrastive learning or attention mechanisms in the context of multi-task RL (*see first bullet point below). Such comparisons could provide a more comprehensive evaluation of the proposed method. - However, the paper does add the contrastive loss to CARE and evaluate it, but CARE's attention mechanism is very different than CMTA's and only CARE was compared against in this way. - It would be interesting to see how other proposed baselines or competitive related work would benefit from the proposed temporal attention module. Generalizability: The proposed method has been evaluated on a specific benchmark (Meta-World). Its performance on other benchmarks or real-world tasks that differ from Meta-World type setup and tasks is not known. CMTA may not outperform certain baselines or other algorithms on suites of tasks in other benchmarks or real-world tasks.

Questions

Subsumed into Weaknesses and Limitations. 1. What are three limitations of your work that have not been addressed in the reviews, and what are your thoughts about them? This isn't intended to diminish your work. Instead it's to show that you understand where and how your work shines and to highlight where it may not as future problems to be addressed or as problems that are insignificant for some reason(s).

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited 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

2 fair

Contribution

3 good

Limitations

Scalability: The proposed method might not scale well to tasks with a larger number of subtasks or more complex environments, even though the paper claims in Line 311-312 that "as the variety of tasks increases, the advantages of our approach become more apparent", they don't show this outside of Meta-World, and Meta-World is measure 0 subset of possible tasks. Regardless, the computational cost of the method, especially the contrastive learning part, could increase significantly with the complexity of the tasks. Dependence on Task Similarity: The effectiveness of the proposed method might depend on the similarity of the tasks. If the tasks are very different from each other, the shared modules learned by the method might not be effective for all tasks. I did not find the paper addressing its limitations anywhere. One I will put forth is the lack of insight into the temporal attention module's relationship to different aspects of the problem, such as (1) how the attention weights vary over time, (2) whether they reach a steady state, (3) what do they focus on, for the Meta-World problems covered in the paper. I believe we should be wary of how this overall approach behaves, especially the temporal attention module and the assigned soft attention weights, in problems in which ethics, safety, fairness, bias, may be a concern. This is general concern for any algorithm that doesn't explicitly address and mitigate these issues, but it's especially one here because of the lack of insight into the temporal attention module's relationship to aspects of the problem.

Reviewer ouGh5/10 · confidence 5/52023-07-24

Summary

The paper focuses on multi-task reinforcement learning. Motivated by the negative task transfer within each task, the paper proposes the Contrastive Modules with Temporal Attention (CMTA) method, which utilizes temporal attention to modulate the weights of experts. Concretely, temporal attention takes recent history as input to capture local information. The proposed CMTA is evaluated in MetaWorld and shows superior performance than baselines.

Strengths

- The methodology part is clear and well-written. - The methodology is well-motivated.

Weaknesses

- The paper poses the multiple skills that may be utilized in each task as negative transfer problems within a task. I believe such terminology is ok but I would highly recommend including a session in related work summarizing the skill-based RL literature and pointing out the deep connection between “negative transfer within a task” and “skill-based RL” in the introduction part. - The novelty of the paper is limited from my point of view. - The experiment part lacks necessary information and please refer to the questions. The ablation study can be further improved by analyzing the impact of history length in the temporal attention mechanism, as well as the number of experts.

Questions

- What is the number of experts in the mixture for each experiment setting, including MT10-Fixed, MT10-Mixed, MT50-Fixed, MT50-Mixed? - How is the smooth curve calculated exactly? The meaning of the smooth factor in line 242 is unclear. - Why do the performances drop for MT50-Mixed after 1.5 Million steps (figure 3 the right most figure MT50-Mixed)?

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited 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

2 fair

Contribution

2 fair

Limitations

- The limitation is not discussed in the conclusion. One trade-off is the increased model size due to experts and the improved performance.

Authorsrebuttal2023-08-18

Dear reviewers

Note that the discussion will be ended in 3 days, we kindly request all the reviewers engage in the discussion. During the rebuttal period,we carried out additional experiments and are here to ensure that we have addressed all questions or doubts . We hope everything is clear and the recent experiments have addressed the concerns. Thanks!

Reviewer 4rda2023-08-19

Thank you for your rebuttal. I've read it, the global pdf, and the other reviews and associated rebuttal discussions. W2. I'm not a fan of only providing t-SNE because of utter lack of parameter invariance in qualitative insights. If using sklearn, the documentation [1] shows that the function has the following parameters, class sklearn.manifold.TSNE(n_components=2, *, perplexity=30.0, early_exaggeration=12.0, learning_rate='auto', n_iter=1000, n_iter_without_progress=300, min_grad_norm=1e-07, metric='euclidean', metric_params=None, init='pca', verbose=0, random_state=None, method='barnes_hut', angle=0.5, n_jobs=None) and parameters, such as perplexity, that greatly affect the visualization are not varied or expressly detailed. Regardless, the clusters are distinct though the paper would be stronger if a reasonable attempt at reproducibility of the t-SNE plots were made possible. It may not be possible to make it completely reproducible, as t-SNE has a non-convex loss function. However, if the only difference is randomization, then with such nice clusters, there should be no real issue getting nice clusters again unless there was an issue acquired nice clusters originally. I'd suggest providing as much information as possible on your process for creating t-SNE plots, as a general practice since it is little effort, and pairing t-SNE with a data visualization method that is less user-manipulatable. W4. Regarding works using contrastive learning in MTRL. I apologize, I was over-reaching by phrasing it this way. Instead this work is MTRL using contrastively learned MoE embeddings + context task embeddings. So for learning distinct experts in MoE setting, there are continual learning methods that perform OoD detection prior to creating a new task [3, 4] and/or use similarity measures such as a Kullback-Leibler, Jensen-Shannon loss or Wasserstein distance loss to encourage dissimilarity between experts. There are also approaches that use contrastive learning on MoEs to learn distinct experts [5]. I don't grasp the point(s) being made in the remainder of this paragraph that is speaking to attention mechanisms. W5. Meta-World generalization provides a good estimate for generalization on unseen Meta-World and similar tasks, which are a tiny space of continuous control tasks that are similar to the seen Meta-World tasks. For other items, I don't have any further comments. Thank you for your work and rebuttal. I will maintain my score as is and encourage the Authors' to consider the Reviewers' feedback and rebuttal discussions in improving their paper. [1] https://scikit-learn.org/stable/modules/generated/sklearn.manifold.TSNE.html. [2] Eysenbach, B., Zhang, T., Levine, S., & Salakhutdinov, R. R. (2022). Contrastive learning as goal-conditioned reinforcement learning. Advances in Neural Information Processing Systems, 35, 35603-35620. [3] Nagabandi, A., Finn, C., & Levine, S. (2018). Deep online learning via meta-learning: Continual adaptation for model-based rl. arXiv preprint arXiv:1812.07671. [4] Xu, M., Ganesh, S., & Pasula, P. (2022). Mixture of basis for interpretable continual learning with distribution shifts. arXiv preprint arXiv:2201.01853. [5] Mustafa, B., Riquelme, C., Puigcerver, J., Jenatton, R., & Houlsby, N. (2022). Multimodal contrastive learning with limoe: the language-image mixture of experts. Advances in Neural Information Processing Systems, 35, 9564-9576.

Authorsrebuttal2023-08-21

Thank you for your response. I have read the comment, including the papers you mentioned [3, 4, 5]. W2. We use the following instruction to get t-SNE visualization and we will add this to the appendix in the revised version: ``` tsne = sklearn.manifold.TSNE(n_components=2, init ='pca', random_state=40) ``` For other parameters that might affect the visualization, we used the default values. Furthermore, we have also altered the `random_state` to visualize the data again, and we still obtained nice clusters. W4. In [3, 4], apart from employing the mixture of models, there seems to be no explicit demonstration of constraining dissimilarity between modules, which presents a significant contrast with our approach. While in other domains, the use of similarity measures to encourage dissimilarity between experts does indeed share a similar motivation with our work, the implementation methods differ from ours. As for [5], it belongs to the domain of multi-modal. The purpose of utilizing contrastive learning is to align image and text representations, treating corresponding $Z_{text}$ and $Z_{image}$ as positive pairs. So it cannot be directly applied to MTRL as its purpose and implementation details are distinct from ours(we use the output of current time-step and next time-step of the same expert as postive pairs instead). W5. Indeed, Meta-World tasks do exhibit certain limitations; However, at present, there is no superior benchmark available for MTRL. In the future, when new benchmarks become available, it might be possible to further validate our approach on them. [3] Nagabandi, A., Finn, C., & Levine, S. (2018). Deep online learning via meta-learning: Continual adaptation for model-based rl. arXiv preprint arXiv:1812.07671. [4] Xu, M., Ganesh, S., & Pasula, P. (2022). Mixture of basis for interpretable continual learning with distribution shifts. arXiv preprint arXiv:2201.01853. [5] Mustafa, B., Riquelme, C., Puigcerver, J., Jenatton, R., & Houlsby, N. (2022). Multimodal contrastive learning with limoe: the language-image mixture of experts. Advances in Neural Information Processing Systems, 35, 9564-9576.

Reviewer fVjH2023-08-20

The response addressed most of my concerns. I'm raising my score to weak accept

Reviewer ouGh2023-08-20

Rebuttal Response

I thank the authors for the detailed response, which helped improve the paper's clarity. I updated my score accordingly.

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC