Are Anomaly Scores Telling the Whole Story? A Benchmark for Multilevel Anomaly Detection

Tri Cao, Minh-Huy Trinh, Ailin Deng, Quoc-Nam Nguyen, Khoa Duong, Ngai-Man Cheung, Bryan HooiarXiv 2024 · DOI

TL;DR

This paper introduces "Multilevel Anomaly Detection" (MAD), a new paradigm that goes beyond simply flagging anomalies to assessing their severity. They've created MAD-Bench, a comprehensive benchmark to evaluate how well anomaly scores reflect real-world severity, and found that while traditional methods struggle, large language models show promise in this nuanced task.

What Problem Does This Paper Address?

Traditional anomaly detection (AD) systems are great at telling you if something is an anomaly, but not how bad it is. In many real-world applications, like medical imaging or industrial inspection, anomalies exist on a spectrum of severity. A minor surface scratch on a product is very different from a critical component failure. Current AD models, often trained in a binary "normal vs. anomaly" setting, produce scores based on deviation from normal data, which doesn't necessarily correlate with the practical impact or risk of the anomaly. This gap means critical issues might be overlooked, or resources misallocated. The authors aim to bridge this by developing a framework that explicitly accounts for anomaly severity.

Methods

The core contribution is the Multilevel Anomaly Detection (MAD) setting. Here, data points are categorized not just as normal or anomalous, but into multiple levels of anomaly severity (e.g., L0 for normal, L1 for minor anomaly, L2 for moderate, etc.). The goal is to train models that output anomaly scores where higher scores consistently correspond to higher severity levels.

To evaluate this, they introduce MAD-Bench, a novel benchmark. This benchmark adapts existing datasets and creates new ones to include severity labels. It's designed to assess models on two fronts: their ability to detect anomalies (binary detection) and their effectiveness in assigning severity-aligned scores.

They also explore two types of baselines:

  • Conventional Baselines: Standard AD techniques like reconstruction-based models, one-class classifiers, and memory-bank methods.
  • Multimodal Large Language Model (MLLM)-based Baselines: Leveraging the power of LLMs, they use few-shot learning (providing a few examples) to enable these models to interpret images and assign severity scores, often with accompanying explanations. This is a key innovation as LLMs can incorporate domain knowledge.

Datasets

MAD-Bench comprises six datasets across various domains:

  • One-Class Novelty Detection: MultiDogs-MAD (newly created, using dog breeds with increasing dissimilarity).
  • Industrial Inspection: MVTec-MAD and VisA-MAD (adapted from existing datasets, with severity levels assigned based on economic impact).
  • Medical Imaging: DRD-MAD (Diabetic Retinopathy Detection, already has severity labels), Covid19-MAD (COVID-19 severity scoring, already has severity labels), and SkinLesion-MAD (skin lesion analysis, adapted with severity levels).

Key Insights and Ideas

  • Severity Matters: The core idea is that simply detecting an anomaly isn't enough; understanding its severity is crucial for real-world decision-making.
  • LLMs for Nuance: Large Language Models, when prompted correctly, show a strong capability to understand visual context and assign severity scores, often outperforming traditional methods in this specific task. This highlights the value of incorporating domain knowledge.
  • Binary vs. Multilevel: While binary AD performance often correlates with multilevel performance, it's not a perfect predictor. Some models excel at severity alignment even if their binary detection isn't top-tier.
  • Area Bias: Traditional AD models tend to be biased towards larger anomalous regions, assigning them higher scores. This can be a limitation when small anomalies have high impact. LLMs seem less prone to this bias.
  • Robustness Challenges: Data corruption (like noise or brightness changes) negatively impacts most models, especially those requiring fine-grained feature analysis.

Key Results

  • MLLM Superiority: For multilevel anomaly detection, MLLM-based baselines generally outperformed conventional methods, achieving higher C-index and Kendall's Tau-b scores, indicating better severity alignment.
  • Medical Data Difficulty: Conventional models struggled significantly on medical datasets (DRD-MAD, Covid19-MAD), with C-scores around 65%, suggesting these require more sophisticated approaches.
  • Correlation Found: A strong positive correlation (Spearman's rho ~0.97) was found between binary AD performance (AUC) and multilevel performance (C-index/Kendall's Tau-b), but with notable exceptions for certain models.
  • Severity Trend: Most models showed an upward trend in detection performance as anomaly severity increased, meaning they were better at spotting more severe anomalies.
  • Normal Class Expansion Impact: Expanding the "normal" class to include light anomalies generally decreased performance for most models, except for one MLLM-based model (MMAD-40) which showed more stability.

