Vendi Anomaly Scores for Efficient and Accurate Anomaly Detection

Amey Praveen Pasarkar, Adji Bousso DiengNeurIPS 2026

TL;DR

Instead of hunting for anomalies by looking for isolated points in low-density neighborhoods, what if we asked: how much does removing this single data point change the overall diversity of the dataset? This paper introduces the Vendi Anomaly Score (VAS), a fast, tuning-free method that catches outliers in embedding spaces by measuring their unique impact on dataset diversity. It scales linearly, requires zero hyperparameter tuning, and outperforms both classical and deep-learning detectors across 148 benchmarks.

What Problem Does This Paper Address?

Modern datasets are massive, messy, and increasingly navigated via high-dimensional embeddings (like those from ViT or BERT). Cleaning this data requires unsupervised anomaly detection—finding corrupted, mislabeled, or out-of-place samples directly within an unlabeled dataset, without a clean reference set to compare against.

Classical unsupervised detectors have distinct blind spots in high-dimensional spaces: partitioning methods (like Isolation Forests) struggle with complex embedding geometry; density-based methods (like Local Outlier Factor) break down if you pick the wrong neighborhood size $k$; and distributional methods make rigid assumptions about how the data is shaped. Meanwhile, deep learning detectors are flexible, but training a new neural network just to audit a dataset is slow and computationally expensive. We need a detector as fast as classical algorithms, without their geometric blind spots or fussy hyperparameters.

Methods

The authors reframe anomaly detection through the lens of diversity, building on the Vendi Score (VS)—a standard metric that measures a dataset's diversity by computing the Rényi entropy of the eigenvalues of its similarity matrix. Intuitively, if you remove a normal, redundant data point, the dataset's overall diversity barely budges. If you remove a rare, weird anomaly, diversity drops noticeably.

While the Vendi Score is established, recalculating matrix eigenvalues after removing each of the $N$ points one by one would take $O(ND^3)$ time (where $D$ is embedding dimension)—an impossible bottleneck. Here is what the authors introduce to make VAS practical:

  • Fast First-Order Approximation: Recognizing that removing one point from a large dataset is just a tiny, rank-one perturbation to the feature covariance matrix, they derive a Taylor-like approximation in log-space. This collapses the entire leave-one-out calculation into a single global eigendecomposition followed by fast, batched matrix multiplication, slashing runtime to $O(ND^2 + D^3)$.
  • Automatic Geometry Adaptation: The Vendi Score relies on an order parameter $q$ that controls sensitivity to rare eigenmodes (the "spectral tail"). Because unsupervised settings have no validation set to tune $q$, VAS sets it automatically using the dataset's largest eigenvalue ($\lambda_1$): $q = \max(2(1-\lambda_1), 0.1)$. If embeddings are tightly concentrated (like text), $\lambda_1$ is large, pushing $q$ down to amplify subtle tail anomalies. If embeddings are spread out (like images), $q$ stays larger.

Datasets

The authors evaluate VAS purely on pre-trained embeddings across existing benchmarks alongside a new controlled scaling setup:

  • ADBENCH (148 benchmark instances): Derived from 10 source datasets across vision (CIFAR-10, FashionMNIST, MNIST-C, MVTec-AD, SVHN using ResNet18 and ViT embeddings) and text (20News, AGNews, Amazon, IMDB, Yelp using BERT and RoBERTa embeddings).
  • Large-scale ImageNet-1K: A controlled contamination experiment using DINOv3 ViT-B/16 embeddings, scaling up to 100,000 normal images mixed with disjoint anomalous classes to test robustness against clustered anomalies and high contamination rates.

Key Insights and Ideas

  • Catching "coherent" anomalies: If 500 anomalous images of dogs sneak into a dataset of cats, they will cluster together in embedding space. Nearest-neighbor methods get fooled because every dog has plenty of dog neighbors! The authors prove mathematically that VAS scores depend on the ratio of a subpopulation's size to its internal diversity. Small, diffuse clusters still trigger high VAS scores, catching grouped contaminants without ever explicitly running a clustering algorithm.
  • Approximation without compromise: Across all 148 benchmarks, the fast quadratic approximation preserves the exact leave-one-out anomaly rankings with an average Spearman rank correlation above $0.98$, while running orders of magnitude faster.
  • No-tuning beats unfair tuning: Even when competing baselines were allowed to cheat via a grid search over the evaluation sets to find their best hyperparameters, tuning-free VAS still beat them overall.

Key Results

  • State-of-the-art Accuracy: Across the 148 ADBENCH tasks, VAS achieved the best Average Rank of 2.35 in AUROC against 11 baselines (the runner-up, Gaussian-mixture Mahalanobis distance, scored 3.80; Isolation Forest scored 9.20). Improvements were statistically significant across all baselines ($p \le 1.34 \times 10^{-8}$).
  • Robustness at Scale: On ImageNet-1K, VAS outperformed all baselines as dataset sizes scaled from 10k to 100k samples and as anomaly contamination rates climbed from 1% all the way to 30%.
  • Speed: VAS scales linearly with sample size $N$. On GPU latency benchmarks up to 100,000 points, it is orders of magnitude faster than neural baselines (like SLAD and DTE) and among the fastest methods overall.

Limitations and Future Work

  • Garbage in, garbage out: VAS operates entirely on cosine similarity in a fixed embedding space. If the upstream model maps anomalies right on top of normal data, VAS cannot separate them.
  • Lack of explainability: VAS outputs a single scalar score; it tells you that a sample is weird, not why.
  • Heuristic $q$ selection: While the $\lambda_1$-based rule for picking $q$ works well empirically, it is still a heuristic and may not be optimal for every conceivable data geometry.
  • Future directions: The authors suggest extending VAS beyond cosine kernels to learned or task-specific similarity functions, developing more theoretically grounded rules for adapting $q$, and applying VAS to adjacent data-curation tasks like duplicate detection and coreset selection.

Summary updated

Abstract

Anomaly detection (AD) is a critical for trustworthy machine learning and scientific discovery. Existing methods typically define anomalies through local density, isolation heuristics, or distance from a fitted distribution, making them sensitive to neighborhood scale, partitioning choices, or restrictive distributional assumptions. In this work, we introduce a new paradigm by formulating anomaly detection from a diversity perspective. We propose the \emph{Vendi Anomaly Score} (VAS), which detects anomalies by quantifying how much a sample changes the diversity of the dataset, as measured by the Vendi score, when removed. VAS captures both local redundancy and global data structure without relying on density estimation or partitioning heuristics. Moreover, VAS requires no hyperparameter tuning, instead adapting automatically to the spectral structure of the data. VAS is non-parametric and scales linearly with dataset size. Across 148 benchmark embedding datasets derived from 10 source datasets and 4 embedding architectures, VAS achieves state-of-the-art AD performance. We further validate VAS on large-scale ImageNet experiments, where it remains robust as both contamination rate and dataset scale increase. Code to reproduce our results is openly available at <https://github.com/vertaix/vendi-anomaly-scores>.
BibTeX
@inproceedings{pasarkar2026vendi,
  author = {Amey Praveen Pasarkar and Adji Bousso Dieng},
  title = {{Vendi Anomaly Scores for Efficient and Accurate Anomaly Detection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=uT5yKtgYS0},
}
Figure