TSXplain: Demystification of DNN Decisions for Time-Series Using Natural Language and Statistical Features

Mohsin Munir, Shoaib Ahmed Siddiqui, Ferdinand Küsters, Dominique Mercier, Andreas Dengel, Sheraz Ahmed

Abstract

Deep Neural Networks (DNNs) excel at anomaly detection in time-series data but often operate as "black boxes," providing little intuition for their decisions. TSXplain is a novel framework designed to bridge this gap by generating human-readable, natural language explanations. By integrating gradient-based influence tracing with traditional statistical features, TSXplain translates abstract model logic into verifiable reasoning. Evaluation across diverse datasets demonstrates high accuracy in identifying causal data points and strong user acceptance among both experts and novices.

Introduction

While Deep Learning has revolutionized pattern recognition in time-series—ranging from industrial sensor monitoring to medical diagnostics—the lack of interpretability remains a significant barrier to deployment in high-stakes environments. Existing explainable AI (XAI) methods often rely on saliency maps that indicate where a model is looking but fail to explain why a specific segment is considered anomalous. Furthermore, many XAI techniques introduce additional complexity by using secondary neural networks to explain the primary one. TSXplain addresses these challenges by using transparent statistical features as a "common language" between complex models and human operators.

The TSXplain Framework

The TSXplain architecture consists of four integrated modules that process a sequence once it has been flagged as anomalous by a DNN.

The TSXplain framework architecture.

1. Influence Tracer (TSViz)

This module employs a gradient-based approach to pinpoint the specific input data points that most significantly influenced the DNN's decision. By calculating the sensitivity of the output to small perturbations in the input, it identifies the "salient" regions of the time-series.

2. Statistical Feature Extractor

To translate these salient regions into human-understandable concepts, the system calculates classical statistical properties. These include features such as lumpiness (variance of variances), level shifts, KL score (divergence between blocks), number of peaks, and standard deviation. These metrics provide a mathematical grounding for the model's "intuition."

3. Textual Explanation Generator

Rather than relying on potentially unreliable generative language models, TSXplain uses a robust rule-based system. It maps the identified influential points and their statistical characteristics into structured natural language. The system supports two levels of detail: a "Novice" level for quick summaries and an "Expert" level for detailed statistical reporting.

4. Sanity Check

To validate the explanation, the framework performs a perturbation test. It masks the data points identified as influential and re-evaluates the sequence with the DNN. If the model's prediction changes (e.g., the anomaly disappears), the system confirms that the identified points were indeed the cause of the original classification.

Experimental Evaluation

The framework was tested on three distinct datasets: synthetic machine sensor data (Pressure, Torque, Temperature), a Mammography classification dataset, and the NASA Shuttle anomaly detection benchmark.

Performance and Reliability

The reliability of the system was measured by the "flip rate" during sanity checks. When masking the exact influential points (window size 1), the DNN's prediction flipped 73% of the time. This increased to 87.3% with a small window of 3 points, indicating high precision in identifying causal features.

Example of an anomalous sequence explanation and the corresponding sanity check.

Human-Centric Validation

A survey involving both domain experts and novices revealed high levels of trust. Approximately 95.7% of experts found the generated explanations relevant, and 92.8% deemed them correct. Novices also reported high satisfaction, with over 80% finding the explanations sufficient for understanding the model's decision.

Discussion and Conclusion

The primary innovation of TSXplain is the use of statistics as a bridge between abstract neural features and human intuition. By providing actionable intelligence—such as identifying a specific peak or a shift in mean—the system enables users to verify AI logic against domain knowledge.

While currently limited by a pre-defined set of statistical features and domain-specific rule bases, TSXplain represents a significant step toward transparent AI. Future work will focus on expanding the feature library and automating the rule-generation process for broader cross-domain applicability.

Summary updated

BibTeX
@inproceedings{munir2019tsxplain,
  author = {Mohsin Munir and Shoaib Ahmed Siddiqui and Ferdinand Küsters and Dominique Mercier and Andreas Dengel and Sheraz Ahmed},
  title = {{TSXplain: Demystification of DNN Decisions for Time-Series Using Natural Language and Statistical Features}},
  booktitle = {ICANN (Workshop)},
  year = {2019},
  doi = {10.1007/978-3-030-30493-5\_43},
}
Figure