Understanding and Mitigating Tokenization Bias in Language Models

要約

最先端の言語モデルは自己回帰的であり、トークンとして知られるサブワード単位で動作します。
具体的には、次のトークンの予測のために言語モデルに渡す前に、条件付け文字列をトークンのリストにエンコードする必要があります。
最大プレフィックス マッチングなどのエンコード スキームの場合、トークン化によりサンプリング バイアスが誘発され、トレーニングやデータを増やしても軽減できないことを示します。
この普遍的な問題に対処するために、トークン化されたデータでトレーニングされたモデルから不偏の推定値を取得する新しいアルゴリズムを提案します。
私たちの方法ではモデルを微調整する必要がなく、モデルの実行数として定義されるその複雑さはシーケンスの長さに比例して増加します。
結果として、トークン化された言語モデルからトークンフリーの動作をシミュレートできることを示します。
トークンを言語モデルに直接プロンプトする従来の方法とは対照的に、マルコフチェーン設定を通じてこの方法の正しさを経験的に検証し、遷移確率を正確に回復します。

要約(オリジナル)

State-of-the-art language models are autoregressive and operate on subword units known as tokens. Specifically, one must encode the conditioning string into a list of tokens before passing to the language models for next-token prediction. We show that, for encoding schemes such as maximum prefix matching, tokenization induces a sampling bias that cannot be mitigated with more training or data. To counter this universal problem, we propose a novel algorithm to obtain unbiased estimates from a model that was trained on tokenized data. Our method does not require finetuning the model, and its complexity, defined as the number of model runs, scales linearly with the sequence length. As a consequence, we show that one can simulate token-free behavior from a tokenized language model. We empirically verify the correctness of our method through a Markov-chain setup, where it accurately recovers the transition probabilities, as opposed to the conventional method of directly prompting tokens into the language model.

arxiv情報

著者 Buu Phan,Marton Havasi,Matthew Muckley,Karen Ullrich
発行日 2024-06-24 17:38:02+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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