BERT Fine-tuning › The Fine-tuning Paradigm

Michael BrenndoerferUpdated July 23, 20254 min read
Language AI HandbookAll chapters
Part 24 of 67BERT and Variants
Chapter 171BERT Fine-tuning › The Fine-tuning Paradigm
Reading section 2 of 12 · The Fine-tuning Paradigm · 4 minSection 2 of 12 · 4 min

Book contents

Section 2 of 12 · 4 min read

BERT Fine-tuning › The Fine-tuning ParadigmOne section · Sections in this chapter2 / 12 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Pre-training teaches BERT general language understanding. Fine-tuning specializes that understanding for downstream tasks. The key insight is that most of BERT's learned representations transfer well across tasks, so only minor adjustments are needed.

Fine-tuning

The process of taking a pre-trained model and continuing training on task-specific data with a task-specific objective. Fine-tuning updates all or most of the model's parameters, adapting general representations to the target task while preserving useful pre-trained knowledge.

The fine-tuning workflow follows a consistent pattern:

  1. Load a pre-trained BERT model
  2. Add a task-specific head (classifier, token labeler, or span predictor)
  3. Train on labeled task data with a much lower learning rate than pre-training
  4. The entire model updates: both the new head and BERT's existing weights

This differs from feature extraction, where BERT's weights are frozen and only the task head trains. Fine-tuning typically achieves better performance because BERT can adapt its internal representations to the task, not just learn to use fixed features.

Out[4]:
Visualization
Line plot comparing validation accuracy over epochs for fine-tuning and feature extraction approaches.
Fine-tuning versus feature extraction on a classification task. Fine-tuning (updating all weights) typically outperforms feature extraction (frozen BERT, only training the classifier) because BERT can adapt its internal representations.
Out[5]:
Visualization
Diagram showing BERT layers with a classification head on top, arrows indicating gradient flow through all layers during fine-tuning.
The fine-tuning paradigm: pre-trained BERT weights are loaded, a task-specific head is added, and the entire model is trained end-to-end on task data. Gradients flow through both the new head and the pre-trained layers.