Limitations and Future Work

  • Data Corruption: All models showed a performance drop under data corruption, particularly on datasets requiring fine-grained analysis. This highlights the need for more robust models.
  • MLLM Integration: The authors suggest a promising future direction is a hybrid approach combining conventional AD for detection with MLLMs for severity assessment, leveraging the strengths of both.
  • Zero-Shot vs. Few-Shot: Zero-shot MLLM performance (without reference images) was significantly lower than few-shot, emphasizing the importance of providing normal examples for context.

Summary updated

Abstract

Anomaly detection (AD) is a machine learning task that identifies anomalies by learning patterns from normal training data. In many real-world scenarios, anomalies vary in severity, from minor anomalies with little risk to severe abnormalities requiring immediate attention. However, existing models primarily operate in a binary setting, and the anomaly scores they produce are usually based on the deviation of data points from normal data, which may not accurately reflect practical severity. In this paper, we address this gap by making three key contributions. First, we propose a novel setting, Multilevel AD (MAD), in which the anomaly score represents the severity of anomalies in real-world applications, and we highlight its diverse applications across various domains. Second, we introduce a novel benchmark, MAD-Bench, that evaluates models not only on their ability to detect anomalies, but also on how effectively their anomaly scores reflect severity. This benchmark incorporates multiple types of baselines and real-world applications involving severity. Finally, we conduct a comprehensive performance analysis on MAD-Bench. We evaluate models on their ability to assign severity-aligned scores, investigate the correspondence between their performance on binary and multilevel detection, and study their robustness. This analysis offers key insights into improving AD models for practical severity alignment. The code framework and datasets used for the benchmark will be made publicly available.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
MAD-Bench · six-dataset averageMMAD-4o (few-shot)C-index (C)81.24%+5.1 vs baselineAnomaly Detection · few-shot · reference-images=3
Source quote
L1048: MMAD-4o │ 98.44 │ 0.933 │ 95.91 │ 95.98 │ 0.646 │ 83.52 │ 79.34 │ 0.621 │ 77.74 │ 65.80 │ 0.433 │ 67.72 │ 88.07 │ 0.547 │ 76.94 │ 99.43 │ 0.694 │ 85.61 │ 87.85 │ 0.646 │ 81.24
MAD-Bench · six-dataset averageMMAD-Sonnet (few-shot)C-index (C)79.77%+3.63 vs baselineAnomaly Detection · few-shot · reference-images=3
Source quote
L1049: MMAD-Sonnet │ 97.89 │ 0.936 │ 97.34 │ 90.02 │ 0.557 │ 77.33 │ 76.24 │ 0.561 │ 74.86 │ 65.02 │ 0.403 │ 69.30 │ 92.35 │ 0.601 │ 80.54 │ 99.82 │ 0.610 │ 79.23 │ 86.89 │ 0.611 │ 79.77
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
MAD-Bench · six-dataset averageRRD baselineC-index (C)76.14%Anomaly Detection
Source quote
L1042: RRD \cite{tien2023revisiting} │ 81.67 │ 0.510 │ 78.51 │ 99.51 │ 0.518 │ 80.72 │ 93.99 │ 0.620 │ 88.53 │ 61.83 │ 0.243 │ 63.55 │ 84.36 │ 0.240 │ 63.07 │ 99.53 │ 0.558 │ 82.48 │ 86.81 │ 0.448 │ 76.14
MAD-Bench · six-dataset averageSonnet (zero-shot) baselineC-index (C)76.09%Anomaly Detection · 0-shot
Source quote
L1046: Sonnet (zero-shot) │ 97.05 │ 0.928 │ 97.12 │ 76.73 │ 0.425 │ 69.00 │ 66.65 │ 0.384 │ 65.72 │ 62.97 │ 0.380 │ 66.53 │ 91.36 │ 0.581 │ 78.56 │ 99.96 │ 0.583 │ 79.61 │ 82.46 │ 0.547 │ 76.09
BibTeX
@misc{cao2024are,
  author = {Tri Cao and Minh-Huy Trinh and Ailin Deng and Quoc-Nam Nguyen and Khoa Duong and Ngai-Man Cheung and Bryan Hooi},
  title = {{Are Anomaly Scores Telling the Whole Story? A Benchmark for Multilevel Anomaly Detection}},
  year = {2024},
  eprint = {2411.14515},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.14515},
}
Figure