gspx
gspx is a Rust crate for sparse graph signal processing. It provides fast
implementations of graph convolution using rational kernel fitting and
Chebyshev polynomial approximation. Supports dynamic graphs for applications
with a changing network topology.
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"
Quick Start
Load a Laplacian from a .mat file and filter:
use ;
use Path;
Other loaders: load_signal for .mat signal matrices, load_ply_laplacian
and load_ply_xyz for PLY meshes.
Signals
Filtering APIs accept 1D signals (n_vertices,) or 2D matrices
(n_vertices, n_signals). For SGMA the signal matrix is
(n_vertices, n_times) and the time vector length must match n_times.
Examples
The repository includes runnable examples under examples/. Larger example
Laplacians and meshes live under resources/library and are not packaged into
the published crate.
use ;
Performance
perf_core measures end-to-end filtering calls with Criterion. Each value is
the mean time in milliseconds for one deterministic real N x 1 signal. Exact
filters use one scale ([1.0]) and lowpass/bandpass use order 1.
Static vs Dynamic Filtering
Real power-grid Laplacians from resources/library. No branch edits are
applied between dynamic calls, isolating filtering cost.
Exact filtering on 65k–82k nodes stays in the low-single-digit millisecond range. Structure matters as much as node count.
Constructor and Lowpass
| Graph | N | Constructor (ms) | Lowpass (ms) |
|---|---|---|---|
Texas |
2k |
0.00286 |
0.01713 |
East |
16k |
0.76098 |
1.65513 |
EastWest |
65k |
0.77505 |
2.02311 |
USA |
82k |
0.80452 |
2.00556 |
Dynamic Updates on USA
| Operation | Time (ms) |
|---|---|
Warmed add_branch_once |
1.78406 |
bandpass_one after 1 update |
5.22890 |
bandpass_one after 10 updates |
7.25095 |
bandpass_one after 50 updates |
19.39280 |
Platform Notes
- Targets Linux, macOS, 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
- Python
sgwt: github.com/lukelowry/sgwt - Python docs: sgwt.readthedocs.io
- Julia: github.com/lukelowry/SpectralGraphWavelet.jl
- SuiteSparse: github.com/DrTimothyAldenDavis/SuiteSparse
- Synthetic grid cases: electricgrids.engr.tamu.edu
- Author: lukelowry.github.io
- Google Scholar: scholar.google.com/citations