Abstract
Anomaly detection is a critical task in various domains, yet deep learning models often struggle in few-shot scenarios where labeled data is scarce. This paper introduces a novel meta-learning framework that adapts to new anomaly detection tasks using a differentiable eigenvalue solver. By formulating the task-adaptation step as a generalized Rayleigh quotient problem, the model achieves a globally optimal closed-form solution. Experimental results demonstrate that this approach significantly outperforms standard gradient-based meta-learning methods like MAML in both detection accuracy (AUC) and computational efficiency, offering up to a 22x speedup in training.
Introduction
Anomaly detection involves identifying rare items, events, or observations that deviate significantly from the majority of the data. While deep learning has advanced this field, traditional models require extensive training data for each specific task. Meta-learning, or "learning to learn," offers a potential solution for few-shot scenarios. However, applying standard meta-learning to anomaly detection is challenging because the "anomalous" class is often poorly defined and highly diverse.
The authors address this by proposing a framework that learns a "boundary of normalcy" from a small support set. Unlike iterative methods that may converge to local optima, the proposed method utilizes a linear projection optimized via an eigenvalue solver to maximize the separation between normal and anomalous instances.
Methodology
The architecture follows a three-step pipeline designed for rapid adaptation to new tasks.
1. Task Representation
Given a support set containing a few labeled normal and anomalous instances, the model first generates a task representation vector r. This is achieved using a permutation-invariant neural network, ensuring that the order of instances in the support set does not affect the resulting task "flavor."
2. Task-Specific Embedding
All instances (support and query) are mapped into a latent embedded space using a neural network conditioned on the task vector r. The objective of this embedding is to cluster normal instances around a central point c while pushing anomalies away.
3. Linear Projection via Eigenvalue Solver
The core innovation is the use of a generalized eigenvalue solver for the final adaptation step. Instead of using gradient descent to find a task-specific boundary, the model solves for a linear projection vector w that maximizes the distance of anomalies from the center relative to the spread of normal points. This is formulated as a generalized Rayleigh quotient problem. This formulation provides a globally optimal, closed-form solution that is fully differentiable, allowing for end-to-end training.
Experimental Evaluation
The model was evaluated on 32 datasets, including 22 outlier detection benchmarks, landmine detection data, and IoT network traffic datasets.
Performance and Efficiency
The proposed method achieved the highest average Area Under the Curve (AUC) among 13 competing methods. Notably, it outperformed MAML and Prototypical Networks. In terms of efficiency, the eigenvalue solver approach was approximately 22 times faster than MAML during training (1,527 seconds vs. 33,528 seconds), as it avoids the computationally expensive inner-loop gradient updates.
Conclusion
This research demonstrates that integrating classical optimization techniques like eigenvalue solvers into meta-learning architectures can yield significant gains in both performance and speed. By focusing on the "boundary of normalcy" and utilizing a closed-form adaptation step, the model effectively handles the inherent ambiguity of anomalies in few-shot settings. Future work may explore extending this approach to higher-dimensional projections and semi-supervised scenarios where labeled anomalies are unavailable in the support set.
Summary updated