muxvizpy: a Python library for the analysis of multilayer biological networks
arXiv:2608.07344
Abstract
Biological systems are inherently multilayered: the same entities---genes, cells, or bacterial species---participate simultaneously in qualitatively distinct types of interactions, each carrying complementary information that no single relational view can capture. Analysing such systems with single-layer tools, or by collapsing layers into a monoplex projection, systematically discards inter-layer dependencies and can yield misleading conclusions about centrality, community structure, and robustness. The multilayer network formalism addresses, and \texttt{muxViz} established one of the first comprehensive toolkits for its structural analysis, but its R-only interface and dense data structures limit applicability to large biological networks. We introduce \textit{muxvizpy}, a Python library that reimplements and extends the \texttt{muxViz} analytical catalogue with a sparse linear-algebra stack built on SciPy and PyTorch. Muxvizpy exposes seven categories through a unified, composable API and is numerically validated against \texttt{muxViz} on synthetic Erdős--Rényi and Barabási--Albert multiplex networks while substantially reducing peak memory and wall-clock time at scale. We illustrate its applicability on a virus--human protein-interaction multiplex in which computing some structural analysis was unfeasible. \\[2pt] muxvizpy is freely available under the MIT licence at https://github.com/CoMuNeLab/MuxVizPy. Mathematical definitions of all implemented metrics are provided in the Additional File.
6 main pages, 20 supplementary pages, 2 main figures, 13 supplementary figures, 1 supplementary table