acceptodds
Published as a conference paper at NeurIPS 2026

SetAD: Semi-Supervised Anomaly Learning in Contextual Sets

Jianling Gao, Chongyang Tao, Xuelian Lin, Junfeng Liu, Shuai Ma

Abstract

Semi-supervised anomaly detection (SSAD) has shown great promise by effectively leveraging limited labeled data. However, existing methods are typically structured around scoring individual points or simple pairs. Such point- or pair-centric view not only overlooks the contextual nature of anomalies, which are defined by their deviation from a collective group, but also fails to exploit the rich supervisory signals that can be generated from the combinatorial composition of sets. Consequently, such models struggle to exploit the high-order interactions within the data, which are critical for learning discriminative representations. To address these limitations, we propose SetAD, a novel framework that reframes SSAD as a set scoring problem. SetAD employs an attention-based set encoder trained via a graded learning objective, where the model learns to quantify the degree of anomalousness within an entire set. This approach directly models the complex group-level interactions that define anomalies. Furthermore, to enhance robustness and score calibration, we propose a context-calibrated anomaly scoring mechanism, which assesses a point's anomaly score by aggregating its normalized deviations relative to multiple randomly sampled reference contexts. Extensive experiments on 10 real-world datasets demonstrate that SetAD significantly outperforms state-of-the-art models.

Keywords:
Paris, Main Track

Reviews

Among:
Shape:
123456this paper, Top 24%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.67 over 3 reviews, above 76% of the others.
Reviewer_kMCLOpenReview ↗
Rating
5
Clarity
3
Confidence
4
Originality
3
Quality
3
Significance
3
Read review
Summary

The paper proposes SetAD, a semi-supervised anomaly detection method. The main idea is to treat anomaly detection as a set-level graded learning problem. Instead of assigning anomaly scores to individual points or comparing pairs of points, the model learns to predict the overall anomaly of a sampled set. This degree is defined by the number of known labeled anomalies included in the set. After training the set scorer, the paper converts it into an instance-level anomaly score. A test point is evaluated with multiple randomly sampled reference contexts, and the final score is calibrated across these contexts.

Strengths and weaknesses

The empirical evaluation is a major strength. The paper evaluates SetAD on 10 real-world anomaly detection datasets. It compares against several semi-supervised anomaly detection baselines, including point-wise, pair-wise, generative, center-based, and reference-based methods. SetAD achieves the best average performance in both AUC-ROC and AUC-PR. The gain in AUC-PR is especially strong. The additional analyses on set size, context-calibrated scoring, contamination robustness, label efficiency, runtime, and anomaly-count design also support the practical usefulness of the method.

The paper is mostly clear. The overall framework is easy to understand. The difference between set-level training and instance-level inference is also well explained. The appendix provides useful algorithmic details and a simple theoretical analysis of the context-calibrated scoring mechanism. However, some experimental details should be clearer. In particular, it is not fully clear how important hyperparameters, such as set size, number of contexts, and number of reference samples, were selected without using test information. The significance is moderate to good. The paper gives a useful and practical perspective for semi-supervised anomaly detection. This seems especially suitable for tabular or fixed-feature datasets, where context sets can be sampled easily. However, the scope is still mostly limited to standard tabular anomaly detection benchmarks. It is not clear how directly the method can be used for raw images, videos, time series, or other structured modalities without designing modality-specific encoders.

The originality is moderate. The set-level graded learning formulation is interesting. It also gives a clean way to use limited anomaly labels through many sampled sets. At the same time, the core architecture uses standard components, such as MLP embeddings, self-attention, sum pooling, and regression. Therefore, the novelty is mainly in the problem formulation and the inference calibration, rather than in a new modeling primitive.

My main concern is the baseline coverage. The paper discusses several recent semi-supervised anomaly detection methods in the related work section, but not all are included in the main comparison. Since the paper makes an empirical and method-oriented contribution, comparison with more recent SSAD methods would strengthen the evidence. I would also like to see error bars or standard deviations in the main results table, since the checklist indicates that the reported numbers are averages over 10 runs.

I think the submission is promising and practically useful. The method is simple, coherent, and empirically strong. However, the novelty is moderate, and the experimental comparison should be strengthened by including more recent baselines and providing clearer hyperparameter selection details. I would lean toward borderline acceptance.

