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%。