Coevolving with the Other You: Fine-Tuning LLM with Sequential Cooperative Multi-Agent Reinforcement Learning

Reinforcement learning (RL) has emerged as a pivotal technique for fine-tuning large language models (LLMs) on specific tasks. However, prevailing RL fine-tuning methods predominantly rely on PPO and its variants. Though these algorithms are effective in general RL settings, they often exhibit suboptimal performance and vulnerability to distribution collapse when applied to the fine-tuning of LLMs. In this paper, we propose CORY, extending the RL fine-tuning of LLMs to a sequential cooperative multi-agent reinforcement learning framework, to leverage the inherent coevolution and emergent capabilities of multi-agent systems. In CORY, the LLM to be fine-tuned is initially duplicated into two autonomous agents: a pioneer and an observer. The pioneer generates responses based on queries, while the observer generates responses using both the queries and the pioneer's responses. The two agents are trained together. During training, the agents exchange roles periodically, fostering cooperation and coevolution between them. Experiments evaluate CORY's performance by fine-tuning GPT-2 and Llama-2 under subjective and objective reward functions on the IMDB Review and GSM8K datasets, respectively. Results show that CORY outperforms PPO in terms of policy optimality, resistance to distribution collapse, and training robustness, thereby underscoring its potential as a superior methodology for refining LLMs in real-world applications.

Paper

References (42)

Scroll for more · 30 remaining

Similar papers

Peer review

Reviewer chZh6/10 · confidence 4/52024-06-27

Summary

The paper introduces CORY, a novel reinforcement learning (RL) technique for fine-tuning language models that casts a multi-agent framework on the trained language model by duplicating it at initialization and then using the two copies to improve one another. Essentially, a "pioneer" gives the first guess, used as a reference to an "observer" which gives the final answer, then both agents are rewarded for both of their outputs in a cooperative fashion and trained independently with an underlying RL algorithm, here PPO. The authors claim that CORY improves on single-agent PPO in terms of downstream performance, training stability, and robustness to distribution collapse.

Strengths

The paper is easy to follow and includes enough details about the experiments. Casting the problem into a multi-agent framework to change the optimization dynamics is original and will likely influence other work to build on it. The observations made by the authors about the multi-agent framework changing the dynamics training dynamics to make the observer more easily optimize for the reward while maintaining a low KL are interesting. The method can potentially be applied on top of any RL algorithm, either with independent learners as shown in the paper or by introducing centralized training critic network sharing, etc.

Weaknesses

Overall, I find the contribution of the paper to be original and likely to have impact, however, I also find a number major issues in the work that make it not ready for publication at this venue. Unclear contextualization and missing baselines: - One main contribution of the paper is that it finds a policy that has a better Pareto frontier while still using the sum of task reward and KL divergence, but the KL divergence is an artificial reward specific to current RL fintuning methods in language modeling. If the paper's method is to be highlighted from a language modeling perspective then I would expect it to compare to methods like [1] which also claim to obtain a better Pareto frontier. And more than that, I would expect the method to show its benefits in downstream tasks for example with AlpacaFarm [2] as although a better frontier could be seen a a proxy to robustness to model collapse, it isn't clear if it translates to better language modeling capabilities. Otherwise if the method is to be highlighted in general multi-objective RL fine-tuning tasks, then I would expect comparison to multi-objective RL methods. - (minor) The method can also be seen a self-improvement method, so the pepper would benefit from discussing and contrasting methods from the same family. An insufficient number of benchmarks: - The authors claim to evaluate their method "across diverse reward function landscapes, encompassing both subjective and objective categories", but only one dataset per category is tested. Judging by the scope of the claims the authors make and that this is the only form of evidence provided, I would expect at least 3 or 5 datasets per category. Hyperparameter choice: - The authors use a single set of hyperprameters, with no apparent justification. This is not enough to make claims about a method being better than another. - (minor) PPO with 1 epoch and 1 batch per epoch (as in the hyperprameter table) becomes just a policy gradient, so the authors seem to be effectively using a vanilla actor-critic with a GAE value estimator and (usually useless) value clipping. Presentation: - (minor) The wording of the claims made in the abstract and introduction "policy optimality, "resilience to distribution collapse", and "robustness during training" is not reused in the experiments section which makes it hard to connect evidence to claims. - (minor) The $\geq$ symbol in equation 6 between vector-values objectives is undefined. One would expect a definition of Pareto dominance. [1] Noukhovitch, Michael, et al. "Language model alignment with elastic reset." Advances in Neural Information Processing Systems 36 (2024). [2] Dubois, Yann, et al. "Alpacafarm: A simulation framework for methods that learn from human feedback." Advances in Neural Information Processing Systems 36 (2024).

