arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.16607cs.CLcs.LG
收藏

数据混合推断:BPE分词器揭示了其训练数据的哪些信息?

Data Mixture Inference: What do BPE Tokenizers Reveal about their Training Data?

University of Washington(华盛顿大学);Allen Institute for AI(艾伦人工智能研究所)

Jonathan Hayase, Alisa Liu, Yejin Choi, Sewoong Oh, Noah A. Smith

AI总结:

针对预训练数据不透明问题,本研究基于BPE分词器的合并规则构建线性规划模型实现数据混合推断,高精度恢复训练数据比例,应用于现成分词器验证公开信息并得出多语言性等新推断。

摘要:

当今最强大语言模型的预训练数据不透明,尤其是其包含的不同领域或语言的比例鲜为人知。本研究针对“数据混合推断”任务展开,旨在揭示训练数据的分布构成。我们基于一个此前被忽视的信息源——字节对编码(BPE)分词器(现代绝大多数语言模型均使用),提出一种新型攻击方法。核心洞见是:BPE分词器学习的有序合并规则列表,自然揭示了其训练数据中的token频率信息。给定分词器的合并列表及每个目标类别的示例数据,我们构建线性规划模型以求解训练集中各类别的比例。在受控实验中,我们的方法对基于已知自然语言、编程语言和数据源混合训练的分词器,能高精度恢复混合比例。随后,我们将该方法应用于近期语言模型发布的现成分词器,验证了大量公开披露的模型信息,并得出多项新推断:GPT-4o和Mistral NeMo的分词器比其前代更具多语言性,分别在39%和47%的非英语语言数据上训练;Llama 3扩展GPT-3.5的分词器主要用于多语言(48%)场景;GPT-3.5和Claude的分词器主要在代码(约60%)数据上训练。我们希望本研究能为当前预训练数据设计实践提供启示,并推动语言模型数据混合推断的后续研究。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