Pre-trained language models like BERT excel at capturing general linguistic patterns but often underperform in domain-specific text classification due to a lack of structured knowledge. To enhance reasoning capabilities in specialized domains, knowledge injection has emerged as a mainstream approach. However, excessive knowledge fusion may distort the original semantics of sentences, leading to Knowledge Noise (KN). To address domain-specific knowledge gaps and mitigate the impact of KN in text classification, we propose a triple-enhanced BERT framework that integrates a Knowledge-Enhanced Dynamic Attention (KEDA),a Hierarchical Knowledge Fusion Network (HKFN), and an Adversarial Knowledge Regularizer (AKR). Experimental results on seven diverse domain-specific corpora demonstrate that our model significantly outperforms existing baselines.
7) ROME-TC。全称是“ROME for Text Classification”,指基于 ROME(Rank-One Model Editing)[41]知识编辑方法改造的文本分类专用模型,而ROME是斯坦福大学提出的知识编辑方法,核心思想是通过低秩分解直接修改预训练模型的参数,无需微调即可动态更新知识。此比较在知识更新粒度层面比较参数级编辑和表示层动态融合两种不同的动态性实现方式的优劣。
尽管模型性能与KG质量相关,但我们的知识增强动态注意力机制(KEDA)通过门控权重实现了知识的选择性融合。如表4所示,在HowNet覆盖率较低的Shopping数据集(事实密集型任务)中,模型(HN)性能仍优于静态知识注入的K-BERT(97.3% vs 97.0%),表明动态机制能有效过滤低质量知识。此外,对抗性知识正则化(AKR)通过知识鉴别器[式(12)]进一步抑制噪声,消融实验(表7)显示AKR移除后Chnsenticorp任务F1分数下降0.4%,验证了其对知识一致性的保障作用。
我们的模型显示出知识类型与任务特征之间的显著相关性。我们的模型(CN)在事实密集型任务购物(97.7% Test)和LCQMC(88.3% Test)中取得了最佳结果,这得益于其百科三元组提供了实体关系支持[=1.4% vs K-BERT (CN)]。产品属性识别(Shopping)的准确率提升尤为显著(2.1% vs ERNIE)。得益于语义网络对情感极性词的细粒度建模,我们的模型(HN)在Chnsenticorp文本分类(96.6% Test)中表现最佳。XNLI推理任务(77.4% Test)的提升超过了CN-DBpedia版本(77.5% vs 77.4%),但差异并不显著。从表4和表5可以发现,ROME-TC采用参数级编辑(低秩分解修改模型参数),虽支持动态知识更新,但在复杂任务(如LCQMC)中表现并不稳定。我们的模型通过表示层动态融合(KEDA门控机制),在保留原始语义的同时,自适应调整知识权重,避免参数篡改导致的语义失真(如Weibo任务中98.6% vs ROME-TC 97.9%)。
此外,从表5可以看出,我们的模型(CN)在所有Book_review任务和LCQMC任务中都表现出最佳的精确度-召回率平衡。在Book_review数据集中,精确度(89.1%)与召回率(88.3%)的差异仅为0.8%,显著小于BERT的1.5%,表明知识增强有效缓解了情感极性的误判问题。在LCQMC数据集中,在保持较高精确度(90.1%)的同时,召回率提升了3.0%,这表明CN-DBpedia关系三元组能够提升问答对的深度语义匹配能力。对于百科知识(CN-DBpedia),我们的模型在事实类任务LCQMC中取得了最高的F1值(88.8%),这主要得益于准确率的提升(1.2% vs ERNIE),并通过实体关系消歧降低了产品属性的误判率。值得注意的是,从表4和表5的数据可见,ERNIE3.0在LSHT任务上的F1分数为86.7%,而我们的模型(CN)为86.3%(差距0.4%)。这一差异可能ERNIE3.0采用三阶段掩码策略(实体→短语→文档级)和动态回放缓冲区,有效缓解长文本中的知识遗忘问题。相比之下,我们的模型虽通过分层知识融合网络(HKFN)捕捉多粒度特征,但在超长序列的全局知识整合上可能稍显不足。此外,ERNIE3.0在预训练阶段显式优化了长文档建模(如篇章关系学习),而本文方法侧重于微调阶段的知识增强,对长距离依赖的建模可能不够充分。DeepSeek-v3在零样本任务(如LCQMC,Test 88.0% F1)上表现优异,但其依赖指令微调(200万条指令数据),在知识密集型任务(如Shopping)上弱于本文的模型(97.7% vs 96.8%)。DeepSeek-v3未显式集成知识图谱,而本文模型通过CN-DBpedia/HowNet的结构化知识增强,在实体关系推理(如LCQMC)和情感分析(如Book_review)任务中表现更稳定(F1波动标准差≤0.3%)。
ZhuX, SobihaniP, GuoH.Long short-term memory over recursive structures [C]//International Conference on Machine Learning, 2015: 1604-1612.
[2]
YaoL, MaoC, LuoY.Graph convolutional networks for text classification [C].Proc AAAI Conf Artif Intell, 2019, 33(1): 7370-7377.
[3]
LiuX M, LiC Z X, WuS C, et al.A survey on text classification algorithms and their application scenarios [J].Chinese Journal of Computers, 2024, 47(6): 1244-1287.
[4]
LewisD, RinguetteM.A comparison of two learning algorithms for text categorization [C]//Proceedings of the Third Annual Symposium on Document Analysis and Information Retrieval, 1994: 81-93.
BengioY, SchwenkH, SenécalJ S, et al.Neural probabilistic language models [M]//Holmes D, Jain L C.Innovations in machine learning: Theory and applications.Berlin,Heidelberg:Springer, 2006: 137-186.
[7]
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 (NAACL-HLT 2019), 2019: 4171-4186.
[8]
LiuW, ZhouP, ZhaoZ,et al.K-BERT: Enabling language representation with knowledge graph [C].Proceedings of the AAAI Conference on Artificial Intelligence, 2020, 34(3): 2901-2908.
[9]
SunY, WangS, FengS, et al.Ernie 3.0: Large-scale knowledge enhanced pre-training for language understanding and generation [PP/OL].V1.arxiv(2021-07-05)[2025-06-11].
[10]
YekrangiM, NikolovN S.Domain-specific sentiment analysis: An optimized deep learning approach for the financial markets [J].IEEE Access, 2023, 11: 70248-70262.
[11]
KongJ, WangJ, ZhangX.Hierarchical BERT with an adaptive fine-tuning strategy for document classification [J].Knowl Based Syst, 2022, 238: 107872.
[12]
OnanA.Hierarchical graph-based text classification framework with contextual node embedding and BERT-based dynamic fusion[J].J King Saud Univ Comput Inf Sci, 2023, 35(7): 101610.
[13]
KarimiA, RossiL, PratiA.Adversarial training for aspect-based sentiment analysis with BERT [C]//2020 25th International Conference on Pattern Recognition (ICPR), 2021: 8797-8804.
[14]
ZhuW, CheungD.Lex-BERT: Enhancing bert based ner with lexicons [PP/OL].V2.arXiv(2021-04-16)[2025-06-11].
[15]
YangZ, YangD, DyerC, et al.Hierarchical attention networks for document classification [C]//Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL- HLT 2016), 2016: 1480-1489.
[16]
ZhangT, LinH, XuB, et al.Adversarial neural network with sentiment-aware attention for detecting adverse drug reactions [J].J Biomed Inform, 2021, 123: 103896.
[17]
SaltonG, BuckleyC.Term-weighting approaches in automatic text retrieval [J].Inf Process Manag, 1988, 24(5): 513-523.
[18]
KimY.Convolutional neural networks for sentence classification [C]//Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2014: 1746-1751.
[19]
ZhouP, ShiW, TianJ, et al.Attention-based bidirectional long short-term memory networks for relation classification [C]//Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (ACL 2016), 2016: 207-212.
[20]
LiangB, SuH, GuiL, et al.Aspect-based sentiment analysis via affective knowledge enhanced graph convolutional networks [J].Knowl Based Syst, 2022, 235: 107643.
[21]
YinD, MengT, ChangK W.SentiBERT: A transferable transformer-based architecture for compositional sentiment semantics [C]//Findings of the Association for Computational Linguistics: ACL 2020, 2020: 2499-2510.
[22]
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 (EMNLP 2018), 2018: 3433-3442.
[23]
YaoL, MaoC, LuoY.Graph convolutional networks for text classification [C].Proc AAAI Conf Artif Intell, 2019, 33(1): 7370-7377.
[24]
LiuY W, SunZ W. Intrusion detection model based on generative adversarial networks in IWSN against adversarial attacks [J].Journal of Jiangsu University(Natural Science Edition), 2025, 46(5): 562-569.
MiyatoT, DaiA M, GoodfellowI, et al.Virtual adversarial training: A regularization method for supervised and semi-supervised learning [J].IEEE T Pattern Anal, 2019, 41(8): 1979-1993.
[27]
GuoC, SablayrollesA, JégouH, et al.Gradient-based adversarial attacks against text transformers [C]//Advances in Neural Information Processing Systems 34 (NeurIPS 2021), 2021: 16899-16910.
[28]
ZhangW E, ShengQ Z, AlhazmiA, et al.Adversarial attacks on deep-learning models in natural language processing: A survey [J].ACM T Intell Syst Tec, 2020, 11(3): 1-41.
[29]
HuD, BaoY, WeiL, et al.Supervised adversarial contrastive learning for emotion recognition in conversations [PP/OL].V2.arxiv(2023-07-09)[2025-06-04].
[30]
SunS, SunQ, ZhouK, et al.Hierarchical attention prototypical networks for few-shot text classification [C]//Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP 2019), 2019: 476-485.
[31]
ZhuC, XuY, RenX, et al.Knowledge-augmented methods for natural language processing [C]//Proceedings of the Sixteenth ACM International Conference on Web Search and Data Mining, 2023: 1228-1231.
[32]
AptéC, DamerauF, WeissS M.Automated learning of decision rules for text categorization [J].ACM T Inform Syst, 1994, 12(3): 233-251.
[33]
ConneauA, LampleG, RinottR, et al.XNLI: Evaluating cross-lingual sentence representations [C]//Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, 2018: 2475-2485.
[34]
LiuX, ChenQ, DengC, et al.LCQMC: A large-scale Chinese question matching corpus [C]//Proceedings of the 27th International Conference on Computational Linguistics (COLING 2018), 2018: 1952-1962.
[35]
BaiY, TuS, ZhangJ, et al.LongBench v2: Towards deeper understanding and reasoning on realistic long-context multitasks [PP/OL].V2.arXiv(2025-01-03)[2025-06-04].
[36]
XuB, XuY, LiangJ, et al.CN-DBpedia: A never-ending Chinese knowledge extraction system [M]//Advances in artificial intelligence: From theory to practice.Cham: Springer, 2017: 428-439.
[37]
DongZ, DongQ.HowNet-a hybrid language and knowledge resource [C]//Proceedings of the International Conference on Natural Language Processing and Knowledge Engineering, 2023: 820-825.
[38]
LiuY, OttM, GoyalN, et al.RoBERTa: A robustly optimized BERT pretraining approach [C/OL]//ICLR, 2020.
[39]
SunY, WangS, LiY, et al.ERNIE: Enhanced representation through knowledge integration [PP/OL].V1.arXiv(2019-04-19)[2025-06-11].
[40]
LiuA, FengB, XueB, et al.DeepSeek-V3 technical report[PP/OL].V2.arXiv(2025-02-18)[2025-06-04].
[41]
ChenY Y, LiW J.Dialogue emotion recognition based on dual-graph fusion integrating time series and knowledge enhancement [J].Journal of Chongqing University of Posts and Telecommunications(Natural Science Edition), 2024, 36(5): 974-982.
AndonianA, BauD, BelinkovY, et al.Locating and editing factual associations in GPT [C]//NeurIPS, 2022, 35: 17359-17372.
[44]
XiaY, ChenH.Trajectory classification network fusing Transformer and convolutional LSTM [J].Journal of Chongqing University of Posts and Telecommunications(Natural Science Edition), 2024, 36(1): 29-38.
JiangH, HeP, ChenW, et al.SMART: Robust and efficient fine-tuning for pre-trained natural language models through principled regularized optimization [C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 2020: 2179-2190.