SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.14709 · 2023

Once Upon a $\textit{Time}$ in $\textit{Graph}$: Relative-Time Pretraining for Complex Temporal Reasoning

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 4 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/2310.14709.json · badge: /api/ran/2310.14709.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
damo-nlp-sg/rememo canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
FunctionStatusWhere it lives
compute_input_and_target_lengths Ran
ran, honoured the contract we drafted
damo-nlp-sg/rememo/src/pretrain_t5/run_seq2seq.py
code served (permissive licence) · get_code("69550b5d230761f5")
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 int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function compute_input_and_target_lengths takes three numeric parameters
# and performs mathematical operations on them. It doesn't use any complex objects.

ARGS = {
    "inputs_length": 512,
    "noise_density": 0.15,
    "mean_noise_span_length": 3.0,
}
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 tuple, ndim 1, dtype family int — 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
covert_date_to_text Ran
ran; our contract draft was wrong, not the code
damo-nlp-sg/rememo/src/pretrain_t5/generate_date_text.py
code served (permissive licence) · get_code("7500c3f837580431")
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 str. 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 random

random.seed(0)

ARGS = {
    'year': 2023,
    'month': 5,
    'day': 15
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
date_format_transform Ran
ran; our contract draft was wrong, not the code
damo-nlp-sg/rememo/src/pretrain_t5/generate_date_text.py
code served (permissive licence) · get_code("4e246616d6a7f5e8")
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 str. 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)

# The function takes a date parameter and converts it to a formatted string
# It expects the date to be convertible to a string with at least 8 characters
# Format: YYYYMMDD -> YYYY-MM-DD

