SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.13957 · 2022

PIE: a Parameter and Inference Efficient Solution for Large Scale Knowledge Graph Embedding Reasoning

arXiv · PDF · Open in the Atlas

Code that ran

12 of 15 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 12 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2204.13957.json · badge: /api/ran/2204.13957.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
alipay/parameter_inference_efficient_pie canonical (classifier label)
classifier basis not recorded on the link
12 ran · 3 no recorded run
FunctionStatusWhere it lives
count_all_paths Ran
ran on a synthesized input
alipay/parameter_inference_efficient_pie/entity_typing/src/utils.py
code served (permissive licence) · get_code("43b5e3fa582da3d7")
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.

from collections import defaultdict

# Build e2re: entity to relationship-entity pairs mapping
# e2re[entity] = [(relation_id, target_entity), ...]
e2re = {
    0: [(0, 1), (1, 2)],      # entity 0 connects to entities 1 and 2
    1: [(2, 3), (3, 0)],      # entity 1 connects to entities 3 and 0
    2: [(4, 3)],              # entity 2 connects to entity 3
    3: [(5, 0), (6, 1)],      # entity 3 connects to entities 0 and 1
}

# Build head2tails: list of (head_entity, set_of_tail_entities)
head2tails = [
    (0, {3}),      # from head 0, we want paths to tail 3
    (1, {0, 2}),   # from head 1, we want paths to tails 0 and 2
]

max_path_len = 3
pid = 1

inputs = (e2re, max_path_len, head2tails, pid)

ARGS = {
    "inputs": inputs
}
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
get_compatible_batch_size Ran
ran on a synthesized input
alipay/parameter_inference_efficient_pie/candidate/utils.py
code served (permissive licence) · get_code("5d2141cb615d084d")
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 int, ndim 0, dtype family int, 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 math

def get_compatible_batch_size(batch_size, neg_sample_size):
    if neg_sample_size < batch_size and batch_size % neg_sample_size != 0:
        old_batch_size = batch_size
        batch_size = int(math.ceil(batch_size / neg_sample_size) * neg_sample_size)
        print('batch size ({}) is incompatible to the negative sample size ({}). Change the batch size to {}'.format(old_batch_size, neg_sample_size, batch_size))
    return batch_size


ARGS = {
    "batch_size": 10,
    "neg_sample_size": 3
}
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 int, ndim 0, dtype family int, 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
get_params_for_mp Ran
ran on a synthesized input
alipay/parameter_inference_efficient_pie/entity_typing/src/utils.py
code served (permissive licence) · get_code("b5db0d52d633b48d")
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 multiprocessing as mp

def get_params_for_mp(n_triples):
    n_cores = mp.cpu_count()
    pool = mp.Pool(n_cores)
    avg = n_triples // n_cores
    range_list = []
    start = 0
    for i in range(n_cores):
        num = avg + 1 if i < n_triples - avg * n_cores else avg
        range_list.append([start, start + num])
        start += num
    return (n_cores, pool, range_list)

ARGS = {
    "n_triples": 100
}
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
get_partition_dataset Ran
ran on a synthesized input
alipay/parameter_inference_efficient_pie/candidate/KGDataset.py
code served (permissive licence) · get_code("f5ccd995ef379580")
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 os
import tempfile
import shutil

# Create temporary directory structure with necessary files
tmpdir = tempfile.mkdtemp()
data_path = tmpdir
data_name = "test_kg"
part_id = 0

# Create partition directory
part_name = os.path.join(data_name, 'partition_' + str(part_id))
part_dir = os.path.join(data_path, part_name)
os.makedirs(part_dir, exist_ok=True)

# Create relation_count.txt
relation_path = os.path.join(part_dir, 'relation_count.txt')
with open(relation_path, 'w') as f:
    f.write('5\n')  # 5 relations

# Create train.txt with sample triples
train_path = os.path.join(part_dir, 'train.txt')
with open(train_path, 'w') as f:
    f.write('0\t0\t1\n')
    f.write('1\t1\t2\n')
    f.write('2\t2\t3\n')

# Create local_to_global.txt with entity mappings
local2global_path = os.path.join(part_dir, 'local_to_global.txt')
with open(local2global_path, 'w') as f:
    f.write('0\n')
    f.write('1\n')
    f.write('2\n')
    f.write('3\n')

# Create partition_book.txt with partition assignments
partition_book_path = os.path.join(part_dir, 'partition_book.txt')
with open(partition_book_path, 'w') as f:
    f.write('0\n')
    f.write('0\n')
    f.write('1\n')
    f.write('1\n')

ARGS = {
    'data_path': data_path,
    'data_name': data_name,
    'part_id': part_id
}
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
load_model_config Ran
ran on a synthesized input
alipay/parameter_inference_efficient_pie/candidate/utils.py
code served (permissive licence) · get_code("fe11f904a96ceb2c")
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 tempfile
import os

