Skip to main content
QUICK REVIEW

[Paper Review] LUNAR: Unifying Local Outlier Detection Methods via Graph Neural Networks

Adam Goodge, Bryan Hooi|arXiv (Cornell University)|Dec 10, 2021
Anomaly Detection Techniques and ApplicationsComputer Science8 citations
TL;DR

LUNAR proposes a graph neural network-based anomaly detection method that unifies local outlier methods like LOF and KNN under a shared message-passing framework, enabling learnable, adaptive neighbor aggregation. It achieves state-of-the-art performance on tabular datasets and exhibits significantly greater robustness to neighborhood size hyperparameters than classical methods.

ABSTRACT

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.

Motivation & Objective

  • To unify diverse local outlier detection methods—such as LOF, KNN, and DBSCAN—under a common message-passing framework based on graph neural networks.
  • To address the lack of learnability in classical local outlier methods, which rely on fixed heuristics and hyperparameters without adaptation to data.
  • To develop a novel, trainable anomaly detection model that dynamically learns to aggregate information from neighbors for improved anomaly scoring.
  • To demonstrate superior performance and robustness compared to both classical and deep learning-based baselines on real-world tabular datasets.

Proposed method

  • LUNAR models data points as nodes in a graph, where edges connect each point to its k nearest neighbors.
  • It employs a graph neural network with learnable message-passing layers to aggregate features from neighboring nodes into a unified anomaly score.
  • The model uses a learnable aggregation mechanism that processes messages from all k neighbors, unlike traditional methods that apply fixed rules (e.g., k-th distance or density ratios).
  • It incorporates negative sampling strategies—subspace perturbation and uniform sampling—to enhance training stability and generalization.
  • The final anomaly score is computed via a final layer with a sigmoid activation, and the model is trained using mean squared error loss with Adam optimization.

Experimental results

Research questions

  • RQ1Can classical local outlier detection methods like LOF, KNN, and DBSCAN be unified under a single, generalizable message-passing framework based on graph neural networks?
  • RQ2Does introducing learnable parameters into the neighbor aggregation process significantly improve anomaly detection performance on tabular data?
  • RQ3How robust is the proposed method to variations in the neighborhood size hyperparameter k compared to classical local outlier methods?
  • RQ4What is the impact of different negative sampling strategies on the model’s performance and generalization?

Key findings

  • LUNAR achieves the highest AUC score on all datasets except SATELLITE, where KNN slightly outperforms it, with statistically significant improvements (p < 0.01) on HRSS, MI-V, and THYROID.
  • On HRSS, MI-V, and THYROID, LUNAR outperforms the second-best method by 10 to 30 percentage points in AUC.
  • LUNAR’s performance degrades by only 3 AUC points when k increases from 2 to 200, whereas LOF, KNN, and DN2 degrade by 24–26 points, demonstrating superior robustness.
  • The combination of subspace perturbation and uniform negative sampling yields the best performance across most datasets, with SP alone performing poorly only on OPTDIGITS for small k.
  • Deeper and wider GNN architectures for message aggregation lead to better performance, as shown in ablation studies.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.