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.
翻译:我们从训练数据中学到的特征构成了模型中的知识基础。我们定义研究范围为网络所需额外容量以描述不同于训练数据的推断样本。为了探究网络的研究范围,我们利用梯度测量模型为更准确表征给定输入所需的变化量。为了消除在生成梯度时对基准标签的依赖性,我们引入了混淆标签,将多个分类标签结合在一起。我们证明了我们的基于梯度的方法可以有效地区分无法准确表示学习特征的输入。我们在检测异常输入方面应用我们的方法,包括未知领域、对抗性和损坏样本。我们的方法不需要超参数调整或额外的数据处理,并且在 AUROC 得分方面比最先进的方法分别表现出高达2.7%、19.8%和35.6%的优势。