Questions

How did the authors select the hyperprameters for their methods?

Rating

6

Confidence

4

Soundness

2

Presentation

3

Contribution

3

Limitations

Although in the appendix, the authors adequately state the limitations of their work and its broader impacts.

Reviewer F4Ro6/10 · confidence 3/52024-07-12

Summary

This paper presents a Reinforcement Learning (RL) methodology to fine-tune LLMs based on Multi-Agent RL agents. One agent acts as the observer, and the other acts as the pioneer. They share knowledge through two interactions: transfer learning and role-switching. They named this methodology CORY (Coevolving with the Other You). They tested their framework with out-the-shelf LLMs and proved that learning benefits from using CORY. They compared against proximal policy optimization (PPO) in the Multi-Agent setup. Ablation studies showed the effect of model size, knowledge transfer, and role exchange. They provided theory related to RL in the context of this text-generation task and qualitative studies.

Strengths

The paper is easy to follow for a person knowledgeable in RL who understands LLMs at a basic level. Their methodology provides a viable method to improve LLM fine-tuning using RL. They used modern and relevant benchmarks not only on the side of RL (PPO) but also on the side of models.

Weaknesses

The Limitations section would've been a good addition to the main corpus of the paper as it addresses a big possible concern I imagined with your methodology: you require twice the amount of resources to train both agents. The average reader would enjoy this change, as some don't jump in appendices. Also, I think your claim about Moore's Law might be arguable, as current requirements for computing power are growing beyond expectation with the surge in LLMs.

Questions

I think I lack intuition about how the reward signals work after the N steps. Also, I am unclear about the influence of the KL divergence and how far it is relevant not to diverge from the reference policy. Could you please give me your take on that?

Rating

6

Confidence

3

Soundness

3

Presentation

4

Contribution

3

Limitations

The authors added a Limitations section in the appendix.

Authorsrebuttal2024-08-12

Please Review Rebuttal

We kindly ask the reviewer to read and respond to our rebuttal. During the rebuttal phase, we conducted new experiments that we believe address all the concerns raised regarding the paper and may merit an increase in the score. The experiments can be summarized as follows: 1. New Baselines: Introduced two new baselines: REINFORCE and a strong baseline, Elastic Reset [1] (see attached PDF Figure 3). 2. New Benchmark: All baselines have been compared on the Anthropic HH benchmark (see attached PDF Figure 4). If there are any outstanding issues, we would appreciate the opportunity to respond before the discussion period concludes. Thank you. [1] Noukhovitch, Michael, et al. "Language model alignment with elastic reset." Advances in Neural Information Processing Systems 36 (2024).

Reviewer F4Ro2024-08-13

First, I apologize for the late response to your rebuttal; I read it some days ago and was trying to form a better idea through the other reviews and how you addressed them. I want to thank the authors for addressing the questions and concerns in my review. I better understood how the RL part works in this NLP application, and I find it interesting how it can keep contributing to the fine-tuning tasks that are much required for LLM. I appreciate your efforts in creating new benchmarks and baselines. I will keep my score for the following reasons: my field of expertise is RL, and I don't feel confident giving you a higher score without a solid background in NLP. Also, my review didn't consider that you should add new baselines; for instance, after using PPO, I didn't consider it relevant to include REINFORCE, which is expected to underperform against PPO. I wish you all the best.

Reviewer Syvc6/10 · confidence 3/52024-07-12

Summary

