Code Simulation as a Proxy for High-order Tasks in Large Language Models

Emanuele La Malfa, Christoph Weinhuber, Orazio Torre, Fangru Lin, X. Angelo Huang +4 more
2/5/2025
cs.LGcs.AI

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

Many reasoning, planning, and problem-solving tasks share an intrinsic algorithmic nature: correctly simulating each step is a sufficient condition to solve them correctly. We collect pairs of naturalistic and synthetic reasoning tasks to assess the capabilities of Large Language Models (LLM). While naturalistic tasks often require careful human handcrafting, we show that synthetic data is, in many cases, a good proxy that is much easier to collect at scale. We leverage common constructs in programming as the counterpart of the building blocks of naturalistic reasoning tasks, such as straight-line programs, code that contains critical paths, and approximate and redundant instructions. We further assess the capabilities of LLMs on sorting problems and repeated operations via sorting algorithms and nested loops. Our synthetic datasets further reveal that while the most powerful LLMs exhibit relatively strong execution capabilities, the process is fragile: it is negatively affected by memorisation and seems to rely heavily on pattern recognition. Our contribution builds upon synthetically testing the reasoning capabilities of LLMs as a scalable complement to handcrafted human-annotated problems.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{malfa2025code,
  title  = {Code Simulation as a Proxy for High-order Tasks in Large Language Models},
  author = {Emanuele La Malfa and Christoph Weinhuber and Orazio Torre and Fangru Lin and X. Angelo Huang and Samuele Marro and Anthony Cohn and Nigel Shadbolt and Michael Wooldridge},
  year   = {2025},
  eprint = {2502.03568},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.03568v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.03568.svg)](https://codeofpaper.com/paper/2502.03568)

Discussion