SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2020.emnlp-demos.22 · EMNLP · 2020

LibKGE A knowledge graph embedding library for reproducible research

Samuel Broscheit, Adrian Kochsiek, Rainer Gemulla, Patrick Betz, Daniel Ruffinelli

Open in the Atlas

Code that ran

4 of 6 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 4 have no contract verdict; 0 failures of our instrument; 2 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/2020.emnlp-demos.22.json · badge: /api/ran/2020.emnlp-demos.22.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
uma-pi1/kge canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
FunctionStatusWhere it lives
index_relation_types Ran
ran on a synthesized input
uma-pi1/kge/kge/indexing.py
code served (permissive licence) · get_code("8de5ea6adbb76af2")
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)

class MockDataset:
    def __init__(self):
        self._indexes = {}
        self._num_relations = 3
        # Create mock indices for train_sp_to_o and train_po_to_s
        # These map (subject/predicate, predicate/object) tuples to lists of objects/subjects
        self._train_sp_to_o = {
            (0, 0): [1, 2],           # subject 0, predicate 0 -> objects [1, 2]
            (0, 1): [1],              # subject 0, predicate 1 -> object [1]
            (1, 0): [2],              # subject 1, predicate 0 -> object [2]
            (1, 1): [0, 1, 2],        # subject 1, predicate 1 -> objects [0, 1, 2]
            (2, 2): [1],              # subject 2, predicate 2 -> object [1]
        }
        self._train_po_to_s = {
            (0, 0): [0, 1],           # predicate 0, object 0 -> subjects [0, 1]
            (0, 1): [0],              # predicate 0, object 1 -> subject [0]
            (1, 1): [0, 1],           # predicate 1, object 1 -> subjects [0, 1]
            (1, 2): [1],              # predicate 1, object 2 -> subject [1]
            (2, 1): [2],              # predicate 2, object 1 -> subject [2]
        }
    
    def num_relations(self):
        return self._num_relations
    
    def index(self, index_name):
        if index_name == 'train_sp_to_o':
            return self._train_sp_to_o
        elif index_name == 'train_po_to_s':
            return self._train_po_to_s
        else:
            raise ValueError(f"Unknown index: {index_name}")

dataset = MockDataset()

ARGS = {
    'dataset': dataset
}
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
index_relations_per_type Ran
ran on a synthesized input
uma-pi1/kge/kge/indexing.py
code served (permissive licence) · get_code("016f6033e3fdf5c1")
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

class MockConfig:
    def __init__(self):
        self.logs = []
    
    def log(self, message, prefix=''):
        self.logs.append(prefix + message)

class MockDataset:
    def __init__(self):
        self._indexes = {}
        self.config = MockConfig()
        self._relation_types = ['type_A', 'type_B', 'type_A', 'type_C', 'type_B', 'type_A']
    
    def index(self, key):
        if key == 'relation_types':
            return self._relation_types
        raise KeyError(f"Unknown index key: {key}")

ARGS = {
    'dataset': MockDataset()
}
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 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
is_number Ran
ran on a synthesized input
uma-pi1/kge/kge/misc.py
code served (permissive licence) · get_code("3087bb1d9186ca95")
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 torch
import numpy as np

torch.manual_seed(0)

ARGS = {
    "s": "42",
    "number_type": int
}
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 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
which Ran
ran on a synthesized input
uma-pi1/kge/kge/misc.py
code served (permissive licence) · get_code("5ebd841a3319a390")
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 os

# The function 'which' takes a single parameter 'program' which is a string
# representing the name or path of a program to search for in the system PATH.
# The function looks for executable files matching that program name.

# We'll provide a simple program name that might exist on most systems
ARGS = {
    "program": "python"
}
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
index_KvsAll Not yet run
unverified (harvested, no recorded run)
uma-pi1/kge/kge/indexing.py
code served (permissive licence) · get_code("79e8c86b8cbf34bf")
How it ran

no invocation recorded.

init_from Not yet run
unverified (harvested, no recorded run)
uma-pi1/kge/kge/misc.py
code served (permissive licence) · get_code("c04bd04c3945c863")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 6 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 6 later) and 0 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
index_KvsAll 2 other papers
1 later, 1 same year, order not determinable
2004.08532 (2020-04)
DGL-KE: Training Knowledge Graph Embeddings at Scale
2106.12144 (2021-06)
NodePiece: Compositional and Parameter-Efficient Representations of Large Knowledge Graphs
index_relation_types 2 other papers
1 later, 1 same year, order not determinable
2004.08532 (2020-04)
DGL-KE: Training Knowledge Graph Embeddings at Scale
2106.12144 (2021-06)
NodePiece: Compositional and Parameter-Efficient Representations of Large Knowledge Graphs
index_relations_per_type 2 other papers
1 later, 1 same year, order not determinable
2004.08532 (2020-04)
DGL-KE: Training Knowledge Graph Embeddings at Scale
2106.12144 (2021-06)
NodePiece: Compositional and Parameter-Efficient Representations of Large Knowledge Graphs
is_number 2 other papers
1 later, 1 same year, order not determinable
2008.12813 (2020-08)
HittER: Hierarchical Transformers for Knowledge Graph Embeddings
2106.12144 (2021-06)
NodePiece: Compositional and Parameter-Efficient Representations of Large Knowledge Graphs
which 2 other papers
1 later, 1 same year, order not determinable
2008.12813 (2020-08)
HittER: Hierarchical Transformers for Knowledge Graph Embeddings
2106.12144 (2021-06)
NodePiece: Compositional and Parameter-Efficient Representations of Large Knowledge Graphs
init_from 1 other paper
1 later
2106.12144 (2021-06)
NodePiece: Compositional and Parameter-Efficient Representations of Large Knowledge Graphs

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

LIBKGE 1 is an open-source PyTorch-based library for training, hyperparameter optimization, and evaluation of knowledge graph embedding models for link prediction. The key goals of LIBKGE are to enable reproducible research, to provide a framework for comprehensive experimental studies, and to facilitate analyzing the contributions of individual components of training methods, model architectures, and evaluation methods. LIBKGE is highly configurable and every experiment can be fully reproduced with a single configuration file. Individual components are decoupled to the extent possible so that they can be mixed and matched with each other. Implementations in LIBKGE aim to be as efficient as possible without leaving the scope of Python/Numpy/PyTorch. A comprehensive logging mechanism and tooling facilitates indepth analysis. LIBKGE provides implementations of common knowledge graph embedding models and training methods, and new ones can be easily added. A comparative study (Ruffinelli et al., 2020) showed that LIBKGE reaches competitive to state-of-the-art performance for many models with a modest amount of automatic hyperparameter tuning.

For agents

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

get_harvested_code_for_paper("2020.emnlp-demos.22")
get_code_for_paper("2020.emnlp-demos.22")
have("2020.emnlp-demos.22")

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

curl https://syntology.ai/api/ran/2020.emnlp-demos.22.json

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

[![Syntology run record](https://syntology.ai/api/ran/2020.emnlp-demos.22.svg)](https://syntology.ai/paper/2020.emnlp-demos.22)

Connect an agent — have() is free.