Formally Exploring Visual Anomaly Detection Evaluation Metrics

Nasar Iqbal, Dennis Wagner, Philipp Liznerski, Nabeel Hussain Syed, Sophie Fellenz, Niki Martinel, Marius KloftICML 2026

Introduction

Visual Anomaly Detection (VAD) is a high-stakes task critical to safety-sensitive domains, ranging from autonomous navigation to industrial surveillance—such as spotting a microscopic crack on a turbine blade. Despite the rapid proliferation of VAD algorithms, the way the field measures success remains fundamentally flawed.

Most researchers rely on standard pixel-level metrics like Precision, Recall, F1-score, or Intersection over Union (IoU). The core problem with these metrics is that they treat every pixel as an independent data point, rendering them "spatially blind." They do not distinguish between a model that identifies a defect with one clean, coherent shape and a model that produces a "spray" of tiny, disconnected dots. In real-world deployments, every disconnected detection triggers an independent alarm that a human inspector must manually verify. Consequently, a model that produces redundant or spatially incoherent predictions is an operational liability. Yet, standard metrics often award these "noisy" models higher scores than their more precise counterparts—a critical flaw the authors identify as a Lack of Structural Sensitivity.

A Formal Framework for VAD Evaluation

To move VAD evaluation from empirical intuition to formal mathematics, the authors introduce a framework of eight verifiable, axiomatic properties that any reliable VAD metric should satisfy. Among the most critical are:

  • Redundancy Penalization: Generating multiple fragmented detections for a single underlying defect should negatively impact the model's score.
  • Distance-Aware Severity: A false alarm located far away from any actual defect is operationally worse than a slight "bleed" at the boundary of a genuine defect.
  • Centrality Reward: Detections that successfully cover the core of an anomaly are more valuable than those that only catch its edges.

Through systematic analysis, the authors prove a stark reality: none of the six most common VAD metrics (Precision, Recall, F1, IoU, CA, MCC) satisfy all eight proposed properties. In fact, most fail on at least four.

The SAAM-ALARM Metric

To address this evaluation gap, the authors propose the Spatially Aware Anomaly Metric (SAAM-ALARM). Unlike traditional pixel-counting approaches, SAAM-ALARM is designed to account for spatial coherence, redundancy, and the distance of false alarms. It calculates a final score based on three core components:

  1. Object-Level Reward: A score weighted by how central the detection is to the ground-truth anomaly.
  2. Redundancy Regularization: A penalty term that exponentially discounts scores if a model produces multiple fragmented "alarms" for a single object.
  3. Proximity-Weighted Penalty: A penalty for false positives where "spurious" alarms far from any actual defect are penalized much more heavily than minor boundary inaccuracies.

Experimental Validation and Key Results

The authors validated their framework using two primary benchmarks: MVTec AD (the gold standard for industrial anomaly detection) and VisA (a challenging dataset with diverse, less structured anomalies).

The "Color Shuffling" Phenomenon

When ranking state-of-the-art models using traditional metrics, the results are often chaotic. A model might rank #1 in Recall but #6 in Precision. SAAM-ALARM resolves this by providing a stable, "inspection-aligned" ranking that rewards operational reliability over raw pixel-counting.

Model Re-ranking

Under SAAM-ALARM, the hierarchy of state-of-the-art models shifts significantly. Models like UniAD and Destseg emerge as superior because they produce concise, coherent localizations. Conversely, models like P-MambaAD—which perform exceptionally well on pixel-wise F1—are heavily penalized for producing spatially dispersed and redundant detections.

Robustness

Sensitivity analysis demonstrates that SAAM-ALARM’s rankings remain consistent even when internal hyperparameters (such as the redundancy penalty base) are adjusted. This proves the metric measures systemic model traits rather than arbitrary configuration artifacts.

Limitations and Future Directions

While SAAM-ALARM establishes a stronger standard for performance benchmarking, the authors note a few limitations:

  • Threshold Dependency: The current framework focuses on threshold-dependent metrics. While industrial deployment requires a strict operating threshold, extending these formal properties to threshold-independent metrics (like AUROC) remains an open challenge.
  • Annotation Quality: The metric assumes highly reliable annotations. In datasets with noisy or ambiguous ground truths, SAAM-ALARM's strict spatial requirements could inadvertently penalize valid detections.

Looking forward, the authors suggest that SAAM-ALARM's mathematical formulations could be adapted into a loss function during training, allowing researchers to directly optimize VAD models for spatial coherence and low redundancy from the ground up.

Summary updated

BibTeX
@inproceedings{iqbal2026formally,
  author = {Nasar Iqbal and Dennis Wagner and Philipp Liznerski and Nabeel Hussain Syed and Sophie Fellenz and Niki Martinel and Marius Kloft},
  title = {{Formally Exploring Visual Anomaly Detection Evaluation Metrics}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Cotj8tWdYp},
}
Figure