Abstract
Anomaly detection is a challenging problem in machine learning, and is even more so when dealing with instances that are captured in low-level, raw data representations without a well-behaved set of engineered features. The Radial Basis Function Data Descriptor (RBFDD) network is an effective solution for anomaly detection, however, it is a shallow model that does not deal effectively with raw data representations. This paper investigates approaches to modifying the RBFDD network to transform it into a deep one-class classifier suitable for anomaly detection problems with low-level raw data representations. We show that approaches based on transfer learning are not effective and our results suggest that this is because the latent representations learned by generic classification models are not suitable for anomaly detection. Instead we show that an approach that adds multiple convolutional layers before the RBF layer, to form a Deep Radial Basis Function Data Descriptor (D-RBFDD) network, is very effective. Our experiments show that the D-RBFDD network out-performs state-of-the-art anomaly detection methods including the Deep Support Vector Data Descriptor (Deep SVDD), One-Class SVM, and Isolation Forest on the image datasets, and produces competitive results for the ECG dataset.
Introduction
Anomaly detection—identifying data points that deviate from "normal" behavior—is a critical task in domains ranging from cybersecurity to medical diagnostics. The primary challenge lies in the fact that anomalous examples are rarely available during training, requiring models to learn a tight boundary around the "normal" class. Traditional "shallow" models, such as the Radial Basis Function Data Descriptor (RBFDD), are effective when applied to hand-engineered features but struggle with raw, high-dimensional data like pixels or sensor signals.
While deep learning has addressed feature extraction in many fields, existing deep anomaly detectors often rely on pre-trained models or reconstruction errors (e.g., Autoencoders). This research argues that such methods are suboptimal because the features they learn are not specifically tailored to the task of defining a compact boundary for a single class. To address this, the authors propose the Deep Radial Basis Function Data Descriptor (D-RBFDD), an end-to-end neural network designed for one-class classification.
Methodology
The RBFDD Architecture
The foundation of the proposed model is the shallow RBFDD network. Unlike standard neural networks that use softmax layers for classification, the RBFDD utilizes a specialized layer of Gaussian kernels to define a "normal" region in the feature space.
Deepening Strategies
The researchers explored three distinct strategies for integrating deep feature extraction with the RBF descriptor:
- Fix-Res + RBFDD: Employs a fixed, pre-trained ResNet-18 as a static feature extractor.
- Fine-Res + RBFDD: Fine-tunes a pre-trained ResNet-18 specifically for the anomaly detection task.
- D-RBFDD (Proposed): A fully integrated architecture where convolutional layers (based on LeNet-5) and the RBF layer are trained from scratch simultaneously.
Training and Loss Function
The D-RBFDD is optimized using a specialized loss function that maximizes the output for normal data while minimizing the "spread" of the Gaussian kernels. This ensures the network learns a latent representation where normal data is highly concentrated, allowing the RBF layer to define the tightest possible boundary.
Experimental Evaluation
The model was evaluated on two types of data:
- Image Benchmarks: MNIST and Fashion MNIST, where individual classes were treated as "normal" and others as anomalies.
- Sensor Data: The MIT-BIH Arrhythmia Database, involving the detection of heart arrhythmias in raw electrocardiogram (ECG) signals.
Key Results and Insights
The Transfer Learning Trap
A significant finding was that features learned by models trained for multi-class classification (like ImageNet) are often "too entangled" to be useful for one-class anomaly detection. This explains why the Fix-Res and Fine-Res strategies were consistently outperformed by the end-to-end D-RBFDD.
Performance and Interpretability
- Superiority on Images: D-RBFDD achieved the best average rank (2.7) across image datasets, outperforming Deep SVDD (3.6) and One-Class SVM (3.8).
- Competitive Sensor Detection: In the realistic "One vs. All" ECG scenario, D-RBFDD produced top-tier results.
- Explainability: Because the final layer uses Gaussian kernels, the model offers better interpretability than standard deep learning "black boxes." Analysts can examine which specific kernels are activated to understand why a data point was classified as normal.
Conclusion
The D-RBFDD network demonstrates that end-to-end training of feature extractors and one-class descriptors is essential for high-performance anomaly detection in raw data. Future work will focus on adapting the model for online learning to handle concept drift in streaming data and exploring dynamic kernel expansion to accommodate evolving data patterns.
Summary updated