AI
Specification-Driven Code Review Doesn't Catch More Bugs—But It Makes Them Accountable
A study shows that reviewing AI-generated code against formal specifications doesn't improve defect detection, but does enable auditable accountability through governance artifacts.
InfoQ
As AI coding assistants have shifted from novelty to infrastructure, the critical bottleneck in software quality has moved from code production to code verification. The question is no longer how fast AI can generate—it's how humans can confidently verify that AI-generated code matches intent, meets regulations, and doesn't introduce hidden bugs or security risks.
A new study accepted at GAISS 2026 explores whether reviewing AI code against formal specifications improves quality outcomes. The research reveals an unexpected trade-off: specification-driven review doesn't catch more defects than reviewing code alone, but it fundamentally changes how defects are handled in ways that matter for accountability and governance.
What the Study Found#
Researchers had five experienced engineers review AI-generated banking services (a deliberately complex domain involving money transfer atomicity, idempotency, overdraft enforcement, and audit trails) under two conditions. In one scenario, reviewers had access to a formal specification, high-level design, and low-level invariants. In the other, they saw only the public API with no contract.
The results were revealing:
- Recall stayed flat. Reviewers caught statistically identical numbers of actual defects with or without the baseline (52.5% vs. 51.8%, p=0.69). The specification did not make reviewers better bug-finders.
- Attribution became explicit. With a specification, 81% of reported findings tied back to a named requirement or violated invariant. Without one, 0% did—reviewers instead hedged that they "could not tell whether the behavior was intended."
- Confidence and cost both rose. Reviewers felt more confident (4.2 vs. 3.4 on a scale) but spent nearly twice as long (48 vs. 27 minutes), methodically walking through each invariant.
The Governance Shift: From Detection to Accountability#
The study's core insight reframes the value of specification-driven review. It doesn't improve detection rates; instead, it transforms bug review from a subjective judgment ("something looks off") into an auditable, attributable finding tied to an approved requirement.
This distinction matters when regulators or auditors ask: Who is accountable for this AI-generated behavior? How do you know it diverged from intent? How were humans meaningfully overseeing the process?
A specification-driven loop addresses these questions through five control points:

