Skip to main content
QUICK REVIEW

[Paper Review] Char2Subword: Extending the Subword Embedding Space from Pre-trained Models Using Robust Character Compositionality.

Gustavo Aguilar, Bryan McCann|arXiv (Cornell University)|Oct 24, 2020
Natural Language Processing TechniquesComputer Science10 citations
TL;DR

This paper proposes Char2Subword, a character-based subword module that learns subword embeddings from characters, enabling robustness to spelling variations and character-level perturbations while serving as a drop-in replacement for BERT's subword embedding layer. By integrating the module during pre-training with frozen transformer weights, it outperforms multilingual BERT on the LinCE benchmark for linguistic code-switching.

ABSTRACT

Byte-pair encoding (BPE) is a ubiquitous algorithm in the subword tokenization process of language models. BPE provides multiple benefits, such as handling the out-of-vocabulary problem and reducing vocabulary sparsity. However, this process is defined from the pre-training data statistics, making the tokenization on different domains susceptible to infrequent spelling sequences (e.g., misspellings as in social media or character-level adversarial attacks). On the other hand, pure character-level models, though robust to misspellings, often lead to unreasonably large sequence lengths and make it harder for the model to learn meaningful contiguous characters. To alleviate these challenges, we propose a character-based subword transformer module (char2subword) 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 drop-in 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 fixed. We show our method's effectiveness by outperforming a vanilla multilingual BERT on the linguistic code-switching evaluation (LinCE) benchmark.

Motivation & Objective

  • To address the vulnerability of BPE tokenization to out-of-domain spelling variations and character-level perturbations in subword models.
  • To overcome the limitations of pure character-level models, which suffer from long sequence lengths and poor contiguous character learning.
  • To develop a plug-and-play module that enhances subword embedding robustness using character-level compositionality.
  • To maintain BERT’s transformer parameters fixed during pre-training while improving generalization on code-switching and out-of-vocabulary scenarios.
  • To demonstrate improved performance on the LinCE benchmark, a standard for evaluating multilingual code-switching robustness.

Proposed method

  • The Char2Subword module learns subword embeddings by composing representations from individual characters using a learnable character embedding table.
  • It constructs subword representations by aggregating character-level features through a differentiable composition mechanism, such as attention or pooling.
  • The module is inserted as a replacement for the original subword embedding layer in BERT, preserving the transformer architecture and attention mechanisms.
  • During pre-training, only the character and subword embedding tables are updated, while all transformer layers remain frozen to ensure parameter efficiency.
  • The model is fine-tuned on downstream tasks using standard fine-tuning protocols, with the focus on robustness to spelling variations and code-switching.
  • The method enables end-to-end learning of subword representations that are invariant to casing, punctuation, and minor misspellings.

Experimental results

Research questions

  • RQ1Can a character-based subword module improve robustness to spelling variations and character-level perturbations in subword tokenization?
  • RQ2How does the performance of a BERT model enhanced with Char2Subword compare to vanilla multilingual BERT on code-switching benchmarks?
  • RQ3To what extent can a character-level composition mechanism improve subword representation learning without modifying the transformer architecture?
  • RQ4Does maintaining frozen transformer weights during pre-training with Char2Subword preserve or enhance model generalization on low-resource or out-of-domain inputs?

Key findings

  • The Char2Subword module significantly improves robustness to spelling variations, including misspellings, casing changes, and punctuation alterations.
  • The model outperforms vanilla multilingual BERT on the LinCE benchmark, demonstrating superior performance in linguistic code-switching scenarios.
  • The integration of Char2Subword as a drop-in replacement for the subword embedding layer improves downstream performance without requiring fine-tuning of transformer layers.
  • The method maintains high efficiency by keeping all transformer parameters frozen during pre-training, focusing optimization on character and subword embedding tables.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.