# LUNAR: Unifying Local Outlier Detection Methods via Graph Neural Networks

arXiv: https://arxiv.org/abs/2112.05355 · HTML: https://mlsanity.com/paper/2112.05355/

## Key facts

- Cited by 42 papers in the map (data through 14 Oct 2026).
- Builds on 15 of its 42 references that are in the map.
- First posted on arXiv 10 Dec 2021.

## Builds on (most cited first, 15 of 15)

- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [A Simple Framework for Contrastive Learning of Visual Representations](https://mlsanity.com/paper/2002.05709/) (2020)
- [Neural Message Passing for Quantum Chemistry](https://mlsanity.com/paper/1704.01212/) (2017)
- [Graph Neural Networks for Social Recommendation](https://mlsanity.com/paper/1902.07243/) (2019)
- [Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery](https://mlsanity.com/paper/1703.05921/) (2017)
- [Graph Neural Network-Based Anomaly Detection in Multivariate Time Series](https://mlsanity.com/paper/2106.06947/) (2021)
- [PyOD: A Python Toolbox for Scalable Outlier Detection](https://mlsanity.com/paper/1901.01588/) (2019)
- [Latent Space Autoregression for Novelty Detection](https://mlsanity.com/paper/1807.01653/) (2018)
- [Traffic Graph Convolutional Recurrent Neural Network: A Deep Learning Framework for Network-Scale Traffic Learning and Forecasting](https://mlsanity.com/paper/1802.07007/) (2018)
- [Efficient GAN-Based Anomaly Detection](https://mlsanity.com/paper/1802.06222/) (2018)
- [Deep Nearest Neighbor Anomaly Detection](https://mlsanity.com/paper/2002.10445/) (2020)
- [Generative Adversarial Active Learning for Unsupervised Outlier Detection](https://mlsanity.com/paper/1809.10816/) (2018)
- [Structural Temporal Graph Neural Networks for Anomaly Detection in Dynamic Graphs](https://mlsanity.com/paper/2005.07427/) (2020)
- [Interpretable, Multidimensional, Multimodal Anomaly Detection with Negative Sampling for Detection of Device Failure](https://mlsanity.com/paper/2007.10088/) (2020)
- [Anomaly Detection with Adversarial Dual Autoencoders](https://mlsanity.com/paper/1902.06924/) (2019)

## Built on by (most cited first, 30 of 42)

- [On Diffusion Modeling for Anomaly Detection](https://mlsanity.com/paper/2305.18593/) (2023)
- [Detecting Multivariate Time Series Anomalies with Zero Known Label](https://mlsanity.com/paper/2208.02108/) (2022)
- [Unsupervised anomaly detection algorithms on real-world data: how many do we need?](https://mlsanity.com/paper/2305.00735/) (2023)
- [PyOD 2: A Python Library for Outlier Detection with LLM-powered Model Selection](https://mlsanity.com/paper/2412.12154/) (2024)
- [The Devil is in the Wrongly-classified Samples: Towards Unified Open-set Recognition](https://mlsanity.com/paper/2302.04002/) (2023)
- [A Survey of Imbalanced Learning on Graphs: Problems, Techniques, and Future Directions](https://mlsanity.com/paper/2308.13821/) (2023)
- [Label-Free Multivariate Time Series Anomaly Detection](https://mlsanity.com/paper/2312.11549/) (2023)
- [Graph Neural Networks for Tabular Data Learning: A Survey with Taxonomy and Directions](https://mlsanity.com/paper/2401.02143/) (2024)
- [AnoShift: A Distribution Shift Benchmark for Unsupervised Anomaly Detection](https://mlsanity.com/paper/2206.15476/) (2022)
- [The OPS-SAT benchmark for detecting anomalies in satellite telemetry](https://mlsanity.com/paper/2407.04730/) (2024)
- [TAD-Bench: A Comprehensive Benchmark for Embedding-Based Text Anomaly Detection](https://mlsanity.com/paper/2501.11960/) (2025)
- [Towards Anomaly Detection on Relational Data](https://mlsanity.com/paper/2606.18621/) (2026)
- [Anomaly detection using data depth: multivariate case](https://mlsanity.com/paper/2210.02851/) (2022)
- [Neural Collaborative Filtering to Detect Anomalies in Human Semantic Trajectories](https://mlsanity.com/paper/2409.18427/) (2024)
- [ICLAD: In-Context Learning for Unified Tabular Anomaly Detection Across Supervision Regimes](https://mlsanity.com/paper/2603.19497/) (2026)
- [Learning Multi-Pattern Normalities in the Frequency Domain for Efficient Time Series Anomaly Detection](https://mlsanity.com/paper/2311.16191/) (2023)
- [AIDA: Analytic Isolation and Distance-based Anomaly Detection Algorithm](https://mlsanity.com/paper/2212.02645/) (2022)
- [Unsupervised Outlier Detection using Random Subspace and Subsampling Ensembles of Dirichlet Process Mixtures](https://mlsanity.com/paper/2401.00773/) (2024)
- [Towards Token-Level Text Anomaly Detection](https://mlsanity.com/paper/2601.13644/) (2026)
- [ARES: Locally Adaptive Reconstruction-based Anomaly Scoring](https://mlsanity.com/paper/2206.07604/) (2022)
- [Zero-Shot Anomaly Detection via Batch Normalization](https://mlsanity.com/paper/2302.07849/) (2023)
- [A Probabilistic Transformation of Distance-Based Outliers](https://mlsanity.com/paper/2305.09446/) (2023)
- [AdaMedGraph: Adaboosting Graph Neural Networks for Personalized Medicine](https://mlsanity.com/paper/2311.14304/) (2023)
- [When Text and Images Don't Mix: Bias-Correcting Language-Image Similarity Scores for Anomaly Detection](https://mlsanity.com/paper/2407.17083/) (2024)
- [Towards Unsupervised Validation of Anomaly-Detection Models](https://mlsanity.com/paper/2410.14579/) (2024)
- [Finer Disentanglement of Aleatoric Uncertainty Can Accelerate Chemical Histopathology Imaging](https://mlsanity.com/paper/2502.20532/) (2025)
- [UNR-Explainer: Counterfactual Explanations for Unsupervised Node Representation Learning Models](https://mlsanity.com/paper/2605.17285/) (2026)
- [Image Outlier Detection Without Training using RANSAC](https://mlsanity.com/paper/2307.12301/) (2023)
- [Boundary Peeling: Outlier Detection Method Using One-Class Peeling](https://mlsanity.com/paper/2309.05630/) (2023)
- [Rethinking Unsupervised Outlier Detection via Multiple Thresholding](https://mlsanity.com/paper/2407.05382/) (2024)

## Abstract (arXiv)

Many well-established anomaly detection methods use the distance of a sample to those in its local neighbourhood: so-called `local outlier methods', such as LOF and DBSCAN. They are popular for their simple principles and strong performance on unstructured, feature-based data that is commonplace in many practical applications. However, they cannot learn to adapt for a particular set of data due to their lack of trainable parameters. In this paper, we begin by unifying local outlier methods by showing that they are particular cases of the more general message passing framework used in graph neural networks. This allows us to introduce learnability into local outlier methods, in the form of a neural network, for greater flexibility and expressivity: specifically, we propose LUNAR, a novel, graph neural network-based anomaly detection method. LUNAR learns to use information from the nearest neighbours of each node in a trainable way to find anomalies. We show that our method performs significantly better than existing local outlier methods, as well as state-of-the-art deep baselines. We also show that the performance of our method is much more robust to different settings of the local neighbourhood size.
