gspx
gspx is a Rust crate for sparse graph signal processing. It provides fast
implementations of graph convolution using rational kernel
fitting (and alternatively using the slower Chebyshev method). Supports dynamic graphs for applications with a changing network topology.
It was designed around large sparse networks such as power systems, but the API works with any sparse Laplacian.
License: GPL-3.0-only
MSRV: Rust 1.85
Install
[]
= "0.1"
What It Provides
- Exact lowpass, bandpass, and highpass filtering on sparse Laplacians
- Reusable dynamic filtering after low-rank branch updates
- Chebyshev polynomial approximations for faster approximate filtering
- Rational kernel fitting through vector fitting
- SGMA for joint spatial-temporal analysis
Quick Start
If you already have a Laplacian in memory, you can start filtering immediately:
use ;
use TriMat;
Loading Local Files
If your graph data is already stored on disk, use the direct file loaders:
use ;
use Path;
Main APIs
Exact and Dynamic Filtering
StaticConvolverfor fixed graphsDynamicConvolverfor graphs that receive branch updates throughadd_branchlowpass(...),bandpass(...), andhighpass(...)for analytical filters
Approximate Filtering
ChebyModelto fit Chebyshev kernelsChebyConvolverto apply them efficiently on sparse graphs
Custom Rational Kernels
VfModelto fit rational kernels from sampled spectral responsesVfKernelto store poles, residues, and direct terms
SGMA
Sgmafor spectral graph modal analysisspectrum(...),spectrum_complex(...),find_peaks(...),find_modes(...)
Helpers
impulse(&laplacian, vertex_index, n_channels)impulse_1d(&laplacian, vertex_index)estimate_spectral_bound(&laplacian)
Signal Shape Conventions
Filtering APIs accept either:
- 1D signals with shape
(n_vertices,) - 2D signal matrices with shape
(n_vertices, n_signals)
For SGMA, the signal matrix is (n_vertices, n_times) and the time vector
length must match n_times.
Repository Examples
The repository includes runnable examples under examples/.
If you cloned this repository, the larger example Laplacians and meshes used by
some examples live under resources/library. They are not packaged into the
published crate.
ExampleData is a convenience wrapper for that local directory layout, or for
your own directory if you mirror the same subfolders:
use ;
Common example commands from a cloned checkout:
Plotting and benchmark-report examples also live in examples/, but they are
primarily for repository use rather than typical crate consumption.
Platform Notes
gspxcurrently targets Linux and Windows- Sparse shifted solves use SuiteSparse-backed LDL factorization via
sprs-ldl - The published crate does not include repository example datasets
Citation
If you use gspx for research, cite the associated HICSS paper.
The same citation metadata is also available in CITATION.cff.
Links
- Julia implementation: https://github.com/lukelowry/SpectralGraphWavelet.jl
- SuiteSparse: https://github.com/DrTimothyAldenDavis/SuiteSparse
- Synthetic grid cases: https://electricgrids.engr.tamu.edu/electric-grid-test-cases/
- Author page: https://lukelowry.github.io/
- Google Scholar: https://scholar.google.com/citations?user=CTynuRMAAAAJ&hl=en