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

· Source: Machine Learning · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Cybersecurity & Data Privacy · Depth: Expert, quick

Summary

A Hierarchy-Aware RoBERTa framework has been proposed to classify cybersecurity vulnerabilities using the Common Weakness Enumeration (CWE) taxonomy, specifically addressing extreme class imbalance and strong hierarchical dependencies. This framework explicitly incorporates CWE structural information via learnable parent-class embeddings, ensuring taxonomic consistency. Experiments reveal that synthetic interpolation techniques like SMOTE and ADASYN, while common for class imbalance, violate CWE's inherent parent-child constraints in high-dimensional embedding spaces, offering only marginal benefits for classical machine learning models and consistently degrading deep learning architectures. Evaluated on a CWE Research Concept dataset, the Hierarchy-Aware RoBERTa model achieved a weighted F1-score of 0.76 without data augmentation, surpassing all baselines. Notably, it improved the F1-score for minority classes, such as the Class category, from 0.40 to 0.60 compared to the BERT baseline.

Key takeaway

For Machine Learning Engineers classifying cybersecurity vulnerabilities with hierarchical taxonomies like CWE, you should prioritize hierarchy-aware representation learning over traditional oversampling techniques. Synthetic data augmentation methods such as SMOTE or ADASYN can degrade deep learning model performance and violate inherent structural constraints. Instead, consider models that explicitly embed hierarchical information, as this approach demonstrably improves minority class F1-scores and overall classification accuracy without data augmentation.

Key insights

Hierarchy-aware representation learning is superior to oversampling for structured vulnerability classification with hierarchical dependencies.

Principles

Method

The Hierarchy-Aware RoBERTa framework incorporates CWE structural information through learnable parent-class embeddings to preserve taxonomic consistency.

In practice

Topics

Best for: NLP Engineer, Research Scientist, AI Scientist, Machine Learning Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Machine Learning.