Causal Estimation of Tokenisation Bias

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Lesci, Pietro, Meister, Clara, Hofmann, Thomas, Vlachos, Andreas, Pimentel, Tiago
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866915322296008704
author Lesci, Pietro
Meister, Clara
Hofmann, Thomas
Vlachos, Andreas
Pimentel, Tiago
author_facet Lesci, Pietro
Meister, Clara
Hofmann, Thomas
Vlachos, Andreas
Pimentel, Tiago
contents Modern language models are typically trained over subword sequences, but ultimately define probabilities over character-strings. Ideally, the choice of the tokeniser -- which maps character-strings to subwords -- should not affect the probability assigned to the underlying character-string; in practice, it does. We define this mismatch as tokenisation bias. In this work, we quantify one particular type of tokenisation bias: the effect of including or not a subword (e.g., $\langle hello \rangle$) in a tokeniser's vocabulary on the probability a trained model assigns to the corresponding characters (i.e., \textit{``hello''}). Estimating this effect is challenging because each model is trained with only one tokeniser. We address this by framing tokenisation bias as a causal effect and estimating it using the regression discontinuity design. Specifically, we exploit the fact that tokenisation algorithms rank subwords and add the first $K$ to a tokeniser's vocabulary, where $K$ is an arbitrary cutoff point. As such, we can estimate a causal effect by comparing similar subwords around this cutoff. Experimentally, we find that tokenisation consistently affects models' outputs across scales, vocabularies, and tokenisers. Notably, a subword's presence in a small model's vocabulary may increase its characters' probability by up to 17 times, highlighting tokenisation as a key design choice in language modelling.
format Preprint
id arxiv_https___arxiv_org_abs_2506_03149
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Causal Estimation of Tokenisation Bias
Lesci, Pietro
Meister, Clara
Hofmann, Thomas
Vlachos, Andreas
Pimentel, Tiago
Computation and Language
Artificial Intelligence
Machine Learning
Modern language models are typically trained over subword sequences, but ultimately define probabilities over character-strings. Ideally, the choice of the tokeniser -- which maps character-strings to subwords -- should not affect the probability assigned to the underlying character-string; in practice, it does. We define this mismatch as tokenisation bias. In this work, we quantify one particular type of tokenisation bias: the effect of including or not a subword (e.g., $\langle hello \rangle$) in a tokeniser's vocabulary on the probability a trained model assigns to the corresponding characters (i.e., \textit{``hello''}). Estimating this effect is challenging because each model is trained with only one tokeniser. We address this by framing tokenisation bias as a causal effect and estimating it using the regression discontinuity design. Specifically, we exploit the fact that tokenisation algorithms rank subwords and add the first $K$ to a tokeniser's vocabulary, where $K$ is an arbitrary cutoff point. As such, we can estimate a causal effect by comparing similar subwords around this cutoff. Experimentally, we find that tokenisation consistently affects models' outputs across scales, vocabularies, and tokenisers. Notably, a subword's presence in a small model's vocabulary may increase its characters' probability by up to 17 times, highlighting tokenisation as a key design choice in language modelling.
title Causal Estimation of Tokenisation Bias
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2506.03149