# Test with a simple integer date in YYYYMMDD format
ARGS = {
    "date": 20231225
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
date_format_transform Ran
ran; our contract draft was wrong, not the code
damo-nlp-sg/rememo/src/pretrain_t5/t5_dataset.py
code served (permissive licence) · get_code("dba56fa83a4729f4")
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 torch

torch.manual_seed(0)

date_tuple = ("20220102", "20220302")

ARGS = {
    "date_tuple": date_tuple
}
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 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
shift_tokens_right Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
damo-nlp-sg/rememo/src/pretrain_t5/data_collator_for_t5.py
code served (permissive licence) · get_code("221d15006e945daa")
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 (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 numpy as np

# Create a small batch of input_ids
# Shape: (batch_size=2, sequence_length=4)
# Using token IDs in a reasonable range
input_ids = np.array([
    [101, 2054, 2003, 102],
    [101, 1045, 1005, 102]
], dtype=np.int64)

# Pad token ID (typically 0 for BERT-like models)
pad_token_id = 0

# Decoder start token ID (typically 2 for BART-like models)
decoder_start_token_id = 2

ARGS = {
    "input_ids": input_ids,
    "pad_token_id": pad_token_id,
    "decoder_start_token_id": decoder_start_token_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 ndarray, ndim 2, dtype family int, 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
time_gap_to_label Ran
ran, honoured the contract we drafted
damo-nlp-sg/rememo/src/pretrain_t5/t5_dataset.py
code served (permissive licence) · get_code("a06f7e78a244046e")
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 torch
import numpy as np

# Analyze the function: time_gap_to_label takes time_gap (numeric) and optional threshold (numeric)
# The function performs comparisons on time_gap and threshold
# time_gap should be a number that can be compared with integers
# threshold defaults to 180 and is used in arithmetic/comparisons

# Create valid test cases
time_gap_value = 100  # A numeric value that will hit one of the conditions
threshold_value = 180  # Using the default value explicitly

ARGS = {
    "time_gap": time_gap_value,
    "threshold": threshold_value
}
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 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
time_scale_to_label Ran
ran, honoured the contract we drafted
damo-nlp-sg/rememo/src/pretrain_t5/t5_dataset.py
code served (permissive licence) · get_code("b0c08ae410f3b5ce")
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 time_scale_to_label(time_gap_a, time_gap_b):
    """
    To fairly compare the scale between two time-gaps, we take ln()
        y = math.exp(x)
        ------------
        | x  |  y  |
        ------------
        0.0:  1.0000
        0.5:  1.6487
        1.0:  2.7183
        1.5:  4.4817
        2.0:  7.3891
        2.5:  12.1825
        3.0:  20.0855
        3.5:  33.1155
        4.0:  54.5982
        4.5:  90.0171
        5.0:  148.4132
        5.5:  244.6919
        6.0:  403.4288
        6.5:  665.1416
        7.0:  1096.6332
        7.5:  1808.0424
        8.0:  2980.9580
        8.5:  4914.7688
        9.0:  8103.0839
        9.5:  13359.7268
    """
    if time_gap_a == 0 and time_gap_b == 0:
        return 2
    elif time_gap_a == 0:
        return 0
    elif time_gap_b == 0:
        return 1
    if math.log(abs(time_gap_a)) >= 6 or math.log(abs(time_gap_b)) >= 6:
        ln_granularity = 0.5
    else:
        ln_granularity = 1.0
    ln_scale_gap = math.log(abs(time_gap_a)) - math.log(abs(time_gap_b))
    if abs(ln_scale_gap) <= ln_granularity:
        return 2
    elif ln_scale_gap < -1 * ln_granularity:
        return 0
    elif ln_scale_gap > ln_granularity:
        return 1
    else:
        return -100


ARGS = {
    "time_gap_a": 10.5,
    "time_gap_b": 2.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
generate_random_date_inside_span Not yet run
unverified (harvested, no recorded run)
damo-nlp-sg/rememo/src/pretrain_t5/generate_date_text.py
code served (permissive licence) · get_code("871891cce8847d7f")
How it ran

no invocation recorded.

get_optimizer Not yet run
unverified (harvested, no recorded run)
damo-nlp-sg/rememo/src/pretrain_t5/optimizer.py
code served (permissive licence) · get_code("caead9af98f52f4b")
How it ran

no invocation recorded.

postprocess_qa_predictions Not yet run
unverified (harvested, no recorded run)
damo-nlp-sg/rememo/src/odqa_t5/utils_qa.py
pointer only (licence: MIT); the stored copy get_code serves, from misonsky/chunk, is pointer only (licence: NONE) · get_code("ac56d3e7b79dbc18")
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 misonsky/chunk, 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.

postprocess_qa_predictions_with_beam_search Not yet run
unverified (harvested, no recorded run)
damo-nlp-sg/rememo/src/odqa_t5/utils_qa.py
pointer only (licence: MIT); the stored copy get_code serves, from misonsky/chunk, is pointer only (licence: NONE) · get_code("8c51f5aaf2f659e2")
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 misonsky/chunk, 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 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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, 3 later) and 7 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
postprocess_qa_predictions_with_beam_search 5 other papers
2 dated earlier, 2 later, 1 same year, order not determinable
2106.09685 (2021-06)
LoRA: Low-Rank Adaptation of Large Language Models
2205.01068 (2022-05)
OPT: Open Pre-trained Transformer Language Models
2023.acl-short.31 (2023 (year only))
PLUE: Language Understanding Evaluation Benchmark for Privacy Policies in English
and 2 more not named here
compute_input_and_target_lengths 4 other papers
3 dated earlier, 1 later
2109.10686 (2021-09)
Scale Efficiently: Insights from Pre-training and Fine-tuning Transformers
2304.06248 (2023-04)
LasUIE: Unifying Information Extraction with Latent Adaptive Structure-aware Generative Language Model
2309.02373 (2023-09)
nanoT5: A PyTorch Framework for Pre-training and Fine-tuning T5-style Models with Limited Resources
and 1 more not named here
postprocess_qa_predictions 4 other papers
1 dated earlier, 2 later, 1 same year, order not determinable
2106.09685 (2021-06)
LoRA: Low-Rank Adaptation of Large Language Models
2023.acl-short.31 (2023 (year only))
PLUE: Language Understanding Evaluation Benchmark for Privacy Policies in English
2602.08351 (2026-02)
The Chicken and Egg Dilemma: Co-optimizing Data and Model Configurations for LLMs
and 1 more not named here
shift_tokens_right 1 other paper
1 dated earlier
2206.11349 (2022-06)
Prompt Injection: Parameterization of Fixed Inputs

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

Our physical world is constantly evolving over time, rendering challenges for pre-trained language models to understand and reason over the temporal contexts of texts. Existing work focuses on strengthening the direct association between a piece of text and its time-stamp. However, the knowledge-time association is usually insufficient for the downstream tasks that require reasoning over temporal dependencies between knowledge. In this work, we make use of the underlying nature of time, all temporally-scoped sentences are strung together through a one-dimensional time axis, and suggest creating a graph structure based on the relative placements of events along the time axis. Inspired by the graph view, we propose RemeMo ($\underline{Re}$lative Ti$\underline{me}$ $\underline{Mo}$deling), which explicitly connects all temporally-scoped facts by modeling the time relations between any two sentences. Experimental results show that RemeMo outperforms the baseline T5 on multiple temporal question answering datasets under various settings. Further analysis suggests that RemeMo is especially good at modeling long-range complex temporal dependencies. We release our code and pre-trained checkpoints at $\href{https://github.com/DAMO-NLP-SG/RemeMo}{\text{this url}}$.

For agents

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

get_harvested_code_for_paper("2310.14709")
get_code_for_paper("2310.14709")
have("2310.14709")

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

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

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

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

Connect an agent — have() is free.