SPectral graph theory And Random walK (SPARK) toolbox for static and dynamic characterization of (di)graphs: A tutorial

PLoS One. 2025 Jun 5;20(6):e0319031. doi: 10.1371/journal.pone.0319031. eCollection 2025.

Abstract

Spectral graph theory and its applications constitute an important forward step in modern network theory. Its increasing consensus over the last decades fostered the development of innovative tools, allowing network theory to model a variety of different scenarios while answering questions of increasing complexity. Nevertheless, a comprehensive understanding of spectral graph theory's principles requires a solid technical background which, in many cases, prevents its diffusion through the scientific community. To overcome such an issue, we developed and released an open-source MATLAB toolbox - SPectral graph theory And Random walK (SPARK) toolbox - that combines spectral graph theory and random walk concepts to provide a both static and dynamic characterization of digraphs. Once described the theoretical principles grounding the toolbox, we presented SPARK structure and the list of available indices and measures. SPARK was then tested in a variety of scenarios including: two-toy examples on synthetic networks, an example using public datasets in which SPARK was used as an unsupervised binary classifier and a real data scenario relying on functional brain networks extracted from the EEG data recorded from two stroke patients in resting state condition. Results from both synthetic and real data showed that indices extracted using SPARK toolbox allow to correctly characterize the topology of a bi-compartmental network. Furthermore, they could also be used to find the "optimal" vertex set partition (i.e., the one that minimizes the number of between-cluster links) for the underlying network and compare it to a given a priori partition. Finally, the application to real EEG-based networks provides a practical case study where the SPARK toolbox was used to describe networks' alterations in stroke patients and put them in relation to their motor impairment.

MeSH terms

  • Algorithms
  • Brain / physiology
  • Brain / physiopathology
  • Electroencephalography
  • Humans
  • Software*
  • Stroke / physiopathology