Papers › Revisiting Pre-Trained Models for Chinese Natural Language Processing

Revisiting Pre-Trained Models for Chinese Natural Language Processing

29 Apr 2020Findings of the Association for Computational Linguistics 2020arXiv:2004.13922archive 2025-07-28

Yiming Cui, Wanxiang Che, Ting Liu, Bing Qin, Shijin Wang, Guoping Hu

Bidirectional Encoder Representations from Transformers (BERT) has shown marvelous improvements across various NLP tasks, and consecutive variants have been proposed to further improve the performance of the pre-trained language models. In this paper, we target on revisiting Chinese pre-trained language models to examine their effectiveness in a non-English language and release the Chinese pre-trained language model series to the community. We also propose a simple but effective model called MacBERT, which improves upon RoBERTa in several ways, especially the masking strategy that adopts MLM as correction (Mac). We carried out extensive experiments on eight Chinese NLP tasks to revisit the existing pre-trained language models as well as the proposed MacBERT. Experimental results show that MacBERT could achieve state-of-the-art performances on many NLP tasks, and we also ablate details with several findings that may help future research. Resources available: https://github.com/ymcui/MacBERT

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="2004.13922")

Code

Syntology Ran 9 of 35 code samples harvested from 3 repositories linked to this paper; 26 have no recorded run. Of those that ran: 3 ran · honoured contract; 4 ran · our draft was wrong; 1 ran · fixture could not drive it; 1 ran with no contract checked.

By repository: community (archive-listed): 35 samples from 3 repositories, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

ymcui/MacBERT officialmentioned in papermentioned on GitHubtfApache-2.0 report
shibing624/pycorrector mentioned on GitHubtf report
ymcui/Chinese-BERT-wwm mentioned on GitHubpytorchApache-2.0 report
ymcui/Chinese-ELECTRA mentioned on GitHubtfApache-2.0 report
ymcui/Chinese-PreTrained-XLNet mentioned on GitHubtfApache-2.0 report
ymcui/Chinese-XLNet mentioned on GitHubtfApache-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

35 samples harvested; 9 ran; 3 honoured the contract we drafted; 26 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.

3ran · honoured contract
4ran · our draft was wrong
1ran · fixture could not drive it
1ran
26unverified

Licence: 0 of the 35 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 3 repositories linked to this paper, official or community; each sample names its own and says which. “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.

FocalLoss shibing624/pycorrector/pycorrector/macbert/macbert4csc.py community (archive-listed) ran Apache-2.0 (permissive) · 49538ded4b211b0d · report
compute_corrector_prf shibing624/pycorrector/pycorrector/macbert/macbert4csc.py community (archive-listed) ran · honoured contract Apache-2.0 (permissive) · bc8cd524a10a5326 · report
compute_sentence_level_prf shibing624/pycorrector/pycorrector/macbert/macbert4csc.py community (archive-listed) ran · honoured contract Apache-2.0 (permissive) · 731b5640fb2a2a52 · report
gelu ymcui/Chinese-PreTrained-XLNet/src/modeling.py community (archive-listed) ran · honoured contract fingerprinted Apache-2.0 (permissive) · d08f324f950148de · report
get_tokens ymcui/Chinese-PreTrained-XLNet/src/squad_utils.py community (archive-listed) ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · aa6bc32d9c17a2f1 · report
make_optimizer shibing624/pycorrector/pycorrector/macbert/macbert4csc.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · 3c707eafb83ce730 · report
make_qid_to_has_ans ymcui/Chinese-PreTrained-XLNet/src/squad_utils.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · e91c44f5680827e2 · report
normalize_answer ymcui/Chinese-PreTrained-XLNet/src/squad_utils.py community (archive-listed) ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 6a96435eba311b08 · report
positional_embedding ymcui/Chinese-PreTrained-XLNet/src/modeling.py community (archive-listed) ran · fixture could not drive it Apache-2.0 (permissive) · 9bf0f6e6298f3fbe · report
BaseTrainingEngine shibing624/pycorrector/pycorrector/macbert/macbert4csc.py community (archive-listed) unverified Apache-2.0 (permissive) · cfac541eefda5168 · report
CscTrainingModel shibing624/pycorrector/pycorrector/macbert/macbert4csc.py community (archive-listed) unverified Apache-2.0 (permissive) · af8425a9c3022046 · report
MacBert4Csc shibing624/pycorrector/pycorrector/macbert/macbert4csc.py community (archive-listed) unverified Apache-2.0 (permissive) · f5ffeb1faccdd442 · report
assign_to_gpu ymcui/Chinese-PreTrained-XLNet/src/gpu_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 6b2a8f1c93d0b071 · report
average_grads_and_vars ymcui/Chinese-PreTrained-XLNet/src/gpu_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 0e3f1e158da4c3b8 · report
batchify ymcui/Chinese-PreTrained-XLNet/src/data_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 8fa4efe75d3345a4 · report
build_lr_scheduler shibing624/pycorrector/pycorrector/macbert/macbert4csc.py community (archive-listed) unverified Apache-2.0 (permissive) · 699577a393a1a36e · report
configure_tpu ymcui/Chinese-PreTrained-XLNet/src/model_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 09d1e0e9c15a4503 · report
construct_scalar_host_call ymcui/Chinese-PreTrained-XLNet/src/function_builder.py community (archive-listed) unverified Apache-2.0 (permissive) · c09b2ad22d30dc58 · report
create_int_feature ymcui/Chinese-ELECTRA/build_pretraining_dataset.py community (archive-listed) unverified Apache-2.0 (permissive) · b03d45af664a39e3 · report
create_run_config ymcui/Chinese-PreTrained-XLNet/src/xlnet.py community (archive-listed) unverified Apache-2.0 (permissive) · b9e225229ba459c3 · report
create_tfrecords ymcui/Chinese-PreTrained-XLNet/src/data_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 8e58d7fe314fa0a1 · report
embedding_lookup ymcui/Chinese-PreTrained-XLNet/src/modeling.py community (archive-listed) unverified Apache-2.0 (permissive) · 5abf0267f0fc7514 · report
encode_pieces ymcui/Chinese-PreTrained-XLNet/src/prepro_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 0de7059b7a331eb0 · report
file_based_input_fn_builder ymcui/Chinese-PreTrained-XLNet/src/run_classifier.py community (archive-listed) unverified Apache-2.0 (permissive) · aab5156ced02aa8a · report
find_lcs ymcui/Chinese-ELECTRA/cmrc2018_drcd_evaluate.py community (archive-listed) unverified Apache-2.0 (permissive) · b71224516be1ddfa · report
format_filename ymcui/Chinese-PreTrained-XLNet/src/data_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · b86bea980cfb5cbf · report
gelu ymcui/Chinese-ELECTRA/model/modeling.py community (archive-listed) unverified Apache-2.0 (permissive) · 9c6c6f379ebe0c8e · report
get_activation ymcui/Chinese-ELECTRA/model/modeling.py community (archive-listed) unverified Apache-2.0 (permissive) · b2dfae5f1625da67 · report
get_assignment_map_from_checkpoint ymcui/Chinese-ELECTRA/model/modeling.py community (archive-listed) unverified Apache-2.0 (permissive) · cb34c9c201e23b66 · report
init_from_checkpoint ymcui/Chinese-PreTrained-XLNet/src/model_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 7b1d9794b90b3ae2 · report
load_from_checkpoint ymcui/Chinese-PreTrained-XLNet/src/gpu_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 3d6b054785523852 · report
mixed_segmentation ymcui/Chinese-ELECTRA/cmrc2018_drcd_evaluate.py community (archive-listed) unverified Apache-2.0 (permissive) · 2ac9d5179c0b5c85 · report
preprocess_text ymcui/Chinese-PreTrained-XLNet/src/prepro_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · b19697c998adb1ea · report
printable_text ymcui/Chinese-PreTrained-XLNet/src/prepro_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 0e5615f8994003cf · report
remove_punctuation ymcui/Chinese-ELECTRA/cmrc2018_drcd_evaluate.py community (archive-listed) unverified Apache-2.0 (permissive) · 5a2e0cd001c9f26b · report

Tasks

Language ModelingLanguage ModellingStock Market Prediction

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Stock Market Prediction Astock XLNET Chinese Accuray 61.14 #13 of 17 Archive leaderboard report
Stock Market Prediction Astock XLNET Chinese F1-score 61.19 #13 of 17 Archive leaderboard report
Stock Market Prediction Astock XLNET Chinese Precision 61.60 #13 of 17 Archive leaderboard report
Stock Market Prediction Astock XLNET Chinese Recall 61.09 #13 of 17 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: MacBERT

AdamAttentionAttention DropoutBERTDense ConnectionsDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMacBERTMulti-Head AttentionResidual ConnectionRoBERTaSoftmaxWeight 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