Dense Language Generation Made Simple: Deterministic, Randomized, and Multi-Order Algorithms

Ziyi Cai, Shuangping Li, Yiheng Shen, Kangning Wang, Peng Zhang
8/2/2026
cs.DScs.AIcs.CL

No confident code implementation found for this paper.

Abstract

Language generation in the limit is a theoretical framework for studying how a generator can learn to produce new valid strings from a stream of positive examples. In this model, an adversary chooses an unknown language from a countable family and enumerates its elements in an arbitrary order, while the generator must eventually output only elements of the language that have not yet appeared in the enumeration.

Show full abstract

Reliable generation is thus formalized through two eventual guarantees: validity and novelty relative to the observed data. To further quantify the breadth of the generator's outputs, Kleinberg and Wei (FOCS 2025, STOC 2026) introduced lower density as a measure of output coverage. Given an order representing the importance or relevance of possible outputs, lower density is the asymptotic lower bound, as $n$ grows, on the fraction of the first $n$ elements of the target language that the generator outputs before they appear in the data. Kleinberg and Wei showed that $1/2$ is the optimal lower-density guarantee for deterministic algorithms. We develop a simple and unified framework for obtaining optimal lower-density guarantees. We first give a deterministic algorithm that recovers the optimal guarantee of $1/2$ with a significantly simpler analysis than prior work. We then demonstrate the flexibility of our framework through two extensions. First, against an oblivious adversary, randomization raises the optimal guarantee to $1-1/e$. Second, for any finite collection of orders, the optimal deterministic and randomized guarantees can be achieved simultaneously with respect to every order, so accommodating multiple notions of importance or relevance entails no loss in the optimal guarantee.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{cai2026dense,
  title  = {Dense Language Generation Made Simple: Deterministic, Randomized, and Multi-Order Algorithms},
  author = {Ziyi Cai and Shuangping Li and Yiheng Shen and Kangning Wang and Peng Zhang},
  year   = {2026},
  eprint = {2608.01320},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.01320v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2608.01320.svg)](https://codeofpaper.com/paper/2608.01320)

Discussion