xaitimesynth: A Python Package for Evaluating Attribution Methods for Time Series with Synthetic Ground Truth

Gregor Baer
3/6/2026
cs.LGcs.AI

Official code: gregorbaer/xaitimesynth (1 star, MIT, last commit 2026-04-28).

Abstract

Evaluating time series attribution methods is difficult because real-world datasets rarely provide ground truth for which time points drive a prediction. A common workaround is to generate synthetic data where class-discriminating features are placed at known locations, but each study currently reimplements this from scratch. We introduce xaitimesynth, a Python package that provides reusable infrastructure for this evaluation approach. The package generates synthetic time series following an additive model where each sample is a sum of background signal and a localized, class-discriminating feature, with the feature window automatically tracked as a ground truth mask. A fluent data generation API and YAML configuration format allow flexible and reproducible dataset definitions for both univariate and multivariate time series. The package also provides standard localization metrics, including AUC-PR, AUC-ROC, Relevance Mass Accuracy, and Relevance Rank Accuracy. xaitimesynth is open source and available at https://github.com/gregorbaer/xaitimesynth.

View on arXivView PDF

Code Implementations(1)

MIT

A Python package for benchmarking explainable AI (XAI) algorithms (mostly feature attributions) on time series classification tasks using synthetic data with known ground truth feature locations.

10Python, MakefileMar 24, 20255 months agoMIT
benchmarkingexplainabilityexplainable-aisynthetic-datatime-series+2 more

Similar Papers

Cite this paper

@article{baer2026xaitimesynth,
  title  = {xaitimesynth: A Python Package for Evaluating Attribution Methods for Time Series with Synthetic Ground Truth},
  author = {Gregor Baer},
  year   = {2026},
  eprint = {2603.06781},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.06781v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.06781.svg)](https://codeofpaper.com/paper/2603.06781)

Discussion