We analyze the data-dependent capacity of neural networks and assess anomalies in inputs from the perspective of networks during inference. The notion of data-dependent capacity allows for analyzing the knowledge base of a model populated by learned features from training data. We define purview as the additional capacity necessary to characterize inference samples that differ from the training data. To probe the purview of a network, we utilize gradients to measure the amount of change required for the model to characterize the given inputs more accurately. To eliminate the dependency on ground-truth labels in generating gradients, we introduce confounding labels that are formulated by combining multiple categorical labels. We demonstrate that our gradient-based approach can effectively differentiate inputs that cannot be accurately represented with learned features. We utilize our approach in applications of detecting anomalous inputs, including out-of-distribution, adversarial, and corrupted samples. Our approach requires no hyperparameter tuning or additional data processing and outperforms state-of-the-art methods by up to 2.7%, 19.8%, and 35.6% of AUROC scores, respectively.
翻译:我们通过分析神经网络的数据依赖能力并从网络推断的角度评估输入中的异常性。数据依赖能力的概念允许分析由训练数据中学习到的特征构成的模型的知识基础。我们将 purview 定义为表征与训练数据不同的推断样本所需的额外能力。为了探索网络的能力范围,我们利用梯度来衡量使模型对给定输入进行更准确表征所需的改变量。为了避免对生成梯度的基础真实标签的依赖性,我们引入混淆标签,将多个分类标签组合形成。我们展示了我们基于梯度的方法可以有效区分不能用学习到的特征准确表征的输入。我们将我们的方法应用于检测异常输入,包括超出分布范围、对抗性和受损样本。我们的方法不需要超参数调整或额外的数据处理,并且在准确度上优于最先进的方法,分别高出 AUROC 所得分数的 2.7%、19.8% 和 35.6%。