Latent Logic Tree Extraction for Event Sequence Explanation from LLMs

Zitao Song, Chao Yang, Chaojie Wang, Bo An, Shuang Li

Introduction

In high-stakes domains like healthcare, finance, and robotics, systems generate massive streams of discrete events—such as a patient’s fluctuating symptoms or a robot's sequential actions. Understanding the underlying causality of these events is critical for decision-making. However, existing approaches often force a trade-off between interpretability and predictive power. Traditional probabilistic models like the Hawkes process are interpretable but too simple for heterogeneous real-world data, while deep learning models offer high accuracy but remain "black boxes."

Large Language Models (LLMs) possess significant reasoning capabilities but struggle to process raw numerical event data directly. Furthermore, their internal reasoning paths are mathematically difficult to sample and optimize. To bridge this gap, researchers have introduced LaTee (Latent Logic Tree Extraction), a framework that extracts human-readable "logic trees" from LLMs to explain complex event sequences.

The LaTee Framework

LaTee treats logic rules as latent variables—hidden structures that explain observed data—and employs an Amortized Expectation-Maximization (EM) framework to discover them.

Overview of the LaTee framework, illustrating the Amortized EM loop and the integration of LLM priors with GFlowNet-based logic tree extraction.

Core Components:

  • The E-Step (Inference): The model identifies the most plausible logic trees to explain a sequence. Given the massive search space, LaTee utilizes a GFlowNet (Generative Flow Network). Unlike standard Reinforcement Learning, GFlowNets are designed to sample a diverse variety of high-reward structures, effectively capturing the heterogeneity of real-world events.
  • The M-Step (Learning): Sampled logic trees are used to update the parameters of a Temporal Logic Point Process (TL-PP), the mathematical engine that calculates event likelihoods based on symbolic rules.
  • LLM Integration: LLMs (such as OPT or Mistral) serve as a "semantic prior." They suggest rules based on pre-trained world knowledge (e.g., "low blood pressure may lead to low urine output"), which are then reweighted based on their fit to the observed data.

Experimental Evaluation

The framework was evaluated across four diverse datasets:

  1. MIMIC-III: Electronic health records focusing on sepsis-related events.
  2. EPIC-KITCHENS-100: First-person action sequences of daily activities.
  3. StackOverflow: User badge sequences (non-semantic data).
  4. Synthetic Dataset: Controlled sequences used to test scalability.

LaTee achieved a relative margin of 20-25% improvement in Error Rate (ER) over state-of-the-art attention-based models like AttNHP. It also consistently achieved a lower Mean Rank, indicating that correct predictions were prioritized higher in the model's output.

Key Findings

The Power of Semantic Cognition

A critical insight from the study is that LLMs perform significantly better when events have meaningful names rather than numerical identifiers. This confirms that the LLM is actively leveraging its internal world knowledge to solve the task.

Impact of semantic information on prediction accuracy for GPT-4 and GPT-3.5-Turbo across MIMIC-3 and Epic-100 datasets.

Diversity and Structure

  • GFlowNet vs. Baselines: GFlowNets outperformed Supervised Fine-Tuning (SFT) and PPO by exploring the "rule space" more broadly, preventing the model from collapsing onto a few common rules.
  • Width Over Depth: Scalability analysis revealed that increasing tree width (allowing more concurrent causes) was often more beneficial than increasing depth (longer causal chains).
  • Interpretability: The model successfully extracted symbolic rules, such as Low Urine Output ← (High Blood Potassium) AND (Low Blood Pressure), which are easily validated by human experts.

Conclusion

LaTee demonstrates that combining the reasoning power of LLMs with the mathematical rigor of Temporal Point Processes can produce models that are both highly predictive and transparent. While current constraints limit the framework to models around 6.7B parameters and sequences of 40 events, future work aims to scale these methods to longer histories and utilize high-end API-based LLMs for further rule refinement.

Summary updated

BibTeX
@inproceedings{song2024latent,
  author = {Zitao Song and Chao Yang and Chaojie Wang and Bo An and Shuang Li},
  title = {{Latent Logic Tree Extraction for Event Sequence Explanation from LLMs}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=pwfcwEqdUz},
}
Figure