Abstract
Token maps, the morphisms of Token Space, are deterministic functions that preserve every structural record of a heap. Sampling a token from the output distribution of a language model is therefore not a Token map. This paper studies what a stochastic Token map should be. The answer depends on a choice, namely a lifting of the finitely supported distribution monad D along the forgetful functor from Token classes to sets. We describe three conservative liftings, called Dirac, independent and coupling, and show that the coupling lifting is the least lifting whose relations are convex. For each of the three the Kleisli category is a Markov category whose deterministic morphisms are exactly the Token maps, and the function objects of Token Space survive as stochastic function objects. Stochastic Token maps between causal sequence classes are the non-anticipating kernels, so positionwise sampling becomes a morphism. A kernel can preserve every Token locally without being a mixture of Token maps. The Eilenberg-Moore category of the coupling lifting consists of convex Token classes, which contain non-free objects such as Euclidean representation spaces. Final coalgebras lift from sets to Token classes, which gives a behavioural invariance principle for next-token predictors and a joint-sampling statement for generation. The object-level coupling construction is classical; the paper distinguishes the classical ingredients and lists open problems.
Cite this version
Wuming Pan. Stochastic Token Maps: Monad Liftings, Markov Categories, Convex Algebras, and Coalgebras over Token Space. 1id1, v1, 22 November 2026. 1id1:core:20261122-0005@v1. https://1id1.net/id/core/20261122-0005/v1/
Files & integrity
| File | Size |
|---|---|
| Paper PDF | 600 KB |
| LaTeX source archive | 31 KB |
SHA-256 checksums
Version history
First public release, v1, of revised manuscript V1.1. This revision corrects the finite-source mixture comparison, distinguishes occurrence-wise couplings and countably supported trace semantics, and updates references. The publication copy adds the permanent identifier and release link in the margins.
Provenance & verification
OpenAI Codex assisted this revision with mathematical checking, reference lookup, wording changes, supplementary verification code and publication-file preparation. No independent peer review is claimed.
Written proofs reviewed; 10 original and 6 supplementary finite checks pass. The 17-page PDF was rendered and inspected; LaTeX compilation completed without warnings. Finite checks do not establish general correctness or historical priority.