Source-linked AI summary
How Faithful Is Attribution for Sales Forecasting? A Counterfactual Study
Glib Kechyn
TL;DR
Sales forecasts guide costly ordering decisions, but accurate deep models do not explain why their predictions change. This paper adds a post-hoc counterfactual attribution layer whose contributions sum exactly to each forecast, and deletion/insertion tests show statistically significant faithfulness while also revealing heterogeneous usefulness and systematic amplitude damping.
Problem
Sales forecasts drive asymmetric ordering decisions, creating a need to understand why a model predicts a particular value rather than relying on its accuracy alone.
Method
The paper reveals baselined input groups in a fixed order, measures each prediction change, and uses those changes as an architecture-agnostic decomposition of the forecast.
Results
Deletion and insertion tests show statistically significant faithfulness, with deletion p < 0.001 and insertion p < 0.01; the contribution is interpretability rather than a new accuracy record.
Takeaways & Limitations
The attributions reflect genuine model behavior at the population level and can explain an already trained black-box forecaster, while remaining informative for some series and not others.
Takeaways & Limitations
Individual group contributions depend on the chosen reveal order and baseline, and explanations inherit the model’s inability to represent long-spaced holiday effects and its damped weekly-cycle amplitude.
Abstract
from arXiv · showhide
Deep models for sales forecasting, such as WaveNet-style dilated convolutional networks, are accurate but opaque: when a single model predicts sales for one of many series, it offers no account of why. We add a post-hoc, architecture-agnostic counterfactual interpretability layer to a multi-series WaveNet forecaster trained on the full Corporacion Favorita grocery dataset (174,685 series over 1,688 days). The method decomposes each forecast into contributions that sum exactly to the predicted value, avoiding the allocation artifacts we observed with additive SHAP-style attribution. We evaluate faithfulness with a deletion/insertion protocol and find a statistically significant effect on both tests (deletion gap 0.22, p<0.001; insertion gap 0.27, p<0.01; robust across five background-sampling seeds), establishing that the attributions reflect genuine model behavior rather than plausible-looking artifacts. We then characterize, honestly, where attribution is and is not informative: reliance on the promotion signal is heterogeneous across series (median ratio approximately 1.0, with roughly 20% of series showing a strong effect), and the model captures the shape of the weekly sales cycle (day-of-week r=0.78) while systematically under-predicting its amplitude. Our contribution is not improved accuracy but an interpretability layer with a rigorous faithfulness evaluation and a candid account of its limits.
1 Introduction
The paper adds a post-hoc, architecture-agnostic counterfactual attribution layer to an existing multi-series forecaster, then tests whether its explanations reflect genuine model behavior. It emphasizes interpretability and faithfulness rather than claiming a new accuracy record.
- Motivation and contribution: Post-hoc counterfactual attribution explains an existing multi-series forecaster without changing its architecture.The method is demonstrated on a WaveNet-style forecaster and treats the model as a black box.
- Interpretability method: Each contribution is a measured prediction change from withholding an input group, so contributions sum exactly to the forecast.Inputs are replaced with a neutral baseline, and the resulting prediction difference defines the group’s contribution.
- Faithfulness evaluation: Deletion and insertion tests show statistically significant faithfulness, with deletion p < 0.001 and insertion p < 0.01.The evaluation asks whether explanations track what the model actually computes rather than merely appearing plausible.
- Scope and limits: Attribution is informative unevenly: promotion reliance varies across series, while weekly-cycle shape is captured but amplitude is damped.The paper presents these patterns as findings that define where explanations are informative and where they are limited.
- Scope and limits: The paper deliberately makes no claim of improved forecast accuracy; its contribution is trusted interpretability.The covariate-augmented model modestly improves the sales-only baseline from NWRMSLE 0.6137 to 0.6102, reported for completeness.
2 Related Work
Prior work either established strong WaveNet-style retail forecasting without evaluating explanation faithfulness or built interpretability directly into specialized architectures. This paper instead explains an already trained forecaster post hoc through a black-box method that is not specific to WaveNet.
- Prior forecasting work: Earlier WaveNet-style retail forecasting established a shared-panel forecaster but reported neither an interpretability layer nor explanation-faithfulness evaluation.This paper follows the shared-panel setup while adding attribution and faithfulness testing.
- Interpretable architectures: Interpretable-by-design models such as N-BEATS and Temporal Fusion Transformer require adopting architectures that explicitly encode inspectable components.Their interpretability is obtained through model design rather than post-hoc analysis.
- Where this work sits: Post-hoc attribution avoids modifying or retraining an already deployed forecaster and requires only black-box input-to-prediction access.The construction is not specific to WaveNet and applies to any forecaster matching that interface.
- Faithfulness evaluation: Deletion and insertion tests perturb inputs in attribution order to measure whether explanations affect predictions as claimed.The protocol is established in vision and is adopted here as the central forecasting faithfulness evaluation.
3 Model
The model is a shared multi-series WaveNet-style forecaster that maps recent sales and promotion inputs to a future sales horizon. Its architecture uses dilated causal convolutions, series embeddings, and log-scaled training, with a direct multi-step output.
- Forecasting setup: For each store-item series, the model maps the most recent L days to the next H days of sales.The model forecasts individual series while training one shared model across the full panel.
- Architecture: The backbone stacks eight dilated causal convolution blocks with dilations 1 through 128, 32 filters, and kernel size 3.Left-only padding preserves causality, and the receptive field spans the full input window.
- Multi-series conditioning: A learned 8-dimensional embedding conditions shared weights on each of 174,685 series.The input contains sales and one covariate channel, onpromotion, with L = 90 and H = 16.
- Objective and scaling: Training uses an NWRMSLE-aligned objective in log(1+x) space on sales, while the binary promotion channel remains untransformed.The log transform compresses cross-series scale differences and aligns training with the evaluation metric.
- Relation to prior work: Unlike the prior sequence-to-sequence WaveNet forecaster, this model emits the full 16-day horizon directly from the dilated stack.The shared-across-series design follows prior work, but the horizon mechanism differs.
- Preprocessing: Preprocessing fills missing series-date combinations with zero sales, clips returns to zero, maps promotion to 0/1, and holds out the final 16 days.These choices follow the prior data assumptions and define the validation setup.
4 Forecasting Results
The single-model forecasting setup uses matched comparisons on the official metric, with past-only promotion status as the covariate and epoch 43 selected as the validation checkpoint. Adding promotion yields a modest accuracy improvement, while later training shows only mild overfitting.
- The study reports matched single-model comparisons rather than reproducing the competition leaderboard result.The earlier leaderboard result used an ensemble, exponential moving averaging, and future promotion information.
- NWRMSLE 0.6137 → 0.6102 compares the sales-only baseline with the matched model that adds onpromotion.Both models use identical settings and converge, making the improvement modest but directly comparable.
- Past-only onpromotion keeps inference aligned with deployments where future promotion schedules may be unknown.Known-future covariates are left as a future extension.
- NWRMSLE 0.6102 is the best validation value, reached at epoch 43 for the model with onpromotion.The checkpoint is selected from 60 training epochs.
- Mild late overfitting appears after epoch 43 as training loss declines gently while validation performance rises slightly.Validation remains close to 0.61 through epoch 60.
5 Interpretability Method
The paper introduces a post-hoc counterfactual attribution method that reveals grouped input positions sequentially and assigns each group the prediction change caused by its reveal. The contributions telescope to the fully revealed forecast, avoiding allocation artifacts while remaining a statement about model response rather than data-generating causality.
- Counterfactual attribution reveals named groups of true input positions from a fully baselined input and records the model prediction after each reveal.Groups can represent seasonal pattern, recent trend, or promotion.
- Each group contributes f(m_k) − f(m_{k−1}), so the baseline prediction plus all contributions equals the fully revealed forecast exactly.The equality holds up to floating-point error because the contributions telescope.
- The counterfactual construction avoids near-zero group totals caused by signed attribution cancellation or groups containing few positions.This addresses cases where additive allocation could falsely imply that the model ignores promotions.
- Gradient-based SHAP is retained for per-timestep visualizations and ratio analysis, where a signed per-position signal is useful.
- These attributions describe model responses to withholding inputs, not causal structure in the data-generating process.A large promotion attribution means reliance on that channel, not that promotions cause sales.
6 Faithfulness Evaluation
The evaluation tests whether attribution rankings reflect model behavior by comparing ordered deletion and insertion with random ordering. Across 30 series, ordered attribution is significantly more faithful on both tests, robust to five background seeds, though effects vary substantially across individual series.
- Deletion masks positions from most to least important, while insertion reveals them in that order from a baselined input.Faithful rankings should change or recover the forecast faster than random order.
- 0.217 mean deletion gap and 0.271 mean insertion gap show ordered attribution outperforming random order in the canonical seed-0 run.The corresponding significance levels are p = 2.9 × 10^-5 for deletion and p = 2.7 × 10^-3 for insertion.
- Deletion gaps of 0.216–0.263 and insertion gaps of 0.269–0.284 remain significant across five background seeds.Deletion remains below p < 0.001 and insertion below p < 0.01 across the tested seeds.
- Per-series variability is substantial: the deletion standard deviation is 0.24 versus mean 0.22, while insertion standard deviation is 0.44 versus mean 0.27.Insertion has the larger average effect but is more variable across series.
- The evidence supports population-level faithfulness across 30 series, not equally strong explanations for every individual series.Individual series can depart substantially from the aggregate average.
7 Attribution Analysis
The analysis finds that promotion reliance varies substantially across series, while the forecaster captures the weekly sales-cycle shape but dampens its amplitude and misses holiday effects outside its input window.
- 7.1 Heterogeneity of promotion reliance: Promotion reliance is heterogeneous: promotions strongly influence attribution for a minority of series but contribute little for most.The analysis distinguishes series where the signal matters from those where it does not.
- 7.2 Weekly cycle: The model captures the broad weekly-cycle shape with day-of-week r = 0.78 but under-predicts its amplitude.Predicted bars are consistently closer to the series average than actual bars.
- 7.2 Weekly cycle: The training objective is attributed to amplitude damping because it optimizes average forecast accuracy rather than periodic-structure fidelity.Regression toward the mean is described as the low-risk solution under such a loss.
- 7.1 Heterogeneity of promotion reliance: The median promotion-day to non-promotion-day attribution ratio is 1.02, with only about 20% of series exceeding 2.The distribution has a long right tail.
- 7.2 Weekly cycle: Holiday effects are structurally uncapturable when their spacing exceeds the 90-day input window.This limits explanations for deviations driven by holidays outside the model’s observed window.
8 Limitations
The method’s interpretation is constrained by heterogeneous signal use, order- and baseline-dependent group credit, non-causal meaning, and evaluation on one dataset and metric.
- Scope of informative attribution: Promotion-focused attribution is uninformative for most series because the promotion signal contributes little to their forecasts.The method distinguishes these cases but cannot surface an actionable factor the model does not use.
- Model blind spots: The model under-predicts weekly-cycle amplitude and cannot represent holiday effects whose spacing exceeds the 90-day input window.Explanations inherit these blind spots.
- Order and baseline dependence: Individual group contributions depend on reveal order and the chosen baseline, although their total remains exactly equal to the forecast.The study fixes one order and one baseline rather than averaging over orderings.
- Interpretation versus causality: A large promotion attribution indicates model reliance on that channel, not that promotions cause sales.Separating promotions from coincident demand drivers requires causal inference, which the study does not attempt.
- Evaluation scope: The faithfulness result is evaluated on one dataset under one metric, so generalization to other domains and forecasters remains open.Replication on a second domain is identified as the most direct next step.
9 Conclusion
The paper adds a post-hoc counterfactual attribution layer to an existing WaveNet forecaster and validates its faithfulness, while showing that interpretability remains series- and model-dependent. Its practical value is a faithful account of model behavior paired with explicit boundaries on when that account is informative.
- Contribution: The study adds a post-hoc, architecture-agnostic counterfactual attribution layer to a multi-series WaveNet forecaster.The layer treats the forecaster as a black box and targets an already trained and deployed model.
- Faithfulness: The attributions pass deletion and insertion tests with high statistical significance, indicating genuine model behavior.The method decomposes each forecast into contributions that sum exactly to the predicted value.
- Practical value: The paper deliberately does not compete on forecasting accuracy; its claimed value is interpretability with an honest signal of when explanations are informative.This supports decisions about how far to trust a forecast before it drives an ordering decision.
- Interpretation boundary: A faithful attribution can still be misread as a causal claim about the world, so the paper reports both informative and uninformative cases to discourage over-trust.Model reliance on a promotion channel is not evidence that promotions caused sales.