Skip to content
AI-generated research idea🟠Medium🔬Significant ResearchNo close match found

Approximation Complexity of Tokenisation under Marginal Latent Segmentations

Characterize the computational complexity and approximation bounds of token vocabulary selection under marginal log-likelihood objectives with latent subword segmentations.

Time

several months

Compute level

Single GPU or less

Resources

Standard CPU or laptop, access to SentencePiece codebase.

Prerequisites

algorithmic complexity, expectation-maximization, hidden Markov models, dynamic programming

Scope

mathematical proofs and reference implementation of marginal likelihood solvers

The Gap

Section 2.1 formalizes the unigram negative log-likelihood objective (Eq. 2b) solely over the deterministic sequence of tokens actually produced by a tokeniser. As explicitly stated in Footnote 7, practical algorithms such as SentencePiece UnigramLM optimize marginal likelihood summed over all possible latent segmentations via expectation-maximization rather than a single hard segmentation.

“Notably, UnigramLM optimises for a marginal likelihood over all possible segmentations under latent fs; instead, we optimise over the log-likelihood of actually produced tokens.”
From the paper, Footnote 7, page 2. Matched against the PDF text.

Limitation

The hardness results for log-likelihood tokenisation do not cover marginal likelihood objectives over latent segmentations, leaving the computational and approximation complexity of genuine UnigramLM tokeniser selection open.

Proposed Solution

Formulate token vocabulary selection under marginal subword likelihood as a combinatorial optimization problem. Investigate whether the summation over exponential segmentation lattices via forward-backward trellis algorithms mitigates the gap reduction technique or whether a similar APX-hardness reduction can be constructed using modular arithmetic within the forward trellis weights.

The paper’s authors list this direction as future work, so they may already be pursuing it.

Why This Matters

Would resolve an explicit theoretical open question regarding the exact objective optimized by one of the most widely used tokenisation frameworks in modern LLMs.

How to Get Started

How to test it: Determine if a gap reduction from 3-MAX-CUT or subset sum can embed hard decision instances into the marginal segmentation trellis of a binary alphabet corpus, stopping if marginalization over segmentations naturally admits a polynomial-time randomized approximation scheme.

  1. Formalize the decision and optimization variants of marginal latent log-likelihood tokenisation as described in Kudo (2018).
  2. Adapt Reduction 1 to trace the forward lattice partition function across block boundaries under varying vocabulary selections.
  3. Test on small synthetic vocabularies whether local optima found by SentencePiece EM match global optimums computed via branch-and-bound search.
  4. Draft the forward-backward reduction gadget to test if trellis marginalization preserves hardness gaps.

Suggested by AI. Adapt it to your setup.

Has This Been Done?

No close match in 10 results

The listed papers include general latent variable and segmentation models such as The latent words language model and unsupervised topic segmentation, but none investigate the specific APX-hardness reduction or marginal subword likelihood combinatorial optimization proposed here.

We searched OpenAlex and arXiv for “unigram language model latent segmentation approximation complexity” and “Approximation Complexity of Tokenisation under Marginal Latent Segmentations” and an AI compared the idea with the top 10 results. A small search can miss relevant work.

Source Paper

Tokenisation is not in APX

Violeta Kastreva, Philip Whittington, Dennis Komm +1 more · 2026

This paper investigates the theoretical limits of subword tokenisation algorithms used in language models, proving that binary direct and bottom-up tokenisation are not in the APX complexity class under either compression or unigram log-likelihood objectives. The authors also establish that even unary direct tokenisation is APX-hard, ruling out unconditional polynomial-time constant-factor approximation algorithms or PTAS schemes unless P = NP. Consequently, any meaningful performance guarantees for practical subword tokenisers must depend on domain-specific or dataset-specific structural properties rather than universal worst-case bounds.

Related Ideas

Is this a good idea?

Share onXLinkedIn