Sparse Masked Attention Policies for Reliable Generalization
Organizations: Department of Intelligent Systems, Delft University of Technology, Delft, Netherlands.
Abstract
In reinforcement learning, abstraction methods that remove unnecessary information from the observation are commonly used to learn policies which generalize better to unseen tasks. However, these methods often overlook a crucial weakness: the function which extracts the reduced-information representation has unknown generalization ability in unseen observations. In this paper, we address this problem by presenting an information removal method which more reliably generalizes to new states. We accomplish this by using a learned masking function which operates on, and is integrated with, the attention weights within an attention-based policy network. We demonstrate that our method significantly improves policy generalization to unseen tasks in the Procgen benchmark compared to standard PPO and masking approaches.
Figures & tables
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Environment | CNN | Attention | Input Masked Attention | Sparse Masked Attention (ours) |
|---|---|---|---|---|
| bigfish | 2.35 0.35 | 11.32 2.14 | 11.96 1.16 | 21.61 0.87 |
| fruitbot | 27.68 0.28 | 30.07 0.21 | 29.61 0.18 | 30.74 0.20 |
| coinrun | 8.92 0.06 | 8.42 0.15 | 8.21 0.12 | 8.84 0.10 |
| dodgeball | 2.19 0.12 | 3.85 0.69 | 4.86 0.38 | 10.95 0.30 |
| heist | 1.98 0.09 | 2.62 0.23 | 2.74 0.16 | 4.12 0.23 |
| starpilot | 42.56 0.57 | 36.69 1.21 | 38.43 1.32 | 46.38 0.89 |
| Environment | CNN | Attention | Input Masked Attention | Sparse Masked Attention (ours) |
|---|---|---|---|---|
| bigfish | 9.73 0.97 | 14.42 2.64 | 15.75 1.41 | 26.51 1.31 |
| fruitbot | 31.15 0.09 | 31.45 0.14 | 31.46 0.10 | 32.49 0.13 |
| coinrun | 9.78 0.04 | 9.68 0.10 | 9.32 0.11 | 9.51 0.11 |
| dodgeball | 6.90 0.16 | 5.33 0.79 | 6.81 0.51 | 13.24 0.36 |
| heist | 7.41 0.10 | 6.46 0.42 | 5.51 0.22 | 8.36 0.08 |
| starpilot | 44.68 0.59 | 37.27 1.04 | 38.15 1.03 | 48.61 1.12 |
Reinforcement Learning
Reinforcement learning studies how agents learn sequential decisions from rewards and interaction, balancing exploration, performance, safety, and adaptation.
See all 1,717 papers