TL;DR
This paper introduces CODETECT, a novel method for detecting anomalous graphs in complex databases that feature labeled nodes, directed edges, and multiple edges between nodes. CODETECT achieves this by identifying a compact set of "motif" patterns that best compress the database, flagging graphs that resist compression as anomalous.
What Problem Does This Paper Address?
The paper tackles the challenge of identifying unusual or suspicious graphs within large collections of graphs, a problem that arises in various domains like financial transactions, social networks, and cybersecurity. Existing methods often struggle with the complexity of real-world graph data, which frequently includes node labels, multiple edges between the same pair of nodes, and directed relationships. These complexities make it difficult to apply standard graph anomaly detection techniques, which are typically designed for simpler graph structures. The authors specifically highlight the domain of accounting, where each transaction can be represented as a labeled multi-graph, and identifying anomalous transactions is crucial for fraud detection and error identification.
Methods
The core of CODETECT lies in its Minimum Description Length (MDL) based approach. The key ideas are:
- Lossless Graph Encoding: CODETECT represents graphs by encoding them using a set of identified "motifs" (small, recurring subgraph patterns). The goal is to find a minimal set of motifs that can "explain" or compress the entire database as efficiently as possible.
- Motif Identification and Selection: The paper proposes novel algorithms for:
- Encoding Schemes: Defining how motifs and graphs are encoded using these motifs.
- Search Algorithms: Efficiently identifying the most informative motifs to include in a "motif table" (MT) that minimizes the total encoding length of the database. This involves a greedy approach to select motifs that contribute most to compression.
- Anomaly Scoring: Graphs that are poorly compressed by the learned motif table are flagged as anomalous. The anomaly score for a graph is essentially its compression length using the learned model.
- Handling Complex Graphs: CODETECT is specifically designed to handle labeled nodes, directed edges, and edge multiplicities, which are common in real-world data but often ignored by prior methods.
Datasets
The paper evaluates CODETECT on several datasets:
- Real-world Transactional Data: Three anonymized datasets from different corporations (SH, HW, KD) representing annual transaction records. These datasets do not have ground truth labels, so anomalies were injected by domain experts.
- Synthetic Transactional Data: SH_SYNTHETIC, a dataset generated to mimic the statistical characteristics of the real SH dataset, used for reproducibility.
- Public Enron Email Dataset: A dataset of daily email exchange graphs from Enron employees, used to study correlations with real-world events.
Key Insights and Ideas
- Compression as Anomaly Detection: The fundamental insight is that anomalous graphs are those that deviate significantly from the common patterns (motifs) found in the dataset, making them difficult to compress using a model built from those common patterns.
- The Power of Motifs: Identifying and utilizing recurring subgraph patterns (motifs) is a powerful way to capture the underlying structure of complex graph databases.
- Handling Real-World Complexity: The ability of CODETECT to effectively handle labeled nodes, directed edges, and edge multiplicities is a significant advantage over many existing methods.
- MDL for Model Selection: The Minimum Description Length principle provides a principled way to balance model complexity (number of motifs) with data compression, leading to a robust anomaly detection framework.
Key Results
- Superior Performance: CODETECT consistently outperforms several state-of-the-art baselines (including graph embedding methods, GNNs, and prior anomaly detection techniques) across various performance measures (Precision@k, AUC, AP) on both path and label anomalies.
- Significant Improvement: For path anomalies, CODETECT showed an average improvement of 16.9% over the runner-up on the SH dataset and 10.2% on the HW dataset.
- Qualitative Validation: Case studies on transaction records and the Enron email dataset demonstrate CODETECT's ability to identify potentially suspicious or noteworthy instances that warrant further investigation.
- Scalability: CODETECT exhibits linear scaling with respect to the number of multi-edges in terms of both running time and memory usage, making it suitable for large-scale datasets.
Limitations and Future Work
- Computational Cost: While CODETECT is scalable, the motif table search can still be computationally intensive, especially for very large databases. The paper mentions that the greedy MIS algorithm provides an approximation, and future work could explore more advanced MIS algorithms.
- Hyperparameter Sensitivity: While the paper claims CODETECT does not exhibit hyper-parameters in the same way as deep learning models, the greedy MIS algorithm has parameters like the maximum motif size (k=3 to 10) and the approximation factor (Γ).
- Future Work: The authors suggest exploring more advanced MIS algorithms and potentially extending the framework to handle even more complex graph structures or dynamic graph data.
Summary updated