arXiv:2607.11994cs.LGcs.AI2026-07

针对漏洞分类中的层级不平衡问题,提出融合层级结构的RoBERTa模型。

Mitigating The Effect of Class Imbalance in Data with Hierarchical and Dependable Structure

论文配图:Mitigating The Effect of Class Imbalance in Data with Hierarchical and Dependable Structure
图 1 · 摘自论文原文
  • 用可学习的父类嵌入显式建模CWE层级关系
  • 在无数据增强下加权F1达0.76,少数类提升显著
  • 适合需要精准识别罕见漏洞的研究者

使用Common Weakness Enumeration(CWE)分类网络安全漏洞面临极端类别不平衡和类别间强层级依赖的挑战。尽管SMOTE和ADASYN等过采样技术广泛应用,但其在层次化CWE文本分类中的有效性尚未被充分探索。本文提出一种层次感知的RoBERTa框架,通过可学习的父类嵌入显式融入CWE结构信息,保持分类体系的一致性。实验表明,在高维嵌入空间中进行合成插值会破坏CWE固有的父子约束,对传统机器学习模型仅带来微弱收益,却持续损害深度学习架构性能。在CWE Research Concept数据集上,该模型无需数据增强即达到0.76的加权F1分数,优于所有基线,在少数类上表现突出,例如“Class”类别F1从0.40提升至0.60,超过BERT基线。结果表明,层次感知表示学习是结构化漏洞分类更合理的替代方案。

原文摘要 · Abstract (English)

Classifying cybersecurity vulnerabilities using the Common Weakness Enumeration (CWE) taxonomy is challenging due to extreme class imbalance and strong hierarchical dependencies among weakness categories. Although oversampling techniques such as Synthetic Minority Oversampling Technique (SMOTE) and Adaptive Synthetic Sampling (ADASYN) are widely adopted to mitigate class imbalance, their effectiveness for hierarchical CWE text classification remains largely unexplored. This paper proposes a Hierarchy-Aware RoBERTa framework that explicitly incorporates CWE structural information through learnable parent-class embeddings, preserving taxonomic consistency. Our experiments demonstrate that synthetic interpolation in high-dimensional embedding spaces violates the inherent parent-child constraints of the CWE hierarchy, offering only marginal benefits for classical ML models while consistently degrading deep learning architectures. Evaluated on a CWE Research Concept dataset, the proposed model achieves a weighted F1-score of 0.76 without data augmentation, outperforming all baselines with notable gains on minority classes, including the Class category whose F1-score improved from 0.40 to 0.60 over the BERT baseline. Our results suggest that hierarchy-aware representation learning is a more principled alternative to oversampling for structured vulnerability classification.

漏洞分类层级结构RoBERTa不平衡数据

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。