MARFT: Multi-Agent Reinforcement Fine-Tuning
Organizations: Shanghai Jiao Tong University · Shanghai Innovation Institute · OPPO Research Institute
Abstract
Large Language Model (LLM)-based Multi-Agent Systems (LaMAS) offer a promising approach to collaborative tasks, but applying reinforcement learning to these systems remains challenging because classical multi-agent reinforcement learning assumptions do not fully capture their dependency structures, heterogeneous roles, and autoregressive outputs. This article provides a tutorial-style overview of the transition from reinforcement learning to reinforcement fine-tuning in single-agent and multi-agent settings, highlighting the differences between classical MARL and LLM-based multi-agent optimization. We introduce Multi-Agent Reinforcement Fine-Tuning (MARFT) and formalize LaMAS optimization as a Flexible Markov Game (Flex-MG). The MARFT framework combines predecessor-conditioned policy optimization, a centralized critic, parameter-efficient adapters, and token-level credit assignment. Our token-level analysis clarifies how within-action discounting affects returns and establishes consistency with action-level returns when the token discount is one. Experiments on fixed two- to four-agent mathematical and coding workflows compare MARFT with and without policy parameter sharing against IPPO. Both variants report higher mean evaluation scores in all 24 benchmark-team-size settings, while the variant without parameter sharing shows the clearest advantage in final training reward. Role-specification ablations examine how prescribed roles affect training. We conclude with application perspectives and open challenges, including dynamic workflows, sample efficiency, and system-level reliability. Code: https://github.com/jwliao-ai/MARFT.
Figures & tables
| RL | RFT | |
|---|---|---|
| Actor | Policy from scratch | Large-scale pretrained foundation model |
| Constraint | No constraint | Maintain original capabilities |
| Action Space Size | Typically small, numerable | Huge, or |
| Transition | Stochastic | Deterministic and Stochastic |
| Granularity | Action | Action or token |
| Process | Reset state and sample traj. | Reset query, sample traj. and verify answer |
| MARL | MARFT | |
|---|---|---|
| Execution Asynchronicity | Synchronous | Asynchronous |
| Utilities | Task-specific only | Agentic with original language ability |
| Agent Identity | Unspecified, usually id | Specified system prompts as profiles |
| Heterogeneity | Parameters | In-out formats, externals, parameters |
| System Organization | Static | Static/Dynamic |
| Optimization Space | Small | Large and variable |
| Benchmark | Duo | Trio | Quad | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Van. | IPPO | MARFT | Van. | IPPO | MARFT | Van. | IPPO | MARFT | ||||
| PS | w/o PS | PS | w/o PS | PS | w/o PS | |||||||
| DeepCoder | 45.28 | 46.95 | 52.68 | 50.02 | 50.38 | 51.38 | 55.18 | 53.97 | 47.16 | 51.30 | 57.02 | 56.33 |
| LiveCodeBench | 169.19 | 176.93 | 180.23 | 183.98 | 160.51 | 162.72 | 167.18 | 170.22 | 152.09 | 156.48 | 164.92 | 167.52 |
| CodeForces | 24.04 | 24.28 | 26.59 | 29.47 | 24.00 | 24.06 | 27.68 | 27.97 | 20.50 | 21.88 | 28.05 | 25.07 |
| AIME2024 | 2.00 | 3.33 | 10.00 | 6.67 | 2.00 | 4.00 | 6.67 | 6.67 | 2.00 | 2.67 | 6.67 | 3.33 |
Multi-Agent LLM Systems
Multi-agent large language model systems coordinate multiple AI agents to solve tasks through communication, specialization, shared tools, and memory.
See all 1,032 papers