HyperNetX: A Python package for modeling complex network data as hypergraphs

Brenda Praggastis,Sinan Aksoy,Dustin Arendt,Mark Bonicillo,Cliff Joslyn,Emilie Purvine,Madelyn Shapiro,Ji Young Yun
2023-10-18
Abstract:HyperNetX (HNX) is an open source Python library for the analysis and visualization of complex network data modeled as hypergraphs. Initially released in 2019, HNX facilitates exploratory data analysis of complex networks using algebraic topology, combinatorics, and generalized hypergraph and graph theoretical methods on structured data inputs. With its 2023 release, the library supports attaching metadata, numerical and categorical, to nodes (vertices) and hyperedges, as well as to node-hyperedge pairings (incidences). HNX has a customizable Matplotlib-based visualization module as well as HypernetX-Widget, its JavaScript addon for interactive exploration and visualization of hypergraphs within Jupyter Notebooks. Both packages are available on GitHub and PyPI. With a growing community of users and collaborators, HNX has become a preeminent tool for hypergraph analysis.
Mathematical Software
What problem does this paper attempt to address?
The paper mainly introduces HyperNetX (HNX), an open-source Python library for the analysis and visualization of complex network data modeled in the form of hypergraphs. The paper aims to address the limitations of traditional graph theory in handling complex network data, especially when dealing with datasets involving many-to-many relationships or multi-node interactions. Specifically: - **Problem Addressed**: The concept of "graph" in traditional graph theory can only represent binary relationships between entities, i.e., one-to-one relationships. For many complex network datasets, this representation is overly simplistic and fails to capture the complexity of the data adequately. Therefore, the paper proposes using hypergraphs to model complex network data, as hypergraphs can represent connections among any number of nodes, thereby better describing complex systems in the real world. - **Tools Provided**: HyperNetX offers a rich set of features, including but not limited to: - Data structure support, allowing users to attach metadata to nodes, hyperedges, and node-hyperedge pairings; - Visualization module based on Matplotlib, with a JavaScript plugin HypernetX-Widget for interactive exploration in Jupyter Notebook; - Various algorithms and metrics, particularly those tailored to hypergraph characteristics, such as s-centrality; - Application of algebraic topology methods, such as the simplicial homology module, to identify and compute holes of different dimensions in simplicial complexes generated by hypergraphs of moderate size. With these features, HyperNetX aims to be a powerful toolbox for researchers exploring complex network data, supporting not only basic network analysis tasks but also advanced research needs such as algebraic topology analysis.