SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2021.findings-emnlp.140 · EMNLP Findings · 2021

BERT might be Overkill: A Tiny but Effective Biomedical Entity Linker based on Residual Convolutional Neural Networks

Heng Ji, Chengxiang Zhai, Tuan Lai

Open in the Atlas

Code that ran

7 of 7 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, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 0 no recorded run), 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-emnlp.140.json · badge: /api/ran/2021.findings-emnlp.140.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
dmis-lab/BioSyn canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
check_k Ran
ran on a synthesized input
dmis-lab/BioSyn/utils.py
code served (permissive licence) · get_code("334e9e0c4d7d65cc")
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 int, ndim 0, dtype family int, shape () 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 numpy as np

torch.manual_seed(0)

# Construct a valid argument for check_k
# The function accesses: queries[0]['mentions'][0]['candidates']
# and returns len() of that, so it needs to be a list-like structure

queries = [
    {
        'mentions': [
            {
                'candidates': [
                    {'id': 1, 'text': 'candidate1'},
                    {'id': 2, 'text': 'candidate2'},
                    {'id': 3, 'text': 'candidate3'},
                ]
            }
        ]
    }
]

ARGS = {
    'queries': queries
}
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 int, ndim 0, dtype family int, shape () — shape () 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
check_label Ran
ran on a synthesized input
dmis-lab/BioSyn/utils.py
code served (permissive licence) · get_code("e7ee5f7a818a94d9")
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 int, ndim 0, dtype family int, shape () 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

ARGS = {
    "predicted_cui": "C0001|C0002",
    "golden_cui": "C0002|C0003"
}
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 int, ndim 0, dtype family int, shape () — shape () 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_dictionary_to_name2cui Ran
ran on a synthesized input
dmis-lab/BioSyn/preprocess/dictionary_preprocess.py
code served (permissive licence) · get_code("217551857e4f9ea5")
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 dict. 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 torch
import numpy as np
from tqdm import tqdm

torch.manual_seed(0)

# Create a stand-in text preprocessor class that has a run method
class TextPreprocessor:
    def run(self, text):
        # Simple preprocessing: lowercase and strip
        return text.lower().strip()

# Create sample dictionary data
# Format: "cui||name1|name2|name3"
dictionary = [
    "C0001||diabetes|diabetes mellitus|DM",
    "C0002||hypertension|high blood pressure|HTN",
    "C0003||heart disease|cardiac disease",
    "C0001||diabetes|glucose disorder",  # Duplicate cui with new names
]

# Create text preprocessor instance
text_preprocessor = TextPreprocessor()

