Code stylometry and selective AST nodes boost vulnerability detection F1 up to 48%
VulStyle achieves F1 scores, improving 4-48% over strong transformer baselines on benchmark datasets
AI/ML arXiv 29 Apr 2026 Method Prototype evidence
Published as “VulStyle: A Multi-Modal Pre-Training for Code Stylometry-Augmented Vulnerability Detection”
Why it matters
Higher detection accuracy could reduce manual review effort and lower false-positive rates in automated vulnerability scanning pipelines.
Summary
VulStyle improves software vulnerability detection by adding code stylometry and reduced AST nodes to a RoBERTa-based transformer, achieving up to a 48 percentage-point F1 gain on the BigVul benchmark. The paper reports consistent 2-6 point F1 improvements over strong baselines across five datasets, but the evidence is limited to reported benchmark numbers without external validation.
Caveats 2
- On the DiverseVul dataset UniXcoder achieves a higher F1 score than VulStyle ("UniXcoder is 1 percentage point higher in F1 score").
- Failure cases include false positives on code that looks risky stylistically but is semantically safe ("Style-present but Semantically Safe (FP) Code exhibiting risky conventions ... may be safe but still flagged").
What’s new here 4
- Integrates code stylometry (CStyle) features with token and AST representations.
- Uses a reduced AST representation that keeps only non-terminal nodes to lower input size.
- Pre-trains on a large 4.9 M function multi-language corpus before fine-tuning on vulnerability datasets.
- Provides an extensive ablation study showing complementary contributions of each modality.