NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Speaking the Language of Teamwork: LLM-Guided Credit Assignment in Multi-Agent Reinforcement Learning

Muhan Lin, Shuyang Shi, Yue Guo, Vaishnav Tadiparthi, Behdad Chalaki, Ehsan Moradi Pari, Simon Stepputtis, Woojun Kim, Joseph Campbell, Katia P. Sycara · DOI

TL;DR

This paper tackles the "credit assignment" problem in multi-agent reinforcement learning (MARL), where it's hard to figure out which agent contributed to the team's success or failure, especially with sparse rewards. They propose a novel framework that uses Large Language Models (LLMs) to generate dense, agent-specific rewards by understanding natural language task descriptions, leading to faster learning and better performance.

What Problem Does This Paper Address?

In multi-agent reinforcement learning (MARL), multiple agents must collaborate to achieve a common goal. A significant hurdle is "credit assignment": determining how much each individual agent contributed to the team's overall success or failure. This is particularly challenging in environments with sparse rewards, where feedback is infrequent and delayed. Traditional methods like value decomposition can struggle in these scenarios, and manually designing dense reward functions that align with human intuition is complex and time-consuming. This paper aims to bridge this gap by leveraging LLMs to automatically generate informative, agent-specific rewards that facilitate effective credit assignment.

Methods

The core of the proposed method, LLM-guided Credit Assignment (LCA), involves using LLMs to generate dense, agent-specific rewards. Here's a breakdown:

  1. Task Description Generation: The system first infers natural language descriptions of the team's goal and key steps from existing team reward structures by analyzing sampled trajectories. This is crucial for environments that don't inherently provide such descriptions.
  2. Agent-Specific State Ranking: For each agent, the LLM is prompted to rank state transitions from that agent's perspective. To achieve this, the LLM is given an "ego" agent (the one being evaluated) and "teammate" agents. This allows the LLM to understand the context of collaboration and evaluate the "ego" agent's contribution relative to its teammates.
  3. Potential-Based Reward Function: The LLM's rankings are used to train a state-scoring model (a potential function). The difference in scores between consecutive states is then used to formulate a potential-based reward function for each agent. This approach, inspired by Reinforcement Learning from AI Feedback (RLAIF), is designed to be robust to LLM ranking errors.
  4. Multi-Query Approach: To further mitigate LLM inaccuracies, especially with smaller models, the framework supports a multi-query approach where state pairs are ranked multiple times. This helps to average out inconsistencies and improve the reliability of the generated rewards.

Datasets

The paper evaluates LCA on three multi-agent environments:

  • Two-Switch: A grid world scenario where two agents must trigger switches to open a door.
  • Victim-Rubble: Another grid world scenario where one agent clears rubble and another rescues victims.
  • Pistonball: A standard environment from PettingZoo where multiple agents push a ball to a target.

The paper does not introduce new datasets but uses these existing environments to test their LLM-generated reward functions. They also synthesize ranking datasets with varying accuracy levels (60-90%) to test the robustness of their method.

Key Insights and Ideas

  • LLMs as Reward Designers: The paper demonstrates that LLMs can effectively act as sophisticated reward designers, understanding complex collaborative tasks and generating nuanced, agent-specific feedback that goes beyond simple team rewards.
  • Decomposing Collaboration: By prompting the LLM to rank states from an individual agent's perspective ("ego" vs. "teammate"), LCA successfully decomposes the joint credit assignment problem into individual agent contributions, a key challenge in MARL.
  • Robustness to LLM Errors: The use of potential-based reward shaping and a multi-query approach makes the system resilient to LLM hallucination and ranking inconsistencies, allowing for the use of smaller, more accessible LLMs without significant performance degradation.
  • Beyond Simple Rewards: LCA's rewards are not just about achieving the ultimate goal but also about making progress and avoiding "lazy" agent behavior, as seen in the Victim-Rubble example where agents are rewarded for critical turns and penalized for inaction even when teammates are progressing.

Key Results

  • Faster Convergence & Higher Returns: Agents trained with LCA consistently achieved faster convergence to optimal policies and higher overall returns compared to state-of-the-art MARL baselines, including those using hand-crafted dense rewards.
  • Effectiveness with Smaller LLMs: The method showed significant improvements even when using smaller, more error-prone LLMs (like Llama3.1-70B:q3) with a multi-query approach, highlighting its practical applicability.
  • Robustness to Ranking Quality: Experiments with synthetic ranking datasets showed that LCA's performance improved significantly with higher accuracy rankings, but even with 70% accuracy, the multi-query approach yielded substantial gains over single-query methods.
  • Qualitative Improvements: In the Victim-Rubble environment, LCA rewards encouraged progress and penalized inaction, effectively addressing issues like "lazy" agents and promoting more efficient collaboration.

Limitations and Future Work

  • LLM Hallucination Mitigation: While the potential-based reward shaping and multi-query approach mitigate LLM errors, they don't entirely eliminate them. The paper acknowledges that LLM hallucination can still lead to misleading rewards.
  • Dependency on Task Description: The effectiveness of LCA relies on the LLM's ability to understand the task description. If the inferred natural language descriptions are poor or incomplete, the generated rewards might be suboptimal.
  • Computational Cost: While smaller LLMs are supported, the multi-query approach can increase the computational cost of reward generation.

Future work could explore more advanced techniques for LLM error correction, investigate methods for automatically generating richer task descriptions, and further optimize the computational efficiency of the multi-query process. The paper also suggests that LCA's robustness to ranking errors makes it a promising direction for using smaller, more accessible language models in MARL.

Summary updated

BibTeX
@misc{lin2025speaking,
  author = {Muhan Lin and Shuyang Shi and Yue Guo and Vaishnav Tadiparthi and Behdad Chalaki and Ehsan Moradi Pari and Simon Stepputtis and Woojun Kim and Joseph Campbell and Katia P. Sycara},
  title = {{Speaking the Language of Teamwork: LLM-Guided Credit Assignment in Multi-Agent Reinforcement Learning}},
  year = {2025},
  eprint = {2502.03723},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.03723},
}
Figure