Skip to main content
QUICK REVIEW

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

Matthew B. A. McDermott, Bret Nestor|arXiv (Cornell University)|Jun 20, 2023
Machine Learning in HealthcareComputer Science9 citations
TL;DR

ESGPT is an open-source library that enables building GPT-like models over continuous-time, multi-modal event streams (e.g., EHR data), providing end-to-end data extraction, pre-processing, efficient deep-learning representations, and a HuggingFace-compatible modeling API with zero-shot evaluation support.

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.

Motivation & Objective

  • Enable end-to-end construction of GPTs over continuous-time, multi-modal event streams.
  • Unify diverse, large-scale datasets with minimal configuration for foundation-model-scale input preparation.
  • Provide a Hugging Face-compatible modeling API that accounts for intra-event dependencies and autoregressive generation.
  • Offer standardized evaluation, including few-shot and zero-shot assessment, for pre-trained models on user-defined tasks.

Proposed method

  • Provide an open-source ESGPT library that ingests data from diverse sources via a concise YAML configuration.
  • Use Polars-based pre-processing to speed data extraction and reduce storage footprint.
  • Output a PyTorch dataset with a memory-efficient, sparse representation and a pre-built embedding layer.
  • Offer two pre-defined model architectures (ConditionallyIndependent and NestedAttention) to capture intra-event dependencies via a configurable dependency graph.
  • Expose a Hugging Face compatible API for model construction and generation, with support for time-aware emissions and multi-stage generation, plus a unified output object for losses/sampling.
Figure 1 : ESGPT’s end-to-end data pipeline, which spans raw data extraction from source all the way to production of a PyTorch dataset and pre-built embedder suitable for use in any deep learning pipeline. (a) An example of our data modality; for a single subject $\boldsymbol{S}_{1}$ , the data con
Figure 1 : ESGPT’s end-to-end data pipeline, which spans raw data extraction from source all the way to production of a PyTorch dataset and pre-built embedder suitable for use in any deep learning pipeline. (a) An example of our data modality; for a single subject $\boldsymbol{S}_{1}$ , the data con

Experimental results

Research questions

  • RQ1How can GPT-style models be effectively built for continuous-time sequences of complex events with intra-event dependencies?
  • RQ2Can ESGPT provide fast, scalable data pre-processing and memory-efficient representations for large EHR-like datasets?
  • RQ3Is zero-shot evaluation feasible and informative for foundation models trained on event-stream data?
  • RQ4How do configurable intra-event dependency graphs impact generative performance and downstream task utility?

Key findings

  • ESGPT enables end-to-end preprocessing, dataset construction, and embedding for large event-stream datasets with notable speed and storage efficiency (e.g., ~30 minutes to pre-process the full 300k-patient MIMIC-IV dataset to 1.2 GB).
  • The library delivers a memory-efficient, sparse deep-learning representation that scales with observed events rather than the full feature space, reducing memory usage to about 1.3% of traditional approaches in the MIMIC-IV example.
  • Two model architectures (ConditionallyIndependent and NestedAttention) allow user-defined intra-event dependencies, enabling generation that respects multi-stage covariate relationships.
  • HF-compatible API allows building, training, and generating from ESGPT models from scratch or pre-trained sources, with a unified output object for sampling and losses.
  • ESGPT supports zero-shot evaluation pipelines to assess foundation-model viability on event-stream tasks, alongside tools for hyperparameter optimization and monitoring.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.