SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.10476 · EMNLP · 2024

Will LLMs Replace the Encoder-Only Models in Temporal Relation Classification?

Giuseppe Riccardi, Massimo Rizzoli, Gabriel Roccabruna

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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, 2 violated it and 0 have no contract verdict; 2 failures of our instrument; 1 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/2410.10476.json · badge: /api/ran/2410.10476.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
BrownFortress/LLMs-TRC canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
FunctionStatusWhere it lives
aggregate Ran
ran; our contract draft was wrong, not the code
BrownFortress/LLMs-TRC/XAI_analysis/utils/attribution_scores.py
code served (permissive licence) · get_code("4e80b769da0a37b8")
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 numpy as np

torch.manual_seed(0)

# Create a minimal tokenizer stand-in class
class MockTokenizer:
    def __init__(self):
        self.bos_token_id = 101
        self.eos_token_id = 102
        self.pad_token_id = 0
    
    def convert_ids_to_tokens(self, ids):
        # Return mock tokens, using splitter 'Ġ' for some
        token_map = {
            0: '[PAD]',
            1: 'hello',
            2: 'Ġworld',
            3: 'Ġ!',
            4: '[UNK]',
            101: '[CLS]',
            102: '[SEP]',
        }
        return [token_map.get(int(id_val), f'token_{id_val}') for id_val in ids]

# Create mock attributions (batch_size=2, seq_len=4, each attribution is a scalar tensor)
attributions = [
    [torch.tensor(0.5), torch.tensor(0.3), torch.tensor(0.8), torch.tensor(0.2)],
    [torch.tensor(0.6), torch.tensor(0.4), torch.tensor(0.7), torch.tensor(0.1)],
]

# Create input_ids (batch_size=2, seq_len=4)
input_ids = [
    [101, 1, 2, 102],  # [CLS] hello Ġworld [SEP]
    [101, 1, 3, 0],    # [CLS] hello Ġ! [PAD]
]

# Create tokenizer instance
tok = MockTokenizer()

ARGS = {
    'attributions': attributions,
    'input_ids': input_ids,
    'tok': tok,
    'aggregator': 'mean',
    'untokenize': False,
    'splitter': 'Ġ',
}
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 — 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
construct_references Ran
ran, honoured the contract we drafted
BrownFortress/LLMs-TRC/XAI_analysis/utils/attribution_scores.py
code served (permissive licence) · get_code("649a696f78a75f71")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family 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

class StandInTokenizer:
    def __init__(self):
        self.cls_token_id = 101
        self.sep_token_id = 102
        self.unk_token_id = 100
        self._token_map = {
            '[ABLATE_WORD]': 103,
        }
    
    def convert_tokens_to_ids(self, token):
        if token in self._token_map:
            return self._token_map[token]
        return self.unk_token_id

torch.manual_seed(0)

input_ids = [
    [1, 2, 3, 4, 5],
    [1, 2, 3],
]

tok = StandInTokenizer()

ARGS = {
    'input_ids': input_ids,
    'tok': tok,
}
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 2, dtype family int — 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
get_result_by_id Ran
ran; our contract draft was wrong, not the code
BrownFortress/LLMs-TRC/ICL_and_FT/stat_reader.py
code served (permissive licence) · get_code("b2c9d8d4ae54a54b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function iterates through res (expecting an iterable of dicts)
# and looks for a dict with an 'id' key matching the key parameter
# It returns the matching dict or None if not found

ARGS = {
    'key': 'item_2',
    'res': [
        {'id': 'item_1', 'value': 10, 'data': torch.randn(2, 4)},
        {'id': 'item_2', 'value': 20, 'data': torch.randn(2, 4)},
        {'id': 'item_3', 'value': 30, 'data': torch.randn(2, 4)},
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
has_numbers Ran
ran, violated the contract we drafted
BrownFortress/LLMs-TRC/ICL_and_FT/stat_reader.py
code served (permissive licence) · get_code("166eaed4a0806704")
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
import numpy as np

torch.manual_seed(0)

ARGS = {
    "input_string": "hello123world"
}
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 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
is_there_timex Ran
ran, violated the contract we drafted
BrownFortress/LLMs-TRC/ICL_and_FT/stat_reader.py
code served (permissive licence) · get_code("0f40997a01ccd3cc")
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.

class Event:
    def __init__(self, sent_id, token):
        self.sent_id = sent_id
        self.token = token

class TimeExpression:
    def __init__(self, sent_id, token):
        self.sent_id = sent_id
        self.token = token

class Document:
    def __init__(self, time_expressions, text):
        self.time_expressions = time_expressions
        self.text = text

event1 = Event(sent_id=0, token="happened")
event2 = Event(sent_id=1, token="occurred")

timex1 = TimeExpression(sent_id=0, token="2023")
timex2 = TimeExpression(sent_id=2, token="yesterday")

document = Document(
    time_expressions={0: timex1, 1: timex2},
    text={0: "The event happened on 2023", 1: "Then it occurred yesterday", 2: "No time here"}
)

ARGS = {
    "event1": event1,
    "event2": event2,
    "document": document,
    "verbose": 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 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
aggregateLLAMA Not yet run
unverified (harvested, no recorded run)
BrownFortress/LLMs-TRC/XAI_analysis/utils/attribution_scores.py
code served (permissive licence) · get_code("ded0f385824cb4b2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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.

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

The automatic detection of temporal relations among events has been mainly investigated with encoder-only models such as RoBERTa. Large Language Models (LLM) have recently shown promising performance in temporal reasoning tasks such as temporal question answering. Nevertheless, recent studies have tested the LLMs' performance in detecting temporal relations of closed-source models only, limiting the interpretability of those results. In this work, we investigate LLMs' performance and decision process in the Temporal Relation Classification task. First, we assess the performance of seven open and closed-sourced LLMs experimenting with in-context learning and lightweight fine-tuning approaches. Results show that LLMs with in-context learning significantly underperform smaller encoderonly models based on RoBERTa. Then, we delve into the possible reasons for this gap by applying explainable methods. The outcome suggests a limitation of LLMs in this task due to their autoregressive nature, which causes them to focus only on the last part of the sequence. Additionally, we evaluate the word embeddings of these two models to better understand their pre-training differences. The code and the fine-tuned models can be found respectively on GitHub 1 .

For agents

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

get_harvested_code_for_paper("2410.10476")
get_code_for_paper("2410.10476")
have("2410.10476")

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

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

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

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

Connect an agent — have() is free.