Learning Reasoning World Models for Parallel Code
Gautam Singh, Arjun Guha, Bhavya Kailkhura, Harshitha Menon

TL;DR
This paper introduces Parallel-Code World Models (PCWMs), reasoning language models trained to predict tool outcomes directly from parallel code, improving accuracy in race detection and fixing without external tools.
Contribution
The authors develop a novel data generation pipeline and fine-tune reasoning LLMs, significantly enhancing their ability to predict race outcomes and fix data races in parallel code.
Findings
7B-parameter model improves race-outcome prediction accuracy from 64.3% to 72.8%.
8B-parameter model improves profiling accuracy from 49.3% to 58.6%.
World-model feedback increases race-fixing rates by up to 11.1%.
Abstract
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 hindsight reasoning traces that causally connect source code to observed tool outcomes. Fine-tuning on the resulting data yields noticeable gains, with a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
