arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2409.16223cs.LGcs.AIcs.CV
收藏

微调是可行的,只要经过校准

Fine-Tuning is Fine, if Calibrated

The Ohio State University(俄亥俄州立大学);University of Wisconsin Madison(威斯康星大学麦迪逊分校);Rensselaer Polytechnic Institute(伦斯勒理工学院)

Zheda Mai, Arpita Chowdhury, Ping Zhang, Cheng-Hao Tu, Hong-You Chen, Vardaan Pahuja, Tanya Berger-Wolf, Song Gao, Charles Stewart, Yu Su, Wei-Lun Chao

AI总结:

针对微调导致模型在旧类别上准确率下降的问题,本文发现其根本原因是微调类别与其他类别间的logit尺度不一致,并提出简单后处理校准方法即可恢复模型能力并保留特征改进。

摘要:

微调可以说是将预训练模型(例如基础模型)适配到下游应用的最直接方法,但它也带来了丢失模型在预训练中学习到的宝贵知识的风险。例如,将一个能够识别大量类别的预训练分类器进行微调,使其掌握手头上的一个子集类别,被证明会大幅降低该模型在它以前学习过的其他类别上的准确率。因此,当微调后的模型遇到微调数据之外的类别时,就很难进一步使用它。在本文中,我们系统地剖析了这个问题,旨在回答一个基本问题:“微调后的模型中什么被破坏了?”令人惊讶的是,我们发现微调后的模型既没有忘记其他类别之间的关系,也没有降低识别这些类别的特征。相反,微调后的模型通常会为这些其他类别产生更具判别性的特征,即使它们在微调期间缺失了!真正损害准确率的是微调类别和其他类别之间不一致的 logit 尺度,这意味着一个简单的后处理校准就能恢复预训练模型的能力,同时揭示在所有类别上的特征改进。我们进行了广泛的实证研究,以证明我们发现的稳健性,并提供了其背后的初步解释,为未来的理论分析提出了新方向。我们的代码可在 https://github.com/OSU-MLB/Fine-Tuning-Is-Fine-If-Calibrated 获取。

英文摘要:

Fine-tuning is arguably the most straightforward way to tailor a pre-trained model (e.g., a foundation model) to downstream applications, but it also comes with the risk of losing valuable knowledge the model had learned in pre-training. For example, fine-tuning a pre-trained classifier capable of recognizing a large number of classes to master a subset of classes at hand is shown to drastically degrade the model's accuracy in the other classes it had previously learned. As such, it is hard to further use the fine-tuned model when it encounters classes beyond the fine-tuning data. In this paper, we systematically dissect the issue, aiming to answer the fundamental question, "What has been damaged in the fine-tuned model?" To our surprise, we find that the fine-tuned model neither forgets the relationship among the other classes nor degrades the features to recognize these classes. Instead, the fine-tuned model often produces more discriminative features for these other classes, even if they were missing during fine-tuning! {What really hurts the accuracy is the discrepant logit scales between the fine-tuning classes and the other classes}, implying that a simple post-processing calibration would bring back the pre-trained model's capability and at the same time unveil the feature improvement over all classes. We conduct an extensive empirical study to demonstrate the robustness of our findings and provide preliminary explanations underlying them, suggesting new directions for future theoretical analysis. Our code is available at https://github.com/OSU-MLB/Fine-Tuning-Is-Fine-If-Calibrated.

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

↑