Vibeleaderboard
← All Intel
Intel / article

How effective are traditional test criteria at detecting bugs in large language models generated code?

Source
arxiv.org
Author
Asma Hamidi, Michael Konstantinou, Renzo Degiovanni, Mike Papadakis
Date

Context

An AI-generated test can exercise faulty behavior and still report success if its expected result is wrong. This study examined 6,066 selected, harder-to-detect faulty Python implementations. Tests often supplied inputs that distinguished faulty code from a reference implementation, but their assertions failed to recognize the difference.

The researchers compared selecting tests by executed statements, exercised branches and detection of deliberately introduced code changes. Differences between those criteria were generally small beside the failure of the assertions themselves. For teams generating both code and tests with AI, the result directs to checking expected behavior: a test's reach through the code and its ability to recognize a wrong answer are separate properties.

Terms in this piece · Glossary
  • attention — The mechanism that lets a model weigh which earlier words matter for the word it's currently processing — the core operation of a transformer.
  • LLM — A large language model — the neural network behind tools like Claude and ChatGPT, trained on huge amounts of text to predict what comes next.
Key quotes

“First, most faults introduced by LLMs are relatively trivial to catch.”

“Second, the challenging faults are difficult to trigger using either traditional coverage-based or mutation-based criteria.”

“Third, actual fault detection rates remain extremely low, often near zero, because test oracles fail to capture faulty behavior triggered by the generated test prefixes, exposing a critical limitation of automated test generation.”

“Fourth, prompt-aware oracles can improve fault detection, but their overall effectiveness remains limited, highlighting the need for users to manually reason about test assertions.”

Recommended reads
Comments

Checking sign-in…

Loading comments…