[Paper Review] To Tune or Not to Tune? Adapting Pretrained Representations to Diverse Tasks
This paper investigates whether to fine-tune or use feature extraction when adapting pretrained language models like ELMo and BERT to downstream NLP tasks. It finds that fine-tuning outperforms feature extraction when pretraining and target tasks are highly similar or highly dissimilar, while feature extraction is sufficient for intermediate similarity; the choice depends on task similarity, not model architecture.
While most previous work has focused on different pretraining objectives and architectures for transfer learning, we ask how to best adapt the pretrained model to a given target task. We focus on the two most common forms of adaptation, feature extraction (where the pretrained weights are frozen), and directly fine-tuning the pretrained model. Our empirical results across diverse NLP tasks with two state-of-the-art models show that the relative performance of fine-tuning vs. feature extraction depends on the similarity of the pretraining and target tasks. We explore possible explanations for this finding and provide a set of adaptation guidelines for the NLP practitioner.
Motivation & Objective
- To determine the optimal adaptation strategy—feature extraction or fine-tuning—for pretrained language models across diverse NLP tasks.
- To investigate how the similarity between pretraining and target tasks influences the relative performance of fine-tuning versus feature extraction.
- To provide empirically grounded guidelines for practitioners on when to use each adaptation method.
- To analyze the information content in different layers of BERT and ELMo during adaptation using diagnostic classifiers and mutual information.
- To understand why fine-tuning performs better in certain task scenarios despite higher computational cost.
Proposed method
- Empirically compare feature extraction (frozen weights) and fine-tuning (updated weights) on two state-of-the-art models: ELMo and BERT.
- Evaluate on seven diverse NLP tasks: named entity recognition (CoNLL-2003), sentiment analysis (SST-2), natural language inference (MultiNLI, SICK-E), paraphrase detection (MRPC), and semantic textual similarity (STS-B, SICK-R).
- Use diagnostic classifiers trained on hidden representations at each layer to assess how well linguistic properties are encoded in the model’s features.
- Compute mutual information (MI) between hidden layer activations and task labels using the EDGE estimator to quantify information flow during adaptation.
- Analyze performance across different pretraining domains (e.g., telephone, fiction, government) to assess domain shift effects.
- Apply discriminative fine-tuning and triangular learning rate schedules to improve fine-tuning stability and performance.
Experimental results
Research questions
- RQ1Under what conditions does fine-tuning outperform feature extraction when adapting pretrained models to downstream tasks?
- RQ2How does the similarity between the pretraining and target tasks affect the relative performance of fine-tuning versus feature extraction?
- RQ3Where in the model’s architecture (i.e., which layers) is task-relevant information most concentrated before and after fine-tuning?
- RQ4How does mutual information between hidden representations and labels change during fine-tuning, and what does this reveal about knowledge acquisition?
- RQ5Does the choice between feature extraction and fine-tuning depend on the model architecture (e.g., ELMo vs. BERT) or the task type (e.g., sequence labeling vs. sentence pair tasks)?
Key findings
- Fine-tuning outperforms feature extraction when the pretraining and target tasks are highly similar (e.g., NLI and NLI pretraining) or highly dissimilar (e.g., NLI pretraining on a sequence labeling task).
- Feature extraction performs comparably to fine-tuning when the pretraining and target tasks are moderately similar, such as in sentiment analysis or named entity recognition.
- Diagnostic classifier performance on fine-tuned representations increases across all layers, with sharper gains in the final layers for single-sentence tasks (e.g., CoLA, SST-2), while sentence pair tasks (e.g., MRPC) show gradual improvement through intermediate and final layers.
- Mutual information between fine-tuned representations and labels is significantly higher than for pretrained representations, especially in deeper layers, indicating that fine-tuning enhances task-relevant signal propagation.
- For BERT, fine-tuning on a different domain (e.g., government documents) leads to a performance drop when evaluated on a different domain (e.g., travel), but fine-tuning still outperforms feature extraction in such domain-shift scenarios.
- The relative performance gap between fine-tuning and feature extraction is most pronounced in sentence pair tasks, where pretrained representations contain little task-relevant signal in higher layers, justifying the need for fine-tuning.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.