paper

When the Next Step Is Not One Step: Distribution-Aware Execution Modeling for Concurrent Go Programs

arXiv:2606.17508

Abstract

Predicting the next scheduler event of a concurrent program is ill-posed as single-label classification: repeated runs from the same trace prefix produce different, equally valid next events. We formulate next-event prediction for concurrent Go programs as estimating an empirical next-event distribution obtained from repeated executions, and release a benchmark with 945 training examples from hand-written and generated programs and 798 held-out predictions on 54 real-world GoKer bug kernels from systems such as CockroachDB, Kubernetes, gRPC and etcd. We fine-tune Qwen2.5-Coder-7B with low-rank adapters under a cross-entropy objective and a KL-to-empirical-distribution objective and compare them with zero-shot models and trivial baselines. The outcome is a neutral-to-negative result. The fine-tuned adapters (re-evaluated: 36.3% cross-entropy, 33.6% KL; originally reported 36.2% and 35.8%) are statistically indistinguishable from always predicting the majority event (35.5%), and an event n-gram model reaches 33-34%. Because each held-out prompt carries labels from about five runs, no deterministic predictor can exceed 58.9% top-1 accuracy, so we report macro-F1, balanced accuracy, per-class recall, program-clustered confidence intervals and binned calibration measured directly on both adapters. A sensitivity study with 100 runs per program shows that five-run targets are noisy (mean total-variation distance 0.24 from a 100-run reference), which plausibly limits what the KL objective can learn. Rare event types are essentially never predicted. A select-block goroutine-leak signature follows from scheduler semantics rather than learning. We release the data, adapters and tooling.

arXiv comment15 pages, 5 figures. Accepted for poster presentation at ICTer 2026. Substantially revised evaluation with trivial baselines, adapter re-evaluation, corrected calibration analysis, and run-count sensitivity analysis; conclusions revised accordingly