Questions
  1. Could the authors clarify how the key hyperparameters were selected? This includes the set size k, the number of contexts, and the number of reference samples. My score would increase if the authors clearly show that these values were selected using only validation data, not test performance.

  2. The paper compares against several important baselines. However, some recent SSAD methods discussed in related work, such as NNG-Mix, KDAlign, SSRDT, TargAD, and CAD, are not included in the main experiments. Could the authors add comparisons with at least one or two of these recent methods, or clearly explain why they are not comparable?

  3. The main result table reports average performance over ten independent runs, but it does not show standard deviations or confidence intervals. Could the authors provide error bars for the main results, at least for SetAD and the strongest competing baselines? This would help show whether the improvements are statistically reliable.

  4. The training label for each sampled set is defined by the number of known labeled anomalies. However, the unlabeled pool may also contain unknown anomalies. Could the authors analyze how this label noise affects the set-level regression target? The contamination experiments are useful, but a more direct discussion of this target-noise issue would make the paper clearer.

  5. Could the authors better explain when larger context helps and when it hurts? The set-size analysis shows that some datasets benefit from larger sets, while others work best with intermediate set sizes or even degrade with larger sets. A more detailed analysis of dataset properties related to the optimal context size would give better practical guidance.

Limitations

yes

Paper formatting concerns

Not major issues here.

Final justification

The rebuttal answered most of my concerns, so adjusted the score.

Reviewer_F2LAOpenReview ↗
Rating
4
Clarity
2
Confidence
4
Originality
3
Quality
2
Significance
3
Read review
Summary

This paper considered the semi-supervised (or weakly-supervised) anomaly detection problem in which we have a large set of unlabeled datasets plus a small number of known anomalies. This setting is different than the one-class semi-supervised setting in which we assume all training data are normal points.

The paper proposed an approach to use Transformers to learn the representations, and the key is that the representation for a single point might change according to a randomly select subset (which is called "context" in the paper, but note that this is a bit misleading term and different for what "context" usually means in contextual anomaly detection). This approach, in theory, might let the learned representations of single points vary according to the context. The training objective is to predict the number of known anomalies; at inference time, a random subset is chosen together with the test point, and the anomaly score is defined by averaging all these subsets.

Some theoretical work is done to show that the proposed anomaly detection has "Variance Reduction". Experiments are done on 10 datasets to demonstrate the ROC-AUC and PR-AUC, together with results on how to choose the subset size kk.

Strengths and weaknesses

To some extend, I like the idea of subsetting + predicting the number of known anomalies during training. I agree that this can be regarded as an extention of "point pairs" because the size of subsets can be larger than 2. However, I think it is unfair to call all other methods unaware of the "contexts" --- essentially, all anomaly detection points consider how "different" a single point is towards all points or its local neighbors.

More importantly, although I think the proposed method has potential in learning the representations useful for anomaly detection, i.e., to learn the representation in a way that captures how a known anomaly is "different" from the unlabelled points, the author failed to explain/demonstrate why we need the "collective context" beyond the pairwise solution. Some intuitive explanations or synthetic-data empirical study would be very useful to shed light on this point. Further, some contents in the paper also simply do not support that the collective context is needed in the task of weakly supervised AD:

  1. If more "context" is always good, it is a bit confusing why the predictive performance dropped after k=8k=8.
  2. It's a bit unclear "how" the context helped the training beyond previous methods. I would appreciate some explanation beyond claiming that "context/higher-order interactions is important". Some empirical evidence for "higher-order interactions help identify anomalies that previous methods fail" would be even better.
  3. The experiment results will be more convincing with error bar / standard deviations reported for the 10 runs, and ideally with more datasets and significance testing.

