EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
As large language models (LLMs) become integral to code-related tasks, a central question emerges: Do LLMs truly understand program semantics? We introduce EquiBench, a new benchmark for evaluating LLMs through equivalence checking, i.e., determining whether two programs produce identical outputs for all possible inputs. Unlike prior code generation benchmarks, this task directly tests a model's ability to reason about program semantics. EquiBench consists of 2400 program pairs across four languages and six categories. These pairs are generated through program analysis, compiler scheduling, and superoptimization, ensuring high-confidence labels, nontrivial difficulty, and full automation. We evaluate 19 state-of-the-art LLMs and find that in the most challenging categories, the best accuracies are 63.8% and 76.2%, only modestly above the 50% random baseline. Further analysis reveals that models often rely on syntactic similarity rather than exhibiting robust reasoning about program semantics, highlighting current limitations. Our code and dataset are publicly available at https://github.com/Anjiang-Wei/equibench
Key facts. Cited by 23 papers in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 26 of its 58 references that are in the map. First posted on arXiv 18 Feb 2025.
Builds on
26 of 58 references.
Closest ancestors · 4
Same direction, newest first
- 2024SemCoder: Training Code Language Models with Comprehensive Semantics Reasoning3 Jun
- 2024NExT: Teaching Large Language Models to Reason about Code Execution23 Apr
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar
- 2024CodeMind: Evaluating Large Language Models for Code Reasoning15 Feb
Other references · 22
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,397
- 2022Towards Reasoning in Large Language Models: A Surveycited by 593
- 2024GSM-Symbolic: Understanding the Limitations of Mathematical Reasoning in Large Language Modelscited by 533
- 2022Large Language Models Are Reasoning Teacherscited by 318
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
- 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 199
- 2023Learning Performance-Improving Code Editscited by 103
10 more
- 2023Large Language Models for Compiler Optimizationcited by 52
- 2024Meta Large Language Model Compiler: Foundation Models of Compiler Optimizationcited by 39
- 2023Code Execution with Pre-trained Language Modelscited by 33
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
- 2023KernelGPT: Enhanced Kernel Fuzzing via Large Language Modelscited by 17
- 2024Code Simulation Challenges for Large Language Modelscited by 15
- 2024Transformer-Based Models Are Not Yet Perfect At Learning to Emulate Structural Recursioncited by 14
- 2024What can Large Language Models Capture about Code Functional Equivalence?cited by 13
- 2023LLM-SQL-Solver: Can LLMs Determine SQL Equivalence?cited by 10
- 2024Can the Rookies Cut the Tough Cookie? Exploring the Use of LLMs for SQL Equivalence Checkingcited by 2
Built on by
Citing papers per year: 2025: 9; 2026: 14.
23 papers.
Sort:
By area:
- 2025Towards Reasoning Era: A Survey of Long Chain-of-Thought for Reasoning Large Language Modelscited by 381
- 2025CodeARC: Benchmarking Reasoning Capabilities of LLM Agents for Inductive Program Synthesiscited by 15
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2026Can We Predict Before Executing Machine Learning Agents?cited by 10
- 2026SciCoQA: Quality Assurance for Scientific Paper--Code Alignmentcited by 9
- 2025OSVBench: Benchmarking LLMs on Specification Generation Tasks for Operating System Verificationcited by 8
- 2025LLMs Lean on Priors, Not Programming Language Semanticscited by 5
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Modelscited by 5
- 2025Towards Verified Code Reasoning by LLMscited by 4
- 2025InnoGym: Benchmarking the Innovation Potential of AI Agentscited by 4
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repaircited by 3
- 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settingscited by 3
11 more
- 2026Exposing Weaknesses of Large Reasoning Models through Graph Algorithm Problemscited by 3
- 2026Decaf: Improving Neural Decompilation with Automatic Feedback and Searchcited by 1
- 2026(How) Do Large Language Models Understand High-Level Message Sequence Charts?cited by 1
- 2026Improving LLM Code Reasoning via Semantic Equivalence Self-Play with Formal Verificationcited by 0
- 2026ASSEMBLAGE-DEEPHISTORY: A Cross-Build Binary Dataset with Temporal Coveragecited by 0
- 2026What are the Right Symmetries for Formal Theorem Proving?cited by 0
- 2026Partial Contracts Suffice: Sound, LLM-Inferred Regression Verificationcited by 0
- 2026ModelEquivBench: Certifying Multi-Relational Evaluation of LLM-Generated Optimization Modelscited by 0
- 2026AsmEvo: Agentic Assembly-Level Optimization of AMD GPU Kernels with Functional Equivalence Verificationcited by 0
- 2026AG-CoT: Verified Algorithmic Traces for LLM Program Synthesis on Clifford Circuitscited by 0
- 2026LongHarness Bench: Stress-Testing Language Model Harnesses for Long-Context Reasoningcited by 0
- 2026LongHarness Bench: Stress-Testing Language Model Harnesses for Long-Context Reasoning29 Sep 2026
- 2026AG-CoT: Verified Algorithmic Traces for LLM Program Synthesis on Clifford Circuits27 Sep 2026
- 2026AsmEvo: Agentic Assembly-Level Optimization of AMD GPU Kernels with Functional Equivalence Verification21 Aug 2026
- 2026ModelEquivBench: Certifying Multi-Relational Evaluation of LLM-Generated Optimization Models31 Jul 2026
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Models28 Jul 2026
- 2026Partial Contracts Suffice: Sound, LLM-Inferred Regression Verification11 Jul 2026
- 2026What are the Right Symmetries for Formal Theorem Proving?21 May 2026
- 2026ASSEMBLAGE-DEEPHISTORY: A Cross-Build Binary Dataset with Temporal Coverage20 May 2026
- 2026(How) Do Large Language Models Understand High-Level Message Sequence Charts?13 May 2026
- 2026Decaf: Improving Neural Decompilation with Automatic Feedback and Search12 May 2026
- 2026Improving LLM Code Reasoning via Semantic Equivalence Self-Play with Formal Verification18 Apr 2026
- 2026Exposing Weaknesses of Large Reasoning Models through Graph Algorithm Problems6 Feb 2026
11 more
- 2026SciCoQA: Quality Assurance for Scientific Paper--Code Alignment19 Jan 2026
- 2026Can We Predict Before Executing Machine Learning Agents?9 Jan 2026
- 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settings16 Dec 2025
- 2025InnoGym: Benchmarking the Innovation Potential of AI Agents1 Dec 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025LLMs Lean on Priors, Not Programming Language Semantics3 Oct 2025
- 2025Towards Verified Code Reasoning by LLMs30 Sep 2025
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair19 Sep 2025
- 2025OSVBench: Benchmarking LLMs on Specification Generation Tasks for Operating System Verification29 Apr 2025
- 2025CodeARC: Benchmarking Reasoning Capabilities of LLM Agents for Inductive Program Synthesis29 Mar 2025
- 2025Towards Reasoning Era: A Survey of Long Chain-of-Thought for Reasoning Large Language Models12 Mar 2025
- 2025Towards Reasoning Era: A Survey of Long Chain-of-Thought for Reasoning Large Language Modelscited by 381
- 2025CodeARC: Benchmarking Reasoning Capabilities of LLM Agents for Inductive Program Synthesiscited by 15
- 2025LLMs Lean on Priors, Not Programming Language Semanticscited by 5
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Modelscited by 5
- 2025Towards Verified Code Reasoning by LLMscited by 4
- 2025InnoGym: Benchmarking the Innovation Potential of AI Agentscited by 4
- 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settingscited by 3
- 2026Exposing Weaknesses of Large Reasoning Models through Graph Algorithm Problemscited by 3
- 2026Improving LLM Code Reasoning via Semantic Equivalence Self-Play with Formal Verificationcited by 0
- 2026LongHarness Bench: Stress-Testing Language Model Harnesses for Long-Context Reasoningcited by 0
- 2026LongHarness Bench: Stress-Testing Language Model Harnesses for Long-Context Reasoning29 Sep 2026
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Models28 Jul 2026
- 2026Improving LLM Code Reasoning via Semantic Equivalence Self-Play with Formal Verification18 Apr 2026
- 2026Exposing Weaknesses of Large Reasoning Models through Graph Algorithm Problems6 Feb 2026
- 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settings16 Dec 2025
- 2025InnoGym: Benchmarking the Innovation Potential of AI Agents1 Dec 2025
- 2025LLMs Lean on Priors, Not Programming Language Semantics3 Oct 2025
- 2025Towards Verified Code Reasoning by LLMs30 Sep 2025
- 2025CodeARC: Benchmarking Reasoning Capabilities of LLM Agents for Inductive Program Synthesis29 Mar 2025
- 2025Towards Reasoning Era: A Survey of Long Chain-of-Thought for Reasoning Large Language Models12 Mar 2025
- 2025OSVBench: Benchmarking LLMs on Specification Generation Tasks for Operating System Verificationcited by 8
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repaircited by 3
- 2026Decaf: Improving Neural Decompilation with Automatic Feedback and Searchcited by 1
- 2026(How) Do Large Language Models Understand High-Level Message Sequence Charts?cited by 1
- 2026ASSEMBLAGE-DEEPHISTORY: A Cross-Build Binary Dataset with Temporal Coveragecited by 0
- 2026What are the Right Symmetries for Formal Theorem Proving?cited by 0
- 2026Partial Contracts Suffice: Sound, LLM-Inferred Regression Verificationcited by 0
- 2026ModelEquivBench: Certifying Multi-Relational Evaluation of LLM-Generated Optimization Modelscited by 0
- 2026AsmEvo: Agentic Assembly-Level Optimization of AMD GPU Kernels with Functional Equivalence Verificationcited by 0
- 2026AG-CoT: Verified Algorithmic Traces for LLM Program Synthesis on Clifford Circuitscited by 0
- 2026AG-CoT: Verified Algorithmic Traces for LLM Program Synthesis on Clifford Circuits27 Sep 2026
- 2026AsmEvo: Agentic Assembly-Level Optimization of AMD GPU Kernels with Functional Equivalence Verification21 Aug 2026
- 2026ModelEquivBench: Certifying Multi-Relational Evaluation of LLM-Generated Optimization Models31 Jul 2026
- 2026Partial Contracts Suffice: Sound, LLM-Inferred Regression Verification11 Jul 2026
- 2026What are the Right Symmetries for Formal Theorem Proving?21 May 2026
- 2026ASSEMBLAGE-DEEPHISTORY: A Cross-Build Binary Dataset with Temporal Coverage20 May 2026
- 2026(How) Do Large Language Models Understand High-Level Message Sequence Charts?13 May 2026
- 2026Decaf: Improving Neural Decompilation with Automatic Feedback and Search12 May 2026
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair19 Sep 2025
- 2025OSVBench: Benchmarking LLMs on Specification Generation Tasks for Operating System Verification29 Apr 2025
Similar, not cited
Close in wording, no citation either way
- 2025Disproving Program Equivalence with LLMs
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalence
- 2026An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoning
- 2025Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification Inference
- 2025Evaluating Program Semantics Reasoning with Type Inference in System F
- 2026CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output Prediction
- 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Tasks
- 2025VeriEquivBench: An Equivalence Score for Ground-Truth-Free Evaluation of Formally Verifiable Code