Abstract
Outlier detection (OD) algorithms typically output raw scores that lack a standardized scale, making them difficult to interpret across different models and datasets. Statistical scaling, particularly Gaussian scaling, is often employed to transform these scores into interpretable probabilities. However, standard Gaussian scaling relies on the sample mean and standard deviation, which are highly sensitive to the very outliers the models aim to detect. This "outlier paradox" leads to skewed distributions and underestimated outlier probabilities. We present Robust Statistical Scaling, a framework that replaces sensitive estimators with robust alternatives like the median and normalized Median Absolute Deviation (nMAD). Through an extensive benchmark of 231 score sets, we demonstrate that robust scaling significantly enhances the sharpness and accuracy of outlier probabilities, ensuring that critical anomalies receive the statistical weight they deserve.
Introduction: The Interpretability Gap in Outlier Detection
Modern outlier detection algorithms—ranging from classic k-Nearest Neighbors (kNN) to modern Isolation Forests—provide a numerical "outlier score" for each observation. While a higher score indicates a greater likelihood of being an anomaly, these scores are often arbitrary and algorithm-specific. For a human analyst, a score of 1.5 from one algorithm might be less significant than a 0.8 from another.
To bridge this gap, researchers transform scores into probabilities (ranging from 0 to 1). The standard approach, Gaussian scaling, fits a normal distribution to the scores and uses the cumulative distribution function (CDF) to assign probabilities. However, this method faces a fundamental statistical hurdle: the presence of outliers.
The Outlier Paradox and Non-Robust Scaling
Standard Gaussian scaling calculates the mean and standard deviation of the entire score set. Because outlier scores typically exhibit a "long tail" of extreme values, these outliers pull the mean toward the right and artificially inflate the standard deviation.
This phenomenon, which we term the "outlier paradox," causes the model to perceive the "normal" range as much wider than it actually is. Consequently, true outliers are assigned probabilities that are far too low, often masking their significance in high-stakes environments like fraud detection or medical diagnostics.
As shown in the figure above, the non-robust Gaussian distribution (solid line) is stretched by the outliers (orange bars), failing to accurately represent the dense cluster of inliers (blue bars). In contrast, the robust distribution (dashed line) remains centered on the inlier population.
Methodology: Robust Estimators
To overcome the limitations of standard scaling, we propose substituting sensitive parameters with robust estimators that ignore or down-weight extreme values:
- Robust Center Estimators: Instead of the sample mean, we utilize the median or an asymmetric trimmed mean (which excludes the top 10% of scores).
- Robust Scale Estimators: Instead of the standard deviation, we employ the normalized Median Absolute Deviation (nMAD) or the normalized Interquartile Range (nIQR).
- M-Estimators: We also explore iterative weighting functions, such as Huber’s and Tukey’s biweight, which automatically reduce the influence of extreme scores during the distribution fitting process.
We evaluate these methods based on three criteria: Sharpness (probabilities should be decisive, near 0 or 1), Refinement (clear separation between classes), and Calibration (probabilistic accuracy).
Experimental Setup
Our study involved a comprehensive benchmark using 21 real-world datasets from the ODDS repository. We applied 11 distinct outlier detection algorithms (including PCA, LOF, and ECOD) via the PyOD library, resulting in 231 unique sets of outlier scores. This diversity ensures that our findings are not specific to a particular algorithm or data domain.
Key Results and Discussion
The results across all datasets were consistent: robust scaling variants significantly outperformed standard Gaussian scaling in terms of probability accuracy for outliers.
Improved Sharpness and Separation
One of the most striking findings was the improvement in "sharpness." In standard scaling, true outliers often receive probabilities in the 0.4 to 0.6 range because the inflated standard deviation makes them appear less extreme. Robust methods correctly push these probabilities toward 1.0.
As illustrated in the histograms, robust scaling creates a much clearer bimodal distribution of probabilities, effectively separating the inliers (concentrated at 0) from the outliers (concentrated at 1).
The "Sweet Spot" for Scaling
While various robust combinations were tested, the most effective balanced approach for both inliers and outliers was found to be Gaussian scaling using the sample mean as the center and nMAD as the scale estimator. This combination provides the necessary robustness against outliers while maintaining stability for the majority of the data.
Conclusion and Future Work
Robust Statistical Scaling addresses a critical flaw in how we interpret anomaly detection results. By ensuring that outliers do not skew the very metrics used to identify them, we can produce more reliable and actionable probability estimates.
Future research will focus on developing "unsupervised internal measures" to evaluate probability quality without relying on ground-truth labels. Additionally, while this study focused on Gaussian distributions, exploring robust versions of other distributions—such as Gamma or Beta distributions—may yield further improvements in specific data contexts.
Summary updated