Data Mixture Inference Attack: BPE Tokenizers Reveal Training Data Compositions
Jonathan Hayase, Alisa Liu, Yejin Choi, Sewoong Oh, Noah A. Smith
摘要
The pretraining data of today's strongest language models is opaque; in particular, little is known about the proportions of various domains or languages represented. In this work, we tackle a task which we call data mixture inference, which aims to uncover the distributional make-up of training data. We introduce a novel attack based on a previously overlooked source of information: byte-pair encoding (BPE) tokenizers, used by the vast majority of modern language models. Our key insight is that the ordered list of merge rules learned by a BPE tokenizer naturally reveals information about the token frequencies in its training data. Given a tokenizer's merge list along with example data for each category of interest, we formulate a linear program that solves for the proportion of each category in the tokenizer's training set. In controlled experiments, we show that our attack recovers mixture ratios with high precision for tokenizers trained on known mixtures of natural languages, programming languages, and data sources. We then apply our approach to off-the-shelf tokenizers released with recent LMs. We confirm much publicly disclosed information about these models, and also make several new inferences: GPT-4O and MISTRAL NEMO's tokenizers are much more multilingual than their predecessors, training on 39% and 47% non-English language data, respectively; LLAMA 3 extends GPT-3.5's tokenizer primarily for multilingual (48%) use; GPT-3.5's and CLAUDE's tokenizers are trained on predominantly code (∼ 60%). We hope our work sheds light on current design practices for pretraining data, and inspires continued research into data mixture inference for LMs. 1 1 Code and detailed inferences available at https://github.com/alisawuffles/tokenizer-attack .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 7 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Exploiting Unintended Feature Leakage in Collaborative Learning 引用了 Membership Inference Attacks Against Machine Learning Models
- Exploiting Vocabulary Frequency Imbalance in Language Model Pre-training 引用了 Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling
- Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling 引用了 Extracting Training Data from Large Language Models
- Natural Identifiers for Privacy and Data Audits in Large Language Models 引用了 Membership Inference Attacks Against Machine Learning Models
- Natural Identifiers for Privacy and Data Audits in Large Language Models 引用了 Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling
- Natural Identifiers for Privacy and Data Audits in Large Language Models 引用了 Membership Inference Attacks From First Principles
- Natural Identifiers for Privacy and Data Audits in Large Language Models 引用了 Extracting Training Data from Large Language Models
- Membership Inference Attacks From First Principles 引用了 Exploiting Unintended Feature Leakage in Collaborative Learning
- Membership Inference Attacks From First Principles 引用了 Membership Inference Attacks Against Machine Learning Models
- Membership Inference Attacks From First Principles 引用了 Extracting Training Data from Large Language Models
- Extracting Training Data from Large Language Models 引用了 Membership Inference Attacks Against Machine Learning Models
引用它的顶会 Paper7
- Dynamic Chunking for End-to-End Hierarchical Sequence ModelingSukjun Hwang, Brandon Wang, Albert GuICLR 2026 · 76 次引用
- Exploiting Vocabulary Frequency Imbalance in Language Model Pre-trainingWoojin Chung, Jeonghoon KimNeurIPS 2025 · 6 次引用
- Natural Identifiers for Privacy and Data Audits in Large Language ModelsLorenzo Rossi, Bartlomiej Marek, Franziska Boenisch, Adam DziedzicICLR 2026 · 3 次引用
- Beyond Text Compression: Evaluating Tokenizers Across ScalesJonas F. Lotz, António Vilarinho Lopes, Stephan Peitz, Hendra Setiawan 等ACL 2025 · 3 次引用
- MUTANT: A Recipe for Multilingual Tokenizer DesignSouvik Rana, Ashish Kulkarni, Arul Menezes, Chandra Khatri 等ACL 2026 · 2 次引用
它引用的 Paper22
- Membership Inference Attacks Against Machine Learning ModelsReza Shokri, Marco Stronati, Congzheng Song, Vitaly ShmatikovS&P 2017 · 5,137 次引用
- Extracting Training Data from Large Language ModelsNicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski 等USENIX Security 2021 · 2,866 次引用
- Pythia: A Suite for Analyzing Large Language Models Across Training and ScalingStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley 等ICML 2023 · 1,822 次引用
- Exploiting Unintended Feature Leakage in Collaborative LearningLuca Melis, Congzheng Song, Emiliano De Cristofaro, Vitaly ShmatikovS&P 2019 · 1,736 次引用
- Membership Inference Attacks From First PrinciplesNicholas Carlini, Steve Chien, Milad Nasr, Shuang Song 等S&P 2022 · 1,049 次引用
相关 Paper
- Train It and Forget It: Merge Lists are Unnecessary for BPE Inference in Language ModelsTomohiro Sawada, Kartik GoyalEMNLP 2025
- From Where Words Come: Efficient Regularization of Code Tokenizers Through Source AttributionPavel Chizhov, Egor Bogomolov, Ivan P. YamshchikovACL 2026
- Context-Aware Membership Inference Attacks against Pre-trained Large Language ModelsHongyan Chang, Ali Shahin Shamsabadi, Kleomenis Katevas, Hamed Haddadi 等EMNLP 2025 · 19 次引用
- Membership Inference Attacks on Tokenizers of Large Language ModelsMeng Tong, Yuntao Du, Kejiang Chen, Weiming Zhang 等USENIX Security 2026
- Retrofitting Large Language Models with Dynamic TokenizationDarius Feher, Ivan Vulic, Benjamin MinixhoferACL 2025
