liveBook · Manning

Multitask fine-tuning

As explained in Transfer Learning for Natural Language Processing

Multitask fine-tuning adapts a pretrained model by training it on multiple tasks, encouraging knowledge sharing among them.

Multitask fine-tuning adapts a pretrained model on multiple tasks simultaneously, encouraging knowledge sharing between them. It can be useful when a target task has too little training data for effective fine-tuning on its own, and may improve generalization and transfer. section 10.0 section 10.2.1

The GLUE benchmark offers a practical setting for this approach: its natural language understanding tasks span grammaticality, sentiment, paraphrasing, sentence similarity, and inference. The tasks have different amounts of training data, making knowledge sharing especially relevant. section 10.2.1

Question and sentence similarity

Quora Question Pairs (QQP) asks whether two questions are equivalent. The Semantic Textual Similarity Benchmark (STS-B) scores the similarity of two sentences on a scale from 1 to 5. Both compare pairs of texts, but they use different outputs: equivalence versus a continuous similarity score. section 10.2 section 10.2.1

Table 10.1 List of tasks, descriptions, and data counts for each task made available in the original General Language Understanding Dataset (GLUE) (view table figure)

Task Name

Data Count

Description

The Corpus of Linguistic Acceptability (CoLA)

8,500 train, 1,000 test

Determines whether or not an English sentence is grammatical

The Stanford Sentiment Treebank (SST2)

67,000 train, 1,800 test

Detects the sentiment of a given sentence—positive or negative

Microsoft Research Paraphrase Corpus (MRPC)

3,700 train, 1,700 test

Determines whether one sentence is a paraphrase of another

Semantic Textual Similarity Benchmark (STS-B)

7,000 train, 1,400 test

On a scale of 1 to 5, predicts the similarity score between a pair of sentences

Quora Question Pairs (QQP)

3,640,000 train, 391,000 test

Determines whether a pair of Quora questions are semantically equivalent

Multi-Genre Natural Language Inference (MultiNLI)

393,000 train, 20,000 test

Determines whether a premise sentence implies/entails or contradicts a hypothesis sentence

Question-Answering Natural Language Inference (QNLI)

105,000 train, 5,400 test

Detects whether the context sentence contains an answer to the question

Recognizing Textual Entailment (RTE)

2,500 train, 3,000 test

Measures the textual entailment between the premise and the hypothesis, similarly to MultiNLI

Winograd Schema Challenge (WNLI)

634 train, 146 test

Determines to which noun from a set of possible options an ambiguous pronoun refers

Compare the original GLUE tasks and their data counts to see the range of problems and resources available for multitask learning. section 10.2.1

Sequential adaptation is a related but distinct approach: instead of training on tasks simultaneously, it fine-tunes on one task and then another. For a low-resource sentence-similarity target, an intermediate adaptation to a data-rich question-similarity task can break transfer into more manageable steps. section 10.2 section 10.0

How Transfer Learning for Natural Language Processing covers it

How deep it goes
Explains the rationale and contrasts simultaneous training with sequential adaptation, using GLUE tasks as a demonstration setting.
Examples
Uses QQP question equivalence and STS-B sentence-similarity scoring as concrete adaptation tasks.
What you can do after
Evaluate/understand when multitask fine-tuning or sequential adaptation might help with a low-resource similarity task.
How it connects
Connects transfer learning, sequential adaptation, sentence similarity, paraphrase detection, and sentiment analysis.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Transfer Learning for Natural Language Processing. The section links point to the parts of the book it draws on.