SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.23136 · 2026

HGNet: Scalable Foundation Model for Automated Knowledge Graph Generation from Scientific Literature

Devvrat Joshi, Islem Rekik

arXiv · PDF · Open in the Atlas

Code that ran

17 of 20 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 0 have no contract verdict; 16 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2603.23136.json · badge: /api/ran/2603.23136.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
basiralab/HGNet canonical (classifier label)
classifier basis: census
17 ran · 3 no recorded run
FunctionStatusWhere it lives
create_custom_label_maps Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/NER/proposed_solution/Z-NERD/znerd.py
code served (permissive licence) · get_code("79c6aef5fe941ce2")
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, 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

ARGS = {
    'entity_types': ['PERSON', 'ORG', 'LOCATION', 'DATE']
}
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 tuple, ndim 1, dtype family float — a tuple 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
create_l2_prompt Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/dataset_generation/generate_concepts.py
code served (permissive licence) · get_code("5e5f51beecce3560")
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 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

L2_CONCEPTS_PER_L1 = 10

VALID_CONCEPT_TYPES = ['Algorithm', 'Data Structure', 'Programming Language', 'Architecture', 'Protocol', 'Theory', 'Principle', 'Paradigm', 'Model', 'Framework', 'Operating System', 'Database', 'File System', 'Compiler', 'Sub-field', 'Function', 'Library', 'Standard', 'Component']

def create_l2_prompt(l1_parent_name):
    return f'\n    You are a computer science expert specializing in **"{l1_parent_name}"**.\n    Generate {L2_CONCEPTS_PER_L1} distinct and important sub-concepts within this field.\n    VALID TYPES: {VALID_CONCEPT_TYPES}\n    CRITICAL: Output ONLY a valid JSON object with a key "concepts". Each concept must have "name" and "type".\n    '

ARGS = {
    "l1_parent_name": "Distributed Systems"
}
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 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
create_model_with_config Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
basiralab/HGNet/NER/proposed_solution/Z-NERD/znerd_neural_scaling_laws_analysis_iclr.py
code served (permissive licence) · get_code("a71c6067d98f0b80")
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 BertForTokenClassification. 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
from transformers import BertConfig

torch.manual_seed(0)

# Create a minimal config dictionary
config = {
    'hidden_size': 8,
    'num_hidden_layers': 2,
    'num_attention_heads': 2,
    'intermediate_size': 16,
}

num_labels = 5

