Balancing Interpretability and Flexibility in Modeling Diagnostic Trajectories with an Embedded Neural Hawkes Process Model

Yuankang Zhao, Matthew EngelhardarXiv 2025

Abstract

The Hawkes process (HP) is a cornerstone for modeling event sequences with self-reinforcing dynamics, particularly in electronic health records (EHRs). While traditional HPs offer interpretability through parametric impact functions, they often lack the flexibility to capture complex real-world patterns. Conversely, neural network-based HPs achieve high predictive performance but function as "black boxes." We propose the Embedded Neural Hawkes Process (ENHP), a novel formulation that models impact functions via a flexible neural network kernel in an event embedding space. This approach allows for large-scale modeling while maintaining transparency. Our results demonstrate that ENHP accurately recovers impact functions, achieves competitive performance on clinical and benchmark datasets, and provides clinically meaningful interpretations, suggesting that flexibility and interpretability need not be mutually exclusive.

Introduction

In clinical settings, a patient's medical history is characterized by "self-reinforcing" dynamics, where one diagnosis (e.g., a respiratory infection) significantly alters the probability of future related events (e.g., asthma follow-ups). Modeling these trajectories requires a balance between predictive power and the ability for clinicians to understand the underlying triggers. Traditional Hawkes Processes (HPs) use simple mathematical kernels (like exponential decay) which are interpretable but often too rigid. Modern Neural Hawkes Processes improve accuracy through deep learning but obscure the causal relationships. This work introduces the ENHP to bridge this gap, offering a scalable, flexible, yet interpretable framework for diagnostic trajectories.

Methods: The ENHP Architecture

The Embedded Neural Hawkes Process (ENHP) is designed to handle large event vocabularies while learning complex temporal dependencies. Its architecture consists of three primary pillars:

  1. Event Embeddings: To manage thousands of unique ICD-10 codes, the model maps events into a low-dimensional embedding space. This effectively groups related medical conditions into latent "topics," facilitating scalability.
  2. Neural Impact Kernel: Instead of pre-defining the shape of influence (e.g., exponential), the model employs a neural network to learn the "impact function" $K(\Delta t)$. This allows the model to capture non-monotonic relationships, such as risks that peak months after a trigger.
  3. Optional Contextualization (ENHP-C): The model can be augmented with Transformer encoder layers to incorporate the full history of previous events. This allows researchers to test whether specific event sequences (context) significantly improve predictions over simple pairwise interactions.
Architecture of the Embedded Neural Hawkes Process (ENHP), showing the interaction between event embeddings and the neural impact kernel.

Experimental Evaluation

The model was evaluated across synthetic data, standard benchmarks (Retweet, Amazon, NYC Taxi, StackOverflow, MemeTrack), and two major clinical datasets:

  • MIMIC-IV: ICU procedure sequences.
  • Duke-EHR: Diagnostic trajectories for over 34,000 pediatric patients, specifically looking at neurodevelopmental outcomes.

Key Results

  • Predictive Accuracy: ENHP achieved the lowest Root Mean Square Error (RMSE) for next-event timing on four out of five benchmark datasets. On the StackOverflow dataset, it outperformed established models like the Attentive Neural Hawkes Process (AttNHP) and the Transformer Hawkes Process (THP).
  • The "Context" Surprise: A pivotal finding was that the addition of Transformer layers (ENHP-C) often yielded marginal improvements in log-likelihood. This suggests that for many real-world sequences, the direct pairwise relationship between event types—captured by the impact kernel—is the dominant driver of dynamics.
  • Clinical Interpretability: In the Duke-EHR pediatric study, the model identified that perinatal complications serve as a major trigger for future neurodevelopmental disorders. It also distinguished between the immediate influence of an autism diagnosis on ADHD risk versus the lower, more sustained influence of conduct disorders.

Discussion and Conclusion

The ENHP demonstrates that interpretability does not have to be sacrificed for flexibility. By working in an embedding space, the model scales to vocabularies of over 5,000 event types, which is beyond the reach of traditional HP models.

However, limitations remain. Very low-dimensional embeddings can sometimes "conflate" distinct clinical processes, and long sequences in datasets like MIMIC-IV present GPU memory challenges. Future work will focus on higher-dimensional embeddings to isolate granular topics and refining the model to distinguish between different types of clinical interventions (e.g., emergency vs. elective). Ultimately, ENHP provides a robust framework for generating clinical hypotheses and understanding the temporal triggers in complex diagnostic histories.

Summary updated

BibTeX
@misc{zhao2025balancing,
  author = {Yuankang Zhao and Matthew Engelhard},
  title = {{Balancing Interpretability and Flexibility in Modeling Diagnostic Trajectories with an Embedded Neural Hawkes Process Model}},
  year = {2025},
  eprint = {2504.21795},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.21795},
}
Figure