Retrieval Augmented Deep Anomaly Detection for Tabular Data

Hugo Thimonier,Fabrice Popineau,Arpad Rimmel,Bich-Liên Doan
DOI: https://doi.org/10.1145/3627673.3679559
2024-07-22
Abstract:Deep learning for tabular data has garnered increasing attention in recent years, yet employing deep models for structured data remains challenging. While these models excel with unstructured data, their efficacy with structured data has been limited. Recent research has introduced retrieval-augmented models to address this gap, demonstrating promising results in supervised tasks such as classification and regression. In this work, we investigate using retrieval-augmented models for anomaly detection on tabular data. We propose a reconstruction-based approach in which a transformer model learns to reconstruct masked features of \textit{normal} samples. We test the effectiveness of KNN-based and attention-based modules to select relevant samples to help in the reconstruction process of the target sample. Our experiments on a benchmark of 31 tabular datasets reveal that augmenting this reconstruction-based anomaly detection (AD) method with sample-sample dependencies via retrieval modules significantly boosts performance. The present work supports the idea that retrieval module are useful to augment any deep AD method to enhance anomaly detection on tabular data.
Machine Learning
What problem does this paper attempt to address?
### What problem does this paper attempt to solve? This paper aims to solve the problem of **deep anomaly detection (AD) in tabular data**. Specifically, the author focuses on how to use retrieval - augmented methods to improve the performance of deep learning models in anomaly detection on tabular data. #### Background and Challenges 1. **Limitations of deep learning on tabular data**: - Although deep learning performs well in processing unstructured data (such as images, text), its effectiveness is limited when processing structured data (such as tabular data). - The characteristics of tabular data (such as the dependencies between features and the dependencies between samples) make it difficult for standard deep models to process effectively. 2. **Deficiencies of existing methods**: - Existing anomaly detection methods perform poorly when dealing with tabular data, especially when sample - sample dependencies need to be considered. - Traditional deep anomaly detection methods mainly rely on feature - feature dependencies and ignore sample - sample dependencies. #### Solutions The author proposes a **retrieval - augmented deep anomaly detection method**, which specifically includes the following points: 1. **Introducing an external retrieval module**: - By introducing an external retrieval module, the model can use sample - sample dependencies to enhance the performance of anomaly detection. - The retrieval module can select samples similar to the target sample from the training set to help the model better reconstruct and detect anomalies. 2. **Transformer - based reconstruction framework**: - Use the Transformer model to learn to reconstruct masked features, thereby constructing anomaly scores. - By comparing different types of retrieval modules (such as KNN - based and attention - based), evaluate their impact on the performance of anomaly detection. 3. **Combining feature - feature and sample - sample dependencies**: - Experiments have proven that combining these two types of dependencies can significantly improve the effect of anomaly detection, especially when dealing with different types of anomalies (such as global anomalies, local anomalies, cluster anomalies, etc.). #### Main Contributions 1. **Comprehensive evaluation of retrieval - augmented methods**: Through experiments on multiple tabular datasets, the effectiveness of the retrieval - augmented method has been verified. 2. **Improving anomaly detection performance**: Experiments have proven that using a retrieval module can significantly improve the performance of existing deep anomaly detection methods. 3. **Explaining the role of dependencies**: A detailed analysis of why combining feature - feature and sample - sample dependencies can better identify anomalies in tabular data. Through these improvements, this paper provides a new and effective method for anomaly detection in tabular data and provides a valuable reference for future research.