Lune

ACL2026顶会

CodeHacker: Automated Test Case Generation for Detecting Vulnerabilities in Competitive Programming Solutions

Jingwei Shi, Xinxiang Yin, Jing Huang, Shengyu Tao, Jinman Zhao

摘要

The evaluation of Large Language Models (LLMs) for code generation relies heavily on the quality and robustness of test cases. However, existing benchmarks often lack coverage for subtle corner cases, allowing incorrect solutions to pass. To bridge this gap, we propose CodeHacker, an automated agent framework dedicated to generating targeted adversarial test cases that expose latent vulnerabilities in program submissions. Mimicking the hack mechanism in competitive programming, CodeHacker employs a multistrategy approach, including stress testing, anti-hash attacks, and logic-specific targeting to break specific code submissions. To ensure the validity and reliability of these attacks, we introduce a Calibration Phase, where the agent iteratively refines its own Validator and Checker via self-generated adversarial probes before evaluating contestant code. Experiments demonstrate that CodeHacker significantly improves the True Negative Rate (TNR) of existing datasets, effectively filtering out incorrect solutions that were previously accepted. Furthermore, generated adversarial cases prove to be superior training data, boosting the performance of RL-trained models on benchmarks like LiveCodeBench. Our code is available at https://github.com/shi0712/ CodeHacker .

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper2

  1. From Laboratory to Real-World Applications: Benchmarking Agentic Code Reasoning at the Repository LevelJia Li, Yuxin Su, Michael R. LyuACL 2026 · 4 次引用
  2. Learning from Cognition: Enhancing RL Efficiency for LLM Reasoning via Hierarchical Metacognitive Decomposition and RefinementZexu Sun, Yongcheng Zeng, Erxue Min, Heyang Gao 等ACL 2026

它引用的 Paper7

  1. LLM-Powered Test Case Generation for Detecting Bugs in Plausible ProgramsKaibo Liu, Zhenpeng Chen, Yiyang Liu, Jie M. Zhang 等ACL 2025 · 20 次引用
  2. Rethinking Verification for LLM Code Generation: From Generation to TestingZihan Ma, Taolin Zhang, Maosong Cao, Junnan Liu 等NeurIPS 2025 · 19 次引用
  3. CodeContests+: High-Quality Test Case Generation for Competitive ProgrammingZihan Wang, Siyao Liu, Yang Sun, Ming Ding 等EMNLP Findings 2025 · 7 次引用
  4. TRACE: Evaluating Execution Efficiency of LLM-Based Code TranslationZhihao Gong, Zeyu Sun, Dong Huang, Qingyuan Liang 等ACL 2026 · 5 次引用
  5. From Laboratory to Real-World Applications: Benchmarking Agentic Code Reasoning at the Repository LevelJia Li, Yuxin Su, Michael R. LyuACL 2026 · 4 次引用

相关 Paper

  1. ATGen: Adversarial Reinforcement Learning for Test Case GenerationQingyao Li, Xinyi Dai, Weiwen Liu, Xiangyang Li 等ICLR 2026 · 4 次引用
  2. SEC-bench: Automated Benchmarking of LLM Agents on Real-World Software Security TasksHwiwon Lee, Ziqi Zhang, Hanxiao Lu, Lingming ZhangNeurIPS 2025 · 86 次引用
  3. AutoAdvExBench: Benchmarking Autonomous Exploitation of Adversarial Example DefensesNicholas Carlini, Edoardo Debenedetti, Javier Rando, Milad Nasr 等ICML 2025
  4. Scaling Agentic Verifier for Competitive CodingZeyao Ma, Jing Zhang, Xiaokang Zhang, Jiaxi Yang 等ICML 2026 · 2 次引用
  5. AdverMCTS: Combating Pseudo-Correctness in Code Generation via Adversarial Monte Carlo Tree SearchQingyao Li, Weiwen Liu, Weinan Zhang, Yong Yu 等ICML 2026
黄昏的海面,两侧是细线勾勒的悬崖