When the Next Step Is Not One Step: Distribution-Aware Execution Modeling for Concurrent Go Programs
- company CockroachDB
- company Kubernetes
- company etcd
- company gRPC
- location arXiv
- person Kaviru Hapuarachchi
- product Gemini 2.5 Pro
- product Gemini 3.5 Flash
A research team has developed a method that treats the inherent nondeterminism of concurrent Go programs as a training signal, improving a language model’s ability to predict program behavior. The approach, detailed in a paper submitted to arXiv, fine-tunes a 7-billion-parameter model to match empirical event distributions rather than single outcomes [1]. The technique addresses a core challenge in modeling concurrent systems: two executions of the same program from an identical trace prefix can yield different, yet valid, next events due to scheduler nondeterminism. A model trained on a single label is effectively learning to guess one outcome of a random process [2]. The researchers, led by Kaviru Hapuarachchi, instead run each program many times and aggregate the observed next events into an empirical distribution. A 7B model is then fine-tuned to match this distribution using a Kullback-Leibler divergence objective [1][2]. The model was evaluated on 798 held-out predictions drawn from real production Go bugs found in systems including CockroachDB, Kubernetes, gRPC, and etcd [1][2]. CockroachDB is a distributed SQL database designed to survive infrastructure failures, while etcd serves as a distributed key-value store often used for cluster coordination [8]. After fine-tuning on fewer than a thousand traces, the model reached 36.2% accuracy on these predictions. This outperformed Google’s Gemini 3.5 Flash used in a zero-shot setting, which achieved 34.8% accuracy, and the same base model without fine-tuning, which scored 28.6% [1][2]. Distribution training matched the accuracy of a cross-entropy baseline (35.8% versus 36.2%) while reducing the Expected Calibration Error from 0.205 to 0.169, indicating more reliable confidence estimates [1][2]. The underlying model architecture belongs to the transformer family, which relies on multi-head attention mechanisms to contextualize tokens and has become foundational for large language models since its introduction in 2017 [3]. Beyond the empirical results, the paper derives a formal goroutine-leak signature for a class of select-blocked goroutines. In these cases, the probability of a goroutine unblocking is zero by scheduler semantics, not by learned behavior [1][2]. The researchers have released the dataset, trained adapters, and associated tooling alongside the paper [1].
model-releaseresearch-paper
Background sources we checked (9)
- arxiv.org ↗ Training a model to predict the next step in a concurrent program is harder than it looks: two runs of the same program from the same trace prefix can produce different next events, both valid, because the scheduler is nondeterministic. A model trained against a single label is l…
- en.wikipedia.org ↗ In deep learning, the transformer is a family of artificial neural network architectures based on the multi-head attention mechanism, in which text is converted to numerical representations called tokens, and each token is converted into a vector via lookup from a word embedding …
- en.wikipedia.org ↗ In cryptography, a zero-knowledge proof (also known as a ZK proof or ZKP) is a protocol in which one party (the prover) can convince another party (the verifier) that some given statement is true, without conveying to the verifier any information beyond the mere fact of that stat…
- en.wikipedia.org ↗ This article presents a timeline of events in the history of 16-bit x86 DOS-family disk operating systems from 1980 to present. Non-x86 operating systems named "DOS" are not part of the scope of this timeline. Also presented is a timeline of events in the history of the 8-bit 80…
- en.wikipedia.org ↗ PostgreSQL ( POHST-gres-kew-EL), also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. PostgreSQL features transactions with atomicity, consistency, isolation, durability (ACID) properties, a…
- en.wikipedia.org ↗ In biological nomenclature, organisms often receive scientific names that honor a person. A taxon (e.g., species or genus; plural: taxa) named in honor of another entity is an eponymous taxon, and names specifically honoring a person or persons are known as patronyms. Scientific …
- en.wikipedia.org ↗ CockroachDB is a source-available distributed SQL database management system developed by Cockroach Labs. The relational functionality is built on top of a distributed, transactional, consistent key-value store that can survive a variety of different underlying infrastructure fa…
- en.wikipedia.org ↗ TiDB (; "Ti" stands for Titanium) is an open-source NewSQL database that supports Hybrid Transactional and Analytical Processing (HTAP) workloads. Designed to be MySQL compatible, it is developed and supported primarily by PingCAP and licensed under Apache 2.0. It is also availab…
- en.wikipedia.org ↗ YDB (Yet another DataBase) is a distributed SQL database management system (DBMS) developed by Yandex, available as open-source technology.…