SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2302.14042 · 2023

Knowledge-enhanced Visual-Language Pre-training on Chest Radiology Images

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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, 3 violated it and 2 have no contract verdict; 1 failure of our instrument; 1 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/2302.14042.json · badge: /api/ran/2302.14042.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
xiaoman-zhang/kad community (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
FunctionStatusWhere it lives
cosine_lr Ran
ran; our contract draft was wrong, not the code
xiaoman-zhang/kad/A2_KEBERT/training/scheduler.py
pointer only (licence: MIT); the stored copy get_code serves, from VivienLu/UCAT, is pointer only (licence: NONE) · get_code("932d44bbf8bd0e3f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from VivienLu/UCAT, 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.

get_gt Ran
ran on a synthesized input
xiaoman-zhang/kad/A3_CLIP/plot_visualize_512.py
code served (permissive licence) · get_code("19e746da3aabc43e")
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 tuple. 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

# Analyze the function:
# - syms_list: iterable of symbols (strings based on usage with text_list.index())
# - text_list: list that supports .index() method, contains strings

# The function iterates through syms_list, finds the index of each symbol in text_list,
# appends to gt list, and marks gt_class at that index to 1

# Create a simple text_list with 10 classes (since gt_class has size 10)
text_list = ["class0", "class1", "class2", "class3", "class4", 
             "class5", "class6", "class7", "class8", "class9"]

# Create a syms_list with some symbols from text_list
syms_list = ["class2", "class5", "class2", "class8"]

ARGS = {
    "syms_list": syms_list,
    "text_list": text_list,
}
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 tuple — a tuple output has no array shape of its own; none is 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_sinusoid_encoding_table Ran
ran, honoured the contract we drafted
xiaoman-zhang/kad/A3_CLIP/models/vit.py
pointer only (licence: MIT); the stored copy get_code serves, from khu-vll/cast, is pointer only (licence: NOASSERTION) · get_code("9b2250a3d13ed688")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from khu-vll/cast, 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. A run is recorded.

get_text_features Ran
ran on a synthesized input
xiaoman-zhang/kad/A3_CLIP/plot_visualize_512.py
code served (permissive licence) · get_code("f562860ea5f57aa0")
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 as nn

torch.manual_seed(0)

class MockTokenizer:
    def __call__(self, text_list, add_special_tokens=False, max_length=None, pad_to_max_length=False, return_tensors=None):
        batch_size = len(text_list)
        token_ids = torch.randint(0, 1000, (batch_size, max_length), dtype=torch.long)
        attention_mask = torch.ones((batch_size, max_length), dtype=torch.long)
        
        class TokenizerOutput:
            def __init__(self, input_ids, attention_mask):
                self.input_ids = input_ids
                self.attention_mask = attention_mask
            
            def to(self, device):
                return TokenizerOutput(
                    self.input_ids.to(device),
                    self.attention_mask.to(device)
                )
        
        return TokenizerOutput(token_ids, attention_mask)

class MockTextEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.embedding = nn.Embedding(1000, 4)
    
    def encode_text(self, token_dict):
        input_ids = token_dict.input_ids
        embeddings = self.embedding(input_ids)
        text_features = embeddings.mean(dim=1)
        return text_features

model = MockTextEncoder()
text_list = ["hello world", "foo bar"]
tokenizer = MockTokenizer()
device = 'cpu'
max_length = 8

ARGS = {
    "model": model,
    "text_list": text_list,
    "tokenizer": tokenizer,
    "device": device,
    "max_length": max_length
}
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
is_global_master Ran
ran, violated the contract we drafted
xiaoman-zhang/kad/A2_KEBERT/training/distributed.py
pointer only (licence: MIT); the stored copy get_code serves, from tileb1/simzss, is pointer only (licence: NONE) · get_code("7c29b374198bddcd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from tileb1/simzss, 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.

is_local_master Ran
ran, violated the contract we drafted
xiaoman-zhang/kad/A2_KEBERT/training/distributed.py
pointer only (licence: MIT); the stored copy get_code serves, from tileb1/simzss, is pointer only (licence: NONE) · get_code("0377e309e95cfc3e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from tileb1/simzss, 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.

is_master Ran
ran, violated the contract we drafted
xiaoman-zhang/kad/A2_KEBERT/training/distributed.py
pointer only (licence: MIT); the stored copy get_code serves, from tileb1/simzss, is pointer only (licence: NONE) · get_code("b092791002b40e8a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from tileb1/simzss, 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.

gather_features Not yet run
unverified (harvested, no recorded run)
xiaoman-zhang/kad/A3_CLIP/factory/loss.py
pointer only (licence: MIT); the stored copy get_code serves, from lxa9867/imagefolder, is pointer only (licence: NOASSERTION) · get_code("ddcbd45e940484ee")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from lxa9867/imagefolder, 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.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 6 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 6 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
gather_features 57 other papers
3 dated earlier, 1 the same month, 53 later · 1 only as an assembly brick
2206.01670 (2022-06)
Egocentric Video-Language Pretraining
2212.00638 (2022-12)
Finetune like you pretrain: Improved finetuning of zero-shot vision models
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
and 54 more not named here
get_sinusoid_encoding_table 21 other papers
2 dated earlier, 19 later · 1 only as an assembly brick
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
2208.07049 (2022-08)
Self-Supervised Vision Transformers for Malware Detection
2305.05665 (2023-05)
ImageBind: One Embedding Space To Bind Them All
and 18 more not named here
cosine_lr 12 other papers
2 dated earlier, 10 later
2203.17274 (2022-03)
Exploring Visual Prompts for Adapting Large-Scale Models
2209.00179 (2022-09)
Universal Vision-Language Dense Retrieval: Learning A Unified Representation Space for Multi-Modal Retrieval
2308.05734 (2023-08)
AudioLDM 2: Learning Holistic Audio Generation with Self-supervised Pretraining
and 9 more not named here
is_global_master 10 other papers
1 dated earlier, 9 later
2003.04297 (2020-03)
Improved Baselines with Momentum Contrastive Learning
2308.05734 (2023-08)
AudioLDM 2: Learning Holistic Audio Generation with Self-supervised Pretraining
2311.17048 (2023-11)
Zero-shot Referring Expression Comprehension via Structural Similarity Between Images and Captions
and 7 more not named here
is_master 9 other papers
9 later
2304.14636 (2023-04)
PreNAS: Preferred One-Shot Learning Towards Efficient Neural Architecture Search
2308.05734 (2023-08)
AudioLDM 2: Learning Holistic Audio Generation with Self-supervised Pretraining
2311.17048 (2023-11)
Zero-shot Referring Expression Comprehension via Structural Similarity Between Images and Captions
and 6 more not named here
is_local_master 8 other papers
8 later
2308.05734 (2023-08)
AudioLDM 2: Learning Holistic Audio Generation with Self-supervised Pretraining
2311.17048 (2023-11)
Zero-shot Referring Expression Comprehension via Structural Similarity Between Images and Captions
2405.06640 (2024-05)
Linearizing Large Language Models
and 5 more not named here

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

While multi-modal foundation models pre-trained on large-scale data have been successful in natural language understanding and vision recognition, their use in medical domains is still limited due to the fine-grained nature of medical tasks and the high demand for domain knowledge. To address this challenge, we propose a novel approach called Knowledge-enhanced Auto Diagnosis (KAD) which leverages existing medical domain knowledge to guide vision-language pre-training using paired chest X-rays and radiology reports. We evaluate KAD on {four} external X-ray datasets and demonstrate that its zero-shot performance is not only comparable to that of fully-supervised models, but also superior to the average of three expert radiologists for three (out of five) pathologies with statistical significance. Moreover, when few-shot annotation is available, KAD outperforms all existing approaches in fine-tuning settings, demonstrating its potential for application in different clinical scenarios.

For agents

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

get_harvested_code_for_paper("2302.14042")
get_code_for_paper("2302.14042")
have("2302.14042")

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

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

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

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

Connect an agent — have() is free.