From Evaluation to Optimisation: Hierarchy-Aware Training Signals for CWE Prediction in Python

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 tests that proposal empirically, comparing 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 and generalises across independent training seeds. Using a default, non-test-informed configuration, GRPO reduces the mean cumulative ALPHA penalty of Qwen2.5-Coder-7B-Instruct on Security Hardening and Adversarial Testing (SVEN) by 13.5%. A further test-selected configuration reduces the mean penalty by 22.9% (27.9% in the best-observed run), reaching statistical parity with its 4.5× larger zero-shot teacher. Our experiments show that reinforcement learning outperforms the alternative delivery mechanisms we test. We conclude that delivery mechanism, rather than the specific hierarchical structure of the reward, is the primary variable—though whether taxonomy-aware structure contributes further remains an open question.

Authors

Institutions

Publication Details

Journal
Machine Learning and Knowledge Extraction
Published
2026-08-25
DOI
https://doi.org/10.3390/make8090258
Primary Topic
Adversarial Robustness in Machine Learning
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

From Evaluation to Optimisation: Hierarchy-Aware Training Signals for CWE Prediction in Python

Muntasir Adnan, Carlos C. N. Kuhn, Manile Srun
Machine Learning and Knowledge Extraction
Adversarial Robustness in Machine Learning
article

From Evaluation to Optimisation: Hierarchy-Aware Training Signals for CWE Prediction in Python

Muntasir Adnan, Carlos C. N. Kuhn, Manile Srun
article en

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 tests that proposal empirically, comparing 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 and generalises across independent training seeds. Using a default, non-test-informed configuration, GRPO reduces the mean cumulative ALPHA penalty of Qwen2.5-Coder-7B-Instruct on Security Hardening and Adversarial Testing (SVEN) by 13.5%. A further test-selected configuration reduces the mean penalty by 22.9% (27.9% in the best-observed run), reaching statistical parity with its 4.5× larger zero-shot teacher. Our experiments show that reinforcement learning outperforms the alternative delivery mechanisms we test. We conclude that delivery mechanism, rather than the specific hierarchical structure of the reward, is the primary variable—though whether taxonomy-aware structure contributes further remains an open question.

Machine Learning and Knowledge ExtractionVol. 8(9)
University of Canberra (AU)
ACT Government
Peace, Justice and strong institutions
Openalex Percentile: Top 21%
Adversarial Robustness in Machine Learning
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.