Causal Estimation of Tokenisation Bias

要約

現代の言語モデルは通常、サブワード列に対して学習されるが、最終的には文字列に対して確率を定義する。理想的には、トークナイザー(文字列をサブワードにマップする)の選択は、基礎となる文字列に割り当てられる確率に影響を与えるべきではない。このミスマッチをトークン化バイアスと定義する。この研究では、トークン化バイアスの1つの特殊なタイプを定量化する。トークン化器の語彙にサブワード(例えば、$langle hello \rangle$)を含めるか含めないかが、学習済みモデルが対応する文字(例えば、 \textit{“hello”})に割り当てる確率に与える影響である。各モデルが1つのトークナイザーのみで学習されるため、この効果を推定するのは困難である。我々は、トークン化バイアスを因果効果として設定し、回帰不連続デザインを使って推定することで、この問題に対処する。具体的には、トークン化アルゴリズムがサブワードをランク付けし、最初の$K$をトークナイザーの語彙に加えるという事実を利用する。K$は任意のカットオフポイントである。このように、このカットオフポイント付近で類似したサブワードを比較することで、因果効果を推定することができる。実験的に、トークン化はスケール、語彙、トークナイザーを問わず、一貫してモデルの出力に影響を与えることがわかった。注目すべきは、小さなモデルの語彙にサブワードが存在すると、その文字の確率が最大17倍まで増加する可能性があることで、トークン化が言語モデリングにおける重要な設計上の選択であることを強調している。

要約(オリジナル)

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.

arxiv情報

著者 Pietro Lesci,Clara Meister,Thomas Hofmann,Andreas Vlachos,Tiago Pimentel
発行日 2025-06-03 17:59:47+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.AI, cs.CL, cs.LG パーマリンク