Beyond Superficial Tests: Adversarial Refinement for Reliable Property-Based Testing

Xiao Li, Runlin Liu, Zhe Zhang, Xiang Gao, Hailong Sun


Abstract
Large Language Models (LLMs) have demonstrated remarkable proficiency in code generation, yet their application to Property-Based Testing (PBT) remains fraught with a superficiality gap. While LLMs can readily generate syntactically correct tests, they often struggle to bridge the semantic gap between code implementation and its intended invariant logic, resulting in weak properties that provide a false sense of security. To address this, we introduce PROBE, an agentic framework that hardens software properties through Adversarial Refinement. Unlike traditional generation approaches, PROBE treats test generation as a game of semantic asymmetry: it employs a Validator agent to actively generate counter-implementations, which are semantically incorrect codes that satisfy the generated property, to expose loopholes in the specification. Furthermore, PROBE constructs a cross-functional semantic graph to capture deep dependencies often missed by local analysis. Extensive evaluation reveals that PROBE increases mutation scores by 9.79% over baselines. In real-world deployment, PROBE identified 45 previously unknown bugs in top-tier libraries that have been confirmed by developers, demonstrating its ability to uncover deep semantic defects.
Anthology ID:
2026.findings-acl.683
Volume:
Findings of the Association for Computational Linguistics: ACL 2026
Month:
July
Year:
2026
Address:
San Diego, California, United States
Editors:
Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
13957–13974
Language:
URL:
https://preview.aclanthology.org/ingest-acl/2026.findings-acl.683/
DOI:
Bibkey:
Cite (ACL):
Xiao Li, Runlin Liu, Zhe Zhang, Xiang Gao, and Hailong Sun. 2026. Beyond Superficial Tests: Adversarial Refinement for Reliable Property-Based Testing. In Findings of the Association for Computational Linguistics: ACL 2026, pages 13957–13974, San Diego, California, United States. Association for Computational Linguistics.
Cite (Informal):
Beyond Superficial Tests: Adversarial Refinement for Reliable Property-Based Testing (Li et al., Findings 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-acl/2026.findings-acl.683.pdf
Checklist:
 2026.findings-acl.683.checklist.pdf