arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.10359cs.SEcs.AI
收藏

管控深度学习模型:一种基于历史信息缓解过拟合的方法

Keeping Deep Learning Models in Check: A History-Based Approach to Mitigate Overfitting

University of Alberta(阿尔伯塔大学);Huawei Canada(华为加拿大公司);York University(约克大学)

Hao Li, Gopi Krishnan Rajbahadur, Dayi Lin, Cor-Paul Bezemer, Zhen Ming, Jiang

AI总结:

针对软件工程中深度学习模型过拟合问题,提出基于训练历史的时间序列分类器方法,可同时检测与预防过拟合,检测F1达0.91,停止训练时机比早停法提前至少32%。

摘要:

在软件工程领域,深度学习模型正越来越多地被部署用于漏洞检测、代码审查等关键任务。然而,过拟合仍然是一个棘手的挑战,会影响采用深度学习模型的软件系统的质量、可靠性与可信度。过拟合的应对方式分为两类:(1)预防(例如使用dropout或早停法);(2)在已训练模型中检测(例如使用基于相关性的方法)。目前常用的过拟合检测与预防方法都存在局限性,比如需要修改模型结构、消耗大量计算资源。\n本文提出了一种简单但高效的方法,能够基于训练历史(即验证损失)同时实现过拟合的检测与预防。该方法首先在过拟合模型的训练历史数据上训练一个时间序列分类器,随后用这个分类器检测已训练模型是否存在过拟合。此外,训练好的分类器还可以通过识别模型训练的最优停止点来预防过拟合。\n我们在真实样本上评估了该方法识别与预防过拟合的能力,将其与基于相关性的检测方法、最常用的预防方法(即早停法)进行对比。结果显示,该方法的F1值达到0.91,比当前性能最优的非侵入式过拟合检测方法至少高出5%。此外,该方法为避免过拟合而停止训练的时机,比早停法至少提前32%,且返回最优模型的效率与早停法相当甚至更优。

英文摘要:

In software engineering, deep learning models are increasingly deployed for critical tasks such as bug detection and code review. However, overfitting remains a challenge that affects the quality, reliability, and trustworthiness of software systems that utilize deep learning models. Overfitting can be (1) prevented (e.g., using dropout or early stopping) or (2) detected in a trained model (e.g., using correlation-based approaches). Both overfitting detection and prevention approaches that are currently used have constraints (e.g., requiring modification of the model structure, and high computing resources). In this paper, we propose a simple, yet powerful approach that can both detect and prevent overfitting based on the training history (i.e., validation losses). Our approach first trains a time series classifier on training histories of overfit models. This classifier is then used to detect if a trained model is overfit. In addition, our trained classifier can be used to prevent overfitting by identifying the optimal point to stop a model's training. We evaluate our approach on its ability to identify and prevent overfitting in real-world samples. We compare our approach against correlation-based detection approaches and the most commonly used prevention approach (i.e., early stopping). Our approach achieves an F1 score of 0.91 which is at least 5% higher than the current best-performing non-intrusive overfitting detection approach. Furthermore, our approach can stop training to avoid overfitting at least 32% of the times earlier than early stopping and has the same or a better rate of returning the best model.

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

↑