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.
BPE Gets Picky: Efficient Vocabulary Refinement During Tokenizer Training
Center for Artificial Intelligence, Technical University of Applied Sciences Würzburg-Schweinfurt(维尔茨堡-施韦因富特应用技术大学人工智能中心);PleIAs;Institute of Computer Science, University of Tartu(塔尔图大学计算机科学研究所);University of California, San Diego(加利福尼亚大学圣迭戈分校)
Memorization in Large Language Models in Medicine: Prevalence, Characteristics, and Implications
Yale University(耶鲁大学);Imperial College London(帝国理工学院);University of Texas Health Science at Houston(德克萨斯大学休斯顿健康科学中心);University of California, San Diego(加利福尼亚大学圣迭戈分校);National Library of Medicine, National Institutes of Health(美国国立卫生研究院国家医学图书馆);Vanderbilt University Medical Center(范德堡大学医学中心);Vanderbilt University(范德堡大学);National University of Singapore(新加坡国立大学)