Papers › CharBERT: Character-aware Pre-trained Language Model

CharBERT: Character-aware Pre-trained Language Model

3 Nov 2020COLING 2020 8arXiv:2011.01513archive 2025-07-28

Wentao Ma, Yiming Cui, Chenglei Si, Ting Liu, Shijin Wang, Guoping Hu

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. 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

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2011.01513")

Code

Syntology Ran 5 of 13 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 2 ran · honoured contract; 2 ran · our draft was wrong; 1 ran with no contract checked.

By repository: official repository: 13 samples from 1 repository, 5 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

wtma/CharBERT officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 5 ran; 2 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
2ran · our draft was wrong
1ran
8unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from wtma/CharBERT. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

gelu wtma/CharBERT/modeling/modeling_bert.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · 211753ba29188d4e · report
gelu_new wtma/CharBERT/modeling/modeling_bert.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · 77601724cad03f95 · report
load_tf_weights_in_bert wtma/CharBERT/modeling/modeling_bert.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 0c145728a35789fa · report
prune_linear_layer wtma/CharBERT/modeling/modeling_utils.py official repository ran · our draft was wrong Apache-2.0 (permissive) · d30d6c3098df2c42 · report
url_to_filename wtma/CharBERT/modeling/file_utils.py official repository ran fingerprinted Apache-2.0 (permissive) · e827d94caab33f59 · report
eval_hit_metrics wtma/CharBERT/run_lm_finetuning.py official repository unverified Apache-2.0 (permissive) · ff19dbac9350f154 · report
hf_bucket_url wtma/CharBERT/modeling/file_utils_roberta.py official repository unverified Apache-2.0 (permissive) · b2be6c932ce41084 · report
hf_bucket_url wtma/CharBERT/modeling/file_utils.py official repository unverified Apache-2.0 (permissive) · 9a10ade1f3205dc9 · report
is_remote_url wtma/CharBERT/modeling/file_utils_roberta.py official repository unverified Apache-2.0 (permissive) · 4381d1f588a7f42a · report
is_remote_url wtma/CharBERT/modeling/file_utils.py official repository unverified Apache-2.0 (permissive) · 2d4e91b11d029045 · report
load_and_cache_examples wtma/CharBERT/run_lm_finetuning.py official repository unverified Apache-2.0 (permissive) · 9db820e8f7a8258b · report
prune_conv1d_layer wtma/CharBERT/modeling/modeling_utils.py official repository unverified Apache-2.0 (permissive) · 7183a17dd79327a8 · report
prune_layer wtma/CharBERT/modeling/modeling_utils.py official repository unverified Apache-2.0 (permissive) · e31093ffc8275cff · report

Tasks

Language ModelingLanguage ModellingQuestion AnsweringRepresentation LearningText Classificationmodeltext-classification

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdamAttentionAttention DropoutBERTDense ConnectionsDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionResidual ConnectionSoftmaxWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections