arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.10062cs.LGstat.ML
收藏

用于分布外检测的最优参数与神经元剪枝

Optimal Parameter and Neuron Pruning for Out-of-Distribution Detection

Alibaba Cloud(阿里云);Zhejiang University(浙江大学)

Chao Chen, Zhihang Fu, Kai Liu, Ze Chen, Mingyuan Tao, Jieping Ye

AI总结:

提出免训练的最优参数与神经元剪枝(OPNP)方法,通过评估并移除导致过拟合的参数和神经元,有效利用训练数据先验信息,在多个OOD检测任务上大幅超越现有方法。

摘要:

对于部署在真实世界场景中的机器学习模型,检测分布外(OOD)样本的能力是不可或缺且具有挑战性的。大多数现有的OOD检测方法侧重于探索先进的训练技巧或免训练技巧,以防止模型对未知样本给出过度自信的置信度分数。基于训练的方法需要昂贵的训练成本并依赖于并不总是可用的OOD样本,而大多数免训练方法无法有效利用来自训练数据的先验信息。在这项工作中,我们提出了一种最优参数与神经元剪枝(OPNP)方法,旨在识别并移除那些导致过拟合的参数和神经元。主要方法分为两步。在第一步中,我们通过对所有训练样本的梯度取平均值来评估模型参数和神经元的敏感性。在第二步中,将具有异常大或接近零敏感性的参数和神经元移除以进行预测。我们的方法是免训练的,与其他事后方法兼容,并探索了来自所有训练数据的信息。在多个OOD检测任务和模型架构上进行了大量实验,表明我们提出的OPNP始终以较大优势优于现有方法。

英文摘要:

For a machine learning model deployed in real world scenarios, the ability of detecting out-of-distribution (OOD) samples is indispensable and challenging. Most existing OOD detection methods focused on exploring advanced training skills or training-free tricks to prevent the model from yielding overconfident confidence score for unknown samples. The training-based methods require expensive training cost and rely on OOD samples which are not always available, while most training-free methods can not efficiently utilize the prior information from the training data. In this work, we propose an \textbf{O}ptimal \textbf{P}arameter and \textbf{N}euron \textbf{P}runing (\textbf{OPNP}) approach, which aims to identify and remove those parameters and neurons that lead to over-fitting. The main method is divided into two steps. In the first step, we evaluate the sensitivity of the model parameters and neurons by averaging gradients over all training samples. In the second step, the parameters and neurons with exceptionally large or close to zero sensitivities are removed for prediction. Our proposal is training-free, compatible with other post-hoc methods, and exploring the information from all training data. Extensive experiments are performed on multiple OOD detection tasks and model architectures, showing that our proposed OPNP consistently outperforms the existing methods by a large margin.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