SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.06853 · ACL · 2024

Large Language Models Can Learn Temporal Reasoning

Siheng Xiong, Faramarz Fekri, Ali Payani, Ramana Kompella

arXiv · PDF · Open in the Atlas

Code that ran

12 of 27 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, 1 violated it and 1 has no contract verdict; 10 failures of our instrument; 15 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/2401.06853.json · badge: /api/ran/2401.06853.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
xiongsiheng/tg-llm canonical (classifier label)
classifier basis: census
12 ran · 15 no recorded run
FunctionStatusWhere it lives
TG_formating_change Ran
ran; our contract draft was wrong, not the code
xiongsiheng/tg-llm/src/utlis.py
code served (permissive licence) · get_code("2c503ce417d1dcb7")
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 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
import numpy as np

# Analyze the function to understand what it needs:
# - TG: list of strings containing temporal graph information
# - dataset_name: str, the original dataset name
# - targ_dataset: str or None, the target dataset name

# The function parses lines looking for 'starts at' and 'ends at' patterns
# It reformats the temporal graph based on the target dataset

# Create a sample TG (list of strings) in TGQA format
TG = [
    "Event1 starts at January 2020",
    "Event1 ends at March 2020",
    "Event2 starts at April 2020",
    "Event2 ends at June 2020",
    "",  # empty line to test filtering
    "Event3 starts at July 2020",
]

# dataset_name should be 'TGQA' (based on the assertion)
dataset_name = 'TGQA'

# targ_dataset can be 'TimeQA', 'TempReason', or None
targ_dataset = 'TimeQA'

ARGS = {
    'TG': TG,
    'dataset_name': dataset_name,
    'targ_dataset': targ_dataset
}
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 list, ndim 1, 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
add_brackets Ran
ran; our contract draft was wrong, not the code
xiongsiheng/tg-llm/src/utlis.py
code served (permissive licence) · get_code("e60f57957786c21d")
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 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

# Construct a list of strings where elements may or may not have brackets
ls = [
    "element1",
    "element2",
    "element3"
]

ARGS = {
    "ls": ls
}
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 list, ndim 1, 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
calculate_EM Ran
ran, violated the contract we drafted
xiongsiheng/tg-llm/src/Evaluation.py
code served (permissive licence) · get_code("aafcf7f19d17018f")
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 bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function calculate_EM takes two string parameters and compares them
# after removing spaces and converting to lowercase.
# We need to provide two strings as arguments.

a_gold = "Hello World"
a_pred = "helloworld"

ARGS = {
    "a_gold": a_gold,
    "a_pred": a_pred
}
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 bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
configure_experiment Ran
ran; our contract draft was wrong, not the code
xiongsiheng/tg-llm/src/Inference_in_context_learning_ppl.py
code served (permissive licence) · get_code("7bf3b153ae77bf4e")
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 argparse

