AI Glossary / Graphs and symbolic AI / Intermediate
Out of vocabulary
Definition
Out of vocabulary (OOV) describes an input item that is absent from a system's specified vocabulary. In language processing, this often means a word is missing from a fixed word-level vocabulary, although the relevant unit may instead be a character, subword or symbol.
What it means
A vocabulary is the set of units a system can represent directly. A word-based model might know “paint” but lack “repaints.” If its input handling replaces every unfamiliar word with one unknown symbol, several different words become indistinguishable at that point.
OOV is relative to a particular vocabulary and preprocessing procedure. Capitalization, spelling, normalization and the treatment of punctuation can change whether an item matches. A word absent from a word-level vocabulary may still be representable through smaller pieces.
This is different from a model lacking knowledge about a concept. Representing the spelling of a scientific term does not demonstrate understanding it. Conversely, failing to find a whole-word entry does not mean a subword-based model must discard the word.
How it works
A traditional word tokenizer splits text into words and looks up each item in a vocabulary. An absent item may be mapped to a reserved unknown token, handled through a fallback mechanism or rejected, depending on the application.
Subword methods construct words from reusable pieces. A segmentation could represent “repaints” as “re,” “paint” and “s,” if those pieces exist. The exact pieces depend on the tokenizer; this illustrative split is not a claim about a particular deployed model.
Character and byte mechanisms can broaden coverage, but their guarantees depend on the complete encoding and normalization pipeline. They also change sequence lengths. More pieces can mean additional computation and less text fitting within a fixed token budget.
Evaluation therefore distinguishes whole-word coverage, unknown-token frequency and downstream task performance. Improving one does not automatically improve the others.
Three practical examples
- A support classifier encounters a new product name that its fixed word vocabulary maps to an unknown token.
- A translation system uses subword pieces to represent an unfamiliar compound rather than replacing the whole compound with one unknown symbol.
- A document-processing team measures vocabulary coverage separately for ordinary text, identifiers and spelling errors before choosing an input strategy.
Think of it this way
Think of assembling unfamiliar names from a box of letter tiles. The box need not contain a single tile for every possible name if its smaller pieces can construct the spelling.
The analogy has limits. Actual tokenizers may use multi-character pieces, normalization rules and byte representations. Being able to assemble the tiles also says nothing about understanding the person, place or product that the name refers to.
Worked example
Suppose an invented word vocabulary contains “the,” “robot,” “paint,” “blue” and “box.” Consider the six-word sentence: “the robot repaints the blue box.” Its word occurrences are the, robot, repaints, the, blue and box. Count these occurrences separately from the distinct word types when computing coverage.
Only “repaints” is absent, so the occurrence-based OOV rate is 1/6, about 16.7%. There are five distinct word types, of which one is absent, giving a type-based rate of 1/5, or 20%.
Now extend a toy subword vocabulary with “re” and “s.” The sentence becomes eight pieces: the, robot, re, paint, s, the, blue, box. Every piece is represented, but the sequence is longer. No translation or comprehension score has been measured.
These invented numbers show why reports must state their counting unit and denominator. A lower unknown-token rate alone is not evidence of better language understanding.
Illustrative case study
The fictional Cedar Language team builds a classifier for equipment messages. Its vocabulary covers common messages, but new model numbers are repeatedly replaced by the same unknown symbol. This prevents the classifier from distinguishing information that the original text contains.
The team compares its word-based pipeline with a subword alternative using a held-out set of messages. It checks model-number preservation, token counts and classification errors, including messages from products absent during training.
Cedar retains exact identifiers in a separate field where the workflow requires exact matching. Its fictional decision illustrates complementary handling of vocabulary coverage and business data; it does not establish that subword processing always wins.
Common misconceptions and mistakes
- OOV means the concept is unknowable. The term concerns a representation vocabulary, not a universal limit on reasoning.
- Zero unknown tokens proves understanding. A system can encode every character and still misinterpret the text.
- All OOV rates are comparable. Word types, word occurrences and tokenizer pieces use different denominators.
- Every unfamiliar word should be corrected. A new name or valid identifier may look unfamiliar without being erroneous.
Business use
Vocabulary coverage matters when products, names, languages and writing styles differ from training data. Report results by relevant input group instead of relying solely on an overall average that can hide poor coverage of important identifiers.
Before changing a tokenizer, evaluate downstream accuracy, exact-string preservation, sequence length and compatibility with the model. A trained model's input vocabulary and embeddings are linked; replacing tokenization is generally more involved than editing a word list. Maintain a reproducible preprocessing specification so that coverage measurements can be repeated.
People also ask
Can a common word be OOV?
Yes, if it is missing from the particular vocabulary or preprocessing produces a different form.
Do subwords eliminate every vocabulary problem?
No. They improve representation coverage, but segmentation, normalization, supported symbols and task learning still matter.
Is a rare word always OOV?
No. Rare words can have vocabulary entries, and common words can be absent from a restricted domain vocabulary.
Check your understanding
A report gives one unknown occurrence among six words and one unknown type among five distinct words. Are the two OOV percentages inconsistent?
Answer: No. They measure different things: about 16.7% of occurrences and 20% of types. Both require clearly stated denominators.
Related terms
- Vocabulary
- Tokenization
- Subword Segmentation
- Byte-pair encoding
- Normalization
- Embedding
- unknown token
- rare word
Learn next
Choose a short text containing a new name, an inflected word and an identifier. Apply a documented tokenizer, inspect its pieces and count unknown units. Then separately test whether a model handles each item's meaning and exact spelling correctly.
More in Graphs and symbolic AI
- Ordinal utility function - An ordinal utility function assigns numbers to alternatives so that their ordering represents a decision-maker's preferences.
- Orientation - Orientation describes the direction in which something is aligned relative to a chosen reference.
- Origin function - An origin function, in the BLOG probabilistic modeling language, maps a generated object to an object that participated in its generation.
- Out-of-bag error - Out-of-bag error is an estimate of predictive error obtained by evaluating each training example using only ensemble members whose bootstrap training...
- PAC learning - PAC learning, short for probably approximately correct learning, is a mathematical framework for studying when an algorithm can learn a predictor from...
- Parameter independence - Parameter independence is an assumption that specified groups of uncertain model parameters are probabilistically independent.
Sources
Sennrich, Haddow and Birch explain subword units for rare and unseen words in neural translation: https://aclanthology.org/P16-1162.pdf
SentencePiece's maintained project documentation describes its tokenizer approach and vocabulary handling: https://github.com/google/sentencepiece
The vocabulary, counts and Cedar Language case are original teaching examples. The cited translation research supports the representation distinction, not a universal performance guarantee.
Previous: Out-of-core Next: Outage probability