mlsanityData to 7 Oct 2026

Debugging code world models

arXiv 2602.07672 ↗First posted 7 Feb 2026cs.SE cs.AI cs.LGcited by 4

On the map: World models → World models for language agents

Abstract (arXiv)

Code World Models (CWMs) are language models trained to simulate program execution by predicting explicit runtime state after every executed command. This execution-based world modeling enables internal verification within the model, offering an alternative to natural language chain-of-thought reasoning. However, the sources of errors and the nature of CWMs' limitations remain poorly understood. We study CWMs from two complementary perspectives: local semantic execution and long-horizon state tracking. On real-code benchmarks, we identify two dominant failure regimes. First, dense runtime state reveals produce token-intensive execution traces, leading to token-budget exhaustion on programs with long execution histories. Second, failures disproportionately concentrate in string-valued state, which we attribute to limitations of subword tokenization rather than program structure. To study long-horizon behavior, we use a controlled permutation-tracking benchmark that isolates state propagation under action execution. We show that long-horizon degradation is driven primarily by incorrect action generation: when actions are replaced with ground-truth commands, a Transformer-based CWM propagates state accurately over long horizons, despite known limitations of Transformers in long-horizon state tracking. These findings suggest directions for more efficient supervision and state representations in CWMs that are better aligned with program execution and data types.

Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Placed in World models for language agents, one of 11 directions in World models. Builds on 29 of its 38 references that are in the map. First posted on arXiv 7 Feb 2026.

Builds on

29 of 38 references.

Closest ancestors · 4

Same direction, newest first

  1. 2025Code World Models for General Game Playing6 Oct
  2. 2025CWM: An Open-Weights LLM for Research on Code Generation with World Models30 Sep
  3. 2024Generating Code World Models with Large Language Models Guided by Monte Carlo Tree Search24 May
  4. 2024WorldCoder, a Model-Based LLM Agent: Building World Models by Writing Code and Interacting with the Environment19 Feb

Other references · 25

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
  3. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
  4. 2018World Modelscited by 1,444
  5. 2024Genie: Generative Interactive Environmentscited by 706
  6. 2021ByT5: Towards a token-free future with pre-trained byte-to-byte modelscited by 504
  7. 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 483
  8. 2023Resurrecting Recurrent Neural Networks for Long Sequencescited by 397
  9. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
  10. 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 286
  11. 2022Transformers Learn Shortcuts to Automatacited by 260
  12. 2021CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representationcited by 229
13 more
  1. 2022Neural Networks and the Chomsky Hierarchycited by 214
  2. 2022The Parallelism Tradeoff: Limitations of Log-Precision Transformerscited by 191
  3. 2024Byte Latent Transformer: Patches Scale Better Than Tokenscited by 137
  4. 2024Unlocking State-Tracking in Linear RNNs Through Negative Eigenvaluescited by 97
  5. 2025DeltaProduct: Improving State-Tracking in Linear RNNs via Householder Productscited by 69
  6. 2025From f(x) and g(x) to f(g(x)): LLMs Learn New Skills in RL by Composing Old Onescited by 40
  7. 2023Code Execution with Pre-trained Language Modelscited by 33
  8. 2023TRACED: Execution-aware Pre-training for Source Codecited by 27
  9. 2019Bridging the Gap for Tokenizer-Free Language Modelscited by 21
  10. 2025Implicit Language Models are RNNs: Balancing Parallelization and Expressivitycited by 21
  11. 2025What I cannot execute, I do not understand: Training and Evaluating LLMs on Program Execution Tracescited by 11
  12. 2025Towards Effectively Leveraging Execution Traces for Program Repair with Code LLMscited by 11
  13. 2025Do Code Semantics Help? A Comprehensive Study on Execution Trace-Based Information for Code Large Language Modelscited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 4.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Demystifying Errors in LLM Reasoning Traces: An Empirical Study of Code Execution Simulation
  2. 2026Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmark
  3. 2026An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoning
  4. 2026CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output Prediction
  5. 2025A Tool for In-depth Analysis of Code Execution Reasoning of Large Language Models
  6. 2025Assessing the Impact of Code Changes on the Fault Localizability of Large Language Models
  7. 2026Towards Evaluation of Implicit Software World Models in Coding LLMs
  8. 2026Beyond the Autoregressive Horizon: A Comprehensive Survey of Diffusion Models, World Modelling, and State Space Models for Code