Leveraging Large Language Models for Effective and Explainable Multi-Agent Credit Assignment

Kartik Nagpal, Dayi Dong, Jean-Baptiste Bouvier, Negar MehrarXiv 2025

Abstract

Recent work, spanning from autonomous vehicle coordination to in-space assembly, has shown the importance of learning collaborative behavior for enabling robots to achieve shared goals. A common approach for learning this cooperative behavior is to utilize the centralized-training decentralized-execution paradigm. However, this approach also introduces a new challenge: how do we evaluate the contributions of each agent's actions to the overall success or failure of the team. This credit assignment problem has remained open, and has been extensively studied in the Multi-Agent Reinforcement Learning literature. In fact, humans manually inspecting agent behavior often generate better credit evaluations than existing methods. We combine this observation with recent works which show Large Language Models demonstrate human-level performance at many pattern recognition tasks. Our key idea is to reformulate credit assignment to the two pattern recognition problems of sequence improvement and attribution, which motivates our novel LLM-MCA method. Our approach utilizes a centralized LLM reward-critic which numerically decomposes the environment reward based on the individualized contribution of each agent in the scenario. We then update the agents' policy networks based on this feedback. We also propose an extension LLM-TACA where our LLM critic performs explicit task assignment by passing an intermediary goal directly to each agent policy in the scenario. Both our methods far outperform the state-of-the-art on a variety of benchmarks, including Level-Based Foraging, Robotic Warehouse, and our new Spaceworld benchmark which incorporates collision-related safety constraints. As an artifact of our methods, we generate large trajectory datasets with each timestep annotated with per-agent reward information, as sampled from our LLM critics.

Introduction: The Credit Assignment Challenge

In cooperative Multi-Agent Reinforcement Learning (MARL), teams of agents often work toward a shared goal but receive only a single global reward upon completion. This creates the Structural Credit Assignment problem: determining the specific contribution of each individual agent to the team's success or failure. Traditional "black-box" neural network critics often struggle with sparse rewards and lack the transparency needed to understand agent behavior.

Furthermore, agents must navigate the Agreement Problem, balancing collaboration to avoid both "under-collaboration" (failing to assist) and "over-collaboration" (redundant effort). This paper proposes that since humans are adept at identifying these patterns through visual inspection, Large Language Models (LLMs)—trained on vast human reasoning data—can be reframed as "general pattern machines" to solve credit assignment as a sequence improvement and attribution task.

Methodology: LLM-Based Centralized Critics

The authors introduce two novel frameworks: LLM-MCA (Multi-agent Credit Assignment) and LLM-TACA (Task and Credit Assignment). Both utilize the centralized-training decentralized-execution (CTDE) paradigm.

The proposed centralized training framework utilizing an LLM as a reward-critic to decompose global rewards into individualized feedback.

LLM-MCA

During training, a centralized LLM critic (e.g., Gemma-7B) is provided with a "Base Prompt" containing environment rules, credit assignment definitions, and agent trajectories. The LLM acts as a critic, outputting numerical reward values for each agent per timestep, accompanied by natural language explanations. These signals are then parsed to update the agents' policy networks.

LLM-TACA

This extension enhances the critic's role by allowing it to provide explicit, intermediary "task assignments" or sub-goals to agents during training. To ensure agents can eventually operate independently, a controlled dropout technique is used to gradually remove these hints, allowing agents to internalize the collaborative strategies without constant LLM supervision.

Experimental Results

The frameworks were evaluated against state-of-the-art baselines (MAPPO, QMIX, LICA) across several benchmarks, including Level-Based Foraging (LBF), Robotic Warehouse (RWARE), and a new custom environment, Spaceworld.

Performance comparison on the Spaceworld-10x10 benchmark, showing LLM-MCA and LLM-TACA achieving perfect scores compared to traditional MARL baselines.

In the Robotic Warehouse "Tiny 4p" scenario, LLM-TACA achieved a score of 33.65, vastly outperforming MAPPO's 2.05. In Spaceworld, which involves high-stakes collision constraints, both LLM-based methods achieved perfect scores of 10.0, while baselines struggled significantly. The LLM's "common sense" heuristics helped overcome the "cold start" problem typical in sparse-reward environments, providing immediate guidance where traditional methods require extensive exploration.

Conclusion

By reframing credit assignment as a pattern recognition problem, LLM-MCA and LLM-TACA provide a powerful, explainable alternative to traditional MARL critics. While inference speed and cost remain challenges for scaling, the ability to generate human-readable explanations and leverage pre-trained reasoning significantly advances the state-of-the-art in multi-agent coordination. Future work will explore competitive tasks and specialized, faster LLMs for real-time deployment.

Summary updated

BibTeX
@misc{nagpal2025leveraging,
  author = {Kartik Nagpal and Dayi Dong and Jean-Baptiste Bouvier and Negar Mehr},
  title = {{Leveraging Large Language Models for Effective and Explainable Multi-Agent Credit Assignment}},
  year = {2025},
  eprint = {2502.16863},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.16863},
}
Figure