Source-linked AI summary

A Structural FHMM for Interpretable Disease Trajectories in T2DM

Alessandro Mari, Ekaterina Krymova, Guillaume Obozinski, Maria Luisa Marques de Sa Faquetti, Adrian Martinez de la Torre, Andrea Burden

arXiv:2608.24328v1cs.LG

TL;DR

T2DM trajectories are heterogeneous because comorbidities evolve over time, complicating disease-state inference and risk stratification. The paper proposes a structural FHMM to decompose these dynamics into concurrent latent processes, identifying eight coherent components and distinct progression pathways.

  • Problem

    Heterogeneous, comorbidity-laden T2DM trajectories make longitudinal health-state inference and disease progression characterization challenging.

  • Method

    A structural FHMM represents T2DM progression as multiple independent latent health-state components with problem-specific transition structure.

  • Results

    The model identified eight coherent latent components spanning recognizable diabetes-related complications and heterogeneous microvascular-dominant and multisystem progression pathways.

  • Takeaways & Limitations

    The approach provides an interpretable longitudinal decomposition of T2DM multimorbidity into concurrent disease processes and progression pathways.

  • Takeaways & Limitations

    Routine-care EHR measurements are unequally spaced, some variables have likely non-random missingness, and binned time steps assume regular observation intervals.

Abstract

from arXiv · show

In this work, we propose a structural variant of the Factorial Hidden Markov Model (FHMM) for the analysis of disease trajectories in patients with Type 2 diabetes mellitus (T2DM). The model represents a patient's latent health state as a combination of multiple independent, simultaneously evolving components, associated with comorbidities and lab results. This structured latent representation facilitates the identification of clinically meaningful patient states and clustering of common disease trajectories. We evaluate the proposed approach using The IQVIA Medical Research Data incorporating data from THIN, a Cegedim database of anonymized electronic health records (EHR), identifying patients with a first-ever prescription for a non-insulin antidiabetic drug (NIAD) between January 2006 and December 2019. The model identifies multiple clinically coherent latent components corresponding to known patterns of diabetes-related complications and reveals heterogeneous progression pathways, including distinct microvascular-dominant and multi-organ trajectories associated with elevated comorbidity burden and mortality. These results demonstrate that the proposed framework captures meaningful longitudinal structure in EHR data and provides interpretable insights into the evolution of T2DM and its comorbidities.

1 Background

T2DM trajectories are heterogeneous because comorbidities worsen health risks, motivating interpretable models of longitudinal EHR observations. The proposed structural FHMM represents health through simultaneously evolving latent components to identify clinically meaningful states and common disease pathways.

  • T2DM is frequently accompanied by comorbidities that worsen quality of life and increase morbidity and mortality risk, contributing to heterogeneous disease trajectories.
  • The study analyzes longitudinal EHR observations to infer patients’ latent health states and characterize common patterns of disease evolution.
  • The proposed structural FHMM models multidimensional patient health through several independent latent components evolving simultaneously over time.
  • Unlike a standard HMM’s single latent state, the FHMM represents overall health as a combination of evolving latent processes, improving flexibility and interpretability.
  • The inferred latent trajectories support clinically meaningful state identification, patient clustering by progression patterns, and assessment of comorbidity-related risks over time.
  • Compared with a variational autoencoder approach requiring manual assignment of latent dimensions, the model automatically learns a structured latent factorization by construction.

2 Methods … 2.3 Structural FHMM

The study uses routinely collected UK primary-care EHR data to model T2DM trajectories with a structurally constrained FHMM. The approach combines multiple latent health processes with clinically motivated transition and emission assumptions to improve identifiability and interpretability.

  • 2.1 Data: The IQVIA Medical Research Database UK incorporates anonymized THIN electronic health records generated from general-practice daily records.The protocol and data use were reviewed and approved by the Scientific Review Committee.
  • 2.1 Data: The database contains diagnoses, prescriptions, laboratory results including HbA1c, behavioral factors, and demographics collected during routine care.Routine-care collection produces unequally spaced observations and other data characteristics typical of electronic healthcare databases.
  • 2.2 Cohort description: The cohort included adults with a first-ever NIAD prescription from January 1, 2006, through December 31, 2019, requiring at least one year of prior valid data.Patients without any laboratory measurement for variables of interest within the four years before the index date were excluded.
  • 2.2.1 Data preprocessing: Comorbidities were identified from chronic-condition read codes, while laboratory values were standardized, outliers removed, and measurements aggregated into six-month intervals using medians.Patients were excluded when required laboratory variables lacked measurements during the relevant pre-index period.
  • 2.2.1 Data preprocessing: Comorbidity indicators and laboratory measurements were shifted forward relative to prescriptions to preserve temporal ordering and reduce reverse-causation artifacts.This adjustment separates health-state measurement from doctors’ diagnostic and prescribing decisions under six-month aggregation.
  • 2.3 Structural FHMM: The FHMM represents observations through multiple independent hidden Markov chains, whose combined latent states determine the distribution of comorbidities and laboratory measurements.Medication variables are incorporated as auxiliary inputs in an input-output FHMM formulation.
  • 2.3 Structural FHMM: Exact FHMM inference is computationally difficult because naive Forward-Backward complexity is O(K2MT), although matrix-vector computation reduces it to O(MKM+1T).The remaining exponential growth in the number of chains motivates variational approximation in the subsequent section.
  • 2.3.1 Problem-specific structure: Problem-specific FHMM structure is imposed to improve identifiability and interpretability by constraining transitions and emissions.Health can degrade only by d units, the last state is absorbing, and the transition matrix is a bandwidth-d band matrix; emissions are constrained to reflect worse health at higher state values.

