AI
New Feedback Loop Helps AI Models Generate Better Security Test Cases
Researchers propose ReDig, a system that uses runtime information to refine how language models create targeted test inputs for finding bugs in software.
Language models have shown promise in automatically generating test inputs to hunt for bugs in code, but they often miss their mark when their initial assumptions about how a program behaves turn out to be wrong. A new approach aims to fix this by incorporating runtime feedback into the testing loop.
How the System Works#
Researchers have developed ReDig, a framework that iteratively improves LLM-based test generation by comparing what the model expects to happen against what actually occurs when code runs. When a generated test fails to reach a target code location, the system performs a post-execution analysis to pinpoint flawed assumptions about program behavior. The results of this analysis then guide the next round of test generation, steering the model toward the intended target.
Real-World Testing#
The team demonstrated the approach through case studies using two established open-source programs: Poppler (a PDF rendering library) and Libsndfile (an audio processing tool). In initial experiments on a collection of 59 known vulnerabilities (CVEs) from Sec-Bench, ReDig successfully generated crash-reproducing test cases for 24 of them—a meaningful result for a work-in-progress system still under development.
Why It Matters#
This refinement technique addresses a fundamental challenge in using AI for security testing: models can produce plausible-sounding but incorrect assumptions about how real software works. By creating a feedback loop that grounds the model's reasoning in actual runtime behavior, the approach helps bridge the gap between what an LLM thinks should happen and what genuinely does.