ARGS = {
    'args': argparse.Namespace(
        dataset='TGQA',
        model='Llama2-7b',
        CoT=False,
        ICL=True,
        overwrite=False,
        shorten_story=False,
        print_prompt=False,
        unit_test=False
    )
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
initialize_model Ran
ran on a synthesized input
xiongsiheng/tg-llm/src/Inference_in_context_learning_ppl.py
code served (permissive licence) · get_code("04baeed1a6087e14")
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
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a minimal config dict
config = {
    'model_name': 'Llama-2-7b'  # This will be used to construct the model_name_cmp
}

# Create mock objects for model and tokenizer
# The function calls:
# - AutoTokenizer.from_pretrained(model_name_cmp)
# - tokenizer.pad_token_id = 0
# - tokenizer.padding_side = 'right'
# - AutoModelForCausalLM.from_pretrained(model_name_cmp, load_in_8bit=True, device_map='auto')
# - model.eval()

# Mock the AutoTokenizer
mock_tokenizer = Mock()
mock_tokenizer.pad_token_id = None
mock_tokenizer.padding_side = None

# Mock the AutoModelForCausalLM
mock_model = Mock()
mock_model.eval = Mock(return_value=None)

# Patch the imports
import sys
from unittest.mock import patch

# We need to mock the transformers functions, but since we can't actually download models,
# we'll create a stand-in config that avoids the actual calls

# Create a simpler approach: just pass the config
# The function will try to download, so we need to handle this differently
# Let's create a minimal config that the function expects

config = {
    'model_name': 'Llama-2-7b'
}

ARGS = {
    'config': config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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
my_generate_prompt_CoT_bs Ran
ran; our contract draft was wrong, not the code
xiongsiheng/tg-llm/src/prompt_generation.py
code served (permissive licence) · get_code("59cd476e2da672b1")
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 json

# Construct arguments for my_generate_prompt_CoT_bs
TG = [
    "2023-01-01: Event A occurred",
    "2023-01-05: Event B followed",
    "2023-01-10: Event C happened"
]

EK = [
    "Background information about Event A",
    "Context for Event B",
    "Details about Event C"
]

Q = "What is the relationship between Event A and Event C?"

prompt_format = 'plain'

ARGS = {
    'TG': TG,
    'EK': EK,
    'Q': Q,
    'prompt_format': prompt_format
}
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
my_generate_prompt_TG_Reasoning Ran
ran; our contract draft was wrong, not the code
xiongsiheng/tg-llm/src/prompt_generation.py
code served (permissive licence) · get_code("728cf1bc1de4ee15")
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 json

ARGS = {
    'dataset_name': 'TGQA',
    'split_name': '_train',
    'story': 'John went to the store. He bought milk. He returned home.',
    'TG': [
        'Event 1: John went to store at time T1',
        'Event 2: John bought milk at time T2',
        'Event 3: John returned home at time T3'
    ],
    'EK': [
        'Stores are places where people buy items',
        'Milk is a common grocery item'
    ],
    'Q': 'Where did John go first?',
    'CoT': ['John went to the store first according to the timeline'],
    'A': ['the store'],
    'f_ICL': False,
    'Q_type': 'location',
    'mode': 'train',
    'eos_token': '',
    'f_no_TG': False,
    'prompt_format': 'plain'
}
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
my_gpt_completion Ran
ran; our contract draft was wrong, not the code
xiongsiheng/tg-llm/src/Models.py
code served (permissive licence) · get_code("0f869ecd0da8b94a")
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 openai
import time
from unittest.mock import Mock, patch

# Mock the openai.ChatCompletion.create to avoid actual API calls
def mock_chat_completion_create(model, messages, request_timeout, temperature, max_tokens):
    return {
        'choices': [
            {
                'message': {
                    'content': 'This is a mock GPT response.'
                }
            }
        ]
    }

# Patch openai.ChatCompletion.create
openai.ChatCompletion.create = mock_chat_completion_create

ARGS = {
    'openai_model': 'gpt-3.5-turbo',
    'messages': [
        {'role': 'system', 'content': 'You are a helpful assistant.'},
        {'role': 'user', 'content': 'Hello, how are you?'}
    ],
    'timeout': 30,
    'max_new_tokens': 128,
    'wait_time': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — 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
parse_generation Ran
ran; our contract draft was wrong, not the code
xiongsiheng/tg-llm/src/Evaluation.py
code served (permissive licence) · get_code("b06bb22f061273b7")
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

# The function parse_generation takes a single parameter 'pred' which is a string
# It parses the string by looking for identifiers and extracting/cleaning the answer

ARGS = {
    'pred': "Answer: The solution is 42. Test: verification"
}
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
prepare_prompts Ran
ran; our contract draft was wrong, not the code
xiongsiheng/tg-llm/src/Example_accelerate_inference.py
code served (permissive licence) · get_code("67e14cf8263186c1")
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 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from transformers import AutoTokenizer

torch.manual_seed(0)

# Create a minimal stand-in tokenizer that has the required methods and attributes
class StandInTokenizer:
    def __init__(self):
        self.padding_side = 'right'
        self.pad_token_id = 0
        self.eos_token_id = 2
    
    def __call__(self, text_list, return_tensors=None, padding=None, truncation=None, pad_to_multiple_of=None, add_special_tokens=None):
        # Simulate tokenization: convert strings to token ids
        # Return a dict-like object with 'input_ids' key
        batch_size = len(text_list)
        # Create dummy token sequences of varying length
        max_len = 10
        input_ids = torch.randint(1, 100, (batch_size, max_len))
        
        # Apply left padding if padding_side is 'left'
        if self.padding_side == 'left':
            # Simulate left padding by adding pad tokens at the start
            padded = torch.full((batch_size, max_len + 2), self.pad_token_id)
            padded[:, 2:] = input_ids
            input_ids = padded
        
        attention_mask = torch.ones_like(input_ids)
        
        class TokenizerOutput:
            def __init__(self, input_ids, attention_mask):
                self.input_ids = input_ids
                self.attention_mask = attention_mask
            
            def to(self, device):
                # Return self (CPU only)
                return self
        
        return TokenizerOutput(input_ids, attention_mask)

# Create test data
prompts = [
    "Hello world",
    "How are you",
    "This is a test",
    "Another prompt here"
]

tokenizer = StandInTokenizer()

ARGS = {
    "prompts": prompts,
    "tokenizer": tokenizer,
    "batch_size": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, 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
process_CoT Ran
ran; our contract draft was wrong, not the code
xiongsiheng/tg-llm/src/utlis.py
code served (permissive licence) · get_code("8aaaded627e91fec")
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
import numpy as np

# Create valid arguments for process_CoT function
# The function takes a single parameter: ans_pred (a string)

ARGS = {
    'ans_pred': 'The steps are: first we add 2+2=4, then we multiply by 3 to get 12. Answer: 12'
}
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 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
setup_model Ran
ran; our contract draft was wrong, not the code
xiongsiheng/tg-llm/src/CoT_bootstrap.py
code served (permissive licence) · get_code("5e981e8216935d05")
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
from unittest.mock import Mock, MagicMock
from transformers import AutoTokenizer, AutoModelForCausalLM

torch.manual_seed(0)

# Create a mock tokenizer that has the required attributes
mock_tokenizer = Mock(spec=AutoTokenizer)
mock_tokenizer.pad_token_id = None
mock_tokenizer.padding_side = None

# Create a mock model that has eval() method
mock_model = Mock(spec=AutoModelForCausalLM)
mock_model.eval = Mock(return_value=None)

# Mock the from_pretrained methods to return our mock objects
AutoTokenizer.from_pretrained = Mock(return_value=mock_tokenizer)
AutoModelForCausalLM.from_pretrained = Mock(return_value=mock_model)

ARGS = {
    "model_name": "gpt2"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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
calculate_F1 Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/Evaluation.py
code served (permissive licence) · get_code("cb4f976df70802fa")
How it ran

no invocation recorded.

initialize_model_and_tokenizer Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/Inference_in_context_learning.py
code served (permissive licence) · get_code("03fb82e648b4f4cb")
How it ran

no invocation recorded.

load_and_prepare_data Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/CoT_bootstrap.py
code served (permissive licence) · get_code("d9e464347efd6ebe")
How it ran

no invocation recorded.

load_and_prepare_dataset Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/SFT_text_to_TG_Trans.py
code served (permissive licence) · get_code("f5f3d5df55849409")
How it ran

no invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/Inference_in_context_learning_ppl.py
code served (permissive licence) · get_code("c7264563bb030e10")
How it ran

no invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/SFT_TG_Reasoning.py
code served (permissive licence) · get_code("53c786894bf78ed0")
How it ran

no invocation recorded.

load_model_and_tokenizer Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/SFT_TG_Reasoning_ppl.py
code served (permissive licence) · get_code("e9cff349000673db")
How it ran

no invocation recorded.

load_test_data Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/Inference_in_context_learning.py
code served (permissive licence) · get_code("cce7996e68e164e1")
How it ran

no invocation recorded.

my_generate_prompt_ICL Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/prompt_generation.py
code served (permissive licence) · get_code("ea5ab833166b0ed2")
How it ran

no invocation recorded.

obtain_loss_in_batch Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/Models.py
code served (permissive licence) · get_code("57830d7473a5dbd2")
How it ran

no invocation recorded.

prepare_TG_pred Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/SFT_TG_Reasoning.py
code served (permissive licence) · get_code("485538ab9c196ec3")
How it ran

no invocation recorded.

prepare_data Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/SFT_TG_Reasoning_ppl.py
code served (permissive licence) · get_code("5c967fee8b9215c7")
How it ran

no invocation recorded.

read_data Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/SFT_TG_Reasoning.py
code served (permissive licence) · get_code("37999e53da63da2e")
How it ran

no invocation recorded.

run_inference Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/Example_accelerate_inference.py
code served (permissive licence) · get_code("b0e211cdbd2080be")
How it ran

no invocation recorded.

setup_directories Not yet run
unverified (harvested, no recorded run)
xiongsiheng/tg-llm/src/SFT_TG_Reasoning_ppl.py
code served (permissive licence) · get_code("c676e0c7b2233e53")
How it ran

no invocation recorded.

Also present in other papers' code

Of 27 samples lifted from this paper's linked repositories, 27 carry a function identity and 0 do not. Of the 27 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 26 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
prepare_prompts 1 other paper
1 later
2412.07618 (2024-12)
Adapting to Non-Stationary Environments: Multi-Armed Bandit Enhanced Retrieval-Augmented Generation on Knowledge 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-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

While large language models (LLMs) have demonstrated remarkable reasoning capabilities, they are not without their flaws and inaccuracies. Recent studies have introduced various methods to mitigate these limitations. Temporal reasoning (TR), in particular, presents a significant challenge for LLMs due to its reliance on diverse temporal concepts and intricate temporal logic. In this paper, we propose TG-LLM, a novel framework towards languagebased TR. Instead of reasoning over the original context, we adopt a latent representation, temporal graph (TG) that enhances the learning of TR. A synthetic dataset (TGQA), which is fully controllable and requires minimal supervision, is constructed for fine-tuning LLMs on this text-to-TG translation task. We confirmed in experiments that the capability of TG translation learned on our dataset can be transferred to other TR tasks and benchmarks. On top of that, we teach LLM to perform deliberate reasoning over the TGs via Chain-of-Thought (CoT) bootstrapping and graph data augmentation. We observed that those strategies, which maintain a balance between usefulness and diversity, bring more reliable CoTs and final results than the vanilla CoT distillation. 1

For agents

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

get_harvested_code_for_paper("2401.06853")
get_code_for_paper("2401.06853")
have("2401.06853")

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

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

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

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

Connect an agent — have() is free.