A Closer Look at How Fine-tuning Changes BERT

Yichu Zhou, Vivek Srikumar


Abstract
Given the prevalence of pre-trained contextualized representations in today’s NLP, there have been many efforts to understand what information they contain, and why they seem to be universally successful. The most common approach to use these representations involves fine-tuning them for an end task. Yet, how fine-tuning changes the underlying embedding space is less studied. In this work, we study the English BERT family and use two probing techniques to analyze how fine-tuning changes the space. We hypothesize that fine-tuning affects classification performance by increasing the distances between examples associated with different labels. We confirm this hypothesis with carefully designed experiments on five different NLP tasks. Via these experiments, we also discover an exception to the prevailing wisdom that “fine-tuning always improves performance”. Finally, by comparing the representations before and after fine-tuning, we discover that fine-tuning does not introduce arbitrary changes to representations; instead, it adjusts the representations to downstream tasks while largely preserving the original spatial structure of the data points.
Anthology ID:
2022.acl-long.75
Original:
2022.acl-long.75v1
Version 2:
2022.acl-long.75v2
Volume:
Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Month:
May
Year:
2022
Address:
Dublin, Ireland
Editors:
Smaranda Muresan, Preslav Nakov, Aline Villavicencio
Venue:
ACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1046–1061
Language:
URL:
https://aclanthology.org/2022.acl-long.75
DOI:
10.18653/v1/2022.acl-long.75
Bibkey:
Cite (ACL):
Yichu Zhou and Vivek Srikumar. 2022. A Closer Look at How Fine-tuning Changes BERT. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1046–1061, Dublin, Ireland. Association for Computational Linguistics.
Cite (Informal):
A Closer Look at How Fine-tuning Changes BERT (Zhou & Srikumar, ACL 2022)
Copy Citation:
PDF:
https://aclanthology.org/2022.acl-long.75.pdf
Code
 utahnlp/BERT-fine-tuning-analysis