• 中文核心
  • EI
  • 中国科技核心
  • Scopus
  • CSCD
  • 英国科学文摘

留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

基于混合专家的可扩展情感分析模型

陈千 胡梦强 郭鑫 王素格

陈千, 胡梦强, 郭鑫, 王素格. 基于混合专家的可扩展情感分析模型. 自动化学报, 2026, 52(4): 749−764 doi: 10.16383/j.aas.c250366
引用本文: 陈千, 胡梦强, 郭鑫, 王素格. 基于混合专家的可扩展情感分析模型. 自动化学报, 2026, 52(4): 749−764 doi: 10.16383/j.aas.c250366
Chen Qian, Hu Meng-Qiang, Guo Xin, Wang Su-Ge. Scalable sentiment analysis model based on mixture of experts. Acta Automatica Sinica, 2026, 52(4): 749−764 doi: 10.16383/j.aas.c250366
Citation: Chen Qian, Hu Meng-Qiang, Guo Xin, Wang Su-Ge. Scalable sentiment analysis model based on mixture of experts. Acta Automatica Sinica, 2026, 52(4): 749−764 doi: 10.16383/j.aas.c250366

基于混合专家的可扩展情感分析模型

doi: 10.16383/j.aas.c250366 cstr: 32138.14.j.aas.c250366
基金项目: 国家自然科学基金联合重点项目(U24A20335), 国家自然科学基金(6237073346)资助
详细信息
    作者简介:

    陈千:山西大学计算机与信息技术学院副教授. 主要研究方向为自然语言处理, 情感计算. E-mail: chenqian@sxu.edu.cn

    胡梦强:山西大学计算机与信息技术学院硕士研究生. 主要研究方向为自然语言处理, 情感计算. 本文通信作者. E-mail: leep87233@gmail.com

    郭鑫:山西大学计算机与信息技术学院副教授. 主要研究方向为自然语言处理, 情感计算. E-mail: guoxinjsj@sxu.edu.cn

    王素格:山西大学计算机与信息技术学院教授. 主要研究方向为自然语言处理, 机器学习. E-mail: wsg@sxu.edu.cn

Scalable Sentiment Analysis Model Based on Mixture of Experts

