[Paper Review] Improving Visually Grounded Sentence Representations with Self-Attention
This paper proposes a self-attention-enhanced encoder for visually grounded sentence representation learning, improving alignment between language and vision by enabling the model to focus on visually salient words during encoding. Results show that incorporating self-attention significantly boosts performance on transfer tasks, especially when combined with universal sentence representations, by making sentence embeddings more semantically and visually grounded.
Sentence representation models trained only on language could potentially suffer from the grounding problem. Recent work has shown promising results in improving the qualities of sentence representations by jointly training them with associated image features. However, the grounding capability is limited due to distant connection between input sentences and image features by the design of the architecture. In order to further close the gap, we propose applying self-attention mechanism to the sentence encoder to deepen the grounding effect. Our results on transfer tasks show that self-attentive encoders are better for visual grounding, as they exploit specific words with strong visual associations.
Motivation & Objective
- Address the grounding problem in sentence representations by integrating visual signals more deeply into the encoding process.
- Overcome the limitation of prior models that only connect language and vision at the final hidden state of the encoder.
- Investigate whether self-attention in the sentence encoder can improve the model's ability to identify and emphasize visually relevant words.
- Improve the quality of general sentence representations through joint learning of language and vision using a multi-modal encoder-decoder framework.
- Demonstrate that self-attentive sentence representations lead to better performance on downstream NLP transfer tasks.
Proposed method
- Adapt the Cap2All model from [8] as a base multi-modal encoder-decoder framework, jointly predicting image features and target captions from a source caption.
- Introduce a self-attention mechanism into the sentence encoder to allow dynamic focus on words with strong visual associations during encoding.
- Use a bidirectional LSTM to encode the input caption and compute a sentence representation via max-pooling over forward and backward hidden states.
- Project the sentence representation into image feature space and train using a log-exp-sum pairwise ranking loss to maximize similarity between predicted and ground-truth image features.
- Concatenate the resulting sentence representations with those from ST-LN (Layer Normalized Skip-Thoughts) for improved generalization.
- Train the model on the COCO5K dataset using mini-batches of size 128, with negative samples drawn from the same batch.
Experimental results
Research questions
- RQ1Can self-attention in the sentence encoder improve the quality of visually grounded sentence representations?
- RQ2Does the model’s ability to attend to visually salient words lead to better performance on downstream NLP transfer tasks?
- RQ3How does the self-attentive encoder compare to standard LSTM-based encoders in terms of visual grounding and transfer performance?
- RQ4To what extent does the self-attention mechanism help the model identify and emphasize words with strong visual associations?
- RQ5Can self-attention enhance the representational power of sentence embeddings without requiring task-specific fine-tuning?
Key findings
- Self-attention mechanisms significantly improve sentence representation quality, with performance gains on 5 out of 8 transfer tasks when combined with ST-LN embeddings.
- The Att. Cap2All model achieved an F1-score of 81.88 on MRPC, outperforming the baseline Cap2All model (82.26), and improved accuracy to 83.03 on SST, compared to 81.16 in the baseline.
- On SICK relatedness, the self-attentive model achieved a Pearson correlation of 84.54, slightly better than the baseline Cap2All (84.37).
- Attention visualization confirmed that the model learned to attend to visually salient words such as 'man', 'black', 'guitar', 'cat', and 'bowl', indicating effective grounding at the word level.
- Despite some performance degradation on CR, MPQA, and MRPC, the overall trend shows consistent improvement, suggesting self-attention enhances representation richness.
- The model achieved competitive performance on image and caption retrieval tasks, comparable to specialized methods, despite being trained end-to-end on a unified objective.
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.