Abstract
Machine learning enables extracting clinical insights from large temporal datasets. The applications of such machine learning models include identifying disease patterns and predicting patient outcomes. However, limited interpretability poses challenges for deploying advanced machine learning in digital healthcare. Understanding the meaning of latent states is crucial for interpreting machine learning models, assuming they capture underlying patterns. In this paper, we present a concise algorithm that allows for i) interpreting latent states using highly related input features; ii) interpreting predictions using subsets of input features via latent states; and iii) interpreting changes in latent states over time. The proposed algorithm is feasible for any model that is differentiable. We demonstrate that this approach enables the identification of a daytime behavioral pattern for predicting nocturnal behavior in a real-world healthcare dataset.
Introduction
Deep learning models, such as Transformers, LSTMs, and Neural Controlled Differential Equations (NCDEs), are exceptionally proficient at identifying patterns in complex healthcare time-series data. However, their "black-box" nature often limits clinical adoption. While existing explainable AI (XAI) tools like SHAP or LIME can highlight influential features for a final prediction, they typically fail to explain the latent states—the internal summaries the model constructs as it processes data over time. In clinical settings, understanding the underlying physiological or behavioral pattern detected by the model is as important as the prediction itself. This paper introduces a "plug-and-play" algorithm to demystify these latent representations in differentiable models.
Methodology
The core of the proposed approach is the Integrated Jacobian, used to quantify the "impact" of an input feature on a specific latent state. By measuring how much a feature contributes to the shift in a latent state between two dissimilar samples, the algorithm maps raw inputs to internal model representations.
Key methodological components include:
- Contrastive Analysis: Identifying "top dissimilar samples" to observe which features drive the most significant shifts in internal states.
- Feature Heat Maps: Visualizing the temporal influence of features on specific latent states.
- NCDE Optimization: For Neural Controlled Differential Equations, the authors derive a forward-computation method for the Jacobian, making the interpretation process highly efficient for streaming data.
Experimental Evaluation
The method was evaluated on two distinct healthcare datasets:
- Dementia Care Data: PIR (motion) and door sensor data from 91 homes were used to predict nocturnal wakefulness based on daytime activity (6:00 AM to 6:00 PM).
- Sepsis Dataset: Vital signs and lab results from over 40,000 ICU patients (PhysioNet 2019) were used to predict sepsis onset within 72 hours.
Results
Dementia Study: Identifying Behavioral Biomarkers
The analysis identified latent state $z_2(t_{11})$ as the most influential for predicting nocturnal behavior. By mapping this state back to input features, the researchers discovered a specific behavioral pattern: lower cumulative lounge activity combined with higher cumulative front door activity during the day was a strong predictor of poor sleep at night. This demonstrates how the model identifies tangible behavioral biomarkers.
Sepsis Prediction: Physiological Patterns
In the Sepsis dataset, the most influential latent state ($z_0$ at the 36th hour) was linked to three primary physiological markers: Systolic Blood Pressure (SBP), Pulse Oximetry ($O_2$ saturation), and Respiration Rate. Qualitative validation via scatter plots confirmed that low values in these vital signs correlated with higher latent state values, which in turn increased the predicted likelihood of sepsis.
Discussion and Conclusion
By treating latent states as compact codes for clinical concepts, this approach allows for the "translation" of a model's internal language into actionable clinical insights. Unlike static XAI methods, it tracks how the meaning of these states evolves over time, providing a temporal dimension to interpretability.
While the algorithm successfully identifies influential features, it does not automatically establish causal relationships. Future work will focus on automated pattern discovery using natural language descriptions and integrating causal analysis to distinguish between correlation and true drivers of clinical outcomes.
Summary updated