让时间序列预测的反事实解释更准更快,一次计算就能给出干预建议。
ConTex: Reformulating Counterfactual Generation For Time Series Forecasting

- 用全局统一函数替代逐例优化,生成一致且可解释的干预策略。
- 在多个数据集上验证有效,干预次数减少且推理速度达0.007秒/次。
- 适合需要实时决策支持的场景,如金融、医疗或工业监控。
基于深度学习的时间序列预测在决策中不仅需要准确预测,还需提供可操作的洞察。然而现有模型无法自然地给出如何调整当前条件以实现期望未来结果的指导。反事实解释为此提供自然框架,即通过最小输入变化改变模型预测,从而指示何时何地需干预。现有方法依赖逐实例优化,存在跨实例不一致、计算成本高、难以实时应用等问题。为此,我们重新构建时间序列反事实生成问题为学习全局一致的干预策略,使反事实可通过单一共享函数生成。提出ConTex模型——一种模型无关、分层架构,包含时序上下文编码器与条件编码器,后接两个头分别捕捉干预的时间相关性与强度。该结构通过单次前向传播实现跨时间与特征维度的精准、可解释干预,克服了传统方法的不稳定性。在多个预测模型与基准数据集上,ConTex达到最优有效性,同时生成稀疏反事实,显著减少必要干预数。相比逐例生成,计算成本降低12-36倍,支持约0.007秒/次的实时推理。
原文摘要 · Abstract (English)
Decision-making with deep learning-based time series forecasting requires not only accurate predictions but also actionable insights. However, current architectures do not inherently provide such information. Specifically, guidance is needed on how current conditions must be modified to shift from a predicted outcome to a desired future scenario. Counterfactual explanations provide a natural framework for this task, as they represent minimal input changes that alter the model's prediction, indicating when and how intervention is required. Existing approaches rely on instance-wise optimization, leading to inconsistency across instances, high computational costs, and limited applicability in real-time settings. To address these limitations, we reformulate counterfactual generation for time series forecasting as the problem of learning a globally consistent intervention strategy, allowing counterfactuals to be generated through a single shared function. We propose Counterfactual Time Series Explanations (ConTex), a model-agnostic, decomposed architecture comprising a temporal context encoder and a conditional encoder, followed by two heads that capture interventions in terms of temporal relevance and modification strength. This structure overcomes the instability and inconsistency of instance-based approaches by producing targeted, interpretable interventions across time and feature dimensions in a single forward pass, making it suitable for real-time applications. Across multiple forecasting architectures and benchmark datasets, ConTex achieves state-of-the-art validity while generating sparse counterfactuals that minimize the number of necessary interventions. Additionally, our approach reduces computational cost by at least 12-36x compared to instance-wise generation and supports real-time inference at approximately 0.007 seconds.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。