Difference rewards policy gradients

Jacopo Castellini, Sam Devlin, Frans A. Oliehoek, Rahul Savani

TL;DR

This paper introduces Dr.Reinforce, a novel algorithm for multi-agent reinforcement learning (MARL) that tackles the challenging problem of credit assignment. By leveraging "difference rewards," Dr.Reinforce allows agents to better understand their individual contributions to the team's success, leading to more efficient learning and improved performance, especially in complex scenarios with many agents.

What Problem Does This Paper Address?

In multi-agent systems, where multiple agents must cooperate to achieve a common goal, a significant challenge is multi-agent credit assignment. Imagine a sports team: if the team wins, how do you know which player's actions were most crucial? Similarly, in MARL, when agents receive a single shared reward signal, it's difficult for an individual agent to discern how its specific actions contributed to the overall outcome. This ambiguity can lead to suboptimal learning and hinder the development of effective cooperative strategies. Existing methods like COMA attempt to address this by learning a complex action-value function (Q-function) to estimate individual contributions, but this approach can be computationally expensive and prone to issues like bootstrapping and moving targets, especially as the number of agents increases.

Methods

The core innovation of this paper is the use of difference rewards. Instead of relying solely on the shared reward, Dr.Reinforce calculates a shaped reward for each agent by comparing the actual reward received with a baseline reward (e.g., what would have happened if the agent had taken a default action). This difference signal directly attributes credit or blame to the agent's actions.

The paper proposes two main variants:

  • Dr.Reinforce: This version assumes the reward function is known. It directly incorporates difference rewards into the standard REINFORCE policy gradient algorithm. This means agents learn from a signal that explicitly highlights their individual impact.
  • Dr.ReinforceR: For scenarios where the reward function is unknown, Dr.ReinforceR learns a centralized reward network. This network is trained to estimate the true reward function, and its outputs are then used to compute difference rewards. Crucially, this network is only used during training (following the Centralized Training Decentralized Execution - CTDE paradigm) and is not needed during execution, simplifying deployment.

The key advantage of Dr.ReinforceR over methods like COMA is that learning a reward function is framed as a simpler regression problem, avoiding the complexities of learning Q-functions.

Datasets

The authors evaluated their methods on two gridworld environments:

  • Multi-Rover Domain: Agents must spread across landmarks to cover them, with a penalty for collisions.
  • Predator-Prey Domain: Agents (predators) must pursue a single prey.

They also tested their approach on the StarCraft II Multi-Agent Challenge (SMAC), a complex benchmark for cooperative MARL.

Key Insights and Ideas

  • Difference rewards are a powerful tool for credit assignment: By directly shaping rewards based on an agent's impact, learning becomes more efficient and effective.
  • Learning a reward function is easier than learning a Q-function: Dr.ReinforceR demonstrates that a simpler regression task (learning the reward) can be more robust and scalable than learning a complex action-value function, especially in multi-agent settings.
  • Dr.Reinforce scales better with more agents: The proposed methods consistently outperform baselines, particularly as the number of agents increases, highlighting their scalability.
  • Noise resilience: The difference rewards mechanism, especially when using a learned reward network, shows a good degree of resistance to common types of noise, which is crucial for real-world applications.

Key Results

  • Superior performance: Dr.Reinforce and Dr.ReinforceR consistently outperformed other compared baselines (including independent learners, CentralQ, and COMA) on both the Multi-Rover and Predator-Prey domains, achieving higher median returns.
  • Scalability: The performance advantage of Dr.Reinforce and Dr.ReinforceR was particularly pronounced as the number of agents increased, demonstrating better scalability compared to COMA.
  • SMAC success: In the challenging SMAC environment, Dr.ReinforceR also showed strong performance, often outperforming COMA, especially on heterogeneous maps.
  • Reward network accuracy: The learned reward network in Dr.ReinforceR exhibited low prediction errors on both on-policy and off-policy datasets, indicating good generalization capabilities.

Limitations and Future Work

  • Theoretical guarantees in partial observability: While Dr.Reinforce shows strong empirical results, the paper notes that in partially observable settings (Dec-POMDPs), the theoretical guarantees of convergence are lost because the baseline becomes biased.
  • Improving reward network generalization: The authors suggest that further research into improving the representational capabilities and generalization of the learned reward network is a promising future direction. This could lead to even better performance and applicability to more complex scenarios.
  • Decentralized reward networks: For scenarios requiring decentralized execution and learning, exploring the use of individual reward networks for each agent is proposed as a future avenue.
  • Potential-based reward shaping: The paper also suggests investigating potential-based reward shaping mechanisms as a way to restore theoretical convergence guarantees in partially observable settings.

Summary updated

BibTeX
@article{castellini2025difference,
  author = {Jacopo Castellini and Sam Devlin and Frans A. Oliehoek and Rahul Savani},
  title = {{Difference rewards policy gradients}},
  journal = {Neural Computing and Applications},
  year = {2025},
  doi = {10.1007/s00521-022-07960-5},
}
Figure