Source-linked AI summary
A Hilbert-Valued Functional Decomposition Framework for Explaining Time-Dependent Outputs
Sophie Hanna Langbein, Niklas Koenen, Marvin N. Wright, Julia Herbinger
TL;DR
Feature-based explanations are poorly matched to functional and multivariate outputs because pointwise methods ignore dependencies across output locations and lack principled temporal aggregation. This paper extends functional decomposition and feature-based operators to Hilbert-valued outputs, using kernels to support time-specific, time-resolved, and time-aggregated explanations. The framework unifies existing methods and shows that kernel choice shapes the temporal structure of explanations in practice.
Problem
Pointwise feature explanations for functional or multivariate outputs ignore dependencies across output locations and lack a principled basis for aggregating effects across time.
Method
The paper generalizes functional decomposition and feature-based explanation operators to Hilbert-valued prediction functions, using kernels to represent output dependencies at multiple temporal granularities.
Results
The framework unifies existing methods under a common operator view, and experiments show that kernel choice directly affects the temporal structure of explanations.
Takeaways & Limitations
Kernel selection should be guided by the scientific question and domain knowledge because it encodes whether contributions are instantaneous, persistent, phase-dependent, or causal.
Takeaways & Limitations
The framework relies on user-specified kernels, whose misspecification may influence results, and Shapley-based interaction operators remain computationally expensive.
Abstract
from arXiv · showhide
Feature-based explanations quantify features' influence on model predictions, but are primarily designed for scalar outputs. In many applications, however, outputs are functional or multivariate, such as time-dependent trajectories in demand forecasting. Consequently, existing approaches typically explain each output location independently, ignoring dependencies across the output components. We address this limitation by developing a unified framework for feature-based explanations of time-dependent outputs. Specifically, we generalize functional decomposition to Hilbert-valued prediction functions and extend an existing feature-based explanation framework to this setting. Our framework introduces kernel-based output representations that enable time-dependency-aware explanations at multiple levels of temporal granularity, including time-specific, time-resolved, and time-aggregated, while providing a unified view in which existing methods arise as special cases. We validate our framework on synthetic and real-world data, including intraday financial market volatility prediction and energy demand forecasting.
1 Introduction
Existing feature-based explanations are mainly designed for scalar outputs, while time-dependent outputs require explanations that account for temporal dependence and meaningful aggregation. The proposed Hilbert-valued framework addresses this gap with kernel-based, multi-granularity explanations and unifies existing approaches.
- Time-dependent outputs expose two gaps in pointwise explanations: they ignore dependencies across output locations and lack principled temporal aggregation.The ICU trajectory example shows why feature influence may spread across neighboring times and why phase-level summaries can matter more than attribution at one instant.
- The Hilbert-valued explanation framework extends feature-based explanations to multivariate and functional outcomes using kernel-based aggregation of output dependence.It is designed to support time-dependent outputs while preserving feature-level explanations.
- The framework provides time-specific, time-resolved, and time-aggregated views, with identity kernels yielding instantaneous effects and dependency-aware kernels producing phase-aware effects.The same output can therefore be examined at selected time points, across a trajectory, or as a scalar importance.
- Classical pointwise explanations and time-dependent Sobol indices arise as special cases within the unified framework.This connects feature-based explanations with established sensitivity-analysis measures.
- Kernel-selection guidance is demonstrated in real-world applications to show how different output representations affect explanations.The paper studies intraday financial volatility prediction and energy demand forecasting.
2 Related Work
Related work addresses time-dependent outputs through pointwise or predefined aggregate explanations, while sensitivity analysis handles functional outputs mainly through variance-based measures. The paper positions its framework at the intersection of these two strands.
- Forecasting and survival explanations generally treat output locations independently or use predefined aggregations, including TsSHAP, ShapTime, PAX-TS, SurvSHAP(t), and SurvSHAP-IQ.These approaches remain prediction-level and are often pointwise or restricted to specified aggregates.
- Sensitivity-analysis methods aggregate variance across functional outputs and can incorporate temporal covariance, but remain restricted to variance-based importance.The paper identifies limited links between these methods and feature-based XAI.
3 Background
The background develops functional decomposition, Sobol sensitivity analysis, and the masking–behavior–interaction operator view used to construct feature-based explanations. These components provide the scalar foundations later extended to Hilbert-valued outputs.
- Functional decomposition represents a prediction function as pure effects for feature subsets, with orthogonal components inducing a variance decomposition under feature independence and square-integrability.Each component captures effects beyond those attributable to its subsets.
- For time-dependent outputs, pointwise decomposition can be extended through covariance kernels, yielding time-specific and time-aggregated Sobol indices that account for cross-time dependence.Ignoring cross-time covariance reduces the aggregate measure to a sum of marginal variances.
- Feature-based explanations are expressed through masking, behavior, and interaction operators.Masking constructs predictors from selected features, behavior defines the quantity of interest, and interaction maps it to feature explanations.
- Pure effects measure standalone contributions, partial effects distribute contributions across features, and full effects capture all contributions involving a feature, including interactions.These distinctions determine which feature influence notion the explanation reports.
- The operator view recovers established methods such as Shapley values, partial dependence, permutation feature importance, and Sobol indices through different masking, behavior, and interaction choices.This establishes a common formulation for several explanation and sensitivity-analysis methods.
4 Methodology
The methodology lifts functional decomposition and feature-based explanation operators to Hilbert-valued outputs. Kernel-defined output behavior represents temporal dependence at specific, resolved, or aggregated scales while recovering existing methods as special cases.
- 4.1 Hilbert-Valued Functional Decomposition: Hilbert-valued functional decomposition assigns each feature effect a function or vector in the output space rather than a single scalar.The decomposition retains the scalar construction over inputs while allowing effects to vary across the output domain.
- 4.2 Hilbert-Valued Explanation Framework: The extended pipeline separates input behavior, which defines what is explained, from output behavior, which defines how it is represented across the output domain.This preserves the operator structure while adding explicit control over temporal representation.
- 4.2 Hilbert-Valued Explanation Framework: A symmetric positive semi-definite kernel encodes output dependencies, producing time-specific explanations, time-resolved trajectories, or time-aggregated explanations.Evaluating the time-specific operator over all times yields resolved explanations, while integration over the domain yields aggregate effects.
- 4.2 Hilbert-Valued Explanation Framework: For linear input behavior, nonnegative kernels preserve the ordering of time-aggregated pure effects when one feature dominates another at every output location.This ordering guarantee does not generally extend to nonlinear risk or sensitivity behaviors, where kernels may change feature rankings.
- 4.2 Hilbert-Valued Explanation Framework: Fixed masking, input behavior, and output behavior operators yield unique additive decompositions for time-specific, time-resolved, and time-aggregated explanations.The framework therefore keeps feature-based explanations well-defined while changing their temporal representation.
- 4.3 Unifying Existing Methods: Identity kernels recover pointwise approaches, while general kernels remove the restriction to independent output locations and additional input behaviors extend explanations beyond prediction.With sensitivity behavior and a constant kernel, the framework recovers closed and total time-dependent Sobol indices under feature independence.
5 Experiments
The experiments show that kernel choice controls how feature effects are localized, smoothed, aligned, or aggregated across time. Synthetic and real-world studies demonstrate that kernels should match temporal scope, causality, feature heterogeneity, and output dependence.
- Kernel guidance: Kernel choice should reflect the intended notion of contribution rather than be tuned as a generic hyperparameter.The framework evaluates kernels using synthetic scenarios with known ground truth and emphasizes interpretation-driven selection.
- Kernel guidance: Identity, OU, correlation-aware, and causal kernels produce different temporal resolutions, with causal kernels preventing attribution before an event.In the market pulse example, the causal exponential kernel restricts attribution to times after the pulse, unlike symmetric kernels.
- Kernel guidance: A periodic kernel captures recurring medication effects but can spuriously impose periodicity on one-off events, motivating feature-sensitive kernel choices.The medication example shows that a single kernel may misrepresent heterogeneous feature behaviors.
- Kernel guidance: Time-aggregated prediction-based feature rankings are often stable across kernels when attribution trajectories preserve their ordering over time.In such cases, kernels mainly change attribution shape and can be selected on interpretive grounds.
- Electricity demand comparison: The energy-demand comparison shows that correlation kernels adapt effect resolution to dependence scale: local smoothing for IHEPC and full-day coherence for NESO.IHEPC is dominated by lag_daily_mean, whereas NESO variance is dominated by month and season.
6 Discussion and Limitations
The discussion presents kernel choice as a modeling decision that determines the temporal interpretation of explanations. It also identifies computational cost and kernel misspecification as important limitations, while outlining extensions to broader structured outputs.
- Discussion: Kernel selection encodes whether contribution is interpreted as instantaneous, persistent, phase-dependent, or causal.The OU length-scale in the SPY experiment was chosen to reflect the empirical half-life of volatility shocks, while other applications may require different scales.
- Limitations: Shapley-based interaction operators remain computationally expensive, although standard approximation methods and faster implementations may reduce this burden.Pure and full effects can be computed more efficiently than Shapley-based interaction operators.
- Limitations: User-specified kernels introduce an additional modeling choice whose misspecification may influence the resulting explanations.The flexibility of kernel selection therefore requires principled alignment with the interpretive goal.
- Extensions: The framework can extend to spatial fields, images, operator-valued kernels, and time-dependent inputs, with functional principal component analysis proposed for lower-dimensional representations.These are identified as promising directions rather than evaluated results of the present study.
A Proofs
This appendix supplies proofs for the theoretical statements presented in Section 4.
- Proofs: The appendix contains the proofs supporting the theoretical statements in Section 4.
- Proofs: Its role is to provide formal justification for the framework’s stated theoretical results.
- Proofs: The appendix is organized as a proof supplement rather than an additional empirical evaluation.
A.1 Proof of Thm. 1
The proof establishes the representation and ordering properties underlying time-specific, time-resolved, and time-aggregated explanations. It extends the argument from pure effects to partial and full effects.
- Proof of Thm. 1: The proof derives a representation for time-specific prediction-based input behavior using kernel-weighted output effects.The derivation uses substitutions, reindexing, positive weights, and Fubini’s theorem before obtaining the stated representation.
- Proof of Thm. 1: The argument extends to partial Shapley effects and full interaction effects through Shapley weights and Möbius decomposition.Uniqueness of the Möbius transform yields an additive decomposition for time-specific, time-resolved, and time-aggregated explanations.
- Proof of Thm. 1: Under the stated ordering condition, individual pure feature effects inherit the comparison result from the derived representation.The proof compares features i and j and applies the representation to establish the result for individual pure effects.
- Proof of Thm. 1: Because the construction of the output behavior operator is independent of M, Binp, and Bout, the result applies across the corresponding explanation levels.
A.3 Proof of Theorem 2
The proof shows that, under feature independence, the Hilbert-valued framework recovers covariance-based Sobol value functions and indices, including time-specific and time-aggregated forms. Its operator choices also connect masking, input behavior, output aggregation, and interaction effects to established explanation methods.
- A.3 Proof of Theorem 2: Pure and full interaction operators recover closed and total Sobol contributions by aggregating the relevant feature-subset effects.Pure effects aggregate subsets L contained in S, whereas full effects aggregate all subsets intersecting S.
- A.3 Proof of Theorem 2: Under feature independence, the framework recovers time-specific and time-aggregated covariance-based Sobol indices as special cases.The derivation first recovers covariance-based Sobol value functions and then normalizes the corresponding covariance contributions by total covariance.
- Operator choices: Masking operators encode baseline, marginal, or conditional feature removal, with marginal and conditional masking coinciding under independence.The equivalence under independence links the masking choices to the functional decomposition used in sensitivity analysis.
- Operator choices: Output behavior controls whether explanations are time-specific, time-resolved, or time-aggregated, while the kernel determines how output-domain dependencies enter the aggregation.Time-specific operators evaluate a fixed output location, time-resolved operators evaluate all t, and time-aggregated operators summarize the domain into a scalar.
- Operator choices: Prediction-, sensitivity-, and risk-based behaviors combined with different interaction operators recover families including PDP, SHAP, PFI, SAGE, and Sobol indices.The interaction choice distinguishes pure, partial, and full effects, determining how interaction contributions are assigned.
C Mapping Existing Methods to the Hilbert-valued Explanation Framework
The framework expresses existing time-dependent explanation methods through choices of masking, input behavior, output behavior, and interaction operators. It generalizes these methods with nontrivial kernels and alternative behaviors, while identifying linear-aggregation equivalences and current masking limitations.
- Aggregation equivalence: For linear aggregation, aggregating masked predictions is equivalent to explaining the aggregated output before applying standard explanation methods.This equivalence does not generally hold for nonlinear aggregations such as maxima or quantiles.
- Mapping existing methods: The framework maps forecasting and survival methods to combinations of prediction-based behavior, time-specific or time-aggregated output behavior, and interaction operators.TsSHAP and SurvSHAP(t) use time-specific explanations, ShapTime uses time aggregation, and PAX-TS supports either output behavior with full effects.
- Remarks on masking: Explicit time-dependent masking remains outside the current framework and is identified as a direction for future work.Localized or time-dependent perturbations can be interpreted as alternative masking strategies, but are not explicitly modeled here.
- Summary: Existing methods generally use K = I, treating output time points independently rather than modeling dependencies across the output domain.The proposed framework permits nontrivial kernels for correlation-aware explanations.
- Summary: The framework also supports risk- and sensitivity-based input behaviors, extending beyond prediction-level explanations to global importance measures.Under the corresponding operator choices, sensitivity-based methods yield Sobol indices and risk-based methods yield performance-degradation measures such as PFI and SAGE.
Experimental setup
The experiments use a synthetic time-dependent ICU biomarker model with known main and interaction effects, noisy training data, and four fitted black-box model classes. Performance is assessed against an oracle across training-sample sizes and repeated Monte Carlo runs.
- Experimental setup: The synthetic trajectory combines three feature effects with an X1–X2 interaction term, enabling recovery assessment for both pure effects and interactions.The interaction is centered at t = 5, while the feature-specific terms represent recovery, early shock, and late deterioration patterns.
- Experimental setup: The interaction term contributes approximately 2.4% of total variance, and training data include Gaussian observation noise with signal-to-noise ratio 5.The model is evaluated at x* = (0.8, 0.9, 0.7), with Xi sampled uniformly from [0, 1].
- Experimental setup: Pure prediction effects are estimated for Ridge regression, random forest, NGBoost, and an MLP, with an oracle estimator separating estimation variance from model approximation error.The oracle applies the Möbius transform directly to the true model.
- Experimental setup: Ridge regression fails to recover the interaction effect at every sample size because its additive linear specification is misspecified.Table 3 reports normalized L2 error relative to the corresponding oracle effect, where 1.0 represents a trivially zero prediction.
- Experimental setup: The study varies training size from 50 to 10,000 observations and averages results over 30 Monte Carlo runs.The sample sizes are n ∈ {50, 100, 250, 500, 1000, 2000, 5000, 10000}.
Evaluation metrics
Evaluation uses trajectory-level and time-aggregated recovery metrics, with synthetic experiments assessing convergence of main and interaction effects and validation of Sobol and ranking behavior under different kernels.
- Effect recovery: All non-linear models recover main effects with normalized L2 errors below 5% at n = 2,000 and below 2% at n = 10,000.Relative aggregated errors show a similar pattern, while ridge regression plateaus at εL2 = 1.0 and εagg = 1.0 for the interaction.
- Effect recovery: Interaction effects are harder to recover than main effects, although non-linear models converge toward zero error as sample size increases.The interaction’s small signal contribution makes recovery difficult, whereas ridge cannot represent it structurally.
- Time-resolved and time-aggregated effects: At n = 1,000, all models reproduce the main-effect trajectories and ordering Φ{X1} > Φ{X2} > Φ{X3} > Φ{X1,X2}, with the largest deviations for interactions.The interaction peak is recovered in shape but has greater pointwise variance, and its time-aggregated value is underestimated by the MLP.
- Sobol index recovery: Under the constant kernel, H-FD recovers time-resolved and time-aggregated Sobol indices, while noisy near-zero time-resolved regions reflect ratio normalization rather than failed effect recovery.All models correctly recover the time-aggregated indices, which are robust to pointwise normalization noise.
- Aggregated ranking preservation: For prediction input behavior, non-negative kernels preserve rankings when one feature is pointwise dominant, whereas nonlinear sensitivity and risk behaviors can change rankings across kernels.The kernel reweights the time axis without reversing pointwise dominance in the sufficient-condition case, but nonlinear behaviors do not generally retain ranking invariance.
- Kernel guidance: Kernel choice depends on the research question, output structure, and domain knowledge, with no universally correct kernel and possible per-feature selection for mixed temporal characteristics.The constant kernel corresponds to classical functional Sobol indices by equally weighting covariance terms across time pairs.
D.3 SPY Intraday Volatility
The SPY case study models 78 five-minute intraday volatility outputs jointly from pre-market features using a fixed multivariate random forest. Kernel choices then reveal smooth, event-localized, and interaction-specific temporal effects.
- Model and data: The target is absolute five-minute log-return after subtracting the training-split cross-day mean, so explanations focus on deviations from the typical intraday U-shaped volatility pattern.The retained trading session contains 78 five-minute intervals per day after removing opening and closing auction bars.
- Model and data: The multivariate random forest predicts all 78 diurnal-adjusted volatility values jointly, allowing temporal correlations in residuals without an explicit sequence model.The data cover 560 trading days, with a chronological 80% train and 20% test split to prevent look-ahead leakage.
- Global effects: Across the training distribution, vix_prev dominates global sensitivity and risk effects, while its OU-kernel effect is smoother than under the identity kernel.For overnight_ret, the time-aggregated effect is near zero even though it may matter for specific instances.
- Local effects: Under the feature-specific kernel, vix_prev has a smooth positive effect across the day, while the causal kernel localizes ann_indicator after 14:00 without pre-event leakage.The partial-to-pure ratio for ann_indicator is 1.61×, indicating substantial interaction with other features in its attributed effect.
- Interaction effects: The vix_prev × ann_indicator pair is the strongest time-aggregated interaction, with pre-announcement redundancy followed by post-announcement synergy under causal localization.The vix_prev × overnight_ret pair is comparable in aggregate magnitude but lacks a sharp event-locked profile.
D.4 Electricity Demand Comparison
The electricity-demand case studies compare identity and correlation kernels for global and local feature effects on household and national demand trajectories. The correlation kernel smooths or aggregates temporal patterns, while the datasets differ in predictive performance and dominant drivers.
- Data and model: The NESO model reaches trajectory-level R2 = 0.738, compared with R2 = 0.191 for IHEPC, under the same multivariate random forest architecture.Both models use 300 trees, max_features="sqrt", random_state=42, and jointly predict the full trajectory.
- Global sensitivity and risk: For IHEPC, lag_daily_mean, lag_morning, and month dominate sensitivity and risk, whereas NESO is dominated by month and season.NESO effects have substantially larger magnitudes, consistent with national demand being driven by weather and calendar seasonality.
- Global sensitivity and risk: The correlation kernel merges IHEPC’s morning and evening peaks into one elevated region but produces near-flat NESO trajectories under near-uniform covariance.The identity kernel preserves separate daily variation for IHEPC and stronger within-day variation for NESO.
- Local prediction effects: Correlation-kernel local effects broaden IHEPC peak contributions and yield roughly constant positive NESO winter effects, while reducing apparent effect magnitude.The NESO pattern is consistent with winter demand being uniformly elevated relative to the annual mean.
- Global prediction effects: Global PDP-style effects show monotone lag_daily_mean and U-shaped month relationships for IHEPC, with the correlation kernel tightening temporal spread.For NESO, month is also U-shaped and lag_evening is among the two highest-importance features.
- Limitations: The framework warns that kernel misspecification can produce technically valid but misleading attributions, so kernel choices require explicit justification.Reference-distribution and masking choices also remain relevant for Shapley-based explanations.