Towards Transparent Time Series Forecasting

Krzysztof Kacprzyk, Tennison Liu, Mihaela van der Schaar

In high-stakes fields like healthcare, finance, and criminal justice, deploying "black-box" machine learning models carries significant risk. While interpretable "glass-box" models exist for simple classification tasks, time series forecasting remains notoriously difficult to make transparent.

Researchers from the University of Cambridge have introduced TIMEVIEW, a novel framework that moves away from traditional "bottom-up" point-by-point explanations. Instead, it adopts a "top-down" approach called bi-level transparency, allowing users to understand predicted trajectories through high-level trends (e.g., "is the value increasing?") and specific curve properties (e.g., "when does it peak?").

TIMEVIEW's interactive visualization tool demonstrating bi-level transparency: Level 1 (trends) and Level 2 (properties).

The Problem with Current XAI in Time Series

Traditional explainable AI (XAI) methods for time series rely on bottom-up approaches, highlighting feature importance at specific, isolated time steps. However, human decision-makers rarely analyze data this way. For instance, an oncologist tracking tumor growth is less concerned with the exact volume at hour 42 and more focused on the overall trend: Is the tumor shrinking? When will it reach its minimum size?

The critical gap in current forecasting models is the lack of a holistic understanding of the entire predicted trajectory. Existing methods often fail to show how changing an input variable (like drug dosage) qualitatively alters the overall shape of the future.

The TIMEVIEW Methodology

To bridge this gap, the authors propose a framework of bi-level transparency:

  1. Level 1 (Trends): Understanding how the general shape of the trajectory changes as inputs vary.
  2. Level 2 (Properties): Understanding how specific characteristics of that trend—such as a local minimum, maximum, or transition point—shift in response to input changes.

To make this mathematically rigorous, the researchers utilize "dynamical motifs"—basic shapes like "increasing and convex" or "decreasing and concave." A "composition" is a sequence of these motifs that describes the entire curve.

The TIMEVIEW architecture, mapping static features to B-spline coefficients to generate predicted trajectories.

The TIMEVIEW Model is a neural network architecture that maps static input features to the coefficients of B-splines (specifically cubic splines). Cubic splines are smooth and piece-wise, making it analytically straightforward to calculate derivatives and identify exactly where a trend changes (transition points).

This mathematical foundation powers an interactive visualization tool where users can adjust sliders for input features and watch the trajectory—and its underlying composition—update in real-time.

Key Insights and Results

The model was evaluated on a mix of real-world datasets (predicting sound pressure, mortality functions, stress-strain curves, and drug concentrations) and synthetic datasets (tumor growth and mathematical curves).

  • The "Parallel Trajectory" Trap: Simple transparent models like Generalized Additive Models (GAMs) often assume that changing an input merely shifts the whole curve up or down. TIMEVIEW demonstrates that in reality, changing an input (like patient age) can fundamentally alter the shape of the curve, turning a peak into a plateau.
  • Function Sketching as XAI: The authors successfully leverage the mathematical concept of "function sketching"—using first and second derivatives to understand a curve—as the primary vehicle for human interpretability.
  • Performance vs. Transparency: A major takeaway is that transparency does not require a massive sacrifice in accuracy. TIMEVIEW consistently outperformed other transparent adaptations (like Linear-T or DecisionTree-T) and closed-form symbolic regression (PySR). On the Tumor and Stress-Strain datasets, TIMEVIEW achieved a Mean Squared Error (MSE) of 0.00 and 0.04 respectively, often matching or nearing the performance of black-box models like RNNs and XGBoost.

Qualitatively, the interactive tool successfully answers complex "What if" questions (e.g., "What dosage keeps the tumor volume decreasing?") by showing exactly where the trajectory's composition flips from one trend to another.

Limitations and Future Work

While highly effective, TIMEVIEW currently focuses on forecasting based solely on static features (like patient age or initial drug dose). It does not yet handle time-varying inputs (exogenous time series) during the forecasting period. Additionally, while cubic splines are flexible, they may struggle to accurately model trajectories with very sharp, non-smooth jumps or highly oscillatory behavior.

The research team notes that while L2 regularization helps keep compositions from changing too abruptly, more sophisticated penalties could further improve the "smoothness" of the interpretability. Future work will aim to extend this bi-level framework to more complex "many-to-many" time series tasks where the input itself is also a trajectory.

Summary updated

Abstract

Transparent machine learning (ML) models are essential for ensuring interpretability and trustworthiness in decision-making systems, particularly in high-stakes domains such as healthcare, finance, and criminal justice. While transparent machine learning models have been proposed for classification and regression, time series forecasting presents some unique challenges for ensuring transparency. In particular, currently used bottom-up approaches that focus on the values of the time series at specific time points (usually regularly spaced) do not provide a holistic understanding of the entire time series. This limits the applicability of ML in many critical areas. To open up these domains for ML, we propose a top-down framework of bi-level transparency, which involves understanding the higher-level trends and the lower-level properties of the predicted time series. Applying this framework, we develop TIMEVIEW, a transparent ML model for time series forecasting based on static features, complemented with an interactive visualization tool. Through a series of experiments, we demonstrate the efficacy and interpretability of our approach, paving the way for more transparent and reliable applications of ML in various domains.
BibTeX
@inproceedings{kacprzyk2024towards,
  author = {Krzysztof Kacprzyk and Tennison Liu and Mihaela van der Schaar},
  title = {{Towards Transparent Time Series Forecasting}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=TYXtXLYHpR},
}
Figure