1 School of Information, Guizhou University of Finance and Economics, Guiyang 550025, China
2 Big Data Institute, Wuhan University, Wuhan 430072, China
Show less
文章历史+
Received
Published
Revised
2025-01-14
2026-01-18
2025-10-14
Online Date
2026-09-20
PDF (3399K)
摘要
针对现有多模态方面级情感分析模型存在不同模态之间关联性不强,难以有效利用它们之间相关信息的问题,提出了一种基于提示学习和注意力机制的多模态方面级情感分析模型。首先,在文本和图像特征分别输入多层Transformer层之前,对文本特征添加提示信息,并通过耦合函数投影到图像特征中;其次,使用跨模态注意力机制进行特征融合,并通过双向门控循环单元(bidirectional gated recurrent unit, BiGRU)过滤融合过程中的无关信息;然后,构建了一个由方面信息引导的注意力模块,以加强对方面信息的关注度;最后,通过全连接层和softmax分类层得到情感分类结果。该模型分别在公开的Twitter-15和Twitter-17数据集上进行实验,结果显示与多个基线模型相比,所提模型的准确率和F1均有所提升,证明了所提模型在多模态方面级情感分析任务中的有效性。
Abstract
Aiming at the problem that the existing multimodal aspect-based sentiment analysis models have weak correlation between different modalities and it is difficult to effectively utilize the relevant information between them, a multimodal aspect-based sentiment analysis based on prompt learning and attention mechanism was proposed. Firstly, before the text and image features were respectively input into the multi-layer Transformer layer, prompt information was added to the text features and projected into the image features through the coupling function. Secondly, the cross-modal attention mechanism was used for feature fusion, and the irrelevant information in the fusion process was filtered out through BiGRU (bidirectional gated recurrent unit). Then, an attention module guided by aspect information was constructed to strengthen the attention to aspect information. Finally, the sentiment classification results were obtained through the fully connected layer and the softmax classification layer. The model was experimented on the public Twitter-15 and Twitter-17 datasets respectively. The results show that compared with multiple baseline models, the accuracy and F1 value of the proposed model are improved, which proves the effectiveness of the proposed model in the multimodal aspect-based sentiment analysis task.
ZENG Zhen, LIAO Mao-xi, YANG Nan, LUO Yan, YANG Chao.
Multimodal Aspect-based Sentiment Analysis Based on Prompt Learning and Attention Mechanism[J].
Science Technology and Engineering, 2026, 26(2): 708-716 DOI:10.12404/j.issn.1671-1815.2500343
随着以自注意力机制为核心组件的Transformer结构的提出,BERT[15](bidirectional encoder representation from transformers)等基于此结构的预训练语言模型增强了模型的文本建模和序列表示能力。自注意力机制通过计算序列中每个位置与其他位置的相关性(即注意力权重),捕获序列中的全局依赖关系,从而更好地处理长距离依赖问题。Transformer通过查询矩阵Q、键矩阵K和值矩阵V实现自注意力机制,然后通过点积计算注意力权重,最后加权求和生成输出。在方面级情感分析任务中,通过注意力机制可以充分关注与特定方面相关的情感特征,显著提升模型情感分类的效果。
1.3 门控循环单元
门控循环单元(gated recurrent unit, GRU)是一种RNN的变体,旨在解决RNN在处理长序列数据时存在的梯度消失和梯度爆炸问题。GRU通过引入门控机制,能够更高效地捕获长距离依赖关系,同时具有较低的计算复杂度,因而在自然语言处理、时间序列预测等任务中得到广泛应用。GRU结构如图1所示。
LüY, WeiF, CaoL, et al.[J]. Neurocomputing, 2021, 428: 195-205.
[2]
JuX, ZhangD, XiaoR, et al. Joint multi-modal aspect-sentiment analysis with auxiliary cross-modal relation detection[C]// Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing. Punta Cana: ACL, 2021: 4395-4405.
[3]
ZhaoT, MengL, SongD. Multimodal aspect-based sentiment analysis: a survey of tasks, methods, challenges and future directions[J]. Information Fusion, 2024, 112. DOI: 10.1016/j.inffus.2024.102552.
[4]
YuanS, LiM, DuY, et al. Cross-domain aspect-based sentiment classification with hybrid prompt[J]. Expert Systems with Applications, 2024, 255. DOI: 10.1016/j.eswa.2024.124680.
ZhuLinyun, FanJing, QuJinshuai, et al. Fine-grained emotion classification based on BERT and multi-channel convolutional neural net works[J]. Science Technology and Engineering, 2023, 23(31): 14264-14270.
WangZhidong, GuQun. Aspect-level sentiment analysis with multi-attention based on RoBERTa and positional features[J]. Science Technology and Engineering, 2024, 24(23): 9989-9997.
[9]
GaoX, ZhuangX, TianX, et al. Dual-channel relative position guided attention networks for aspect-based sentiment analysis[J]. Expert Systems with Applications, 2024, 253.DOI: 10.1016/j.eswa.2024.124271.
[10]
AhmadK M, LiuQ, KhalilM M Y, et al. aspect-specific parsimonious segmentation via attention-based graph convolutional network for aspect-based sentiment analysis[J]. Knowledge-Based Systems, 2024. DOI: 10.1016/j.knosys.2024.112169.
[11]
YangL, NaJ C, YuJ. Cross-modal multitask transformer for end-to-end multimodal aspect-based sentiment analysis[J]. Information Processing & Management, 2022, 59(5): 1-10.
LiLi, LiPing. Aspect-level multimodal sentiment analysis based on interaction graph neural network[J]. Application Research of Computers, 2023, 40(12): 3683-3689.
[14]
YangH, ZhaoY, QinB. Face-sensitive image-to-emotional-text cross-modal translation for multimodal aspect-based sentiment analysis[C]// Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing. Abu Dhabi: ACL, 2022: 3324-3335.
[15]
XiangY, CaiY, GuoJ. MSFNet: modality smoothing fusion network for multimodal aspect-based sentiment analysis[J]. Frontiers in Physics, 2023, 11.DOI: 10.3389/fphy.2023.1187503.
ZhouRu, ZhuHaoze, GuoWenya, et al. A unified framework based on multimodal aspect-term extraction and aspect-level sentiment classification[J]. Journal of Computer Research and Deve-lopment, 2023, 60(12): 2877-2889.
[18]
SongZ, XueY, GuD, et al. Target-oriented multimodal sentiment classification by using topic model and gating mechanism[J]. International Journal of Machine Learning and Cybernetics, 2023, 14(7): 2289-2299.
[19]
DevlinJ, ChangM W, LeeK, et al. BERT: pre-training of deep bidirectional transformers for language understanding[C]//Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Minneapolis: ACL, 2019: 4171-4186.
[20]
XuN, MaoW, ChenG. Multi-interactive memory network for aspect based multimodal sentiment analysis[C]// Proceedings of the AAAI Conference on Artificial Intelligence. Hawaii: AAAI, 2019: 371-378.
[21]
HeK, ZhangX, RenS, et al. Deep residual learning for image recognition[C]// Proceedings of the IEEE Conference on Compu-ter Vision and Pattern Recognition. Las Vegas: IEEE, 2016: 770-778.
[22]
WangY, HuangM, ZhuX, et al. Attention-based LSTM for aspect-level sentiment classification[C]// Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing. Austin: ACL, 2016: 606-615.
[23]
ChenP, SunZ, BingL, et al. Recurrent attention network on memory for aspect sentiment analysis[C]// Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing. Copenhagen: ACL, 2017: 452-461.
[24]
FanF, FengY, ZhaoD. Multi-grained attention network for aspect-level sentiment classification[C]// Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing. Brussels: ACL, 2018: 3433-3442.
[25]
YuJ, JiangJ. Adapting bert for target-oriented multimodal sentiment classification[C]// Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence. Macao: IJCAI, 2019: 5408-5414.
[26]
YuJ, JiangJ, XiaR. Entity-sensitive attention and fusion network for entity-level multimodal sentiment classification[J]. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 2019, 28: 429-439.
[27]
LingY, YuJ, XiaR. Vision-language pre-training for multimodal aspect-based sentiment analysis[C]// Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics. Dublin: ACL, 2022: 2149-2159.
[28]
YeJ, ZhouJ, TianJ, et al. Sentiment-aware multimodal pre-training for multimodal sentiment analysis[J]. Knowledge-Based Systems, 2022, 258. DOI: 10.1016/j.knosys.2022.110021.
[29]
KhanZ, FuY. Exploiting BERT for multimodal target sentiment classification through input space translation[C]// Proceedings of the 29th ACM International Conference on Multimedia. Chengdu: ACM, 2021: 3034-3042.
[30]
YangY, QianX, ZhangL, et al. A conditioned joint-modality attention fusion approach for multimodal aspect-level sentiment analysis[J]. The Journal of Supercomputing, 2024, 80(15): 21676-21698.
[31]
YuJ, ChenK, XiaR. Hierarchical interactive multimodal transformer for aspect-based multimodal sentiment analysis[J]. IEEE Transactions on Affective Computing, 2022, 14(3): 1966-1978.