SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.01026 · NeurIPS · 2023

Temporal Graph Benchmark for Machine Learning on Temporal Graphs

Michael Bronstein, Matthias Fey, Weihua Hu, Jure Leskovec, Reihaneh Rabbany, Shenyang Huang, Farimah Poursafaei, Jacob Danovitch, Emanuele Rossi, Guillaume Rabusseau

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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 1 has no contract verdict; 5 failures of our instrument; 1 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/2307.01026.json · badge: /api/ran/2307.01026.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
fpour/tgb_baselines canonical (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
timpostuvan/CTDG-link-anomaly-detection community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
timpostuvan/tgb-link-anomaly-detection-baselines community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_src_dst_node_time_shifts Ran
ran; our contract draft was wrong, not the code
timpostuvan/CTDG-link-anomaly-detection/models/MemoryModel.py
code served (permissive licence) · get_code("727d90514a9a5475")
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 numpy as np

# Create small test data for the function
src_node_ids = np.array([0, 1, 0, 2, 1], dtype=np.int32)
dst_node_ids = np.array([1, 2, 3, 0, 1], dtype=np.int32)
node_interact_times = np.array([1.0, 2.5, 5.0, 3.2, 7.1], dtype=np.float32)

ARGS = {
    "src_node_ids": src_node_ids,
    "dst_node_ids": dst_node_ids,
    "node_interact_times": node_interact_times,
}
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, 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
edge_bank_time_window_memory Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
timpostuvan/CTDG-link-anomaly-detection/models/EdgeBank.py
code served (permissive licence) · get_code("1de6e005e59cdf96")
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 small sample data for edge history
num_edges = 8

# Source and destination node IDs
history_src_node_ids = np.array([0, 1, 2, 3, 0, 1, 2, 3], dtype=np.int32)
history_dst_node_ids = np.array([1, 2, 3, 0, 2, 3, 0, 1], dtype=np.int32)

# Interaction times (increasing sequence)
history_node_interact_times = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0], dtype=np.float32)

# Time window mode
time_window_mode = 'fixed_proportion'

# Time window proportion (keep last 50% of data)
time_window_proportion = 0.5

ARGS = {
    'history_src_node_ids': history_src_node_ids,
    'history_dst_node_ids': history_dst_node_ids,
    'history_node_interact_times': history_node_interact_times,
    'time_window_mode': time_window_mode,
    'time_window_proportion': time_window_proportion,
}
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
edge_bank_unlimited_memory Ran
ran; our contract draft was wrong, not the code
timpostuvan/CTDG-link-anomaly-detection/models/EdgeBank.py
code served (permissive licence) · get_code("0f56e3ae8a152b2b")
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 small test arrays for historical edge data
# history_src_node_ids: source node IDs for historical edges
# history_dst_node_ids: destination node IDs for historical edges

history_src_node_ids = np.array([0, 1, 2, 3, 0, 1], dtype=np.int64)
history_dst_node_ids = np.array([1, 2, 3, 0, 2, 3], dtype=np.int64)

ARGS = {
    "history_src_node_ids": history_src_node_ids,
    "history_dst_node_ids": history_dst_node_ids,
}
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
predict_link_probabilities Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
timpostuvan/CTDG-link-anomaly-detection/models/EdgeBank.py
code served (permissive licence) · get_code("8bcef3dc22f0489a")
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 1, dtype family float, shape (5,) 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

# edge_memories: a set of tuples representing edges that exist in memory
# Each edge is a tuple of (src_node_id, dst_node_id)
edge_memories = {
    (0, 1),
    (1, 2),
    (2, 3),
    (0, 3),
}

# edges_tuple: a tuple of (src_node_ids, dst_node_ids)
# Both are sequences (lists or arrays) of node IDs
src_node_ids = [0, 1, 2, 3, 5]
dst_node_ids = [1, 2, 3, 0, 6]
edges_tuple = (src_node_ids, dst_node_ids)

ARGS = {
    "edge_memories": edge_memories,
    "edges_tuple": edges_tuple,
}
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 1, dtype family float, shape (5,) — shape (5,) 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
query_pred_edge_batch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
fpour/tgb_baselines/evaluation/tgb_evaluate_LPP.py
code served (permissive licence) · get_code("cd2a79c0b37aca42")
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 3, 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)

# Create a minimal mock model that satisfies the function's usage
class MockTemporalEmbeddingModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.embedding_dim = 4
        
    def compute_src_dst_node_temporal_embeddings(self, src_node_ids, dst_node_ids, node_interact_times, 
                                                   edge_ids=None, edges_are_positive=None, 
                                                   num_neighbors=None, time_gap=None):
        # Return embeddings with shape (batch_size, embedding_dim)
        batch_size = len(src_node_ids) if hasattr(src_node_ids, '__len__') else 1
        batch_src = torch.randn(batch_size, self.embedding_dim)
        batch_dst = torch.randn(batch_size, self.embedding_dim)
        return batch_src, batch_dst

# Create mock model wrapper (function expects model[0] to have the method)
mock_embedding_model = MockTemporalEmbeddingModel()
model_wrapper = [mock_embedding_model]

# Define arguments
ARGS = {
    'model_name': 'TGAT',
    'model': model_wrapper,
    'src_node_ids': torch.tensor([0, 1], dtype=torch.long),
    'dst_node_ids': torch.tensor([2, 3], dtype=torch.long),
    'node_interact_times': torch.tensor([0.5, 1.5], dtype=torch.float),
    'edge_ids': torch.tensor([10, 11], dtype=torch.long),
    'edges_are_positive': True,
    'num_neighbors': 10,
    'time_gap': 5
}
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 tuple, ndim 3, 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
query_pred_edge_batch Ran
ran on a synthesized input
timpostuvan/tgb-link-anomaly-detection-baselines/evaluation/tgb_evaluate_linkanomdet.py
code served (permissive licence) · get_code("8a0919d4b2ca1705")
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 3, 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)

class MockTemporalEmbeddingModel(nn.Module):
    """Mock model that computes temporal embeddings"""
    def __init__(self, embedding_dim=4):
        super().__init__()
        self.embedding_dim = embedding_dim
        self.embeddings = nn.Embedding(10, embedding_dim)
    
    def compute_src_dst_node_temporal_embeddings(self, src_node_ids, dst_node_ids, node_interact_times, edge_ids=None, edges_are_positive=None, num_neighbors=None, time_gap=None):
        """Returns mock src and dst node embeddings"""
        batch_size = len(src_node_ids) if isinstance(src_node_ids, (list, torch.Tensor)) else 1
        src_embeddings = torch.randn(batch_size, self.embedding_dim)
        dst_embeddings = torch.randn(batch_size, self.embedding_dim)
        return src_embeddings, dst_embeddings

class MockModel(nn.Module):
    """Wrapper to act like model[0] indexing"""
    def __init__(self):
        super().__init__()
        self.temporal_model = MockTemporalEmbeddingModel(embedding_dim=4)
    
    def __getitem__(self, idx):
        if idx == 0:
            return self.temporal_model
        raise IndexError("Index out of range")

# Create mock model wrapped in a list-like structure
mock_model = [MockTemporalEmbeddingModel(embedding_dim=4)]

ARGS = {
    'model_name': 'TGAT',
    'model': mock_model,
    'src_node_ids': torch.tensor([0, 1]),
    'dst_node_ids': torch.tensor([2, 3]),
    'node_interact_times': torch.tensor([10.0, 20.0]),
    'edge_ids': torch.tensor([0, 1]),
    'edges_are_positive': True,
    'num_neighbors': 10,
    'time_gap': 5,
}
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 tuple, ndim 3, 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
get_link_prediction_args Not yet run
unverified (harvested, no recorded run)
fpour/tgb_baselines/utils/load_configs.py
code served (permissive licence) · get_code("b4d6c154d75cb68b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 4 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 4 the same month, 4 later) and 2 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
compute_src_dst_node_time_shifts 5 other papers
1 the same month, 4 later
2307.12510 (2023-07)
An Empirical Evaluation of Temporal Graph Benchmark
2405.17473 (2024-05)
Repeat-Aware Neighbor Sampling for Dynamic Graph Learning
2408.06966 (2024-08)
DyG-Mamba: Continuous State Space Modeling on Dynamic Graphs
and 2 more not named here
edge_bank_time_window_memory 5 other papers
1 the same month, 4 later
2307.12510 (2023-07)
An Empirical Evaluation of Temporal Graph Benchmark
2405.17473 (2024-05)
Repeat-Aware Neighbor Sampling for Dynamic Graph Learning
2408.06966 (2024-08)
DyG-Mamba: Continuous State Space Modeling on Dynamic Graphs
and 2 more not named here
edge_bank_unlimited_memory 5 other papers
1 the same month, 4 later
2307.12510 (2023-07)
An Empirical Evaluation of Temporal Graph Benchmark
2405.17473 (2024-05)
Repeat-Aware Neighbor Sampling for Dynamic Graph Learning
2408.06966 (2024-08)
DyG-Mamba: Continuous State Space Modeling on Dynamic Graphs
and 2 more not named here
predict_link_probabilities 5 other papers
1 the same month, 4 later
2307.12510 (2023-07)
An Empirical Evaluation of Temporal Graph Benchmark
2405.17473 (2024-05)
Repeat-Aware Neighbor Sampling for Dynamic Graph Learning
2408.06966 (2024-08)
DyG-Mamba: Continuous State Space Modeling on Dynamic Graphs
and 2 more not named here

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

We present the Temporal Graph Benchmark (TGB), a collection of challenging and diverse benchmark datasets for realistic, reproducible, and robust evaluation of machine learning models on temporal graphs. TGB datasets are of large scale, spanning years in duration, incorporate both node and edge-level prediction tasks and cover a diverse set of domains including social, trade, transaction, and transportation networks. For both tasks, we design evaluation protocols based on realistic use-cases. We extensively benchmark each dataset and find that the performance of common models can vary drastically across datasets. In addition, on dynamic node property prediction tasks, we show that simple methods often achieve superior performance compared to existing temporal graph models. We believe that these findings open up opportunities for future research on temporal graphs. Finally, TGB provides an automated machine learning pipeline for reproducible and accessible temporal graph research, including data loading, experiment setup and performance evaluation. TGB will be maintained and updated on a regular basis and welcomes community feedback. TGB datasets, data loaders, example codes, evaluation setup, and leaderboards are publicly available at https://tgb.complexdatalab.com/.

For agents

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

get_harvested_code_for_paper("2307.01026")
get_code_for_paper("2307.01026")
have("2307.01026")

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

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

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

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

Connect an agent — have() is free.