paper-with-me

홈 › Papers

Understanding and Mitigating Tokenization Bias in Language Models

2024-06-24 · Buu Phan, Marton Havasi, Matthew Muckley, Karen Ullrich

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 popular encoding schemes, such as maximum prefix encoding (MPE) and byte-pair-encoding (BPE), induce a sampling bias that cannot be mitigated with more training or data. To counter this universal problem, for each encoding scheme above, we propose a novel algorithm to obtain unbiased estimates from any language model trained on tokenized data. Our methods do not require finetuning the model, and the complexity, defined as the number of model runs, scales linearly with the sequence length in the case of MPE. As a result, 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.

📄 PDF Abstract BibTeX arXiv:2406.16829

Code (0)

등록된 구현이 없습니다.

Tasks

Language ModelingLanguage Modelling

Similar Papers 제목 키워드 기반

Investigating Societal Biases in a Poetry Composition System

2020-11-05 · GeBNLP (COLING) 2020 12 · Emily Sheng, David Uthus

There is a growing collection of work analyzing and mitigating societal biases in language understanding, generation, and retrieval tasks, though examining biases in creative tasks remains underexplored. Creative languag…

Data AugmentationRetrievalStyle Transfer

Decoupling the Benefits of Subword Tokenization for Language Model Training via Byte-level Simulation

2026-04-29 · Théo Gigant, Bowen Peng, Jeffrey Quesnelle arxiv

Subword tokenization is an essential part of modern large language models (LLMs), yet its specific contributions to training efficiency and model performance remain poorly understood. In this work, we decouple the effect…

Understanding Secret Leakage Risks in Code LLMs: A Tokenization Perspective

2026-04-20 · Meifang Chen, Zhe Yang, Huang Nianchen, Yizhan Huang 외 arxiv

Code secrets are sensitive assets for software developers, and their leakage poses significant cybersecurity risks. While the rapid development of AI code assistants powered by Code Large Language Models (CLLMs), CLLMs a…

Weight-based Analysis of Detokenization in Language Models: Understanding the First Stage of Inference Without Inference

2025-01-27 · Go Kamoda, Benjamin Heinzerling, Tatsuro Inaba, Keito Kudo 외

According to the stages-of-inference hypothesis, early layers of language models map their subword-tokenized input, which does not necessarily correspond to a linguistically meaningful segmentation, to more meaningful re…

A Predictive Factor Analysis of Social Biases and Task-Performance in Pretrained Masked Language Models

2023-10-19 · Yi Zhou, Jose Camacho-Collados, Danushka Bollegala

Various types of social biases have been reported with pretrained Masked Language Models (MLMs) in prior work. However, multiple underlying factors are associated with an MLM such as its model size, size of the training …