Large Language Models for In-File Vulnerability Localization Can Be "Lost in the End"
Francesco Sovrano, Adam Bauer, Alberto Bacchelli

TL;DR
This study evaluates how well chat-based large language models detect file-based vulnerabilities, revealing a significant drop in performance for vulnerabilities near the end of large files and proposing input size adjustments to improve detection accuracy.
Contribution
The paper provides the first comprehensive analysis of LLM effectiveness in in-file vulnerability detection, highlighting the 'lost-in-the-end' effect and strategies for optimizing input size.
Findings
LLMs underperform in detecting vulnerabilities near file ends
Adjusting input size improves detection recall by over 37%
Vulnerability location and input size significantly influence LLM performance
Abstract
Recent advancements in artificial intelligence have enabled processing of larger inputs, leading everyday software developers to increasingly rely on chat-based large language models (LLMs) like GPT-3.5 and GPT-4 to detect vulnerabilities across entire files, not just within functions. This new development practice requires researchers to urgently investigate whether commonly used LLMs can effectively analyze large file-sized inputs, in order to provide timely insights for software developers and engineers about the pros and cons of this emerging technological trend. Hence, the goal of this paper is to evaluate the effectiveness of several state-of-the-art chat-based LLMs, including the GPT models, in detecting in-file vulnerabilities. We conducted a costly investigation into how the performance of LLMs varies based on vulnerability type, input size, and vulnerability location within…
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
MethodsRefunds@Expedia|||How do I get a full refund from Expedia? · {Dispute@FaQ-s}How to file a dispute with Expedia? · 15 Ways to Contact How can i speak to someone at Delta Airlines · Attention Is All You Need · Position-Wise Feed-Forward Layer · Absolute Position Encodings · Cosine Annealing · Label Smoothing · Linear Layer · Transformer