This paper presents CORY, a novel approach for fine-tuning large language models (LLMs) using a sequential cooperative multi-agent reinforcement learning framework. Traditional methods, primarily based on PPO and its variants, often show suboptimal performance and risk distribution collapse. CORY addresses these issues by duplicating the LLM into two agents: a pioneer and an observer. These agents generate responses based on queries and each other’s outputs, exchanging roles periodically to foster cooperation. Experiments with GPT-2 and Llama-2 on the IMDB Review and GSM8K datasets demonstrate that CORY outperforms PPO in terms of policy optimality, resistance to distribution collapse, and training robustness. This highlights its potential as a superior methodology for refining LLMs in real-world applications.

Strengths

1. The introduction of multi-agent reinforcement learning into LLM fine-tuning is both novel and compelling, with a well-justified motivation behind the designed role exchange. 2. The presentation is well-organized and clear. The comprehensive explanations and illustrative figures in section 3.2 enhance the understanding of the proposed method and its effectiveness. 3. The empirical experiments are adequate and effectively support the proposed method and its underlying rationale.

Weaknesses

1. The paper lacks a theoretical analysis of the introduced framework. 2. The baseline comparison is primarily with single-agent PPO. However, there are many more advanced algorithms for LLM fine-tuning. It would be beneficial if the authors conducted additional experiments using other baseline fine-tuning algorithms.

Questions

1. Can the authors provide a more detailed discussion on the relationship between emergent communication in multi-agent reinforcement learning (MARL) and the method in this paper? Since the authors mention that this work is inspired by the concept that "Languages develop through agent interactions and are shaped by societal and cultural influences," it would be beneficial to explore this connection further. 2. The paper suggests employing a collective task reward to facilitate cooperation, as outlined in Eq. 4. What would happen if the task reward is not the sum of individual task rewards? Can the authors provide empirical results or theoretical analysis to show the influence of the reward design? 3. Currently, the framework includes only two agents: the pioneer and the observer. Is it possible to introduce additional agents, and would doing so enhance performance? I hope the authors can discuss this possibility further.

Rating

6

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

Limitations have been discussed in the paper.

Reviewer 7TR25/10 · confidence 4/52024-07-13

Summary

In this paper, the authors study a multi-agent organization for LLM learning. Specifically, they have two LLMs, with the second one responding to the same query given the query itself and the response generated by another LLM. They author shows this method can achieve a better tradeoff of the task reward and the KL penalty.

Strengths

The writing is clear and the question and proposed method is interesting.

Weaknesses

Since this is an empirical paper, the expectation of the experiments, from its design to its implementation and results, would be higher. In the questions below, the reviewer mentions several points that might improve the experiments. If the authors address the concerns about the experiments, the reviewer will consider rising their score.

Questions

1. As far as the reviewer is concerned, this paper is missing several important baselines to make their experiments more convincing. (1.1) The dual-LLM setup in the LLM debating literature. This line of research is highly related to the paper. There, two LLMs response in turn to the previous generation of the other part, as well as to the original query. As the authors are explicitly considering a cooperative setting, the important question then is: which one is more effective, cooperation or competition, in terms of multi-agent LLM learning. (1.2) Mixture of experts. It appears a bit unfair to compare with a single-LLM PPO baseline--after all the authors are using two LLMs. The question is whether this pioneer-observer structure is more effective than a simpler mechanism where opinions from multiple LLMs are aggregated together by recent research in MOE. 2. Fig. 2 needs to be further explained. The major drawback is the lack of legend regarding the eta values. The reviewer is asking for the which two points (one on the CORY frontier and another on the PPO frontier) corresponding which value of eta. A minor question: For the sub-optimal frontiers of CORY and PPO, it is unclear what is shown is the training KL and reward or that of the testing time.

Rating

5

Confidence

4

Soundness

2

Presentation

3

Contribution

2

Limitations

The reviewer lists some questions that make them curious, expecting some clarifications. it seem that some analysis or experiments can improve the understanding of the proposed method. (1) In the current setup, the pioneer and the observer possess the same architecture, ie, they are the same LLMs. Does this homogeneity matter? If the two LLMs are different, can the proposed method still work?

Authorsrebuttal2024-08-12

Please Review Rebuttal