ARGS = {
    "dictionary": dictionary,
    "text_preprocessor": text_preprocessor,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
evaluate_topk_acc Ran
ran on a synthesized input
dmis-lab/BioSyn/utils.py
code served (permissive licence) · get_code("25c16c8be2b5a879")
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 dict. 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 numpy as np

ARGS = {
    'data': {
        'queries': [
            {
                'mentions': [
                    {
                        'candidates': [
                            {'label': True},
                            {'label': False},
                            {'label': False},
                        ]
                    },
                    {
                        'candidates': [
                            {'label': False},
                            {'label': True},
                            {'label': False},
                        ]
                    }
                ]
            },
            {
                'mentions': [
                    {
                        'candidates': [
                            {'label': False},
                            {'label': False},
                            {'label': True},
                        ]
                    }
                ]
            }
        ]
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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_wordset Ran
ran on a synthesized input
dmis-lab/BioSyn/preprocess/ctd_preprocess.py
code served (permissive licence) · get_code("101b8536bbab90ae")
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 set. 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 pandas as pd

def make_wordset(row):
    wordset = set()
    name = set([row['Name']])
    wordset = wordset.union(name)
    synonyms = row['Synonyms']
    if pd.notna(synonyms):
        synonyms = set(synonyms.split('|'))
        wordset = wordset.union(synonyms)
    return wordset

# Create a valid pandas Series row with required columns
row = pd.Series({
    'Name': 'apple',
    'Synonyms': 'fruit|pomaceous|red'
})

ARGS = {
    'row': row
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
marginal_nll Ran
ran on a synthesized input
dmis-lab/BioSyn/src/biosyn/rerankNet.py
code served (permissive licence) · get_code("2f334110d798132c")
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 0, dtype family float, shape () 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 expects:
# - score: a tensor that will be passed through softmax (dim=-1) and multiplied with target
# - target: a tensor with same shape as score, containing binary labels or probability targets

# Looking at the function:
# 1. score is passed to F.softmax(score, dim=-1) - needs to be 2D or higher
# 2. target has same shape as score after softmax
# 3. They are multiplied element-wise
# 4. Results are summed over dim=-1
# 5. Filtering happens on the result
# 6. Loss is clamped and log is taken

# Create small tensors with distinct dimensions
batch_size = 2
num_classes = 4

score = torch.randn(batch_size, num_classes)
target = torch.zeros(batch_size, num_classes)
# Set some positive targets (at least one per sample to avoid all-zero loss)
target[0, 1] = 1.0
target[1, 2] = 1.0

ARGS = {
    "score": score,
    "target": target,
}
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 0, dtype family float, shape () — shape () 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
parse_args Ran
ran on a synthesized input
dmis-lab/BioSyn/preprocess/meddra_preprocess.py
code served (permissive licence) · get_code("7faab7e328aebca1")
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 Namespace. 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 argparse
import tempfile
import os

# Create temporary directory for paths
temp_dir = tempfile.mkdtemp()

# Create placeholder files
hlgt_file = os.path.join(temp_dir, "hlgt.txt")
hlt_file = os.path.join(temp_dir, "hlt.txt")
pt_file = os.path.join(temp_dir, "pt.txt")
llt_file = os.path.join(temp_dir, "llt.txt")
output_file = os.path.join(temp_dir, "output.txt")

# Write minimal content to files
open(hlgt_file, 'w').close()
open(hlt_file, 'w').close()
open(pt_file, 'w').close()
open(llt_file, 'w').close()
open(output_file, 'w').close()

ARGS = {
    'debug': False,
}

# Mock sys.argv to provide command-line arguments
import sys
sys.argv = [
    'script.py',
    '--hlgt_path', hlgt_file,
    '--hlt_path', hlt_file,
    '--pt_path', pt_file,
    '--llt_path', llt_file,
    '--output_path', output_file,
]
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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 4 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
check_k 1 other paper
1 later
2210.11947 (2022-10)
Generalizing over Long Tail Concepts for Medical Term Normalization
check_label 1 other paper
1 later
2210.11947 (2022-10)
Generalizing over Long Tail Concepts for Medical Term Normalization
evaluate_topk_acc 1 other paper
1 later
2210.11947 (2022-10)
Generalizing over Long Tail Concepts for Medical Term Normalization

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

Biomedical entity linking is the task of linking entity mentions in a biomedical document to referent entities in a knowledge base. Recently, many BERT-based models have been introduced for the task. While these models have achieved competitive results on many datasets, they are computationally expensive and contain about 110M parameters. Little is known about the factors contributing to their impressive performance and whether the overparameterization is needed. In this work, we shed some light on the inner working mechanisms of these large BERT-based models. Through a set of probing experiments, we have found that the entity linking performance only changes slightly when the input word order is shuffled or when the attention scope is limited to a fixed window size. From these observations, we propose an efficient convolutional neural network with residual connections for biomedical entity linking. Because of the sparse connectivity and weight sharing properties, our model has a small number of parameters and is highly efficient. On five public datasets, our model achieves comparable or even better linking accuracy than the stateof-the-art BERT-based models while having about 60 times fewer parameters. 1

For agents

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

get_harvested_code_for_paper("2021.findings-emnlp.140")
get_code_for_paper("2021.findings-emnlp.140")
have("2021.findings-emnlp.140")

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

curl https://syntology.ai/api/ran/2021.findings-emnlp.140.json

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

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

Connect an agent — have() is free.