SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.16646 · NeurIPS · 2023

Language Models Can Improve Event Prediction by Few-Shot Abductive Reasoning

Fan Zhou, Hongyuan Mei, Jun Zhou, Siqiao Xue, James Zhang, Xiaoming Shi, Chenhao Tan, Kangrui Wang

arXiv · PDF · Open in the Atlas

Code that ran

19 of 24 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 13 have no contract verdict; 4 failures of our instrument; 5 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/2305.16646.json · badge: /api/ran/2305.16646.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
ilampard/lamp canonical (classifier label)
classifier basis: classifier_2025
6 ran · 3 no recorded run
statisticianinstilettos/recmetrics canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
ant-research/EasyTemporalPointProcess canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
iLampard/lamp canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
uoguelph-mlrg/LDG community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
ANHPMultiHeadAttention Ran
ran on a synthesized input · constructed an object; no result was computed
ilampard/lamp/models/ke_anhp/_model.py
code served (permissive licence) · get_code("4f8d5fca7de08dd4")
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 an instance of its own class, ANHPMultiHeadAttention: the run constructed the object and did not call it, so no result was computed. 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)

class Attention(torch.nn.Module):
    def __init__(self, dropout_rate: float=0.0, mask_method: str=None, weight_norm_method='softmax'):
        super(Attention, self).__init__()
        self.dropout_rate = dropout_rate
        self.mask_method = mask_method
        self.att_dropout_layer = torch.nn.Dropout(self.dropout_rate)
        self.score_func = exp_scaled_dot_score_method
        if mask_method is None:
            if weight_norm_method == 'sigmoid':
                self.attention_func = torch.nn.Sigmoid()
            elif weight_norm_method == 'softmax':
                self.attention_func = torch.nn.Softmax(dim=-1)
            else:
                self.attention_func = weight_norm_method
        else:
            mask_val = -2 ** 7
            if mask_method == 'causality':
                mov_diagonal = 1
            elif mask_method == 'causality-exclude':
                mov_diagonal = 0
            else:
                raise RuntimeError('Wrong mask_method:', mask_method)

            def attention_func(score):
                if weight_norm_method == 'sigmoid':
                    att_weights = torch.sigmoid(score)
                else:
                    up_tri_mask = torch.triu(torch.ones_like(score[0]) * mask_val, diagonal=mov_diagonal)
                    att_weights = torch.softmax(score + up_tri_mask, dim=-1)
                return att_weights
            self.attention_func = attention_func

    def forward(self, queries: torch.Tensor, keys: torch.Tensor, values: torch.Tensor=None):
        if queries is None:
            return (values.mean(dim=-2, keepdim=True), None)
        if keys is None:
            keys = queries
        if values is None:
            values = keys
        score = self.score_func(queries, keys)
        att_weights = self.attention_func(score)
        att_weights = self.att_dropout_layer(att_weights)
        context_vector = torch.matmul(att_weights, values)
        return (context_vector, att_weights)

class Dense(torch.nn.Module):
    def __init__(self, feat_dim, num_cells, activation=None, bias: bool=True, dropout_rate: float=0.0):
        super(Dense, self).__init__()
        self.num_cells = num_cells
        self.activation = activation
        self.linear_layer = torch.nn.Linear(feat_dim, num_cells, bias=bias)
        self.dropout_layer = torch.nn.Dropout(dropout_rate) if dropout_rate > 0 else torch.nn.Identity()

    def forward(self, x):
        x = self.linear_layer(x)
        if self.activation:
            x = self.activation(x)
        x = self.dropout_layer(x)
        return x

def exp_scaled_dot_score_method(queries, keys):
    return torch.exp(torch.matmul(queries, keys.transpose(-2, -1)) / np.sqrt(queries.size()[-1]).astype(np.float32))