ARGS = {
    'config': config,
    'num_labels': num_labels,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BertForTokenClassification — a BertForTokenClassification output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a BertForTokenClassification 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
find_entity_in_text Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/dataset_generation/fix_sphere_spans.py
code served (permissive licence) · get_code("150fa6d1890c5543")
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, ndim 1, dtype family int; 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 re

def strip_parenthetical(name):
    """Strip trailing parenthetical from entity name for surface form matching.
    'Intergalactic Medium (IGM)' → 'Intergalactic Medium'
    'Density Functional Theory (DFT) Calculations' → 'Density Functional Theory Calculations'
    """
    stripped = re.sub('\\s*\\([^)]*\\)\\s*', ' ', name).strip()
    stripped = re.sub('\\s+', ' ', stripped)
    return stripped

def _pick_closest(matches, original_span):
    """Pick the match whose start is closest to the original (broken) span start."""
    if len(matches) == 1:
        return matches[0]
    orig_start = original_span[0]
    return min(matches, key=lambda m: abs(m[0] - orig_start))

def _inflection_variants(name):
    """Generate simple singular/plural variants."""
    variants = []
    if name.endswith('s'):
        variants.append(name[:-1])
        if name.endswith('ies'):
            variants.append(name[:-3] + 'y')
        if name.endswith('es'):
            variants.append(name[:-2])
    else:
        variants.append(name + 's')
        variants.append(name + 'es')
    return variants

def find_entity_in_text(text, name, original_span):
    """Find the best matching span for an entity name in the text.
    Returns (start, end) or None if not found.
    Uses 0-based indexing with exclusive end: text[start:end] == mention.
    """
    text_lower = text.lower()
    name_lower = name.lower()
    matches = []
    start = 0
    while True:
        idx = text_lower.find(name_lower, start)
        if idx == -1:
            break
        matches.append((idx, idx + len(name)))
        start = idx + 1
    if matches:
        return _pick_closest(matches, original_span)
    stripped = strip_parenthetical(name)
    if stripped.lower() != name_lower:
        stripped_lower = stripped.lower()
        matches = []
        start = 0
        while True:
            idx = text_lower.find(stripped_lower, start)
            if idx == -1:
                break
            matches.append((idx, idx + len(stripped)))
            start = idx + 1
        if matches:
            return _pick_closest(matches, original_span)
    for variant in _inflection_variants(stripped if stripped != name else name):
        variant_lower = variant.lower()
        matches = []
        start = 0
        while True:
            idx = text_lower.find(variant_lower, start)
            if idx == -1:
                break
            matches.append((idx, idx + len(variant)))
            start = idx + 1
        if matches:
            return _pick_closest(matches, original_span)
    return None

ARGS = {
    "text": "The Intergalactic Medium is important for cosmology. Studies of the medium continue.",
    "name": "Intergalactic Medium (IGM)",
    "original_span": (5, 25)
}
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 tuple, ndim 1, dtype family int — a tuple 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
get_doc_key Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/RE/baselines/PL-Marker/conll.py
code served (permissive licence) · get_code("f300a33fe05fc609")
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 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

def get_doc_key(doc_id, part):
    return '{}_{}'.format(doc_id, int(part))

ARGS = {
    'doc_id': 'doc_123',
    'part': 5
}
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 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_entity_types_from_data Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/NER/proposed_solution/Z-NERD/znerd.py
code served (permissive licence) · get_code("98a7c13fab8f4b94")
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

torch.manual_seed(0)

# Construct valid data samples with entities
data_samples = [
    {
        'entities': [
            {'type': 'PERSON', 'start': 0, 'end': 5},
            {'type': 'LOCATION', 'start': 10, 'end': 15}
        ]
    },
    {
        'entities': [
            {'type': 'ORGANIZATION', 'start': 0, 'end': 10},
            {'type': 'PERSON', 'start': 20, 'end': 25}
        ]
    },
    {
        'entities': []
    }
]

ARGS = {
    'data_samples': data_samples
}
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 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
get_original_token Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/RE/baselines/PL-Marker/preprocess_ontonotes.py
code served (permissive licence) · get_code("e54f1fe179178f6b")
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 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

torch.manual_seed(0)

ARGS = {
    'token': '-LRB-'
}
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 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_saved_checkpoint Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/RE/baselines/HGERE/run_hgnn.py
code served (permissive licence) · get_code("5fd358d232781554")
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, 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 os
import tempfile
import shutil

# Create a temporary directory structure with some checkpoint folders
temp_dir = tempfile.mkdtemp()
os.makedirs(os.path.join(temp_dir, "checkpoint-100"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "checkpoint-250"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "checkpoint-50"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "other_folder"), exist_ok=True)

# Create a simple args object with output_dir attribute
class Args:
    def __init__(self, output_dir):
        self.output_dir = output_dir

args = Args(output_dir=temp_dir)
checkpoint_prefix = "checkpoint"

ARGS = {
    "args": args,
    "checkpoint_prefix": checkpoint_prefix
}
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 tuple, ndim 1, dtype family float — a tuple 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
is_text_duplicate Ran
ran, violated the contract we drafted
basiralab/HGNet/dataset_generation/generate_main_data.py
code served (permissive licence) · get_code("ad1fb87a387fa034")
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 bool, 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 threading

existing_texts_lock = threading.Lock()
existing_texts = set()

# Populate the global existing_texts set with some sample texts
with existing_texts_lock:
    existing_texts.add("hello world")
    existing_texts.add("sample text")
    existing_texts.add("duplicate me")

# Define arguments for is_text_duplicate
ARGS = {
    "text": "hello world"
}
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 bool, 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
load_and_convert_scierc Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/NER/proposed_solution/Z-NERD/znerd.py
code served (permissive licence) · get_code("4529163604f4d452")
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 json
import tempfile
import os

# Create a temporary SciERC-format JSON file
scierc_data = [
    {
        "sentences": [
            ["Protein", "X", "binds", "to", "DNA"],
            ["This", "interaction", "is", "important"]
        ],
        "ner": [
            [[0, 1, "protein"], [4, 5, "DNA"]],
            []
        ],
        "relations": []
    },
    {
        "sentences": [
            ["The", "enzyme", "catalyzes", "the", "reaction"],
        ],
        "ner": [
            [[1, 2, "enzyme"], [4, 5, "process"]],
        ],
        "relations": []
    }
]

# Write to temporary file
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False)
json.dump(scierc_data, temp_file)
temp_file.close()

