On the Effect of (Near) Duplicate Subwords in Language Modelling

Anton Schäfer, Thomas Hofmann, Imanol Schlag, Tiago Pimentel


Abstract
Tokenisation is a core part of language models (LMs). It involves splitting a character sequence into subwords which are assigned random indices before being served to the LM. However, this process—while typically lossless—may lead to less efficient LM training, because it removes character-level information, thereby making it more difficult to generalise across similar subwords, such as *now* and *Now*. We refer to such subwords as **near duplicates**. In this paper, we study the impact of near duplicate subwords on LM training efficiency. First, we design an experiment that gives us an upper bound to how much we should expect a model to improve if we could perfectly generalise across near duplicates. We do this, by duplicating each token in our LM’s vocabulary, creating perfectly equivalent classes of subwords. Experimentally, we find that LMs need roughly 17% more data when trained in a fully duplicated setting. Second, we investigate the impact of naturally occurring near duplicates on LMs. Here, we see that deduplicating them considerably hurts LM performance; but that this loss in performance can be easily mitigated.
Anthology ID:
2024.findings-acl.571
Volume:
Findings of the Association for Computational Linguistics ACL 2024
Month:
August
Year:
2024
Address:
Bangkok, Thailand and virtual meeting
Editors:
Lun-Wei Ku, Andre Martins, Vivek Srikumar
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
9580–9597
Language:
URL:
https://aclanthology.org/2024.findings-acl.571
DOI:
Bibkey:
Cite (ACL):
Anton Schäfer, Thomas Hofmann, Imanol Schlag, and Tiago Pimentel. 2024. On the Effect of (Near) Duplicate Subwords in Language Modelling. In Findings of the Association for Computational Linguistics ACL 2024, pages 9580–9597, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics.
Cite (Informal):
On the Effect of (Near) Duplicate Subwords in Language Modelling (Schäfer et al., Findings 2024)
Copy Citation:
PDF:
https://aclanthology.org/2024.findings-acl.571.pdf