SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2109.07154 · EMNLP · 2021

Can Language Models be Biomedical Knowledge Bases?

Jinhyuk Lee, Sungdong Kim, Jaewoo Kang, Mujeen Sung, Sean Yi, Minji Jeon

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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 0 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2109.07154.json · badge: /api/ran/2109.07154.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/biolama canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
convert_manual_to_dense Ran
ran; our contract draft was wrong, not the code
dmis-lab/biolama/BioLAMA/run_optiprompt.py
code served (permissive licence) · get_code("ae552334dd6723dd")
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 str. 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 torch.nn as nn

torch.manual_seed(0)

class MockTokenizer:
    def __init__(self):
        self.vocab = {
            '[X]': 100,
            '[Y]': 101,
            '[V1]': 102,
            '[V2]': 103,
            '[V3]': 104,
            '[V4]': 105,
            'hello': 106,
            'world': 107,
            'test': 108,
        }
    
    def tokenize(self, text):
        # Simple tokenizer that splits on spaces and returns tokens
        text = text.strip()
        if text == 'hello':
            return ['hello']
        elif text == 'world':
            return ['world']
        elif text == 'test':
            return ['test']
        return [text]
    
    def convert_tokens_to_ids(self, tokens):
        return [self.vocab.get(token, 999) for token in tokens]


class MockEmbeddings(nn.Module):
    def __init__(self, vocab_size=200, embedding_dim=4):
        super().__init__()
        self.word_embeddings = nn.Embedding(vocab_size, embedding_dim)
    
    def forward(self, input_ids):
        return self.word_embeddings(input_ids)


class MockBaseModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.embeddings = MockEmbeddings(vocab_size=200, embedding_dim=4)
    
    def forward(self, input_ids):
        return self.embeddings(input_ids)


tokenizer = MockTokenizer()
base_model = MockBaseModel()
manual_template = "[X] hello world [Y] test"

ARGS = {
    'manual_template': manual_template,
    'base_model': base_model,
    'tokenizer': tokenizer,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
get_new_token Ran
ran; our contract draft was wrong, not the code
dmis-lab/biolama/BioLAMA/run_optiprompt.py
code served (permissive licence) · get_code("bdc2968261f9093b")
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 str. 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

MAX_NUM_VECTORS = 20

def get_new_token(vid):
    assert vid > 0 and vid <= MAX_NUM_VECTORS
    return '[V%d]' % vid

# The function takes a single parameter 'vid' which must be an integer
# between 1 and MAX_NUM_VECTORS (inclusive)
ARGS = {
    'vid': 5
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
init_template Ran
ran; our contract draft was wrong, not the code
dmis-lab/biolama/BioLAMA/run_optiprompt.py
code served (permissive licence) · get_code("a75dcf58b2351e5c")
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 str. 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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def __init__(self):
        self.vocab = {
            '[X]': 100,
            '[Y]': 101,
            '[V1]': 102,
            '[V2]': 103,
            '[V3]': 104,
            '[V4]': 105,
            'the': 106,
            'quick': 107,
            'brown': 108,
            'fox': 109,
            'jumps': 110,
        }
    
    def tokenize(self, text):
        # Simple tokenization: split on spaces and return tokens
        words = text.strip().split()
        return words
    
    def convert_tokens_to_ids(self, tokens):
        return [self.vocab.get(token, 999) for token in tokens]

# Create a minimal base model with embeddings
class MinimalEmbeddings(nn.Module):
    def __init__(self, vocab_size=200, embedding_dim=4):
        super().__init__()
        self.word_embeddings = nn.Embedding(vocab_size, embedding_dim)
    
    def forward(self, input_ids):
        return self.word_embeddings(input_ids)

class MinimalBaseModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.embeddings = MinimalEmbeddings(vocab_size=200, embedding_dim=4)
    
    def forward(self, input_ids):
        return self.embeddings(input_ids)

# Instantiate components
base_model = MinimalBaseModel()
tokenizer = MinimalTokenizer()

ARGS = {
    'base_model': base_model,
    'tokenizer': tokenizer,
    'prompt_token_len': 3,
    'init_manual_template': False,
    'manual_template': ''
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 2 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
get_new_token 1 other paper
1 later
2310.01691 (2023-10)
Zero-Shot Continuous Prompt Transfer: Generalizing Task Semantics Across Language Models

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

Repositories linked to this paper

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

Abstract

Pre-trained language models (LMs) have become ubiquitous in solving various natural language processing (NLP) tasks. There has been increasing interest in what knowledge these LMs contain and how we can extract that knowledge, treating LMs as knowledge bases (KBs). While there has been much work on probing LMs in the general domain, there has been little attention to whether these powerful LMs can be used as domain-specific KBs. To this end, we create the BIOLAMA benchmark, which is comprised of 49K biomedical factual knowledge triples for probing biomedical LMs. We find that biomedical LMs with recently proposed probing methods can achieve up to 18.51% Acc@5 on retrieving biomedical knowledge. Although this seems promising given the task difficulty, our detailed analyses reveal that most predictions are highly correlated with prompt templates without any subjects, hence producing similar results on each relation and hindering their capabilities to be used as domain-specific KBs. We hope that BIOLAMA can serve as a challenging benchmark for biomedical factual probing. 1

For agents

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

get_harvested_code_for_paper("2109.07154")
get_code_for_paper("2109.07154")
have("2109.07154")

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

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

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

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

Connect an agent — have() is free.