细粒度情感和情绪分析中损失函数的设计与优化

叶施仁,丁力,AliMDRinku

PDF(10102 KB)
PDF(10102 KB)
中文信息学报 ›› 2024, Vol. 38 ›› Issue (1) : 124-134.
情感分析与社会计算

细粒度情感和情绪分析中损失函数的设计与优化

  • 叶施仁,丁力,AliMDRinku
作者信息 +

Design and Optimization of Loss Function in Fine-grained Sentiment and Emotion Analysis

  • YE Shiren, DING Li, ALI MD Rinku
Author information +
History +

摘要

在细粒度情感分析和情绪分析数据集中,标签之间的相关性和标签分布的不均匀性非常突出。类别标签分布不均匀,标签之间存在相关性容易影响学习模型的性能。针对这一问题,该文受计算机视觉领域中的Circle loss 方法的启发,将梯度衰减、成对优化 、添加余量引入损失函数来优化深度学习模型的性能。该方法可以很好地与预训练模型相结合,不需要修改骨干网络。与当前最新的经典方法相比,该方法在SemEval18数据集上Jaccard系数、micro-F1、macro-F1分别提升了1.9%、2%、1.9%;在GoeEmotions数据集上Jaccard系数、micro-F1、macro-F1分别提升了2.6%、1.9%、3.6%。实验表明,该文提出的损失函数对情感分析和情绪分析问题具有显著的提升作用。

Abstract

In fine-grained sentiment and emotion analysis tasks, the label correlation and imbalanced label distribution are popular among samples. Inspired by circle loss in computer version, we develop a loss function model to handle these issues by employing gradient decay, pair optimization and margin. This loss function model is easily adapted to suit pre-trained networks without modifying the backbone structures. Compared with the current state-of-the-art results, our loss function model could improve Jaccard similarity coefficient, micro-F1, and macro-F1 values by 1.9%, 2%, and 1.9%, respectively, in SemEval18 dataset; and by 2.6%, 1.9%, and 3.6%, respectively, in GoEmotions dataset.

关键词

情感分析 / 情绪分析 / 成对优化 / 损失函数

Key words

sentiment analysis / emotion analysis / pair optimization / loss function

引用本文

导出引用
叶施仁,丁力,AliMDRinku. 细粒度情感和情绪分析中损失函数的设计与优化. 中文信息学报. 2024, 38(1): 124-134
YE Shiren, DING Li, ALI MD Rinku. Design and Optimization of Loss Function in Fine-grained Sentiment and Emotion Analysis. Journal of Chinese Information Processing. 2024, 38(1): 124-134

参考文献

