Stochastic Languages at Sub-stochastic Cost
Smayan Agarwal, Aalok Thakkar
TL;DR
The paper addresses when deterministically computed quantitative languages over strings define valid probability distributions after normalization, focusing on cost register automata (CRAs) and their affine/linear fragments. It shows that stochasticity is undecidable in general (and even for the fully polynomial fragment) but becomes tractable for affine CRAs, with the total mass computable via spectral analysis under the condition that the aggregate matrix $M=\sum_{\sigma}M_{\sigma}$ satisfies $\rho(M)<1$. For linear CRAs, every stochastic model admits a semantically equivalent locally sub-stochastic representation, enabling a Kleene–Schützenberger style algebraic characterization and the introduction of Stochastic Regular Expressions to capture rational stochastic languages. The work thus lays a formal foundation for probabilistic computation, with implications for approximation, sampling, and distribution testing, and points to open directions in decidability beyond linear updates and learning from data.
Abstract
When does a deterministic computational model define a probability distribution? What are its properties? This work formalises and settles this stochasticity problem for weighted automata, and its generalisation cost register automata (CRA). We show that checking stochasticity is undecidable for CRAs in general. This motivates the study of the fully linear fragment, where a complete and tractable theory is established. For this class, stochasticity becomes decidable in polynomial time via spectral methods, and every stochastic linear CRA admits an equivalent model with locally sub-stochastic update functions. This provides a local syntactic characterisation of the semantics of the quantitative model. This local characterisation allows us to provide an algebraic Kleene-Schutzenberger characterisation for stochastic languages. The class of rational stochastic languages is the smallest class containing finite support distributions, which is closed under convex combination, Cauchy product, and discounted Kleene star. We also introduce Stochastic Regular Expressions as a complete and composable grammar for this class. Our framework provides the foundations for a formal theory of probabilistic computation, with immediate consequences for approximation, sampling, and distribution testing.