My second major concern is about the accuracy in the writing, and specifically about misleading problem statement, wrong/inaccurate terminology. Major issues are:

  • The definition of the AD score is unrelated to the general definition of anomaly score in the problem statement section (Section 3.1, \phi(x)).
  • To me, "context" is really a misleading term choice here as "contextual anomaly detection" is a widely accepted concept and it means a completely different thing; and given that this word is used everywhere in the paper, this is beyond a minor textual issue. The authors made this point even worse by writing (line 36) in the introduction that "some methods focus on learning a scoring function that maps a single point to an anomaly score, ...", and I had thought that their anomaly score will not be a fixed score but will change according to the context.
  • I am not fully convinced about how this proposed method is positioned in the literature, and I think it is a bit misleading to distinguish what this paper does by calling it "context aware" since it is not true that previous methods only considered limited or no context. Even if for the previous methods (like the DevNet) which are categorized as "point-wise anomaly", it is not possible to learn the anomaly score with all the normal points in the whole dataset (which is also a context).
  • In section 3.4, the authors motivated the calibrated anomaly score as a way to resolve the contamination issue; this is a bit over-claim to me as the contamination is not resolved here, but only the variance is reduced. This is also shown in Figure 3 of the experiments, and hence I don't agree that the method is robust against anomaly contamination.
  • In Section 2.1, it is not accurate to categorize one-class classification method as "unsupervised learning"; in fact, those are the classic semi-supervised AD setting, while the authors' setting can be called both weakly supervised AD or semi supervised AD. Specifically, the critics written in 91 - 93 is only for unsupervised methods like Isolation Forest, but not for one-class methods.

Other minor issues include:

  1. Some terms are used without definition or simply vague.
  • For instance, Line 38, what do you mean by "the diversity of supervision"?
  • Line 115-116, what do you mean by "holistic internal structure" and "sophisticated anomaly"?
  • Line 136: what do you mean by "scoring individual points in isolation"? Does, say, methods like isolation forest which also rely on random subsetting fall into this category?
  1. The robustness to contamination: I am not fully convinced by the experiments, as the performance drop of the proposed method is roughly the same as many other methods.

In summary, the training paradigm might be an interesting direction to explore for weakly supervised AD, but the authors did not fully convince me the necessity of higher-order interactions (with richer "context"---and again, I please use a more proper term to replace "context") and in what cases it might be useful. Key design choices (like the anomaly score) are not so well motivated and may involve a bit overclaiming (that it can resolve the contamination problem). The experiments would also be more convincing if several issues were fixed as mentioned above.

Questions
  1. Only part of the datasets used in the paper are included in the supplementary materail and the anonymous github link, any reasons for that?
  2. Any specific reasons to choose these 10 datasets?
Limitations

yes

Paper formatting concerns

NA

Final justification

The paper proposed an interesting idea. The major concern was whether the claim that "larger context is needed" is justified or empirically proved. This is partially resolved, in the sense that the authors during the rebuttal provided a plausible explaination to why "larger set size kk does not always lead to better empirical results". To me this is a conjecture-level explaination, though plausible.

The other concern is the writing its writing itself: including some claims should be narrower than now, and some terms are mis-used. Most of the concerns are partially addressed in the sense that, during the rebuttal, the authors gave a very detailed direction how to improve the writing, and I agree with the direction there. Note that this is a lot for the authors to do, and I hope them will actually incorporate the promised revisions.

With all that being said, since I like the idea and I think it is novel and interesting, I think the paper should deserve a boardline accept (Score 4).

Reviewer_PF5VOpenReview ↗
Rating
5
Clarity
4
Confidence
4
Originality
3
Quality
3
Significance
3
Read review
Summary

The proposed semi-supervised anomaly detection method, SetAD, has two phases: Set-Level Graded Anomaly Learning and Context-Calibrated Anomaly Scoring. In the first phase, groups of labelled anomalies are mixed with unlabelled ones, and a function is trained using two MLP layers interleaved with a multi-head attention module. Its goal is to estimate the number of anomalies in each group. The second phase mixes unlabelled data separately with a test instance and a reference point from the unlabelled set. Each group is scored, and the scores are used to compute the final anomaly score for the test instance. Tests are done in 10 datasets using 7 baselines for comparison. The results are globally good.

Strengths and weaknesses

The proposed method is well explored. The defined architecture makes sense and is well-founded. The main weaknesses of the proposal are clearly identified and explored. The paper is well written and easy to understand, though in lines 265-267, a reference is made to nc and nr, which are never defined. The code is available. This research topic has attracted many people over the last few years. Many new methods have been proposed recently. The idea explored in this work has some merits, namely, scoring instances against a context.

Questions

Q1: Is the range of the final anomaly scores similar for all datasets?

Q2: An ablation study on the architecture of Set-Level Graded Anomaly Learning could help understand its goodness.

Limitations

Yes

Paper formatting concerns

I didn't notice any major issues in this paper with respect to violation of formatting, anonymity, etc.

1 comment

Q1: The range of the final anomaly scores across datasets

