Multi-Class vs. Multi-Label BERT for CVE-to-CWE Mapping: How Taxonomy Structure Shapes the Errors
- URL: http://arxiv.org/abs/2607.07573v1
- Date: Wed, 08 Jul 2026 16:01:21 GMT
- Title: Multi-Class vs. Multi-Label BERT for CVE-to-CWE Mapping: How Taxonomy Structure Shapes the Errors
- Abstract summary: Three transformer encoders are evaluated on three nested label spaces.<n>A hierarchy-relaxed evaluation that forgives within-family confusions raises macro-F1 from $sim$81% to $sim$90%.<n>CySec achieves the strongest results overall, with statistically significant gains concentrated in the multi-label setting.
- Score: 0.1448851064537181
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Assigning Common Weakness Enumeration (CWE) categories to Common Vulnerabilities and Exposures (CVE) records remains an important but largely manual step in vulnerability analysis. We study this task as a text classification problem and compare two modelling choices: a \emph{multi-class} formulation that predicts a single CWE per CVE and a \emph{multi-label} formulation that allows multiple assignments. Three transformer encoders (BERT Base, SecureBERT, and CySecBERT) are evaluated on three nested label spaces (83, 47, and 25 classes). Multi-class training achieves higher macro-F1 across all settings, although the gap to multi-label narrows from 21 to 2 percentage points as the label space shrinks. Post-hoc threshold optimisation on the multi-label side closes this gap on the 25-class setting. Confusion analysis shows that the dominant misclassification patterns follow the CWE hierarchy and are shared across all three encoders (Pearson $r > 0.92$), which suggests that the error structure is driven more by taxonomy design than by encoder choice. A hierarchy-relaxed evaluation that forgives within-family confusions raises macro-F1 from ${\sim}$81\% to ${\sim}$90\%, indicating that strict metrics understate branch-level classifier quality. CySecBERT achieves the strongest results overall, with statistically significant gains concentrated in the multi-label setting.
Related papers
- Label Granularity Skew in Federated Learning with Hierarchical Image Classification [1.1196974000738729]
Federated learning enables privacy-preserving collaboration across distributed devices without centralizing local data.<n>Clients differ not only in data distributions but also in domain knowledge and annotation capabilities.<n>We introduce label granularity skew, a new form of statistical heterogeneity in federated hierarchical classification.
arXiv Detail & Related papers (2026-08-10T08:01:50Z) - Beyond Flat Labels: Level-Restricted Contrastive Learning for Hierarchical Fine-Grained Vision Classification [50.20892407648858]
Multimodal contrastive learning has enabled zero-shot visual classification by aligning images with textual categories.<n>Existing methods often produce predictions that are inconsistent across taxonomic levels.<n>We propose a group-balanced design, ensuring each taxonomic level receives adequate optimization.<n>We train our model with TreeOfLife-10M based on BioCLIP and evaluate it across multiple hierarchical classification benchmarks.
arXiv Detail & Related papers (2026-06-20T02:12:05Z) - Feature-Label Modal Alignment for Robust Partial Multi-Label Learning [66.1611192892514]
We propose a novel PML method based on feature-label modal alignment (PML-MA)<n>PML-MA treats features and labels as two complementary modalities and restores their consistency through systematic alignment.<n>Experiments on both real-world and synthetic datasets demonstrate that PML-MA significantly outperforms state-of-the-art methods.
arXiv Detail & Related papers (2026-04-10T07:44:46Z) - Multi-Head Encoding for Extreme Label Classification [15.815842882043734]
eXtreme Classification Label (XLC) has been established to distinguish massive labels.<n>As the number of categories increases, the number of parameters and nonlinear operations in the classifier also rises.<n>This results in a Computational Overload Problem (CCOP)
arXiv Detail & Related papers (2024-12-13T14:53:47Z) - TagCLIP: A Local-to-Global Framework to Enhance Open-Vocabulary
Multi-Label Classification of CLIP Without Training [29.431698321195814]
Contrastive Language-Image Pre-training (CLIP) has demonstrated impressive capabilities in open-vocabulary classification.
CLIP shows poor performance on multi-label datasets because the global feature tends to be dominated by the most prominent class.
We propose a local-to-global framework to obtain image tags.
arXiv Detail & Related papers (2023-12-20T08:15:40Z) - Generating Unbiased Pseudo-labels via a Theoretically Guaranteed
Chebyshev Constraint to Unify Semi-supervised Classification and Regression [57.17120203327993]
threshold-to-pseudo label process (T2L) in classification uses confidence to determine the quality of label.
In nature, regression also requires unbiased methods to generate high-quality labels.
We propose a theoretically guaranteed constraint for generating unbiased labels based on Chebyshev's inequality.
arXiv Detail & Related papers (2023-11-03T08:39:35Z) - ProTeCt: Prompt Tuning for Taxonomic Open Set Classification [59.59442518849203]
Few-shot adaptation methods do not fare well in the taxonomic open set (TOS) setting.
We propose a prompt tuning technique that calibrates the hierarchical consistency of model predictions.
A new Prompt Tuning for Hierarchical Consistency (ProTeCt) technique is then proposed to calibrate classification across label set granularities.
arXiv Detail & Related papers (2023-06-04T02:55:25Z) - CHiLS: Zero-Shot Image Classification with Hierarchical Label Sets [24.868024094095983]
Open vocabulary models (e.g. CLIP) have shown strong performance on zero-shot classification.
We propose Classification with Hierarchical Label Sets (or CHiLS) for datasets with implicit semantic hierarchies.
CHiLS is simple to implement within existing zero-shot pipelines and requires no additional training cost.
arXiv Detail & Related papers (2023-02-06T03:59:15Z) - All Mistakes Are Not Equal: Comprehensive Hierarchy Aware Multi-label
Predictions (CHAMP) [19.41500672342727]
We present a framework that penalizes a misprediction depending on its severity as per the hierarchy tree.
Our method provides a framework to enhance existing multilabel classification algorithms with better mistakes.
arXiv Detail & Related papers (2022-06-17T09:32:48Z) - Rank-Consistency Deep Hashing for Scalable Multi-Label Image Search [90.30623718137244]
We propose a novel deep hashing method for scalable multi-label image search.
A new rank-consistency objective is applied to align the similarity orders from two spaces.
A powerful loss function is designed to penalize the samples whose semantic similarity and hamming distance are mismatched.
arXiv Detail & Related papers (2021-02-02T13:46:58Z) - Generative Multi-Label Zero-Shot Learning [136.17594611722285]
Multi-label zero-shot learning strives to classify images into multiple unseen categories for which no data is available during training.
Our work is the first to tackle the problem of multi-label feature in the (generalized) zero-shot setting.
Our cross-level fusion-based generative approach outperforms the state-of-the-art on all three datasets.
arXiv Detail & Related papers (2021-01-27T18:56:46Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.