[论文解读] Time Interpret: a Unified Model Interpretability Library for Time Series
Time Interpret 引入了一个基于 PyTorch 的统一库,用于时间序列可解释人工智能,通过引入如时间集成梯度(Temporal Integrated Gradients)和时间前向隧道(Time Forward Tunnel)等专用归因方法扩展了 Captum。该库支持模型无关的时间特征归因,适用于真实和合成数据集,提供评估指标和 PyTorch Lightning 集成,增强了金融与医疗等高风险应用中的可解释性。
We introduce $ exttt{time_interpret}$, a library designed as an extension of Captum, with a specific focus on temporal data. As such, this library implements several feature attribution methods that can be used to explain predictions made by any Pytorch model. $ exttt{time_interpret}$ also provides several synthetic and real world time series datasets, various PyTorch models, as well as a set of methods to evaluate feature attributions. Moreover, while being primarily developed to explain predictions based on temporal data, some of its components have a different application, including for instance methods explaining predictions made by language models. In this paper, we give a general introduction of this library. We also present several previously unpublished feature attribution methods, which have been developed along with $ exttt{time_interpret}$.
研究动机与目标
- 解决在金融和医学等高风险领域中,对时间序列数据深度学习模型进行解释时缺乏统一、易用工具的问题。
- 通过引入时间序列专用的归因方法扩展 Captum,提升序列决策中模型的透明度与公平性。
- 提供一个综合性工具包,包含数据集、模型、评估指标以及 PyTorch Lightning 集成,以简化可复现的研究与部署流程。
- 支持时间归因(按时间步的特征重要性)与模型无关的解释技术,后者可扩展至时间序列之外的应用,包括自然语言处理任务。
- 引入新型归因方法,如 TIG、时间前向隧道和 LOF 增强的 LIME/SKAP,以提升解释的鲁棒性与保真度。
提出的方法
- 实现时间集成梯度(TIG),即仅对当前时间步进行插值,同时保留过去输入并排除未来数据的集成梯度变体。
- 提出时间前向隧道(Time Forward Tunnel),作为包装器,将任意 Captum 归因方法迭代应用于截断序列,直至时间 t,通过排除未来信息确保因果性。
- 开发增强型遮蔽法(AugmentedOcclusion),从靠近输入的自举分布中采样基线,以减少分布外扰动。
- 集成 BayesLime 与 BayesKernelShap,利用贝叶斯线性回归提供解释的不确定性估计(可信区间)。
- 通过返回形状为 (T, N) 的归因张量(输入形状为 (T, N)),支持时间归因,实现按时间步的可解释性。
- 通过将模型层中的 ReLU 替换为 Softplus 实现模型无关解释,即非线性隧道(Non-linearities Tunnel),以减少曲率引起的解释伪影。
![Figure 1: Illustration of the TIG method . Given an input x and a corresponding baseline $\overline{\textbf{x}}$ , we compute the attribution as such. For each time t, we crop future times: $\textbf{x}[:t]$ , and we only compute interpolations on the last data point in time: $\textbf{x}_{\alpha}=(x_](https://ar5iv.labs.arxiv.org/html/2306.02968/assets/figures/tig.png)
实验结果
研究问题
- RQ1通过改进基线选择与扰动策略,能否提升时间序列模型中特征归因的保真度与鲁棒性?
- RQ2时间归因方法如 TIG 与时间前向隧道,在多大程度上能提供比标准归因技术更准确且具有因果一致性的解释?
- RQ3如 BayesLime 与 BayesKernelShap 等不确定性感知方法,能否通过量化解释置信度来提升时间序列中解释的可靠性?
- RQ4基于局部离群点因子(LOF)的相似性度量,在局部解释中能否有效降低对异常扰动的敏感性?
- RQ5该库的哪些组件可被泛化至时间序列之外的应用,例如用于解释基于 Transformer 的语言模型?
主要发现
- 时间集成梯度(TIG)通过仅插值当前时间步、保留过去输入并排除未来数据,提供了一种具有因果一致性的归因方法。
- 时间前向隧道使任意 Captum 归因方法能够以因果、迭代的方式应用,确保未来数据不会影响时间 t 的归因结果。
- 增强型遮蔽法通过从靠近输入的自举分布中采样基线,减少了分布偏移,提升了解释的稳定性。
- BayesLime 与 BayesKernelShap 为归因提供了可信区间,通过量化特征重要性的不确定性,增强了可解释性。
- LOF 增强的 LIME 与核 SHAP 通过使用 LOF 分数作为相似性权重,降低了对异常扰动的敏感性,提升了在稀疏或噪声数据中的鲁棒性。
- 该库同时支持时间归因(按时间步)与全局归因,其中如 DynaMask、ExtremalMask 与 Retain 等方法可实现动态且上下文感知的解释。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。