2.4 Model estimation · 2.5 Trajectory analysis · 2.6 Experimental setup

The model is estimated with EM and structured variational inference, using approximations that reduce training complexity for Gaussian and binary emissions. Patient trajectories are represented through posterior latent-chain states, clustered over time, and evaluated with stratified data splits and information-criterion model selection.

  • 2.4 Model estimation: Parameters are estimated by Expectation-Maximization to maximize the Evidence Lower Bound, alternating variational-distribution and parameter updates.The E step optimizes q over an approximating class, while the M step updates θ = (θπ, θP, η).
  • 2.4 Model estimation: A structured mean field variational approximation is used to approximate the optimal posterior distribution.This approximation follows the structured mean field approach proposed in the cited prior work.
  • 2.4 Model estimation: O(K^2MT) inference complexity is obtained for Gaussian emissions through the variational approximation.The approximation reduces inference complexity in the Gaussian-emission case.
  • 2.4 Model estimation: O(MK^(M+1)T) complexity remains for binary outputs, while a second-order emission-log-likelihood approximation reduces model-training complexity to O(K^2MT).After training, θ is fixed and ϕ is learned on new data through fine-tuning.
  • 2.5 Trajectory analysis: Posterior hidden-state distributions are computed per patient with the Baum–Welch algorithm, yielding expected states for each latent chain at each time step.The resulting representation is M-dimensional at every time point.
  • 2.5 Trajectory analysis: K-means clustering is applied to all time-step representations, with the number of clusters selected using the Davies–Bouldin index and prediction strength.Hidden-state sequences encode transitions between latent health states and their influence on comorbidity development and accumulation over time.
  • 2.6 Experimental setup: Patient data are split into training (80%), validation (10%), and test (10%) subsets with stratification for consistent comorbidity distributions.Models are trained for up to 300 EM iterations with early stopping, and varying FHMM configurations are selected using AIC and BIC.

3 Results

The results establish the cohort, select a structural FHMM that generally outperforms standard HMMs, and identify clinically coherent latent components and heterogeneous T2DM trajectories. Disease progression generally moves from healthier or transient clusters toward increasingly severe multimorbidity and mortality-risk states.

  • Cohort and follow-up: The final cohort comprised 88,201 patients, including 47,983 men and 40,218 women, after 100,325 patients were excluded for missing key laboratory data.Median follow-up after NIAD initiation was approximately 4.0 years.
  • Model selection: FHMM(8, 4)2 performed best across sex and age groups except Men < 65, where FHMM(6, 4)2 was superior by both BIC and AIC.FHMM models consistently outperformed HMM models in BIC; FHMM(8, 4)2 encoded up to 65,536 states.
  • Latent components: The eight latent chains represented distinct progression patterns spanning osteoporosis, cardiovascular disease, infarction, metabolic syndrome, hypertension, retinopathy, vascular disease, and cardiorenal multimorbidity.Hypertension and diabetic retinopathy tended to develop independently, while other chains captured co-occurring comorbidities and laboratory profiles.
  • Initial states and clusters: Older age generally predicted worse initial latent states, while clusters ranged from young, low-comorbidity profiles to severe nephropathy, hepatorenal disease, and cardio-pulmonary multimorbidity.Cluster 0 was healthiest; clusters 3, 6, 8, and 12 represented increasingly severe combinations of pulmonary, metabolic, renal, hepatic, cardiovascular, and glycemic abnormalities.
  • State progression: Clusters 7 and other progressing or transitional clusters gained members over time, whereas healthier clusters 0, 1, and 4 declined.Cluster 12 typically transitioned toward cluster 7, the most severe multimorbid state and a frequent absorbing state.
  • Transition dynamics: Clusters 0, 2, 4, 5, 10, and 11 formed a transient subgraph in which patients rarely returned after leaving, indicating largely unidirectional progression toward severe disease.Cluster 0 commonly progressed through early microvascular states before early multimorbidity, while cluster 10 followed broader multimorbidity pathways.

