Lune

EMNLP Findings2021

Char2Subword: Extending the Subword Embedding Space Using Robust Character Compositionality

Gustavo Aguilar, Bryan McCann, Tong Niu, Nazneen Rajani, Nitish Shirish Keskar, Thamar Solorio

Abstract

Byte-pair encoding (BPE) is a ubiquitous algorithm in the subword tokenization process of language models as it provides multiple benefits. However, this process is solely based on pre-training data statistics, making it hard for the tokenizer to handle infrequent spellings. On the other hand, though robust to misspellings, pure character-level models often lead to unreasonably long sequences and make it harder for the model to learn meaningful words. To alleviate these challenges, we propose a character-based subword module (char2subword) 1 that learns the subword embedding table in pre-trained models like BERT. Our char2subword module builds representations from characters out of the subword vocabulary, and it can be used as a dropin replacement of the subword embedding table. The module is robust to character-level alterations such as misspellings, word inflection, casing, and punctuation. We integrate it further with BERT through pre-training while keeping BERT transformer parameters fixedand thus, providing a practical method. Finally, we show that incorporating our module to mBERT significantly improves the performance on the social media linguistic codeswitching evaluation (LinCE) benchmark. * Work performed as summer intern at Salesforce. ** Work performed as manager while at Salesforce.

Ask Lune

Ask anything. The answer quotes the paper.

Lune reads all of it and the papers around it, then shows you the passages behind every answer.

Questions to start from

Lune answers from

the full paper · 2 top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Cited by top-tier papers2

  1. From Characters to Words: Hierarchical Pre-trained Language Model for Open-vocabulary Language UnderstandingLi Sun, Florian Luisier, Kayhan Batmanghelich, Dinei A. F. Florêncio et al.ACL 2023
  2. Hierarchical Autoregressive Transformers: Combining Byte- and Word-Level Processing for Robust, Adaptable Language ModelsPit Neitemeier, Björn Deiseroth, Constantin Eichenberg, Lukas BallesICLR 2025

Builds on5

  1. Unsupervised Cross-lingual Representation Learning at ScaleAlexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary et al.ACL 2020 · 539 citations
  2. Byte Pair Encoding is Suboptimal for Language Model PretrainingKaj Bostrom, Greg DurrettEMNLP Findings 2020 · 180 citations
  3. Don't Stop Pretraining: Adapt Language Models to Domains and TasksSuchin Gururangan, Ana Marasovic, Swabha Swayamdipta, Kyle Lo et al.ACL 2020 · 93 citations
  4. Robust Encodings: A Framework for Combating Adversarial TyposErik Jones, Robin Jia, Aditi Raghunathan, Percy LiangACL 2020 · 92 citations
  5. From English to Code-Switching: Transfer Learning with Strong Morphological CluesGustavo Aguilar, Thamar SolorioACL 2020 · 1 citation

Related papers

  1. Retrofitting Large Language Models with Dynamic TokenizationDarius Feher, Ivan Vulic, Benjamin MinixhoferACL 2025
  2. From Characters to Tokens: Dynamic Grouping with Hierarchical BPERares Dolga, Lucas Maystre, Tudor Berariu, David BarberEMNLP Findings 2025 · 1 citation
  3. BPE-Dropout: Simple and Effective Subword RegularizationIvan Provilkov, Dmitrii Emelianenko, Elena VoitaACL 2020 · 17 citations
  4. Dynamic Programming Encoding for Subword Segmentation in Neural Machine TranslationXuanli He, Gholamreza Haffari, Mohammad NorouziACL 2020 · 33 citations
  5. MANTa: Efficient Gradient-Based Tokenization for End-to-End Robust Language ModelingNathan Godey, Roman Castagné, Éric de la Clergerie, Benoît SagotEMNLP Findings 2022 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines