In this chapter, the focus is on making transfer learning for NLP both more efficient and more flexible. The discussion begins by revisiting adaptation strategies for pretrained transformer models and then introduces ALBERT as a smaller, more scalable alternative to BERT. ALBERT achieves this efficiency through embedding factorization, which separates the vocabulary projection from the hidden size, and through cross-layer parameter sharing, which reuses weights across layers to greatly reduce model size while preserving strong performance.
The chapter then turns to multitask fine-tuning and sequential adaptation as ways to improve transfer when labeled data is limited. Using GLUE as the main benchmark collection, it shows how tasks such as sentiment analysis, paraphrase detection, textual similarity, entailment, and question answering can be used to train models that generalize better across language understanding problems. It also demonstrates that adapting first on a data-rich related task and then on a lower-resource target task can improve results, as illustrated by fine-tuning BERT on QQP before STS-B, which yields better correlation than training on STS-B alone.
Finally, the chapter presents adapters as a lightweight alternative to full fine-tuning. Instead of updating all pretrained weights, small task-specific modules are inserted between layers and trained while the base model remains frozen, giving strong performance with only a small parameter increase. The chapter emphasizes the practical advantages of this modular approach: it is efficient in storage and training, easy to share, and straightforward to apply through existing tooling, making it a useful blueprint for adapting transformer models to many new NLP tasks.
The hard-parameter sharing multitask learning scenario we are exploring in this section. The model is first fine-tuned on QQP, which is a data-rich scenario, and then STS-B, which is a low-resource scenario. The sequential nature of this experiment classifies it as sequential adaptation.
Newly introduced adapter layers in the “vanilla” transformer encoder from figure 7.6
Summary
- Applying embedding factorization and parameter sharing across layers yields a more parameter-efficient model.
- Fine-tuning a model from the BERT family on multiple tasks simultaneously, that is, multitask fine-tuning, yields a more generalizable model.
- Employing adapters on a model from the BERT family can simplify fine-tuning.
1. Z. Lan et al., “ALBERT: A Lite BERT for Self-Supervised Learning of Language Representations,” ICLR (2020).
2. A. Wang et al., “Glue: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding,” ICLR (2019).
4. Z. Lan et al., “ALBERT: A Lite BERT for Self-Supervised Learning of Language Representations,” ICLR (2020).
7. X. Liu et al., “Multi-Task Deep Neural Networks for Natural Language Understanding,” ACL Proceedings (2019).
8. A. Wang et al., “GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding,” ICLR (2019).
9. P. Rajpurkar et al., “SQuAD: 100,000+ Questions for Machine Comprehension of Text,” arXiv (2016).
10. A. Wang et al., “Glue: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding,” ICLR (2019).
Transfer Learning for Natural Language Processing ebook for free