Abstract
Multi-Agent Reinforcement Learning (MARL) often struggles with generalization and sparse reward signals. We present SocialGFs, a framework that learns "Social Gradient Fields"—vector fields representing virtual attractive and repulsive forces—from offline examples. By decomposing complex social behaviors into these learned gradients, agents can achieve superior generalization across varying population sizes and tasks, effectively bridging the gap in sparse reward environments without the need for brittle, handcrafted force models.
Introduction
Training multi-agent systems is notoriously difficult due to the complexity of coordination and the prevalence of sparse rewards. Traditional approaches often fail to generalize; for instance, a policy optimized for a specific number of agents may collapse when the population scales. While "social force models" from robotics and sociology offer a potential solution by using potential fields to guide movement, these are typically handcrafted and difficult to scale to dynamic environments.
SocialGFs addresses this by learning these social forces directly from data. By representing the environment as a composition of learned gradient fields, agents gain a "sense of direction" that guides them toward successful states and away from failures, even before receiving an environmental reward.
Methods
The SocialGFs framework operates through a three-stage pipeline designed to transform raw state data into actionable social forces:
- Offline Example Collection: Snapshots of successful and failed states (e.g., prey being caught or agents reaching goals) are gathered and categorized into Attractive ($S^+$) and Repulsive ($S^-$) sets.
- Learning Fields via Score Matching: The core innovation involves using Denoising Score Matching (DSM) to learn a score function. This function generates a vector field where every point in the state space points toward high-density regions of "good" examples or away from "bad" ones.
- Policy Training: Agents are trained using standard MARL algorithms (like MAPPO), but their observations are augmented with these gradient vectors. An agent effectively "feels" the pull of objectives and the push of threats.
An advanced variant, SocialGFs+, utilizes the magnitude of these gradients to shape rewards, providing a dense training signal that facilitates learning in environments where rewards are otherwise rare.
Key Insights and Ideas
Compositionality and Generalization
A primary advantage of SocialGFs is compositionality. Complex social dynamics are decomposed into simpler, independent forces—such as "avoiding obstacles," "chasing prey," or "seeking resources." These fields can be mixed and matched dynamically. This allows for Zero-Shot Adaptation (referred to as SocialGFs*), where an agent can adapt to a new environment configuration (e.g., more enemies or relocated goals) simply by swapping the underlying gradient fields without retraining the policy.
Overcoming Sparse Rewards
By using score matching, the success signal is "spread" across the entire state space. Instead of wandering randomly until hitting a goal, agents can follow the "scent" of the gradient field from the very beginning of training, significantly accelerating convergence in difficult tasks.
Experimental Results
The authors evaluated SocialGFs in the Particle-World Environment across several tasks, including competitive predator-prey games (Grassland) and complex coordination tasks (Team Navigation).
- Performance in Sparse Settings: In the highly challenging "Team Navigation" task, baseline MAPPO models failed to achieve any success (0%). In contrast, SocialGFs+ achieved a 35.9% success rate and maintained performance as the task scaled.
- Robust Scaling: In the Grassland environment, SocialGFs-trained agents consistently outperformed baselines across various population densities, from 2v2 to 8v8 scenarios.
- Transferability: Models trained on a 4v4 scale demonstrated the ability to transfer to different population sizes and tasks with minimal performance loss, confirming that learned social forces are a more robust representation than raw coordinates.
Conclusion and Future Work
SocialGFs provides a scalable, data-driven method for incorporating social forces into MARL. While currently demonstrated in 2D particle worlds, the framework shows great promise for complex coordination. Future research aims to automate the prioritization of different gradient fields and extend the approach to high-dimensional, photo-realistic 3D environments to test the limits of these learned social forces.
Summary updated