Exploring the Potential and Limitations of Deep Learning and Explainable AI for Longitudinal Life Course Analysis

Helen Coupland, Neil Scheidwasser, Alexandros Katsiferis, Megan Davies, Seth Flaxman, Naja Hulvej Rod, Swapnil Mishra, Samir Bhatt, H. Juliette T. UnwinResearch Square 2025

Abstract

Background: Understanding the complex interplay between life course exposures, such as adverse childhood experiences and environmental factors, and disease risk is essential for developing effective public health interventions. Traditional epidemiological methods, such as regression models and risk scoring, are limited in their ability to capture the non-linear and temporally dynamic nature of these relationships. Deep learning (DL) and explainable artificial intelligence (XAI) are increasingly applied within healthcare settings to identify influential risk factors and enable personalised interventions. However, significant gaps remain in understanding their utility and limitations, especially for sparse longitudinal life course data and how the influential patterns identified using explainability are linked to underlying causal mechanisms. Methods: We conducted a controlled simulation study to assess the performance of various state-of-the-art DL architectures including CNNs and (attention-based) RNNs against XGBoost and logistic regression. Input data was simulated to reflect a generic and generalisable scenario with different rules used to generate multiple realistic outcomes based upon epidemiological concepts. Multiple metrics were used to assess model performance in the presence of class imbalance and SHAP values were calculated. Results: We find that DL methods can accurately detect dynamic relationships that baseline linear models and tree-based methods cannot. However, there is no one model that consistently outperforms the others across all scenarios. We further identify the superior performance of DL models in handling sparse feature availability over time compared to traditional machine learning approaches. Additionally, we examine the interpretability provided by SHAP values, demonstrating that these explanations often misalign with causal relationships, despite excellent predictive and calibrative performance. Conclusions: These insights provide a foundation for future research applying DL and XAI to life course data, highlighting the challenges associated with sparse healthcare data, and the critical need for advancing interpretability frameworks in personalised public health.

Introduction

Life course epidemiology investigates how biological, behavioral, and psychosocial exposures across a person's life—from gestation through childhood and into adulthood—interact to influence health outcomes in later life. Traditional analytical approaches, such as linear regression and risk scoring, have been the workhorses of this field. However, these methods are often "temporally blind," struggling to account for the complex timing, sequence, and accumulation of events that define human development.

While Deep Learning (DL) and Explainable AI (XAI) have transformed fields like computer vision and natural language processing, their application to longitudinal healthcare data is still developing. This study addresses a critical gap: determining which DL architectures are best suited for the "messy," sparse, and imbalanced nature of life course data, and whether the "explanations" provided by these models (e.g., via SHAP) truly reflect the underlying causal pathways necessary for clinical and policy decision-making.

Methodology

To evaluate the efficacy of DL in this context, the researchers conducted a controlled simulation study comparing four state-of-the-art DL architectures against two traditional baselines: Logistic Regression (LR) and XGBoost.

Model Architectures

The DL models selected represent diverse approaches to time-series and sequence data:

  • MLSTM-FCN: A hybrid model combining Long Short-Term Memory (LSTM) units for sequence modeling with Fully Convolutional Networks (FCN) for automated feature extraction.
  • LSTMAttention: An RNN-based model utilizing an attention mechanism to assign weights to specific time points, potentially identifying critical periods of exposure.
  • ResNet: A deep residual network capable of learning complex hierarchical representations.
  • InceptionTime: A CNN-based architecture optimized specifically for multivariate time-series data.

Data Simulation and Patterns

Using the simcausal R package, a synthetic dataset of 100,000 individuals was generated, modeled after the real-world DANLIFE cohort. The simulation tracked individuals from birth to age 16, incorporating stationary variables (e.g., parental ethnicity) and time-dependent variables (e.g., Adverse Childhood Experiences).

Four distinct "Life Course Patterns" (LCPs) were simulated to test model sensitivity to different temporal dynamics: Period (risk depends on a specific time window), Repeats (risk accumulates with exposure), Order (risk depends on the sequence of events), and Timing (risk depends on the exact age of exposure).

Results and Discussion

Predictive Performance and the "Linear Ceiling"

The study utilized the Area Under the Precision-Recall Curve (AUPRC) as the primary metric, given the significant class imbalance (only ~2.5% positive cases). The results demonstrated that DL models effectively break the "linear ceiling" of traditional methods. While Logistic Regression performed well on simple "Period" patterns, its performance plummeted to ~25% AUPRC on complex "Order" and "Timing" rules. In contrast, DL models maintained high accuracy, often exceeding 90% AUPRC across these dynamic scenarios.

Handling Data Sparsity

A significant finding was the inherent advantage of DL models in handling sparse data. In life course studies, events (like specific traumas) may be infrequent or missing at many time points. DL architectures proved more robust than XGBoost in extracting meaningful signals from these sparse longitudinal records, suggesting they are better suited for real-world clinical datasets where data density is often low.

The Explainability Gap

Perhaps the most critical insight involves the use of SHAP (Shapley Additive Explanations) for model interpretability. Despite achieving near-perfect predictive accuracy, the models' SHAP values often failed to align with the ground-truth causal rules of the simulation. In complex scenarios like "Order3," none of the models correctly identified the primary causal feature as the most important. Instead, SHAP often highlighted non-causal but correlated variables. This "causal gap" suggests that while DL models can accurately predict outcomes, their internal logic may not mirror biological or social causality, posing a risk if these explanations are used to guide public health interventions.

Conclusion

Deep learning offers a powerful advancement for life course epidemiology, particularly in its ability to model complex temporal dependencies and handle sparse data. However, this study serves as a cautionary tale: high predictive performance does not guarantee causal interpretability. As we move toward personalized public health, there is an urgent need for more sophisticated XAI frameworks that can better distinguish between predictive correlation and causal mechanism. For now, researchers should treat DL-derived feature importance as a starting point for investigation rather than a definitive biological truth.

Summary updated

BibTeX
@inproceedings{coupland2025exploring,
  author = {Helen Coupland and Neil Scheidwasser and Alexandros Katsiferis and Megan Davies and Seth Flaxman and Naja Hulvej Rod and Swapnil Mishra and Samir Bhatt and H. Juliette T. Unwin},
  title = {{Exploring the Potential and Limitations of Deep Learning and Explainable AI for Longitudinal Life Course Analysis}},
  booktitle = {Research Square},
  year = {2025},
  doi = {10.21203/rs.3.rs-5582136/v1},
}
Figure