Abstract
Although attention-based Neural Machine Translation (NMT) has achieved great success, the attention mechanism often fails to capture the entire meaning of the source sentence because it generates target words by focusing primarily on specific, relevant parts of the input. This study introduces a multimodal Variational Neural Machine Translation (VNMT) model that incorporates a continuous latent variable to capture the underlying semantics extracted from both text and images. Our model, which can be trained end-to-end, requires image information only during the training phase. Experiments on an English–German translation task demonstrate that our model outperforms standard NMT baselines.
Introduction
Standard Neural Machine Translation (NMT) models rely heavily on an attention mechanism. While powerful, attention is inherently "myopic"—it generates target words by focusing on specific, relevant parts of the source sentence, often failing to capture the global meaning (the "gist") of the sentence.
Humans do not learn language in a vacuum; we understand words by linking them to perceptual information from the world around us. This paper, originally submitted to ICLR 2017, argues that because images are language-independent, they can serve as a "bridge" between two different languages. By "grounding" language in visual information, we can help computers learn a more robust, underlying semantic representation that isn't tied to the quirks of a specific grammar.
Methodology
We extend the Variational Neural Machine Translation (VNMT) framework by introducing a continuous latent variable $z$ designed to capture the "underlying semantic" of the input. This is implemented using a Variational Autoencoder (VAE) architecture.
Multimodal Training and Inference
During the training phase, the model has access to the source sentence, the target translation, and a corresponding image. The inferrer part of the VAE learns to map all three inputs into the latent space. Crucially, at test time, the model does not require an image; it uses a "prior" network to estimate the latent variable $z$ based solely on the source text.
Image Encoding Strategies
We explored several methods for incorporating visual features:
- Global (G): A single feature vector from the entire image extracted via a VGG-19 CNN.
- Global and Objects (G+O): Using Fast R-CNN to identify specific objects and incorporating those localized features.
The latent variable $z$ is then integrated into a conditional GRU (Gated Recurrent Unit) decoder with an attention mechanism to generate the final translation.
Experimental Setup
The model was evaluated on the Multi30k dataset, a standard benchmark for multimodal tasks consisting of 31,014 images, each paired with an English descriptive sentence and its German translation. We utilized 29,000 pairs for training and 1,000 for testing.
Results and Analysis
The proposed multimodal model (specifically Model G) outperformed both standard NMT and text-only VNMT baselines across major metrics.
Key Findings
- Images as a Semantic Anchor: Visual information helps regularize the latent space. Because an image of a "dog" remains the same regardless of the language, it helps the model find common semantic ground between English and German.
- Simplicity in Visual Features: Surprisingly, the simplest method—Model G (Global features)—performed the best. Attempting to extract specific objects (G+O) occasionally introduced confusion, suggesting that the global "vibe" of an image is more useful for general translation than a list of detected items.
- Sentence Length and Word Types: The model showed the greatest improvement on short sentences, where images provide a clear approximation of total meaning. Qualitative analysis also showed the model became significantly better at translating nouns and materials (which are visually obvious), though it occasionally struggled with prepositions and verbs representing complex actions.
Conclusion
By incorporating visual grounding into the latent space of a translation model, we achieved superior English-to-German performance. While the model is currently limited by dataset size and a tendency toward grammatical noise in non-visual word classes, it demonstrates the potential of multimodal learning for capturing global sentence semantics. Future work will explore using video or spatial attention to better link specific words to visual regions and actions.
Summary updated