Thank you for this insightful question. We examined the distribution of SetAD's final anomaly scores on all ten datasets. To provide an illustrative view of the raw score scale, we used seed 0, which is one of the ten runs reported in the paper, and retained exactly the same experimental setting as the main evaluation. We report the raw final test scores directly used to compute AUC-ROC and AUC-PR, without any post-hoc normalization. The variance is the population variance over the test samples.

DatasetNormal meanNormal varianceAnomaly meanAnomaly variance
Cardiotocography−0.01260.00740.38920.0399
Mammography−0.01250.00820.45050.1448
SpamBase0.00200.03770.42220.1688
MNIST−0.01260.00780.49550.1009
Shuttle−0.02020.00060.81640.0384
Celeba−0.00840.01520.33780.0233
Cover−0.00670.00940.70310.0159
Campaign−0.00340.01520.26880.0595
Fraud−0.00150.00180.84020.3798
Census−0.00860.01590.31820.0604

The results show a consistent score structure across the datasets. The mean score of normal samples is always close to zero, ranging from -0.0202 to 0.0020, whereas the mean anomaly score is consistently positive and higher, ranging from 0.2688 to 0.8402. This behavior is consistent with CAS: for each sampled context, it subtracts the expected score obtained by inserting reference points from the unlabeled pool into the same context, thereby removing a context-specific additive baseline. The score variance still differs across datasets, particularly for the anomaly class, which may reflect cross-dataset differences in anomaly heterogeneity and separability. Since CAS performs within-dataset calibration rather than cross-dataset standardization, SetAD does not require raw scores from different datasets to have identical ranges or be directly comparable.

Q2: Architecture ablation of Set-Level Graded Anomaly Learning

Thank you for this valuable suggestion. Following your suggestion, we add a DeepSets-style set encoder as an architectural ablation. This variant removes the self-attention layer and directly pools encoded element embeddings. We keep k=8k=8 and all other training and inference settings unchanged, run the models using the same ten random seeds, and report the mean AUC-PR. We additionally report our k=2k=2 variant as a pairwise reference under the same evaluation protocol.

DatasetPairwise(k=2k=2)Set-pooling(w/o attention)SetAD
Cardiotocography0.84180.75590.8447
Mammography0.55960.56020.5650
SpamBase0.86900.86440.8806
Mnist0.83180.83920.8412
Shuttle0.97190.97550.9745
Celeba0.27410.23370.2653
Cover0.95100.93810.9635
Campaign0.49110.48630.5158
Fraud0.49760.67600.6855
Census0.42900.44750.4719
AVG0.67170.67770.7008

SetAD improves the average AUC-PR from 0.6777 to 0.7008 and performs better on 9 of 10 datasets, with only a negligible decrease of 0.0010 on Shuttle. This indicates that explicitly conditioning each element on the other set elements before permutation-invariant aggregation is generally beneficial. Meanwhile, Set-pooling only modestly improves over the pairwise reference on average and gives mixed per-dataset results. Overall, this ablation separates the benefit of set-level aggregation from the additional benefit of attention-based cross-element interaction. We will add this ablation to the revision.

Definition of nCn_C and nrn_r

We thank the reviewer for this careful observation. nCn_C means the number of sampled contexts, and nrn_r means the number of reference samples. We will add these definitions in the revision.

Comments on the paper

1 comment
Meta-review

The paper treats semi-supervised anomaly detection as a set-scoring problem. An attention-based encoder estimates how many known anomalies appear in each sampled set, after which reference sets are used to calibrate scores for individual instances. kMCL highlighted the experiments as a strength, PF5V described the method as thoroughly explored, and the originality scores were consistently favorable.

Initially, the main concern was the reliability of the experimental results. F2LA and kMCL both noted that the paper claimed SetAD "significantly outperforms" competing methods, but did not report error bars. In the rebuttal, the authors provided error bars and significance tests. How the set size, context count, and reference count were selected is also resolved, with a disclosed hyperparameter selection protocol.

F2LA also questioned whether collective context offers benefits beyond pairwise comparisons. This concern was substantiated by the fact that the performance drops with k > 8, despite the argument that higher-order interactions should be useful. The first part is resolved by controlled ablations separating the benefit of moving beyond pairs from that of attention-based interaction. Specifying the conditions under which larger sets improve performance and accounting for the decline is only partly met. kMCL's question about the role of k was answered in general terms and was not pressed further.

Furthermore, the authors have committed to narrowing the significance and contamination-robustness claims and presenting the results more cautiously in the camera-ready version.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.