Abstract
In Multi-Agent Reinforcement Learning (MARL), the "credit assignment" problem remains a significant hurdle, particularly in environments with sparse and delayed rewards. This paper introduces Agent-Time Attention (ATA), a novel Transformer-based framework designed to redistribute global, delayed team rewards into dense, individual rewards across both temporal and spatial dimensions. By leveraging the attention mechanism to identify causal actions across agents and time, ATA significantly enhances learning efficiency and performance in complex, long-horizon tasks.
1. Introduction
Reinforcement learning agents operating in multi-agent environments face a dual challenge when rewards are sparse. First, they must solve the temporal credit assignment problem: determining which action in a long sequence of steps led to a reward received much later. Second, they must solve the spatial (multi-agent) credit assignment problem: identifying which specific agent's contribution was responsible for the team's success.
Existing methods often address these dimensions in isolation. For instance, RUDDER focuses on temporal redistribution, while COMA addresses multi-agent credit assignment. However, few frameworks holistically integrate both. Agent-Time Attention (ATA) addresses this gap by using a Transformer architecture to act as a "reward translator," providing dense feedback that accounts for both "who" acted and "when" they acted.
2. The Agent-Time Attention (ATA) Framework
2.1 Architecture
ATA utilizes a Transformer-based architecture to process the observation-action histories of all agents. Unlike recurrent architectures like LSTMs, the Transformer's attention mechanism allows the model to "look back" across long sequences without the degradation associated with vanishing gradients, making it ideal for long-horizon tasks.
2.2 Dual Prediction and Redistribution
The model is trained to simultaneously predict two values at every timestep:
- Local Returns: The expected individual return for a specific agent.
- Global Returns: The expected return for the entire team.
Once the model is trained, it facilitates reward redistribution by analyzing the change in its predictions between timesteps. If the predicted return increases significantly following a specific agent's action, that agent receives an immediate, redistributed dense reward. This transformation turns a single end-of-episode signal into a continuous stream of feedback.
2.3 Auxiliary Loss and Balancing
To optimize the model, an auxiliary loss function is employed. This function balances the accuracy of global team success predictions with individual agent contributions. A hyperparameter, $\lambda$, is used to tune this balance, preventing agents from becoming "lazy" (relying on others) or "selfish" (competing for resources at the expense of the team).
3. Experimental Evaluation
The researchers evaluated ATA against several baselines, including COMA and IPG+RUDDER, across three primary environments:
- 1D Coin Environment: A coordination task where agents must collect coins. This environment highlights the "lazy agent" problem, where global rewards often fail to incentivize individual participation.
- Multi-agent MiniGrid (MultiRoom & DoorKey): These environments require complex navigation, such as finding keys to unlock doors. They are characterized by extremely sparse rewards, as agents only receive a signal upon reaching the final goal.
- StarCraft Multi-Agent Challenge (SMAC): A standard MARL benchmark used to verify the model's robustness, though its shorter horizons provide less of a challenge for reward redistribution than the MiniGrid setups.
4. Key Results and Insights
4.1 Superior Sample Efficiency
In the MiniGrid benchmarks, ATA combined with Policy Gradient (PG) methods consistently outperformed baselines. The framework reached higher average returns with significantly fewer samples, demonstrating that dense redistributed rewards provide a much stronger training signal than sparse end-of-episode rewards.
4.2 Solving the Coordination Problem
In the 1D Coin environment, ATA successfully incentivized agents to coordinate across the entire map. While temporal-only redistribution (RUDDER) often resulted in agents remaining in restricted zones, ATA's dual-axis attention allowed agents to understand their specific roles in the global task.
4.3 The Power of Intermediate Supervision
Training the model to predict returns at every timestep—rather than just the final outcome—was found to be a critical design choice. This intermediate supervision biases the model toward identifying the earliest causal actions, effectively pulling the reward signal back through time to the moments where critical decisions were made.
5. Limitations and Future Work
While effective, ATA introduces computational overhead due to the auxiliary Transformer model. In environments where simulation is extremely fast, the additional wall-clock time required for the reward translator may be a trade-off. Furthermore, the $\lambda$ hyperparameter currently requires manual tuning; future research could explore end-to-end methods for automatically balancing local and global reward signals. Finally, scaling ATA to high-fidelity, continuous-action simulators remains a primary objective for future development.
6. Conclusion
Agent-Time Attention provides a robust solution to the credit assignment problem in MARL. By treating reward redistribution as a sequence-modeling task and utilizing the strengths of Transformer architectures, ATA enables agents to learn effectively in environments that were previously too sparse for standard reinforcement learning algorithms.
Summary updated