Expert-in-the-Loop Systems with Cross-Domain and In-Domain Few-Shot Learning for Software Vulnerability Detection
David Farr, Kevin Talty, Alexandra Farr, John Stockdale, Iain Cruickshank, and Jevin West

TL;DR
This paper investigates the use of Large Language Models with expert-in-the-loop strategies for software vulnerability detection, demonstrating that few-shot prompting improves accuracy and efficiency across cross-domain and in-domain scenarios.
Contribution
It introduces a novel framework combining few-shot prompting and confidence-based routing in LLMs for vulnerability detection, enhancing generalization and operational efficiency.
Findings
Few-shot prompting significantly improves classification accuracy.
Confidence-based routing directs human experts to uncertain cases.
LLMs can generalize across vulnerability categories with minimal examples.
Abstract
As cyber threats become more sophisticated, rapid and accurate vulnerability detection is essential for maintaining secure systems. This study explores the use of Large Language Models (LLMs) in software vulnerability assessment by simulating the identification of Python code with known Common Weakness Enumerations (CWEs), comparing zero-shot, few-shot cross-domain, and few-shot in-domain prompting strategies. Our results indicate that while zero-shot prompting performs poorly, few-shot prompting significantly enhances classification performance, particularly when integrated with confidence-based routing strategies that improve efficiency by directing human experts to cases where model uncertainty is high, optimizing the balance between automation and expert oversight. We find that LLMs can effectively generalize across vulnerability categories with minimal examples, suggesting their…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdversarial Robustness in Machine Learning · Information and Cyber Security · Advanced Malware Detection Techniques
