Expected similarity estimation for large-scale batch and streaming anomaly detection

Markus Schneider, Wolfgang Ertel, Fabio Ramos

In the era of big data, identifying anomalies—rare events that deviate significantly from the norm—is critical for applications ranging from fraud detection to industrial monitoring. However, traditional methods often fail to scale to the massive, high-velocity data streams typical of modern systems. This paper introduces EXPoSE (EXPected Similarity Estimation), a kernel-based approach designed for linear scalability and constant-time performance in both batch and streaming contexts.

The Challenge of Scalability

Classic anomaly detection algorithms, such as $k$-Nearest Neighbors or Kernel Density Estimation, face a significant "Big Data Problem": their computational costs often grow quadratically with the number of data points ($O(n^2)$). For data streams, where information arrives continuously and distributions may shift (concept drift), these methods require frequent, expensive retraining that is often infeasible in real-time environments.

Visualizing the anomaly detection task: distinguishing anomalous instances (triangles) from the normal data distribution (circles) using marginal histograms.

The EXPoSE Framework

EXPoSE shifts the focus from modeling the entire density of the data to estimating the expected similarity between a new point and the distribution of "normal" data.

  • Kernel Mean Maps: The algorithm represents the entire distribution of normal data as a single point (a "mean map") in a high-dimensional Reproducing Kernel Hilbert Space (RKHS). This effectively collapses the entire history of a data stream into a single, fixed-size vector.
  • Random Kitchen Sinks (RKS): To maintain constant-time performance, EXPoSE uses RKS to approximate complex kernels (like the Gaussian RBF) using finite-dimensional vectors. This allows the similarity score—the inner product between a new point's feature map and the distribution's mean map—to be calculated in $O(1)$ time relative to the number of data points.
  • Incremental Learning: Because the model is essentially a weighted average, updating it for a new data point takes constant time and memory, making it natively streaming-ready.

Performance and Results

The authors evaluated EXPoSE across 27 batch datasets and several evolving data streams, comparing it against established methods like One-Class SVM (OC-SVM) and Isolation Forest (iForest).

  • Speed: On the KDDCup 99 dataset (over 1 million instances), EXPoSE processed the data in just 44 seconds, whereas an OC-SVM required over 6 hours.
  • Accuracy: EXPoSE achieved the highest average rank in AUC (Area Under the Curve) across the batch benchmarks, demonstrating that its efficiency does not come at the cost of predictive power.
  • Parallelism and Adaptability: The model is "embarrassingly parallel," allowing partial mean maps to be computed independently and merged without loss of accuracy. Furthermore, it handles concept drift through a "blind adaptation" strategy—gradually decaying the influence of old data—which allows the model to track shifting distributions efficiently.

Conclusion

EXPoSE provides a robust, non-parametric solution for large-scale anomaly detection. By leveraging the efficiency of kernel mean maps and random feature approximations, it offers a rare combination of state-of-the-art accuracy, linear training time, and constant memory usage, making it uniquely suited for the demands of real-time big data analytics.

Reference: Schneider, M., Ertel, W. & Ramos, F. Expected similarity estimation for large-scale batch and streaming anomaly detection. Mach Learn 105, 305–333 (2016).

Summary updated

BibTeX
@article{schneider2016expected,
  author = {Markus Schneider and Wolfgang Ertel and Fabio Ramos},
  title = {{Expected similarity estimation for large-scale batch and streaming anomaly detection}},
  journal = {Machine Learning},
  year = {2016},
  doi = {10.1007/s10994-016-5567-7},
}
Figure