SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1911.08936 · 2019

Knowledge Graph Alignment Network with Gated Multi-hop Neighborhood Aggregation

arXiv · PDF · Open in the Atlas

Code that ran

14 of 16 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 14 have no contract verdict; 0 failures of our instrument; 2 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/1911.08936.json · badge: /api/ran/1911.08936.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
nju-websoft/AliNet canonical (classifier label)
classifier basis: census
14 ran · 2 no recorded run
FunctionStatusWhere it lives
dropout Ran
ran on a synthesized input
nju-websoft/AliNet/code/gnn/gcn/layers.py
code served (permissive licence) · get_code("07e71e2afeccab7f")
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 EagerTensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

# Create a small sparse tensor for testing
indices = np.array([[0, 0], [1, 2], [1, 3]], dtype=np.int64)
values = np.array([1.0, 2.0, 3.0], dtype=np.float32)
dense_shape = np.array([2, 4], dtype=np.int64)
sparse_x = tf.SparseTensor(indices=indices, values=values, dense_shape=dense_shape)

# Create a regular dense tensor for the non-sparse case
dense_inputs = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

# Parameters for dropout
drop_rate = 0.5
noise_shape = [2, 4]

ARGS = {
    "inputs": dense_inputs,
    "drop_rate": drop_rate,
    "noise_shape": noise_shape,
    "is_sparse": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
enhance_triples Ran
ran on a synthesized input
nju-websoft/AliNet/code/align/preprocess.py
code served (permissive licence) · get_code("f0ef498a850e7f2e")
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.

class KnowledgeGraph:
    def __init__(self, triples, out_related_ents_dict):
        self.triples = triples
        self.out_related_ents_dict = out_related_ents_dict

kg1 = KnowledgeGraph(
    triples=[
        (0, 'rel1', 1),
        (1, 'rel2', 2),
        (2, 'rel3', 3),
    ],
    out_related_ents_dict={
        0: {1},
        1: {2},
        2: {3},
    }
)

kg2 = KnowledgeGraph(
    triples=[
        (10, 'rel1', 11),
        (11, 'rel2', 12),
        (12, 'rel3', 13),
    ],
    out_related_ents_dict={
        10: {11},
        11: {12},
        12: {13},
    }
)

ents1 = [0, 1, 2]
ents2 = [10, 11, 12]

ARGS = {
    'kg1': kg1,
    'kg2': kg2,
    'ents1': ents1,
    'ents2': ents2,
}
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
find_alignment Ran
ran on a synthesized input
nju-websoft/AliNet/code/align/semi_align.py
code served (permissive licence) · get_code("0d922046ee1d121f")
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 set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a simple similarity matrix
# Shape: (4, 4) - 4 entities with pairwise similarity scores
np.random.seed(0)
sim_mat = np.random.rand(4, 4)

# Make it symmetric and normalize to [0, 1]
sim_mat = (sim_mat + sim_mat.T) / 2
np.fill_diagonal(sim_mat, 1.0)

# Set some values above a threshold to ensure valid filtering
sim_mat[0, 1] = 0.85
sim_mat[1, 0] = 0.85
sim_mat[0, 2] = 0.75
sim_mat[2, 0] = 0.75
sim_mat[1, 3] = 0.90
sim_mat[3, 1] = 0.90

# Parameters
sim_th = 0.7  # Similarity threshold
k = 2  # k nearest neighbors

ARGS = {
    'sim_mat': sim_mat,
    'sim_th': sim_th,
    'k': k
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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_neighbours Ran
ran on a synthesized input
nju-websoft/AliNet/code/align/sample.py
code served (permissive licence) · get_code("3a0eb87fcf00aaf0")
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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Define small test data
# frags: list of fragment identifiers (strings)
frags = ["frag_0", "frag_1"]

# sub_embed1: embedding matrix for fragments (shape: 2, 4)
# This is the query embeddings
sub_embed1 = np.random.randn(2, 4).astype(np.float32)

# entity_list2: array of entity identifiers (shape: 5,)
# These are the entities we're searching in
entity_list2 = np.array(["entity_0", "entity_1", "entity_2", "entity_3", "entity_4"])

# embed2: embedding matrix for entities (shape: 5, 4)
# This is the key embeddings to search against
embed2 = np.random.randn(5, 4).astype(np.float32)

# k: number of neighbors to find
k = 3

ARGS = {
    "frags": frags,
    "sub_embed1": sub_embed1,
    "entity_list2": entity_list2,
    "embed2": embed2,
    "k": k
}
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 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
find_potential_alignment_greedily Ran
ran on a synthesized input
nju-websoft/AliNet/code/align/semi_align.py
code served (permissive licence) · get_code("61697edb32714238")
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 set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small similarity matrix
# Shape (4, 4) - 4 entities
np.random.seed(0)
sim_mat = np.random.rand(4, 4)

# Make it more realistic - diagonal should be high (entity similar to itself)
np.fill_diagonal(sim_mat, 1.0)

# Set some reasonable similarity values
sim_mat[0, 1] = 0.85
sim_mat[1, 0] = 0.85
sim_mat[0, 2] = 0.75
sim_mat[2, 0] = 0.75
sim_mat[1, 3] = 0.65
sim_mat[3, 1] = 0.65

# Similarity threshold - only pairs with similarity > 0.7 are considered
sim_th = 0.7

ARGS = {
    "sim_mat": sim_mat,
    "sim_th": sim_th
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
generate_3hop_triples Ran
ran on a synthesized input
nju-websoft/AliNet/code/align/preprocess.py
code served (permissive licence) · get_code("d2a5c3da9bd45dbc")
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 set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import pandas as pd

class MockKG:
    def __init__(self):
        self.triples = [
            ('ent1', 'rel1', 'ent2'),
            ('ent2', 'rel2', 'ent3'),
            ('ent3', 'rel3', 'ent4'),
            ('ent4', 'rel1', 'ent5'),
            ('ent1', 'rel2', 'ent5'),
            ('ent5', 'rel3', 'ent6'),
        ]
        self.out_related_ents_dict = {
            'ent1': {'ent2', 'ent5'},
            'ent2': {'ent3'},
            'ent3': {'ent4'},
            'ent4': {'ent5'},
            'ent5': {'ent6'},
        }
        self.in_related_ents_dict = {
            'ent2': {'ent1'},
            'ent3': {'ent2'},
            'ent4': {'ent3'},
            'ent5': {'ent4', 'ent1'},
            'ent6': {'ent5'},
        }

kg = MockKG()

two_hop_triples = [
    ('ent1', 'rel1', 'ent2'),
    ('ent2', 'rel2', 'ent3'),
    ('ent3', 'rel3', 'ent4'),
    ('ent4', 'rel1', 'ent5'),
    ('ent1', 'rel2', 'ent5'),
    ('ent5', 'rel3', 'ent6'),
]

linked_ents = {'ent1', 'ent2', 'ent3', 'ent4', 'ent5', 'ent6'}

ARGS = {
    'kg': kg,
    'two_hop_triples': two_hop_triples,
    'linked_ents': linked_ents,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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_neighbor_counterparts Ran
ran on a synthesized input
nju-websoft/AliNet/code/alinet_func.py
code served (permissive licence) · get_code("a3541e84dd1b5f4b")
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 set. 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

# Analyze the function: get_neighbor_counterparts takes two parameters:
# 1. neighbors - used in: for n in neighbors, if n in alignment_dic
# 2. alignment_dic - used in: if n in alignment_dic, alignment_dic.get(n)
#
# The function iterates over neighbors and checks membership in alignment_dic,
# then retrieves values from alignment_dic. This suggests:
# - neighbors should be an iterable (list, set, etc.) of hashable items
# - alignment_dic should be a dict-like object mapping those items to values

# Create sample data
neighbors = ['node_a', 'node_b', 'node_c', 'node_d']
alignment_dic = {
    'node_a': 'counterpart_1',
    'node_b': 'counterpart_2',
    'node_d': 'counterpart_4'
    # node_c is intentionally missing to test the conditional
}

ARGS = {
    'neighbors': neighbors,
    'alignment_dic': alignment_dic
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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_neighbor_dict Ran
ran on a synthesized input
nju-websoft/AliNet/code/alinet_func.py
code served (permissive licence) · get_code("ad5aab11344c6cf6")
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

torch.manual_seed(0)

# Analyze the function: get_neighbor_dict takes two dicts (out_dict and in_dict)
# and merges them, using set union (|=) on values.
# The function expects dict values to be sets (or set-like objects that support |= operator)

out_dict = {
    'key_a': {'value1', 'value2'},
    'key_b': {'value3'}
}

in_dict = {
    'key_a': {'value2', 'value4'},
    'key_c': {'value5', 'value6'}
}

ARGS = {
    'out_dict': out_dict,
    'in_dict': in_dict
}
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 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
merge_dic Ran
ran on a synthesized input
nju-websoft/AliNet/code/align/util.py
code served (permissive licence) · get_code("8fcdda216ea70bc6")
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

torch.manual_seed(0)

# Analyze the function: merge_dic(dic1, dic2)
# The function simply merges two dictionaries using the ** unpacking operator
# It returns {**dic1, **dic2}
# Both parameters must be dictionaries

dic1 = {
    "key1": "value1",
    "key2": 42,
    "key3": [1, 2, 3]
}

dic2 = {
    "key4": "value4",
    "key5": 3.14,
    "key6": {"nested": "dict"}
}

ARGS = {
    "dic1": dic1,
    "dic2": dic2
}
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
read_links Ran
ran on a synthesized input
nju-websoft/AliNet/code/align/util.py
code served (permissive licence) · get_code("05d6a59d8b6a7b2a")
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 tempfile
import os

# Create a temporary file with tab-separated link data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt', encoding='utf8')
temp_file.write("entity1\tentity2\n")
temp_file.write("person_a\tperson_b\n")
temp_file.write("location_x\tlocation_y\n")
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
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 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
read_relation_triples Ran
ran on a synthesized input
nju-websoft/AliNet/code/align/util.py
code served (permissive licence) · get_code("39c8dad33801fffc")
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 tempfile
import os

# Create a temporary file with relation triple data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt', encoding='utf8')
temp_file.write("entity1\trelation1\tentity2\n")
temp_file.write("entity2\trelation2\tentity3\n")
temp_file.write("entity1\trelation3\tentity3\n")
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
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
read_triples Ran
ran on a synthesized input
nju-websoft/AliNet/code/align/input.py
code served (permissive licence) · get_code("d4bf18bc4a71f971")
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 set. 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 tab-separated triple data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt', encoding='utf8')
temp_file.write("0\t1\t2\n")
temp_file.write("3\t4\t5\n")
temp_file.write("6\t7\t8\n")
temp_file.close()

ARGS = {
    'file': 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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
remove_unlinked_triples Ran
ran on a synthesized input
nju-websoft/AliNet/code/align/preprocess.py
code served (permissive licence) · get_code("66d3ee45da6a2d88")
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.

# Analyze the function to understand what it needs:
# - triples: an iterable of tuples (h, r, t) where h and t are entity IDs
# - linked_ents: a collection (set, list, etc.) of entity IDs to filter by

# The function iterates through triples and keeps only those where both
# the head (h) and tail (t) entities are in linked_ents.

# Create sample data
triples = {
    (0, 'rel1', 1),
    (1, 'rel2', 2),
    (2, 'rel3', 3),
    (0, 'rel4', 5),  # This will be removed since 5 is not in linked_ents
    (3, 'rel5', 4),
    (4, 'rel6', 0),
}

linked_ents = {0, 1, 2, 3, 4}

ARGS = {
    'triples': triples,
    'linked_ents': linked_ents,
}
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 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
update_labeled_alignment_x Ran
ran on a synthesized input
nju-websoft/AliNet/code/alinet_func.py
code served (permissive licence) · get_code("8d8e78bf87150681")
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 set. 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)

# Analyze function usage:
# - aligned_pairs: list/set of (x, y) tuples where x and y are compared with ==
# - sim_mat: 2D array/tensor indexed with [i, j] and compared with >=
# - pre_labeled_alignment and curr_labeled_alignment: both used as iterables of (i, j) pairs
#   and one is converted to dict and set

# Create small similarity matrix (5x5 to have distinct indices)
sim_mat = torch.tensor([
    [0.9, 0.1, 0.2, 0.3, 0.4],
    [0.1, 0.8, 0.5, 0.2, 0.1],
    [0.2, 0.5, 0.7, 0.6, 0.3],
    [0.3, 0.2, 0.6, 0.85, 0.4],
    [0.4, 0.1, 0.3, 0.4, 0.75]
], dtype=torch.float32)

# Pre-labeled alignment: mostly diagonal (self-aligned)
pre_labeled_alignment = [
    (0, 0),
    (1, 1),
    (2, 2),
    (3, 3),
]

# Current labeled alignment: some changes and new pairs
curr_labeled_alignment = [
    (0, 0),
    (1, 2),  # change from (1,1) to (1,2) - new_sim=0.5 >= pre_sim=0.8? No, won't update
    (2, 3),  # change from (2,2) to (2,3) - new_sim=0.6 >= pre_sim=0.7? No, won't update
    (3, 3),
    (4, 4),  # new entry
]

ARGS = {
    'pre_labeled_alignment': pre_labeled_alignment,
    'curr_labeled_alignment': curr_labeled_alignment,
    'sim_mat': sim_mat,
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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_potential_alignment_mwgm Not yet run
unverified (harvested, no recorded run)
nju-websoft/AliNet/code/align/semi_align.py
code served (permissive licence) · get_code("1da0e8384b145f4c")
How it ran

no invocation recorded.

sparse_dropout Not yet run
unverified (harvested, no recorded run)
nju-websoft/AliNet/code/gnn/gcn/layers.py
code served (permissive licence) · get_code("53639130076fc405")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 15 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
merge_dic 1 other paper
1 dated earlier
1906.02390 (2019-06)
Multi-view Knowledge Graph Embedding for Entity Alignment

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

Graph neural networks (GNNs) have emerged as a powerful paradigm for embedding-based entity alignment due to their capability of identifying isomorphic subgraphs. However, in real knowledge graphs (KGs), the counterpart entities usually have non-isomorphic neighborhood structures, which easily causes GNNs to yield different representations for them. To tackle this problem, we propose a new KG alignment network, namely AliNet, aiming at mitigating the non-isomorphism of neighborhood structures in an end-to-end manner. As the direct neighbors of counterpart entities are usually dissimilar due to the schema heterogeneity, AliNet introduces distant neighbors to expand the overlap between their neighborhood structures. It employs an attention mechanism to highlight helpful distant neighbors and reduce noises. Then, it controls the aggregation of both direct and distant neighborhood information using a gating mechanism. We further propose a relation loss to refine entity representations. We perform thorough experiments with detailed ablation studies and analyses on five entity alignment datasets, demonstrating the effectiveness of AliNet.

For agents

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

get_harvested_code_for_paper("1911.08936")
get_code_for_paper("1911.08936")
have("1911.08936")

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

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

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

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

Connect an agent — have() is free.