ARGS = {
    'file_path': temp_file.name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — 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_custom_data Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/NER/proposed_solution/Z-NERD/znerd_neural_scaling_laws_analysis_iclr.py
code served (permissive licence) · get_code("900674fcafa5fc6f")
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 json
import tempfile
import os

# Create temporary files with valid JSON data
temp_dir = tempfile.mkdtemp()

# Create knowledge base file
kb_data = {
    "concepts": [
        {"type": "PERSON", "name": "Alice"},
        {"type": "LOCATION", "name": "Paris"},
        {"type": "PERSON", "name": "Bob"},
        {"type": "ORGANIZATION", "name": "ACME"}
    ]
}
kb_path = os.path.join(temp_dir, "kb.json")
with open(kb_path, 'w') as f:
    json.dump(kb_data, f)

# Create sentences file (JSONL format - one JSON object per line)
sentences_data = [
    {"id": 1, "text": "Alice went to Paris"},
    {"id": 2, "text": "Bob works at ACME"}
]
sentences_path = os.path.join(temp_dir, "sentences.jsonl")
with open(sentences_path, 'w') as f:
    for sent in sentences_data:
        f.write(json.dumps(sent) + '\n')

ARGS = {
    "kb_path": kb_path,
    "sentences_path": sentences_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 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
load_json_file Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/dataset_generation/generate_concepts.py
code served (permissive licence) · get_code("3a2ea5a81c2031b2")
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 json
import os
import tempfile

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

# Create a valid JSON file
valid_json_path = os.path.join(temp_dir, "valid.json")
with open(valid_json_path, 'w', encoding='utf-8') as f:
    json.dump({"key": "value", "number": 42}, f)

# Define arguments for the function
ARGS = {
    "filepath": valid_json_path,
    "default_value": {"fallback": "default"}
}
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 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
load_jsonl Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/datasets/SPHERE/prepare_sphere.py
code served (permissive licence) · get_code("d796bc0f8d962649")
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 json
import tempfile
import os

# Create a temporary JSONL file for testing
temp_dir = tempfile.mkdtemp()
temp_filepath = os.path.join(temp_dir, "test_data.jsonl")

# Write some valid JSONL data
with open(temp_filepath, 'w', encoding='utf-8') as f:
    f.write('{"name": "Alice", "age": 30}\n')
    f.write('{"name": "Bob", "age": 25}\n')
    f.write('{"name": "Charlie", "age": 35}\n')
    f.write('\n')  # Empty line to test stripping
    f.write('{"id": 1, "value": "test"}\n')

ARGS = {
    "filepath": temp_filepath
}
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
normalize_relation_type Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/dataset_generation/fix_sphere_spans.py
code served (permissive licence) · get_code("362a1fab2c7b79e8")
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 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

# Set seed for reproducibility
torch.manual_seed(0)

# The function normalize_relation_type takes a single parameter: rel_type
# Looking at the function body:
# - rel_type is used with: not rel_type, .get(rel_type), .lower(), .replace()
# - These are string operations
# - The function should handle None, empty strings, and various string formats

ARGS = {
    'rel_type': 'enhances'
}
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 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
normalize_word Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/RE/baselines/PL-Marker/preprocess_ontonotes.py
code served (permissive licence) · get_code("ba4eb9ed094dc59e")
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 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

torch.manual_seed(0)

ARGS = {
    'word': '/.',
    'language': 'english'
}
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 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
set_logger Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/RE/baselines/HGERE/run_hgnn.py
code served (permissive licence) · get_code("4d88e67fe857597d")
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 RootLogger. 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 logging
import os
import sys
import tempfile

class ArgsStandIn:
    def __init__(self):
        self.hostname = "test_host"

# Create a temporary directory for logs
temp_log_dir = tempfile.mkdtemp()

ARGS = {
    "args": ArgsStandIn(),
    "log_path": temp_log_dir,
    "test": False
}
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 RootLogger — a RootLogger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RootLogger 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
strip_parenthetical Ran
ran; our contract draft was wrong, not the code
basiralab/HGNet/dataset_generation/fix_sphere_spans.py
code served (permissive licence) · get_code("e5b6fb6c78dd4e95")
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 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 re

def strip_parenthetical(name):
    """Strip trailing parenthetical from entity name for surface form matching.
    'Intergalactic Medium (IGM)' → 'Intergalactic Medium'
    'Density Functional Theory (DFT) Calculations' → 'Density Functional Theory Calculations'
    """
    stripped = re.sub('\\s*\\([^)]*\\)\\s*', ' ', name).strip()
    stripped = re.sub('\\s+', ' ', stripped)
    return stripped


ARGS = {
    "name": "Intergalactic Medium (IGM)"
}
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 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
evaluate_conll Not yet run
unverified (harvested, no recorded run)
basiralab/HGNet/RE/baselines/PL-Marker/conll.py
code served (permissive licence) · get_code("15f2da988c1b38ad")
How it ran

no invocation recorded.

official_conll_eval Not yet run
unverified (harvested, no recorded run)
basiralab/HGNet/RE/baselines/PL-Marker/conll.py
code served (permissive licence) · get_code("b12f4137ab9599e7")
How it ran

no invocation recorded.

save_sentences_thread_safe Not yet run
unverified (harvested, no recorded run)
basiralab/HGNet/dataset_generation/generate_main_data.py
code served (permissive licence) · get_code("d132cfb64d61d6cd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 0 later) and 13 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_doc_key 8 other papers
8 dated earlier
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
1907.10529 (2019-07)
SpanBERT: Improving Pre-training by Representing and Predicting Spans
2021.naacl-main.125 (2021 (year only))
Incorporating Syntax and Semantics in Coreference Resolution with Heterogeneous Graph Attention Network
and 5 more not named here
evaluate_conll 4 other papers
4 dated earlier
1907.10529 (2019-07)
SpanBERT: Improving Pre-training by Representing and Predicting Spans
2109.06067 (2021-09)
Packed Levitated Marker for Entity and Relation Extraction
2202.10710 (2022-02)
Incorporating Constituent Syntax for Coreference Resolution
and 1 more not named here
get_original_token 2 other papers
2 dated earlier
2109.06067 (2021-09)
Packed Levitated Marker for Entity and Relation Extraction
2025.findings-emnlp.1354 (2025 (year only))
Dependency Parsing-Based Syntactic Enhancement of Relation Extraction in Scientific Texts
normalize_word 2 other papers
2 dated earlier
2109.06067 (2021-09)
Packed Levitated Marker for Entity and Relation Extraction
2025.findings-emnlp.1354 (2025 (year only))
Dependency Parsing-Based Syntactic Enhancement of Relation Extraction in Scientific Texts
official_conll_eval 2 other papers
2 dated earlier
2109.06067 (2021-09)
Packed Levitated Marker for Entity and Relation Extraction
2025.findings-emnlp.1354 (2025 (year only))
Dependency Parsing-Based Syntactic Enhancement of Relation Extraction in Scientific Texts
get_saved_checkpoint 1 other paper
1 dated earlier
2025.findings-emnlp.1354 (2025 (year only))
Dependency Parsing-Based Syntactic Enhancement of Relation Extraction in Scientific Texts
set_logger 1 other paper
1 dated earlier
2025.findings-emnlp.1354 (2025 (year only))
Dependency Parsing-Based Syntactic Enhancement of Relation Extraction in Scientific Texts

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

Automated knowledge graph (KG) construction is essential for navigating the rapidly expanding body of scientific literature. However, existing approaches face persistent challenges: they struggle to recognize long multi-word entities, often fail to generalize across domains, and typically overlook the hierarchical and logically constrained nature of scientific knowledge. While general-purpose large language models (LLMs) offer some adaptability, they are computationally expensive and yield inconsistent accuracy on specialized, domain-heavy tasks such as scientific knowledge graph construction. As a result, current KGs are shallow and inconsistent, limiting their utility for exploration and synthesis. We propose a two-stage framework for scalable, zero-shot scientific KG construction. The first stage, Z-NERD, introduces (i) Orthogonal Semantic Decomposition (OSD), which promotes domain-agnostic entity recognition by isolating semantic "turns" in text, and (ii) a Multi-Scale TCQK attention mechanism that captures coherent multi-word entities through n-gram-aware attention heads. The second stage, HGNet, performs relation extraction with hierarchy-aware message passing, explicitly modeling parent, child, and peer relations. To enforce global consistency, we introduce two complementary objectives: a Differentiable Hierarchy Loss to discourage cycles and shortcut edges, and a Continuum Abstraction Field (CAF) Loss that embeds abstraction levels along a learnable axis in Euclidean space. To the best of our knowledge, this is the first approach to formalize hierarchical abstraction as a continuous property within standard Euclidean embeddings, offering a simpler and more interpretable alternative to hyperbolic methods. To address data scarcity, we also release SPHERE 1 , a large-scale, multidomain benchmark for hierarchical relation extraction. Our framework establishes a new state of the art on benchmarks such as SciERC, SciER and SPHERE benchmarks, improving named entity recognition (NER) by 8.08% and relation extraction (RE) by 5.99% on the official out-of-distribution test sets. In zeroshot settings, the gains are even more pronounced, with improvements of 10.76% for NER and 26.2% for RE, marking a significant step toward reliable and scalable scientific knowledge graph construction. Our HGNet code is available at https://github.com/basiralab/HGNet.

For agents

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

get_harvested_code_for_paper("2603.23136")
get_code_for_paper("2603.23136")
have("2603.23136")

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

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

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

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

Connect an agent — have() is free.