Anomaly detection methods are widely used but often rely on ad hoc rules or strong assumptions, and they often focus on tail events, missing ``inlier'' anomalies that occur in low-density gaps between modes. We propose a unified framework that defines an anomaly as an observation with unusually low probability under a (possibly misspecified) model. For each observation we compute its surprisal (the negative log generalized density) and define an anomaly score as the probability of a surprisal at least as large as that observed. This reduces anomaly detection for complex univariate or multivariate data to estimating the upper tail of a univariate surprisal distribution. We develop two model-robust estimators of these tail probabilities: an empirical estimator based on the observed surprisal distribution and an extreme-value estimator that fits a Generalized Pareto Distribution above a high threshold. For the empirical method we give conditions under which tail ordering is preserved and derive finite-sample confidence guarantees via the Dvoretzky--Kiefer--Wolfowitz inequality. For the GPD method we establish broad tail conditions ensuring classical extreme-value behavior. Simulations and applications to French mortality and Test-cricket data show the approach remains effective under substantial model misspecification.
翻译:异常检测方法应用广泛,但通常依赖于特定规则或强假设,且往往关注尾部事件,忽略了发生在模态间低密度间隙的"内点"异常。我们提出一个统一框架,将异常定义为在(可能误设的)模型下概率异常低的观测值。针对每个观测值,我们计算其惊奇值(负对数广义密度),并将异常分数定义为观测到至少同等惊奇值的概率。这将复杂单变量或多变量数据的异常检测问题简化为估计单变量惊奇值分布的上尾概率。我们开发了两种模型稳健的尾部概率估计器:基于观测惊奇值分布的经验估计器,以及在高阈值以上拟合广义帕累托分布的极值估计器。对于经验方法,我们给出了尾部排序保持的条件,并通过Dvoretzky--Kiefer--Wolfowitz不等式推导了有限样本置信保证。对于GPD方法,我们建立了确保经典极值行为的广义尾部条件。通过法国死亡率数据和板球测试赛数据的仿真与应用表明,该方法在模型存在显著误设时仍保持有效性。