1id1.net
Research paper · Preprint

Stochastic Token Maps: Monad Liftings, Markov Categories, Convex Algebras, and Coalgebras over Token Space

1id1:core:20261122-0005

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.

Category theoryCategorical probabilityToken SpaceCoalgebra

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

FileSize
Paper PDF600 KB
LaTeX source archive31 KB
SHA-256 checksums
paper.pdf
b73a0c54b8287610a376597e78d3fa97614d430138e04bc8aeb8f97fed536927
source.zip
b1e4f247a2565360dd2b49ed657e3c33b96169dcce8751a30e42bf6f3ad407ae

Version history

v1Initial deposit

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.

Related paper

Monoidal Token Spaces: Initial Sources and Tensor Adjoints ↗