1 Computer School, Beijing Information Science & Technology University, Beijing 102206, China
2 The Research Center of Business Intelligence, Beijing 102206, China
3 Management Science and Engineering, Beijing Information Science & Technology University, Beijing 102206, China
Show less
文章历史+
Received
Published
2025-01-25
2026-01-08
Online Date
2026-05-27
PDF (2354K)
摘要
针对漏洞文本分类任务中的多类型分类问题和文本语义与标签语义利用不充分的问题,提出一种基于知识增强与标签语义(knowledge enhancement and labeling semantics, KELS)的多标签漏洞文本分类方法。首先,面向多种漏洞类型,引入漏洞属性知识,提出异构信息有效整合的策略,提升漏洞文本表示对多标签关系的表达能力,通过Transformer编码器的深度融合,进一步实现知识对文本语义的增强。其次,引入标签嵌入,提出一种融合知识增强文本表示与标签嵌入的标签注意力机制,用以捕捉文本与标签的语义关联,进行漏洞分类。实验结果表明,对比基线模型,KELS模型在Micro-P、Micro-F1、Macro-P、Macro-F1分别提高了0.98%、0.32%、2.31%、0.75%,有效提升了多标签漏洞分类的准确性。
Abstract
Aiming at the multi-type classification problem and the underutilization of text semantics and labeling semantics in the vulnerability text classification task, a multi-label vulnerability classification method based on knowledge enhancement and labeling semantics (KELS) was proposed. Firstly, vulnerability attribute knowledge was introduced for multiple vulnerability types, and a strategy for effective integration of heterogeneous information was proposed to enhance the expressive ability of vulnerability text representation for multi-tag relationship, and further realize the enhancement of knowledge on text semantics through the deep fusion of Transformer encoder. Secondly, label embedding was introduced to propose a label attention mechanism that fuses knowledge-enhanced text representation with label embedding to capture semantic associations between text and labels for vulnerability classification. The experimental results show that comparing with the baseline model, the KELS model improves 0.98%, 0.32%, 2.31%, and 0.75% in Micro-P, Micro-F1, Macro-P, and Macro-F1, respectively, which effectively improves the accuracy of multi-label vulnerability classification.
BIAN Xiao-yun, ZHAO Gang.
Multi-label Vulnerability Text Classification Based on Knowledge Enhancement and Label Semantics[J].
Science Technology and Engineering, 2026, 26(1): 262-269 DOI:10.12404/j.issn.1671-1815.2500629
为应对这一挑战,多标签文本分类(multi-label text classification, MLTC)技术逐渐成为研究的热点,并在情感分析[2]、推荐系统[3]、网页标记[4]、主题识别[5]等多个领域得到广泛应用。然而,多标签文本分类方法仍面临若干挑战,其中之一是将标签视作单纯的标记符号,忽视了标签背后蕴含的语义信息。这种做法未能充分挖掘标签所承载的潜在知识,导致分类性能难以进一步提升。因此,如何在漏洞描述文本中捕捉有价值的语义信息,同时深入挖掘标签的语义信息,成为提高漏洞分类性能的核心问题。
针对以上问题,现提出一种基于知识增强与标签语义(knowledge enhancement and labeling semantics, KELS)的多标签漏洞文本分类方法。该方法通过引入已知的漏洞属性知识,使漏洞文本表示中包含多标签间的相互关系。根据《信息安全技术 网络安全漏洞分类分级指南》[6],将通用缺陷列表(common weakness enumeration,CWE)漏洞类型统一整合为所需的漏洞标签,并引入标签嵌入,通过标签注意力机制使知识增强后的文本与标签进行语义交互,生成融合标签语义的文本嵌入表示,以增强模型的判别能力,进一步提高漏洞分类的准确性和鲁棒性。该方法旨在解决传统单标签分类方法难以适应多标签漏洞分类任务的局限性,同时克服文本语义与标签语义捕捉和利用不充分的问题,有效提升网络安全漏洞的识别与分类精度,从而帮助安全工作人员制定更细粒度的安全防护策略。
定义P={p1,p2,…,pM,H}为M个漏洞描述文本构成的数据集,pi表示P中的第i个漏洞描述文本, pi={w1,w2,…,wm},其中m为文档pi的长度,wj表示该漏洞描述文本的第j个单词,pi对应的分类标签由L={l1,l2,…,lk}表示,其中k为标签的数量,H表示pi对应的通用漏洞披露(common vulnerabilities and exposures,CVE)编号。多标签漏洞分类的最终目的是训练出一个分类器,其任务是为未标注的漏洞描述文本分配与其相关的一个或多个标签。
YaacoubJ P A, NouraH N, SalmanO, et al. Ethical hacking for IoT: security issues, challenges, solutions and recommendations[J]. Internet of Things and Cyber-Physical Systems, 2023, 3: 280-308.
GuanHui, HanZhiyuan. MGE-BERT: multi-label sentiment classification model integrating label ranking and sentiment graph perception[J]. Computer Systems Applications, 2025, 34(3): 268-276.
[4]
GuoL, JinB, YuR, et al. Multi-label classification methods for green computing and application for mobile medical recommendations[J]. IEEE Access, 2016, 4: 3201-3209.
[5]
JainH, PrabhuY, VarmaM. Extreme multi-label loss functions for recommendation, tagging, ranking & other missing label applications[C]// Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. San Francisco: ACM, 2016: 935-944.
[6]
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. San Francisco: NAACL, 2016: 1480-1489.
Standardization Administration of the People’s Republic of China. Informationsecuritytechnology-vulnerabilityclassificationguide:GB/T30279—2020[S]. Beijing: Standards Press of China, 2020.
[9]
HuangG, LiY, WangQ, et al. Automatic classification method for software vulnerability based on deep neural network[J]. IEEE Access, 2019, 7: 28291-28298.
QuLongyu, JiaYizhen, HaoYongle. Automatic classification of vulnerabilities based on CNN and text semantics[J]. Transactions of Beijing Institute of Technology, 2019, 39(7): 738-742.
LiuYangqiao, YangPin, WangYan. Software vulnerability automatic classification method based on convolutional neural network[J]. Modern Computer, 2020(15): 68-74.
[14]
SharmaR, SibalR, SabharwalS. Software vulnerability prioritization using vulnerability description[J]. International Journal of System Assurance Engineering and Management, 2021, 12(1): 58-64.
[15]
WangQ, GaoY, RenJ, et al. An automatic classification algorithm for software vulnerability based on weighted word vector and fusion neural network[J]. Computers & Security, 2023, 126: 103070.
[16]
PanM, WuP, ZouY, et al. An automatic vulnerability classification framework based on BiGRU-TextCNN[J]. Procedia Computer Science, 2023, 222: 377-386.
DuLin, XuChuanqi. Research on vulnerability text feature classification technology based on BERT[J] Journal of Information Security Research, 2023, 9(7): 687-692.
YangJinneng, LiWenshan, HeJunjiang, et al. Vulnerability classification method based on double-attention mechanism and adversarial training[J]. Application Research of Computers, 2024, 41(11): 3447-3454.
LiuJ, ChangW C, WuY, et al. Deep learning for extreme multi-label text classification[C]// Proceedings of the 40th International ACM SIGIR Conference on research and Development in Information Retrieval. Shinjuku: ACM, 2017: 115-124.
[23]
ChenG B, YeD H, XingZ C, et al. Ensemble application of convolutional and recurrent neural networks for multi-label text categorization[C]// International Joint Conference on Neural Networks. Anchorage: IEEE, 2017: 2377-2383.
[24]
YangP, SunX, LiW, et al. SGM: sequence generation model for multi-label classification[J]. ArXiv PrePrint, ArXiv: 1806. 04822, 2018.
[25]
YouR, ZhangZ, WangZ, et al. AttentionXML: label tree-based attention-aware deep model for high-performance extreme multi-label text classification[J]. Advances in Neural Information Processing Systems, 2019, 32: 5571-6362.
XiaoLin, ChenBoli, HuangXin, et al. Multi-label text classification method based on label semantic information[J]. Journal of Software, 2020, 31(4): 1079-1089.
GuoZhi, ZhengYanbin, XiaZhichao, et al. Knowledge representation learning method with attribute information[J]. Science Technology and Engineering, 2019, 19(33): 259-265.
[30]
ShiD, LiZ, ZuradaJ, et al. Ontology-based text convolution neural network (TextCNN) for prediction of construction accidents[J]. Knowledge and Information Systems, 2024, 66(4): 2651-2681.
[31]
ZhangZ, QianY, XingY, et al. Survey of knowledge representation learning methods[J]. Application Research of Computers, 2021, 38(4): 961-967.
[32]
GalalO, GawadA H A, FaroukM. Rethinking of BERT sentence embedding for text classification[J]. Neural Computing and Applications, 2024, 36(32): 20245-20258.