Research map / Large language models / Agents, code and math
The Counterfeit Conundrum: Can Code Language Models Grasp the Nuances of Their Incorrect Generations?
Alex Gu, Wen-Ding Li, Naman Jain, Theo X. Olausson, Celine Lee, Koushik Sen, Armando Solar-Lezama
Massachusetts Institute of Technology · Cornell University · University of California, Berkeley
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Evaluate counterfeit instead of correct programs | CodeLlama 34B, DeepSeek-Coder 33B, GPT-3.5 · Correctness checking (HumanEval, ODEX) | accuracy: about 60% overall vs 50% chance; counterfeit accuracy well below correct | Hurt |
| Use GPT-4 as checker | correctness checking · HumanEval, ODEX | accuracy: about 60% -> around 80% | Improved |
| Execute counterfeit (test-failing) instead of correct programs | code LMs · Execution prediction (LeetCode, HumanEval) | execution accuracy | Hurt |
| Repair counterfeit programs instead of resampling | CodeLlama 34B-Instruct, DeepSeek 33B · HumanEval, LeetCode repair | success rate: DeepSeek-33B on HumanEval beats resampling on 35/81 problems | Hurt |
| Easier problems (higher pass@1) for correctness checking | code LMs · HumanEval correctness checking | accuracy | No clear effect |
| Easier problems for execution and repair | code LMs · HumanEval | accuracy: only modest or weak correlation with difficulty | Mixed |
| Evaluate a model on its own counterfeits vs other models' counterfeits | code LMs · Correctness checking, execution (HumanEval) | accuracy | No clear effect |
| Generate counterfeits from stronger vs weaker models | code LMs · Correctness, execution on counterfeits | accuracy | No clear effect |
Open problems this paper states
- “HumanEval specifications are vague, so some programs can be argued to be correct or counterfeit, and base tests are too weak while EvalPlus tests are too strong.” → Passing the tests does not show the code is correct. (an open problem in execution-based code verification)
Open problems in execution-based code verification
Can execution-based code verification be trusted beyond Python, small benchmarks and the tests it relies on?
- Evaluated on Python or one other language only. · 17 papers state it
- Only a few models were tested, and larger ones were left out. · 16 papers state it
- Passing the tests does not show the code is correct. · 15 papers state it
Closest papers by meaning
- Beyond Accuracy: Evaluating Self-Consistency of Code Large Language Models with IdentityChain (ICLR 2024 · similarity 0.85)
- LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code (ICLR 2025 · similarity 0.85)
- CodeHalu: Investigating Code Hallucinations in LLMs via Execution-based Verification (AAAI 2025 · similarity 0.85)
- Automatically Testing Functional Properties of Code Translation Models (AAAI 2024 · similarity 0.84)
- Training Language Models to Generate Quality Code with Program Analysis Feedback (NeurIPS 2025 · similarity 0.84)
- Evaluation of Large Language Models on Code Obfuscation (Student Abstract) (AAAI 2024 · similarity 0.84)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.