We kindly ask the reviewer to read and respond to our rebuttal. During the rebuttal phase, we conducted new experiments that we believe address all the concerns raised regarding the paper and may merit an increase in the score. The experiments can be summarized as follows: 1. Dual-LLM Setup: Evaluated both cooperative and competitive settings (see attached PDF Figure 1). 2. Heterogeneous Setup: Implemented two different LLMs in CORY to assess the effectiveness of the proposed mechanism (see attached PDF Figure 2). 3. New Baselines: Introduced two new baselines: REINFORCE and a strong baseline, Elastic Reset [1] (see attached PDF Figure 3). 4. New Benchmark: All baselines have been compared on the Anthropic HH benchmark (see attached PDF Figure 4). If there are any outstanding issues, we would appreciate the opportunity to respond before the discussion period concludes. Thank you. [1] Noukhovitch, Michael, et al. "Language model alignment with elastic reset." Advances in Neural Information Processing Systems 36 (2024).

Reviewer 7TR22024-08-12

Thanks for your response

The authors' response has addressed my major concern. I have increased my score accordingly.

Reviewer chZh2024-08-11

I thank the authors for the clarifications. Most of my concerns have been addressed. I am increasing my score to 5 as I still believe the submission would benefit from better contextualization (should it be compared to multi-objective methods?) and more baselines (I appreciate the authors comparing to ER).

Authorsrebuttal2024-08-13

Thank you for your timely response! We're glad to have addressed most of your concerns. We'd like to provide further clarification on multi-objective RL and baselines. ### 1. **Clarification on multi-objective reinforcement learning (MORL)** ### From the perspective of RL, the RL fine-tuning of LLM indeed constitutes a multi-objective (specifically, dual-objective) RL problem. Algorithms specifically designed for MORL can be categorized into two main types: multi-policy methods and single-policy methods [1]. Multi-policy methods train multiple policies, each corresponding to a single combination of objectives [2]. This approach equates to altering the weights of KL and task reward in Section 3.2(constructing multiple combinations of objectives), training multiple policies through conventional RL methods, and selecting the more effective policies. However, as demonstrated in Fig.2, the performance of all policies (their Pareto frontier) is inferior to policy trained under any weight by CORY. On the other hand, single-policy methods address multi-objective problems through reward scalarization [2]. In our paper, the baseline such as PPO, considers the weighted loss of both the task reward and KL during training, even dynamically adjusting the weight [3], which essentially represents a naive form of reward scalarization. To further alleviate your concerns, we conducted experiments on the IMDB dataset using GGF-PPO [4], which is one of the SOTA algorithms in the MORL domain. As demonstrated in the attached Table 1, GGF-PPO shows only a marginal performance improvement over PPO (a 3.2% increase in Reward and a 13.3% reduction in KL). Therefore, the effectiveness of single-policy methods is also limited. Compared to CORY, they fundamentally cannot leverage the interaction and emergent intelligence of multiple LLMs to unleash the potential of Multi-LLM fine-tuning. Overall, we agree that the discussion on MORL is inevitable. However, we have already implicitly compared both multi-policy and single-policy methods in our manuscript. Thank you, we will incorporate this discussion into the appendix to explicitly discuss MORL algorithms. Attached Table 1 is shown as follows: | | Task-reward ↑ | KL divergence ↓ | |-----|---------------|-----------------| | PPO | 2.17 | 44.33 | | **GGF-PPO** | 2.24 | 38.45 | | ER-30 | 2.646 | 32.152 | | ER-17 | 2.626 | 21.73 | | ER-5 | 0.5284 | 0.3237 | | CORY | **2.668** | **15.179** | ### 2. **Clarification on baselines** ### More baselines are always better. However, we believe these two strong baselines, PPO and ER, should be sufficient to evaluate our method. PPO remains a strong baseline for RL fine-tuning of LLMs. Although some work has explored SAC [5], the experimental results show limited improvement comparing to PPO. In terms of preventing distribution collapse for RL fine-tuning, there is work such as NLPO [6], but its effectiveness is not as strong as ER. Thank you once again for your time. Should you have any further questions, please let us know. [1] Hayes C F, et al. "A practical guide to multi-objective reinforcement learning and planning." AAMAS (2022) [2] Hwang M, et al. "Promptable behaviors: Personalizing multi-objective rewards from human preferences." CVPR(2024) [3] TRL: https://github.com/huggingface/trl [4] Siddique U, et al. "Learning fair policies in multi-objective (deep) reinforcement learning with average and discounted rewards." ICML(2020) [5] Wen, Muning, et al. "Entropy-Regularized Token-Level Policy Optimization for Large Language Models." CoRR (2024). [6] Ramamurthy, Rajkumar, et al. "Is Reinforcement Learning (Not) for Natural Language Processing: Benchmarks, Baselines, and Building Blocks for Natural Language Policy Optimization." ICLR (2023).

