Pith. sign in

REVIEW 3 cited by

Code Simulation Challenges for Large Language Models

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2401.09074 v4 pith:XD7NJ3YU submitted 2024-01-17 cs.LG cs.AIcs.CLcs.PL

classification cs.LGcs.AIcs.CLcs.PL
keywords simulationllmscodetasksalgorithmiccapabilitiescosmpattern
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original 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. This work studies to what extent Large Language Models (LLMs) can simulate coding and algorithmic tasks to provide insights into general capabilities in such algorithmic reasoning tasks. We introduce benchmarks for straight-line programs, code that contains critical paths, and approximate and redundant instructions. We further assess the simulation capabilities of LLMs with sorting algorithms and nested loops and show that a routine's computational complexity directly affects an LLM's ability to simulate its execution. While the most powerful LLMs exhibit relatively strong simulation capabilities, the process is fragile, seems to rely heavily on pattern recognition, and is affected by memorisation. We propose a novel off-the-shelf prompting method, Chain of Simulation (CoSm), which instructs LLMs to simulate code execution line by line/follow the computation pattern of compilers. CoSm efficiently helps LLMs reduce memorisation and shallow pattern recognition while improving simulation performance. We consider the success of CoSm in code simulation to be inspirational for other general routine simulation reasoning tasks.

Discussion (0). Sign in to comment.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Can Large Language Models Generalize Procedures Across Representations?

    cs.CL 2026-02 conditional novelty 6.0 of 10

    Post-training on graph or code versions of a planning task does not transfer to natural-language versions, but a symbolic-then-natural-language RL curriculum achieves strong transfer.

  2. Can LLMs Reason Structurally? Benchmarking via the Lens of Data Structures

    cs.LG 2025-05 accept novelty 6.0 of 10

    A new benchmark shows that leading LLMs perform poorly on data structure reasoning tasks, with the top model scoring 0.46 on challenging instances.

  3. DisFaceRep: Representation Disentanglement for Co-occurring Facial Components in Weakly Supervised Face Parsing

    cs.CV 2025-08 unverdicted novelty 5.0 of 10

    DisFaceRep reports a weakly supervised face parsing framework that disentangles co-occurring facial components and outperforms existing weakly supervised segmentation methods on CelebAMask-HQ, LaPa, and Helen.

Pith tools