Funds: Supported by National Natural Science Foundation of China Joint Key Project (U24A20335) and National Natural Science Foundation of China (6237073346)
More Information
    Author Bio:

    CHEN Qian Associate professor at the School of Computer and Information Technology, Shanxi University. His research interests include natural language processing and affective computing

    HU Meng-Qiang Master student at the School of Computer and Information Technology, Shanxi University. His research interests include natural language processing and affective computing. Corresponding author of this paper

    GUO Xin Associate professor at the School of Computer and Information Technology, Shanxi University. Her research interests include natural language processing and affective computing

    WANG Su-Ge Professor at the School of Computer and Information Technology, Shanxi University. Her research interests include natural language processing and machine learning

  • 摘要: 情感分析作为自然语言处理领域的核心任务之一, 面临着精准捕捉细粒度情感特征以及提升模型可解释性的双重挑战. 为此, 提出一种基于混合专家模型的可扩展情感分析框架, 通过将门控机制融入专家内部, 设计可在任意预训练语言模型中扩展的混合专家模块. 该框架旨在以可控的计算开销扩展模型容量, 促进细粒度条件计算和专家专业化. 在三个典型情感分析数据集上的综合实验表明, 与基线模型相比, 本方法在关键指标上均取得显著提升, 尤其在处理复杂多分类任务时, 其性能已达到甚至超过主流参数高效微调大语言模型的水平. 更重要的是, 得益于稀疏激活机制, 模型在保持高性能的同时, 展现出卓越的推理效率. 通过对专家激活模式和输出表征的深入分析, 清晰地观察到不同专家针对特定语义模式形成功能专精. 这为模型决策提供直观且有力的可解释性证据, 验证该框架在构建高效、高性能且可信赖的情感分析系统中的巨大潜力.
  • 图  1  MoE模式在情感分析中的示例

    Fig.  1  Example of MoE model for sentiment analysis

    图  2  基于RoBERTa的可扩展MoE框架

    Fig.  2  An extensible MoE framework based on RoBERTa

    图  3  混淆矩阵图

    Fig.  3  Confusion matrix plot

    图  4  专家激活模式分析

    Fig.  4  Expert activation pattern analysis

    图  5  聚类分析

    Fig.  5  Clustering analysis

    图  6  负载均衡损失消融实验结果

    Fig.  6  Ablation experiment results on load balancing loss

    图  7  消融研究折线图(层数和专家数量变化)

    Fig.  7  Ablation study line chart (varying number of layers and number of experts)

    图  8  案例分析

    Fig.  8  Case study

    表  1  情感分析数据集统计信息

    Table  1  Statistics of sentiment analysis datasets

    统计项 训练集
    样本数
    验证集
    样本数
    测试集
    样本数
    类别数
    IMDb 25000 25000 2
    TweetEval Emotion 3260 374 1420 4
    SST-5 8540 1100 2210 5
    下载: 导出CSV

    表  2  不同数据集上基线模型与 MoE 增强模型之间的性能比较

    Table  2  Performance comparison between baseline and MoE-enhanced models on different datasets

    数据集 模型结构 Accuracy Precision Recall F1-Score
    IMDb (二分类) 基线 0.9543 0.9543 0.9543 0.9543
    MoE-RoBERTa 0.9565 0.9567 0.9565 0.9565
    Llama-3-8B-Instruct + Zero-shot 0.9333 0.9164 0.9534 0.9346
    Mistral-7B-Instruct + Zero-shot 0.9048 0.9751 0.8303 0.8969
    Qwen2.5-7B-Instruct + Zero-shot 0.9424 0.9589 0.9240 0.9411
    Llama-3-8B-Instruct + LoRA 0.9692 0.9660 0.9726 0.9693
    Mistral-7B-Instruct + LoRA 0.9743 0.9724 0.9763 0.9743
    Qwen2.5-7B-Instruct + LoRA 0.9659 0.9641 0.9678 0.9660
    TweetEval (四分类) 基线 0.8191 0.8187 0.8191 0.8189
    MoE-RoBERTa 0.8325 0.8338 0.8325 0.8327
    Llama-3-8B-Instruct + Zero-shot 0.7570 0.7846 0.6611 0.6910
    Mistral-7B-Instruct + Zero-shot 0.7720 0.7265 0.7433 0.7296
    Qwen2.5-7B-Instruct + Zero-shot 0.7735 0.7416 0.7226 0.7265
    Llama-3-8B-Instruct + LoRA 0.8248 0.8018 0.7978 0.7986
    Mistral-7B-Instruct + LoRA 0.8381 0.8177 0.7902 0.8019
    Qwen2.5-7B-Instruct + LoRA 0.7994 0.7974 0.7878 0.7928
    SST-5 (五分类) 基线 0.5452 0.5621 0.5452 0.5464
    MoE-RoBERTa 0.5805 0.5788 0.5805 0.5785
    Llama-3-8B-Instruct + Zero-shot 0.3898 0.2697 0.3821 0.2495
    Mistral-7B-Instruct + Zero-shot 0.4760 0.3922 0.4033 0.3531
    Qwen2.5-7B-Instruct + Zero-shot 0.4841 0.4095 0.4322 0.3952
    Llama-3-8B-Instruct + LoRA 0.5498 0.5568 0.5515 0.5541
    Mistral-7B-Instruct + LoRA 0.6158 0.6148 0.5864 0.5888
    Qwen2.5-7B-Instruct + LoRA 0.5398 0.5520 0.5429 0.5474
    下载: 导出CSV

    表  3  跨数据集和模型的性能与资源比较

    Table  3  Performance and resource comparison across datasets and models

    数据集 基座模型 方法 F1-Score Train (M) Total (M) Throughput (samples/s) GFLOPs Peak Mem (MB)
    IMDbLlama-3-8B-InstructLoRA0.969341.944582.542.9974346.1114955.8
    Zero-shot0.93464582.549.9264037.17
    Mistral-7B-InstructLoRA0.974341.943800.312.2394746.5911248.3
    Zero-shot0.89693800.3110.0774327.97
    Qwen2.5-7B-InstructLoRA0.966040.374393.342.9973634.0319273.1
    Zero-shot0.94114393.348.1873724.80
    RoBERTaBitFit0.90360.10124.65873.47045.901326.3
    Full FT0.9378124.65124.65796.68945.902702.8
    LoRA0.93100.89125.53659.30246.051512.8
    P-Tuning0.79660.61125.25857.97049.691439.2
    MoE0.9426172.42172.42900.25141.567429.5
    TweetEvalLlama-3-8B-InstructLoRA0.808341.944582.542.3531171.2611418.3
    Zero-shot0.69104582.5450.8681159.01
    Mistral-7B-InstructLoRA0.801941.943800.312.2141280.3311241.9
    Zero-shot0.72963800.3148.0241266.92
    Qwen2.5-7B-InstructLoRA0.801340.374393.343.1241016.7314166.8
    Zero-shot0.72654393.3442.5181010.61
    RoBERTaBitFit0.14100.10124.65882.09745.901326.3
    Full FT0.7962124.65124.65835.67845.902701.5
    LoRA0.59320.89125.54628.11346.051512.8
    P-Tuning0.14100.61125.26889.74249.691439.3
    MoE0.8039200.74200.74890.95842.658152.4
    SST-5Llama-3-8B-InstructLoRA0.569241.944582.542.3851218.7412301.7
    Zero-shot0.24954582.5448.5521225.63
    Mistral-7B-InstructLoRA0.588841.943800.312.2041381.6411578.2
    Zero-shot0.35313800.3144.8681378.78
    Qwen2.5-7B-InstructLoRA0.564940.374393.343.2141093.9715825.3
    Zero-shot0.39524393.3440.5581061.08
    RoBERTaBitFit0.08700.10124.65888.37345.901326.3
    Full FT0.5432124.65124.65853.69445.902699.3
    LoRA0.48050.89125.54651.46146.051512.8
    P-Tuning0.13850.61125.26860.70349.691439.3
    MoE0.5532172.42172.42910.68541.938404.0
    下载: 导出CSV

    表  4  不同数据集上基线与引入 MoE 后模型的性能对比

    Table  4  Performance comparison between baseline and MoE-enhanced models on different datasets

    数据集 模型结构 Accuracy Precision Recall F1-Score
    IMDb 普通FFN 0.9551 0.9552 0.9551 0.9551
    门控专家 0.9565 0.9567 0.9565 0.9565
    TweetEval 普通FFN 0.8220 0.8222 0.8220 0.8215
    门控专家 0.8325 0.8338 0.8325 0.8327
    SST-5 普通FFN 0.5683 0.5677 0.5683 0.5666
    门控专家 0.5805 0.5788 0.5805 0.5785
    下载: 导出CSV
  • [1] Bordoloi M, Biswas S K. Sentiment analysis: A survey on design framework, applications and future scopes. Artificial Intelligence Review, 2023, 56(11): 12505−12560 doi: 10.1007/s10462-023-10442-2
    [2] 郑治豪, 吴文兵, 陈鑫, 胡荣鑫, 柳鑫, 王璞. 基于社交媒体大数据的交通感知分析系统. 自动化学报, 2018, 44(4): 656−666 doi: 10.16383/j.aas.2017.c160537

    Zheng Zhi-Hao, Wu Wen-Bing, Chen Xin, Hu Rong-Xin, Liu Xin, Wang Pu. A traffic sensing and analyzing system using social media data. Acta Automatica Sinica, 2018, 44(4): 656−666 doi: 10.16383/j.aas.2017.c160537
    [3] 王会东, 李兆东, 姚金丽, 余德淦. 基于对称三角模糊集的股票投资者情绪传播模型. 自动化学报, 2020, 46(5): 1031−1043

    Wang Hui-Dong, Li Zhao-Dong, Yao Jin-Li, Yu De-Gan. Sentimental propagation model of stock investors based on symmetric triangular fuzzy set. Acta Automatica Sinica, 2020, 46(5): 1031−1043
    [4] 何欣润, 李毅轩, 傅中正, 伍冬睿, 黄剑. 多标签情感计算中的TSK模糊系统与域适应方法研究. 自动化学报, 2025, 51(7): 1546−1561

    He Xin-Run, Li Yi-Xuan, Fu Zhong-Zheng, Wu Dong-Rui, Huang Jian. A study of TSK fuzzy system and domain adaptation method in multi-label affective computing. Acta Automatica Sinica, 2025, 51(7): 1546−1561
    [5] Baccianella S, Esuli A, Sebastiani F. SentiWordNet 3.0: An enhanced lexical resource for sentiment analysis and opinion mining. In: Proceedings of the 7th International Conference on Language Resources and Evaluation (LREC). Valletta, Malta: European Language Resources Association, 2010. 83−90
    [6] 栗雨晴, 礼欣, 韩煦, 宋丹丹, 廖乐健. 基于双语词典的微博多类情感分析方法. 电子学报, 2016, 44(9): 2068−2073

    Li Yu-Qing, Li Xin, Han Xu, Song Dan-Dan, Liao Le-Jian. A bilingual lexicon-based multi-class semantic orientation analysis for microblogs. Acta Electronica Sinica, 2016, 44(9): 2068−2073
    [7] 赵妍妍, 秦兵, 石秋慧, 刘挺. 大规模情感词典的构建及其在情感分类中的应用. 中文信息学报, 2017, 31(2): 187−193

    Zhao Yan-Yan, Qin Bing, Shi Qiu-Hui, Liu Ting. Large-scale sentiment lexicon collection and its application in sentiment classification. Journal of Chinese Information Processing, 2017, 31(2): 187−193
    [8] 杨爽, 陈芬. 基于SVM多特征融合的微博情感多级分类研究. 数据分析与知识发现, 2017, 1(2): 73−79

    Yang Shuang, Chen Fen. Analyzing sentiments of micro-blog posts based on support vector machine. Data Analysis and Knowledge Discovery, 2017, 1(2): 73−79
    [9] Li J, Rao Y H, Jin F M, Chen H J, Xiang X Y. Multi-label maximum entropy model for social emotion classification over short text. Neurocomputing, 2016, 210: 247−256 doi: 10.1016/j.neucom.2016.03.088
    [10] Alaie A I, Farooq U, Bhat W A, Khurana S S, Singh P. An empirical study on sentimental drug review analysis using lexicon and machine learning-based techniques. SN Computer Science, 2024, 5(1): Article No. 63 doi: 10.1007/s42979-023-02384-x
    [11] 王科, 夏睿. 情感词典自动构建方法综述. 自动化学报, 2016, 42(4): 495−511

    Wang Ke, Xia Rui. A survey on automatical construction methods of sentiment lexicons. Acta Automatica Sinica, 2016, 42(4): 495−511
    [12] Lai Y N, Zhang L F, Han D H, Zhou R, Wang G R. Fine-grained emotion classification of Chinese microblogs based on graph convolution networks. World Wide Web, 2020, 23(5): 2771− 2787 doi: 10.1007/s11280-020-00803-0
    [13] Chen L H, Varoquaux G. What is the role of small models in the LLM era: A survey. arXiv preprint arXiv: 2409.06857, 2025.
    [14] Rezapour M. Emotion detection with Transformers: A comparative study. arXiv preprint arXiv: 2403.15454, 2024.
    [15] di Palma D, de Bellis A, Servedio G, Anelli V W, Narducci F, di Noia T. LLaMAs have feelings too: Unveiling sentiment and emotion representations in LLaMA models through probing. In: Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Vienna, Austria: Association for Computational Linguistics, 2025: 6124−6142
    [16] Chen K Z, Wang S, Ben H X, Tang S G, Hao Y B. Mixture of multimodal adapters for sentiment analysis. In: Proceedings of the Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers). Albuquerque, New Mexico: Association for Computational Linguistics, 2025. 1822−1833
    [17] Lo K M, Huang Z Y, Qiu Z H, Wang Z L, Fu J. A closer look into mixture-of-experts in large language models. Findings of the Association for Computational Linguistics: NAACL 2025, 2025. 4427−4447 doi: 10.1109/tkde.2025.3554028/mm1
    [18] Mu S Y, Lin S. A comprehensive survey of mixture-of-experts: Algorithms, theory, and applications. arXiv preprint arXiv: 2503.07137, 2025.
    [19] Nnamdi J, Dimitri V, Amar S. Improving deep learning performance with mixture of experts and sparse activation. Preprints 2025, DOI: 10.20944/preprints202503.0611.v1
    [20] Nguyen H, Ho N, Rinaldo A. On least square estimation in softmax gating mixture of experts. In: Proceedings of the 41st International Conference on Machine Learning (ICML). Vienna, Austria: PMLR, 2024. 37707−37735
    [21] Wang K, Shen W Z, Yang Y Y, Quan X J, Wang R. Relational graph attention network for aspect-based sentiment analysis. In: Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Virtual Event: Association for Computational Linguistics, 2020. 3229−3238
    [22] Talaat A S. Sentiment analysis classification system using hybrid BERT models. Journal of Big Data, 2023, 10(1): Article No. 110 doi: 10.1186/s40537-023-00781-w
    [23] Krishnamoorthy A, Sundhar K A, Naveen K V, Karthik V. Analyzing sentiments: A comprehensive study of Roberta-based sentiment analysis on twitters. In: Proceedings of the 4th International Conference on Advancement in Electronics & Communication Engineering (AECE). Ghaziabad, India: IEEE, 2024. 626−630
    [24] Cai W L, Jiang J Y, Wang F, Tang J, Kim S, Huang J Y. A survey on mixture of experts in large language models. IEEE Transactions on Knowledge and Data Engineering, 2025, 37(7): 3896−3915
    [25] Shazeer N, Mirhoseini A, Maziarz K, Davis A, Le Q, Hinton G, et al. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. In: Proceedings of the 5th International Conference on Learning Representations (ICLR). Toulon, France: OpenReview.net, 2017.
    [26] Fedus W, Zoph B, Shazeer N. Switch Transformers: Scaling to trillion parameter models with simple and efficient sparsity. The Journal of Machine Learning Research, 2022, 23(1): Article No. 120
    [27] Du N, Huang Y P, Dai A M, Tong S, Lepikhin D, Xu Y Z, et al. GLaM: Efficient scaling of language models with mixture-of-experts. In: Proceedings of the 39th International Conference on Machine Learning (ICML). Baltimore, USA: PMLR, 2022. 5547−5569
    [28] Zhu T, Qu X Y, Dong D Z, Ruan J C, Tong J Q, He C H, et al. LLaMA-MoE: Building mixture-of-experts from LLaMA with continual pre-training. In: Proceedings of the Conference on Empirical Methods in Natural Language Processing. Miami, USA: Association for Computational Linguistics, 2024. 15913−15923
    [29] Tairin S, Mahmud S, Shen H Y, Iyer A. eMoE: Task-aware memory efficient mixture-of-experts-based (MoE) model inference. arXiv preprint arXiv: 2503.06823, 2025.
    [30] Liu Y H, Ott M, Goyal N, Du J F, Joshi M, Chen D Q, et al. RoBERTa: A robustly optimized BERT pretraining approach. arXiv preprint arXiv: 1907.11692, 2019.
  • 加载中
图(8) / 表(4)
计量
  • 文章访问数:  326
  • HTML全文浏览量:  229
  • PDF下载量:  30
  • 被引次数: 0
出版历程
  • 收稿日期:  2025-08-01
  • 录用日期:  2025-12-31
  • 网络出版日期:  2026-03-19
  • 刊出日期:  2026-04-20

目录

    /

    返回文章
    返回