Trajectories, bifurcations and pseudotime in large clinical datasets: applications to myocardial infarction and diabetes data

Sergey E. Golovenkin, Jonathan Bac, Alexander Chervov, Evgeny M. Mirkes, Yuliya V. Orlova, Emmanuel Barillot, Alexander N. Gorban, Andrei Yu. ZinovyevZenodo 2020 · OpenReview

Abstract

Large observational clinical datasets often represent a "landscape" of disease conditions where pathologies develop through stereotypical routes. Extracting these pathways from synchronic (snapshot) data remains a significant challenge. This paper presents a semi-supervised methodology, implemented in the Python package ClinTrajan, that models clinical data as a "bouquet" of bifurcating trajectories. By applying Elastic Principal Graphs (ElPiGraph), the methodology enables dimensionality reduction, visualization, and the quantification of "pseudotime"—a geodesic distance representing disease progression. We demonstrate this approach on datasets for myocardial infarction (MI) complications and diabetes readmission, showing how it can identify critical clinical junctions and improve prognostic accuracy.

Introduction: The Synchronic Data Challenge

Most modern clinical datasets are synchronic, providing a snapshot of a patient's state at a single point in time, such as during a hospital visit. While abundant, these snapshots lack the continuous temporal history (diachronic data) needed to visualize disease evolution or identify "points of no return." Furthermore, medical data is notoriously messy, characterized by mixed data types and missing values. Standard linear techniques like PCA often fail to capture the complex, branching nature of disease pathways. The authors propose bridging this gap by treating a sufficiently large collection of snapshots as a continuous landscape of motion.

Methodology: Reconstructing the "Bouquet" of Disease

The core of the methodology is the application of Elastic Principal Graphs to reconstruct branching trajectories from a "quasi-normal" root state.

  • The Bouquet Model: The algorithm models data as a set of branching paths starting from a common origin. This allows for the identification of bifurcations where a patient's prognosis might shift toward different outcomes (e.g., recovery vs. cardiogenic shock).
  • Pseudotime: Borrowed from single-cell genomics, pseudotime measures the distance along a trajectory. It serves as a proxy for pathological progression rather than chronological time.
  • ClinTrajan Tool: The researchers developed an open-source Python package designed to handle the preprocessing (optimal scaling and SVD-based imputation) and scalable construction of these principal trees.
Visualization of clinical trajectories for Myocardial Infarction complications using ClinTrajan. The multi-panel view shows the tree structure, demographic mapping (AGE), specific clinical features (Atrial fibrillation), and outcome mapping (Lethal cases).

Key Results and Insights

Myocardial Infarction Complications

In a dataset of ~1,700 MI patients, the model successfully identified 10 distinct clinical trajectories. The analysis revealed that terminal segments were often strongly enriched with specific causes of death, such as myocardial rupture. Pseudotime survival analysis further identified that bronchial asthma was a significant aggravating factor for specific lethal trajectories involving congestive heart failure.

Diabetes Readmission Paradox

Applying the model to over 100,000 diabetes hospitalizations identified 8 distinct trajectories. The algorithm resolved a known paradox where high HbA1c (blood sugar) levels globally appeared to correlate with lower readmission rates. ClinTrajan demonstrated that this was a result of patient stratification: "stabilized" patients with high HbA1c were managed differently than those on high-risk trajectories where high HbA1c remained a major risk factor.

Heatmap showing the enrichment of clinical variables across different tree segments, illustrating how specific phenotypes align with different pathological scenarios.

Performance and Non-Linearity

The study found that non-linear manifold learning reveals a much simpler, lower-dimensional structure of disease progression than linear methods. Despite the complexity, the ClinTrajan package is highly efficient, constructing a principal tree for 100,000+ records in approximately 400 seconds on a standard laptop.

Discussion and Future Work

While powerful for retrospective discovery, the methodology currently requires a human expert to define the "root node" or starting point of the disease. Future iterations aim to incorporate "reversibility" (patients moving back toward health) and more complex graph topologies like loops. The ultimate goal is to transition these "pseudotime" metrics from retrospective research tools to real-time bedside prognostic aids, potentially integrating short-term longitudinal data from ICU monitoring to further refine trajectory accuracy.

Conclusion

By treating static clinical snapshots as a dynamic landscape, the ClinTrajan methodology provides a robust framework for mapping disease progression. It successfully identifies critical bifurcations in patient fate and offers a more nuanced understanding of risk factors by contextualizing them within specific clinical trajectories.

Summary updated

Abstract

Large observational clinical datasets become increasingly available for mining associations between various disease traits and administered therapy. These datasets can be considered as representations of the landscape of all possible disease conditions, in which a concrete pathology develops through a number of stereotypical routes, characterized by `points of no return' and `final states' (such as lethal or recovery states). Extracting this information directly from the data remains challenging, especially in the case of synchronic (with a short-term follow up) observations. Here we suggest a semi-supervised methodology for the analysis of large clinical datasets, characterized by mixed data types and missing values, through modeling the geometrical data structure as a bouquet of bifurcating clinical trajectories. The methodology is based on application of elastic principal graphs which can address simultaneously the tasks of dimensionality reduction, data visualization, clustering, feature selection and quantifying the geodesic distances (pseudotime) in partially ordered sequences of observations. The methodology allows positioning a patient on a particular clinical trajectory (pathological scenario) and characterizing the degree of progression along it with a qualitative estimate of the uncertainty of the prognosis. Overall, our pseudo-time quantification-based approach gives a possibility to apply the methods developed for dynamical disease phenotyping and illness trajectory analysis (diachronic data analysis) to synchronic observational data. We developed a tool $ClinTrajan$ for clinical trajectory analysis implemented in Python programming language. We test the methodology in two large publicly available datasets: myocardial infarction complications and readmission of diabetic patients data.
BibTeX
@inproceedings{golovenkin2020trajectories,
  author = {Sergey E. Golovenkin and Jonathan Bac and Alexander Chervov and Evgeny M. Mirkes and Yuliya V. Orlova and Emmanuel Barillot and Alexander N. Gorban and Andrei Yu. Zinovyev},
  title = {{Trajectories, bifurcations and pseudotime in large clinical datasets: applications to myocardial infarction and diabetes data}},
  booktitle = {Zenodo},
  year = {2020},
  url = {https://openreview.net/forum?id=nybK_RWh6q},
}
Figure