/CommFormer

ICLR'2024: Learning Multi-Agent Communication from Graph Modeling Perspective

Primary LanguagePythonApache License 2.0Apache-2.0

Learning Multi-Agent Communication from Graph Modeling Perspective

Version License

Shengchao Hu1,2, Li Shen3*, Ya Zhang1,2, Dacheng Tao4

1 Shanghai Jiao Tong University, 2 Shanghai AI Laboratory, 3 JD Explore Academy, 4 Nanyang Technological University.

Contents

Overview

In numerous artificial intelligence applications, the collaborative efforts of multiple intelligent agents are imperative for the successful attainment of target objectives. To enhance coordination among these agents, a distributed communication framework is often employed. However, information sharing among all agents proves to be resource-intensive, while the adoption of a manually pre-defined communication architecture imposes limitations on inter-agent communication, thereby constraining the potential for collaborative efforts.

In this study, we introduce a novel approach wherein we conceptualize the communication architecture among agents as a learnable graph. We formulate this problem as the task of determining the communication graph while enabling the architecture parameters to update normally, thus necessitating a bi-level optimization process. Utilizing continuous relaxation of the graph representation and incorporating attention units, our proposed approach, CommFormer, efficiently optimizes the communication graph and concurrently refines architectural parameters through gradient descent in an end-to-end manner. Extensive experiments on a variety of cooperative tasks substantiate the robustness of our model across diverse cooperative scenarios, where agents are able to develop more coordinated and sophisticated strategies regardless of changes in the number of agents.


Installation

Dependences

pip install -r requirements.txt

StarCraft II & SMAC

Run the script

bash install_sc2.sh

Or you could install them manually to other path you like, just follow here: https://github.com/oxwhirl/smac.

Google Research Football

Please following the instructios in https://github.com/google-research/football.

Quick Start

When your environment is ready, you could run shells in the "scripts" folder with algo="commformer_dec". For example:

bash ./train_smac.sh  # run CommFormer on SMAC

If you would like to change the configs of experiments, you could modify sh files or look for config.py for more details.

Citation

If you find this work is relevant with your research or applications, please feel free to cite our work!

@misc{hu2024learning,
      title={Learning Multi-Agent Communication from Graph Modeling Perspective}, 
      author={Hu, Shengchao and Shen, Li and Zhang, Ya and Tao, Dacheng},
      booktitle={International Conference on Learning Representations (ICLR)}
      year={2024},
      
}

Acknowledgments

This repo benefits from MAT, NDQ, and IC3Net. Thanks for their wonderful works!