atlas

Research map / Large language models / Language, safety and interpretability

Data Mixture Inference Attack: BPE Tokenizers Reveal Training Data Compositions

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: Pruning and circuits in LLMs · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces data mixture inference, a linear-programming attack that recovers the language, code, and domain proportions of a BPE tokenizer's training data from its ordered merge list.

Problem

Pretraining data mixtures of modern LMs are undisclosed, and membership inference attacks target instances or authors rather than global corpus proportions.

Approach

The ordered BPE merge list reveals token-pair frequencies in the training data: each merge must be the most frequent pair at its step. Given sample corpora per category, the attack formulates a relaxed linear program whose constraints encode these inequalities and solves for category proportions, using lazy constraint and variable generation to scale.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use ordered BPE merge constraints instead of random guessingData mixture inference · Natural language mixtures (n=5)log10(MSE): −1.39±0.36 -> −7.30±1.31Helped
Use ordered BPE merge constraints instead of tokenizer encoding efficiencyData mixture inference · Natural language mixtures (n=5)log10(MSE): −2.02±0.41 -> −7.30±1.31Helped
Use ordered BPE merge constraints instead of token classificationData mixture inference · Natural language mixtures (n=5)log10(MSE): −2.12±0.49 -> −7.30±1.31Helped
Use ordered BPE merge constraints instead of tokenizer encoding efficiencyData mixture inference · Programming language mixtures (n=5)log10(MSE): −2.54±0.42 -> −6.46±0.79Helped
Use ordered BPE merge constraints instead of token classificationData mixture inference · Programming language mixtures (n=5)log10(MSE): −1.92±0.36 -> −6.46±0.79Helped
Use ordered BPE merge constraints instead of tokenizer encoding efficiencyData mixture inference · Domain mixtures (n=5)log10(MSE): −1.69±0.29 -> −3.74±0.94Helped
Use ordered BPE merge constraints instead of token classificationData mixture inference · Domain mixtures (n=5)log10(MSE): −1.64±0.35 -> −3.74±0.94Helped
Estimate merge frequencies from Wikipedia rather than the tokenizer training domain (ablation)Data mixture inference · 10-language mixtureslog MSE: −7.66 -> −3.53Hurt
Use character-level rather than byte-level BPE (ablation)Data mixture inference · 10-language mixtureslog MSE: −7.65 -> −4.09Hurt
Increase sampled data per category for merge-frequency estimates (ablation)Data mixture inference · Mixtures of n=5 categoriesMSEHelped
Increase the number of merges considered (ablation)Data mixture inference · Controlled mixturesMSEHelped
Omit categories from the inference solver (ablation)Data mixture inference · 112-language mixturesMSEHurt

Surprising findings

Limitations

Experimental setup

Datasets: OSCAR v23.01 RedPajama (GitHub, Wikipedia, Common Crawl, Books, ArXiv splits)

Benchmarks: Controlled mixtures of 112 natural languages, 37 programming languages, and 5 domains Commercial tokenizers of GPT, Llama, Mistral, GPT-NeoX, Claude, Gemma families

Metrics: log10 MSE of estimated mixture proportions

Baselines: Random guessing Tokenizer Encoding Efficiency (TEE) Token Classification (TC)

Builds on: byte-pair encoding (Sennrich et al.) membership inference attacks distribution inference attacks

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy