Breaking the Fixed Vocabulary Constraint in Sequence Models

40 concepts38 papers1 proposal

Early sequence-to-sequence networks, such as those introduced by Sutskever et al. and Cho et al., revolutionized how neural networks process text by mapping variable-length inputs to variable-length outputs. However, these architectures faced a fundamental mathematical constraint: the final layer requires computing a probability distribution (a softmax) over every possible word in the language.

If a model's vocabulary includes hundreds of thousands of unique words, this softmax computation becomes a massive computational bottleneck. To maintain efficiency, early models restricted their vocabularies to a "shortlist" of the most frequent words (typically 30,000 to 50,000 tokens). Any word outside this shortlist was mapped to a single, generic placeholder: the unknown token (<UNK>).

The Information Loss of Unknown Tokens

Collapsing rare words into a single token creates an information black hole. As noted by Sennrich et al. and Bahdanau et al., when a model encounters proper nouns, technical jargon, or rare terms, it loses the ability to distinguish between them. For instance, the names "Alice" and "Bob" would both be read as <UNK>.

During generation, the model can only output <UNK>, resulting in incomplete or generic sentences. This bottleneck is particularly severe in morphologically rich languages like German, where compound words create an explosion of unique surface forms (Hirschmann et al.), or in low-resource settings where training data is insufficient to cover a language's full morphological variety (Wei Bao).

Early Patches: Copying and Hybrid Systems

Before rethinking text representation entirely, researchers attempted to patch the fixed-vocabulary bottleneck by combining neural networks with external systems or heuristics. One intuitive approach was to use the model's internal attention mechanism to track where an unknown word occurred in the source text and copy its exact surface form directly to the output (Hashimoto et al.).

Other approaches integrated Neural Machine Translation (NMT) with traditional Statistical Machine Translation (SMT). For example, Stahlberg et al. and Wang et al. used large-vocabulary SMT systems to guide the neural decoder. This decoupling allowed the small-vocabulary neural model to handle structural fluency while the SMT system preserved the specific meaning of rare words. While effective, these hybrid pipelines added significant engineering complexity and post-processing overhead.

Changing the Granularity: Character-Level Representations

To achieve a true "open vocabulary" without external dependencies, models needed to operate below the word level. If a network processes characters instead of words, the vocabulary size drops from tens of thousands to just a few hundred tokens (the alphabet plus punctuation).

Costa-jussà et al. and Allauzen et al. demonstrated that convolutional neural networks (CNNs) could be used to compose character sequences into continuous word representations on the fly, bypassing the traditional word-lookup table. Similarly, Eriguchi et al. utilized character-based decoders to eliminate unknown word errors entirely.

By shifting to characters, the model can theoretically read and write any novel string, neologism, or typo (Jones et al.). However, character-level models dramatically increase sequence lengths, requiring the network to compute dependencies over hundreds of steps instead of dozens, which significantly slows down training and inference.

The Sweet Spot: Subword Tokenization

The definitive breakthrough in solving the vocabulary bottleneck came from finding a middle ground between atomic words and individual characters: subword units. Instead of treating "unforgettable" as a single rare word or a sequence of 13 individual characters, it can be broken into frequent sub-morphemic pieces like un + forget + table.

In a foundational paper, Sennrich et al. introduced the use of Byte Pair Encoding (BPE) for neural sequence models. BPE is a data-driven compression algorithm that iteratively merges the most frequent pairs of characters or character sequences in a text corpus.

Initial characters:  u n f o r g e t t a b l e
Frequent merges:     un + forget + able

This approach ensures that frequent words remain intact as single tokens, while rare or unseen words are gracefully decomposed into recognizable subword pieces.

Subword tokenization elegantly solves the fixed vocabulary constraint by decoupling the computational vocabulary size from the lexical coverage. The model maintains a small, highly efficient softmax layer, yet it can represent an infinite variety of words. As shown by Bennamoun et al., subword tokenization can reduce the required vocabulary size by up to 90% without sacrificing semantic accuracy, making it the foundational standard for how modern language models process text.

Key Foundational Work

Bayesian Language Modelling of German Compounds (2012) — contributed 1 concept elements to this direction.
Improved neural network based language modelling and adaptation (2010) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_out_of_vocabulary_problem_5556a582,
  title = {out-of-vocabulary problem},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/out-of-vocabulary-problem/rdr_5556a58215b9420db42a42fec53cf476},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-23},
}

This exact version (version 1, frozen text):

@misc{lacuna_out_of_vocabulary_problem_5556a582_v1,
  title = {out-of-vocabulary problem},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/out-of-vocabulary-problem/rdr_5556a58215b9420db42a42fec53cf476/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-23},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake