TRACE: Patch-Aware Retrieval-Augmented Reasoning for High-Recall Vulnerability Triage

Abstract Security patches often preserve dangerous operations while changing the conditions under which they execute. LLM-based vulnerability detectors must therefore distinguish the presence of such operations from the persistence of their vulnerability causes. We present TRACE, a patch-aware retrieval-augmented framework for high-recall, function-level vulnerability triage. TRACE links structural evidence from historical vulnerable/fixed code pairs with explicit repair principles, retrieves relevant contrasts through dependency-aware re-ranking, and guides an LLM to check dangerous-path alignment, vulnerability-cause matching, and equivalent safeguards in the target function. Inference requires no target-side repair patch. On 586 PairVul repair pairs, TRACE achieves 93.52\% recall and 75.48\% F1, compared with 95.05\% and 73.58\% for VulInstruct. It correctly classifies both revisions in 40.27\% of pairs, versus 34.98\%, and produces 53 fewer false positives on repaired functions. On a fixed 301-function SecVulEval subset, TRACE achieves 92.50\% recall and 70.48\% F1, compared with 78.33\% and 62.88\% for VulInstruct. The F1 differences on both datasets and the PairVul pair-accuracy difference do not reach significance under Holm adjustment. Ablations show lower F1 without repair principles or fixed-side evidence, while error analysis identifies safeguard-equivalence failures as a recurring source of false positives in audited cases. These findings suggest that linked repair contrasts can support high-recall vulnerability triage, although reliably recognizing equivalent safeguards remains a limitation.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-11-13
DOI
https://doi.org/10.21203/rs.3.rs-11482209/v1
Primary Topic
Software Engineering Research
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

TRACE: Patch-Aware Retrieval-Augmented Reasoning for High-Recall Vulnerability Triage

Lina Gong, Xiaolin Ju, D. Zhang, Zhan Gao et al.
3 links
Research Square
Software Engineering Research
preprint

TRACE: Patch-Aware Retrieval-Augmented Reasoning for High-Recall Vulnerability Triage

Lina Gong, Xiaolin Ju, D. Zhang, Zhan Gao, Xiang Chen
preprint en

Abstract

Abstract Security patches often preserve dangerous operations while changing the conditions under which they execute. LLM-based vulnerability detectors must therefore distinguish the presence of such operations from the persistence of their vulnerability causes. We present TRACE, a patch-aware retrieval-augmented framework for high-recall, function-level vulnerability triage. TRACE links structural evidence from historical vulnerable/fixed code pairs with explicit repair principles, retrieves relevant contrasts through dependency-aware re-ranking, and guides an LLM to check dangerous-path alignment, vulnerability-cause matching, and equivalent safeguards in the target function. Inference requires no target-side repair patch. On 586 PairVul repair pairs, TRACE achieves 93.52\% recall and 75.48\% F1, compared with 95.05\% and 73.58\% for VulInstruct. It correctly classifies both revisions in 40.27\% of pairs, versus 34.98\%, and produces 53 fewer false positives on repaired functions. On a fixed 301-function SecVulEval subset, TRACE achieves 92.50\% recall and 70.48\% F1, compared with 78.33\% and 62.88\% for VulInstruct. The F1 differences on both datasets and the PairVul pair-accuracy difference do not reach significance under Holm adjustment. Ablations show lower F1 without repair principles or fixed-side evidence, while error analysis identifies safeguard-equivalence failures as a recurring source of false positives in audited cases. These findings suggest that linked repair contrasts can support high-recall vulnerability triage, although reliably recognizing equivalent safeguards remains a limitation.

Research Square
Nantong University (CN), Nanjing University of Aeronautics and Astronautics (CN)
Software Engineering Research
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.

Laika access coming soon