CharBERT: Character-aware Pre-trained Language Model

Wentao Ma, Yiming Cui, Chenglei Si, Ting Liu, Shijin Wang +1 more
11/3/2020
cs.CL

Official code: mawentao277/CharBERT (124 stars, Python, Apache-2.0, last commit 2021-01-28).

Abstract

Most pre-trained language models (PLMs) construct word representations at subword level with Byte-Pair Encoding (BPE) or its variations, by which OOV (out-of-vocab) words are almost avoidable. However, those methods split a word into subword units and make the representation incomplete and fragile.

Show full abstract

In this paper, we propose a character-aware pre-trained language model named CharBERT improving on the previous methods (such as BERT, RoBERTa) to tackle these problems. We first construct the contextual word embedding for each token from the sequential character representations, then fuse the representations of characters and the subword representations by a novel heterogeneous interaction module. We also propose a new pre-training task named NLM (Noisy LM) for unsupervised character representation learning. We evaluate our method on question answering, sequence labeling, and text classification tasks, both on the original datasets and adversarial misspelling test sets. The experimental results show that our method can significantly improve the performance and robustness of PLMs simultaneously. Pretrained models, evaluation sets, and code are available at https://github.com/wtma/CharBERT

View on arXivView PDF

Code Implementations(1)

Apache-2.0

CharBERT: Character-aware Pre-trained Language Model (COLING2020)

12427Python, ShellOct 26, 20205 years agoApache-2.0

Similar Papers

Cite this paper

@article{ma2020charbert,
  title  = {CharBERT: Character-aware Pre-trained Language Model},
  author = {Wentao Ma and Yiming Cui and Chenglei Si and Ting Liu and Shijin Wang and Guoping Hu},
  year   = {2020},
  eprint = {2011.01513},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2011.01513}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2011.01513.svg)](https://codeofpaper.com/paper/2011.01513)

Discussion