Towards Interpretable Concept Learning over Time Series via Temporal Logic Semantics

Irene Ferfoglia, Simone Silvetti, Gaia Saveri, Laura Nenzi, Luca BortolussiarXiv 2025 · DOI

Introduction

Time series data is a cornerstone of decision-making in high-stakes domains such as clinical medicine, industrial monitoring, and cyber-physical systems. Despite the critical nature of these applications, the current state-of-the-art models—primarily deep neural networks—operate as "black boxes." While post-hoc explainability tools (e.g., SHAP or LIME) can highlight influential data points, they often fail to provide the underlying logic of a decision or may not faithfully represent the model's internal reasoning. This research addresses the urgent need for interpretable-by-design models that bridge the gap between raw numerical signals and symbolic, human-verifiable reasoning.

The Neuro-Symbolic Framework

The proposed framework introduces a neuro-symbolic architecture that maps raw time series data into a shared semantic space defined by Signal Temporal Logic (STL). By treating logical formulae as "concepts," the model ensures that its internal features are inherently meaningful to human experts.

1. STL Concept Learning

Rather than learning abstract, high-dimensional features, the model utilizes a library of human-interpretable STL formulae. These formulae capture temporal patterns such as "eventually," "globally," or "until" (e.g., "The signal $X$ stayed below threshold $Y$ for $Z$ seconds"). These concepts are sampled from a probabilistic grammar and filtered to ensure a diverse and simple set of candidate explanations.

2. Trajectory Embedding Kernel

The core mathematical innovation is a cross-kernel that allows both raw time series (trajectories) and logical formulae to be embedded into the same Reproducing Kernel Hilbert Space (RKHS). This shared space enables the model to measure the "alignment" or similarity between a specific signal and a logical concept directly, facilitating a seamless integration of symbolic logic and numerical data.

3. Attention and Discriminability

To make a classification, the model employs two primary mechanisms:

  • Robustness Vector: This evaluates how strongly each STL concept holds for a given input signal.
  • Discriminability Matrix: This calculates how "atypical" a concept is for a specific class compared to others, ensuring the model focuses on features that truly distinguish one class from another.
  • Soft Attention: An attention mechanism identifies which concepts are most relevant for a specific prediction, providing a clear path from input to output.

Explanation Extraction

A significant advantage of this framework is its ability to generate both local and global explanations:

  • Local Explanations: For a single prediction, the model provides a conjunction of logic rules that triggered the classification.
  • Global Explanations: For an entire class, the model generates a disjunction of rules that describe the general behavior of that class.

These explanations are "faithful" by construction because they are derived directly from the components used to make the prediction, avoiding the pitfalls of post-hoc guessing.

Experimental Evaluation

The authors utilize the UCR Time Series Archive for empirical validation. This benchmark contains over 140 datasets spanning diverse domains, including physiological monitoring (ECG/EEG), sensor data from cyber-physical systems, and motion capture.

Key Insights

  • Logic as a Shared Space: By treating data and logic as two sides of the same coin within a shared semantic space, the model learns the relationship between signals and symbolic properties rather than just applying static rules.
  • Multivariate Support: The framework is designed to handle multivariate signals, allowing STL formulae to span multiple variables simultaneously—a common challenge for symbolic methods.
  • Competitive Performance: Early results indicate that the model achieves accuracy levels comparable to standard black-box classifiers while providing significantly higher interpretability.

Limitations and Future Work

While promising, the framework faces challenges regarding computational complexity, particularly in sampling and filtering a large set of candidate STL formulae. Furthermore, the quality of the discovered concepts is currently dependent on the constraints of the initial probabilistic grammar.

Future research will focus on extensive empirical validation against a wider array of state-of-the-art models, such as Transformers and specialized CNNs, to further prove that the trade-off between accuracy and explainability can be minimized in complex time series tasks.

Summary updated

BibTeX
@misc{ferfoglia2025towards,
  author = {Irene Ferfoglia and Simone Silvetti and Gaia Saveri and Laura Nenzi and Luca Bortolussi},
  title = {{Towards Interpretable Concept Learning over Time Series via Temporal Logic Semantics}},
  year = {2025},
  eprint = {2508.03269},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.03269},
}
Figure