From Evaluation to Optimisation: Hierarchy-Aware Training Signals for CWE Prediction in Python
Abstract
The original ALPHA benchmark introduced a taxonomy-aware penalty for evaluating CWE-level vulnerability prediction in Python and proposed that the penalty could theoretically also serve as a training signal. This paper provides that validation. We compare three delivery mechanisms: supervised fine-tuning, a dual-head classification loss, and reinforcement learning with a dense reward derived from the normalised penalty. We find that supervised approaches consistently regress below the zero-shot baseline under distribution shift, while GRPO succeeds. Our best policy reduces the cumulative ALPHA penalty of Qwen2.5-Coder-7B on Security Hardening and Adversarial Testing (SVEN) dataset by 27.9% under greedy decoding, and by 25.5% under sampled decoding(p = 0.005, Welch's t-test), reaching statistical parity with its 4.5x larger zero-shot teacher. We conclude that the value of a hierarchical penalty as a training signal depends largely on the directness of its delivery.
Create a lesson
Metadata
- Journal
- Adnan, M.; Srun, M.; Kuhn, C.C.N. From Evaluation to Optimisation: Hierarchy-Aware Training Signals for CWE Prediction in Python. Mach. Learn. Knowl. Extr. 2026, 8, 258
Related papers
A Hierarchy of Risk Certificates for Representation-Based Prediction
Shared title terminologycs.LGMohit Kumar, Somayeh Kargaran
Predicting the Outcome of rTMS Depression Therapy using EEG Signals and CNN
Shared title terminologycs.LGWael Korani, Md Fahimul Kabir Chowdhury, Sadam AlQadi et al.
HierarchicalDAEW: Domain-Aware Edge-Weighted Graph Convolution with Evidential Uncertainty for Multi-Section Spatial Gene Expression Prediction from H&E Histology
Shared title terminologycs.LGKritanu Chattopadhyay, Soumya Chatterjee, Ondrej Krejcar et al.
Probabilistic Physics-Aware Machine Learning Predictions of Electric Truck Energy Consumption with Field Data
Shared title terminologycs.LGHannes Nilsson, Rafael Basso, Balázs Kulcsár et al.
Attack Policy Selection can Mislead Monitor Evaluators
Shared title terminologycs.LGCharlie Griffin, Oliver Makins, Asa Cooper Stickland et al.
From Prediction to Decision: Decision-Focused Fine-Tuning of Autoregressive Tabular Transformers for Cost-Sensitive Financial Events
Shared title terminologycs.LGAshkan Golgoon, Giacomo Domeniconi, Samuel Atkins et al.