Introduction
Traditional semi-supervised anomaly detection (AD) typically operates on a point-centric basis, treating individual data points as independent entities. However, an anomaly is often defined by its relationship to a collective norm. Point-centric methods suffer from two major flaws: context blindness—failing to capture how an outlier disrupts the overall structure of a group—and inefficient use of rare labeled data, where each label is used only once in a point-wise comparison.
SetAD addresses these challenges by reframing AD as a set-level learning problem. By analyzing groups of data points, SetAD captures complex, high-order interactions and leverages combinatorial supervision to improve performance significantly.
Methodology
The SetAD framework consists of two main phases: graded learning for training and calibrated scoring for inference.
Set-Level Graded Learning
During training, SetAD treats anomaly detection as a regression task. Instead of binary classification, the model predicts the "grade" of anomalousness—the number of known anomalies within a sampled set.
The architecture utilizes a Multi-Layer Perceptron (MLP) for initial feature embedding, followed by a Multi-head Attention mechanism. This attention layer allows for all-to-all interactions between points in the set, enabling the model to learn the structural dependencies of normal data. The resulting contextualized embeddings are aggregated and passed through a regression head to produce a set-level score.
Context-Calibrated Anomaly Scoring (CAS)
At test time, to score an individual point $x_t$, SetAD places it within multiple diverse context sets $C_i$ drawn from unlabeled data. To account for potential noise or unknown anomalies in these sets, the model employs a calibration step. It compares the score of the set containing the test point $(C_i \cup \{x_t\})$ against the expected score of the same context paired with a known normal reference point. This normalization ensures the final anomaly score is robust to sampling variance.
Experimental Results
SetAD was evaluated across 10 diverse real-world datasets spanning healthcare, image processing, and finance.
Performance and Data Efficiency
SetAD consistently outperformed six state-of-the-art baselines, including DeepSAD and DevNet. It ranked first in AUC-PR on 9 out of 10 datasets. Notably, SetAD demonstrated exceptional data efficiency; it often achieved better results with only 1% of labeled anomalies than competing methods did with 5%. This efficiency stems from the combinatorial nature of set construction, which amplifies the supervisory signal from limited labels.
Robustness and Context Sensitivity
The model remains stable even when training data is contaminated with up to 20% unknown anomalies. Furthermore, analysis of the set size $k$ revealed that performance generally improves as context increases, typically peaking around $k=8$ or $k=10$, confirming that group-level interactions provide a clearer signal for detecting complex anomalies.
Conclusion
SetAD shifts the paradigm of semi-supervised anomaly detection from individual points to contextual sets. By modeling anomalies as group disruptors and utilizing an attention-based architecture for graded learning, it achieves state-of-the-art accuracy and remarkable data efficiency. Future work may explore adaptive context selection and more advanced set-processing encoders to further refine the model's performance across varied data structures.
Summary updated