Latent Logic Tree Extraction for Event Sequence Explanation from LLMs

Zitao Song,Chao Yang,Chaojie Wang,Bo An,Shuang Li
2024-06-28
Abstract:Modern high-stakes systems, such as healthcare or robotics, often generate vast streaming event sequences. Our goal is to design an efficient, plug-and-play tool to elicit logic tree-based explanations from Large Language Models (LLMs) to provide customized insights into each observed event sequence. Built on the temporal point process model for events, our method employs the likelihood function as a score to evaluate generated logic trees. We propose an amortized Expectation-Maximization (EM) learning framework and treat the logic tree as latent variables. In the E-step, we evaluate the posterior distribution over the latent logic trees using an LLM prior and the likelihood of the observed event sequences. LLM provides a high-quality prior for the latent logic trees, however, since the posterior is built over a discrete combinatorial space, we cannot get the closed-form solution. We propose to generate logic tree samples from the posterior using a learnable GFlowNet, which is a diversity-seeking generator for structured discrete variables. The M-step employs the generated logic rules to approximate marginalization over the posterior, facilitating the learning of model parameters and refining the tunable LLM prior parameters. In the online setting, our locally built, lightweight model will iteratively extract the most relevant rules from LLMs for each sequence using only a few iterations. Empirical demonstrations showcase the promising performance and adaptability of our framework.
Machine Learning,Computation and Language
What problem does this paper attempt to address?
### What problem does this paper attempt to solve? This paper aims to solve the problem of extracting logical trees from large - scale language models (LLMs) to explain event sequences. Specifically, the goal of the paper is to design an efficient, plug - and - play tool for generating logical - tree - based explanations from large language models, providing customized insights for each observed event sequence. #### Main problem description 1. **Explanation of complex event sequences in modern high - risk systems**: - Modern high - risk systems (such as healthcare or robotics) usually generate a large amount of complex event - sequence data. - The event sequences generated by these systems are characterized by irregular timestamps and discrete events, which are difficult to directly understand and explain. 2. **Generating interpretable logical - tree structures**: - The paper proposes a method to generate logical - tree structures that can explain these event sequences by using large language models (LLMs) as priors. - A logical tree is a hierarchical symbolic representation that can capture the causal relationships and logical dependencies between events. 3. **Dealing with the unsolvable posterior distribution problem in the discrete combinatorial space**: - During the inference process, since the logical tree exists in the discrete combinatorial space, the posterior distribution cannot obtain a closed - form solution. - The paper proposes using GFlowNet (a diversity - seeking generative model) to sample logical - tree samples from the posterior distribution. 4. **Improving the accuracy of future event prediction**: - Through the generated logical tree, not only can past event sequences be explained, but also the accuracy of future event prediction can be improved. #### Solution overview - **Framework design**: The paper proposes a framework named LaTee, which combines the amortized EM algorithm to infer and generate implicit logical trees from LLMs. - **E - step (Expectation step)**: Use GFlowNet to generate logical - tree samples from the posterior distribution, thereby bypassing the problem of calculating the partition function. - **M - step (Maximization step)**: Use the generated logical - tree samples to approximate the posterior marginalization, optimize the model parameters and improve the adjustable LLM prior parameters. - **Experimental verification**: Experiments on multiple real - world behavior datasets have proven the effectiveness and adaptability of this method, demonstrating its superior performance in event prediction tasks. Through this method, the paper not only solves how to extract interpretable knowledge from complex event sequences, but also improves the ability to explain and predict unseen event sequences.