arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.02782cs.CL
收藏

BPE如何影响Transformers中的绝缘

How BPE Affects Memorization in Transformers

Facebook AI;ICREA(加泰罗尼亚研究与高级研究院)

Eugene Kharitonov, Marco Baroni, Dieuwke Hupkes

摘要:

NLP中的训练数据记忆都是有益的(例如,不公开的QA)和不受欢迎的(个人数据提取)。在任何情况下,成功的模型训练都需要大量的记忆来存储单词拼写,各种语言特性和常识。然而,很少有人知道是什么影响了NLP模型的记忆行为,因为该领域倾向于关注同样重要的泛化问题。在这项工作中,我们证明了字节对编码(BPE)学习的子词词汇的大小极大地影响了标准Transformer模型记忆训练数据的能力和趋势,即使我们控制学习参数的数量。我们发现,与一个大的子词词汇量的大小,Transformer模型适合随机映射更容易,更容易受到成员推断攻击。类似地,在给定提示的情况下,具有大型子词词汇表的基于transformer的语言模型更频繁地再现训练数据。我们推测这种效应是由于BPE词汇量增加时序列长度减少造成的。我们的研究结果可以允许更明智地选择超参数,这是更好地为特定的用例量身定制。

英文摘要:

Training data memorization in NLP can both be beneficial (e.g., closed-book QA) and undesirable (personal data extraction). In any case, successful model training requires a non-trivial amount of memorization to store word spellings, various linguistic idiosyncrasies and common knowledge. However, little is known about what affects the memorization behavior of NLP models, as the field tends to focus on the equally important question of generalization. In this work, we demonstrate that the size of the subword vocabulary learned by Byte-Pair Encoding (BPE) greatly affects both ability and tendency of standard Transformer models to memorize training data, even when we control for the number of learned parameters. We find that with a large subword vocabulary size, Transformer models fit random mappings more easily and are more vulnerable to membership inference attacks. Similarly, given a prompt, Transformer-based language models with large subword vocabularies reproduce the training data more often. We conjecture this effect is caused by reduction in the sequences' length that happens as the BPE vocabulary grows. Our findings can allow a more informed choice of hyper-parameters, that is better tailored for a particular use-case.

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

↑