Learning Reasoning World Models for Parallel Code
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Large language models have shown remarkable ability in serial code generation, but they still struggle with parallel code for which training data is comparatively scarce. A common remedy is to use coding agents that interact with external tools, but tool calls can be costly and sometimes impractical, e.g., for partially written code. We propose Parallel-Code World Models (PCWMs), reasoning LLMs that aim to predict tool outcomes directly from parallel source code. To train PCWMs, we design a novel exploration and data generation pipeline that samples diverse parallel-coding problems and candidate implementations across multiple domains, then executes them via tools to record data races and performance profiles. From these, we synthesize reasoning traces that causally connect source code to observed tool outcomes. Fine-tuning on the resulting data yields noticeable gains, with a 7B-parameter world model improving from 64.3% to 72.8% accuracy in race-outcome prediction, while an 8B-parameter model improves in a performance profiling task from 49.3% to 58.6% accuracy. Furthermore, when open-weight models were tasked with fixing data races, world-model feedback improved their race-fixing rates relative to self-feedback by 2.7%-9.1% using our 7B-parameter world model and by 6.1%-11.1% using our 14B-parameter world model. Our results suggest that reasoning world models may have the potential to serve alongside external tool calls in parallel-coding agents.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 21 of its 43 references that are in the map. First posted on arXiv 22 Apr 2026.
Builds on
21 of 43 references.
Closest ancestors · 2
Same direction, newest first
- 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learning2 Oct
- 2023Teaching Large Language Models to Self-Debug11 Apr
Other references · 19
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2019Dream to Control: Learning Behaviors by Latent Imaginationcited by 1,653
- 2018World Modelscited by 1,513
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 1,002
- 2025OpenThoughts: Data Recipes for Reasoning Modelscited by 304
- 2019Abductive Commonsense Reasoningcited by 301
- 2024Quiet-STaR: Language Models Can Teach Themselves to Think Before Speakingcited by 301
- 2025CWM: An Open-Weights LLM for Research on Code Generation with World Modelscited by 93
- 2024A Survey on LLM-based Code Generation for Low-Resource and Domain-Specific Programming Languagescited by 66
- 2023Comparing Llama-2 and GPT-3 LLMs for HPC kernels generationcited by 30
- 2020ProGraML: Graph-based Deep Learning for Program Optimization and Analysiscited by 23
7 more
- 2024The Landscape and Challenges of HPC Research and LLMscited by 22
- 2024Performance-Aligned LLMs for Generating Fast Codecited by 21
- 2025What I cannot execute, I do not understand: Training and Evaluating LLMs on Program Execution Tracescited by 12
- 2025LLM & HPC:Benchmarking DeepSeek's Performance in High-Performance Computing Taskscited by 8
- 2025Beyond Code Pairs: Dialogue-Based Data Generation for LLM Code Translationcited by 3
- 2025Leveraging AI for Productive and Trustworthy HPC Software: Challenges and Research Directionscited by 2
- 2025From Evidence to Trajectory: Abductive Reasoning Path Synthesis for Retrieval-Augmented Generation Agents Developmentcited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Increasing LLM Coding Capabilities through Diverse Synthetic Coding Tasks
- 2025On Code-Induced Reasoning in LLMs
- 2025ThreadWeaver: Adaptive Threading for Efficient Parallel Reasoning in Language Models
- 2024Steering Large Language Models between Code Execution and Textual Reasoning
- 2026CodeEval: A pedagogical approach for targeted evaluation of code-trained Large Language Models
- 2025Dynamic Benchmarking of Reasoning Capabilities in Code Large Language Models Under Data Contamination
- 2025Chain of Execution Supervision Promotes General Reasoning in Large Language Models
- 2025The Valley of Code Reasoning: Scaling Knowledge Distillation of Large Language Models