A deep state-space analysis framework for cancer patient latent state estimation and classification from EHR time-series data

Yuji Okamoto, Aya Nakamura, Ryosuke Kojima, Eiichiro Uchino, Yohei Mineharu, Yohei Harada, Mayumi Kamada, Minoru Sakuragi, Manabu Muto, Motoko Yanagita, Yasushi OkunoPLoS ONE 2026

TL;DR

This paper introduces a novel "deep state-space analysis framework" that leverages deep learning to model the temporal evolution of latent patient states from electronic health records (EHRs). This framework allows for interpretable visualization of disease progression, identification of distinct patient states (e.g., "dangerous," "intermediate," "stable"), and discovery of temporal risk factors, offering a more nuanced understanding of cancer progression and treatment response.

What Problem Does This Paper Address?

While deep learning has shown promise in analyzing electronic health records (EHRs) for disease prediction, a significant challenge remains in creating explainable models for long-term disease progression, particularly for chronic conditions like cancer. Existing methods often struggle to capture the gradual, temporal nature of disease evolution and to translate complex, high-dimensional EHR data into clinically meaningful insights. The difficulty lies in estimating and interpreting "latent states" – underlying physiological or disease conditions that aren't directly observed but influence patient outcomes. This paper aims to bridge this gap by developing a framework that not only estimates these latent states but also visualizes their temporal dynamics and links them to clinical outcomes and risk factors.

Methods

The core of this work is the proposed "deep state-space analysis framework." This framework utilizes a deep state-space model, which is essentially a deep neural network (DNN)-based time-series prediction model. It's designed to estimate latent states ($z_t$) from observed EHR data ($x_t$) over time. Key aspects include:

  • Deep State-Space Model: This model employs DNNs to represent both the transition between latent states ($z_t | z_{t-1}$) and the observation of data from these states ($x_t | z_t$). It uses variational inference to learn these relationships from unlabeled time-series data.
  • Latent State Estimation: The model learns to infer the patient's underlying state at each time point, even with missing data, by naturally incorporating it into the learning process.
  • UMAP for Visualization: Uniform Manifold Approximation and Projection (UMAP) is used to reduce the high-dimensional latent states into a 2D space, allowing for visual exploration of patient trajectories and clustering.
  • K-Means Clustering: K-means clustering is applied to the latent states to stratify patients into distinct groups, which are then interpreted as "dangerous," "intermediate," and "stable" states based on their association with patient prognosis (survival vs. death).
  • Markov Chain for Transitions: Transition probabilities between these identified clusters are modeled using Markov chains to understand the dynamics of patient state changes over time.
  • Wasserstein Distance for Risk Factor Identification: This metric is used to quantify the differences in distributions of specific medical test items across the identified patient clusters, helping to pinpoint characteristic features and temporal risk factors.

Datasets

The study utilized a retrospective dataset of 12,695 cancer patients who underwent chemotherapy at Kyoto University Hospital between January 1, 2006, and October 31, 2018. The data was collected from electronic medical records (EMRs) and included various test items, vital signs, demographic information, and mortality status. Mortality information was excluded from the model input and used solely for interpretation.

Key Insights and Ideas

  • Temporal Dynamics Matter: The study strongly emphasizes that explicitly modeling the passage of time and temporal transitions is crucial for capturing clinically meaningful patient states and prognosis, a capability lacking in many conventional dimensionality reduction or static time-series models.
  • Latent States as Clinical Narratives: The framework successfully translates complex EHR data into interpretable latent states that visually represent a patient's journey through disease progression, offering a more intuitive understanding for clinicians.
  • Drug-Specific Risk Factors: The analysis revealed that temporal risk factors can be drug-dependent, highlighting specific immune cell abnormalities (like low lymphocyte counts and high segmented neutrophils) as critical indicators for patients on certain targeted therapies (e.g., Nivolumab, Osimertinib, Afatinib).
  • Anemia as a General Risk Factor: Anemia was identified as a significant temporal risk factor during state transitions in cancer patients, underscoring its importance even when its exact cause in the context of chemotherapy is complex.

Key Results

  • The deep state-space model successfully separated deceased and surviving patients based on their latent state endpoints, with Cluster I identified as the "dangerous state" (high risk of death), Cluster III as the "stable state" (survival), and Cluster II as the "intermediate state."
  • The framework identified anemia as a temporal risk factor common to all cancer patients during state transitions.
  • For specific drug treatments, low lymphocyte counts and high segmented neutrophil counts were identified as temporal risk factors for patients receiving immune checkpoint inhibitors (Nivolumab) and tyrosine kinase inhibitors (Osimertinib, Afatinib).
  • Comparison with PCA, VAE, and linear state-space models showed that the proposed deep state-space model provided superior separation of patient states and captured temporal continuity more effectively.

Limitations and Future Work

  • Retrospective and Single-Center Design: This limits the ability to establish definitive causal relationships and may affect generalizability. Future work should involve prospective studies.
  • Anemia Etiology: While anemia was identified as a risk factor, its precise causes in chemotherapy patients (myelosuppression, bleeding, etc.) require further investigation.
  • Cancer Subtype Analysis: The study analyzed various cancer types collectively due to data intensity requirements for deep learning. Future research could explore subtype-specific analyses if sufficient data is available.
  • Mechanism of State Transitions: The detailed mechanisms underlying the state transitions learned by the deep neural networks are not fully understood and warrant further investigation.
  • Combination Therapies: The current study focused on individual drugs. Future work should investigate temporal risk factors for combination therapies, which are increasingly common but present greater complexity.

The authors envision leveraging this framework for chronic diseases requiring long-term monitoring, aiming to improve patient management, optimize treatment strategies, and enhance prognostic assessments.

Summary updated

BibTeX
@inproceedings{okamoto2026deep,
  author = {Yuji Okamoto and Aya Nakamura and Ryosuke Kojima and Eiichiro Uchino and Yohei Mineharu and Yohei Harada and Mayumi Kamada and Minoru Sakuragi and Manabu Muto and Motoko Yanagita and Yasushi Okuno},
  title = {{A deep state-space analysis framework for cancer patient latent state estimation and classification from EHR time-series data}},
  booktitle = {PLoS ONE},
  year = {2026},
  doi = {10.1371/journal.pone.0341003},
}
Figure