4 Discussion

The discussion presents eight clinically interpretable latent components capturing interconnected diabetes-related comorbidity patterns and shows how their combinations form heterogeneous progression pathways. It also notes limitations from irregular measurements and non-random missingness in real-world EHR data.

  • Latent components: Eight latent components captured distinct comorbidity patterns spanning microvascular, macrovascular, metabolic, skeletal, pulmonary, and cardiorenal involvement.The analysis described women younger than 65 years, with additional population analyses in the Appendix.
  • Latent components: The osteoporosis-related component co-occurred with chronic kidney and liver disease, illustrating clustering of multisystem complications.The discussion relates this pattern to interconnected metabolic and vascular pathways affecting multiple organ systems.
  • Model interpretation: The model learned comorbidity associations jointly from longitudinal data without prespecified disease groupings or assumed outcome independence.This produced an interpretable decomposition into parallel disease processes that can co-occur and progress at different rates within individuals.
  • Progression pathways: Patients often transitioned from relatively healthy or low-risk metabolic states toward advanced multimorbid states, while clusters 6 and 7 represented terminal profiles associated with elevated mortality.The discussion identifies clusters 0, 2, 4, 5, 10, and 11 as relatively healthy or low-risk starting states.
  • Limitations: Routine-care EHR data produced unequally spaced measurements, often requiring forward imputation to maintain complete information at each time point.BMI and other lifestyle variables showed missingness likely not missing at random, and alternative imputation schemes might be more appropriate.

5 Conclusion

The structural FHMM models T2DM comorbidities as interacting latent disease processes evolving over time, identifying eight coherent components that explain heterogeneous disease trajectories. It learns meaningful temporal comorbidity patterns without pre-specified groupings and highlights requirements for broader clinical implementation.

  • Contributions: The structural FHMM identified eight coherent latent components representing interacting disease processes that evolve over time in T2DM.These components provide insight into complex progression patterns of T2DM and its complications.
  • Contributions: The approach jointly learns meaningful comorbidity patterns from longitudinal data without requiring pre-specified disease groupings.This supports application where prior knowledge is unavailable or cannot be encoded.
  • Contributions: The model captures temporal dynamics often missed by static clustering and produces more interpretable results than deep generative models.Its factorial structure supports the representation of multiple evolving disease components.
  • Limitations and future work: Real-time clinical implementation would require adding comorbidities beyond the core set analyzed, while prescribed medications did not significantly improve model performance.The limited medication contribution was attributed to challenges in capturing complex treatment patterns from EHR data.

A Data preparation

Data preparation used predefined lower and upper thresholds to remove outliers, while reporting comorbidity diagnoses across each data split as percentages.

  • Outlier removal: Outliers were removed when values fell outside predefined lower and upper limits.The specific threshold values are referenced in Table 5 but are not provided in the passage.
  • Comorbidity distribution: Comorbidity diagnoses were tabulated for each data split and expressed as percentages.The passage does not provide the underlying percentages.

B Variational approximation

The fitting algorithm trains the FHMM with an EM procedure whose E step uses a structured mean-field variational approximation to reduce inference complexity to O(K^2MT). The M step optimizes model parameters individually, while approximations and Baum–Welch computations address the remaining expectations and latent-chain inference.

  • Variational approximation: A structured mean-field variational approximation defines the posterior qϕ in the E step and reduces inference complexity to O(K^2MT).The fitting algorithm mainly follows prior work and exploits the structured factorization of the posterior.
  • EM optimization: The E step optimizes the variational parameters ϕ, whereas the M step optimizes θπ, θP, and η individually.The M-step objective is Eqϕ[log pθ(y1:T, h1:T)].
  • Latent-chain inference: Latent-chain quantities are computed with the Baum–Welch algorithm for HMMs at complexity O(K^2T).This computation is part of the variational fitting procedure for the component chains.
  • Approximate expectations: A second-order approximation of the emission log-likelihood avoids expensive expectation terms required by the E-step equations.Direct computation of q(H^(m)_t2 | x1:T) for any t1,t2 has memory and computational complexity O(MT^2K^2).
  • Binary-output optimization: For binary outputs, the M step is expressed through a lower bound of the ELBO that can be optimized with respect to z in closed form.Equation 12 is identified as the lower bound used for this optimization.

C Input medications