Reviewer chZh2024-08-13

I thank the authors for the discussion of MORL. I'm happy to increase my score. I would just need more information about how GGF-PPO was tuned to obtain the results in the table and if this is fair to the rest of the methods.

Authorsrebuttal2024-08-14

Thank you for your positive feedback! Here is the information about the GGF-PPO experiment. Regarding the implementation: GGF-PPO achieves reward scalarization via weighting, enforcing constraints on the weights assigned to multiple objectives. This includes the requirement for weights to follow a strictly descending order and for their sum to equal 1. Consequently, we adjusted the weights used in PPO's gradient computation and bypassed the original handling of the KL coefficient in the TRL library. To ensure a fair comparison, we implemented the following adjustments: 1. We maintained the hyperparameters of GGF-PPO, except for the KL coefficient, to be consistent with those of PPO. 2. We ensured that the task reward and KL presented in the table represent actual measured values, rather than the weighted values utilized in PPO updates. 3. We conducted experiments using weight combinations of [0.9, 0.1], [0.8, 0.2], [0.7, 0.3], and [0.6, 0.4], exploring both scenarios where task reward is prioritized and where KL is prioritized, resulting in a total of eight sets of experiments. The best-performing set of results was selected for inclusion in the table.

Reviewer Syvc2024-08-12

I've read the author's response and I appreciate the additional discussion and clarifications. I would like to keep my score.

Authorsrebuttal2024-08-12

Thank you for your valuable Ethics Review. We would like to address your concerns as follows: ## **E1-1** language emergence or evolution ## Recently, there has been growing interest in how to make LLMs fine-tuning benefit from the co-evolution within multi-agent systems [1, 2]. Multi-agent systems generate diverse new data and policies, which may lead to the emergence of superior policies. To our knowledge, CORY is the first approach to extent RL fine-tuning into a MARL framework. As LLMs already possess fundamental language capabilities, what we emphasize by "Languages develop through agent interactions and are shaped by societal and cultural influences" is the "evolution" of language, i.e., evolve to fit downstream tasks. ## **E1-2** objective/subjective reward settings ## Thank you for your helpful suggestions. However, our objective reward functions refer to "pre-defined rule-based functions”, which encompass not only mathematical reasoning but also unit test scores, compilation success rates (for code generation), exact matches (for mathematical reasoning), BLEU scores (for summarization), etc. Subjective reward functions are clearly defined as "models trained on data capturing human preferences." We believe this definition is sufficiently clear. ## **E1-3** Origin of the name CORY ## Thank you for pointing this out. In fact, CORY is not an acronym but an abbreviation for easier dissemination, originating from Coevolving with the OtheR You (CORY). We appreciate your note and will clearly state the origin of the CORY abbreviation in the introduction section of the revised manuscript. ## **E1-4** A deeper discussion of ethical impacts (Dual Use) ## Thank you for your suggestion. We have conducted a more careful discussion on the ethical impacts through the lens of Dual Use and completed the checklist proposed by the article Thorny Roses. We will include this section in the broader Impacts section of the paper. [1] A social network for AI. Nat Mach Intell 5, 1175 (2023). [2] Duéñez-Guzmán, E.A., Sadedin, S., Wang, J.X. et al. A social path to human-like artificial intelligence. Nat Mach Intell 5, 1181–1188 (2023). The checklist we completed as proposed by Thorny Roses is shown below. - **C1**  Did you explicitly outline the intended use of scientific artefacts you create? Yes. We developed CORY, extending the RL fine-tuning of LLMs into a sequential cooperative MARL framework. As a plug-and-play method, CORY can build on top of any common LLM RL fine-tuning algorithm, thus enhancing the performance of the original algorithm. Besides the method CORY, we did not create any datasets or reward models containing harmful information. - **C2** Can any scientific artefacts you create be used for surveillance by companies or governmental institutions? No. As an enhanced RL fine-tuning method, CORY is unrelated to surveillance by companies or governmental institutions. - **C3** Can any scientific artefacts you create be used for military application? The motivation and method of CORY are unrelated to military applications. However, we must emphasize that although the datasets used in our experiments are filled with positive information, there is a risk if CORY is incorrectly applied to fine-tuning on datasets about military applications. Therefore, we call for the avoidance of using and constructing datasets and reward models for military purposes. - **C4**  Can any scientific artefacts you create be used to harm or oppress any and particularly marginalised groups of society? We emphasize that there is a risk if CORY is incorrectly applied to datasets containing harmful and discriminatory information. Therefore, we call for the avoidance of using and constructing datasets and reward models with harmful or discriminatory information. - **C5** Can any scientific artefacts you create be used to intentionally manipulate, such as spread disinformation or polarise people? We emphasize that there is a risk if this method is incorrectly applied to downstream tasks about spreading disinformation or polarizing people. Therefore, we call for the elimination of using and constructing datasets and reward models about disinformation or polarizing people. - **C6** Did you access your institution’s or other available resources to ensure limiting the misuse of your research? Yes, we have accessed our institution to ensure limiting the misuse of our research, including but not limited to the promotion, use, and modification of this method. - **C7** have you been provided by your institution with ethics training that covered potential mis-use of your research? Yes, we are confident that our institution has provided sufficient ethics training. - **C8** Were the scientific artefacts you created reviewed for dual use and approved by your institution’s ethics board? Yes, the scientific artefacts we created have been reviewed for dual use and approved by our institution's ethics board.

