Searcharxiv⌕ Search

arXiv · 2610.30168

Finitely Verifiable Segmentation: Decidability for Every Tokenizer with a Finite-State Verifier

Abstract

A segmentation policy assigns to each byte string at most one segmentation into tokens. Call it finitely verifiable when a finite automaton over marked strings, bytes paired with boundary bits, accepts exactly the policy's own segmentations. The automaton judges a proposed segmentation and need not compute one. The paper shows what that hypothesis buys. Four questions that practice settles by folklore become decidable, whether a window certifies a token boundary, whether the boundary gap is bounded, whether a mask keeps generation completable, and whether two policies are equivalent. The last three specialize limitedness, coaccessibility and the equivalence of single-valued transducers. The first refines the synchronizing cut of code theory, and two more ask whether a certified cut, or the cuts of an inventory, let each piece scan alone. The class sits strictly between the online-scannable policies and those with regular domains, and its inner frontier is Choffrut's and decidable in polynomial time. Markings are length-preserving, so the class is exactly the rational segmentation policies, a normal form rather than a restriction, and what the decisions need is a supplied verifier. The class is closed under the operations pipelines use: composition over a labeled stage, restriction, splitting, and byte-fallback union of literal policies. Each composite inherits the six decisions, and certificates transfer between stages under four laws. Under rational, unifilar, almost surely stopping finite-state sources, each mass of the weighted section is an exact rational, and so is each rate where expected length is positive. Maximal-munch lexing, canonical byte-pair encoding and two-mode WordPiece instantiate the interface, and the munch library implements all six decisions. Every theorem carries an executable check, and every reported statistic is a program's own output.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Nicklas Nidhögg. 2026-10-16. Finitely Verifiable Segmentation: Decidability for Every Tokenizer with a Finite-State Verifier. https://arxiv.org/abs/2610.30168

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Distributional Learning of Context-Free Languages under Fixed Finite-Semigroup Typing

We study positive-data learning of context-free languages whose nonempty factors are typed by a fixed morphism $s:Σ^+\to S$ into a finite semigroup. A polynomial-time set-driven operator reconstructs each substitutable target from finite positive witnesses; a separate conservative learner identifies nonempty targets in Gold's sense. The encoded characteristic-data size is polynomial in grammar size and a typed shortest-yield parameter. Ordinary grammar thickness suffices when the typing is determined by a fixed prefix-suffix window and a finite-group value; for linear targets, linear grammar size alone suffices. Conversely, a fixed two-element semilattice typing yields finite targets with grammars of size and ordinary thickness both $O(n)$ that require exponentially long characteristic samples. The lower bound applies to any set-driven operator admitting characteristic samples for the fixed-typing class. Retyping closure, examples beyond fixed windows, and a Dyck-language obstruction delineate the framework's scope.

cs.FL↗

Beyond the Turing threshold: Productive grammars generate essentially undecidable languages

Emil Post's productive sets are not even semi-computable, let alone computable, being thus essentially incomputable. Accordingly, formal languages whose set of words is a (completely) productive set are essentially undecidable. In this article, I elaborate on Post productivity from the viewpoint of formal language theory: I design formal grammars that emulate the construction of productive sets of natural numbers and are thus beyond Turing-decidability.

cs.FL↗

When Does Tool Use Increase the Expressive Power of Finite-Precision Recurrent Models?

Modern sequence models are increasingly deployed as agents that interleave token generation with calls to external tools. We study when such tool access increases computational expressivity. We model any fixed finite-precision recurrent sequence model, including finite-precision state-space models (SSMs) with $B$ bits of internal state, as a deterministic finite-state controller interacting with an oracle through a finite command/observation interface, and establish a separation between the two regimes analyzed. First, every finite-state bounded-interface tool with memory set $M$ can be internalized at a cost of at most $\lceil\log_2|M|\rceil+O(1)$ recurrent bits, so the combined system remains finite-state. Second, a single unbounded tape with only local $\mathtt{read}$/$\mathtt{write}$/$\mathtt{move}$ commands suffices for Turing completeness: every single-tape Turing machine with state set $Q$ and tape alphabet $Γ$ is simulated by a controller with $O(\log|Q|+\log|Γ|)$ recurrent bits, and $\mathrm{EQ}_n$ requires $2^n$ states without tools but one constant-size controller with the tape. Third, this construction is realized exactly by a one-layer finite-precision \emph{selective} affine SSM with binary one-hot states, $\{0,1\}$ transition matrices, and zero biases. Under explicitly stated resource conventions, $O(\log B)$ recurrent bits suffice for tape-assisted simulation of any $B$-state Turing machine, whereas directly realizing an arbitrary $B$-state transition map in one exact affine update without external memory requires total recurrent dimension exactly $B-1$. Fixed description size, occupied tape cells, and interaction cost are reported separately from recurrent memory. Our results concern exact expressivity under deterministic semantics, not learnability or empirical performance.

cs.FL↗