§15.2 Learning in one setting, generalizing in another
Transfer learning transfer learning Initialize a network with the first k layers of a net trained on a related task/dataset, then jointly fine-tune on the target task (often with fewer examples); §15.2. defined in ch. 8 — open in glossary and domain adaptation domain adaptation Transfer where the TASK stays the same but the input distribution shifts (sentiment trained on book reviews, deployed on electronics reviews); denoising-autoencoder pretraining has worked well here. defined in ch. 15 — open in glossary name the situation where what was learned in one setting — a distribution — is exploited to improve generalization in another, . The previous section was already an instance (unsupervised task → supervised task, same inputs); here the idea goes general:
| What changes | What is shared / exploited | |
|---|---|---|
| Transfer learning | the TASK (different targets, often same input kind) | underlying factors explaining P₁ also explain P₂ |
| Domain adaptation | the input DISTRIBUTION (task and optimal mapping unchanged) | the same underlying input→output function |
| Concept drift | the distribution, GRADUALLY over time | the slowly-moving task — a form of transfer (and of multi-task) learning |
| One-shot learning | a new task with ONE labeled example | a representation that already separates the classes |
| Zero-shot learning | a new task with NO labeled examples | a task representation T that generalizes |
The gradual case has its own name: concept drift concept drift Gradual change in the data distribution over time — a form of transfer learning, and like it, a special case of multi-task learning. defined in ch. 15 — open in glossary , where the distribution shifts slowly over time — viewable as a form of multi-task learning across successive time steps. In all cases the core representation-learning bet is the same: the same representation may be useful in both settings, letting it benefit from both settings’ training data. The 2011 transfer competitions made the payoff concrete: participants learned a feature space purely unsupervised from , then a linear classifier was trained on very few labeled examples — and the deeper the unsupervised representation, the better the transfer learning curve, with fewer labels needed to reach the apparent asymptote.
Which layers to share? Usually the lower ones — most visual tasks share edges and shapes. But sometimes what is shared is the semantics of the output: a speech recognizer must emit valid sentences no matter who speaks, while its early layers must cope with wildly different renditions of the same phonemes per speaker. Then share the upper layers and give each task (or speaker) its own preprocessing:
One label, or none at all
The extremes of transfer are one-shot learning one-shot learning Learning a transfer task from a SINGLE labeled example — possible when the learned representation already separates the underlying classes cleanly, so one label tags an entire cluster in representation space. defined in ch. 15 — open in glossary (a single labeled example of the new task) and zero-shot learning zero-shot learning Learning with NO labeled examples of the target task, by modeling p(y | x, T) with a task description T represented so that generalization is possible (learned embeddings, not one-hot task codes) — read that cats have four legs and pointy ears, then recognize one. defined in ch. 15 — open in glossary (none). One-shot works because the representation learned in stage one already separates the classes: the lone label names a cluster, and test examples clustering around the same point inherit it. Zero-shot sounds impossible until the task itself gets a representation:
Zero-data learning as conditional modeling
| the traditional input — say, an image | input | |
| the traditional target — say, "is it a cat?" (binary) | output | |
| a REPRESENTATION OF THE TASK — e.g. the question "is there a cat in this image?". If unsupervised data lives in the same space as T (sentences like "cats have four legs"), unseen instances of T can be interpreted | task variable | |
| a one-hot task code permits no generalization; T needs structure — Socher et al. (2013) used learned word embeddings of the category names | the requirement |
The same three-ingredient recipe powers multi-modal learning multi-modal learning Learning a representation for each of two modalities (fx, fy) plus the relationship between the two representation spaces, so concepts anchor across modalities and the model generalizes to never-seen pairs — the mechanism behind fig 15.3's zero-shot transfer. defined in ch. 15 — open in glossary and embedding-based translation: learn a representation for each modality (or language), and learn the relationship between the two spaces from paired examples. Concepts anchored in one space transfer through the map to the other — even for pairs never observed together:
Why the never-seen pair still connects
Word-representations and image-representations have each been anchored — by other pairs — to a common relational structure. The translation analogy makes it vivid: word relationships within each language come from unilingual corpora; matched sentence pairs link the two spaces; and a translation for word can then be guessed even with no labeled example translating itself. The transfer is most successful when all three ingredients — the two representations and the relation between them — are learned jointly. The same machinery captures a joint distribution over (image, text) pairs in multi-modal learning (Srivastava & Salakhutdinov 2012).
Next: the hypothesis underneath all of this — the best representations disentangle the causes of the data — semi-supervised disentangling of causal factors.
Check yourself — transfer, adaptation & zero-shot learning
1.Transfer learning vs domain adaptation — what distinguishes them?
2.When does it make sense to share the UPPER layers of a network (fig 15.2) rather than the lower ones (fig 7.2)?
3.Why can ONE labeled example suffice in one-shot learning?
4.In zero-shot learning with p(y | x, T), why can the task representation T NOT be a one-hot category code?
5.Fig 15.3: how can a test image x_test be associated with a word y_test that was NEVER paired with any image in training?
6.In the 2011 transfer-learning competitions, what happened as architectures used DEEPER unsupervised representations of the first setting P₁?