Detecting Localized Density Anomalies in Multivariate Data via Coin-Flip Statistics
Sebastian Springer, Andre Scaffidi, Maximilian Autenrieth, Gabriella Contardo, Alessandro Laio, Roberto Trotta, Heikki Haario
TL;DR
EagleEye tackles the problem of detecting localized density differences between two multivariate datasets via a simple, fully unsupervised two-sample framework. It casts local neighbourhood composition as a coin-flip process, computing a per-point anomaly score $\Upsilon_i = \max_{K \le K_M} -\log \mathrm{pval}(B_{\mathrm{obs}}(i,K))$ and flagging potential anomalies, which are then refined by Iterative Density Equalization (IDE) and multimodal repêchage to isolate genuine local overdensities. An injection-based procedure estimates irreducible background and yields an unsupervised estimate of the local signal purity $\widehat{\frac{S_{\alpha}}{S_{\alpha}+B_{\alpha}}}$, enabling a global assessment via the aggregated anomaly sets. Demonstrations on synthetic Gaussian-density anomalies, LHC resonance detection, and climate-temperature data show EagleEye’s ability to detect tiny localized signals (e.g., 0.3\% at the LHC) while maintaining scalability and deterministic, parallelizable computation. The method is broadly applicable to fields ranging from high-energy physics to climate science, offering per-region localization, robust performance in high dimensions, and explicit estimates of background and signal composition without reliance on kernel-based models or pre-specified signal regions.
Abstract
Detecting localized density differences in multivariate data is a crucial task in computational science. Such anomalies can indicate a critical system failure, lead to a groundbreaking scientific discovery, or reveal unexpected changes in data distribution. We introduce EagleEye, an anomaly detection method to compare two multivariate datasets with the aim of identifying local density anomalies, namely over- or under-densities affecting only localised regions of the feature space. Anomalies are detected by modelling, for each point, the ordered sequence of its neighbours' membership label as a coin-flipping process and monitoring deviations from the expected behaviour of such process. A unique advantage of our method is its ability to provide an accurate, entirely unsupervised estimate of the local signal purity. We demonstrate its effectiveness through experiments on both synthetic and real-world datasets. In synthetic data, EagleEye accurately detects anomalies in multiple dimensions even when they affect a tiny fraction of the data. When applied to a challenging resonant anomaly detection benchmark task in simulated Large Hadron Collider data, EagleEye successfully identifies particle decay events present in just 0.3% of the dataset. In global temperature data, EagleEye uncovers previously unidentified, geographically localised changes in temperature fields that occurred in the most recent years. Thanks to its key advantages of conceptual simplicity, computational efficiency, trivial parallelisation, and scalability, EagleEye is widely applicable across many fields.
