Table of Contents
Fetching ...

TailedCore: Few-Shot Sampling for Unsupervised Long-Tail Noisy Anomaly Detection

Yoon Gyo Jung, Jaewoo Park, Jaeho Yoon, Kuan-Chuan Peng, Wonchul Kim, Andrew Beng Jin Teoh, Octavia Camps

TL;DR

This work tackles unsupervised anomaly detection when normal data are both long-tailed and contaminated with noise. It introduces TailSampler, a class-size predictor that infers tail versus head samples via a reflective symmetry between inter-class and intra-class embedding similarities, enabling exclusive tail sampling. The tail-focused patches are integrated with a noise-discriminated memory bank to form TailedCore, a memory-based detector robust to both noise and class imbalance. Extensive experiments on modified MVTecAD and VisA datasets show that TailedCore consistently outperforms state-of-the-art methods across image- and pixel-level tasks under various tail/distribution and noise conditions, highlighting its practical potential for real-world industrial anomaly detection. The approach advances anomaly detection by combining principled few-shot sampling with a clean, representative memory, yielding significant improvements in challenging long-tail noisy environments.

Abstract

We aim to solve unsupervised anomaly detection in a practical challenging environment where the normal dataset is both contaminated with defective regions and its product class distribution is tailed but unknown. We observe that existing models suffer from tail-versus-noise trade-off where if a model is robust against pixel noise, then its performance deteriorates on tail class samples, and vice versa. To mitigate the issue, we handle the tail class and noise samples independently. To this end, we propose TailSampler, a novel class size predictor that estimates the class cardinality of samples based on a symmetric assumption on the class-wise distribution of embedding similarities. TailSampler can be utilized to sample the tail class samples exclusively, allowing to handle them separately. Based on these facets, we build a memory-based anomaly detection model TailedCore, whose memory both well captures tail class information and is noise-robust. We extensively validate the effectiveness of TailedCore on the unsupervised long-tail noisy anomaly detection setting, and show that TailedCore outperforms the state-of-the-art in most settings.

TailedCore: Few-Shot Sampling for Unsupervised Long-Tail Noisy Anomaly Detection

TL;DR

This work tackles unsupervised anomaly detection when normal data are both long-tailed and contaminated with noise. It introduces TailSampler, a class-size predictor that infers tail versus head samples via a reflective symmetry between inter-class and intra-class embedding similarities, enabling exclusive tail sampling. The tail-focused patches are integrated with a noise-discriminated memory bank to form TailedCore, a memory-based detector robust to both noise and class imbalance. Extensive experiments on modified MVTecAD and VisA datasets show that TailedCore consistently outperforms state-of-the-art methods across image- and pixel-level tasks under various tail/distribution and noise conditions, highlighting its practical potential for real-world industrial anomaly detection. The approach advances anomaly detection by combining principled few-shot sampling with a clean, representative memory, yielding significant improvements in challenging long-tail noisy environments.

Abstract

We aim to solve unsupervised anomaly detection in a practical challenging environment where the normal dataset is both contaminated with defective regions and its product class distribution is tailed but unknown. We observe that existing models suffer from tail-versus-noise trade-off where if a model is robust against pixel noise, then its performance deteriorates on tail class samples, and vice versa. To mitigate the issue, we handle the tail class and noise samples independently. To this end, we propose TailSampler, a novel class size predictor that estimates the class cardinality of samples based on a symmetric assumption on the class-wise distribution of embedding similarities. TailSampler can be utilized to sample the tail class samples exclusively, allowing to handle them separately. Based on these facets, we build a memory-based anomaly detection model TailedCore, whose memory both well captures tail class information and is noise-robust. We extensively validate the effectiveness of TailedCore on the unsupervised long-tail noisy anomaly detection setting, and show that TailedCore outperforms the state-of-the-art in most settings.

Paper Structure

This paper contains 39 sections, 1 theorem, 19 equations, 7 figures, 26 tables.

Key Result

Proposition 1

For distributions $p_{same}(s | e_i)$ and $p_{diff}(s | e_i)$ that are weakly increasing and decreasing, respectively, let $supp(p_{same})$ be disjoint with $supp(p_{diff})$ and $\max supp( p_{same}) = 1$ Then the threshold given by $\tau_i = \cos (\arccos (m_i) / 2)$ separates the supports by and maximizes the distance between $\tau_i$ and $supp (p_{diff}) \cup supp (p_{same})$ under arccosine t

Figures (7)

  • Figure 1: Tail class (x-axis) and noisy head class (y-axis) performance comparison. The tail-versus-noise trade-off is shown across memory-based anomaly detection models (circles), and is more indicative in anomaly classification task evaluated by image-level AUROC (left).
  • Figure 2: (left) The ratio of removed patches based on highest outlier scores by Eq. \ref{['eq:noise_disc']}, which shows that most of few-shot class patches are lost. (right) The ratio of sampled patches by greedy coreset sampling from PatchCore which favors both few-shot and anomaly samples.
  • Figure 3: (a) Sampling process description of TailedCore (ours) and (b) the illustration of how we use the elbow method thorndike1953belongs.
  • Figure 4: The plot of noise ratio of train data versus anomaly classification (image-level AUROC) and segmentation (pixel-level AUROC) performance. In all cases, TailedCore outperforms both PatchCore and SoftPatch. Dataset is MVTecAD with different tail distributions. The lines show the mean and shades show standard deviation of multiple runs of experiments with different seeds.
  • Figure 5: Classification accuracy between tail classes and noisy samples versus metrics relevant to class size prediction and few-shot sampling on MVTecAD and VisA datasets with step-like tailed distribution and $K=4$. The correlation is strong for (a) mis-sampling ratio, (b) ratio of missing few-shot samples, (e) class size prediction error, and (f) AUROC for predicting whether a sample is few-shot or not. We show that improving the discriminative aspect of network's embeddings improves few-shot sampling and prediction error of class size predictor, which in turn improves (g) anomaly classification (image-level AUROC) and (h) anomaly segmentation (pixel-level AUROC) performance of TailedCore.
  • ...and 2 more figures

Theorems & Definitions (2)

  • Proposition 1
  • proof