Inverse Attention Agents for Multi-Agent Systems

Qian Long, Ruoyan Li, Minglu Zhao, Tao Gao, Demetri Terzopoulos

TL;DR

This paper introduces Inverse Attention Agents, a novel framework that enables multi-agent systems to adapt to unfamiliar teammates and opponents by inferring their "attentional states." By algorithmically modeling a specific component of Theory of Mind (ToM)—what others are paying attention to—these agents achieve state-of-the-art performance in ad-hoc collaboration and exhibit human-like coordination.

What Problem Does This Paper Address?

A persistent "wall" in Multi-Agent Reinforcement Learning (MARL) is the ad-hoc teamwork problem. Agents trained in a specific cohort often become "overfit" to their teammates' quirks. When placed in a new environment with unfamiliar agents or humans, their performance collapses because they cannot comprehend or predict the strategies of these new partners.

Traditional approaches to solving this involve Theory of Mind (ToM)—the cognitive ability to attribute mental states like beliefs and desires to others. However, classical ToM models often rely on computationally expensive Bayesian inference. The authors argue that a crucial, yet neglected, part of ToM is attention. If an agent can deduce what its teammate is focusing on (e.g., a specific landmark or a specific threat), it can better align its own actions without needing complex, explicit communication.

Methods

The authors propose a three-phase training pipeline to create an Inverse-Attention (Inverse-Att) Agent:

  1. Self-Attention Phase: Agents are first trained using a self-attention mechanism over environmental "goals." These goals are represented not as raw coordinates, but as Gradient Fields (GF)—a higher-level representation that captures future trends and environmental boundaries. The agent learns to assign weights ($w$) to these goals to decide its actions.
  2. Inverse Attention Network (IAN) Training: The authors collect the attention weights and observations from Phase 1 to train an IAN. This network learns to do the opposite: given an agent's observations and actions, it predicts what that agent's internal attention weights must have been.
  3. Inverse-Attention Integration: In the final phase, the Inverse-Att agent uses the IAN to "step into the shoes" of its teammates. It infers their attentional states and uses that information to update its own attention weights ($\tilde{w}$), effectively fine-tuning its policy in real-time based on its partners' perceived focus.
Figure 1: Pipeline for training the inverse attention agent: The first phase involves applying a self- attention mechanism, where the agent assigns attention weights to its observations and acts based on these weights. In the second phase, the agent performs attention inference on other agents of the same type using the inverse attention network. By placing itself in the position of these agents, it infers their attention weights, gaining insights into their goals and behaviors. In the final phase, the inverse attention agent uses the inferred information from the previous step to update its original attention weights, {w1, w2, . . . , wn} to { ˜w1, ˜w2, . . . , ˜wn}, consequently leading to changes in its final actions.

The architecture (shown below) utilizes a weight-updating model ($UW_i$) that concatenates the agent's original attention with the inferred attention of others, allowing for a more flexible, "mentalistic" approach to decision-making.

Figure 2: Network architecture of the inverse attention agent. For agent i, Wi is the observation embedding function which takes in the observation and outputs initial attention weights. IWi is the inverse attention network which takes in the action and observation of the other agents and outputs the inferred attention weights. The UWi takes consideration of self initial weights and inferred weights from others and update ai’s attention weights. The hi function outputs the final action based on the updated weights.

Datasets

The model was evaluated using the Multi-agent Particle Environment (MPE), a standard benchmark for communication and coordination. The authors tested across five distinct scenarios:

  • Spread: Fully cooperative; agents must cover multiple landmarks.
  • Adversary: Competitive; wolves hunting sheep.
  • Grassland: A mixed game involving sheep, wolves, and grass collection.
  • Navigation: Cooperative; fast agents must accommodate a slow teammate.
  • Tag: Mixed; wolves chasing sheep through obstacles.

Additionally, the authors conducted human experiments where five participants played alongside these agents to test real-world adaptability.

Key Insights and Ideas

  • Attention as a Proxy for Intent: Instead of trying to guess a teammate's entire "belief system," simply knowing what they are looking at provides enough signal for high-level coordination.
  • Gradient Fields vs. Raw Data: Using score-matching generative models to create Gradient Fields allows agents to understand the "pull" of goals in the environment, making the attention mechanism much more effective than using raw relative coordinates.
  • Individualistic Perspective: Unlike "shared agency" models that require agents to converge on a single group-level mental state, Inverse-Att agents maintain their own perspective while simply "listening" to the attentional cues of others.
  • Non-linear Synergy: As more Inverse-Att agents are added to a team, the group reward increases non-linearly (Table 6), suggesting that these agents are particularly good at "cooperating with other attention-aware agents."

Key Results

The Inverse-Att agent consistently outperformed standard baselines like MAPPO, IPPO, and even other ToM-based models (ToM2C*).

  • Performance Leap: In the Spread environment, Inverse-Att achieved a score of 404.14, compared to MAPPO's 31.82 and the Self-Attention baseline's 283.89 (Table 1).
  • Human Synergy: In human trials, Inverse-Att agents were the most successful at collaborating with people. In the Spread task, teams with Inverse-Att agents scored 332.3, significantly higher than teams with MAPPO agents (16.8) or even teams of only humans (115.86) (Table 5).
  • Inference Accuracy: The IAN proved remarkably accurate, reaching nearly 100% accuracy in predicting the primary goal an agent was attending to across all tested roles (Figure 4).

Limitations and Future Work

  • Homogeneous Inference: Currently, the attention inference is limited to agents of the same type. The authors aim to expand this to model the ToM of heterogeneous agents (e.g., a wolf inferring a sheep's attention).
  • Scalability of Weights: The current $UW$ network is designed for a fixed number of inputs. Future iterations will look into architectures that can accommodate an arbitrary number of inferred attentional states.
  • Partial Observability: While the paper touches on this in the appendix, more work is needed to see how these agents perform when they can only see a small fraction of their teammates' actions.

Summary updated

BibTeX
@inproceedings{long2025inverse,
  author = {Qian Long and Ruoyan Li and Minglu Zhao and Tao Gao and Demetri Terzopoulos},
  title = {{Inverse Attention Agents for Multi-Agent Systems}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=OaoDVZntGe},
}
Figure