Anomaly detection for graphs, without the API whiplash
PyGOD bundles more than 10 graph outlier detection algorithms behind a single, consistent API built atop PyTorch Geometric.

What it does
PyGOD is a Python toolkit for detecting anomalies in graph data—think suspicious accounts in social networks or structural oddities in security logs. It implements 17 detection algorithms, from classic matrix factorization methods like Radar and ANOMALOUS to recent graph neural network architectures such as DOMINANT, CoLA, and CARD. Everything operates on standard PyTorch Geometric Data objects and supports node-, edge-, and graph-level detection tasks.
The interesting bit
Rather than forcing you to wrestle with a dozen incompatible paper implementations, PyGOD follows the API conventions of PyOD, giving each detector a uniform fit/predict interface with consistent decision_score_ and label_ attributes. It is essentially a compatibility layer that makes academic graph anomaly research immediately usable.
Key highlights
- Implements 17 methods spanning clustering, matrix factorization, autoencoders, GANs, and self-supervised learning
- Supports scalable inference via mini-batch and sampling for most neural methods
- Handles transductive and inductive settings through a single
fit/predictinterface - Ships with peer-reviewed academic backing: a JMLR software paper and a NeurIPS benchmark (BOND)
- Requires PyTorch and PyG as external prerequisites—it does not install them for you
Caveats
- Several older algorithms (SCAN, Radar, ANOMALOUS, ONE) do not support sampling, so they may choke on very large graphs
- The library depends on PyTorch Geometric and PyTorch, but leaves their installation to you, which can be a versioning headache
Verdict Grab it if you need to benchmark multiple graph anomaly detectors or productionize a single model without rewriting boilerplate. Skip it if your graphs are small enough that a hand-rolled solution suffices or if you are not already in the PyTorch Geometric ecosystem.
Frequently asked
- What is pygod-team/pygod?
- PyGOD bundles more than 10 graph outlier detection algorithms behind a single, consistent API built atop PyTorch Geometric.
- Is pygod open source?
- Yes — pygod-team/pygod is open source, released under the BSD-2-Clause license.
- What language is pygod written in?
- pygod-team/pygod is primarily written in Python.
- How popular is pygod?
- pygod-team/pygod has 1.5k stars on GitHub.
- Where can I find pygod?
- pygod-team/pygod is on GitHub at https://github.com/pygod-team/pygod.