[Paper Review] Comparative study of Transformer and LSTM Network with attention mechanism on Image Captioning
This study compares Transformer and LSTM with attention mechanisms for image captioning using the MS-COCO dataset and pre-trained Inception-V3 for feature extraction. The Transformer outperformed LSTM, achieving a BLEU score of 0.45 versus 0.30, demonstrating superior accuracy in generating relevant, descriptive captions despite similar training conditions and loss functions.
In a globalized world at the present epoch of generative intelligence, most of the manual labour tasks are automated with increased efficiency. This can support businesses to save time and money. A crucial component of generative intelligence is the integration of vision and language. Consequently, image captioning become an intriguing area of research. There have been multiple attempts by the researchers to solve this problem with different deep learning architectures, although the accuracy has increased, but the results are still not up to standard. This study buckles down to the comparison of Transformer and LSTM with attention block model on MS-COCO dataset, which is a standard dataset for image captioning. For both the models we have used pretrained Inception-V3 CNN encoder for feature extraction of the images. The Bilingual Evaluation Understudy score (BLEU) is used to checked the accuracy of caption generated by both models. Along with the transformer and LSTM with attention block models,CLIP-diffusion model, M2-Transformer model and the X-Linear Attention model have been discussed with state of the art accuracy.
Motivation & Objective
- To evaluate and compare the performance of Transformer and LSTM with attention mechanisms in image captioning.
- To assess the impact of attention mechanisms on caption generation quality using standard metrics.
- To benchmark these models against state-of-the-art architectures like M2-Transformer, X-Linear Attention, and CLIP-Diffusion.
- To identify the most effective pipeline for integrating visual and linguistic representations in image captioning.
- To analyze training dynamics and early performance trends of both models on the MS-COCO dataset.
Proposed method
- Used pre-trained Inception-V3 CNN as a visual encoder to extract image features for both Transformer and LSTM models.
- Employed an encoder-decoder framework with self-attention in the Transformer and additive attention in the LSTM for cross-modal alignment.
- Trained both models on the MS-COCO 2014 dataset using an AWS g4dn.xlarge GPU instance for 10 epochs.
- Evaluated model performance using multiple metrics: BLEU, METEOR, ROUGE, CIDEr, and SPICE.
- Compared results against state-of-the-art models including M2-Transformer, X-Linear Attention, and CLIP-Diffusion.
- Used beam search decoding with greedy inference to generate final captions for evaluation.
Experimental results
Research questions
- RQ1How do Transformer and LSTM with attention mechanisms compare in terms of caption generation accuracy on the MS-COCO dataset?
- RQ2What is the impact of attention mechanisms on the quality of generated captions in both Transformer and LSTM architectures?
- RQ3How do the training dynamics and early performance of Transformers and LSTMs compare in image captioning tasks?
- RQ4Can the Transformer model achieve higher BLEU and CIDEr scores than the LSTM model under identical training conditions?
- RQ5How do the proposed models compare to state-of-the-art models like M2-Transformer and X-Linear Attention in terms of captioning performance?
Key findings
- The Transformer model achieved a best BLEU-1 score of 0.45, significantly outperforming the LSTM model, which reached a maximum BLEU-1 score of 0.30.
- The Transformer model demonstrated higher validation accuracy (48.80%) compared to the LSTM model, which showed lower early-stage performance.
- Despite similar training setups, the Transformer model exhibited faster convergence and better alignment with ground-truth captions.
- The M2-Transformer achieved a BLEU-1 score of 81.6, indicating state-of-the-art performance among the models evaluated.
- The X-Linear Attention mechanism reduced computational complexity through linear transformations, improving efficiency without sacrificing accuracy.
- The CLIP-Diffusion model achieved a BLEU-4 score of 0.247 on Flickr8k+Flickr30k, showing strong zero-shot transferability but lower performance on MS-COCO in this study.
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.