Authorsrebuttal2024-08-12

Thank you for your valuable ethics review. We would like to address your concerns as follows. ## **E2-1** Elaborate on the responsible use ## The motivation and methods of CORY are unrelated to harmful or discriminatory information. However, we need to emphasize that although the datasets used in our experiments contain positive information, there is a risk if the method is incorrectly applied to downstream tasks aimed at spreading disinformation or polarizing people. Therefore, we advocate for the prohibition of using and constructing datasets and reward models related to disinformation or polarizing people. Thanks, and we will include this discussion in the broader impacts section of the revised manuscript. ## **E2-2** Mitigation strategies ## Thank you very much for your suggestions. Value alignment can be achieved using human-annotated data that reflects safety preferences. For instance, [1] constructed a large-scale safety alignment dataset containing over 1 million preference pairs. They trained a cost model and a reward model on this dataset and employed safe RL to fine-tune the Apaca7B model. This approach significantly reduces model bias and discrimination, thereby enhancing the model's overall safety. Thanks, and we will include this discussion in the broader impacts section of the revised manuscript. ## **E2-3** Highly biased behavior of RL-fine-tuned LLM In the context of RL fine-tuning, biased behavior does not imply that the LLM produces harmful information, but rather a collapse in model distribution. For example, if the probability of the eos_token (end-token) in the token-level policy is too low compared to the pre-trained one, it could prevent sentences from ending, or result in the repetition of the same word until the maximum output length is reached. We want to emphasize that without a contaminated dataset (filled with harmful information), fine-tuning through reward signals is more likely to cause model distribution collapse (see our paper's Appendix D), rather than a dedicated distribution capable of outputting harmful speech. Therefore, the key lies in the use of datasets and the reward model. We should prevent researchers from fine-tuning models on datasets and reward models with negative impacts using CORY. Thank you for your reminder, we will include a more in-depth discussion of ethical impacts in the broader impacts section of the revised manuscript. [1] Ji, Jiaming, et al. "Beavertails: Towards improved safety alignment of LLM via a human-preference dataset." Advances in Neural Information Processing Systems 36 (2024).

Area Chair zTTL2024-08-12

Discussion period

The discussion period is almost over, so both authors and reviewers please respond to any unaddressed questions. Reviewers, be sure that you have all of the information you need from the authors, since after the 13th, they won't be able to respond.

Authorsrebuttal2024-08-14

We thank all the reviewers for their valuable suggestions and active engagement during the discussion phase. Your time and effort have clarified our work, and we sincerely appreciate the constructive feedback.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC