journal article·2025Open access

Optimizing Sentiment Integration in Image Captioning Using Transformer-Based Fusion Strategies

Komal Rani Narejo, Hongying Zan, Kheem Parkash Dharmani, Orken Mamyrbayev, Ainur Akhmediyarova, Zhibek Alibiyeva, Janna Alimkulova

Computers, Materials & Continua· Volume 84· Issue 2

Abstract

While automatic image captioning systems have made notable progress in the past few years, generating captions that fully convey sentiment remains a considerable challenge. Although existing models achieve strong performance in visual recognition and factual description, they often fail to account for the emotional context that is naturally present in human-generated captions. To address this gap, we propose the Sentiment-Driven Caption Generator (SDCG), which combines transformer-based visual and textual processing with multi-level fusion. RoBERTa is used for extracting sentiment from textual input, while visual features are handled by the Vision Transformer (ViT). These features are fused using several fusion approaches, including Concatenation, Attention, Visual-Sentiment Co-Attention (VSCA), and Cross-Attention. Our experiments demonstrate that SDCG significantly outperforms baseline models such as the Generalized Image Transformer (GIT), which achieves 82.01%, and Bootstrapping Language-Image Pre-training (BLIP), which achieves 83.07%, in sentiment accuracy. While SDCG achieves 94.52% sentiment accuracy and improves scores in BLEU and ROUGE-L, the model demonstrates clear advantages. More importantly, the captions are more natural, as they incorporate emotional cues and contextual awareness, making them resemble those written by a human.
Source: openalex_inverted_index · Quality: baseline

Research context

OpenAlex topics: Advanced Image and Video Retrieval Techniques · Multimodal Machine Learning Applications · Image Retrieval and Classification Techniques

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

References (67)

Show source-provided references
1. Deep learning for computer vision: a brief review10.1155/2018/7068349 ↗
2. BRIDGE: bridging gaps in image captioning evaluation with stronger visual cues
3. Deep learning reader for visually impaired10.3390/electronics11203335 ↗
4. Recent advances in synthesis and interaction of speech, text, and vision10.3390/electronics13091726 ↗
5. Perceptual image quality prediction: are contrastive language–image pretraining (CLIP) visual features effective?10.3390/electronics13040803 ↗
6. Image captioning using multimodal deep learning approach
7. Image captioning by incorporating affective concepts learned from both visual and textual components10.1016/j.neucom.2018.03.078 ↗
8. A review of transformer-based approaches for image captioning10.3390/app131911103 ↗
9. Fine-grained features for image captioning
10. Image captioning using facial expression and attention10.1613/jair.1.12025 ↗
11. Image captioning model using attention and object features to mimic human image understanding10.1186/s40537-022-00571-w ↗
12. Image-caption model based on fusion feature10.3390/app12199861 ↗
13. Sentiment analysis of images using machine learning techniques10.1051/itmconf/20224403029 ↗
14. An overview on image sentiment analysis: methods, datasets and current challenges
15. Singh H, Sharma A, Pant M. Pixels to prose: understanding the art of image captioning. arXiv:2408.15714. 2024.10.2139/ssrn.5351410 ↗
16. Self-enhanced attention for image captioning10.1007/s11063-024-11527-x ↗
17. Caption generation based on emotions using CSPDenseNet and BiLSTM with self-attention
18. Rethinking the inception architecture for computer vision
19. Xception: deep learning with depthwise separable convolutions
20. Show, attend and tell: neural image caption generation with visual attention
21. Densenet for dense flow
22. Densely connected convolutional networks
23. EfficientNet: rethinking model scaling for convolutional neural networks
24. Koonce · Convolutional neural networks with swift for Tensorflow: image recognition and dataset categorization · 2021 · 10910.1007/978-1-4842-6168-2_10 ↗
25. Cordonnier J-B, Loukas A, Jaggi M. Multihead attention: collaborate instead of concatenate. arXiv:2006.16362. 2020.
26. Attention is all you need
27. Multimodal sentiment analysis using deep learning fusion techniques and transformers
28. Fusion models for improved image captioning
29. It is okay to not be okay: overcoming emotional bias in affective image captioning by contrastive data collection
30. Image emotion analysis combining attention mechanism and multi-level correlation10.54097/fcis.v6i1.12 ↗
31. Say as you wish: fine-grained control of image caption generation with abstract scene graphs
32. Fine-grained image emotion captioning based on generative adversarial networks10.1007/s11042-024-18680-4 ↗
33. Aziz A, Chowdhury NK, Kabir MA, Chy AN, Siddique MJ. MMTF-DES: a fusion of multimodal transformer models for desire, emotion, and sentiment analysis of social media data. arXiv:2310.14143. 2023.
34. Multimodal sentiment analysis based on fusion methods: a survey10.1016/j.inffus.2023.02.028 ↗
35. EmoAtCap: emotional attitude captioning dataset
36. Liu Y. Roberta: a robustly optimized BERT pretraining approach. arXiv:1907.11692. 2019.
37. Alexey D. An image is worth 16x16 words: transformers for image recognition at scale. arXiv:2010.11929. 2020.
38. Wang J, Yang Z, Hu X, Li L, Lin K, Gan Z, et al. GIT: a generative image-to-text transformer for vision and language. arXiv:2205.14100. 2022.
39. BLIP: Bootstrapping language-image pre-training for unified vision-language understanding and generation
40. A modularized architecture of multi-branch convolutional neural network for image captioning10.3390/electronics8121417 ↗
41. Show and tell: a neural image caption generator
42. Microsoft COCO: common objects in context
43. Controllable image caption with an encoder-decoder optimization structure10.1007/s10489-021-02988-x ↗
44. A novel automatic image caption generation using bidirectional long-short term memory framework10.1007/s11042-021-10632-6 ↗
45. Image captioning: transforming objects into words
46. Sentimental visual captioning using multimodal transformer10.1007/s11263-023-01752-7 ↗
47. Image captioning with inherent sentiment
48. Multimodal sentiment analysis based on image captioning and attention mechanism
49. Cross on cross attention: deep fusion transformer for image captioning10.1109/TCSVT.2023.3243725 ↗
50. Task-adaptive attention for image captioning10.1109/TCSVT.2021.3067449 ↗
51. Multi-scale adaptive task attention network for few-shot learning
52. Nezami OM, Dras M, Wan S, Paris C. Senti-attend: image captioning using sentiment and attention. arXiv:1811.09789. 2018.
53. You Q, Jin H, Luo J. Image captioning at will: a versatile scheme for effectively injecting sentiments into image descriptions. arXiv:1801.10121. 2018.
54. Leveraging clip for image emotion recognition
55. Aggarwal S, Pandey A, Vishwakarma DK. Modelling visual semantics via image captioning to extract enhanced multi-level cross-modal semantic incongruity representation with attention for multimodal sarcasm detection. arXiv:2408.02595. 2024.10.1007/s10489-025-06717-6 ↗
56. Hierarchical attention network for image captioning
57. Switching text-based image encoders for captioning images with text10.1109/ACCESS.2023.3282444 ↗
58. Visual sentiment prediction with attribute augmentation and multi-attention mechanism10.1007/s11063-020-10201-2 ↗
59. Image captioning with vision/text transformers
60. Deep learning approaches for image captioning: opportunities, challenges and future potential
61. A systematic literature review on image captioning10.3390/app9102024 ↗
62. Image emotion caption based on visual attention mechanisms
63. Random and synthetic over-sampling approach to resolve data imbalance in classification10.29099/ijair.v4i2.152 ↗
64. BLEU: a method for automatic evaluation of machine translation
65. Rouge: a package for automatic evaluation of summaries
66. Cider: consensus-based image description evaluation
67. Krotov A, Tebo A, Picart DK, Algave AD. Evaluating authenticity and quality of image captions via sentiment and semantic analyses. arXiv:2409.09560. 2024.