CETBench: A Novel Dataset constructed via Transformations over Programs for Benchmarking LLMs for Code-Equivalence Checking
Not on the map. Why?
Abstract (arXiv)
LLMs have been extensively used for the task of automated code generation. In this work, we examine the applicability of LLMs for the related but relatively unexplored task of code-equivalence checking, i.e., given two programs, whether they are functionally equivalent or not. This is an important problem since benchmarking code equivalence can play a critical role in evaluating LLM capabilities for tasks such as code re-writing and code translation. Towards this end, we present CETBench - Code Equivalence with Transformations Benchmark, constructed via a repository of programs, where two programs in the repository may be solving the same or different tasks. Each instance in our dataset is obtained by taking a pair of programs in the repository and applying a random series of pre-defined code transformations, resulting in (non-)equivalent pairs. Our analysis on this dataset reveals a surprising finding that very simple code transformations in the underlying pair of programs can result in a significant drop in performance of SOTA LLMs for the task of code-equivalence checking. To remedy this, we present a simple fine-tuning-based approach to boost LLM performance on the transformed pairs of programs. Our approach for dataset generation is generic, and can be used with repositories with varying program difficulty levels and allows for applying varying numbers as well as kinds of transformations. In our experiments, we perform ablations over the difficulty level of original programs, as well as the kind of transformations used in generating pairs for equivalence checking. Our analysis presents deep insights into the working of LLMs for the task of code-equivalence, and points to the fact that they may still be far from what could be termed as a semantic understanding of the underlying code.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 13 of its 28 references that are in the map. First posted on arXiv 4 Jun 2025.
Builds on
13 of 28 references.
References · 13
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2024A Survey on LLM-as-a-Judgecited by 1,423
- 2020Unsupervised Translation of Programming Languagescited by 263
- 2017RobustFill: Neural Program Learning under Noisy I/Ocited by 126
- 2024Can LLM be a Personalized Judge?cited by 100
- 2023ICE-Score: Instructing Large Language Models to Evaluate Codecited by 52
- 2023Ranking LLM-Generated Loop Invariants for Program Verificationcited by 33
- 2025From Code to Courtroom: LLMs as the New Software Judgescited by 16
- 2024What can Large Language Models Capture about Code Functional Equivalence?cited by 14
- 2023GPTCloneBench: A comprehensive benchmark of semantic clones and cross-language clones using GPT-3 model and SemanticCloneBenchcited by 11
1 more
Built on by
Citing papers per year: 2025: 1.
1 paper.