class ANHPMultiHeadAttention(torch.nn.Module):
    def __init__(self, feat_dim: int, hidden_dim: int=None, dropout_rate: float=0.4, n_heads: int=4, activation=None):
        super(ANHPMultiHeadAttention, self).__init__()
        self.feat_dim = feat_dim
        self.hidden_dim = hidden_dim if hidden_dim is not None else feat_dim
        self.n_heads = n_heads
        self.dropout_rate = dropout_rate
        self.activation = activation

ARGS = {
    'feat_dim': 4,
    'hidden_dim': 8,
    'dropout_rate': 0.2,
    'n_heads': 2,
    'activation': torch.nn.ReLU()
}
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 ANHPMultiHeadAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ANHPMultiHeadAttention 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
Attention Ran
ran on a synthesized input · constructed an object; no result was computed
ilampard/lamp/models/ke_anhp/_model.py
code served (permissive licence) · get_code("71cbec2f001bc55b")
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 an instance of its own class, Attention: the run constructed the object and did not call it, so no result was computed. 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 small test tensors
batch_size = 2
n_q = 3
n_k = 4
feat_dim = 5
output_dim = 6

queries = torch.randn(batch_size, n_q, feat_dim)
keys = torch.randn(batch_size, n_k, feat_dim)
values = torch.randn(batch_size, n_k, output_dim)