[1] ZHANG L, WANG S, LIU B. Deep learning for sentiment analysis: A survey[J]. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 2018, 8(4): e1253.
[2] ZIRN C, NIEPERT M, STUCKENSCHMIDT H,et al. Fine-grained sentiment analysis with structural features[C]//Proceedings of IJCNLP,2021: 336-344.
[3] DO H H, PRASAD P W C, MAAG A, et al. Deep learning for aspect-based sentiment analysis: A comparative review[J]. Expert Systems with Applications, 2019, 118: 272-299.
[4] HAKAK N M, MOHD M, KIRMANI M, et al. Emotion analysis: A survey[C]//Proceedings of the ICCC,2017: 397-402.
[5] EKMAN P. Expression and the nature of emotion[J]. Approaches to Emotion, 1984, 3(19): 344.
[6] PLUTCHIK R. A general psychoevolutionary theory of emotion[M]//Theories of Emotion. Academic Press, 1980: 3-33.
[7] TSOUMAKAS G, KATAKIS I. Multi-label classification: An overview[J]//Proceedings of IJDWM,2007: 3(3): 1-13.
[8] BRIGGS F, FERN X Z,RAICH R. Rank-loss support instance machines for MIML instance annotation[C]//Proceedings of the SIGKDD,2012: 534-542.
[9] DENG J,GUO J, XUE N, et al. Arcface: additive angular margin loss for deep face recognition[C]//Proceedings of CVPR,2019: 4690-4699.
[10] WANG F, LIU H. Understanding the behaviour of contrastive loss[C]//Proceedings of CVPR,2021: 2495-2504.
[11] HERMANS A, BEYER L, LEIBE B. In defense of the triplet loss for person re-identification[J]. arXiv preprint arXiv: 1703.07737, 2017.
[12] MOHAMMAD S, BRAVO-MARQUEZ F,SALAMEH M, et al. Semeval-2018 task 1: Affect in tweets[C]//Proceedings of the SemEval,2018: 1-17.
[13] DEMSZKY D, MOVSHOVITZ-ATTIAS D, KO J, et al. GoEmotions: a dataset of fine-grained emotions[C]//Proceedings of ACL,2020: 4040-4054.
[14] SUN Y, CHENG C, ZHANG Y, et al. Circle loss: A unified perspective of pair similarity optimization[C]//Proceedings of CVPR,2020: 6398-6407.
[15] KENTON J D M W C,TOUTANOVA L K. BERT: Pre-training of deep bidirectional transformers for language understanding[C]//Proceedings of NAACL-HLT,2019: 4171-4186.
[16] RUDER S. An overview of multi-task learning in deep neural networks[J].arXiv preprint arXiv: 1706.05098, 2017.
[17] BALIKAS G, MOURA S, AMINI M R. Multitask learning for fine-grained twitter sentiment analysis[C]//Proceedings of SIGIR,2017: 1005-1008.
[18] YANG H, ZENG B, YANG J H, et al. A multi-task learning model for Chinese-oriented aspect polarity classification and aspect term extraction[J]. NeuroComputing, 2021, 419: 344-356.
[19] YIN D,MENG T, CHANG K W. SentiBERT: A transferable transformer-based architecture for compositional sentiment semantics[C]//Proceedings of ACL,2020: 3695-3706.
[20] PARK S, KIM J,JEON J, et al. Toward dimensional emotion detection from categorical emotion annotations[J]. arXiv preprint arXiv: 1911.02499, 2019, 11.
[21] MOHAMMAD S. Obtaining reliable human ratings of valence, arousal, and dominance for 20,000 English words[C]//Proceedings of ACL, 2018: 174-184.
[22] TIAN H, GAO C, XIAO X, et al. SKEP: Sentiment knowledge enhanced pre-training for sentiment analysis[C]//Proceedings of ACL,2020: 4067-4076.
[23] SURESH V, ONG D C. Using knowledge-embedded attention to augment pre-trained language models for fine-grained emotion recognition[C]//Proceedings of ACII,2021: 1-8.
[24] SHORTEN C,KHOSHGOFTAAR T M. A survey on image data augmentation for deep learning[J]. Journal of Big Data, 2019, 6(1): 1-48.
[25] LI B,HOU Y, CHE W. Data augmentation approaches in natural language processing: A survey[J]. AI Open, 2022,3: 71-90.
[26] LIN T Y,GOYAL P, GIRSHICK R, et al. Focal loss for dense object detection[C]//Proceedings of the ICCV,2017: 2980-2988.
[27] CUI Y,JIA M, LIN T Y, et al. Class-balanced loss based on effective number of samples[C]//Proceedings of CVPR,2019: 9268-9277.
[28] WU T, HUANG Q, LIU Z, et al. Distribution-balanced loss for multi-label classification in long-tailed datasets[C]//Proceedings of ECCV,2020: 162-178.
[29] HUANG Y,GILEDERELI B, KKSAL A, et al. Balancing methods for multi-label text classification with long-tailed class distribution[C]//Proceedings of EMNLP,2021: 8153-8161.
[30] LI X, SUN X,MENG Y, et al. Dice loss for data-imbalanced NLP tasks[C]//Proceedings of ACL,2020: 465-476.
[31] BNDICT G, KOOPS H V, ODIJK D, et al. sigmoidF1: A smooth F1 score surrogate loss for multilabel classification[J]. Transactions on Machine Learning Research, 2022.9: 1-28.
[32] ALHUZALI H, ANANIADOU S. SpanEmo: Casting multi-label emotion classification as span-prediction[C]//Proceedings of ACL,2021: 1573-1584.
[33] SURESH V, ONG D. Not all negatives are equal: Label-aware contrastive loss for fine-grained text classification[C]//Proceedings of EMNLP,2021: 4381-4394.
[34] WANG X,ZONG C. Distributed representations of emotion categories in emotion space[C]//Proceedings of the ACL,2021: 2364-2375.
[35] DIERA A, LIN B X, KHERA B , et al. Bag-of-words vs. sequence vs. graph vs. hierarchy for single- and multi-label text classification[J/OL].arXiv preprint arXiv: 2024.03954,2022.
[36] LIU W, WEN Y, YU Z, et al.Sphereface: Deep hypersphere embedding for face recognition[C]//Proceedings of CVPR,2017: 212-220.
[37] WANG H, WANG Y, ZHOU Z, et al.Cosface: Large margin cosine loss for deep face recognition[C]//Proceedings of CVPR,2018: 5265-5274.
[38] DENG J,GUO J, XUE N, et al. Arcface: Additive angular margin loss for deep face recognition[C]//Proceedings of CVPR,2019: 4690-4699.
[39] YEH C K, WU W C, KO W J, et al. Learning deep latent space for multi-label classification[C]//Proceedings of AAAI 2017: 2838-2844.
[40] SOCHER R, PERELYGIN A, WU J, et al. Recursive deep models for semantic compositionality over a sentiment treebank[C]//Proceedings of EMNLP,2013: 1631-1642.
[41] LIU Y,OTT M, GOYAL N, et al. RoBERTa: A robustly optimized BERT pretraining approach[J/OL]. arXiv preprint arXiv: 1907.11692, 2019.
[42] MCMILLAN MAJOR A,OSEI S, RODRIGUEZ J D, et al. Reusable templates and guides for documenting datasets and models for natural language processing and generation: A case study of the huggingface and GEM data and model cards[C]//Proceedings of GEM,2021: 121-135.
[43] SUN Z, FAN C, HAN Q, et al. Self-explaining structures improvenlp models[J/OL]. arXiv preprint arXiv: 2012.01786, 2020.
[44] HUANG C,TRABELSI A, QIN X, et al. Seq2emo: A sequence to multi-label emotion classification model[C]//Proceedings of NAACL,2021: 4717-4724.
[45] YING W, XIANG R, LU Q. Improving multi-label emotion classification by integrating both general and domain-specific knowledge[C]//Proceedings of W-NUT,2019: 316-321.

基金

国家自然科学基金(61272367)
PDF(10102 KB)

568

Accesses

0

Citation

Detail

段落导航
相关文章

/