Fine-Tuning is Fine, if Calibrated

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Mai, Zheda, Chowdhury, Arpita, Zhang, Ping, Tu, Cheng-Hao, Chen, Hong-You, Pahuja, Vardaan, Berger-Wolf, Tanya, Gao, Song, Stewart, Charles, Su, Yu, Chao, Wei-Lun
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866912071109574656
author Mai, Zheda
Chowdhury, Arpita
Zhang, Ping
Tu, Cheng-Hao
Chen, Hong-You
Pahuja, Vardaan
Berger-Wolf, Tanya
Gao, Song
Stewart, Charles
Su, Yu
Chao, Wei-Lun
author_facet Mai, Zheda
Chowdhury, Arpita
Zhang, Ping
Tu, Cheng-Hao
Chen, Hong-You
Pahuja, Vardaan
Berger-Wolf, Tanya
Gao, Song
Stewart, Charles
Su, Yu
Chao, Wei-Lun
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2409_16223
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Fine-Tuning is Fine, if Calibrated
Mai, Zheda
Chowdhury, Arpita
Zhang, Ping
Tu, Cheng-Hao
Chen, Hong-You
Pahuja, Vardaan
Berger-Wolf, Tanya
Gao, Song
Stewart, Charles
Su, Yu
Chao, Wei-Lun
Machine Learning
Artificial Intelligence
Computer Vision and Pattern Recognition
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.
title Fine-Tuning is Fine, if Calibrated
topic Machine Learning
Artificial Intelligence
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2409.16223