A Hilbert-Valued Functional Decomposition Framework for Explaining Time-Dependent Outputs

Sophie Hanna Langbein, Niklas Koenen, Marvin N. Wright, Julia HerbingerarXiv 2026

TL;DR

This paper introduces a unified framework for explaining machine learning models that predict time-dependent trajectories or functional outputs rather than simple scalar values. By generalizing functional decomposition to Hilbert spaces and introducing customizable kernels, the framework captures complex temporal dependencies and allows users to analyze feature importance at multiple granularities (time-specific, time-resolved, or time-aggregated).

What Problem Does This Paper Address?

Most popular Explainable AI (XAI) tools—like SHAP, LIME, or Permutation Feature Importance—were designed for models that output a single scalar value (e.g., predicting a house price or a probability of disease). However, many modern machine learning models output complex curves or trajectories over time, such as a 24-hour patient biomarker trend or multi-step energy demand forecasts.

To explain these models, practitioners typically apply standard XAI methods "pointwise," treating each hour or time step as an isolated, independent prediction. This approach suffers from two major flaws:

  1. It completely ignores the temporal dependencies across the output domain (treating neighboring time steps as if they are unrelated).
  2. It lacks a principled mathematical mechanism to aggregate feature effects across time.

The result is often noisy, disjointed, and hard-to-interpret explanations that fail to capture the true data-generating process.

Methods

The authors tackle this by proposing the Hilbert-valued Functional Decomposition (H-FD) framework. Instead of decomposing a scalar function, they extend functional ANOVA (Analysis of Variance) decomposition to functions whose outputs live in a Hilbert space (which can represent vectors, curves, or continuous functions).

They formalize feature-based explanations through three core operators:

  1. Masking ($M$): Hiding a subset of features using a reference distribution.
  2. Behavior ($B$): This is split into Input Behavior ($\mathcal{B}_{inp}$), which defines what is being explained (local prediction, global risk, or sensitivity), and Output Behavior ($\mathcal{B}_{out}$), which defines how that influence is represented across time.
  3. Interaction ($I$): Mapping these behaviors to specific feature effects (pure, partial/Shapley, or full effects).

The core innovation is parameterizing the Output Behavior using a symmetric positive semi-definite kernel $K$.

  • Setting $K$ to the Identity kernel ($K = I$) recovers traditional pointwise explanations.
  • Using a time-dependency-aware kernel (like an Ornstein-Uhlenbeck or empirical correlation kernel) smooths out noise and redistributes feature effects across a temporal neighborhood.

This framework elegantly unifies several existing time-series XAI methods (like TsSHAP, ShapTime, and PAX-TS), showing they are simply special cases under an identity kernel.

Figure 1: Hilbert-valued explanation framework. Illustration on an ICU early-warning toy model (top). Two orthogonal axes structure time-dependent attribution. The output behavior (middle) controls how influence is represented across time, parameterized by a kernel K: the identity kernel produces instantaneous effects ϕ(i)(t) (middle, row 1), a time-dependency-aware kernel (correlation kernel) redistributes them phase-awarely (middle, row 2). Resolved trajectories can be sampled at specific time points t0 or aggregated into a scalar ϕ(i). The input behavior (bottom) specifies what is being explained: prediction, risk, or sensitivity.

Datasets

The framework was validated using both synthetic benchmarks and real-world datasets:

  • Synthetic Trajectories: An ICU early-warning biomarker model, a market price pulse model, and a 3-day periodic medication response model.
  • Intraday SPY Volatility: 5-minute absolute log-returns of the SPDR S&P 500 ETF (78 time steps per day) across 560 trading days, aimed at explaining how pre-market features drive intraday volatility.
  • Electricity Demand Forecasting: Two datasets with contrasting temporal structures: the UCI Individual Household Electric Power Consumption (IHEPC) dataset (highly idiosyncratic single-household data) and the GB National Electricity System Operator (NESO) dataset (highly correlated national grid data).

Key Insights and Ideas

  • Kernel Selection as a Modeling Decision: The choice of kernel shouldn't be treated as a hyperparameter to optimize. Instead, it must reflect the specific research question and domain physics. For example, using a symmetric kernel (like a Gaussian) on a causal process will mistakenly attribute feature influence before an event occurs. A causal kernel is required to restrict attribution to future time steps.
  • Feature Ranking Invariance: The authors prove mathematically (Theorem 1) that for linear input behaviors (like local predictions), the relative ordering of feature importance is stable across any non-negative kernel.
  • Non-linear Reordering: Crucially, this invariance does not hold for non-linear behaviors like risk or sensitivity. For these metrics, changing your kernel can completely reorder which feature appears most dominant, emphasizing the importance of principled kernel selection.
Kernel guidance across three synthetic examples

Key Results

  • Ground-Truth Recovery: On synthetic data, non-linear models (Random Forests, MLPs, NGBoost) successfully converged to the analytical ground-truth feature effects and Sobol sensitivity indices as the training sample size increased.
  • Uncovering Financial Regime Shifts: In the SPY volatility case study, a pointwise identity kernel yielded noisy, uninterpretable attributions around a macroeconomic announcement. The feature-specific causal kernel sharply localized the announcement's effect post-release and revealed a powerful synergistic interaction with prior market fear (vix_prev) that pointwise methods missed entirely.
  • Matching Scale in Energy Grids: For household energy data (IHEPC), the identity kernel highlighted sharp, localized morning/evening peaks. For national grid data (NESO), the correlation kernel collapsed intraday variations into smooth, flat trajectories—proving that macro-level weather and calendar seasonality shift the baseline for the entire day uniformly, which is exactly what grid operators need for daily capacity planning.

Limitations and Future Work

  • Computational Complexity: Calculating exact Shapley-based interaction operators remains computationally expensive for large feature sets, though standard sampling approximations can be applied.
  • Kernel Misspecification Risk: Because the user must select the kernel, a poorly chosen kernel can produce attributions that are mathematically valid but practically misleading.
  • Future Horizons: The authors suggest extending this framework to other structured Hilbert spaces, such as spatial fields or images, and combining it with functional principal component analysis (FPCA) to create low-dimensional, highly interpretable representations of output variability.

Summary updated

BibTeX
@misc{langbein2026hilbert,
  author = {Sophie Hanna Langbein and Niklas Koenen and Marvin N. Wright and Julia Herbinger},
  title = {{A Hilbert-Valued Functional Decomposition Framework for Explaining Time-Dependent Outputs}},
  year = {2026},
  eprint = {2609.11295},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.11295},
}
Figure