# Create a temporary directory and config file
temp_dir = tempfile.mkdtemp()
config_file = os.path.join(temp_dir, "config.json")

# Create a valid config dict and write it to the file
config_dict = {
    "model_name": "test_model",
    "hidden_size": 768,
    "num_layers": 12,
    "vocab_size": 30522,
    "max_position_embeddings": 512
}

with open(config_file, 'w') as f:
    json.dump(config_dict, f)

ARGS = {
    "config_f": config_file
}
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
read_entities Ran
ran on a synthesized input
alipay/parameter_inference_efficient_pie/entity_typing/src/data_processer.py
code served (permissive licence) · get_code("fd92338302edcbb5")
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 tempfile
import os

# Create a temporary file with entity data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("0\tentity_one\n")
temp_file.write("1\tentity_two\n")
temp_file.write("2\tentity_three\n")
temp_file.close()

ARGS = {
    'file_name': temp_file.name
}
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
read_relations Ran
ran on a synthesized input
alipay/parameter_inference_efficient_pie/entity_typing/src/data_processer.py
code served (permissive licence) · get_code("d2bc5fbe86f233c4")
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 tempfile
import os

# Create a temporary file with relation data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("0\trelation1\n")
temp_file.write("1\trelation2\n")
temp_file.write("2\trelation3\n")
temp_file.close()

ARGS = {
    'file_name': temp_file.name,
    'add_reverse': True
}

# Clean up after defining ARGS
import atexit
atexit.register(lambda: os.unlink(temp_file.name))
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
read_triplets Ran
ran on a synthesized input
alipay/parameter_inference_efficient_pie/entity_typing/src/data_processer.py
code served (permissive licence) · get_code("d2294a70e3d013fd")
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 ndarray, ndim 2, dtype family int, shape (4, 3) 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 numpy as np
import tempfile
import os

# Create a temporary file with triplet data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("alice\tknows\tbob\n")
temp_file.write("charlie\tloves\tdiana\n")
temp_file.close()

# Create entity and relation dictionaries
entity_dict = {
    "alice": 0,
    "bob": 1,
    "charlie": 2,
    "diana": 3
}

relation_dict = {
    "knows": 0,
    "knowsrev": 1,
    "loves": 2,
    "lovesrev": 3
}

# Define ARGS
ARGS = {
    "file_name": temp_file.name,
    "entity_dict": entity_dict,
    "relation_dict": relation_dict,
    "add_reverse": True
}
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 ndarray, ndim 2, dtype family int, shape (4, 3) — shape (4, 3) 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
test_step_loss Ran
ran on a synthesized input
alipay/parameter_inference_efficient_pie/entity_typing/src/model.py
code served (permissive licence) · get_code("a29184cfc113cc69")
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 float, 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 torch.nn as nn

torch.manual_seed(0)

class DummyModel(nn.Module):
    def __init__(self, use_bce=False, use_ranking_loss=False):
        super().__init__()
        self.use_bce = use_bce
        self.use_ranking_loss = use_ranking_loss
        self.linear = nn.Linear(4, 3)
        
        if use_bce or use_ranking_loss:
            self.loss = nn.BCEWithLogitsLoss()
        else:
            self.loss = nn.CrossEntropyLoss()
    
    def forward(self, batch):
        x = batch['x']
        return self.linear(x)

# Create model with use_bce=False and use_ranking_loss=False (cross-entropy path)
model = DummyModel(use_bce=False, use_ranking_loss=False)

# Create batch with cross-entropy labels
batch = {
    'x': torch.randn(2, 4),
    'labels': torch.tensor([0, 2], dtype=torch.long)
}

ARGS = {
    'model': model,
    'batch': batch
}
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 float, 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
test_step_score Ran
ran on a synthesized input
alipay/parameter_inference_efficient_pie/entity_typing/src/model.py
code served (permissive licence) · get_code("e4b19c01ab75f646")
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, 3) 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 SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.use_bce = False
        self.use_ranking_loss = False
        self.linear = nn.Linear(4, 3)
    
    def forward(self, batch):
        return self.linear(batch)

model = SimpleModel()
batch = torch.randn(2, 4)

ARGS = {
    "model": model,
    "batch": batch
}
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, 3) — shape (2, 3) 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
thread_wrapped_func Ran
ran on a synthesized input
alipay/parameter_inference_efficient_pie/candidate/utils.py
code served (permissive licence) · get_code("6949df7260ec105e")
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 function. 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 functools import wraps
from _thread import start_new_thread
from torch.multiprocessing import Queue
import traceback

torch.manual_seed(0)

# Define a simple function to wrap
def simple_func(x, y):
    """A simple function that performs basic computation."""
    return x + y

# Apply the decorator
@wraps(simple_func)
def decorated_function(*args, **kwargs):
    queue = Queue()

    def _queue_result():
        exception, trace, res = (None, None, None)
        try:
            res = simple_func(*args, **kwargs)
        except Exception as e:
            exception = e
            trace = traceback.format_exc()
        queue.put((res, exception, trace))
    start_new_thread(_queue_result, ())
    result, exception, trace = queue.get()
    if exception is None:
        return result
    else:
        assert isinstance(exception, Exception)
        raise exception.__class__(trace)

ARGS = {
    "func": decorated_function,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
train_step Ran
ran on a synthesized input
alipay/parameter_inference_efficient_pie/entity_typing/src/model.py
code served (permissive licence) · get_code("de25933894de2114")
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 float, 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 torch.nn as nn

torch.manual_seed(0)

# Build a minimal model that satisfies the function's usage
class MinimalModel(nn.Module):
    def __init__(self, use_bce=False, use_ranking_loss=False):
        super().__init__()
        self.linear = nn.Linear(4, 3)
        self.use_bce = use_bce
        self.use_ranking_loss = use_ranking_loss
        
        # Define loss function
        if use_bce or use_ranking_loss:
            self.loss = nn.BCEWithLogitsLoss()
        else:
            self.loss = nn.CrossEntropyLoss()
    
    def forward(self, batch):
        # batch is a dict with 'input' key containing logits/features
        x = batch['input']
        logits = self.linear(x)
        return logits

# Create model instance
model = MinimalModel(use_bce=False, use_ranking_loss=False)

# Create optimizer
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

# Create batch with appropriate structure
# For CrossEntropyLoss (when use_bce and use_ranking_loss are False)
batch = {
    'input': torch.randn(2, 4),  # batch_size=2, input_dim=4
    'labels': torch.tensor([0, 1], dtype=torch.long)  # class labels for CrossEntropyLoss
}

# Create uni_weight parameter
uni_weight = 0.5

ARGS = {
    'model': model,
    'optimizer': optimizer,
    'batch': batch,
    'uni_weight': uni_weight
}
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 float, 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
count_all_paths_with_mp Not yet run
unverified (harvested, no recorded run)
alipay/parameter_inference_efficient_pie/entity_typing/src/utils.py
code served (permissive licence) · get_code("018bf3f65be492cc")
How it ran

no invocation recorded.

get_server_partition_dataset Not yet run
unverified (harvested, no recorded run)
alipay/parameter_inference_efficient_pie/candidate/KGDataset.py
code served (permissive licence) · get_code("781f017533eedd24")
How it ran

no invocation recorded.

infer Not yet run
unverified (harvested, no recorded run)
alipay/parameter_inference_efficient_pie/candidate/get_candidate_dgl.py
code served (permissive licence) · get_code("ad37003f04543138")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 11 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
count_all_paths 1 other paper
1 dated earlier
2002.06757 (2020-02)
Relational Message Passing for Knowledge Graph Completion
count_all_paths_with_mp 1 other paper
1 dated earlier
2002.06757 (2020-02)
Relational Message Passing for Knowledge Graph Completion
get_params_for_mp 1 other paper
1 dated earlier
2002.06757 (2020-02)
Relational Message Passing for Knowledge Graph Completion
read_entities 1 other paper
1 dated earlier
2002.06757 (2020-02)
Relational Message Passing for Knowledge Graph Completion

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

Repositories linked to this paper

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

Abstract

Knowledge graph (KG) embedding methods which map entities and relations to unique embeddings in the KG have shown promising results on many reasoning tasks. However, the same embedding dimension for both dense entities and sparse entities will cause either over parameterization (sparse entities) or under fitting (dense entities). Normally, a large dimension is set to get better performance. Meanwhile, the inference time grows log-linearly with the number of entities for all entities are traversed and compared. Both the parameter and inference become challenges when working with huge amounts of entities. Thus, we propose PIE, a \textbf{p}arameter and \textbf{i}nference \textbf{e}fficient solution. Inspired from tensor decomposition methods, we find that decompose entity embedding matrix into low rank matrices can reduce more than half of the parameters while maintaining comparable performance. To accelerate model inference, we propose a self-supervised auxiliary task, which can be seen as fine-grained entity typing. By randomly masking and recovering entities' connected relations, the task learns the co-occurrence of entity and relations. Utilizing the fine grained typing, we can filter unrelated entities during inference and get targets with possibly sub-linear time requirement. Experiments on link prediction benchmarks demonstrate the proposed key capabilities. Moreover, we prove effectiveness of the proposed solution on the Open Graph Benchmark large scale challenge dataset WikiKG90Mv2 and achieve the state of the art performance.

For agents

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

get_harvested_code_for_paper("2204.13957")
get_code_for_paper("2204.13957")
have("2204.13957")

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

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

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

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

Connect an agent — have() is free.