A Multimodal Data Processing Pipeline for MIMIC-IV Dataset

Farzana Islam Adiba, Varsha Danduri, Fahmida Liza Piya, Ali Abbasi, Mehak Gupta, Rahmatollah BeheshtiarXiv 2026

TL;DR

The authors introduce a comprehensive, customizable multimodal data processing pipeline for the MIMIC-IV dataset that unifies structured EHR data, clinical notes, waveforms, X-rays, and echocardiograms. By automating cohort selection, temporal alignment, and embedding generation, this open-source tool drastically reduces preprocessing overhead from days to minutes and enhances reproducibility for clinical AI research.

What Problem Does This Paper Address?

The MIMIC-IV dataset is a cornerstone of clinical machine learning research, but its data is highly fragmented. Information is split across disjointed modules: tabular hospital records, free-text clinical notes, high-resolution physiological waveforms, and medical imaging.

To build multimodal AI models, researchers typically spend an immense amount of manual effort on data cleaning, feature engineering, and temporal alignment. While several preprocessing pipelines exist, they are almost entirely unimodal or restricted to a small subset of modalities. This paper addresses this gap by providing a unified, scalable, and highly customizable framework to seamlessly integrate five major clinical modalities.

Methods

The pipeline unifies data using a stable identifier spine (subject_id for patients, hadm_id for admissions, note_id for text, and study_id for imaging).

Overview of the MIMIC-IV Multimodal Pipeline

Key methodological innovations include:

  • Scalable Raw Data Integration: To prevent memory bloat from massive imaging and waveform files, the pipeline avoids loading raw arrays directly into the main DataFrame. Instead, it deterministically resolves and stores local or PhysioNet file path pointers.
  • Multi-Granularity Temporal Alignment: Clinical events happen at vastly different frequencies. The pipeline aggregates data into stay-wise, day-wise, or hour-wise bins. To handle multiple events within a single time window (e.g., multiple X-rays in one day), it uses a fixed-column approach with user-defined outlier thresholds ($k$-percentile) to truncate rare, extreme bursts of data and avoid sparse, empty columns.
Temporal Alignment Process
  • Flexible Embedding Representation: Beyond raw data, the pipeline can output normalized embeddings. It includes built-in support for popular backbones: text (e.g., Bio_ClinicalBERT, ModernBERT), waveforms (e.g., ResNet1d101, DINOv2), and images (e.g., DenseNet121, EfficientNet).
  • Open-Source Tooling: The project is released as a user interface and two Python packages: MIMICEmbedding (for cohort generation and merging) and MIMICSectionizer (a regex-based clinical note segmenter).

Datasets

The pipeline integrates five distinct resources from the MIMIC family:

  1. MIMIC-IV (hosp & icu): Tabular EHR data containing demographics, lab results, and ICU chart events.
  2. MIMIC-IV-Note: Unstructured text including discharge summaries and radiology reports.
  3. MIMIC-IV-ECG: 10-second diagnostic electrocardiogram waveforms.
  4. MIMIC-CXR-JPG: Chest radiographs paired with text reports.
  5. MIMIC-IV-ECHO: 2D echocardiogram ultrasound image sequences.

Key Insights and Ideas

  • Pointers Over Pixels: Storing file paths rather than raw pixel arrays or signal matrices allows the pipeline to remain lightweight and execute on standard commodity hardware without running out of RAM.
  • Customization Over Rigidity: Unlike previous multimodal frameworks (such as HAIM) which provide fixed, pre-computed embeddings, this pipeline allows users to swap out embedding models or extract raw aligned data tailored to specific downstream architectures.
  • Democratizing Clinical AI: By abstracting away the intricate database schemas and identifier mappings of MIMIC-IV, the pipeline lowers the barrier to entry, allowing researchers to focus on clinical and methodological questions rather than data engineering bottlenecks.

Key Results

The authors compared their pipeline against six prominent MIMIC preprocessing tools, demonstrating superior modality coverage and customization capabilities.

Table 1: Comparison among MIMIC Data processing pipelines with our multimodal pipeline
  • Drastic Speedups: Manual preprocessing that typically takes hours or days is reduced to minutes. Integrating a multimodal dataset of 200 samples across all five modalities (structured data, notes, waveforms, X-rays, and 2D Echo) took approximately 45 minutes (2,735.85 seconds). Waveform-only integration for 100 records took less than a second.
  • Downstream Performance Validation: To prove utility, the authors evaluated the pipeline on predictive tasks like in-hospital mortality and length of stay (>3 days) across disease cohorts (Atrial Fibrillation, Coronary Artery Disease, Sepsis). Hybrid models built using the pipeline's outputs achieved high discriminative accuracy, such as an AUROC of 0.98 for Atrial Fibrillation mortality prediction using a ResNet18 + MLP architecture.

Limitations and Future Work

  • Strict Temporal Windowing: The pipeline aligns data strictly within the hospital admission window (admittime to dischtime). While this mitigates selection bias, it completely excludes pre-admission history and can lead to a high volume of null values if certain tests weren't performed during the stay.
  • Rule-Based Text Parsing: The MIMICSectionizer relies on regular expressions. While computationally efficient, it can fail when encountering typos or non-standard clinical note templates.
  • Lack of Generalizability: The pipeline is tightly coupled to the internal schema of the MIMIC-IV dataset and cannot be directly applied to other institutional EHR systems without substantial rewriting.

Summary updated

BibTeX
@misc{adiba2026multimodal,
  author = {Farzana Islam Adiba and Varsha Danduri and Fahmida Liza Piya and Ali Abbasi and Mehak Gupta and Rahmatollah Beheshti},
  title = {{A Multimodal Data Processing Pipeline for MIMIC-IV Dataset}},
  year = {2026},
  eprint = {2601.11606},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.11606},
}
Figure