← Latest papers
💻 computer science

LLM-based Vulnerability Detection at Project Scale: An Empirical Study

This paper presents the first comprehensive empirical study comparing specialized LLM-based vulnerability detectors with traditional static analyzers at the project scale, revealing that while LLMs can uncover unique vulnerabilities, they currently suffer from low recall, high false discovery rates, and prohibitive computational costs, thereby limiting their practical robustness and scalability.

Original authors: Fengjie Li, Jiajun Jiang, Dongchi Chen, Yingfei Xiong

Published 2026-01-28
📖 5 min read🧠 Deep dive

Original authors: Fengjie Li, Jiajun Jiang, Dongchi Chen, Yingfei Xiong

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are the manager of a massive, bustling city (your software project). This city is full of buildings, roads, and hidden tunnels. Your job is to find the "cracks" in the infrastructure—places where a burglar could break in, steal data, or cause a collapse. These cracks are called vulnerabilities.

For years, you've hired Traditional Inspectors (Static Analyzers). They are like rule-following security guards with a clipboard. They know exactly what a "broken lock" looks like because they have a list of 1,000 specific rules. If a door doesn't match the "broken lock" pattern on their list, they ignore it. They are fast and cheap, but if a burglar uses a new trick or a weirdly shaped door, the guards miss it.

Recently, a new type of inspector has arrived: The AI Detective (LLM-based Detectors). Instead of a clipboard, this detective has a super-brain trained on millions of books about how cities are built. They can understand the story of the building, reason about why a door might be dangerous, and spot weird patterns the rule-followers miss.

This paper is a big, real-world test to see if these AI Detectives are actually ready to patrol the whole city, or if they are just good at solving puzzles in a classroom.

The Experiment

The researchers didn't just ask the detectives to solve a few riddles. They gave them two massive challenges:

  1. The "Answer Key" Test: They showed the tools 222 known cracks in the city that they already knew existed. The goal was to see how many the tools could find.
  2. The "Live City" Test: They sent the tools into 24 real, active, open-source software projects (like the Linux kernel or big web servers) to see what they would report in the real world.

What They Found

1. The AI Detectives Missed the Obvious (Low Recall)

When tested against the known cracks (the Answer Key), the AI Detectives were surprisingly bad at finding them.

  • The Result: They only found about 21% of the known cracks in C/C++ code and 34% in Java code.
  • The Analogy: Imagine a detective who is supposed to find a missing red car. They look at 100 red cars and only spot 21 of them. They missed the rest because they couldn't figure out which specific door was the "entry point" (source) and which was the "exit" (sink). They got confused by the specific, unique ways the city's architects built things, which didn't match the generic examples they were trained on.

2. The AI Detectives Are "Cry Wolf" Machines (High False Alarms)

When the tools scanned the real cities, they shouted "Burglar!" constantly.

  • The Result: Both the old rule-followers and the new AI detectives generated thousands of warnings. But when humans checked these warnings, over 85% to 97% were false alarms.
  • The Analogy: The AI Detective looked at a perfectly safe, locked door and said, "This looks suspicious! It might be a break-in!" because the door was slightly different from a standard one. The city manager (the developer) would have to spend hours investigating every single "burglar" report, only to find out it was just a normal door. This makes the tools hard to use in real life because nobody has time to check 1,000 false alarms to find the one real one.

3. Why Did They Fail? (The Root Causes)

The researchers dug into the "crime scenes" of the false alarms and found three main reasons:

  • Shallow Thinking: The AI detectives often only looked at the immediate neighborhood (a few blocks away) instead of tracing the path all the way across the city. They missed the fact that a danger at the start was neutralized by a security guard three blocks down.
  • Confusing the Map: They couldn't correctly identify the "start" and "end" points of a danger. They thought a safe function was a dangerous one, or vice versa.
  • Hallucinations: Sometimes, the AI just made things up. It saw two different buildings with the same name and assumed they were the same building, leading to a wrong conclusion about how the city worked.

4. The Cost of Using the AI (Scalability)

This is the biggest shocker. The AI Detectives are incredibly expensive to run.

  • The Result: To scan just one project, an AI tool might use hundreds of millions of "tokens" (the currency of AI thinking) and take days to finish.
  • The Analogy: The traditional guard takes 5 minutes to check a building and costs a few dollars. The AI Detective takes 33 hours to check the same building and costs a fortune in "brain power." It's like hiring a team of 1,000 geniuses to read a single page of a book to find a typo. It's too slow and too expensive to use for daily security checks.

The Bottom Line

The paper concludes that while AI Detectives are smarter than the old rule-followers in some ways (they can find some unique cracks the old guards miss), they are not yet ready for prime time.

They are currently:

  1. Too forgetful (missing most known cracks).
  2. Too paranoid (screaming about fake dangers).
  3. Too expensive (taking days and costing a fortune to run).

The researchers suggest that before we can trust these AI tools to guard our digital cities, we need to teach them to think deeper, stop making up facts, and learn how to work faster without burning out the budget. Until then, they are powerful but unreliable partners.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →