Chen Qichao, Li Kuan, Chen Zhiyuan, Maul Tomas, Yin Jianping
School of Computer Science and Technology, Dongguan University of Technology, Dongguan, 523820, China.
School of Computer Science, University of Nottingham Malaysia, Selangor, 43500, Malaysia.
Sci Rep. 2024 Nov 18;14(1):28444. doi: 10.1038/s41598-024-79934-7.
Out-of-distribution (OOD) detection is a crucial problem in practice, especially, for the safe deployment of machine learning models in industrial settings. Previous work has used free energy as a score function and proposed a fine-tuning method that utilized OOD data in the training phase of the classification model, which achieves a higher performance on the OOD detection task compared with traditional methods. One key drawback, however, is that the loss function parameters are highly dependent on involved datasets, which means it cannot be dynamically adapted and implemented in others settings; in other words, the general ability of the energy score is considerably limited. In this work, our point of departure is to enlarge distinguishability between in-distribution features and OOD data. Consequently, we present a simple yet effective sparsity-regularized (SR) tuning framework for this purpose. Our framework has two types of workflows depending on if external OOD data is available, the complexity of the original training loss is sharply reduced by adopting this modification, meanwhile, the adapted ability and detection performance are enhanced. Also, we contribute a mini dataset as a light and efficient alternative of the previous large-scale one. In the experiments, we verify the effectiveness of our framework in a wide range of typical datasets along with common network architectures.
分布外(OOD)检测在实践中是一个关键问题,特别是对于机器学习模型在工业环境中的安全部署而言。先前的工作使用自由能作为评分函数,并提出了一种微调方法,该方法在分类模型的训练阶段利用OOD数据,与传统方法相比,在OOD检测任务上实现了更高的性能。然而,一个关键缺点是损失函数参数高度依赖于所涉及的数据集,这意味着它不能在其他设置中动态调整和实现;换句话说,能量分数的通用能力相当有限。在这项工作中,我们的出发点是扩大分布内特征与OOD数据之间的可区分性。因此,我们为此提出了一个简单而有效的稀疏正则化(SR)调整框架。我们的框架根据是否有外部OOD数据有两种工作流程,通过采用这种修改,原始训练损失的复杂度大幅降低,同时,适应能力和检测性能得到增强。此外,我们贡献了一个小型数据集作为先前大规模数据集的轻量级高效替代方案。在实验中,我们在广泛的典型数据集以及常见网络架构中验证了我们框架的有效性。