Drug inputs modify transition probabilities through state- and drug-specific effects, allowing probability mass to shift toward lower or higher latent states. These effects are assumed small, and incorporating drugs marginally affects model performance without improving BIC.

  • Transition parametrization: Drug inputs parameterize transition probabilities with drug-specific effects based on the current latent state.The parametrization uses f_l(X_t, i) = W drug_l,i · X_t and f_r(X_t, i) = W drug_r,i · X_t.
  • Transition parametrization: Drug effects can add probability mass to lower or higher state values, with shifts in one direction reducing mass in the other.The direction depends on the signs of the corresponding drug-effect weights.
  • Prior assumption: Drug-effect weights have Gaussian priors centered at 0, encoding the assumption that drug effects are a priori small.The prior is equivalent to adding a quadratic penalty to the objective function.
  • Model performance: Drug use is marginal in the model, does not improve the BIC score, and improves AIC in only a few cases.The comparison uses validation-set metrics from Table 7.

D Additional Figures

The additional figures describe cluster-selection methods and visualize drug effects, comorbidity risks, laboratory changes, cluster evolution, and transition timing across age- and sex-specific cohorts. These analyses use Davies-Bouldin and prediction-strength criteria, longitudinal cluster assignments, and transition graphs or cumulative incidence functions.

  • Cluster selection: Cluster number is selected using the Davies-Bouldin index and prediction strength estimated with 3-fold cross-validation.Two-thirds of the data are used for training and one-third for testing.
  • Men < 65: For Men < 65, drug effects on transitions, state-dependent comorbidity risks, cluster-specific laboratory changes, and transition graphs are visualized across the additional figures.The model includes 8 chains with 4 states per chain; red and blue indicate increases and decreases, respectively, while transition-graph arrow thickness reflects observed transition counts.
  • Women < 65: For Women < 65, cluster selection is illustrated using the Davies-Bouldin index and prediction strength, with the optimum marked by a black dashed line.
  • Women < 65: Women < 65 cluster trajectories are followed over time from initial assignments 6 months post-NIAD, including healthy, multimorbidity, pulmonary-metabolic, hepatic, nephropathy, and cardio-pulmonary clusters.Flows representing less than 1% are omitted for clarity, and patient counts are shown alongside the bars.
  • Men < 65: Men < 65 cluster evolution and time to first transition are shown conditional on initial assignment 6 months post-NIAD, with censoring handled using the Aalen nonparametric estimator.Cluster 6 is excluded from the evolution figure because few transitions were observed, and only the most frequent transitions are shown there.

F Male 65+

For men aged 65+, the paper characterizes cluster-specific comorbidity risks and laboratory changes, then examines cluster transitions and time to first transition after NIAD initiation. Transition visualizations focus on the most frequent pathways and account for censoring in time-to-transition estimates.

  • Cluster characteristics: Cluster-specific comorbidity risks and laboratory values are presented relative to the average patient at NIAD initiation.Values are centered by subtracting the NIAD-initiation average; comorbidity risks show probability changes, while laboratory results show percentage changes.
  • Cluster transitions: Patient-cluster evolution is shown over time conditional on initial assignment six months after NIAD initiation.Only the most frequent transitions are displayed, with clusters 2, 3, 6, 8, 10, and 11 excluded because few transitions were observed from them.
  • Transition timing: Time to first cluster transition is estimated by initial cluster assignment using a censored Cumulative Incidence Function.The estimates account for loss to follow-up and study termination and use the Aalen nonparametric estimator.
  • Transition structure: The transition graph encodes increases and decreases in comorbidity risk through arrow color and scales arrow thickness by observed transition frequency.Transitions with less than 1% probability are omitted.

G Female 65+

For women aged 65+, the paper characterizes patient clusters at NIAD initiation and examines cluster-specific laboratory and comorbidity changes, longitudinal transitions, and time to first transition. Transition visualizations emphasize the most frequent pathways and changes in comorbidity risk.

  • Patient characteristics: Table 10 summarizes cluster-specific patient characteristics, including comorbidity counts at NIAD initiation and new comorbidities developed afterward.Average values and standard deviations are provided where applicable, with percentages shown in parentheses.
  • Cluster profiles: Figure 22 reports cluster-specific changes in comorbidity probabilities and laboratory values relative to the average patient at NIAD initiation.Values are centered at NIAD initiation; comorbidity risks are expressed as probability changes and laboratory results as percentage changes.
  • Cluster transitions: Figure 23 shows the evolution of patient clusters over time conditional on initial assignment six months after NIAD, displaying only the most frequent transitions.Clusters 1 and 8 are excluded because they have few observed transitions.
  • Time to transition: Figure 24 estimates time to first cluster transition by initial cluster assignment six months after NIAD using cumulative incidence functions.The estimates account for censoring from loss to follow-up and study termination via the Aalen nonparametric estimator.
  • Transition graph: Figure 25 represents observed cluster transitions as a graph, with arrow direction indicating increases or decreases in comorbidity risk.Arrow thickness reflects the number of observed transitions, and transitions below 1% probability are omitted.
Loading 2608.24328v1…