TL;DR
This paper investigates whether pre-training the language component of an image caption generator using a language model improves performance. They find that transfer learning does improve caption generation, even when the language model is trained on the same data as the caption generator. Surprisingly, the best language models (lowest perplexity) don't necessarily lead to the best caption generators after transfer.
What Problem Does This Paper Address?
Image captioning models typically use a pre-trained Convolutional Neural Network (CNN) to extract visual features from images. This leverages knowledge learned from large image datasets, helping to prevent overfitting. The authors ask: can a similar benefit be achieved for the language part of the caption generator? Specifically, they explore transferring parameters from a pre-trained neural language model (LM) to the recurrent neural network (RNN) and embedding layers of an image caption generator. This would allow the LM to learn general language patterns before being applied to the specific task of generating captions for images.
Methods
The core of the paper is an experimental study on transfer learning for image captioning. They use a "merge" architecture for the caption generator, where visual and language features are processed separately before being combined. This architecture is crucial because it allows the language component to be trained independently.
They transfer the embedding layer and RNN parameters from a pre-trained LM to initialize the corresponding layers in an untrained image caption generator. They then experiment with two main strategies for these transferred parameters:
- Frozen: The transferred parameters are kept fixed during caption generator training.
- Fine-tuned: The transferred parameters are further optimized along with the rest of the caption generator.
They also investigate the impact of:
- Domain: Training the LM on in-domain (image captions) vs. out-of-domain (general text) data.
- Corpus Size: Varying the size of the LM training data relative to the caption dataset.
- Partial Training: Training the LM for fewer epochs to see if this affects transferability.
Datasets
- Flickr8K: Used as the target dataset for training and evaluating the image caption generators.
- MSCOCO: Used as an in-domain corpus for training the language model.
- Google's One Billion Word Language Model Benchmark (LM1B): Used as an out-of-domain corpus for training the language model.
Key Insights and Ideas
- Transfer Learning is Beneficial: Even simple transfer learning, where the LM is trained on the same text as the caption generator, leads to better caption generation than training from scratch. This suggests that pre-training provides a valuable initialization.
- Domain Matters: In-domain language models (trained on image captions) generally lead to better caption generators than out-of-domain models, even with significantly larger out-of-domain corpora.
- "Better" LMs Don't Always Transfer Better: The language models that achieve the lowest perplexity (indicating they are "best" at language modeling) do not necessarily yield the best caption generators after transfer. This suggests that over-specialization in the source task can hinder transferability to a related but different task.
- Frozen vs. Fine-tuned: Fine-tuning the transferred parameters offers only a marginal improvement over keeping them frozen, indicating that the learned representations are quite robust and transferable.
- Partial Training is Not a Silver Bullet: Prematurely stopping LM training (partial training) doesn't consistently improve transferability and can lead to more unpredictable results compared to varying corpus size.
Key Results
- Consistent Improvement: Across various configurations, transfer learning consistently improved caption generation quality (measured by metrics like METEOR, CIDEr, SPICE, and WMD) compared to training from scratch.
- Corpus Size Effects: For in-domain corpora, increasing corpus size beyond a certain point did not always lead to better caption generators, and sometimes even resulted in a decline in performance. This supports the idea of over-specialization.
- General Text Performance: Even with a massive 300,000-sentence LM corpus, the general text model performed on par with or worse than in-domain models trained on much smaller datasets.
- Partial Training Results: Best WMD scores were often achieved with frozen parameters after a relatively short LM training period (e.g., epoch 10 or 9), and sometimes even surpassed results from the main experiments.
Limitations and Future Work
- Overspecialization: The paper highlights that highly optimized language models might become too specialized for language modeling, hindering their usefulness for transfer to image captioning. This is a key limitation of relying on the "best" source models.
- Hyperparameter Sensitivity: While they found that partial training didn't consistently help, they noted that some hyperparameter choices (like weight initialization) could significantly impact the performance of zero-epoch trained models.
- Future Work: The authors suggest exploring transfer learning from MSCOCO to MSCOCO itself, investigating how to create more generic image features from CNNs, and standardizing experiments to see if the "better models don't transfer better" observation holds across different machine learning tasks. They also propose exploring the impact of different initialization strategies for the frozen zero-epoch training.
Summary updated