SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.11547 · 2023

Event Stream GPT: A Data Pre-processing and Modeling Library for Generative, Pre-trained Transformers over Continuous-time Sequences of Complex Events

arXiv · PDF · Open in the Atlas

Code that ran

5 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 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/2306.11547.json · badge: /api/ran/2306.11547.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
mmcdermott/eventstreamgpt canonical (classifier label)
classifier basis: census
5 ran · 5 no recorded run
FunctionStatusWhere it lives
count_or_proportion Ran
ran on a synthesized input
mmcdermott/eventstreamgpt/EventStream/utils.py
code served (permissive licence) · get_code("c1580a72ecff9f11")
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 polars as pl

ARGS = {
    "N": 100,
    "cnt_or_prop": 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
polars — 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
get_event_types Ran
ran on a synthesized input
mmcdermott/eventstreamgpt/EventStream/transformer/model_output.py
code served (permissive licence) · get_code("faf0c133b032fec1")
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 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 torch

torch.manual_seed(0)

# Create valid tensors for the function
# dynamic_measurement_indices: shape (2, 4, 4) - batch of 2, 4 events, 4 measurements per event
dynamic_measurement_indices = torch.LongTensor([
    [[1, 2, 2, 2], [1, 2, 2, 0], [2, 2, 1, 0], [2, 1, 0, 0]],
    [[1, 0, 0, 0], [3, 1, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
])

# dynamic_indices: shape (2, 4, 4) - same shape, corresponding indices
dynamic_indices = torch.LongTensor([
    [[1, 11, 14, 18], [3, 11, 12, 0], [11, 10, 2, 0], [15, 8, 0, 0]],
    [[3, 0, 0, 0], [31, 9, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
])

# event_type_measurement_idx: int index to identify which measurement contains event type
event_type_measurement_idx = 1

# event_type_vocab_offset: int offset to subtract from dynamic indices
event_type_vocab_offset = 1

ARGS = {
    "dynamic_measurement_indices": dynamic_measurement_indices,
    "dynamic_indices": dynamic_indices,
    "event_type_measurement_idx": event_type_measurement_idx,
    "event_type_vocab_offset": event_type_vocab_offset,
}
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 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
lt_count_or_proportion Ran
ran on a synthesized input
mmcdermott/eventstreamgpt/EventStream/utils.py
code served (permissive licence) · get_code("4fdfe155a398fe7e")
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 polars as pl

# Setup for lt_count_or_proportion function
# This function takes:
# - N_obs: int (number of observations)
# - cnt_or_prop: COUNT_OR_PROPORTION | None (either int, float, or None)
# - N_total: int | None (optional, total number of elements)

# Test case 1: cnt_or_prop as a proportion (float)
ARGS_1 = {
    "N_obs": 10,
    "cnt_or_prop": 0.1,
    "N_total": 100
}

# Test case 2: cnt_or_prop as an integer count
ARGS_2 = {
    "N_obs": 10,
    "cnt_or_prop": 11,
    "N_total": None
}

# Test case 3: cnt_or_prop as None
ARGS_3 = {
    "N_obs": 10,
    "cnt_or_prop": None,
    "N_total": None
}

# Test case 4: cnt_or_prop as a proportion without N_total specified
ARGS_4 = {
    "N_obs": 5,
    "cnt_or_prop": 0.5,
    "N_total": 20
}

# Test case 5: cnt_or_prop as integer, N_obs less than it
ARGS_5 = {
    "N_obs": 9,
    "cnt_or_prop": 9,
    "N_total": None
}

# Choose one test case for execution
ARGS = ARGS_1
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
polars — 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
num_initial_spaces Ran
ran on a synthesized input
mmcdermott/eventstreamgpt/EventStream/utils.py
code served (permissive licence) · get_code("5df168a026d63743")
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

def num_initial_spaces(s: str) -> int:
    """Returns the number of initial spaces in `s`.

    Arguments:
        s: The string of which to count the initial spaces.

    Returns:
        The number of initial spaces in `s`.

    Examples:
        >>> num_initial_spaces("  a")
        2
        >>> num_initial_spaces("lorem ipsum    ")
        0
    """
    return len(s) - len(s.lstrip(' '))


ARGS = {
    "s": "  a"
}
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 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
registered_sklearn_config Ran
ran on a synthesized input
mmcdermott/eventstreamgpt/EventStream/baseline/FT_task_baseline.py
code served (permissive licence) · get_code("c75824103a48d8b0")
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 type. 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 dataclasses
from typing import Any

SKLEARN_CONFIG_MODULES = {}

def registered_sklearn_config(dataclass: Any) -> Any:
    """Decorator that allows you to use a dataclass as a hydra config via the `ConfigStore`

    Adds the decorated dataclass as a `Hydra StructuredConfig object`_ to the `Hydra ConfigStore`_.
    The name of the stored config in the ConfigStore is the snake case version of the CamelCase class name.

    .. _Hydra StructuredConfig object: https://hydra.cc/docs/tutorials/structured_config/intro/

    .. _Hydra ConfigStore: https://hydra.cc/docs/tutorials/structured_config/config_store/
    """
    dataclass = dataclasses.dataclass(dataclass)
    name = dataclass.__name__
    cls_name = name[:-len('Config')]
    if cls_name != dataclass().CLS:
        raise ValueError(f'CLS must be {cls_name} for config class named {name}')
    SKLEARN_CONFIG_MODULES[cls_name] = dataclass
    return dataclass


@dataclasses.dataclass
class MyModelConfig:
    CLS: str = "MyModel"
    learning_rate: float = 0.01
    num_layers: int = 2


class MyModel:
    CLS = "MyModel"


ARGS = {
    "dataclass": MyModelConfig
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
crps Not yet run
unverified (harvested, no recorded run)
mmcdermott/eventstreamgpt/EventStream/evaluation/MCF_evaluation.py
code served (permissive licence) · get_code("1fc0b4b21ed6a018")
How it ran

no invocation recorded.

eval_multi_class_classification Not yet run
unverified (harvested, no recorded run)
mmcdermott/eventstreamgpt/EventStream/baseline/FT_task_baseline.py
code served (permissive licence) · get_code("73c443ce93317d4e")
How it ran

no invocation recorded.

get_MCF Not yet run
unverified (harvested, no recorded run)
mmcdermott/eventstreamgpt/EventStream/evaluation/MCF_evaluation.py
code served (permissive licence) · get_code("5558bb57ff0bcafd")
How it ran

no invocation recorded.

get_aligned_timestamps Not yet run
unverified (harvested, no recorded run)
mmcdermott/eventstreamgpt/EventStream/evaluation/MCF_evaluation.py
code served (permissive licence) · get_code("17ad3912a0d506c2")
How it ran

no invocation recorded.

strip_unused_indices Not yet run
unverified (harvested, no recorded run)
mmcdermott/eventstreamgpt/EventStream/transformer/model_output.py
code served (permissive licence) · get_code("0a1ecbeeead5c732")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 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 10 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-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

Generative, pre-trained transformers (GPTs, a.k.a. "Foundation Models") have reshaped natural language processing (NLP) through their versatility in diverse downstream tasks. However, their potential extends far beyond NLP. This paper provides a software utility to help realize this potential, extending the applicability of GPTs to continuous-time sequences of complex events with internal dependencies, such as medical record datasets. Despite their potential, the adoption of foundation models in these domains has been hampered by the lack of suitable tools for model construction and evaluation. To bridge this gap, we introduce Event Stream GPT (ESGPT), an open-source library designed to streamline the end-to-end process for building GPTs for continuous-time event sequences. ESGPT allows users to (1) build flexible, foundation-model scale input datasets by specifying only a minimal configuration file, (2) leverage a Hugging Face compatible modeling API for GPTs over this modality that incorporates intra-event causal dependency structures and autoregressive generation capabilities, and (3) evaluate models via standardized processes that can assess few and even zero-shot performance of pre-trained models on user-specified fine-tuning tasks.

For agents

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

get_harvested_code_for_paper("2306.11547")
get_code_for_paper("2306.11547")
have("2306.11547")

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

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

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

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

Connect an agent — have() is free.