SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.01024 · 2020

Modeling Dynamic Heterogeneous Network for Link Prediction using Hierarchical Attention with Temporal RNN

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 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; 1 honoured the contract we drafted, 1 violated it and 7 have no contract verdict; 1 failure of our instrument; 3 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-21; 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/2004.01024.json · badge: /api/ran/2004.01024.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
skx300/DyHATR canonical (classifier label)
classifier basis: census
10 ran · 3 no recorded run
FunctionStatusWhere it lives
sigmoid Ran
ran, violated the contract we drafted
skx300/DyHATR/src/evals/validation.py
code served (permissive licence) · get_code("b8e95809ca2c17c9")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T02:39:00Z). 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

# The sigmoid function takes a single parameter 'x' which should be a numeric value or array
# Looking at the function body, it performs: 1 / (1 + np.exp(-x))
# This works with scalars, lists, or numpy arrays

# Create a small numpy array to pass as input
x_input = np.array([0.0, 1.0, -1.0, 2.0])

ARGS = {
    "x": x_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 1, dtype family float, shape (4,) — shape (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
evaluate Ran
ran on a synthesized input
skx300/DyHATR/src/models/tf_utils.py
code served (permissive licence) · get_code("3a842f5654d7a218")
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 torch
import torch.nn as nn
import tensorflow as tf
import numpy as np

# Create a minimal model class that has the required attributes
class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    @property
    def loss(self):
        return tf.constant(0.5, dtype=tf.float32)
    
    @property
    def ranks(self):
        return tf.constant([1, 2], dtype=tf.int32)
    
    @property
    def mrr(self):
        return tf.constant(0.75, dtype=tf.float32)

# Create a minimal minibatch iterator with val_feed_dict method
class MockMinibatchIter:
    def val_feed_dict(self, size=None):
        return {}

# Create a minimal TensorFlow session mock
class MockSession:
    def run(self, fetches, feed_dict=None):
        # Return values matching the structure expected: [loss, ranks, mrr]
        return [
            np.array(0.5, dtype=np.float32),  # loss
            np.array([1, 2], dtype=np.int32),  # ranks
            np.array(0.75, dtype=np.float32)   # mrr
        ]

# Build the arguments
model = MockModel()
minibatch_iter = MockMinibatchIter()
sess = MockSession()

ARGS = {
    "sess": sess,
    "model": model,
    "minibatch_iter": minibatch_iter,
    "size": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow, torch — 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_layer_uid Ran
ran, honoured the contract we drafted
skx300/DyHATR/src/models/layers.py
pointer only (licence: MIT); the stored copy get_code serves, from thumlp/tensorgcn, is pointer only (licence: NONE) · get_code("b82968db452628fd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from thumlp/tensorgcn, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_normalized_inner_product_score Ran
ran on a synthesized input
skx300/DyHATR/src/evals/validation.py
code served (permissive licence) · get_code("0c8466dd49d9a49a")
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 float64, ndim 0, 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 numpy as np

# Create two random vectors
vector1 = np.random.randn(10)
vector2 = np.random.randn(10)

ARGS = {
    "vector1": vector1,
    "vector2": vector2,
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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_sigmoid_score Ran
ran on a synthesized input
skx300/DyHATR/src/evals/validation.py
code served (permissive licence) · get_code("0bf77162d1b47a38")
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 float64, ndim 0, 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 numpy as np

# Create two small numpy vectors for the function parameters
vector1 = np.array([1.0, 2.0, 3.0, 4.0])
vector2 = np.array([0.5, 1.5, 2.5, 3.5])

ARGS = {
    "vector1": vector1,
    "vector2": vector2,
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
glorot Ran
ran on a synthesized input
skx300/DyHATR/src/models/inits.py
code served (permissive licence) · get_code("de4aa826c438014b")
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 ResourceVariable, ndim 2, dtype family float, 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 tensorflow as tf
import numpy as np

ARGS = {
    "shape": (4, 3),
    "name": "test_glorot"
}
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 ResourceVariable, ndim 2, dtype family float, 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
load_feat Ran
ran on a synthesized input
skx300/DyHATR/src/utils/data_helper.py
code served (permissive licence) · get_code("e790950168ba3c34")
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)

# The function load_feat takes a single parameter 'fileppath' (note the typo in the original)
# It appears to be a file path string based on the parameter name
# The function body simply creates an empty dict and returns it
# So we need to provide a valid file path string

ARGS = {
    "fileppath": "/tmp/features.pkl"
}
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
load_graph Ran
ran on a synthesized input
skx300/DyHATR/src/utils/data_helper.py
code served (permissive licence) · get_code("534b65288641dbdd")
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. 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 collections
import numpy as np
import networkx as nx
from datetime import datetime
import tempfile
import os

# Create a temporary TSV file with test data
temp_dir = tempfile.mkdtemp()
filepath = os.path.join(temp_dir, "test_graph.tsv")

# Write test data: source_node, dest_node, edge_type, date
test_data = """1\t2\t0\t20200101
2\t3\t0\t20200101
1\t3\t1\t20200102
3\t4\t1\t20200102
1\t2\t0\t20200103"""

with open(filepath, 'w') as f:
    f.write(test_data)

ARGS = {
    'fileppath': filepath
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
save_val_embeddings Ran
ran on a synthesized input
skx300/DyHATR/src/models/tf_utils.py
code served (permissive licence) · get_code("ff0598c61c39c6c2")
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 numpy as np
import tempfile


class MockModel:
    def __init__(self):
        self.loss = None
        self.mrr = None
        self.outputs1 = None


class MockMinibatchIter:
    def __init__(self):
        self.call_count = 0
    
    def incremental_embed_feed_dict(self, size, iter_num):
        # Return feed_dict, finished flag, and edges
        # On first call, return data; on second call, signal finished
        if self.call_count == 0:
            self.call_count += 1
            feed_dict_val = {'placeholder': np.array([1, 2, 3, 4])}
            finished = False
            edges = [(0, 1), (2, 3), (4, 5)]
            return feed_dict_val, finished, edges
        else:
            feed_dict_val = {'placeholder': np.array([5, 6, 7, 8])}
            finished = True
            edges = [(6, 7)]
            return feed_dict_val, finished, edges


class MockSession:
    def __init__(self):
        pass
    
    def run(self, fetches, feed_dict=None):
        # Return [loss, mrr, outputs1]
        # outputs1 should be shape (num_edges, embedding_dim)
        # where num_edges comes from the feed_dict context
        if feed_dict.get('placeholder', np.array([])).tolist() == [1, 2, 3, 4]:
            loss_val = 0.5
            mrr_val = 0.8
            outputs = np.random.randn(3, 4)  # 3 edges, 4-dim embeddings
        else:
            loss_val = 0.4
            mrr_val = 0.85
            outputs = np.random.randn(1, 4)  # 1 edge, 4-dim embeddings
        return [loss_val, mrr_val, outputs]


ARGS = {
    'sess': MockSession(),
    'model': MockModel(),
    'minibatch_iter': MockMinibatchIter(),
    'size': 32,
    'out_dir': tempfile.gettempdir() + '/test_embeddings/',
    'mod': '_test'
}
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
zeros Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
skx300/DyHATR/src/models/inits.py
pointer only (licence: MIT); the stored copy get_code serves, from flyingdoog/PTDNet, is pointer only (licence: NONE) · get_code("b190ef9c60b2629a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from flyingdoog/PTDNet, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

batch_normalization_layer Not yet run
unverified (harvested, no recorded run)
skx300/DyHATR/src/models/tf_utils.py
code served (permissive licence) · get_code("1199b67fba3dc5e6")
How it ran

no invocation recorded.

run_random_walks Not yet run
unverified (harvested, no recorded run)
skx300/DyHATR/src/utils/data_helper.py
code served (permissive licence) · get_code("a159ebb4535560a5")
How it ran

no invocation recorded.

uniform Not yet run
unverified (harvested, no recorded run)
skx300/DyHATR/src/models/inits.py
pointer only (licence: MIT); the stored copy get_code serves, from flyingdoog/PTDNet, is pointer only (licence: NONE) · get_code("b0d1b78daecde7e9")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from flyingdoog/PTDNet, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 5 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 5 later) and 8 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
sigmoid 51 other papers
11 dated earlier, 40 later · 2 only as an assembly brick
1505.05770 (2015-05)
Variational Inference with Normalizing Flows
1804.00779 (2018-04)
Neural Autoregressive Flows
1809.10765 (2018-09)
Auto-Encoding Knockoff Generator for FDR Controlled Variable Selection
and 48 more not named here
get_layer_uid 33 other papers
23 dated earlier, 10 later · 5 only as an assembly brick
1603.08861 (2016-03)
Revisiting Semi-Supervised Learning with Graph Embeddings
1606.09375 (2016-06)
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
1609.02907 (2016-09)
Semi-Supervised Classification with Graph Convolutional Networks
and 30 more not named here
zeros 18 other papers
10 dated earlier, 8 later
1603.08861 (2016-03)
Revisiting Semi-Supervised Learning with Graph Embeddings
1804.00823 (2018-04)
Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networks
1804.01654 (2018-04)
Pixel2Mesh: Generating 3D Mesh Models from Single RGB Images
and 15 more not named here
uniform 17 other papers
10 dated earlier, 7 later
1603.08861 (2016-03)
Revisiting Semi-Supervised Learning with Graph Embeddings
1804.00823 (2018-04)
Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networks
1804.01654 (2018-04)
Pixel2Mesh: Generating 3D Mesh Models from Single RGB Images
and 14 more not named here
evaluate 1 other paper
1 later
2206.13176 (2022-06)
A Representation Learning Framework for Property 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-21.

Repositories linked to this paper

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

Abstract

Network embedding aims to learn low-dimensional representations of nodes while capturing structure information of networks. It has achieved great success on many tasks of network analysis such as link prediction and node classification. Most of existing network embedding algorithms focus on how to learn static homogeneous networks effectively. However, networks in the real world are more complex, e.g., networks may consist of several types of nodes and edges (called heterogeneous information) and may vary over time in terms of dynamic nodes and edges (called evolutionary patterns). Limited work has been done for network embedding of dynamic heterogeneous networks as it is challenging to learn both evolutionary and heterogeneous information simultaneously. In this paper, we propose a novel dynamic heterogeneous network embedding method, termed as DyHATR, which uses hierarchical attention to learn heterogeneous information and incorporates recurrent neural networks with temporal attention to capture evolutionary patterns. We benchmark our method on four real-world datasets for the task of link prediction. Experimental results show that DyHATR significantly outperforms several state-of-the-art baselines.

For agents

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

get_harvested_code_for_paper("2004.01024")
get_code_for_paper("2004.01024")
have("2004.01024")

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

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

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

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

Connect an agent — have() is free.