Lune

EMNLP2024Top-tier venue

How to Compute the Probability of a Word

Tiago Pimentel, Clara Meister

Abstract

Language models (LMs) estimate a probability distribution over strings in a natural language; these distributions are crucial for computing perplexity and surprisal in linguistics research. While we are usually concerned with measuring these values for words, most LMs operate over subwords. Despite seemingly straightforward, accurately computing probabilities over one unit given probabilities over the other requires care. Indeed, we show here that many recent linguistic studies have been incorrectly computing these values. This paper derives the correct methods for computing word probabilities, highlighting issues when relying on language models that use beginning-of-word (bow)-marking tokenisers, e.g., the GPT family. Empirically, we show that correcting the widespread bug in probability computations affects measured outcomes in sentence comprehension and lexical optimisation analyses. tpimentelms/probability-of-a-word pip install wordsprobability

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

17 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • The Impact of Token Granularity on the Predictive Power of Language Model Surprisal cites Tokenization and the Noiseless Channel
  • Sampling from Your Language Model One Byte at a Time cites Universal Cross-Tokenizer Distillation via Approximate Likelihood Matching
  • Sampling from Your Language Model One Byte at a Time cites You should evaluate your language model on marginal likelihood over tokenisations
  • Cross-Tokenizer Likelihood Scoring Algorithms for Language Model Distillation cites Universal Cross-Tokenizer Distillation via Approximate Likelihood Matching
  • Cross-Tokenizer Likelihood Scoring Algorithms for Language Model Distillation cites Sampling from Your Language Model One Byte at a Time
  • Tokenisation is NP-Complete cites Tokenization and the Noiseless Channel
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers17

  1. Universal Cross-Tokenizer Distillation via Approximate Likelihood MatchingBenjamin Minixhofer, Ivan Vulic, Edoardo Maria PontiNeurIPS 2025 · 48 citations
  2. Sampling from Your Language Model One Byte at a TimeJonathan Hayase, Alisa Liu, Noah Smith, Sewoong OhICML 2026 · 9 citations
  3. The Impact of Token Granularity on the Predictive Power of Language Model SurprisalByung-Doh Oh, William SchulerACL 2025 · 7 citations
  4. Tokenisation is NP-CompletePhilip Whittington, Gregor Bachmann, Tiago PimentelACL 2025 · 6 citations
  5. Cross-Tokenizer Likelihood Scoring Algorithms for Language Model DistillationBuu Phan, Ashish Khisti, Karen UllrichICLR 2026 · 5 citations

Builds on6

  1. Transformer-Based Language Model Surprisal Predicts Human Reading Times Best with About Two Billion Training TokensByung-Doh Oh, William SchulerEMNLP Findings 2023 · 21 citations
  2. Tokenization and the Noiseless ChannelVilém Zouhar, Clara Meister, Juan Luis Gastaldi, Li Du et al.ACL 2023 · 10 citations
  3. A Measure-Theoretic Characterization of Tight Language ModelsLi Du, Lucas Torroba Hennigen, Tiago Pimentel, Clara Meister et al.ACL 2023 · 8 citations
  4. You should evaluate your language model on marginal likelihood over tokenisationsKris Cao, Laura RimellEMNLP 2021 · 6 citations
  5. Revisiting the Optimality of Word LengthsTiago Pimentel, Clara Meister, Ethan Wilcox, Kyle Mahowald et al.EMNLP 2023 · 5 citations

Related papers

  1. Clozing the Gap: Exploring Why Language Model Surprisal Outperforms Cloze SurprisalSathvik Nair, Byung-Doh OhACL 2026 · 1 citation
  2. Temperature-scaling surprisal estimates improve fit to human reading times - but does it do so for the "right reasons"?Tong Liu, Iza Skrjanec, Vera DembergACL 2024 · 3 citations
  3. Causal Estimation of Tokenisation BiasPietro Lesci, Clara Meister, Thomas Hofmann, Andreas Vlachos et al.ACL 2025
  4. On the Proper Treatment of Tokenization in PsycholinguisticsMario Giulianelli, Luca Malagutti, Juan Luis Gastaldi, Brian DuSell et al.EMNLP 2024 · 2 citations
  5. Are Language Models Any Good at Density Modeling?Sriram Ranga, Sai Shashank Bedampeta, Rui Mao, Anupam ChattopadhyayAAAI 2026
Dusk over the sea between two cliffs drawn in fine vertical lines