PatchHolmes: Agentic Patch Retrieval via Listwise Selection
Guanqun Yang, Yingming Zhou, Jiangrui Zheng, Shudong Hao, Xueqing Liu
Stevens Institute of Technology
Published September 30, 2026 · on the feed October 1, 2026 · ▲ 9 · arXiv 2609.38807
The abstract
Patch retrieval, the task of finding the commit that fixes a known vulnerability, is the foundation of vulnerability management workflows, yet 60% to 63% of CVEs in the major advisory databases lack a patch link. We present PatchHolmes, a two-phase patch retrieval system that pairs a hybrid first-stage retriever with an agentic second-stage inspection loop. Unlike pointwise prior work that scores each candidate independently, the Phase 2 agent reads the top-100 listwise: it sees the full candidate list at once and selectively reads 3 to 10 commits through four budgeted tools before submitting a single best commit. On GitHubAD, PatchHolmes beats the pointwise binary classifier Favia by 25.34% Recall@1 and the retrieve-and-CoT baseline IRCoT by 31.40%, at one agent conversation per CVE versus Favia's ten; with the candidate set held identical, the agent adds 27.32% Recall@1 over taking the retriever's top candidate, and the same agent, transferred unchanged to PatchFinder_top10, lifts Recall@1 from PatchFinder's own top-1 pick (24.28%) to 39.86%. Swapping the LLM backbone within the Qwen family changes Recall@1 by under 1%, and a second model family (gpt-oss) stays far above the no-agent floor, so the gain comes from the listwise agent loop; the entire system runs on a frozen open-weight model over a local Git repository, without fine-tuning or external search APIs.
The Brief
2:26A short podcast summary of the paper. Written and voiced by AI.
Transcript
PatchHolmes. Agentic Patch Retrieval via Listwise Selection. By Guanqun Yang and four others, from the Stevens Institute of Technology. Published on the thirtieth of September. Its code repository is worked out: about sixty source files, with a readme and a licence.
Patch retrieval means finding the commit that fixes a known vulnerability. It sits underneath vulnerability management workflows, and yet in the major advisory databases, between sixty and sixty-three percent of CVEs have no patch link at all. Prior work on the task has been pointwise: it scores each candidate commit on its own, independently of the others.
PatchHolmes is a two-phase system. A hybrid first-stage retriever narrows the field, and an agentic second-stage inspection loop makes the final call. The change from prior work is in how that agent looks at candidates. It reads the top one hundred listwise, seeing the whole candidate list at once instead of judging commits one at a time.
With the list in view, the agent reads selectively. It opens somewhere between three and ten commits, using four tools that each come with a budget, and then submits a single best commit. The entire system runs on a frozen open-weight model over a local Git repository. There is no fine-tuning and no external search service.
On GitHubAD, PatchHolmes beats the pointwise binary classifier Favia by twenty-five point three four percent in recall at one, and the retrieve-and-reason baseline IRCoT by thirty-one point four percent. It does so with one agent conversation per CVE, where Favia uses ten.
Two controls isolate where the gain comes from. Holding the candidate set fixed, the agent adds twenty-seven point three two percent in recall at one over simply taking the retriever's top candidate. Carried over unchanged to the PatchFinder top-ten candidate set, the same agent lifts recall at one from twenty-four point two eight percent, which is PatchFinder's own top pick, to thirty-nine point eight six percent.
Changing the backbone within the Qwen family moves recall at one by less than one percent. A second model family, gpt-oss, still stays far above the floor set by using no agent. The authors conclude that the improvement comes from the listwise agent loop rather than from any particular model.
A good detective, like the system's namesake, does not interrogate every suspect with equal care. PatchHolmes surveys the whole line-up first, chooses which few to question, and names one. The backbone experiments are what back this up: swap the backbone within a family and the result barely moves, so the credit goes to the way the search is organised.
Paper Quest · 7 chapters · about 40 min
Play this paper
Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.
Chapter 1 🧩 · The problem
A known flaw, an unknown fix, and thousands of commits. That is the wall.
You need to find the commit that fixes a known vulnerability, but 60% to 63% of CVEs lack a patch link. Repositories hold thousands of commits, and diffs run about 15,000 tokens.
The road ahead
- 1 · The problem ~7 min Finding the one commit that fixes a known vulnerability is hard, and scoring each candidate on its own cannot tell close look-alikes apart.
- 2 · What came before ~3 min
- 3 · The key idea ~8 min Give an agent the whole candidate list at once, let it read a few commits closely through budgeted tools, then submit one answer.
- 4 · Choose your own research ~3 min
- 5 · Build the method ~8 min A hybrid retriever builds a top-100 shortlist; an agent surveys it, inspects a few commits with four budgeted tools, and submits one.
- 6 · The experiment ~6 min You’ll guess: With the candidate set held fixed, how much Recall@1 does PatchHolmes's agent add over simply taking the retriever's top candidate?
- 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Free, with Google or an email address. Your stars and progress are kept.