Skip to content

Add PhysioNet 2019 Sepsis Dataset and Prediction Task #1789

Backlog

Description

@yuema-git

Summary

This issue proposes adding the PhysioNet/Computing in Cardiology Challenge 2019 ICU sepsis dataset (PhysioNet2019Dataset) and a corresponding sepsis prediction task (PhysioNet2019Sepsis) to PyHealth.

Motivation

  • Fills the PhysioNet 2019 gap from BTY-49 / [BTY-49] Add JointSeqImage for irregular medical time series (AAAI 2025) #1605: JointSeqImage (AAAI 2025) was merged in [BTY-49] Add JointSeqImage for irregular medical time series (AAAI 2025) #1605 with PhysioNet 2012 only because PhysioNet 2019 is not yet available in PyHealth.
  • Open-access ICU sepsis data (CC BY 4.0): 40,336 ICU stays across two hospitals (Hospital A: 20,336; Hospital B: 20,000; 1,552,210 patient-hours; 7.3% septic stays), usable without MIMIC credentialing.
  • Hourly wide-table pattern & two-layer NaN design: Each .psv stay is a sparse hourly wide table (labs average 94.8% hourly missing, with strong informative missingness / MNAR). Keeping raw NaN lossless in the Dataset layer while making missingness handling configurable in the Task layer preserves clinical signal across model families.

Proposed Plan (Split into 2 Focused PRs)

  1. PR 1 (Dataset layer): Add PhysioNet2019Dataset, 3-table YAML config (events, labels, patients), manifest-based download_physionet2019, standalone wide-to-long parser parse_wide_hourly_record, streaming prepare_physionet2019, synthetic-data unit tests, and Sphinx API docs.
  2. PR 2 (Task & example): Add PhysioNet2019Sepsis (supporting configurable NaN handling, optional clinical cleaning, split_by_hospital, and toggleable P19 <60h filtering with a length-only lower-bound baseline), synthetic tests, docs, and a JointSeqImage benchmark example.

Status

PR 1 is implemented and tested locally (synthetic unit tests, tools/check_pr_rules.py, and full 40,336-stay smoke verification) and is being opened now.

Activity

  1. solarsys commented on Dec 2, 2026

    @solarsys
    Collaborator

    Thanks for the proposal. This is already covered by the open PR #1790 (PhysioNet2019Dataset), which is now labeled for AI review. Please follow the PR for review feedback; a sepsis prediction task can be a follow-up PR.


    Generated by Claude Code

  2. solarsys commented on Dec 4, 2026

    @solarsys
    Collaborator

    Update: PhysioNet2019Dataset was merged in #1790 (commit 3459aef). A sepsis prediction task on top of it is still open for a follow-up PR; please check master for an existing task before starting.


    Generated by Claude Code

  3. anaba5is commented on Dec 5, 2026

    @anaba5is
    Contributor

    For the hourly prediction task, could we add a synthetic cutoff test? Pick one prediction hour and make two copies of the same stay. Keep their measurements through that hour and their target label identical, then change a measurement after the cutoff in just one copy. The feature inputs for that prediction should be identical. A measurement at the boundary can also make the intended rule for including the prediction hour explicit. This would catch future measurements leaking through feature extraction or imputation.

  4. yuema-git commented on Dec 6, 2026

    @yuema-git
    ContributorAuthor

    Thanks @solarsys for the update and @anaba5is for the great suggestion!

    I have opened the follow-up PR #1823 implementing PhysioNet2019Sepsis (stay-level pre-onset early sepsis prediction aligned with Raindrop / ViTST / JointSeqImage), physionet2019_sepsis_statistics, split_by_hospital, TaskCard metadata, and a JointSeqImage benchmark example.

    Following @anaba5is's suggestion, PR #1823 includes test_synthetic_cutoff_prevents_future_leakage in tests/core/test_physionet2019_sepsis.py: it constructs twin copies of the same ICU stay identical through the pre-onset boundary hour (first_sepsis_hour - 1) with mutated post-cutoff measurements in one copy, verifying bit-for-bit identical feature inputs (x, x_time, x_mask, x_delta) and normalization statistics across both raw and vital_ffill modes, while explicitly asserting inclusion of the boundary hour and exclusion of first_sepsis_hour and later hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions