// the find
pygod-team/pygod
A Python Library for Graph Outlier Detection (Anomaly Detection)
PyGOD is a graph anomaly detection library built on PyTorch Geometric, covering 17 algorithms from 2007 to 2024 in a unified sklearn-style API. It targets researchers and practitioners who need to detect outlier nodes/edges in attributed graphs — fraud detection, network intrusion, social network abuse. The JMLR publication and NEURIPS benchmark paper give it academic credibility.
The sklearn-style fit/predict API means switching between algorithms is a one-line change, which is genuinely useful for benchmarking. The separation of nn (pure PyTorch modules) from detector (the sklearn wrapper) is clean architecture — you can use the neural network components standalone. Mini-batch support is built in for most algorithms, so you're not stuck loading entire graphs into memory. The benchmark suite and BOND dataset benchmark give you real apples-to-apples numbers across methods.
Last push was November 2024 and the repo has shown signs of slowing maintenance — several open issues go unanswered for months. PyG and PyTorch are not installed as dependencies, which sounds principled but in practice means broken installs for anyone who doesn't read carefully. Dynamic graphs (temporal anomaly detection) are not supported; everything here assumes static attributed graphs, which cuts out a big chunk of real-world fraud use cases. Hyperparameter tuning is left entirely to the user with no guidance on what matters — the defaults are research defaults, not production defaults, and most detectors are sensitive to them.