STAG: Spectral Toolkit of Algorithms for Graphs

STAG is an open-source C++ and Python library for efficient spectral graph algorithms which I am developing with He Sun. The project is under active development and the project website will be kept up to date with the latest status. To get started with using STAG, see the documentation.

The technical report includes a user guide and some example applications.

Spectral Toolkit of Algorithms for Graphs: Technical Report (1)

arXiv PDF code

Local Clustering

The STAG library provides an easy-to-use implementation of the ACL local graph clustering algorithm. In our paper "Local Algorithms for Finding Densely Connected Clusters", we introduce a variant of the ACL algorithm which finds clusters in a graph with many edges between them.

The web-app here is implemented with STAG and gives an interactive demonstration of our algorithm on the military disputes dataset. The source code for the demo is available here.

Image Segmentation with Spectral Clustering

Spectral clustering is a popular technique for image segmentation. In our paper "A Tighter Analysis of Spectral Clustering, and Beyond", we discovered that using fewer eigenvectors for image segmentation with spectral clustering often gives better results. The python script available on GitHub gives a high-level API for image segmentation with spectral clustering.

Example Usage

python pic.jpeg picSegmented.jpeg 40

© 2023 Peter Macgregor