Recent research has revealed that deep generative models including flow-based models and Variational Autoencoders may assign higher likelihoods to out-of-distribution (OOD) data than in-distribution (ID) data. However, we cannot sample OOD data from the model. This counterintuitive phenomenon has not been satisfactorily explained and brings obstacles to OOD detection with flow-based models. In this paper, we prove theorems to investigate the Kullback-Leibler divergence in flow-based model and give two explanations for the above phenomenon. Based on our theoretical analysis, we propose a new method \PADmethod\ to leverage KL divergence and local pixel dependence of representations to perform anomaly detection. Experimental results on prevalent benchmarks demonstrate the effectiveness and robustness of our method. For group anomaly detection, our method achieves 98.1\% AUROC on average with a small batch size of 5. On the contrary, the baseline typicality test-based method only achieves 64.6\% AUROC on average due to its failure on challenging problems. Our method also outperforms the state-of-the-art method by 9.1\% AUROC. For point-wise anomaly detection, our method achieves 90.7\% AUROC on average and outperforms the baseline by 5.2\% AUROC. Besides, our method has the least notable failures and is the most robust one.
翻译:最近的研究表明,深度基因化模型,包括以流为基础的模型和自动自动代谢器,可能比在分配(ID)数据中的数据更有可能出现分配外(OOOD)数据。然而,我们无法从模型中抽样OOOD数据。这一反直觉现象没有得到令人满意的解释,并给以流为基础的模型探测OOD带来障碍。在本文中,我们证明用于调查以流为基础的模型中库尔背利利利差的理论,并给出上述现象的两个解释。根据我们的理论分析,我们提出了一种新的方法 \ PADMethod\ 来利用 KL 差异和本地表象对异常检测的依赖。关于流行基准的实验结果表明我们的方法的有效性和稳健。关于群体异常检测,我们的方法平均达到98.1 AMUROC,小批量尺寸为5. 相反,基于基准的测试方法平均只能达到64.6<unk> AUROC,由于在挑战性问题上的失败,我们的方法也超越了我们最不稳的状态- UR 7 和最稳健的常规方法。</s>