SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2021.findings-acl.216 · ACL Findings · 2021

Dynamic Connected Networks for Chinese Spelling Check

Ting Liu, Shijin Wang, Wanxiang Che, Guoping Hu, Baoxin Wang, Dayong Wu

Open in the Atlas

Code that ran

10 of 15 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; 0 honoured the contract we drafted, 1 violated it and 2 have no contract verdict; 7 failures of our instrument; 5 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-24; 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/2021.findings-acl.216.json · badge: /api/ran/2021.findings-acl.216.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
destwang/DCN canonical (classifier label)
classifier basis: census
10 ran · 5 no recorded run
FunctionStatusWhere it lives
whitespace_tokenize Ran
ran; our contract draft was wrong, not the code
destwang/DCN/transformers/tokenization_dcn.py
code served (permissive licence) · get_code("cf9ffa02a42184af")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T02:55:57Z). If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

def whitespace_tokenize(text):
    """Runs basic whitespace cleaning and splitting on a piece of text."""
    text = text.strip()
    if not text:
        return []
    tokens = text.split()
    return tokens

# Setup code
torch.manual_seed(0)

# The function takes a single parameter: text (a string)
# It performs basic whitespace cleaning and splitting
# We need to provide a valid string argument

ARGS = {
    "text": "  hello world  this is a test  "
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
convert_examples_to_features Ran
ran on a synthesized input
destwang/DCN/predict_DCN.py
code served (permissive licence) · get_code("20f1d6b374c95be2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

class SimpleTokenizer:
    """Minimal tokenizer with required methods."""
    def tokenize(self, text):
        """Splits text into tokens."""
        if text is None:
            return None
        return text.split()
    
    def convert_tokens_to_ids(self, tokens):
        """Converts tokens to integer IDs."""
        return [hash(token) % 1000 for token in tokens]
    
    def convert_tokens_to_pinyins(self, tokens):
        """Converts tokens to pinyin IDs."""
        return [hash(token) % 500 for token in tokens]

class Example:
    """Minimal example class with required attributes."""
    def __init__(self, text_a, text_b, label):
        self.text_a = text_a
        self.text_b = text_b
        self.label = label

# Create test data
tokenizer = SimpleTokenizer()

examples = [
    Example(
        text_a="hello world example",
        text_b="second sequence here",
        label=0
    ),
    Example(
        text_a="another text",
        text_b=None,
        label=1
    ),
]

max_seq_length = 16

ARGS = {
    "examples": examples,
    "max_seq_length": max_seq_length,
    "tokenizer": tokenizer,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
invert_mask Ran
ran, violated the contract we drafted
destwang/DCN/transformers/modeling_bart.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from yeliu918/KG-BART, is pointer only (licence: NONE) · get_code("874a42377fa0659f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from yeliu918/KG-BART, and GitHub detected no licence in that repository 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_dataset Ran
ran on a synthesized input
destwang/DCN/predict_DCN.py
code served (permissive licence) · get_code("4e6f739b6981eff2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os

# Create a temporary file with tab-separated data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("header1\tvalue1\textra1\n")
temp_file.write("header2\tvalue2\textra2\n")
temp_file.write("header3\tvalue3\textra3\n")
temp_file.close()

path = temp_file.name

ARGS = {
    "path": path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_vocab Ran
ran; our contract draft was wrong, not the code
destwang/DCN/transformers/tokenization_dcn.py
code served (permissive licence) · get_code("e7fbc7a74a3457c7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned OrderedDict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import collections
import tempfile
import os

# Create a temporary vocabulary file
temp_dir = tempfile.mkdtemp()
vocab_file = os.path.join(temp_dir, 'vocab.txt')

# Write some sample tokens to the vocab file
sample_tokens = ['[PAD]', '[UNK]', '[CLS]', '[SEP]', 'the', 'quick', 'brown', 'fox']
with open(vocab_file, 'w', encoding='utf-8') as f:
    for token in sample_tokens:
        f.write(token + '\n')

ARGS = {
    'vocab_file': vocab_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_padding_mask Ran
ran; our contract draft was wrong, not the code
destwang/DCN/transformers/modeling_bart.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from yeliu918/KG-BART, is pointer only (licence: NONE) · get_code("f20c9b1aead27fea")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from yeliu918/KG-BART, and GitHub detected no licence in that repository 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.

mish Ran
ran; our contract draft was wrong, not the code
destwang/DCN/transformers/modeling_bert.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lsan2401/rmsin, is pointer only (licence: NONE) · get_code("22b41155e451683b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lsan2401/rmsin, and GitHub detected no licence in that repository 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.

mish Ran
ran; our contract draft was wrong, not the code
destwang/DCN/transformers/modeling_dcn.py
code served (permissive licence) · get_code("1f4c7c43a0f08b09")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# The function mish takes a single parameter x
# It expects x to be a tensor that supports:
# - torch.tanh()
# - nn.functional.softplus()
# - multiplication with the result of tanh
# So x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
shift_tokens_right Ran
ran; our contract draft was wrong, not the code
destwang/DCN/transformers/modeling_bart.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from yeliu918/KG-BART, is pointer only (licence: NONE) · get_code("e00ccf7847d12b59")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from yeliu918/KG-BART, and GitHub detected no licence in that repository 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.

tile Ran
ran; our contract draft was wrong, not the code
destwang/DCN/transformers/modeling_beam_search.py
code served (permissive licence) · get_code("a878dc3112f9ce9e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (6, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor with distinct dimensions
# Using shape (2, 4) - batch size 2, feature dim 4
x = torch.tensor([[1, 2, 3, 4], [5, 6, 7, 8]], dtype=torch.float32)

# count: number of times to tile
count = 3

# dim: dimension along which to tile
dim = 0

ARGS = {
    "x": x,
    "count": count,
    "dim": dim,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (6, 4) — shape (6, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
convert_examples_to_features Not yet run
unverified (harvested, no recorded run)
destwang/DCN/train_DCN.py
code served (permissive licence) · get_code("3ddeb27102b000b8")
How it ran

no invocation recorded.

load_tf_weights_in_albert Not yet run
unverified (harvested, no recorded run)
destwang/DCN/transformers/modeling_albert.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from microsoft/fastformers, is pointer only (licence: NOASSERTION) · get_code("08a158e902f91371")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from microsoft/fastformers, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

load_tf_weights_in_bert Not yet run
unverified (harvested, no recorded run)
destwang/DCN/transformers/modeling_dcn.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lsan2401/rmsin, is pointer only (licence: NONE) · get_code("fb9398de2966d6de")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lsan2401/rmsin, and GitHub detected no licence in that repository 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.

result_predict Not yet run
unverified (harvested, no recorded run)
destwang/DCN/predict_DCN.py
code served (permissive licence) · get_code("06fe4e8d09dbea40")
How it ran

no invocation recorded.

result_predict Not yet run
unverified (harvested, no recorded run)
destwang/DCN/train_DCN.py
code served (permissive licence) · get_code("d9fbc150c07e6637")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 8 later) and 5 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
whitespace_tokenize 43 other papers
11 dated earlier, 24 later, 8 same year, order not determinable
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.01698 (2019-06)
Open Sesame: Getting Inside BERT's Linguistic Knowledge
and 40 more not named here
load_vocab 29 other papers
5 dated earlier, 21 later, 3 same year, order not determinable
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
2004.09297 (2020-04)
MPNet: Masked and Permuted Pre-training for Language Understanding
and 26 more not named here
mish 19 other papers
3 dated earlier, 11 later, 5 same year, order not determinable
2006.04884 (2020-06)
On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong Baselines
2007.12223 (2020-07)
The Lottery Ticket Hypothesis for Pre-trained BERT Networks
2012.07463 (2020-12)
Parameter-Efficient Transfer Learning with Diff Pruning
and 16 more not named here
load_tf_weights_in_bert 16 other papers
3 dated earlier, 9 later, 4 same year, order not determinable
2006.04884 (2020-06)
On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong Baselines
2007.12223 (2020-07)
The Lottery Ticket Hypothesis for Pre-trained BERT Networks
2012.07463 (2020-12)
Parameter-Efficient Transfer Learning with Diff Pruning
and 13 more not named here
shift_tokens_right 11 other papers
3 dated earlier, 5 later, 3 same year, order not determinable
1910.13461 (2019-10)
BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension
2009.12005 (2020-09)
MinTL: Minimalist Transfer Learning for Task-Oriented Dialogue Systems
2009.12677 (2020-09)
KG-BART: Knowledge Graph-Augmented BART for Generative Commonsense Reasoning
and 8 more not named here
invert_mask 10 other papers
3 dated earlier, 4 later, 3 same year, order not determinable
1910.13461 (2019-10)
BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension
2009.12005 (2020-09)
MinTL: Minimalist Transfer Learning for Task-Oriented Dialogue Systems
2009.12677 (2020-09)
KG-BART: Knowledge Graph-Augmented BART for Generative Commonsense Reasoning
and 7 more not named here
make_padding_mask 9 other papers
3 dated earlier, 2 later, 4 same year, order not determinable
1910.13461 (2019-10)
BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension
2009.12005 (2020-09)
MinTL: Minimalist Transfer Learning for Task-Oriented Dialogue Systems
2009.12677 (2020-09)
KG-BART: Knowledge Graph-Augmented BART for Generative Commonsense Reasoning
and 6 more not named here
tile 8 other papers
4 dated earlier, 4 later
1905.13164 (2019-05)
Hierarchical Transformers for Multi-Document Summarization
1906.10508 (2019-06)
Non-Parallel Sequence-to-Sequence Voice Conversion with Disentangled Linguistic and Speaker Representations
2001.09099 (2020-01)
TVR: A Large-Scale Dataset for Video-Subtitle Moment Retrieval
and 5 more not named here
load_tf_weights_in_albert 2 other papers
1 dated earlier, 1 same year, order not determinable
2010.13382 (2020-10)
FastFormers: Highly Efficient Transformer Models for Natural Language Understanding
2021.acl-long.390 (2021 (year only))
Few-Shot Text Ranking with Meta Adapted Synthetic Weak Supervision

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

Repositories linked to this paper

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

Abstract

Chinese spelling check (CSC) is a task to detect and correct spelling errors in Chinese text. Most state-of-the-art works on the CSC task adopt a BERT-based non-autoregressive language model, which relies on the output independence assumption. The inappropriate independence assumption prevents BERTbased models from learning the dependencies among target tokens, resulting in an incoherent problem. To address the above issue, we propose a novel architecture named Dynamic Connected Networks (DCN), which generates the candidate Chinese characters via a Pinyin Enhanced Candidate Generator and then utilizes an attention-based network to model the dependencies between two adjacent Chinese characters. The experimental results show that our proposed method achieves a new state-ofthe-art performance on three human-annotated datasets.

For agents

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

get_harvested_code_for_paper("2021.findings-acl.216")
get_code_for_paper("2021.findings-acl.216")
have("2021.findings-acl.216")

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

curl https://syntology.ai/api/ran/2021.findings-acl.216.json

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

[![Syntology run record](https://syntology.ai/api/ran/2021.findings-acl.216.svg)](https://syntology.ai/paper/2021.findings-acl.216)

Connect an agent — have() is free.