Causality by Abstraction: Symbolic Rule Learning in Multivariate Timeseries with Large Language Models
Organizations: Arizona State University, Tempe, AZ, USA
Abstract
Inferring causal relations in timeseries data with delayed effects is a fundamental challenge, especially when the underlying system exhibits complex dynamics that cannot be captured by simple functional mappings. Traditional approaches often fail to produce generalized and interpretable explanations, as multiple distinct input trajectories may yield nearly indistinguishable outputs. In this work, we present ruleXplain, a framework that leverages Large Language Models (LLMs) to extract formal explanations for input-output relations in simulation-driven dynamical systems. Our method introduces a constrained symbolic rule language with temporal operators and delay semantics, enabling LLMs to generate verifiable causal rules through structured prompting. ruleXplain relies on the availability of a principled model (e.g., a simulator) that maps multivariate input time series to output time series. Within ruleXplain, the simulator is used to generate diverse counterfactual input trajectories that yield similar target output, serving as candidate explanations. Such counterfactual inputs are clustered and provided as context to the LLM, which is tasked with the generation of symbolic rules encoding the joint temporal trends responsible for the patterns observable in the output times series. A closed-loop refinement process ensures rule consistency and semantic validity. We validate the framework using the PySIRTEM epidemic simulator, mapping testing rate inputs to daily infection counts; and the EnergyPlus building energy simulator, observing temperature and solar irradiance inputs to electricity needs. For validation, we perform three classes of experiments: (1) the efficacy of the ruleset through input reconstruction; (2) ablation studies evaluating the causal encoding of the ruleset; and (3) generalization tests of the extracted rules across unseen output trends with varying phase dynamics.
Figures & tables
| Procedure: Explanation Generation and Refinement |
|---|
| Step 1: Initialize. Extract an initial ruleset derived from Cluster-derived context pairs. |
| Step 2: Generate Inputs. Use and to prompt novel input sequences that approximately reproduce the baseline trajectory . |
| Step 3: Simulate & Evaluate. Run the simulator and compute deviation using the loss calculated from and . |
| Step 4: Update Rules. If , update based on observed mismatches and added constraints to get . |
| Step 5: Repeat. Continue Steps 2–4 until or the maximum number of iterations is reached, yielding the refined ruleset . Please note that remain unchanged across iterations. |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Rule ID | Input Window | Trend | Trend | Output Window | Phase | Symbolic Rule |
| R1 | [0, 14] | Low | SlowRise | [15, 29] | InitialGrowth | |
| R2 | [14, 28] | Moderate | SlowRise | [29, 43] | PeakFormation | |
| R3 | [28, 42] | SharpSpike | Low | [43, 57] | PostPeak | |
| R4 | [42, 56] | DipThenRise | Low | [57, 71] | Decline | |
| R5 | [56, 70] | SlowRise | HighStable | [71, 85] | Resurgence | |
| R6 | [70, 100] | Moderate | SlowRise | [85, 100] | PeakFormation |
| Rule ID | Input Window | Trend | Trend | Output Window | Phase | Symbolic Rule |
| R1 | [0, 9] | Low | Low | [0, 8] | Decline | |
| R2 | [9, 18] | SlowRise | SharpSpike | [9, 17] | InitialGrowth | |
| R3 | [18, 21] | DipThenRise | LowModerate | [18, 20] | PostPeak | |
| R4 | [21, 30] | Low | Low | [21, 29] | Decline | |
| R5 | [30, 42] | Moderate | HighStable | [30, 41] | PeakFormation | |
| R6 | [42, 48] | DipThenRise | LowModerate | [42, 47] | PostPeak |
| Rule ID | Input Window | Trend | Trend | Output Window | Phase | Symbolic Rule |
| R1 | [0, 14] | SharpSpike | Low | [15, 29] | InitialGrowth | |
| R2 | [14, 28] | HighStable | HighStable | [29, 43] | PeakFormation | |
| R3 | [28, 42] | Low | DipThenRise | [43, 57] | PostPeak | |
| R4 | [42, 56] | SharpSpike | HighStable | [57, 71] | Decline | |
| R5 | [56, 70] | Moderate | Low | [71, 85] | Resurgence | |
| R6 | [70, 100] | HighStable | HighStable | [85, 100] | PeakFormation |
Causal Interpretability
Causal interpretability uses interventions and counterfactuals to identify which model inputs and internal mechanisms actually drive predictions.
See all 107 papers