The CompleX Group Interactions (XGI) library provides data structures and algorithms for modeling and analyzing complex systems with group (higher-order) interactions.
Many datasets can be represented as graphs, where pairs of entities (or nodes) are related via links (or edges). Examples are road networks, energy grids, social networks, neural networks, etc. However, in many other datasets, more than two entities can be related at a time. For example, many scientists (entities) can collaborate on a scientific article together (links), and multiple email accounts (entities) can all participate on the same email thread (links). In this latter case, graphs no longer present a viable alternative to represent such datasets. It is for this kind of datasets, where the interactions are given among groups of more than two entities (also called higher-order interactions), that XGI was designed for.
XGI is implemented in pure Python and is designed to seamlessly interoperate with the rest of the Python scientific stack (numpy, scipy, pandas, matplotlib, etc). XGI is designed and developed by network scientists with the needs of network scientists in mind.
Sign up for our mailing list and follow XGI on Twitter or Mastodon!
To install and use XGI as an end user, execute
pip install xgi
To install for development purposes, first clone the repository and then execute
pip install -e .['all']
If that command does not work, you may try the following instead
pip install -e .\[all\]
XGI was developed and tested for Python 3.8-3.11 on Mac OS, Windows, and Ubuntu.
A number of higher-order datasets are available in the XGI-DATA repository and can be easily accessed with the
The Why, How, and When of Representations for Complex Systems, Leo Torres, Ann S. Blevins, Danielle Bassett, and Tina Eliassi-Rad.
Networks beyond pairwise interactions: Structure and dynamics, Federico Battiston, Giulia Cencetti, Iacopo Iacopini, Vito Latora, Maxime Lucas, Alice Patania, Jean-Gabriel Young, and Giovanni Petri.
What are higher-order networks?, Christian Bick, Elizabeth Gross, Heather A. Harrington, Michael T. Schaub.
From networks to optimal higher-order models of complex systems, Renaud Lambiotte, Martin Rosvall, and Ingo Scholtes.
If you want to contribute to this project, please make sure to read the code of conduct and the contributing guidelines.
The best way to contribute to XGI is by submitting a bug or request a new feature by opening a new issue.
To get more actively involved, you are invited to browse the issues page and choose one that you can work on. The core developers will be happy to help you understand the codebase and any other doubts you may have while working on your contribution.
If you are interested in the daily goings-on of XGI, you are invited to join our Zulip channel.
The core XGI team members:
The XGI package has been supported by NSF Grant 2121905, HNDS-I: Using Hypergraphs to Study Spreading Processes in Complex Social Networks.
This project is licensed under the BSD 3-Clause License.
Copyright (C) 2021-2023 XGI Developers