Abstract
Measuring the contribution of individual agents is challenging in cooperative multi-agent reinforcement learning (MARL). In cooperative MARL, team performance is typically inferred from a single shared global reward. Arguably, among the best current approaches to effectively measure individual agent contributions is to use Shapley values. However, calculating these values is expensive as the computational complexity grows exponentially with respect to the number of agents. In this paper, we adapt difference rewards into an efficient method for quantifying the contribution of individual agents, referred to as Agent Importance, offering a linear computational complexity relative to the number of agents. We show empirically that the computed values are strongly correlated with the true Shapley values, as well as the true underlying individual agent rewards, used as the ground truth in environments where these are available. We demonstrate how Agent Importance can be used to help study MARL systems by diagnosing algorithmic failures discovered in prior MARL benchmarking work. Our analysis illustrates Agent Importance as a valuable explainability component for future MARL benchmarks.
Introduction
In cooperative MARL, a group of agents works together to maximize a single, shared global reward. This creates a "credit assignment" problem: if the team succeeds, how do we know which agent did the heavy lifting and which one just tagged along? While Shapley values are mathematically rigorous tools from game theory used to solve this, they are computationally ruinous. Calculating them requires evaluating every possible subset (coalition) of agents, meaning the complexity grows exponentially ($2^n$) with the number of agents. For a team of 20 agents, a single calculation can take hours, making it useless for real-time debugging or large-scale systems.
Methods: Agent Importance (AI)
The authors propose Agent Importance (AI), which simplifies the contribution calculation by focusing only on the "grand coalition" (the full team).
- Difference Reward Logic: AI measures the difference between the team's reward when agent $i$ acts normally versus when agent $i$ performs a "no-op" (no-operation) action.
- Per-Step Aggregation: Unlike previous approximations (like MC-Shapley) that calculate rewards over entire episodes, AI computes this difference at every single timestep and averages it.
- Environment Cloning: To handle simulators that aren't easily "resettable," the authors use parallel copies of the environment for each agent to test the "what if they did nothing?" scenario simultaneously.
This shift from subset-sampling to per-step differencing drops the complexity from exponential to linear ($O(n)$), allowing the metric to scale to 50+ agents easily.
Datasets and Evaluation
The authors evaluated their method across three diverse MARL benchmarks:
- Level-Based Foraging (LBF): A coordination game where agents must collaborate to collect food based on their "levels."
- Multi-Robot Warehouse (RWARE): A sparse-reward environment simulating robots moving shelves in a warehouse.
- SMAClite: A lightweight implementation of the StarCraft Multi-Agent Challenge (SMAC), testing heterogeneous agent settings.
Key Results
The primary finding is that Agent Importance provides a high-fidelity approximation of the Shapley value at a fraction of the cost.
- High Fidelity: Agent Importance scores showed a Pearson correlation of >0.96 with true Shapley values across multiple tasks.
- Massive Speedup: For a 20-agent system, calculating the Shapley value took approximately 2 hours for a single environment step. Agent Importance took less than a second.
- Scalability: The authors successfully ran Agent Importance on scenarios with 50 agents, a feat that is computationally impossible for standard Shapley methods.
Insights into MARL Dynamics
- The "Equal Importance" Advantage: AI revealed why MAA2C sometimes outperforms MAPPO. MAA2C learns a more "equal" distribution of importance across agents. In stochastic environments like LBF, treating all agents as equally vital leads to more robust coordination.
- Parameter Sharing: The paper provides empirical evidence that parameter sharing leads to a more even distribution of credit. Without it, one or two agents often "dominate" the contribution scores, leading to fragile team dynamics.
- Role Discovery: In SMAClite, AI successfully identified roles, showing how certain agents might be sacrificed early to ensure team success, reflected in their importance scores.
Conclusion and Limitations
The primary limitation is the reliance on a "no-op" action, which might not be truly neutral in all environments. Future work could explore "random actions" or learned "minimal impact" actions. Additionally, the memory overhead of environment cloning could be mitigated by using JAX-based "stateless" environments. Overall, Agent Importance serves as a valuable, efficient explainability component for future MARL research.
Summary updated