liveBook · Manning

Transfer learning

As explained in Knowledge Graphs and LLMs in Action

Transfer learning is a machine-learning technique that reuses patterns learned from one task or domain to improve performance on another task or domain.

Transfer learning reuses patterns or weights learned from a generic task to improve a different task, avoiding training a separate model from scratch. section 1.2 section 5.3

A practical transfer-learning pipeline typically works as follows:

  • Pretrain a language model on a generic task, such as predicting randomly masked tokens, using a large text corpus. section 1.2 section 5.3
  • Reuse the resulting model or its learned weights for a specific task, such as relation extraction from domain text. section 1.2 section 5.3
  • Customize the model with prompting or fine-tuning when the generic capabilities are insufficient, while preparing task-specific data as needed. section 5.3 section 5.3.4

Knowledge-graph construction

A pretrained Transformer-based LLM can transfer linguistic patterns learned from masked-token prediction to named-entity recognition and relation extraction, producing structured knowledge from unstructured text with less human-labeled data. section 5.3 section 5.3.4

Figure 1.2 In transfer learning, a model (or part of it) trained on a specific task is used as part of the training and predictions for another task.
figure

Use the figure to compare the originating task, transferred model component, and target task or prediction. section 1.2

How Knowledge Graphs and LLMs in Action covers it

How deep it goes
Explains generic pretraining, weight reuse, prompting, and fine-tuning, but does not detail optimization internals.
Examples
Uses masked-token prediction transferred to relation extraction, named-entity recognition, and knowledge-graph construction.
What it assumes
Assumes familiarity with machine-learning tasks and supervised learning while defining transfer from generic to specific tasks.
What you can do after
Apply pretrained models to relation extraction with less human-labeled data than training task-specific models from scratch.
How it connects
Connects transfer learning with large language models, Transformer architecture, prompt engineering, fine-tuning, relation extraction, and knowledge graphs.

Also explained in

Compare how 11 books explain transfer learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Knowledge Graphs and LLMs in Action. The section links point to the parts of the book it draws on.