mlsanityData to 7 Oct 2026

Evaluating Language Models on Cross-Language Code Functional Equivalence

arXiv 2608.23961 ↗First posted 25 Aug 2026cs.SE cs.AI cs.CLcited by 1

Not on the map. Why?

Abstract (arXiv)

Background: Large Language Models (LLMs) have demonstrated strong performance across a variety of code-understanding tasks, leading many to believe that they can reason about program semantics. However, existing evaluations primarily focus on single-language settings or rely on synthetically generated code, raising concerns about whether current results reflect true semantic understanding. Aims: We investigate whether LLMs can accurately judge functional equivalence across different programming languages in human-written code, a setting that requires deeper reasoning beyond superficial similarity. Method: We introduce PolyHuman, a dataset of human-written programs in CPP, Java, and Python. Using this dataset, we evaluate intra- and inter-language equivalence detection across open-weight and proprietary LLMs, selecting GPT-o4-mini as a representative model to assess stability. We then manually analyze 81 cases of systematic disagreement in which models incorrectly judge functional equivalence, examining the code logic and the generated Chain-of-Thought reasoning. Finally, we categorize these failures and compare them across GPT-o4-mini, Claude-Opus-4.7, and Gemini-3-Flash to determine whether they reflect model-specific issues or broader limitations of state-of-the-art LLMs. Results: We identify a difficulty-dependent breakdown in equivalence judgment (harder problems make the model increasingly prone to misclassifying non-equivalent code as equivalent), a model-specific sensitivity to programming language for the best-performing model (particularly a more conservative behavior on Python), and a partial reliance on similarity-based cues. GPT-o4-mini also shows substantial run-to-run instability under identical settings, indicating inconsistent rather than absent capability. Conclusions: Current LLMs do not reliably capture functional equivalence within or across languages.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 21 of its 49 references that are in the map. First posted on arXiv 25 Aug 2026.

Builds on

21 of 49 references.

References · 21

  1. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  2. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  3. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  4. 2024A Survey on Large Language Models for Code Generationcited by 646
  5. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
  6. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  7. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 199
  8. 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
  9. 2024Beyond Functional Correctness: Exploring Hallucinations in LLM-Generated Codecited by 106
  10. 2024Language Models for Code Completion: A Practical Evaluationcited by 38
  11. 2024On the Evaluation of Large Language Models in Unit Test Generationcited by 33
  12. 2024ComplexCodeEval: A Benchmark for Evaluating Large Code Models on More Complex Codecited by 18
9 more
  1. 2016Learning Syntactic Program Transformations from Examplescited by 17
  2. 2024What can Large Language Models Capture about Code Functional Equivalence?cited by 13
  3. 2025CODEMENV: Benchmarking Large Language Models on Code Migrationcited by 13
  4. 2026Beyond Resolution Rates: Behavioral Drivers of Coding Agent Success and Failurecited by 9
  5. 2025Towards A Generalist Code Embedding Model Based On Massive Data Synthesiscited by 8
  6. 2025Is LLM-Generated Code More Maintainable & Reliable than Human-Written Code?cited by 5
  7. 2024The Struggles of LLMs in Cross-lingual Code Clone Detectioncited by 3
  8. 2026A Multi-agent AI System for Deep Learning Model Migration from TensorFlow to JAXcited by 2
  9. 2026Foundation Models as Oracles for Refactoring Correctness Detectioncited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking
  2. 2025Disproving Program Equivalence with LLMs
  3. 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settings
  4. 2025Are Large Language Models Robust in Understanding Code Against Semantics-Preserving Mutations?
  5. 2025Cross-Task Benchmarking and Evaluation of General-Purpose and Code-Specific Large Language Models ↗
  6. 2025On Code-Induced Reasoning in LLMs
  7. 2025Evaluating the Generalization Capabilities of Large Language Models on Code Reasoning
  8. 2026Evaluating LLMs Code Reasoning Under Real-World Context