AI agents for autonomous vulnerability discovery

AutoTrace

From patches to triggers — agentic interprocedural exploration that localizes the exact statement where a vulnerability fires, then turns verified source-to-sink chains into a benchmark.

Zibaeirad, A., Vieira, M. & Zimmermann, T. UNC Charlotte · UC Irvine ISSRE 2026 · Main Research Track
// 01 Abstract

Overview

75.0%exact trigger statement (VulnHit) on full InterPVD
80.8%trigger function (FuncHit)
1,542SinkTrace-Bench samples (771 matched pairs, 16 CWEs)
$0.65average LLM cost per CVE

Given a vulnerability-fixing commit, trigger localization asks which specific statement turns the vulnerable program state into a concrete unsafe operation. The question is harder than binary detection because the answer demands interprocedural, causal reasoning: in a substantial fraction of real-world CVEs the triggering statement lies several call layers outside the patched function, beyond the reach of static rule sets and pattern-matching language models alike.

AutoTrace is an agentic pipeline that localizes triggers by exploring a code property graph layer by layer, with LLM agents deciding where to look next and deterministic admissibility gates deciding what evidence is required before a trigger can be reported. Agents never accept a trigger on their own authority; every reported trigger is backed by explicit graph evidence. On the full InterPVD benchmark AutoTrace reaches 75.0% VulnHit and 80.8% FuncHit, surpassing the prior state of the art on the same corpus. Building on the same machinery, we construct SinkTrace-Bench, a dataset that exposes each vulnerability as a source-to-sink causal chain drawn from matched vulnerable and patched program states — and find that even frontier LLMs struggle to separate the matched pairs.

// 02 Motivation

The trigger is not where the patch is

Motivating example: CVE-2014-9659 in FreeType
CVE-2014-9659 (CWE-125, FreeType). The patch adds a bounds guard in cf2_interpT2CharString, yet the trigger — the sink where the corrupted index is read, stack->buffer[idx] — lies three call layers away in another file. Patch-line and single-function methods point at the guard; only statement-level interprocedural localization reaches the sink.
// 03 Framework

How AutoTrace works

AutoTrace pipeline overview
The AutoTrace pipeline: patch-scoped CPG construction, agentic best-first frontier search, deterministic gate verification, and SinkTrace-Bench construction.

Two principles govern the design. First, LLM agents act as semantic reasoners that interpret code and decide where the search moves next, but never bypass the hard admissibility checks: every candidate must survive deterministic gates that test it against explicit code-property-graph evidence. The model explores, the evidence decides. Second, interprocedural analysis proceeds through repeated local slicing rather than one whole-program slice — each function is sliced independently and evidence is stitched across call edges, bounding both analysis and prompt context to a single function however deep the chain goes.

1 Nearly twice the statement-level precision of an LLM+RAG baseline

On the CVEs both cover, AutoTrace localizes the exact trigger statement almost twice as often (71.0% vs. 37.8% VulnHit). The baseline names the right function but misses the triggering statement; its higher function-level reach is a coverage artifact, since a plain LLM always emits some answer while AutoTrace's verifier abstains rather than guess.

2 Improves on the prior state of the art under the same metric

75.0% VulnHit on the full InterPVD corpus, against VulTrigger's 69.8% under the same line-level inclusion metric — while also reporting triggers several call layers outside the patched function that single-function methods cannot reach.

3 Inexpensive where it counts

$0.65 and 23.2 LLM calls per CVE on average. Wall-clock is dominated by CPG construction and slicing, not LLM inference — and the graph is built once per repository, so corpus-scale runs amortize the dominant cost.

// 04 SinkTrace-Bench

From verified chains to a benchmark

Every verifier-confirmed trigger forks into a matched pair: a vulnerable half from the pre-fix snapshot and a safe half from the post-fix snapshot, each carrying the full source-to-sink slice, the trigger statement, and the critical variable. Prior datasets label what is vulnerable; SinkTrace-Bench annotates why — the causal chain is a first-class label. The release holds 771 matched pairs (1,542 samples) across 16 CWE classes. We manually annotated all 1,542 samples against a fixed rubric: every sample carries an agreed vulnerable/safe label (100% label fidelity), and the annotated trigger genuinely causes the vulnerability in 83.8% of vulnerable samples.

A matched SinkTrace-Bench pair
Why SinkTrace-Bench is hard: both halves of a matched pair expose the identical operative statement (stack->buffer[idx]), so a model that keys on the sink alone cannot separate them. The sole difference is a guard two call hops upstream that bounds the value before it propagates — assigning opposite labels demands interprocedural reasoning along the source-to-sink chain, not patch-diff pattern matching.
// 05 Frontier LLMs

Can frontier models tell the twins apart?

Zero-shot ROC comparison of frontier models on SinkTrace-Bench
Zero-shot ROC comparison of seven frontier models on SinkTrace-Bench.
1 No model clears the benchmark

Top zero-shot accuracy is 59.0%, only nine points above the 50% chance floor on the balanced set — and even that comes from defaulting to a vulnerable verdict.

2 The failure mode is systematic, not random

The strongest backbones reach 87–95% true-positive rate but collapse to 7–31% on the safe half: they predict vulnerable whenever the sink is present. Separating a matched pair requires reasoning about the upstream fix, which is exactly what sink pattern matching cannot do.

3 The collapse on safe twins argues against contamination

A model recalling “this CVE is vulnerable” would not explain the systematic failure on the safe halves of the same chains; the spread tracks code-reasoning ability rather than mere exposure.

// 06 Discussion

Why this matters

The model explores, the evidence decides

Separating agent proposals from deterministic acceptance means no reported trigger rests on unverified model judgment — a successful prompt injection can at most yield a rejected candidate, never an unsupported report.

Statement-level answers are what practitioners consume

A function-level label says a defect is somewhere in a long body; a patch hunk often marks a guard upstream of the real problem. Only the trigger statement pins the exact operation that patch review, triage, and test construction actually need.

Causal labels, not surface patterns

Datasets built from patch syntax teach models to imitate changed-code patterns. SinkTrace-Bench labels causal structure — matched pairs that differ only by the fix — so progress on it requires the reasoning the task actually demands.

Toward leak-free discovery

Because every reported trigger is graph-gated rather than a model guess, the same machinery extends to repository snapshots newer than any model's training cutoff — evidence-backed candidates in live code, where no public record can leak the answer.

// 07 Cite

Citation

@inproceedings{zibaeirad2026autotrace, title = {AutoTrace: From Patches to Triggers via Agentic Interprocedural Exploration}, author = {Arastoo Zibaeirad and Marco Vieira and Thomas Zimmermann}, booktitle = {IEEE International Symposium on Software Reliability Engineering (ISSRE)}, year = {2026}, }