mlsanityData to 14 Oct 2026

Evaluating the Generalization Capabilities of Large Language Models on Code Reasoning

arXiv 2504.05518 ↗First posted 7 Apr 2025cs.SE cs.CL cs.LGcited by 7

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

We assess how the code reasoning abilities of large language models (LLMs) generalize to different kinds of programs. We present techniques for obtaining in- and out-of-distribution programs with different characteristics: code sampled from a domain-specific language, code automatically generated by an LLM, code collected from competitive programming contests, and mutated versions of these programs. We also present an experimental methodology for evaluating LLM generalization by comparing their performance on these programs. We perform an extensive evaluation across 10 state-of-the-art models from the past year, obtaining insights into their generalization capabilities over time and across different classes of programs. Our results highlight that while earlier models exhibit behavior consistent with pattern matching, the latest models exhibit strong generalization abilities on code reasoning.

Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 11 of its 46 references that are in the map. First posted on arXiv 7 Apr 2025.

Builds on

11 of 46 references.

Closest ancestors · 2

Same direction, newest first

  1. 2025CodeI/O: Condensing Reasoning Patterns via Code Input-Output Prediction11 Feb
  2. 2024CodeMind: Evaluating Large Language Models for Code Reasoning15 Feb

Other references · 9

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  3. 2024Qwen2.5 Technical Reportcited by 4,942
  4. 2024GPT-4o System Cardcited by 4,588
  5. 2021Program Synthesis with Large Language Modelscited by 3,637
  6. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  7. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  8. 2024Robustness, Security, Privacy, Explainability, Efficiency, and Usability of Large Language Models for Codecited by 28
  9. 2024Assessing, Exploiting, and Mitigating Syntactic Robustness Failures in LLM-Based Code Generationcited by 6

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 6; 2026: 1.

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2023Competition-Level Problems are Effective LLM Evaluators
  2. 2025Cross-Task Benchmarking and Evaluation of General-Purpose and Code-Specific Large Language Models ↗
  3. 2025rStar-Coder: Scaling Competitive Code Reasoning with a Large-Scale Verified Dataset
  4. 2026Evaluating LLMs Code Reasoning Under Real-World Context
  5. 2025Evaluating and Improving Large Language Models for Competitive Program Generation
  6. 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
  7. 2025Increasing LLM Coding Capabilities through Diverse Synthetic Coding Tasks
  8. 2025OJBench: A Competition Level Code Benchmark For Large Language Models