Lune

EMNLP2025Top-tier venue

EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking

Anjiang Wei, Jiannan Cao, Ran Li, Hongyu Chen, Yuhui Zhang, Ziheng Wang, Yuan Liu, Thiago S. F. X. Teixeira, Diyi Yang, Ke Wang, Alex Aiken

Abstract

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

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • LLMs Lean on Priors, Not Programming Language Semantics cites CRUXEval: A Benchmark for Code Reasoning, Understanding and Execution
  • CRUXEval: A Benchmark for Code Reasoning, Understanding and Execution cites Learning Performance-Improving Code Edits
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and RepairAli Reza Ibrahimzada, Brandon Paulsen, Reyhaneh Jabbarvand, Joey Dodds et al.ICML 2026 · 9 citations
  2. SciCoQA: Quality Assurance for Scientific Paper-Code AlignmentTim Baumgärtner, Iryna GurevychACL 2026 · 5 citations
  3. InnoGym: Benchmarking the Innovation Potential of AI AgentsJintian Zhang, Kewei Xu, Jingsheng Zheng, Zhuoyun Yu et al.ICLR 2026 · 4 citations
  4. LLMs Lean on Priors, Not Programming Language SemanticsAditya Thimmaiah, Jiyang Zhang, Jayanth Srinivasa, Junyi Jessy Li et al.ICML 2026 · 2 citations
  5. Don't Force the Fit: Bounded Log-Likelihood Loss for Enhanced Reasoning in Large Language ModelsFeng Zhao, Hong Zhang, Yu Yang, Ruilin Zhao et al.ICML 2026

Builds on18

  1. Towards Reasoning in Large Language Models: A SurveyJie Huang, Kevin Chen-Chuan ChangACL Findings 2023 · 428 citations
  2. CRUXEval: A Benchmark for Code Reasoning, Understanding and ExecutionAlex Gu, Baptiste Rozière, Hugh James Leather, Armando Solar-Lezama et al.ICML 2024 · 270 citations
  3. Large Language Models Are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language ModelsYinlin Deng, Chunqiu Steven Xia, Haoran Peng, Chenyuan Yang et al.ISSTA 2023 · 253 citations
  4. Learning Performance-Improving Code EditsAlexander Shypula, Aman Madaan, Yimeng Zeng, Uri Alon et al.ICLR 2024 · 141 citations
  5. Large Language Models are Visual Reasoning CoordinatorsLiangyu Chen, Bo Li, Sheng Shen, Jingkang Yang et al.NeurIPS 2023 · 108 citations

Related papers

  1. LLMs are Brittle to Simple Code Transformations: Introducing CETBench - A Benchmark for Code-Equivalence CheckingNeeva Oza, Ishaan Govil, Parul Gupta, Dinesh Khandelwal et al.ACL Findings 2026
  2. Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification InferenceThanh Le-Cong, Bach Le, Toby MurrayACL 2025
  3. QuanBench: Benchmarking Quantum Code Generation with Large Language ModelsXiaoyu Guo, Minggu Wang, Jianjun ZhaoASE 2025 · 5 citations
  4. VeriEquivBench: An Equivalence Score for Ground-Truth-Free Evaluation of Formally Verifiable CodeLingfei Zeng, Fengdi Che, Xuhan Huang, Fei Ye et al.ICLR 2026 · 8 citations
  5. CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output PredictionJun Gao, Yun Peng, Qian Qiao, Changhai Zhou et al.ACL Findings 2026 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines