SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.18738 · EMNLP · 2023

TLM: Token-Level Masking for Transformers

Hao Zhang, Gang Chen, Han Wang, Dongxiang Zhang, Yangjun Wu, Kebin Fang

arXiv · PDF · Open in the Atlas

Code that ran

23 of 28 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 22 failures of our instrument; 5 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2310.18738.json · badge: /api/ran/2310.18738.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
blcuicall/CCL2022-CLTC canonical (classifier label)
classifier basis: census
12 ran · 2 no recorded run
Young1993/tlm canonical (classifier label)
classifier basis: census
11 ran · 3 no recorded run
FunctionStatusWhere it lives
booleans_processing Ran
ran; our contract draft was wrong, not the code
Young1993/tlm/transformers/modeling_tf_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from clin0212/hydralora, is pointer only (licence: NONE) · get_code("743ceb9025a7955d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

check_imports Ran
ran; our contract draft was wrong, not the code
Young1993/tlm/transformers/dynamic_module_utils.py
pointer only (licence: NONE) · get_code("301682fc3342590a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

construct_parallel_data_lbl Ran
ran; our contract draft was wrong, not the code
blcuicall/CCL2022-CLTC/baselines/track1/data_preprocess.py
pointer only (licence: NONE) · get_code("5967acfb31566dce")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

construct_parallel_data_para Ran
ran; our contract draft was wrong, not the code
blcuicall/CCL2022-CLTC/baselines/track1/data_preprocess.py
pointer only (licence: NONE) · get_code("37070b4bd77f89f1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

convert_pytorch_state_dict_to_flax Ran
ran; our contract draft was wrong, not the code
Young1993/tlm/transformers/modeling_flax_pytorch_utils.py
pointer only (licence: NONE) · get_code("db0c9b6ddfd01ae5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

convert_to_unicode Ran
ran; our contract draft was wrong, not the code
blcuicall/CCL2022-CLTC/baselines/track2/tokenization.py
pointer only (licence: NONE); the stored copy get_code serves, from huawei-noah/Pretrained-Language-Model, is pointer only (licence: NONE) · get_code("1923fc05163d207d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

dummy_loss Ran
ran; our contract draft was wrong, not the code
Young1993/tlm/transformers/modeling_tf_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from clin0212/hydralora, is pointer only (licence: NONE) · get_code("3c1eb64dde6b86af")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

encode_parallel_data Ran
ran; our contract draft was wrong, not the code
blcuicall/CCL2022-CLTC/baselines/track1/data_preprocess.py
pointer only (licence: NONE) · get_code("f02b7d24b3c3ecb3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_correction_map Ran
ran; our contract draft was wrong, not the code
blcuicall/CCL2022-CLTC/baselines/track1/eval_char_level.py
pointer only (licence: NONE) · get_code("bec43ad3f12fba68")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_eval_metrics Ran
ran; our contract draft was wrong, not the code
blcuicall/CCL2022-CLTC/baselines/track1/eval_char_level.py
pointer only (licence: NONE) · get_code("befde8a6e72b2fa6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_relative_import_files Ran
ran; our contract draft was wrong, not the code
Young1993/tlm/transformers/dynamic_module_utils.py
pointer only (licence: NONE) · get_code("00cc853a73f3aeb6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_relative_imports Ran
ran; our contract draft was wrong, not the code
Young1993/tlm/transformers/dynamic_module_utils.py
pointer only (licence: NONE) · get_code("450aeffe7f80f917")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_weights_name Ran
ran; our contract draft was wrong, not the code
blcuicall/CCL2022-CLTC/baselines/track2/gector/gec_model.py
pointer only (licence: NONE) · get_code("1e8d0a0db7a3947f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

infer_metric_tags_from_eval_results Ran
ran; our contract draft was wrong, not the code
Young1993/tlm/transformers/modelcard.py
pointer only (licence: NONE); the stored copy get_code serves, from shen8424/CORE, is pointer only (licence: NONE) · get_code("dd8f7751ef859581")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

keras_serializable Ran
ran; our contract draft was wrong, not the code
Young1993/tlm/transformers/modeling_tf_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from clin0212/hydralora, is pointer only (licence: NONE) · get_code("6a3959a0ffd36577")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_vocab Ran
ran; our contract draft was wrong, not the code
blcuicall/CCL2022-CLTC/baselines/track2/tokenization.py
pointer only (licence: NONE) · get_code("deb4d1793cf3ba73")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

metric_file Ran
ran; our contract draft was wrong, not the code
blcuicall/CCL2022-CLTC/baselines/track1/eval_sent_level.py
pointer only (licence: NONE) · get_code("7b3c30e644fc5e5e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

parse_keras_history Ran
ran; our contract draft was wrong, not the code
Young1993/tlm/transformers/modelcard.py
pointer only (licence: NONE) · get_code("18450df3733a6e7e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

printable_text Ran
ran; our contract draft was wrong, not the code
blcuicall/CCL2022-CLTC/baselines/track2/tokenization.py
pointer only (licence: NONE) · get_code("0e5615f8994003cf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

quick_gelu Ran
ran, honoured the contract we drafted
Young1993/tlm/transformers/modeling_flax_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from shen8424/CORE, is pointer only (licence: NONE) · get_code("a66d2b78670c85e1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

read_file Ran
ran; our contract draft was wrong, not the code
blcuicall/CCL2022-CLTC/baselines/track1/eval_sent_level.py
pointer only (licence: NONE) · get_code("40a3d4e153df98ef")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

rename_key_and_reshape_tensor Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Young1993/tlm/transformers/modeling_flax_pytorch_utils.py
pointer only (licence: NONE) · get_code("1236c8c8ab59ff20")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

sent_metric_detect Ran
ran; our contract draft was wrong, not the code
blcuicall/CCL2022-CLTC/baselines/track1/eval_sent_level.py
pointer only (licence: NONE) · get_code("2384075fc45a1f65")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

dtype_byte_size Not yet run
unverified (harvested, no recorded run)
Young1993/tlm/transformers/modeling_flax_utils.py
pointer only (licence: NONE) · get_code("9d98806acb3144b7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

flax_shard_checkpoint Not yet run
unverified (harvested, no recorded run)
Young1993/tlm/transformers/modeling_flax_utils.py
pointer only (licence: NONE) · get_code("e3ce70ca9258800e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_best_score Not yet run
unverified (harvested, no recorded run)
blcuicall/CCL2022-CLTC/baselines/track1/utils.py
pointer only (licence: NONE) · get_code("23c9c8f028972e4e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_char_metrics Not yet run
unverified (harvested, no recorded run)
blcuicall/CCL2022-CLTC/baselines/track1/eval_char_level.py
pointer only (licence: NONE) · get_code("9b9e456240811606")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blcuicall/CCL2022-CLTC when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

is_hf_dataset Not yet run
unverified (harvested, no recorded run)
Young1993/tlm/transformers/modelcard.py
pointer only (licence: NONE) · get_code("569927b3efc92b80")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Young1993/tlm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 28 samples lifted from this paper's linked repositories, 28 carry a function identity and 0 do not. Of the 28 distinct functions with an identity, 17 are also present in other papers whose code we hold (15 with at least one paper dated earlier, 9 the same month, 13 later) and 11 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
convert_to_unicode 36 other papers
29 dated earlier, 7 later
1609.08144 (2016-09)
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 33 more not named here
printable_text 33 other papers
26 dated earlier, 7 later
1609.08144 (2016-09)
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 30 more not named here
infer_metric_tags_from_eval_results 19 other papers
2 dated earlier, 2 the same month, 15 later
2022.findings-emnlp.427 (2022 (year only))
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
2310.05107 (2023-10)
OV-PARTS: Towards Open-Vocabulary Part Segmentation
and 16 more not named here
get_relative_import_files 18 other papers
5 dated earlier, 2 the same month, 11 later
2211.11694 (2022-11)
Exploring Discrete Diffusion Models for Image Captioning
2304.05568 (2023-04)
Improving Diffusion Models for Scene Text Editing with Dual Encoders
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
and 15 more not named here
get_relative_imports 18 other papers
5 dated earlier, 2 the same month, 11 later
2211.11694 (2022-11)
Exploring Discrete Diffusion Models for Image Captioning
2304.05568 (2023-04)
Improving Diffusion Models for Scene Text Editing with Dual Encoders
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
and 15 more not named here
quick_gelu 17 other papers
3 dated earlier, 2 the same month, 12 later
2022.findings-emnlp.427 (2022 (year only))
2303.14582 (2023-03)
Identification of Negative Transfers in Multitask Learning Using Surrogate Models
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
and 14 more not named here
flax_shard_checkpoint 14 other papers
1 dated earlier, 2 the same month, 11 later
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
2310.05107 (2023-10)
OV-PARTS: Towards Open-Vocabulary Part Segmentation
2310.09832 (2023-10)
Merging Experts into One: Improving Computational Efficiency of Mixture of Experts
and 11 more not named here
dtype_byte_size 12 other papers
1 dated earlier, 2 the same month, 9 later
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
2310.05107 (2023-10)
OV-PARTS: Towards Open-Vocabulary Part Segmentation
2310.09832 (2023-10)
Merging Experts into One: Improving Computational Efficiency of Mixture of Experts
and 9 more not named here
check_imports 10 other papers
5 dated earlier, 5 later
2211.11694 (2022-11)
Exploring Discrete Diffusion Models for Image Captioning
2304.05568 (2023-04)
Improving Diffusion Models for Scene Text Editing with Dual Encoders
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
and 7 more not named here
keras_serializable 8 other papers
2 dated earlier, 2 the same month, 4 later
2109.03808 (2021-09)
Smelting Gold and Silver for Improved Multilingual AMR-to-Text Generation
2303.14582 (2023-03)
Identification of Negative Transfers in Multitask Learning Using Surrogate Models
2310.05107 (2023-10)
OV-PARTS: Towards Open-Vocabulary Part Segmentation
and 5 more not named here
booleans_processing 6 other papers
2 the same month, 4 later
2310.05107 (2023-10)
OV-PARTS: Towards Open-Vocabulary Part Segmentation
2310.09832 (2023-10)
Merging Experts into One: Improving Computational Efficiency of Mixture of Experts
2402.12656 (2024-02)
HyperMoE: Towards Better Mixture of Experts via Transferring Among Experts
and 3 more not named here
dummy_loss 6 other papers
2 the same month, 4 later
2310.05107 (2023-10)
OV-PARTS: Towards Open-Vocabulary Part Segmentation
2310.09832 (2023-10)
Merging Experts into One: Improving Computational Efficiency of Mixture of Experts
2402.12656 (2024-02)
HyperMoE: Towards Better Mixture of Experts via Transferring Among Experts
and 3 more not named here
load_vocab 4 other papers
3 dated earlier, 1 later
1902.10909 (2019-02)
BERT for Joint Intent Classification and Slot Filling
1903.09588 (2019-03)
Utilizing BERT for Aspect-Based Sentiment Analysis via Constructing Auxiliary Sentence
2203.09313 (2022-03)
EVA2.0: Investigating Open-Domain Chinese Dialogue Systems with Large-Scale Pre-Training
and 1 more not named here
convert_pytorch_state_dict_to_flax 2 other papers
2 dated earlier
2303.14582 (2023-03)
Identification of Negative Transfers in Multitask Learning Using Surrogate Models
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
is_hf_dataset 2 other papers
2 dated earlier
2022.findings-emnlp.427 (2022 (year only))
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
rename_key_and_reshape_tensor 2 other papers
2 dated earlier
2303.14582 (2023-03)
Identification of Negative Transfers in Multitask Learning Using Surrogate Models
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
parse_keras_history 1 other paper
1 dated earlier
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Structured dropout approaches, such as attention dropout and DropHead, have been investigated to regularize the multi-head attention mechanism in Transformers. In this paper, we propose a new regularization scheme based on token-level rather than structure-level to reduce overfitting. Specifically, we devise a novel Token-Level Masking (TLM) training strategy for Transformers to regularize the connections of self-attention, which consists of two masking techniques that are effective and easy to implement. The underlying idea is to manipulate the connections between tokens in the multi-head attention via masking, where the networks are forced to exploit partial neighbors' information to produce a meaningful representation. The generality and effectiveness of TLM are thoroughly evaluated via extensive experiments on 4 diversified NLP tasks across 18 datasets, including natural language understanding benchmark GLUE, ChineseGLUE, Chinese Grammatical Error Correction, and data-to-text generation. The results indicate that TLM can consistently outperform attention dropout and DropHead, e.g., it increases by 0.5 points relative to DropHead with BERT-large on GLUE. Moreover, TLM can establish a new record on the data-to-text benchmark Rotowire (18.93 BLEU). Our code will be publicly available at https://github.com/Young1993/tlm.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2310.18738")
get_code_for_paper("2310.18738")
have("2310.18738")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2310.18738.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2310.18738.svg)](https://syntology.ai/paper/2310.18738)

Connect an agent — have() is free.