[Paper Review] Transfer learning from language models to image caption generators: Better models may not transfer better
This paper investigates transfer learning from pre-trained language models to image caption generators, showing that transferring RNN and embedding layers improves performance even when fine-tuned on the same caption dataset. Surprisingly, the best-performing language models (lowest perplexity) do not yield the best caption generators, suggesting that overly specialized language representations can hinder transfer performance.
When designing a neural caption generator, a convolutional neural network can be used to extract image features. Is it possible to also use a neural language model to extract sentence prefix features? We answer this question by trying different ways to transfer the recurrent neural network and embedding layer from a neural language model to an image caption generator. We find that image caption generators with transferred parameters perform better than those trained from scratch, even when simply pre-training them on the text of the same captions dataset it will later be trained on. We also find that the best language models (in terms of perplexity) do not result in the best caption generators after transfer learning.
Motivation & Objective
- To investigate whether pre-trained language models can improve image caption generation through transfer learning of RNN and embedding layers.
- To examine how domain specificity and corpus size of the language model affect caption generator performance.
- To determine whether fine-tuning transferred parameters improves performance or if freezing them yields better results.
- To assess whether pre-training on the caption dataset itself is sufficient for performance gains, even without external language models.
- To explore the relationship between language model quality (perplexity) and downstream caption generation performance.
Proposed method
- Transfer the embedding layer and RNN parameters from a pre-trained language model to a merge-architecture image caption generator.
- Use a 'merge' architecture that keeps visual and language encoding separate, enabling parameter transfer without architectural constraints.
- Construct the caption generator's vocabulary as the intersection between the language model's corpus and the caption dataset to ensure compatibility.
- Train language models on varying corpora: same captions, different captions (out-of-domain), and general news text, with sizes ranging from 1/10 to 10× the caption dataset.
- Evaluate both frozen and fine-tuned versions of the transferred prefix encoding parameters during caption generator training.
- Use WMD (Word Mover's Distance) as the primary metric to compare generated captions against ground truth.
Experimental results
Research questions
- RQ1Does transferring language model parameters to an image caption generator improve performance compared to random initialization?
- RQ2How does the domain of the language model's training data (in-domain vs. out-of-domain) affect caption generation quality?
- RQ3Does increasing the size of the language model's training corpus always improve caption generator performance?
- RQ4Is there a trade-off between language model quality (perplexity) and transfer performance in caption generation?
- RQ5Can randomly initialized prefix encoding parameters, when frozen, still yield effective caption generation?
Key findings
- Transfer learning from a language model, even one pre-trained on the same caption dataset, significantly improves caption generation performance compared to random initialization.
- Caption generators trained with transferred parameters achieve a WMD of 0.115, outperforming the best non-transferred baseline.
- Performance does not monotonically improve with larger language model corpora; peak performance occurs before the largest corpus size, with a decline at higher sizes.
- The best-performing language models (lowest perplexity) do not yield the best caption generators, indicating that overly specialized representations can impair transfer learning.
- Freezing the transferred prefix encoding parameters yields slightly better results than fine-tuning, with the best frozen model achieving WMD = 0.115, slightly better than the best fine-tuned version (0.142).
- Randomly initialized and frozen prefix encoders still produce decent captions (WMD = 0.118 with normal initialization), showing that deterministic, non-optimized features can still be useful for caption generation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.