ARGS = {
    'dropout_rate': 0.1,
    'mask_method': None,
    'weight_norm_method': 'softmax'
}
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 Attention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Attention 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
Dense Ran
ran on a synthesized input · constructed an object; no result was computed
ilampard/lamp/models/ke_anhp/_model.py
code served (permissive licence) · get_code("9a448be7eb920dac")
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 an instance of its own class, Dense: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Define ARGS dict with all parameters for Dense.__init__
ARGS = {
    'feat_dim': 4,
    'num_cells': 3,
    'activation': torch.nn.ReLU(),
    'bias': True,
    'dropout_rate': 0.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 Dense — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Dense 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
TimeEmbeddingLayer Ran
ran on a synthesized input · constructed an object; no result was computed
ilampard/lamp/models/ke_anhp/_model.py
code served (permissive licence) · get_code("b45ab9b5072bb2f6")
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 an instance of its own class, TimeEmbeddingLayer: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# TimeEmbeddingLayer.__init__ takes: dim, m, M
# - dim: integer, dimension of embedding
# - m: scalar, used in norm calculation
# - M: scalar, used in norm calculation
# The forward pass uses seq_time[..., None] * self.norm
# where self.norm has shape [dim]

ARGS = {
    'dim': 4,
    'm': 1.0,
    'M': 10000.0,
}
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 TimeEmbeddingLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TimeEmbeddingLayer 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
activation_layer Ran
ran; our contract draft was wrong, not the code
ant-research/EasyTemporalPointProcess/easy_tpp/model/baselayer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from AONE-NLP/NEXTPP, is pointer only (licence: NONE) · get_code("d49d5a4ade4321b5")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from AONE-NLP/NEXTPP, 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.

attention Ran
ran; our contract draft was wrong, not the code
ant-research/EasyTemporalPointProcess/easy_tpp/model/baselayer.py
code served (permissive licence) · get_code("8abbfdabbdf5e708")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 math

torch.manual_seed(0)

# Attention typically works with shape (batch, num_heads, seq_len, d_k)
# We'll use:
# - batch_size = 2
# - num_heads = 3
# - seq_len = 5
# - d_k = 4

batch_size = 2
num_heads = 3
seq_len = 5
d_k = 4

query = torch.randn(batch_size, num_heads, seq_len, d_k)
key = torch.randn(batch_size, num_heads, seq_len, d_k)
value = torch.randn(batch_size, num_heads, seq_len, d_k)

# Mask should be broadcastable to scores shape (batch, num_heads, seq_len, seq_len)
# Typically used for padding or causal masking
# mask > 0 will be filled with large negative value
mask = torch.zeros(batch_size, num_heads, seq_len, seq_len)
# Set some positions to 1 to test masking
mask[0, 0, 0, 3:] = 1
mask[1, 1, 2, 4] = 1

# Dropout is a nn.Module with forward method
dropout = torch.nn.Dropout(p=0.1)

ARGS = {
    'query': query,
    'key': key,
    'value': value,
    'mask': mask,
    'dropout': dropout
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
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
bce_loss Ran
ran on a synthesized input
iLampard/lamp/models/ebm_runner.py
code served (permissive licence) · get_code("51227b0b43c5ed30")
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 Tensor, 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)

# Analyze the function:
# - real_energy_unnorm: used with torch.sigmoid and torch.log, should be a tensor
# - fake_energys_unnorm: used with torch.sigmoid, torch.log, and .sum(dim=-1), should be a tensor with at least 1 dimension

# Create small tensors with distinct shapes
real_energy_unnorm = torch.randn(2)  # batch size 2
fake_energys_unnorm = torch.randn(2, 4)  # batch size 2, dimension 4

ARGS = {
    'real_energy_unnorm': real_energy_unnorm,
    'fake_energys_unnorm': fake_energys_unnorm
}
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 Tensor, 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
bce_score Ran
ran on a synthesized input
iLampard/lamp/models/ebm_runner.py
code served (permissive licence) · get_code("804306367162b14c")
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

torch.manual_seed(0)

# Create small tensor arguments for bce_score function
# The function takes two parameters: real_energy_unnorm and fake_energys_unnorm
# Both are used with torch.sigmoid(-x), so they should be tensors

real_energy_unnorm = torch.randn(2)  # batch size 2, scalar energy per sample
fake_energys_unnorm = torch.randn(2, 4)  # batch size 2, 4 fake energies per sample

ARGS = {
    "real_energy_unnorm": real_energy_unnorm,
    "fake_energys_unnorm": fake_energys_unnorm,
}
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 — 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
catalog_coverage Ran
ran on a synthesized input
statisticianinstilettos/recmetrics/recmetrics/metrics.py
code served (permissive licence) · get_code("170636830f7e013d")
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 float, 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 random

# Set seed for reproducibility
random.seed(42)

# Define arguments for catalog_coverage function
ARGS = {
    "predicted": [
        ['item_A', 'item_B', 'item_C'],
        ['item_X', 'item_Y', 'item_Z'],
        ['item_A', 'item_X', 'item_D'],
        ['item_B', 'item_C', 'item_E']
    ],
    "catalog": ['item_A', 'item_B', 'item_C', 'item_X', 'item_Y', 'item_Z', 'item_D', 'item_E', 'item_F'],
    "k": 2
}
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 float, 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
clamp_preserve_gradients Ran
ran; our contract draft was wrong, not the code
ant-research/EasyTemporalPointProcess/easy_tpp/model/intensity_free.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from AONE-NLP/NEXTPP, is pointer only (licence: NONE) · get_code("3105c1d665ab0317")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from AONE-NLP/NEXTPP, 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.

exp_scaled_dot_score_method Ran
ran, violated the contract we drafted
ilampard/lamp/models/ke_anhp/_model.py
code served (permissive licence) · get_code("be04fa53df26c966")
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 Tensor, ndim 3, dtype family float, shape (2, 3, 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 torch
import numpy as np

torch.manual_seed(0)

# Create sample tensors with distinct dimensions for clarity
# queries: [..., n_q, feat_dim] - shape (batch=2, n_q=3, feat_dim=4)
queries = torch.randn(2, 3, 4)

# keys: [..., n_k, feat_dim] - shape (batch=2, n_k=5, feat_dim=4)
keys = torch.randn(2, 5, 4)

ARGS = {
    "queries": queries,
    "keys": keys,
}
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 Tensor, ndim 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 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
flatten_parameters Ran
ran, honoured the contract we drafted
ant-research/EasyTemporalPointProcess/easy_tpp/model/ode_tpp.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from AONE-NLP/NEXTPP, is pointer only (licence: NONE) · get_code("615bdcf3b3a4cfbe")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from AONE-NLP/NEXTPP, 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_embedding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ilampard/lamp/models/ke_anhp/_model.py
code served (permissive licence) · get_code("3bab5ed3d30b876d")
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 Tensor, ndim 2, dtype family float, shape (2, 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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# idx: indices tensor - used as first argument to F.embedding
# embeddings: embedding matrix - used as second argument to F.embedding

# Create a small indices tensor (batch_size=2)
idx = torch.tensor([0, 1], dtype=torch.long)

# Create embeddings tensor
# Case 1: 1D embeddings (will be expanded to 2D via [:, None])
# Using shape (4,) for a 1D embedding table
embeddings_1d = torch.randn(4)

# We'll test with 2D embeddings
# Shape: (vocab_size=4, embedding_dim=3)
embeddings_2d = torch.randn(4, 3)

# Use the 2D case as it's more standard
embeddings = embeddings_2d

ARGS = {
    "idx": idx,
    "embeddings": embeddings
}
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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 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
is_listy Ran
ran on a synthesized input
statisticianinstilettos/recmetrics/recmetrics/plots.py
code served (permissive licence) · get_code("275d9ff6710f5610")
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 = {
    'x': [1, 2, 3]
}
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
make_listy Ran
ran on a synthesized input
statisticianinstilettos/recmetrics/recmetrics/plots.py
code served (permissive licence) · get_code("4dbc840d3335cc9c")
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

torch.manual_seed(0)

ARGS = {
    "p": "test_string"
}
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
mnce_loss Ran
ran on a synthesized input
iLampard/lamp/models/ebm_runner.py
code served (permissive licence) · get_code("2d8c90020f8f93fd")
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 Tensor, 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)

# real_energy_unnorm: tensor with shape that can be expanded with [..., None]
# fake_energys_unnorm: tensor with one more dimension than real_energy_unnorm
# The function applies sigmoid, concatenates along last dim, and computes loss

real_energy_unnorm = torch.randn(2, 4)
fake_energys_unnorm = torch.randn(2, 4, 3)

ARGS = {
    'real_energy_unnorm': real_energy_unnorm,
    'fake_energys_unnorm': fake_energys_unnorm,
}
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 Tensor, 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
novelty Ran
ran on a synthesized input
statisticianinstilettos/recmetrics/recmetrics/metrics.py
code served (permissive licence) · get_code("ea5a39a1fa474615")
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 numpy as np

ARGS = {
    "predicted": [
        ["item_1", "item_2", "item_3"],
        ["item_2", "item_4", "item_1"]
    ],
    "pop": {
        "item_1": 450,
        "item_2": 380,
        "item_3": 290,
        "item_4": 120
    },
    "u": 1000,
    "n": 3
}
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
prediction_coverage Ran
ran on a synthesized input
statisticianinstilettos/recmetrics/recmetrics/metrics.py
code served (permissive licence) · get_code("c8eb82add723ab39")
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 float, 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 warnings

ARGS = {
    "predicted": [
        ["item_A", "item_B", "item_C"],
        ["item_X", "item_Y", "item_Z"],
        ["item_A", "item_X"]
    ],
    "catalog": [
        "item_A", "item_B", "item_C", "item_X", "item_Y", "item_Z", "item_W"
    ],
    "unseen_warning": 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 float, 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
search_pred_data Ran
ran on a synthesized input
iLampard/lamp/eval_tpp.py
code served (permissive licence) · get_code("2bbd803d60718f65")
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

# Construct pred_data: a list of sequences, where each sequence is a list of dicts
# Each dict needs 'seq_idx' and 'original_idx' keys
pred_data = [
    [
        {'seq_idx': 0, 'original_idx': 10, 'data': 'first'},
        {'seq_idx': 0, 'original_idx': 11, 'data': 'second'},
        {'seq_idx': 0, 'original_idx': 12, 'data': 'third'},
    ],
    [
        {'seq_idx': 1, 'original_idx': 20, 'data': 'fourth'},
        {'seq_idx': 1, 'original_idx': 21, 'data': 'fifth'},
    ],
    [
        {'seq_idx': 2, 'original_idx': 30, 'data': 'sixth'},
        {'seq_idx': 2, 'original_idx': 31, 'data': 'seventh'},
    ],
]

seq_idx = 1
original_idx = 21

ARGS = {
    'pred_data': pred_data,
    'seq_idx': seq_idx,
    'original_idx': original_idx,
}
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
DyRep Not yet run
unverified (harvested, no recorded run)
uoguelph-mlrg/LDG/dyrep.py
pointer only (licence: NOASSERTION) · get_code("0feed5743989fe45")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, uoguelph-mlrg/LDG (NOASSERTION). 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.

KnowEvolveANHP Not yet run
unverified (harvested, no recorded run)
ilampard/lamp/models/ke_anhp/_model.py
code served (permissive licence) · get_code("32549da5b1d6f6df")
How it ran

no invocation recorded.

RNNEntityEmbeddingLayer Not yet run
unverified (harvested, no recorded run)
ilampard/lamp/models/ke_anhp/_model.py
code served (permissive licence) · get_code("271a64fd27570f0a")
How it ran

no invocation recorded.

RelationScoreLayer Not yet run
unverified (harvested, no recorded run)
ilampard/lamp/models/ke_anhp/_model.py
code served (permissive licence) · get_code("99f53b75f1c900fe")
How it ran

no invocation recorded.

roc_plot Not yet run
unverified (harvested, no recorded run)
statisticianinstilettos/recmetrics/recmetrics/plots.py
code served (permissive licence) · get_code("f851ed6bcf9fc446")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 24 distinct functions with an identity, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 4 later) and 20 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
attention 4 other papers
2 dated earlier, 2 later
2002.09291 (2020-02)
Transformer Hawkes Process
2210.01753 (2022-10)
HYPRO: A Hybridly Normalized Probabilistic Model for Long-Horizon Prediction of Event Sequences
2307.08097 (2023-07)
EasyTPP: Towards Open Benchmarking Temporal Point Processes
and 1 more not named here
activation_layer 2 other papers
2 later
2307.08097 (2023-07)
EasyTPP: Towards Open Benchmarking Temporal Point Processes
2603.11462 (2026-03)
Bridging Discrete Marks and Continuous Dynamics: Dual-Path Cross-Interaction for Marked Temporal Point Processes
clamp_preserve_gradients 2 other papers
2 later
2307.08097 (2023-07)
EasyTPP: Towards Open Benchmarking Temporal Point Processes
2603.11462 (2026-03)
Bridging Discrete Marks and Continuous Dynamics: Dual-Path Cross-Interaction for Marked Temporal Point Processes
flatten_parameters 2 other papers
2 later
2307.08097 (2023-07)
EasyTPP: Towards Open Benchmarking Temporal Point Processes
2603.11462 (2026-03)
Bridging Discrete Marks and Continuous Dynamics: Dual-Path Cross-Interaction for Marked Temporal Point Processes

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

Large language models have shown astonishing performance on a wide range of reasoning tasks. In this paper, we investigate whether they could reason about real-world events and help improve the prediction performance of event sequence models. We design LAMP, a framework that integrates a large language model in event prediction. Particularly, the language model performs abductive reasoning to assist an event sequence model: the event model proposes predictions on future events given the past; instructed by a few expert-annotated demonstrations, the language model learns to suggest possible causes for each proposal; a search module finds out the previous events that match the causes; a scoring function learns to examine whether the retrieved events could actually cause the proposal. Through extensive experiments on several challenging real-world datasets, we demonstrate that our framework-thanks to the reasoning capabilities of large language modelscould significantly outperform the state-of-the-art event sequence models.

For agents

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

get_harvested_code_for_paper("2305.16646")
get_code_for_paper("2305.16646")
have("2305.16646")

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

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

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

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

Connect an agent — have() is free.