SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2009.10847 · EMNLP · 2020

Message Passing for Hyper-Relational Knowledge Graphs

Mikhail Galkin, T Dresden, Gaurav Maheshwari, Ricardo Usbeck, Jens Lehmann, Priyansh Trivedi

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 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 3 have no contract verdict; 0 failures of our instrument; 2 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/2009.10847.json · badge: /api/ran/2009.10847.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
migalkin/StarE canonical (classifier label)
classifier basis: census
3 ran · 2 no recorded run
FunctionStatusWhere it lives
clean_literals Ran
ran on a synthesized input
migalkin/StarE/data_loaders/load.py
code served (permissive licence) · get_code("fc7f5a89cca1fbb7")
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 2, 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
import torch.nn as nn

torch.manual_seed(0)

# Construct test data for clean_literals
# The function filters triples [s, p, o] where o does not contain 'http://'
data = [
    ['subject1', 'predicate1', 'object_value'],  # No http://, should be kept
    ['subject2', 'predicate2', 'http://example.com/object'],  # Has http://, should be filtered
    ['subject3', 'predicate3', 'literal_string'],  # No http://, should be kept
    ['subject4', 'predicate4', 'http://another.org/resource'],  # Has http://, should be filtered
]

ARGS = {
    'data': data
}
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 2, 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_clean_wikipeople_statements Ran
ran on a synthesized input
migalkin/StarE/data_loaders/clean_datasets.py
code served (permissive licence) · get_code("9c3eff93d08c215c")
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. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T00:55:33Z. 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.

from pathlib import Path
import tempfile
import os

# Create temporary directory structure and files
tmpdir = tempfile.mkdtemp()
data_dir = Path(tmpdir) / 'data' / 'clean' / 'wikipeople'
data_dir.mkdir(parents=True, exist_ok=True)

# Create sample data files
train_data = [
    "entity1,predicate1,entity2,predicate2,entity3",
    "entity4,predicate3,entity5,predicate1,entity6",
    "entity1,predicate1,entity2,predicate2,entity3"
]

valid_data = [
    "entity2,predicate1,entity3,predicate2,entity4",
]

test_data = [
    "entity5,predicate3,entity6,predicate1,entity1",
]

with open(data_dir / 'train.txt', 'w') as f:
    f.write('\n'.join(train_data))

with open(data_dir / 'valid.txt', 'w') as f:
    f.write('\n'.join(valid_data))

with open(data_dir / 'test.txt', 'w') as f:
    f.write('\n'.join(test_data))

# Mock helper functions that are called by load_clean_wikipeople_statements
def _get_uniques_(train_data, test_data, valid_data):
    entities = set()
    predicates = set()
    for st in train_data + test_data + valid_data:
        for i, uri in enumerate(st):
            if i % 2 == 0:
                entities.add(uri)
            else:
                predicates.add(uri)
    return sorted(list(entities)), sorted(list(predicates))

def _pad_statements_(statements, maxlen):
    padded = []
    for st in statements:
        if len(st) < maxlen:
            padded.append(st + [0] * (maxlen - len(st)))
        else:
            padded.append(st[:maxlen])
    return padded

def remove_dups(statements):
    seen = set()
    result = []
    for st in statements:
        st_tuple = tuple(st)
        if st_tuple not in seen:
            seen.add(st_tuple)
            result.append(st)
    return result

# Inject helper functions into the module namespace where they'll be needed
import sys
current_module = sys.modules[__name__]
setattr(current_module, '_get_uniques_', _get_uniques_)
setattr(current_module, '_pad_statements_', _pad_statements_)
setattr(current_module, 'remove_dups', remove_dups)

# Change to temp directory so relative path works
original_cwd = os.getcwd()
os.chdir(tmpdir)

ARGS = {
    'subtype': 'quints',
    'maxlen': 17
}
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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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
remove_dups Ran
ran on a synthesized input
migalkin/StarE/data_loaders/load.py
code served (permissive licence) · get_code("94419d3d5c84b114")
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 2, 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 torch
import numpy as np
from tqdm import tqdm
from typing import List, Union, Dict, Callable

torch.manual_seed(0)

# Construct test data: a list of lists with some duplicates
# Using simple lists that can be compared with 'in' operator
data = [
    [1, 2, 3],
    [4, 5, 6],
    [1, 2, 3],  # duplicate of first
    [7, 8, 9],
    [4, 5, 6],  # duplicate of second
    [10, 11, 12]
]

ARGS = {
    "data": data
}
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 list, ndim 2, dtype family int — 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_clean_jf17k_statements Not yet run
unverified (harvested, no recorded run)
migalkin/StarE/data_loaders/clean_datasets.py
code served (permissive licence) · get_code("362fb63b88b3c6cf")
How it ran

no invocation recorded.

load_clean_wd50k Not yet run
unverified (harvested, no recorded run)
migalkin/StarE/data_loaders/clean_datasets.py
code served (permissive licence) · get_code("a3c7f120b711ec66")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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.

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

Hyper-relational knowledge graphs (KGs) (e.g., Wikidata) enable associating additional key-value pairs along with the main triple to disambiguate, or restrict the validity of a fact. In this work, we propose a message passing based graph encoder -STARE capable of modeling such hyper-relational KGs. Unlike existing approaches, STARE can encode an arbitrary number of additional information (qualifiers) along with the main triple while keeping the semantic roles of qualifiers and triples intact. We also demonstrate that existing benchmarks for evaluating link prediction (LP) performance on hyper-relational KGs suffer from fundamental flaws and thus develop a new Wikidata-based dataset -WD50K. Our experiments demonstrate that STARE based LP model outperforms existing approaches across multiple benchmarks. We also confirm that leveraging qualifiers is vital for link prediction with gains up to 25 MRR points compared to triple-based representations.

For agents

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

get_harvested_code_for_paper("2009.10847")
get_code_for_paper("2009.10847")
have("2009.10847")

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

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

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

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

Connect an agent — have() is free.