An Analysis of BPE Vocabulary Trimming in Neural Machine Translation
Marco Cognetta, Tatsuya Hiraoka, Naoaki Okazaki, Rico Sennrich, Yuval Pinter
TL;DR
The paper investigates the common practice of trimming rare subwords from Byte-Pair Encoding vocabularies in neural machine translation. Using a controlled Transformer setup on the IWSLT14 German-English task (and a larger EN-FR dataset), it evaluates ten hypotheses across split and joint vocabularies, multiple base sizes, and various thresholds, always comparing trimmed vs baseline models. Across extensive experiments, trimming rarely improves BLEU and often degrades performance, with only isolated marginal gains under specific configurations; in many cases, trimming reduces effective vocabulary size and increases sequence length without commensurate gains. The findings suggest that, in transformer-based MT, the practical benefits of vocabulary trimming (parameter reduction, robustness) do not offset the adverse effects on modeling quality, and the practice should be deprioritized in favor of maintaining robust, larger vocabularies when feasible. The work also contextualizes trimming historically, arguing that benefits prominent in older architectures do not translate to modern large-scale models.
Abstract
We explore threshold vocabulary trimming in Byte-Pair Encoding subword tokenization, a postprocessing step that replaces rare subwords with their component subwords. The technique is available in popular tokenization libraries but has not been subjected to rigorous scientific scrutiny. While the removal of rare subwords is suggested as best practice in machine translation implementations, both as a means to reduce model size and for improving model performance through robustness, our experiments indicate that, across a large space of hyperparameter settings, vocabulary trimming fails to improve performance, and is even prone to incurring heavy degradation.
