Paper deep dive
Towards A Unified Information Bottleneck Framework for Time Series Explanations
Xu Zheng, Zichuan Liu, Zhuomin Chen, Mayur Akewar, Janki Bhimani, Jason Liu, Mo Sha, Jingchao Ni, Wei Cheng, Dongsheng Luo
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 90%
Last extracted: 8/29/2026, 3:33:03 AM
Summary
The paper introduces TimeX++, a unified framework for explaining deep learning models on time series data by bridging attribution and counterfactual explanations. It addresses the limitations of existing methods, such as out-of-distribution issues in attribution and adversarial instability in counterfactuals, by applying the Information Bottleneck principle. TimeX++ uses a parametric transformation network to generate explanation-embedded instances that preserve attribution information while ensuring stable, semantically valid counterfactuals within the data distribution.
Entities (8)
Relation Signals (7)
TimeX++ → basedon → Information Bottleneck
confidence 95% · Building upon the Information Bottleneck principle, our formulation explicitly prevents trivial explanations
TimeX++ → unifies → Attribution Explanations
confidence 90% · we propose a unified objective function for explainable time series learning that bridges attribution and counterfactual reasoning
TimeX++ → unifies → Counterfactual Explanations
confidence 90% · we propose a unified objective function for explainable time series learning that bridges attribution and counterfactual reasoning
TimeX++ → solves → Out-of-Distribution
confidence 85% · TimeX++ constrains the counterfactual trajectory... ensuring the classifier evaluates valid, realistic samples
TimeX++ → solves → Adversarial Noise
confidence 85% · produces stable counterfactual explanations... resistant to noise vulnerabilities
Attribution Explanations → suffersfrom → Out-of-Distribution
confidence 85% · attribution methods lacking causal validation... suffer from out-of-distribution (OOD) issues
Counterfactual Explanations → suffersfrom → Adversarial Noise
confidence 85% · counterfactual methods suffer from severe instability, producing adversarial-like noise
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Explaining deep learning models operating on time series data is crucial in various applications that require transparent and interpretable insights into model behavior. {Existing explanation methods generally fall into two categories: attribution-based explanations, which identify the temporal regions most responsible for a prediction, and counterfactual explanations, which reveal how an input should be modified to alter the model's decision.} {Despite valuable insights, these two fields are largely studied independently. This disconnect leaves attribution methods lacking causal validation, while counterfactual methods suffer from severe instability, producing adversarial-like noise instead of meaningful explanations.} In this work, we revisit time-series explainability from an information-theoretic perspective and show that existing explainers are vulnerable to trivial solutions and distributional shifts. To address these limitations, we propose a unified objective function for explainable time series learning that bridges attribution and counterfactual reasoning within a single framework. Building upon the Information Bottleneck principle, our formulation explicitly prevents trivial explanations and out-of-distribution counterfactuals. {Based on this objective function, we introduce {\modelname}, a novel explanation framework that learns a parametric transformation network to construct explanation-embedded instances, where preserved information yields attribution explanations and controlled information removal produces stable counterfactual explanations.} We evaluate {\modelname} on synthetic and real-world benchmarks against state-of-the-art baselines. Extensive quantitative and qualitative results show that {\modelname} consistently outperforms competing methods, yielding faithful attributions and stable counterfactual explanations.
Tags
Links
- Source: https://arxiv.org/abs/2608.25897v1
- Canonical: https://arxiv.org/abs/2608.25897v1
Trouble viewing inline? Open PDF directly →
Full Text
87,891 characters extracted from source content.
Expand or collapse full text
Towards A Unified Information Bottleneck Framework for Time Series ExplanationsThanks: X. Zheng, Z. Chen, M. Akewar, J. Bhimani, J. Liu, and M. Sha are with Florida International University. E-mail: xzhen019, zchen051, makew001, jbhimani, liux, msha @fiu.edu Z. Liu is with Carnegie Mellon University. E-mail: zichuanl@andrew.cmu.edu J. Ni is with the University of Houston. E-mail: jni7@uh.eduW. Cheng is with NEC Labs America. E-mail: weicheng@nec-labs.comD. Luo is with Singapore Management University. This work was partially conducted while he was at Florida International University. E-mail: luodongsheng01@gmail.com* indicates equal contribution. Xu Zheng* Zichuan Liu* Zhuomin Chen Mayur Akewar Janki Bhimani Jason Liu Mo Sha Jingchao Ni Affiliation: Wei Cheng, Dongsheng Luo Abstract Explaining deep learning models operating on time series data is crucial in various applications that require transparent and interpretable insights into model behavior. Existing explanation methods generally fall into two categories: attribution-based explanations, which identify the temporal regions most responsible for a prediction, and counterfactual explanations, which reveal how an input should be modified to alter the model’s decision. Despite valuable insights, these two fields are largely studied independently. This disconnect leaves attribution methods lacking causal validation, while counterfactual methods suffer from severe instability, producing adversarial-like noise instead of meaningful explanations. In this work, we revisit time-series explainability from an information-theoretic perspective and show that existing explainers are vulnerable to trivial solutions and distributional shifts. To address these limitations, we propose a unified objective function for explainable time series learning that bridges attribution and counterfactual reasoning within a single framework. Building upon the Information Bottleneck principle, our formulation explicitly prevents trivial explanations and out-of-distribution counterfactuals. Based on this objective function, we introduce TimeX++, a novel explanation framework that learns a parametric transformation network to construct explanation-embedded instances, where preserved information yields attribution explanations and controlled information removal produces stable counterfactual explanations. We evaluate TimeX++ on synthetic and real-world benchmarks against state-of-the-art baselines. Extensive quantitative and qualitative results show that TimeX++ consistently outperforms competing methods, yielding faithful attributions and stable counterfactual explanations. Index Terms: Explainable AI, Time Series, Deep Learning I Introduction Deep learning has become a cornerstone technology in analyzing time series data, prevalent in scenarios such as finance Bento et al. (2021), healthcare Kaushik et al. (2020), and environmental science Zheng et al. (2026). Despite its predictive success, the black-box nature of deep neural networks remains a critical limitation. The lack of explainability hinders user trust and prevents domain experts from gaining actionable insights, which are essential in these sensitive applicationsRudin (2019); Ghassemi et al. (2021); Ribeiro et al. (2016). Current efforts to enhance the explainability of time series models primarily fall into two disconnected paradigms: attribution and counterfactual explanations. Attribution methods focus on a post-hoc pinpointing of the most salient temporal regions that dominate the model’s prediction Ismail et al. (2020); Crabbé and Van Der Schaar (2021); Tonekaboni et al. (2020). Popular perturbation-based attribution methods, such as Dynamask Crabbé and Van Der Schaar (2021) and Extrmask Enguehard (2023), evaluate feature importance by masking non-salient regions. Nevertheless, these methods often rely on ad-hoc objectives lacking a solid theoretical foundation and frequently suffer from out-of-distribution (OOD) issues when the masked sub-instances are evaluated by the classifier Slack et al. (2020); Zhao et al. (2022); Queen et al. (2023). Conversely, counterfactual explanations answer “what-if” scenarios by finding the minimal perturbation required to change the model’s prediction Chen et al. (2026). Nevertheless, generating counterfactuals in the vast and continuous space without structural guidance often leads to trivial solutions, such as mode collapse in conditional generation Nemirovsky et al. (2022); Mothilal et al. (2020); Jeanneret et al. (2022). Pursuing label changes alone can result in adversarial attacks that satisfy the classifier’s decision boundary while failing to capture meaningful and interpretable changes Laugel et al. (2019); Kommiya Mothilal et al. (2021a); Pawelczyk et al. (2022). Crucially, existing research typically treats attribution and counterfactual explanations as completely isolated tasks, which introduces fundamental flaws Kommiya Mothilal et al. (2021b). When treated separately, attributions remain purely descriptive, highlighting salient features but not causally verifying that altering those specific features actually changes the model’s decision Janzing et al. (2020); Miller (2019). Conversely, without the structural guidance provided by attributions, counterfactual generation lacks semantic grounding. If a counterfactual method optimizes for a label flip across the entire time series without knowing which features are semantically responsible for the original prediction, it inevitably produces adversarial noise rather than a valid, interpretable pattern shift. Fig. 1: A comparison between our model and previous work. For the attribution explanations, the latent embeddings of explanations are learned from the ECG dataset. Our explanations are within the original distribution, whereas the reference model’s explanations are not. For the counterfactual explanations, our framework represents more robust results. To overcome these limitations, we establish a theoretical foundation that unifies attribution and counterfactual explanations through the lens of the Information Bottleneck (IB) principle Tishby and Zaslavsky (2015). Formally, given a time series instance X and its label Y, the IB principle formulates the extraction of an explanation sub-instance X′X as an optimization problem that balances compactness and informativeness: X′X minimizes I(X,X′)−αI(X′,Y)I(X;X )-α I(X ;Y), where I(⋅,⋅)I(·;·) denotes mutual information and α>0α>0 controls the trade-off Miao et al. (2022). In this context, the attribution explanation equates exactly to solving this IB objective. By minimizing I(X,X′)I(X;X ), it discards redundant temporal dynamics, and by maximizing I(X′,Y)I(X ;Y), it retains the sufficient statistics necessary for predicting Y. Consequently, the attribution X′X acts as the optimal information bottleneck, defining a semantically salient sub-manifold of the original high-dimensional temporal space. Building upon this, we analyze the counterfactual explanation within the same information-theoretic framework. Generating a counterfactual requires finding a perturbed instance X′X that alters the classifier’s prediction to a target label Y′Y . However, optimizing this perturbation directly in the unconstrained space of X inevitably explores the whole decision space, which could cause injecting adversarial noise into the redundant regions X∖X′X X that the IB explicitly discarded. To ensure a semantically valid distribution shift, the counterfactual perturbation must be strictly bounded within the support of the information bottleneck X′X . From an information-theoretic perspective, a legitimate counterfactual transition Y→Y′Y→ Y necessitates a corresponding manipulation within the sufficient statistics subspace defined by I(X′,Y)I(X ;Y), rather than arbitrary deviations in the redundant space. Through this IB-driven formulation, attribution and counterfactual explanations are intrinsically unified as complementary mechanisms over the same information bottleneck. The attribution identifies the exact semantic support X′X , while the counterfactual manipulation within this bounded support provides the causal verification that X′X indeed dictates the predictive behavior. However, directly applying the standard IB principle to time series presents critical challenges. Primarily, the exact computation of mutual information in continuous, high-dimensional temporal spaces is computationally intractable McAllester and Stratos (2020). Furthermore, attempting to evaluate the extracted sub-instances X′X directly with the original classifier often violates the underlying data manifold, inevitably leading to OOD predictions and unreliable evaluations Hooker et al. (2019); Zheng et al. (2025). To address these challenges, we propose TimeX++, a novel and unified framework designed to simultaneously extract both attribution and counterfactual explanations. It optimizes a practical, unified objective function. We replace the compactness quantifier I(X,X′)I(X;X ) with a tractable variational upper bound comprising minimality and discrete constraints, and substitute the informativeness quantifier I(X′,Y)I(X ;Y) with a measure of label consistency that strictly preserves the underlying data distribution. The key advantage of our unified architecture lies in its dual capability. First, for attribution explanations, it generates in-distribution, explanation-embedded instances, entirely circumventing the severe OOD issues that plague reference models (as illustrated in Figure 1). Second, for counterfactual explanations, by tightly coupling the counterfactual search with the in-distribution attribution bottleneck, TimeX++ constrains the counterfactual trajectory along meaningful feature dimensions. This guarantees the generation of stable, semantically valid counterfactuals that are highly resistant to noise vulnerabilities. We summarize our contributions as follows: • We formally investigate the limitations of treating attribution and counterfactual explanations as isolated tasks in time series. By analyzing them through the Information Bottleneck principle, we establish their theoretical connection and propose a practical, unified objective function. • We propose a novel explanation framework, TimeX++, which successfully addresses the out-of-distribution shifting issue in attribution explanations by generating in-distribution sub-instances and leveraging this attribution bottleneck to generate stable, semantically grounded counterfactuals. • We achieve state-of-the-art performance for both attribution and counterfactual explanation tasks on synthetic and real-world datasets and demonstrate their effectiveness. I Related Work Attribution Explanations in Time Series Existing explainable AI (XAI) methods for time series primarily focus on feature attribution, which aims to identify the most salient temporal regions dictating a well-trained model’s decision Enguehard (2023); Bento et al. (2021). While early approaches relied on attention weights Choi et al. (2016) or gradient signals Sundararajan et al. (2017), perturbation-based methods have become the dominant paradigm. These methods evaluate feature importance by masking or altering data segments using static baselines Suresh et al. (2017), generative models Tonekaboni et al. (2020), or information diminution Crabbé and Van Der Schaar (2021); Liu et al. (2024). However, a critical flaw in perturbation-based attribution is the OOD problem that when salient features are masked or substituted, the resulting sub-instances often violate the underlying data manifold Hooker et al. (2019). Consequently, querying the original classifier with these OOD samples leads to unreliable evaluations Zhao et al. (2022); Slack et al. (2020). Counterfactual Explanations for Time Series In contrast to descriptive attribution, counterfactual explanations seek minimal modifications to an input required to alter the model’s prediction. For time series data, existing paradigms are broadly classified into three categories. First, replacement-based methods (e.g., CoMTE Ates et al. (2021), Native Guide Delaney et al. (2021)) substitute contiguous segments using nearest unlike neighbors or temporal shapelets Bahri et al. (2022); Li et al. (2023b). Second, gradient-based approaches (e.g., LatentCF++ Wang et al. (2021), Glacier Wang et al. (2024)) directly optimize perturbations in the input or learned latent spaces. Third, genetic frameworks (e.g., TSEvo Höllig et al. (2022), Sub-SpaCE Refoyo and Luengo (2024)) explore the vast space of temporal segment edits using evolutionary objectives. Despite these advances, generating robust time series counterfactuals remains challenging. Because continuous temporal space is unconstrained, counterfactual optimization often exploits local decision boundary vulnerabilities. This results in the injection of meaningless noise that acts as an adversarial attack rather than providing a semantically interpretable pattern shift Laugel et al. (2019); Kommiya Mothilal et al. (2021a). I Problem Formulation This work focuses on explainability in time series classification. Let X∈ℝT×DX ^T× D be a multivariate time series instance of length T with D features, and X is input space. A multivariate time series is one for which D>1D>1, or univariate. The value of the feature indexed d at time t is denoted by X[t,d]X[t,d]. A training set =(Xi,Yi)|i∈[N]T=\(X_i,Y_i)|i∈[N]\ consists of N time series instances XiX_i along with their associated labels YiY_i, where Yi∈Y_i and =1,2,⋯,||C=\1,2,·s,|C|\ is the label space. A pre-trained black-box classifier f:→f:X maps X to a predicted label Y∈Y . Our objective is to formally unify feature attribution and counterfactual generation under the IB principle. In this unified view, the attribution acts as the optimal information bottleneck, and the counterfactual acts as a semantic perturbation strictly bounded within that bottleneck. To develop a general explainability framework, we focus on post-hoc, instance-level methods that are task-agnostic and treat the model f(⋅)f(·) as a black box Zhang et al. (2021). Furthermore, we study model explainability, where the extracted sub-instance is required to be sufficient for the model output rather than the ground-truth label Faber et al. (2021); Liu et al. (2024). Problem 1 (Attribution Explanations). Given a trained model f and input X, the objective in post-hoc instance-level time series explanation is to find a sub-instance X′X that ‘explains’ the prediction of f on X. The sub-instance X′X is obtained by applying a binary mask M∈ℳ=0,1T×DM =\0,1\^T× D on X, i.e., X′=X⊙MX =X M, where ⊙ is the element-wise multiplication. To transition this discrete extraction into a differentiable continuous optimization, we define an attribution extractor g(⋅)g(·) that maps the input X to a mask M∈[0,1]T×DM∈[0,1]^T× D. Each element is independently sampled from a Bernoulli distribution πt,d _t,d. Problem 2 (Counterfactual Explanations). Given a trained model f, an input time series X with predicted label Y=f(X)Y=f(X), and a target label Y′∈Y (Y′≠Y ≠ Y), the objective is to find a counterfactual instance X′X such that f(X′)=Y′f(X )=Y , while minimizing the perturbation distance d(X,X′)d(X,X ), where the counterfactual search space is restricted to the semantic support set defined by the attribution mask M. IV Explaining Time Series Learning via Information Bottleneck The IB principle extracts an attribution explanation sub-instance X′=X⊙MX =X M by maximizing I(X′,Y)−αI(X,X′)I(X ;Y)-α I(X;X ). However, directly estimating the mutual information I(X′,Y)I(X ;Y) for informativeness in high-dimensional continuous spaces is computationally intractable. To overcome and extend this, following established practices in explainable learning (e.g., PGExplainer Luo et al. (2020)), we substitute the informativeness term with a tractable Label Consistency (LCLC) measure (i.e., cross-entropy), yielding the modified IB formulation: minM∼Bern()−LC(Yexpl,f(X~))+αI(X,X′), _M ( π)-LC (Y^expl,f( X) )+α I(X;X ), (1) where YexplY^expl is the objective explanation label, and X~ X is the explanation (X′X for attribution and X′X for counterfactual explanation). While Eq. (1) bypasses the informativeness estimation, directly applying it to time series explainability introduces three critical interconnected problems. First, regarding the intractability of compactness, estimating the mutual information I(X,X′)I(X;X ) remains computationally prohibitive and suffers from severe sample complexity bounds in high-dimensional temporal spaces. Second, a severe OOD problem arises during attribution evaluation. When YexplY^expl equals Y, computing f(X′)f(X ) requires passing a discretely masked instance directly to the classifier. This drastically violates the underlying data manifold, causing OOD predictions and destroying the reliability of the LCLC term Hooker et al. (2019). Third, counterfactual generation suffers from adversarial instability. When YexplY^expl is set to a target label Y′Y to seek a perturbed instance X′X , unconstrained optimization of LCLC over the continuous temporal space inevitably exploits the classifier’s vulnerabilities. This generates meaningless adversarial noise rather than semantically valid shifts Kommiya Mothilal et al. (2021a). To resolve these interconnected problems, we reconstruct the objective into a unified framework that enforces distribution consistency and structural stability. Fig. 2: The overall architecture of TimeX++, a unified framework for attribution and counterfactual explanations supported by Information Bottleneck. TimeXa++ and TimeXcf++ have similar components and loss functions but different implementations. IV-A Tractable Compactness Bound To bypass the intractable mutual information I(X,X′)I(X;X ), we replace it with a tractable variational upper bound. Since the physical goal of minimizing I(X,X′)I(X;X ) is to enforce sparsity and determinism in the explanation bottleneck, we directly penalize the expected size |M||M| and the entropy H(M)H(M) of the mask. By defining a prior Bernoulli distribution ℚ(M)Q(M) with a parameter r, we analytically bound the compactness term as a Kullback-Leibler (KL) divergence between the posterior mask distribution ℙ(M|X)P(M|X) and the prior: ℒcompact=X[DKL(ℙ(M|X)∥ℚ(M))] _compact=E_X [D_KL(P(M|X)\|Q(M)) ] (2) Minimizing this term efficiently compresses the bottleneck without requiring complex mutual information estimators. IV-B Distribution-Preserving and Bounded Generation To simultaneously solve the attribution OOD problem and the counterfactual instability problem, we project the bottleneck into an in-distribution generated instance X~∈ X , and evaluate f(X~)f( X). The modified informativeness objective becomes: ℒinfo= _info= ℒLC(Yexpl,f(X~))+βℒKL(ℙX~∥ℙ) _LC (Y^expl,f( X) )+ _KL(P_ X\|P_X) (3) +λℒbound(X~,X,M), + _bound( X,X,M), where ℒLC(⋅,⋅)L_LC(·,·) equals to LC(⋅,⋅)LC(·,·). This introduces two crucial regularization terms. The distribution preservation penalty, ℒKL(ℙX~∥ℙ)L_KL(P_ X\|P_X), explicitly regularizes the distribution shift between the generated X~ X and the true data manifold X. This mathematically eliminates the OOD problem, ensuring the classifier evaluates valid, realistic samples. Concurrently, the bottleneck constraint, ℒbound(X~,X,M)L_bound( X,X,M), acts as the causal structural anchor. It forces the generated perturbation (X~−X)( X-X) to be strictly bounded by the spatial and temporal active regions of the attribution mask M. By penalizing changes in the redundant background, this constraint fundamentally prevents unconstrained adversarial search. IV-C Unified Architecture Integration Combining the tractable compactness bound and the regularized generation, the final unified objective of TimeX++ is: minM,X~ℒinfo+αℒcompact. _M, X\;L_info+ _compact. This single cohesive architecture systematically integrates attribution and counterfactual explanations through the shared bottleneck M. For attribution extraction, we set Yexpl=Y^expl=Y. The optimization minimizes ℒcompactL_compact to find the tightest possible mask M, while ℒKLL_KL ensures the generated evaluation instance X~ X remains strictly in-distribution, resolving the OOD problem. Conversely, for counterfactual generation, we set Yexpl=Y′Y^expl=Y . Although the optimization seeks to flip the label, ℒboundL_bound explicitly locks the counterfactual trajectory within the semantic support of M. This guarantees that the counterfactual only manipulates the causal features identified by the attribution, resolving the adversarial instability problem. Through this integration, TimeX++ provides causally verified attributions and semantically grounded counterfactuals. V The TimeX++ Unified Framework Translating the tractable unified Information Bottleneck (IB) objective from Section IV into a practical neural architecture, we introduce the TimeX++ framework (depicted in Figure 2). The framework is constructed upon two primary neural modules working in tandem: the shared Attribution Bottleneck Extractor (gϕg_φ) and the paradigm-specific Conditioned Generators (ψa _a and ψcf _cf). By dynamically configuring the objective explanation label YexplY^expl and the specific generator, TimeX++ seamlessly instantiates into two operational modes: TimeXa++ and TimeXcf++. V-A Attribution Bottleneck Extractor The extractor gϕ:ℝT×D↦[0,1]T×Dg_φ:R^T× D [0,1]^T× D serves as the shared semantic foundation for both explanation paradigms. It is implemented via an encoder-decoder Transformer that maps the input time series X into a stochastic probability matrix π. To bridge the gap between continuous network optimization and the discrete mask M required by the IB formulation, we employ the Straight-Through Estimator (STE) Jang et al. (2017). During the forward pass, we sample a deterministic binary mask M=STE(Bern())∈0,1T×DM=STE(Bern( π))∈\0,1\^T× D. During the backward pass, gradients bypass the discrete sampling operator, allowing the parameters ϕφ to be optimized smoothly. To satisfy the tractable compactness bound ℒcompactL_compact (Eq. 2) without requiring complex mutual information estimators, we apply two structural regularizations to the predicted probability π. First, to enforce sparsity and determinism, we explicitly minimize the KL divergence against a sparse prior ℚ(M)Q(M) parameterized by r. For attribution explanations (TimeXa++), we defaultly set r=0.5r=0.5. For counterfactual generation (TimeXcf++), we enforce a strictly narrower bottleneck by default setting r=0.1r=0.1, isolating the most critical causal features to restrict the counterfactual search space. Second, to ensure temporal continuity, we penalize irregular mask fragmentation across the time axis. Because true semantic features in time series typically occur as contiguous temporal segments rather than isolated anomalous spikes, the continuity loss is formulated as: ℒcon=1T×D∑d=1D∑t=1T−1(πt,d−πt+1,d)2. _con= 1T× D _d=1^D _t=1^T-1 ( _t,d- _t+1,d )^2. (4) The total bottleneck extraction loss is defined as ℒM=ℒcompact+λconℒconL_M=L_compact+ _conL_con, formulated as: ℒM= _M= ∑t,d[πt,dlog(πt,dr)+(1−πt,d)log(1−πt,d1−r)] _t,d [ _t,d ( _t,dr )+(1- _t,d) ( 1- _t,d1-r ) ] (5) +λconℒcon. + _conL_con. where the first summation Miao et al. (2022) expands the KL divergence ℒcompactL_compact, and λcon _con controls the temporal continuity penalty. V-B Conditioned Generators The conditioned generators translate the structural bottleneck M into the generated explanation-embedded instance X~∈ X . They are explicitly designed to resolve the OOD problem for attribution explanations (using ψa _a) and the robustness problem for counterfactual explanations (using ψcf _cf). TimeXa++ When evaluating feature attribution, directly passing the masked instance X⊙MX M to the classifier destroys the temporal manifold, causing arbitrary OOD predictions. TimeXa++ solves this by projecting the masked data back into the true distribution. We first define a baseline reference X~ar=X⊙M+b⊙(1−M) X_a^r=X M+b (1-M), where background noise b is sampled from the dataset distribution B_X. The attribution generator ψa _a then maps [X,M][X,M] into a smoothed, generated instance X~a=ψa(X,M) X_a= _a(X,M). To guarantee it resolves the OOD problem, we enforce distribution preservation via ℒKL(ℙX~a∥ℙar)L_KL(P_ X_a\|P_X_a^r). To ensure the generator strictly focuses on smoothing the OOD artifacts rather than ungrounded features, we apply the bottleneck constraint ℒboundaL_bound^a as a Euclidean penalty against the reference: ℒbounda=1TD∑d=1D∑t=1T‖X~a[t,d]−X~ar[t,d]‖2L_bound^a= 1TD _d=1^D _t=1^T \| X_a[t,d]- X_a^r[t,d] \|^2 (6) The attribution is then validated by matching the original prediction: ℒLC(f(X),f(X~a))L_LC (f(X),f( X_a) ). Algorithm 1 Training Pipeline of TimeX++ 1: Input: Training set T, Trained classifier f, mode ∈A,CF∈\A,CF\, Target Y′Y (if CF), Hyperparams α,β,r,λcon\α,β,r, _con\ 2: Init: Extractor gϕg_φ, Generators ψa _a, ψcf _cf, and Variation function ψn _n 3: for e=1e=1 to E do 4: for i=1i=1 to N do 5: i=gϕ(Xi) π_i=g_φ(X_i); Sample Mi=STE(Bern(i))M_i=STE(Bern( π_i)) 6: if mode == A then 7: Set reference X~a,ir=Mi⊙Xi+(1−Mi)⊙b X_a,i^r=M_i X_i+(1-M_i) b 8: Generate instance X~a,i=ψa(Xi,Mi) X_a,i= _a(X_i,M_i) 9: Yexpl=f(Xi)Y^expl=f(X_i); X~i=X~a,i X_i= X_a,i; X~ir=X~a,ir X_i^r= X_a,i^r 10: else 11: Set reference X~cf,ir=Xi X_cf,i^r=X_i 12: Predict perturbation Ei=ψcf(Xi,Mi)E_i= _cf(X_i,M_i) 13: Sample XrefX^ref with label Y′Y , compute ϵ=ψn(Xi,Mi,Xref)ε= _n(X_i,M_i,X^ref) 14: Generate instance X~cf,i=Xi+Mi⊙Ei+ϵ X_cf,i=X_i+M_i E_i+ε 15: Yexpl=Y′Y^expl=Y ; X~i=X~cf,i X_i= X_cf,i; X~ir=X~cf,ir X_i^r= X_cf,i^r 16: end if 17: end for 18: Compute compactness ℒM=ℒcompact+λconℒconL_M=L_compact+ _conL_con 19: Compute bottleneck constraint ℒboundL_bound against X~r X^r 20: Compute distribution preservation ℒKLL_KL 21: Compute Label Consistency ℒLC(Yexpl,f(X~))L_LC(Y^expl,f( X)) 22: Total loss: ℒ~=ℒLC+αℒM+β(ℒKL+ℒbound) L=L_LC+ _M+β(L_KL+L_bound) 23: Update ϕφ and active generators (ψa _a, or ψcf,ψn _cf, _n) via gradient descent 24: end for TimeXcf++ Unconstrained counterfactual generation in continuous temporal space inevitably exploits classifier null spaces, producing adversarial noise. TimeXcf++ solves this robustness problem by strictly locking the perturbation within the semantic bottleneck M. Instead of generating an entirely new instance, the counterfactual generator ψcf _cf learns a target-driven perturbation matrix E=ψcf(X,M)E= _cf(X,M). The counterfactual instance is structurally formulated as: X~cf=X+M⊙E+ϵ X_cf=X+M E+ε (7) where ϵε introduces target-class reference noise. Specifically, we define an auxiliary variation function ϵ=ψn(X,M,Xref)ε= _n(X,M,X^ref), which incorporates fine-grained target-class dynamics from a randomly sampled training instance XrefX^ref belonging to the target label Y′Y . During inference, this simplifies deterministically to X~cf=X+M⊙E X_cf=X+M E. Crucially, to mathematically alleviate adversarial vulnerabilities, the bottleneck constraint ℒboundcfL_bound^cf heavily penalizes any deviation from the original reference (X~cfr=X X_cf^r=X) in the non-bottleneck background regions (1−M1-M): ℒboundcf= _bound^cf= (8) 1TD∑d=1D∑t=1T‖(1−M[t,d])⊙(X~cf[t,d]−X~cfr[t,d])‖2 1TD _d=1^D _t=1^T \|(1-M[t,d]) ( X_cf[t,d]- X_cf^r[t,d]) \|^2 This formulation acts as a hard causal anchor, which prevents the model from injecting imperceptible adversarial noise into redundant features, forcing the targeted prediction shift ℒLC(Y~,f(X~cf))L_LC ( Y,f( X_cf) ) to rely on robust semantic manipulations. V-C End-to-End Optimization The entire TimeX++ framework is optimized end-to-end. By sharing the underlying architecture and unifying the mathematical formulation, both TimeXa++ and TimeXcf++ minimize the same overarching objective derived in Section IV: ℒ~=ℒLC(Yexpl,f(X~))+αℒM+β(ℒKL+ℒbound) L=L_LC (Y^expl,f( X) )+ _M+β (L_KL+L_bound ) (9) This allows our method to seamlessly alternate between extracting robust attributions and generating causally constrained counterfactuals simply by toggling the objective label YexplY^expl and the specific generator (ψa _a or ψcf _cf). The unified train procedure is summarized in Algorithm 1. TABLE I: The description of synthetic and real-world datasets. Dataset # of Samples Length Dimension Classes FreqShapes 6,100 50 1 4 SeqComb-UV 6,100 200 1 4 SeqComb-MV 6,100 200 4 4 LowVar 6,100 200 2 4 ECG 92,511 360 1 2 PAM 5,333 600 17 8 Epilepsy 11,500 178 1 2 Boiler 160,719 36 20 2 Wafer 7,164 152 1 2 FreezerRegular 3,000 301 1 2 VI Experiments In this section, we empirically evaluate the proposed TimeX++ framework. By unifying attribution and counterfactual explanations through the lens of the Information Bottleneck, we aim to demonstrate three key aspects of their effectiveness. First, we assess TimeX++’s ability to generate faithful attribution explanations and effective counterfactual explanations. Second, we examine the extent to which the proposed distribution-matching constraint alleviates the out-of-distribution shift. Third, we evaluate the robustness of counterfactual explanations and investigate whether TimeX++ effectively guides counterfactual generation toward semantically meaningful outcomes, preventing it from degenerating into trivial adversarial perturbations. VI-A Experimental Setup To rigorously evaluate our framework, we establish a comprehensive experimental setup encompassing diverse datasets, established baselines, and strict evaluation metrics. VI-A1 Datasets We utilize ten datasets encompassing both synthetic and real-world time-series scenarios, adopting the standard configurations from established benchmarks Queen et al. (2023). The synthetic datasets, including FreqShapes, SeqComb-UV, SeqComb-MV, and LowVar, are meticulously crafted with inherent ground-truth explanations to encapsulate temporal dynamics, guarding against heuristic learning shortcuts Geirhos et al. (2020). The real-world datasets cover various domains, such as electrocardiogram classification (ECG) Moody and Mark (2001), action recognition (PAM) Reiss and Stricker (2012), electroencephalogram analysis (Epilepsy) Andrzejak et al. (2001), mechanical fault detection (Boiler)11 1 https://dx.doi.org/10.21227/awav-bn36, and sensor classifications (Wafer, FreezerRegular) Dau et al. (2019). The Transformer Vaswani et al. (2017) is employed as the underlying black-box classifier across all tasks. VI-A2 Baselines For comprehensive comparative analysis, we benchmark TimeX++ against eleven state-of-the-art explainers meticulously selected across both the attribution and counterfactual paradigms. For attribution explanations, we evaluate against six popular baselines: Integrated Gradients (IG) Sundararajan et al. (2017) as a fundamental gradient-based explainer; Dynamask Crabbé and Van Der Schaar (2021) and WinIT Leung et al. (2023) as recent occlusion-based methods specifically designed for time series; CoRTX Chuang et al. (2023) leveraging contrastive learning; SGT + GRAD Ismail et al. (2021) demonstrating an in-hoc approach; and TimeX Queen et al. (2023), which serves as the strongest information-theoretic baseline. For counterfactual explanations, we compare against five advanced methodologies: CoMTE Ates et al. (2021), AB-CF Li et al. (2023a), M-CELS Li et al. (2024), and CONFETTI Cetina et al. (2026). These baselines encapsulate a diverse range of optimization-based, evolutionary, saliency-guided, and multi-objective paradigms, ensuring a robust evaluation of counterfactual generation capabilities. VI-A3 Evaluation Metrics To assess explanation quality across distinct paradigms, we use specific quantitative metrics. Metrics for Attribution Explanations. Given that the precise salient features are known for the synthetic datasets, we utilize them as the ground truth for evaluation. At each time step, features causing prediction label changes are attributed an explanation of 11, whereas those that do not affect such changes are 00. Following the previous paper Crabbé and Van Der Schaar (2021), we evaluate the quality of salient features using Area Under Precision (AUP) and Area Under Recall (AUR), framing it as a binary classification task. We also employ AUPRC for consistency with TimeX Queen et al. (2023), which combines the results from both AUP and AUR. Higher values indicate better performance. Let M∈[0,1]T×DM∈[0,1]^T× D be the obtained explanation mask, and Q∈0,1T×DQ∈\0,1\^T× D be the ground-truth matrix where Q[t,d]=1Q[t,d]=1 if feature X[t,d]X[t,d] is salient. Given a detection threshold τ∈(0,1)τ∈(0,1), we convert M into a binary estimator Q^[t,d](τ) Q[t,d](τ): Q^[t,d](τ)=1 if M[t,d]≥τ0 else. Q[t,d](τ)= \ array[]l1& if M[t,d]≥τ\\ 0& else. array . (10) Considering the truly salient index set A=(t,d)∣Q[t,d]=1A=\(t,d) Q[t,d]=1\ and the selected index set A^(τ)=(t,d)∣Q^[t,d](τ)=1 A(τ)=\(t,d) Q[t,d](τ)=1\, the precision (P) and recall (R) curves are defined as: P(τ)=|A∩A^(τ)||A^(τ)|,R(τ)=|A∩A^(τ)||A|.P(τ)= |A∩ A(τ)|| A(τ)|, (τ)= |A∩ A(τ)||A|. (11) AUP and AUR are derived via integration over all thresholds: AUP=∫01P(τ)τ,AUR=∫01R(τ)τ.AUP= _0^1P(τ)dτ, = _0^1R(τ)dτ. (12) TABLE I: Attribution explanation performance on univariate and multivariate datasets. Method AUPRC AUP AUR AUPRC AUP AUR AUPRC AUP AUR FreqShapes SeqComb-UV ECG IG 0.752± 0.003 0.691± 0.003 0.598± 0.002 0.576± 0.002 0.816± 0.002 0.287± 0.002 0.418± 0.001 0.595± 0.002 0.320± 0.001 Dynamask 0.220± 0.001 0.295± 0.004 0.504± 0.002 0.442± 0.002 0.878± 0.004 0.103± 0.001 0.328± 0.001 0.525± 0.003 0.108± 0.008 WinIT 0.507± 0.002 0.555± 0.003 0.456± 0.002 0.457± 0.002 0.787± 0.003 0.225± 0.002 0.305± 0.001 0.443± 0.003 0.347± 0.001 CoRTX 0.698± 0.016 0.494± 0.000 0.326± 0.001 0.564± 0.002 0.824± 0.003 0.175± 0.001 0.374± 0.001 0.497± 0.002 0.303± 0.001 SGT + Grad 0.531± 0.002 0.414± 0.001 0.393± 0.002 0.573± 0.002 0.783± 0.001 0.214± 0.001 0.314± 0.001 0.424± 0.002 0.264± 0.001 TimeX 0.832± 0.003 0.722± 0.003 0.638± 0.002 0.712± 0.002 0.941± 0.001 0.338± 0.001 0.472± 0.002 0.566± 0.003 0.446± 0.002 TimeXa++ 0.891± 0.002 0.781± 0.001 0.662± 0.002 0.847± 0.001 0.907± 0.000 0.406± 0.001 0.660± 0.001 0.726± 0.001 0.460± 0.001 SeqComb-MV LowVar IG 0.330± 0.002 0.748± 0.003 0.258± 0.003 0.869± 0.004 0.483± 0.003 0.817± 0.002 Dynamask 0.314± 0.002 0.548± 0.005 0.195± 0.003 0.139± 0.001 0.164± 0.003 0.211± 0.002 WinIT 0.281± 0.002 0.759± 0.002 0.208± 0.002 0.167± 0.002 0.114± 0.002 0.384± 0.002 CoRTX 0.363± 0.002 0.563± 0.001 0.346± 0.002 0.498± 0.001 0.328± 0.003 0.471± 0.001 SGT + Grad 0.489± 0.001 0.497± 0.001 0.429± 0.002 0.345± 0.001 0.213± 0.003 0.353± 0.002 TimeX 0.688± 0.002 0.833± 0.001 0.387± 0.002 0.867± 0.003 0.545± 0.003 0.900± 0.002 TimeXa++ 0.759± 0.001 0.878± 0.001 0.391± 0.001 0.947± 0.002 0.806± 0.002 0.833± 0.002 TABLE I: Performance report on different real-world datasets by masking the top 10% of salient features. The masked portion is substituted with an average of this feature or with zeros. Method Substitution PAM Epilepsy Boiler Wafer Freezer Rank Mean 0.979± 0.002 0.939± 0.005 0.814± 0.056 0.993± 0.002 0.772± 0.093 7.2 Random Zero 0.979± 0.002 0.940± 0.004 0.895± 0.012 0.992± 0.002 0.775± 0.093 7.8 Mean 0.778± 0.015 0.816± 0.019 0.808± 0.036 0.488± 0.267 0.452± 0.129 4.6 Dynamask Zero 0.777± 0.015 0.361± 0.073 0.555± 0.146 0.488± 0.267 0.355± 0.110 3.6 Mean 0.749± 0.049 0.852± 0.018 0.563± 0.041 0.463± 0.145 0.469± 0.061 4.4 TimeX Zero 0.754± 0.049 0.454± 0.077 0.416± 0.048 0.465± 0.057 0.465± 0.057 3.6 Mean 0.717± 0.019 0.845± 0.029 0.385± 0.123 0.410± 0.150 0.379± 0.074 2.8 TimeXa++ Zero 0.775± 0.023 0.355± 0.146 0.361± 0.073 0.400± 0.061 0.377± 0.074 2.0 Metrics for Counterfactual Explanations. To comprehensively evaluate the quality of the generated counterfactual instances (X′X ), we assess them across five distinct dimensions: Validity, Confidence, Sparsity, Proximity-L1, and Proximity-L2. For Validity, Confidence, and Sparsity, higher values are better (↑ ). For both Proximity metrics, lower values are better (↓ ). • Validity (↑ ): Measures the ratio of successful counterfactuals that successfully alter the black-box model’s prediction to the desired target label Y′Y . For a dataset of N instances: Validity=1N∑i=1N(f(Xi′)=Y′)Validity= 1N _i=1^N 1(f(X _i)=Y ) (13) • Confidence (↑ ): Evaluates the average predicted probability assigned by the classifier to the target class, indicating the robustness of the class flip: Confidence=1N∑i=1NPf(Y′∣Xi′)Confidence= 1N _i=1^NP_f(Y X _i) (14) • Sparsity (↓ ): Quantifies the minimality of the intervention by measuring the proportion of features left unperturbed. It is derived from the L1L_1 norm of the continuous mask M: Sparsity=1N∑i=1N(1T×D∑t=1T∑d=1DMi[t,d])Sparsity= 1N _i=1^N ( 1T× D _t=1^T _d=1^DM_i[t,d] ) (15) • Proximity-L1 (↓ ): Measures the feature-wise Mean Absolute Error (MAE) between the counterfactual explanation and the original input to ensure realistic generation: ProximityL1=1N∑i=1N1T×D‖Xi′−Xi‖1Proximity_L1= 1N _i=1^N 1T× D||X _i-X_i||_1 (16) • Proximity-L2 (↓ ): Measures the feature-wise Mean Squared Error (MSE) to heavily penalize large, unrealistic deviations from the original input X: ProximityL2=1N∑i=1N1T×D‖Xi′−Xi‖22Proximity_L2= 1N _i=1^N 1T× D||X _i-X_i||_2^2 (17) VI-B Efficacy of Unified Explanations We first examine the fidelity and efficacy of TimeX++ in producing both attribution and counterfactual explanations via the single unified training process. ((a)) PAM ((b)) Epilepsy ((c)) Boiler Fig. 3: Occlusion experiments on real-world datasets. Higher values indicate better performance. The x-axis is the Bottom Proportion Perturbed, and the y-axis is the Prediction AUROC. For attribution explanations, Table I summarizes the performance across univariate and multivariate synthetic datasets. TimeXa++ outperforms competing explainers in 99 out of 1212 evaluation cases. Compared to the strongest baseline, TimeX, our framework achieves average improvements of 11.01%11.01\% in AUPRC, 10.87%10.87\% in AUP, and 1.25%1.25\% in AUR. When analyzing the global metric AUPRC specifically, TimeXa++ significantly improves upon the identification of ground-truth explanations by 6.97%6.97\% on FreqShapes, 18.86%18.86\% on SeqComb-UV, 10.33%10.33\% on SeqComb-MV, and 8.91%8.91\% on LowVar over the strongest baselines. The statistical significance of these improvements is corroborated by the Friedman Test across all methods and cases, yielding a statistic of F=51.32F_F=51.32 with p<0.001p<0.001. It supports our theoretical claim that optimizing via the Information Bottleneck principle reliably extracts precise temporal explanation instances without compromising predictive accuracy. TABLE IV: Targeted counterfactual explanation performance on univariate and multivariate datasets. Method Validity Confidence Sparsity Prox.-L1 Prox.-L2 Validity Confidence Sparsity Prox.-L1 Prox.-L2 FreqShapes SeqComb-UV CoMTE 1.000 ± 0.000 0.965 ± 0.006 1.000 ± 0.000 0.573 ± 0.004 0.828 ± 0.006 1.000 ± 0.000 0.784 ± 0.022 0.999 ± 0.000 0.209 ± 0.002 0.401 ± 0.008 AB-CF 1.000 ± 0.000 0.871 ± 0.008 0.733 ± 0.025 0.441 ± 0.013 0.718 ± 0.011 1.000 ± 0.000 0.911 ± 0.013 0.650 ± 0.037 0.151 ± 0.007 0.348 ± 0.014 M-CELS 0.486 ± 0.053 0.466 ± 0.051 0.061 ± 0.008 0.064 ± 0.011 0.196 ± 0.031 0.361 ± 0.037 0.353 ± 0.036 0.025 ± 0.003 0.016 ± 0.001 0.090 ± 0.007 CONFETTI 0.990 ± 0.003 0.512 ± 0.002 0.349 ± 0.010 0.242 ± 0.011 0.538 ± 0.012 0.894 ± 0.034 0.477 ± 0.017 0.209 ± 0.019 0.059 ± 0.008 0.222 ± 0.021 TimeXcf++ 0.974 ± 0.004 0.964 ± 0.005 0.214 ± 0.005 0.339 ± 0.021 0.757 ± 0.030 0.890 ± 0.053 0.887 ± 0.052 0.516 ± 0.074 0.288 ± 0.085 0.487 ± 0.082 SeqComb-MV LowVar CoMTE 0.990 ± 0.004 0.820 ± 0.020 0.443 ± 0.018 0.081 ± 0.003 0.247 ± 0.006 1.000 ± 0.000 0.985 ± 0.003 0.733 ± 0.007 0.780 ± 0.007 1.121 ± 0.005 AB-CF 1.000 ± 0.000 0.954 ± 0.008 0.641 ± 0.029 0.099 ± 0.004 0.246 ± 0.007 1.000 ± 0.000 0.916 ± 0.009 0.627 ± 0.011 0.662 ± 0.012 1.003 ± 0.011 M-CELS 0.350 ± 0.043 0.348 ± 0.042 0.011 ± 0.001 0.008 ± 0.001 0.072 ± 0.007 0.365 ± 0.017 0.357 ± 0.015 0.029 ± 0.001 0.039 ± 0.001 0.232 ± 0.005 CONFETTI 0.910 ± 0.031 0.475 ± 0.013 0.246 ± 0.017 0.039 ± 0.003 0.153 ± 0.011 0.998 ± 0.001 0.514 ± 0.000 0.190 ± 0.004 0.193 ± 0.005 0.537 ± 0.007 TimeXcf++ 0.983 ± 0.007 0.979 ± 0.008 0.305 ± 0.041 0.152 ± 0.016 0.353 ± 0.033 0.985 ± 0.003 0.980 ± 0.003 0.175 ± 0.024 0.212 ± 0.010 0.548 ± 0.013 ECG Epilepsy CoMTE 1.000 ± 0.000 0.936 ± 0.008 1.000 ± 0.000 0.275 ± 0.006 0.380 ± 0.010 1.000 ± 0.000 0.852 ± 0.027 0.996 ± 0.000 0.633 ± 0.130 0.832 ± 0.162 AB-CF 1.000 ± 0.000 0.841 ± 0.008 0.701 ± 0.059 0.189 ± 0.017 0.303 ± 0.018 1.000 ± 0.000 0.739 ± 0.036 0.788 ± 0.039 0.539 ± 0.132 0.762 ± 0.161 M-CELS 0.231 ± 0.075 0.242 ± 0.068 0.022 ± 0.005 0.013 ± 0.003 0.061 ± 0.011 0.097 ± 0.049 0.103 ± 0.046 0.007 ± 0.005 0.009 ± 0.006 0.027 ± 0.017 CONFETTI 0.977 ± 0.005 0.505 ± 0.003 0.287 ± 0.008 0.080 ± 0.003 0.200 ± 0.007 0.798 ± 0.050 0.423 ± 0.026 0.334 ± 0.026 0.212 ± 0.018 0.417 ± 0.030 TimeXcf++ 0.848 ± 0.104 0.847 ± 0.101 0.084 ± 0.026 0.251 ± 0.097 0.767 ± 0.185 0.946 ± 0.047 0.924 ± 0.045 0.139 ± 0.024 0.255 ± 0.028 0.698 ± 0.041 TABLE V: Untargeted counterfactual explanation performance on univariate and multivariate datasets. Method Validity Confidence Sparsity Prox.-L1 Prox.-L2 Validity Confidence Sparsity Prox.-L1 Prox.-L2 FreqShapes SeqComb-UV CoMTE 1.000 ± 0.000 0.930 ± 0.017 1.000 ± 0.000 0.438 ± 0.016 0.641 ± 0.028 1.000 ± 0.000 0.790 ± 0.023 0.999 ± 0.000 0.196 ± 0.000 0.376 ± 0.001 AB-CF 1.000 ± 0.000 0.826 ± 0.021 0.672 ± 0.006 0.283 ± 0.010 0.486 ± 0.021 1.000 ± 0.000 0.890 ± 0.018 0.513 ± 0.040 0.114 ± 0.004 0.293 ± 0.004 M-CELS 0.612 ± 0.039 0.570 ± 0.034 0.063 ± 0.006 0.040 ± 0.001 0.157 ± 0.002 0.336 ± 0.026 0.319 ± 0.022 0.013 ± 0.001 0.011 ± 0.001 0.083 ± 0.004 CONFETTI 0.621 ± 0.017 0.514 ± 0.019 0.257 ± 0.008 0.117 ± 0.007 0.260 ± 0.017 0.962 ± 0.010 0.519 ± 0.008 0.200 ± 0.005 0.052 ± 0.002 0.208 ± 0.005 TimeXcf++ 1.000 ± 0.000 0.999 ± 0.000 0.233 ± 0.009 0.420 ± 0.016 0.872 ± 0.020 1.000 ± 0.000 0.999 ± 0.001 0.624 ± 0.082 0.393 ± 0.069 0.637 ± 0.076 SeqComb-MV LowVar CoMTE 1.000 ± 0.000 0.796 ± 0.022 0.367 ± 0.013 0.063 ± 0.001 0.208 ± 0.002 1.000 ± 0.000 0.978 ± 0.003 0.520 ± 0.002 0.552 ± 0.002 0.951 ± 0.002 AB-CF 1.000 ± 0.000 0.941 ± 0.013 0.514 ± 0.018 0.075 ± 0.002 0.202 ± 0.003 1.000 ± 0.000 0.866 ± 0.014 0.556 ± 0.020 0.579 ± 0.020 0.916 ± 0.019 M-CELS 0.158 ± 0.026 0.159 ± 0.026 0.005 ± 0.000 0.004 ± 0.000 0.051 ± 0.005 0.312 ± 0.045 0.296 ± 0.037 0.021 ± 0.001 0.030 ± 0.001 0.206 ± 0.006 CONFETTI 0.917 ± 0.037 0.483 ± 0.014 0.270 ± 0.010 0.044 ± 0.001 0.169 ± 0.004 0.998 ± 0.001 0.513 ± 0.001 0.176 ± 0.004 0.175 ± 0.004 0.506 ± 0.006 TimeXcf++ 1.000 ± 0.000 1.000 ± 0.000 0.378 ± 0.092 0.118 ± 0.010 0.291 ± 0.008 1.000 ± 0.000 0.999 ± 0.000 0.221 ± 0.049 0.231 ± 0.014 0.552 ± 0.023 Furthermore, to evaluate attribution fidelity on real-world datasets where ground-truth explanations are unavailable, we conduct occlusion experiments. Specifically, we occlude the bottom k-percentile of salient features to measure the change in prediction AUROC. Besides the standard baselines, we also include a random explainer reference to control for potential misinterpretations. The explanation results by occluding salient features are presented in Figure 3. Our results show that TimeXa++ outperforms others across both univariate (Epilepsy) and multivariate (PAM and Boiler) time series. Particularly, TimeXa++ maintains non-decreasing performance on Epilepsy due to the retention of only salient features, and outperforms baselines at any threshold k on PAM and Boiler datasets. Moreover, our method maintains excellent stability compared to the strongest baseline TimeX, where the error bars of our method are noticeably narrower. This is because TimeXa++ avoids the label leakage caused by re-optimizing a white-box predictive model. We also delete the top 10% of salient features and substitute them with an average of this feature or with zero perturbations (Liu et al., 2024), and further expand our experiments to five real-world time series datasets. The results (Table I) consistently show that the proposed method outperforms existing explainers under different perturbations, with substitution with zeros being the most applicable and yielding the highest average rank. The statistical significance of these improvements is firmly corroborated by the Friedman Test yielding F=25.80F_F=25.80 and p<0.001p<0.001. Transitioning to counterfactual reasoning, we compare TimeXcf++ with state-of-the-art baselines across six benchmark datasets under a targeted setting, rigorously evaluating all possible target labels for each prediction, as presented in Table IV. Given the multi-objective nature of counterfactual explanations, directly comparing individual evaluation metrics is insufficient. Ideally, counterfactual explanations should exhibit low sparsity, low proximity, high validity, and high confidence. However, these objectives are often conflicting, resulting in an inherent trade-off among sparsity, validity, and proximity. Therefore, we adopt Pareto frontier analysis to demonstrate their overall effectiveness. Among the baselines, CONFETTI achieves high validity scores; however, its relatively low confidence indicates that the generated counterfactual explanations tend to lie close to the decision boundary. M-CELS generally produces counterfactual explanations with low sparsity but underperforms in terms of validity and confidence. AB-CF and COMTE achieve high validity and confidence, but they exhibit substantially higher sparsity, requiring extensive modifications to the input, which may generate target-labeled references. In contrast, TimeXcf++ achieves a more favorable balance between validity/confidence and sparsity/proximity. Across these datasets, our method attains competitive validity and confidence compared with AB-CF and COMTE while maintaining substantially lower sparsity and proximity. For instance, on the Epilepsy dataset, TimeXcf++ achieves the highest confidence score while requiring only 0.14 average sparsity, demonstrating the effectiveness of the proposed framework. TABLE VI: Difference between the distribution of different explanation instances and the distribution of original data. Method KDE ↑ KL-Divergence ↓ MMD ↓ KDE ↑ KL-Divergence ↓ MMD ↓ FreqShapes SeqComb-UV Zero -36.671± 0.275 0.144± 0.007 0.077± 0.004 -90.093± 0.312 0.399± 0.005 0.167± 0.003 Mean -36.539± 0.194 0.147± 0.003 0.078± 0.006 -83.038± 0.271 0.325± 0.009 0.111± 0.005 b∼b _X -53.855± 0.509 0.289± 0.003 0.024± 0.000 -100.050± 0.658 0.498± 0.005 0.009± 0.000 TimeXa++ -28.757± 2.658 0.096± 0.024 0.016± 0.004 -57.932± 1.684 0.060± 0.018 0.078± 0.019 SeqComb-MV LowVar Zero -257.040± 1.656 0.739± 0.029 0.248± 0.006 -431.993± 1.131 0.597± 0.012 0.105± 0.003 Mean -230.250± 1.313 0.455± 0.019 0.074± 0.009 -429.331± 1.249 0.571± 0.012 0.095± 0.004 b∼b _X -260.182± 1.571 0.721± 0.019 0.026± 0.000 -474.482± 1.319 0.976± 0.017 0.104± 0.000 TimeXa++ -191.265± 0.890 0.038± 0.010 0.014± 0.012 -426.431± 2.765 0.538± 0.025 0.073± 0.017 TABLE VII: Explainer results with LSTM and CNN predictors on FreqShapes and SeqComb-MV synthetic datasets. FreqShapes SeqComb-MV ECG Method AUPRC AUP AUR AUPRC AUP AUR AUPRC AUP AUR LSTM IG 0.928± 0.002 0.778± 0.001 0.693± 0.002 0.237± 0.002 0.515± 0.005 0.321± 0.003 0.504± 0.002 0.613± 0.003 0.403± 0.002 Dynamask 0.229± 0.001 0.342± 0.004 0.517± 0.001 0.284± 0.002 0.637± 0.005 0.182± 0.002 0.373± 0.001 0.630± 0.003 0.110± 0.001 WinIT 0.417± 0.002 0.511± 0.003 0.391± 0.002 0.352± 0.001 0.655± 0.003 0.342± 0.002 0.363± 0.001 0.381± 0.002 0.406± 0.001 TimeX 0.990± 0.000 0.789± 0.001 0.796± 0.001 0.130± 0.002 0.131± 0.002 0.475± 0.002 0.606± 0.002 0.642± 0.002 0.444± 0.002 TimeXa++ 0.994± 0.000 0.741± 0.001 0.843± 0.001 0.405± 0.004 0.680± 0.005 0.352± 0.002 0.651± 0.001 0.743± 0.001 0.445± 0.001 CNN IG 0.991± 0.001 0.878± 0.001 0.706± 0.002 0.598± 0.003 0.886± 0.001 0.229± 0.001 0.495± 0.001 0.537± 0.001 0.531± 0.001 Dynamask 0.257± 0.001 0.443± 0.003 0.526± 0.002 0.455± 0.002 0.731± 0.003 0.314± 0.002 0.460± 0.001 0.722± 0.003 0.131± 0.001 WinIT 0.532± 0.002 0.602± 0.003 0.397± 0.002 0.533± 0.001 0.832± 0.002 0.226± 0.002 0.396± 0.001 0.329± 0.002 0.352± 0.001 TimeX 0.749± 0.005 0.497± 0.003 0.792± 0.002 0.702± 0.002 0.767± 0.001 0.469± 0.002 0.640± 0.001 0.746± 0.001 0.416± 0.001 TimeXa++ 0.913± 0.001 0.607± 0.001 0.795± 0.001 0.782± 0.001 0.890± 0.001 0.343± 0.001 0.673± 0.001 0.757± 0.001 0.432± 0.001 To further validate the effectiveness of TimeXcf++, we conduct experiments under the untargeted setting using four synthetic datasets. For implementation, multiple target labels are considered, and the counterfactual explanation with the highest confidence is selected as the final result. As shown in Table V, TimeXcf++ demonstrates performance trends consistent with those observed in the targeted setting. Baseline methods that rely heavily on subsequence search, such as CONFETTI, exhibit limited robustness to the selection of reference data. In contrast, TimeXcf++ consistently achieves the highest validity and confidence across all four datasets, highlighting its superior robustness compared with the baselines. VI-C Resilience to Out-of-Distribution Shift A critical vulnerability of perturbation-based attribution methods is the OOD shift, where explanation instances fall outside the original data manifold, yielding unreliable model gradients. We systematically quantify this phenomenon using Kernel Density Estimation (KDE) Parzen (1962), KL divergence Kullback and Leibler (1951), and Maximum Mean Discrepancy (MMD) Gretton et al. (2012) to assess the distributional alignment between the explanation-embedded instances and the original temporal sequences. Specifically, KDE provides a non-parametric estimation of the probability density function of the original data manifold; by evaluating the log-likelihood of perturbed instances under this density, KDE effectively identifies OOD samples, as instances falling into low-density regions exhibit significantly lower likelihood scores Parzen (1962); Roth and others (2022). Furthermore, MMD serves as a robust kernel-based two-sample test that measures the distance between the mean embeddings of two distributions within a Reproducing Kernel Hilbert Space (RKHS). A smaller MMD value formally indicates that the distribution of the generated explanation instances is statistically indistinguishable from the original empirical distribution, directly quantifying the mitigation of the OOD shift Gretton et al. (2012); Rabanser et al. (2019). Table VI reveals that explanations generated by TimeXa++ exhibit significantly lower MMD and KL divergence compared to conventional masking strategies. VI-D Robustness Against Noise Beyond OOD issues in attribution, counterfactual explanations frequently suffer from adversarial degeneration, where imperceptible, high-frequency noise flips the model’s prediction without providing meaningful semantic transitions. We demonstrate that TimeXcf++ eradicates this vulnerability by strictly confining perturbations. The proximity metrics analyzed alongside sparsity indicate that our framework produces highly localized structural changes rather than distributed trivial noise. This structural integrity is governed by the causal structural anchor ℒboundL_bound, acting as a stringent penalty against any perturbation occurring in the background. By forcing the generator ψcf _cf to manipulate only the critical temporal windows identified by the bottleneck extractor, the resulting counterfactuals are guaranteed to represent semantic shifts. TABLE VIII: Inference runtime of occlusion experiments for IG, Dynamask, TimeX, and TimeXa++ on all real-world datasets. Method PAM Epilepsy Boiler IG 5.231± 0.247 15.467± 0.363 123.556± 0.807 Dynamask 105.166± 0.610 371.092± 4.257 3780.433± 468.144 TimeX 0.164± 0.219 0.204± 0.207 0.918± 0.203 TimeXa++ 0.161± 0.218 0.201± 0.208 0.910± 0.177 Method Wafer FreezerRegular IG 15.395± 0.305 6.745± 0.502 Dynamask 403.400± 31.664 189.285± 1.731 TimeX 0.163± 0.022 0.269± 0.411 TimeXa++ 0.126± 0.002 0.270± 0.417 TABLE IX: Inference runtime of counterfactual explanation experiments for one split. Method FreqShapes LowVar Epilepsy CoMTE 42.245± 1.146 64.708 ± 8.603 22.992 ± 0.858 AB-CF 39.042± 1.139 37.944± 2.479 32.750 ± 2.522 M-CELS 4271.181± 55.677 5411.136± 63.176 1887.034± 69.215 CONFETTI 6628.330± 103.100 8397.309± 172.012 4519.880± 453.902 TimeXcf++ 0.075 ± 0.035 0.287 ± 0.119 0.140± 0.012 Furthermore, because TimeXcf++ strictly confines perturbations to critical structural regions rather than relying on distributed adversarial shortcuts, the resulting counterfactual explanations also exhibit superior robustness to external noise. To evaluate this property, we provide an analysis in Figure 4. We randomly select timesteps and inject standard Gaussian noise into the generated counterfactual explanations, then assess their effectiveness on the FreqShape and LowVar datasets. The validity and confidence of all counterfactual explanations decrease as the noise injection ratio increases. However, TimeXcf++ demonstrates greater robustness than the baseline methods. Even with a 50% noise ratio, our counterfactual explanations maintain a validity above 0.8 on both datasets. Although CoMTE achieves comparable robustness, it exhibits much lower sparsity than our method. CONFETTI experiences a sharp drop in validity as noise increases due to its lower confidence. In summary, TimeXcf++ prevents adversarial degeneration by design, demonstrating superior robustness while maintaining better sparsity than the baseline methods. TABLE X: Ablation of TimeXa++ considering whether there are different losses in our component. AUPRC AUP AUR FreqShapes TimeXa++ 0.891± 0.002 0.781± 0.001 0.662± 0.002 w/o ℒLCL_LC 0.225± 0.001 0.196± 0.001 0.768± 0.002 w/o STE 0.779± 0.003 0.732± 0.003 0.656± 0.002 w/o ℒKLL_KL 0.830± 0.003 0.646± 0.003 0.703± 0.002 w/o ℒdrL_dr 0.194± 0.002 0.139± 0.002 0.415± 0.002 SeqComb-MV TimeXa++ 0.759± 0.001 0.878± 0.001 0.391± 0.001 w/o ℒLCL_LC 0.095± 0.003 0.057± 0.002 0.330± 0.008 w/o STE 0.727± 0.003 0.873± 0.001 0.348± 0.002 w/o ℒKLL_KL 0.748± 0.002 0.869± 0.001 0.353± 0.001 w/o ℒdrL_dr 0.069± 0.002 0.053± 0.001 0.628± 0.008 ECG TimeXa++ 0.660± 0.001 0.726± 0.001 0.460± 0.001 w/o STE 0.615± 0.001 0.747± 0.001 0.402± 0.001 w/o ℒLCL_LC 0.621± 0.002 0.642± 0.002 0.429± 0.002 w/o ℒKLL_KL 0.642± 0.002 0.698± 0.001 0.442± 0.001 w/o ℒdrL_dr 0.152± 0.000 0.141± 0.000 0.631± 0.001 ((a)) Validity on Freqshape ((b)) Confidence on Freqshape ((c)) Validity on LowVar ((d)) Confidence on LowVar Fig. 4: The counterfactual explanations robustness analysis on Freqshape and LowVar. VI-E Runtime Results We conduct a runtime analysis evaluating both the training and inference phases across the two explanation paradigms. Regarding the training phase, the runtime for each experiment approximated 3 to 15 minutes per fold, depending on the dataset volume. For attribution explanations, compared to TimeX, which requires training both a white-box model for consistency and the explanation masks, TimeXa++ directly perturbs the black-box, thereby requiring less overall training time. For counterfactual explanations, while TimeXcf++ requires an upfront training stage unlike instance-specific optimization baselines, training time remains highly manageable. It is a constant multiple of the attribution training time, with the factor determined by the size of the classification label space. During the inference phase, as shown in Table VIII and Table IX, TimeX++ emerges as the most expedient model across both tasks. For attribution, TimeXa++ is significantly faster than Dynamask and IG, which necessitate recursive operations for individual samples, and slightly faster than TimeX, which requires Landmark calculations. For counterfactual generation, TimeXcf++ demonstrates exceptional efficiency, being over 100 times faster than the fastest baseline (AB-CF). Traditional counterfactual baselines typically rely on costly iterative search procedures to identify suitable perturbations for each new sample. In contrast, because TimeXcf++ is an inductive explainer, it requires only a single forward inference pass and fully benefits from GPU acceleration. Consequently, by requiring only a fixed amount of computation per instance during inference, our framework offers significant practical advantages for large-scale and real-time deployment scenarios. VI-F Flexibility Across Different Black-box Classifiers To explore the flexibility of TimeX++, we study two other time series classifiers and explore their explanatory role. We replace the original transformer-based black-box f with a long-short term memory (LSTM) and a convolutional neural network (CNN) as the underlying classifiers. TABLE XI: Targeted counterfactual explanation performance on LSTM and CNN architectures. LSTM CNN Method Validity Confidence Sparsity Prox.-L1 Prox.-L2 Validity Confidence Sparsity Prox.-L1 Prox.-L2 Freqshapes CoMTE 1.000 ± 0.000 0.935 ± 0.014 1.000 ± 0.000 0.562 ± 0.003 0.821 ± 0.006 1.000 ± 0.000 0.922 ± 0.010 1.000 ± 0.000 0.578 ± 0.002 0.847 ± 0.003 AB-CF 1.000 ± 0.000 0.823 ± 0.017 0.664 ± 0.021 0.424 ± 0.007 0.723 ± 0.005 1.000 ± 0.000 0.790 ± 0.010 0.715 ± 0.015 0.451 ± 0.006 0.760 ± 0.005 M-CELS 0.294 ± 0.029 0.267 ± 0.026 0.057 ± 0.006 0.070 ± 0.008 0.192 ± 0.018 0.405 ± 0.025 0.363 ± 0.022 0.055 ± 0.003 0.072 ± 0.005 0.207 ± 0.013 CONFETTI 0.981 ± 0.008 0.506 ± 0.004 0.361 ± 0.005 0.260 ± 0.004 0.568 ± 0.007 0.984 ± 0.010 0.507 ± 0.005 0.360 ± 0.005 0.275 ± 0.004 0.612 ± 0.006 TimeXcf++ 0.944 ± 0.036 0.926 ± 0.037 0.271 ± 0.011 0.421 ± 0.015 0.821 ± 0.022 0.976 ± 0.007 0.967 ± 0.007 0.283 ± 0.014 0.564 ± 0.031 1.120 ± 0.089 SeqComb-MV CoMTE 0.992 ± 0.003 0.932 ± 0.018 0.425 ± 0.020 0.078 ± 0.003 0.239 ± 0.007 0.999 ± 0.001 0.969 ± 0.008 0.454 ± 0.017 0.085 ± 0.003 0.255 ± 0.007 AB-CF 1.000 ± 0.000 0.862 ± 0.025 0.603 ± 0.033 0.094 ± 0.004 0.242 ± 0.007 1.000 ± 0.000 0.900 ± 0.015 0.578 ± 0.037 0.094 ± 0.005 0.249 ± 0.008 M-CELS 0.284 ± 0.039 0.277 ± 0.036 0.011 ± 0.001 0.007 ± 0.001 0.064 ± 0.006 0.549 ± 0.059 0.516 ± 0.056 0.012 ± 0.001 0.011 ± 0.001 0.089 ± 0.008 CONFETTI 0.911 ± 0.042 0.504 ± 0.021 0.236 ± 0.017 0.036 ± 0.003 0.140 ± 0.011 0.998 ± 0.001 0.512 ± 0.000 0.304 ± 0.011 0.051 ± 0.003 0.189 ± 0.010 TimeXcf++ 0.941 ± 0.037 0.942 ± 0.034 0.129 ± 0.014 0.121 ± 0.013 0.364 ± 0.023 0.940 ± 0.035 0.941 ± 0.032 0.127 ± 0.013 0.124 ± 0.015 0.374 ± 0.028 ECG CoMTE 1.000 ± 0.000 0.852 ± 0.030 1.000 ± 0.000 0.279 ± 0.010 0.384 ± 0.016 1.000 ± 0.000 0.873 ± 0.016 1.000 ± 0.000 0.292 ± 0.002 0.403 ± 0.003 AB-CF 1.000 ± 0.000 0.779 ± 0.036 0.570 ± 0.057 0.174 ± 0.016 0.303 ± 0.019 0.999 ± 0.000 0.750 ± 0.015 0.464 ± 0.047 0.165 ± 0.006 0.317 ± 0.010 M-CELS 0.368 ± 0.057 0.358 ± 0.056 0.015 ± 0.001 0.007 ± 0.001 0.042 ± 0.004 0.486 ± 0.063 0.462 ± 0.062 0.023 ± 0.002 0.015 ± 0.002 0.077 ± 0.007 CONFETTI 0.858 ± 0.030 0.485 ± 0.020 0.250 ± 0.010 0.072 ± 0.005 0.180 ± 0.013 0.977 ± 0.007 0.503 ± 0.004 0.255 ± 0.010 0.076 ± 0.005 0.208 ± 0.012 TimeXcf++ 0.772 ± 0.062 0.738 ± 0.057 0.138 ± 0.020 0.251 ± 0.037 0.709 ± 0.096 0.853 ± 0.047 0.849 ± 0.047 0.049 ± 0.016 0.104 ± 0.008 0.542 ± 0.033 TABLE XII: Ablation study Counterfactual explanation performance on LSTM and CNN architectures. Validity Confidence Sparsity Prox.-L1 Prox.-L2 Freqshapes TimeXcf++ 0.974 ± 0.004 0.964± 0.005 0.214 ± 0.005 0.339 ± 0.021 0.757 ± 0.030 w/o STE 0.769 ± 0.055 0.763 ± 0.055 0.174 ± 0.014 0.281 ± 0.031 0.616 ± 0.059 w/o ℒLCL_LC 0.000 ± 0.000 0.007 ± 0.001 0.091 ± 0.001 0.001 ± 0.000 0.002 ± 0.000 w/o ℒKLL_KL 0.936 ± 0.035 0.928 ± 0.034 0.220 ± 0.012 0.342 ± 0.030 0.730 ± 0.048 w/o ℒdrL_dr 0.955 ± 0.032 0.946 ± 0.032 0.216 ± 0.014 0.512 ± 0.070 1.107 ± 0.128 SeqComb-MV TimeXcf++ 0.983 ± 0.007 0.979 ± 0.008 0.305 ± 0.041 0.152 ± 0.016 0.353 ± 0.033 w/o STE 0.804 ± 0.049 0.799 ± 0.049 0.114 ± 0.007 0.114 ± 0.016 0.368 ± 0.030 w/o ℒLCL_LC 0.000 ± 0.000 0.003 ± 0.001 0.079 ± 0.005 0.000 ± 0.000 0.001 ± 0.000 w/o ℒKLL_KL 0.940 ± 0.036 0.941 ± 0.033 0.150 ± 0.015 0.146 ± 0.016 0.395 ± 0.025 w/o ℒdrL_dr 0.907 ± 0.039 0.907 ± 0.038 0.129 ± 0.013 0.286 ± 0.062 0.771 ± 0.122 ECG TimeXcf++ 0.848 ± 0.104 0.847 ± 0.101 0.084 ± 0.026 0.251 ± 0.097 0.767 ± 0.185 w/o STE 0.637 ± 0.128 0.638 ± 0.128 0.049 ± 0.015 0.111 ± 0.031 0.499 ± 0.080 w/o ℒLCL_LC 0.000 ± 0.000 0.015 ± 0.005 0.096 ± 0.003 0.000 ± 0.000 0.001 ± 0.000 w/o ℒKLL_KL 0.824 ± 0.124 0.831 ± 0.116 0.104 ± 0.037 0.311 ± 0.139 0.850 ± 0.214 w/o ℒdrL_dr 0.847 ± 0.110 0.853 ± 0.102 0.106 ± 0.013 0.539 ± 0.084 1.675 ± 0.221 For attribution explanations, TimeXa++ retains the best AUPRC prediction on these datasets and is also slightly ahead for AUP and AUR overall, as shown in Table VII, while TimeX fails to predict on SeqComb-MV due to non-convergence. Under the CNN predictor, our method achieves the highest AUPRC and AUP for both SeqComb-MV and ECG datasets. For counterfactual explanations, Table XI presents the comparison results on three benchmarks. For the baselines, similar behaviors are observed across different architectures, except for M-CELS, whose performance exhibits large variance, performing better with CNN and worse with LSTM. We also observe results consistent with our main findings, where TimeXcf++ achieves a balance among validity, confidence, sparsity, and proximity across both CNN and LSTM backbones, indicating strong generalizability across architectures. VI-G Ablation Study and Hyperparameter Analysis To disentangle the contributions of the proposed components, we conduct extensive ablation studies and hyperparameter analyses across both attribution and counterfactual tasks, evaluated on FreqShape, SeqComb-MV, and ECG datasets. Effect of STE For attribution explanations as shown in Table X, TimeXa++ outperforms leading baselines by 39.78%39.78\% in AUPRC, 22.04%22.04\% in AUP, and 3.10%3.10\% in AUR on ECG arrhythmia detection, indicating that the use of the STE plays a critical role in optimizing the discrete explanation masks. On average, employing STE yields an average 8.87%8.87\% increase in AUPRC across all datasets compared to a continuous masking strategy, alongside consistent enhancements in AUR, providing tangible evidence for utilizing hard masks. In the counterfactual domain, removing the STE results in a significant drop in validity and confidence. Although sparsity superficially improves, this indicates that the generation process has collapsed into a local optimum where perturbations are overly constrained and fail to effectively flip the model prediction, highlighting the necessity of STE in balancing the multi-objective trade-off. ((a)) Freqshape ((b)) SeqComb-MV ((c)) ECG Fig. 5: Attribution explanation performance varying the sparsity parameter r. ((a)) Validity ((b)) Confidence ((c)) Sparsity ((d)) Proximity-L1 ((e)) Proximity-L2 Fig. 6: The hyperparameter r analysis for counterfactual explanations on Freqshape (univariate), SeqComb-MV (multivariate), and ECG (real-world) datasets. Effect of Different Losses We examine the effectiveness of the individual loss components constraining our framework. For attribution explanations, the absence of the Kullback-Leibler maintenance loss (ℒKLL_KL) widens the distributional gap between original and perturbed instances, dropping performance. The removal of the reference distance loss (ℒdrL_dr) naturally causes the explainer to fail, as it removes the primary target for bottleneck extraction. Furthermore, without consistency labeling (ℒLCL_LC), performance on synthetic datasets drops significantly. Fig. 7: Visualization of two attribution explainers and TimeXa++ on the FreqShapes dataset. In the counterfactual domain (Table XII), removing the label consistency loss (ℒLCL_LC) dramatically degrades validity, as the generator loses its primary signal for targeted label flipping. Removing the reference distance loss (ℒdrL_dr), which acts as a structural regularization term, leads to a substantial decline in proximity. The maintenance loss (ℒKLL_KL) has a relatively smaller but consistent impact on preserving distributional consistency. Interestingly, the effect of the connectivity loss (ℒconL_con) varies depending on the underlying data characteristics, which improves performance on FreqShapes by promoting continuous modifications but degrades performance on ECG, as critical ECG patterns are inherently distributed across multiple discrete segments rather than concentrated in a single contiguous window. Finally, as previously analyzed, excising the structural anchor (ℒboundL_bound) results in a dramatic deterioration of sparsity and proximity metrics; without this causal anchor, the generator scatters perturbations across the entire sequence. Choosing the Hyperparameter r The parameter r governs the sparsity of the masks learned during the process. For attribution, in Figure 5, lower values of the parameter are associated with a decrease in the performance (AUR). The performance stabilizes when the value is between 0.40.4 and 0.70.7, suggesting robustness in this range. In Figure 6, for counterfactuals, r balances sparsity, validity, and proximity by providing prior knowledge about the expected size of counterfactual explanations. As r increases, validity and confidence improve, whereas sparsity and proximity deteriorate, reflecting the inherent multi-objective trade-offs. Fig. 8: The cases visualization of the FreqShapes dataset for counterfactual explanations. We demonstrate pairs of counterfactual cases with prediction 2 and target label 0. VI-H Case Study Saliency maps are a potent tool for visualizing the significance of features. We demonstrate the attribution saliency maps of the benchmarks and TimeXa++ on the FreqShapes dataset in Figure 7. IG identifies unnecessarily large areas as important, which can be untenable for noisy datasets. TimeX struggles to describe important sub-instances with certainty due to data distribution bias from its constructed classifiers. In stark contrast, TimeXa++ focuses accurately on the peaks for matching ground-truth explanations. For counterfactual explanations in Figure 8, we compare TimeXcf++ with baseline methods, with the modified parts highlighted. TimeXcf++ requires fewer modifications, and these are highly related to the underlying patterns. In contrast, CoMTE and AB-CF modify a large portion of the original input, resulting in trivial solutions (e.g., generating highly similar instances). M-CELS fails to generate valid counterfactual explanations in most cases. CONFETTI produces sparse modifications but its results lack robustness to noise. VII Conclusion In this work, we theoretically investigate an information-theoretic guided objective for time series explanations that ensures compactness and informativeness. We propose a novel approach, TimeX++, based on the IB principle, which allows a traceability computation to produce faithful attribution explanations and robust counterfactual explanations. Comprehensive studies on synthetic and real-world datasets have confirmed that TimeX++ surpasses existing approaches in performance and efficiency. Its effectiveness shows that TimeX++’s capability to reflect complex behaviors of pre-trained time series classifiers accurately. However, it may involve some hyperparameters in the learning objective to control the quantifiers of the explanation, especially when dealing with different datasets, which might be the key limitation. References [1] R. G. Andrzejak, K. Lehnertz, F. Mormann, C. Rieke, P. David, and C. E. Elger (2001) Indications of nonlinear deterministic and finite-dimensional structures in time series of brain electrical activity: dependence on recording region and brain state. Physical Review E, p. 061907. Cited by: §VI-A1. [2] E. Ates, B. Aksar, V. J. Leung, and A. K. Coskun (2021) Counterfactual explanations for multivariate time series. In ICAPAI, Vol. , p. 1–8. External Links: Document Cited by: §I, §VI-A2. [3] O. Bahri, S. F. Boubrahimi, and S. M. Hamdi (2022) Shapelet-based counterfactual explanations for multivariate time series. arXiv preprint arXiv:2208.10462. Cited by: §I. [4] J. Bento, P. Saleiro, A. F. Cruz, M. A. Figueiredo, and P. Bizarro (2021) Timeshap: explaining recurrent models through sequence perturbations. In SIGKDD, p. 2565–2573. Cited by: §I, §I. [5] A. G. P. Cetina, K. Benguessoum, R. Lourenco, and S. Kubler (2026) Counterfactual explainable ai (xai) method for deep learning-based multivariate time series classification. AAAI 40 (21), p. 17393–17400. External Links: Link, Document Cited by: §VI-A2. [6] Z. Chen, G. Lucchesi, Q. Dong, X. Zheng, D. Song, Q. Wen, W. Cheng, J. Ni, and D. Luo (2026) From signals to semantics: a survey on time series explainability through a human-cognitive lens. Authorea Preprints. Cited by: §I. [7] E. Choi, M. T. Bahadori, J. Sun, J. Kulas, A. Schuetz, and W. Stewart (2016) Retain: an interpretable predictive model for healthcare using reverse time attention mechanism. In NeurIPS, p. 3504–3512. Cited by: §I. [8] Y. Chuang, G. Wang, F. Yang, Q. Zhou, P. Tripathi, X. Cai, and X. Hu (2023) CoRTX: contrastive framework for real-time explanation. In ICLR, p. 1–23. Cited by: §VI-A2. [9] J. Crabbé and M. Van Der Schaar (2021) Explaining time series predictions with dynamic masks. In ICML, p. 2166–2177. Cited by: §I, §I, §VI-A2, §VI-A3. [10] H. A. Dau, A. Bagnall, K. Kamgar, C. M. Yeh, Y. Zhu, S. Gharghabi, C. A. Ratanamahatana, and E. Keogh (2019) The ucr time series archive. IEEE/CAA Journal of Automatica Sinica 6 (6), p. 1293–1305. Cited by: §VI-A1. [11] E. Delaney, D. Greene, and M. T. Keane (2021) Instance-based counterfactual explanations for time series classification. In International Conference on Case-Based Reasoning, p. 32–47. Cited by: §I. [12] J. Enguehard (2023) Learning perturbations to explain time series predictions. In ICML, p. 9329–9342. Cited by: §I, §I. [13] L. Faber, A. K. Moghaddam, and R. Wattenhofer (2021) When comparing to ground truth is wrong: on evaluating gnn explanation methods. In SIGKDD, p. 332–341. Cited by: §I. [14] R. Geirhos, J. Jacobsen, C. Michaelis, R. Zemel, W. Brendel, M. Bethge, and F. A. Wichmann (2020) Shortcut learning in deep neural networks. Nature Machine Intelligence 2 (11), p. 665–673. Cited by: §VI-A1. [15] M. Ghassemi, L. Oakden-Rayner, and A. L. Beam (2021) The false hope of current approaches to explainable artificial intelligence in health care. The lancet digital health 3 (11), p. e745–e750. Cited by: §I. [16] A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Schölkopf, and A. Smola (2012) A kernel two-sample test. The journal of machine learning research 13 (1), p. 723–773. Cited by: §VI-C. [17] J. Höllig, C. Kulbach, and S. Thoma (2022) Tsevo: evolutionary counterfactual explanations for time series classification. In ICMLA, p. 29–36. Cited by: §I. [18] S. Hooker, D. Erhan, P. Kindermans, and B. Kim (2019) A benchmark for interpretability methods in deep neural networks. In NeurIPS, H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett (Eds.), Vol. 32, p. . External Links: Link Cited by: §I, §I, §IV. [19] A. A. Ismail, H. Corrada Bravo, and S. Feizi (2021) Improving deep learning interpretability by saliency guided training. In NeurIPS, p. 26726–26739. Cited by: §VI-A2. [20] A. A. Ismail, M. Gunady, H. Corrada Bravo, and S. Feizi (2020) Benchmarking deep learning interpretability in time series predictions. In NeurIPS, H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (Eds.), Vol. 33, p. 6441–6452. External Links: Link Cited by: §I. [21] E. Jang, S. Gu, and B. Poole (2017) Categorical reparameterization with gumbel-softmax. In ICLR, p. 1–12. Cited by: §V-A. [22] D. Janzing, L. Minorics, and P. Bloebaum (2020) Feature relevance quantification in explainable ai: a causal problem. In AISTATS, S. Chiappa and R. Calandra (Eds.), Proceedings of Machine Learning Research, Vol. 108, p. 2907–2916. External Links: Link Cited by: §I. [23] G. Jeanneret, L. Simon, and F. Jurie (2022) Diffusion models for counterfactual explanations. In ACCV, p. 858–876. Cited by: §I. [24] S. Kaushik, A. Choudhury, P. K. Sheron, N. Dasgupta, S. Natarajan, L. A. Pickett, and V. Dutt (2020) AI in healthcare: time-series forecasting using statistical, neural, and ensemble architectures. Frontiers in Big Data 3, p. 4. Cited by: §I. [25] R. Kommiya Mothilal, D. Mahajan, C. Tan, and A. Sharma (2021) Towards unifying feature attribution and counterfactual explanations: different means to the same end. In AIES, AIES ’21, New York, NY, USA, p. 652–663. External Links: ISBN 9781450384735, Link, Document Cited by: §I, §I, §IV. [26] R. Kommiya Mothilal, D. Mahajan, C. Tan, and A. Sharma (2021) Towards unifying feature attribution and counterfactual explanations: different means to the same end. In AIES, AIES ’21, New York, NY, USA, p. 652–663. External Links: ISBN 9781450384735, Link, Document Cited by: §I. [27] S. Kullback and R. A. Leibler (1951) On information and sufficiency. The Annals of Mathematical Statistics 22 (1), p. 79–86. Cited by: §VI-C. [28] T. Laugel, M. Lesot, C. Marsala, X. Renard, and M. Detyniecki (2019) The dangers of post-hoc interpretability: unjustified counterfactual explanations. In IJCAI, IJCAI’19, p. 2801–2807. External Links: ISBN 9780999241141 Cited by: §I, §I. [29] K. K. Leung, C. Rooke, J. Smith, S. Zuberi, and M. Volkovs (2023) Temporal dependencies in feature importance for time series prediction. In ICLR, p. 1–18. Cited by: §VI-A2. [30] P. Li, O. Bahri, S. F. Boubrahimi, and S. M. Hamdi (2024) M-cels: counterfactual explanation for multivariate time series data guided by learned saliency maps. In ICMLA, Vol. , p. 713–718. External Links: Document Cited by: §VI-A2. [31] P. Li, O. Bahri, S. F. Boubrahimi, and S. M. Hamdi (2023) Attention-based counterfactual explanation for multivariate time series. In International Conference on Big Data Analytics and Knowledge Discovery, p. 287–293. Cited by: §VI-A2. [32] P. Li, S. F. Boubrahimi, and S. M. Hamdi (2023) Motif-guided time series counterfactual explanations. In ICPR, J. Rousseau and B. Kapralos (Eds.), Cham, p. 203–215. External Links: ISBN 978-3-031-37731-0 Cited by: §I. [33] Z. Liu, Y. Zhang, T. Wang, Z. Wang, D. Luo, M. Du, M. Wu, Y. Wang, C. Chen, L. Fan, and Q. Wen (2024) Explaining time series via contrastive and locally sparse perturbations. In ICLR, p. 1–21. Cited by: §I, §I, §VI-B. [34] D. Luo, W. Cheng, D. Xu, W. Yu, B. Zong, H. Chen, and X. Zhang (2020) Parameterized explainer for graph neural network. NeurIPS 33, p. 19620–19631. Cited by: §IV. [35] D. McAllester and K. Stratos (2020) Formal limitations on the measurement of mutual information. In AISTATS, S. Chiappa and R. Calandra (Eds.), Proceedings of Machine Learning Research, Vol. 108, p. 875–884. External Links: Link Cited by: §I. [36] S. Miao, M. Liu, and P. Li (2022) Interpretable and generalizable graph learning via stochastic attention mechanism. In ICML, p. 15524–15543. Cited by: §I, §V-A. [37] T. Miller (2019) Explanation in artificial intelligence: insights from the social sciences. Artificial Intelligence 267, p. 1–38. External Links: ISSN 0004-3702, Document, Link Cited by: §I. [38] G. B. Moody and R. G. Mark (2001) The impact of the MIT-BIH arrhythmia database. IEEE Engineering in Medicine and Biology Magazine 20, p. 45–50. Cited by: §VI-A1. [39] R. K. Mothilal, A. Sharma, and C. Tan (2020) Explaining machine learning classifiers through diverse counterfactual explanations. In Proceedings of the 2020 Conference on Fairness, Accountability, and Transparency, FAT* ’20, New York, NY, USA, p. 607–617. External Links: ISBN 9781450369367, Link, Document Cited by: §I. [40] D. Nemirovsky, N. Thiebaut, Y. Xu, and A. Gupta (2022) CounteRGAN: generating counterfactuals for real-time recourse and interpretability using residual gans. In UAI, J. Cussens and K. Zhang (Eds.), Proceedings of Machine Learning Research, Vol. 180, p. 1488–1497. External Links: Link Cited by: §I. [41] E. Parzen (1962) On estimation of a probability density function and mode. The Annals of Mathematical Statistics 33 (3), p. 1065–1076. Cited by: §VI-C. [42] M. Pawelczyk, C. Agarwal, S. Joshi, S. Upadhyay, and H. Lakkaraju (2022) Exploring counterfactual explanations through the lens of adversarial examples: a theoretical and empirical analysis. In AISTATS, G. Camps-Valls, F. J. R. Ruiz, and I. Valera (Eds.), Proceedings of Machine Learning Research, Vol. 151, p. 4574–4594. External Links: Link Cited by: §I. [43] O. Queen, T. Hartvigsen, T. Koker, H. He, T. Tsiligkaridis, and M. Zitnik (2023) Encoding time-series explanations through self-supervised model behavior consistency. In NeurIPS, Cited by: §I, §VI-A1, §VI-A2, §VI-A3. [44] S. Rabanser, S. Günnemann, and Z. Lipton (2019) Failing loudly: an empirical study of methods for detecting dataset shift. In NeurIPS, H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett (Eds.), Vol. 32, p. . External Links: Link Cited by: §VI-C. [45] M. Refoyo and D. Luengo (2024) Sub-space: subsequence-based sparse counterfactual explanations for time series classification problems. In World Conference on Explainable Artificial Intelligence, p. 3–17. Cited by: §I. [46] A. Reiss and D. Stricker (2012) Introducing a new benchmarked dataset for activity monitoring. In ISWC, p. 108–109. Cited by: §VI-A1. [47] M. T. Ribeiro, S. Singh, and C. Guestrin (2016) ”Why should i trust you?”: explaining the predictions of any classifier. In SIGKDD, KDD ’16, New York, NY, USA, p. 1135–1144. External Links: ISBN 9781450342322, Link, Document Cited by: §I. [48] K. Roth et al. (2022) Out-of-distribution detection using union of 1-dimensional subspaces. In CVPR, p. 9430–9440. Cited by: §VI-C. [49] C. Rudin (2019) Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nature machine intelligence 1 (5), p. 206–215. Cited by: §I. [50] D. Slack, S. Hilgard, E. Jia, S. Singh, and H. Lakkaraju (2020) Fooling lime and shap: adversarial attacks on post hoc explanation methods. In AIES, AIES ’20, New York, NY, USA, p. 180–186. External Links: ISBN 9781450371100, Link, Document Cited by: §I, §I. [51] M. Sundararajan, A. Taly, and Q. Yan (2017) Axiomatic attribution for deep networks. In ICML, p. 3319–3328. Cited by: §I, §VI-A2. [52] H. Suresh, N. Hunt, A. Johnson, L. A. Celi, P. Szolovits, and M. Ghassemi (2017) Clinical intervention prediction and understanding with deep neural networks. In MLHC, p. 322–337. Cited by: §I. [53] N. Tishby and N. Zaslavsky (2015) Deep learning and the information bottleneck principle. In 2015 IEEE Information Theory Workshop, p. 1–5. Cited by: §I. [54] S. Tonekaboni, S. Joshi, K. Campbell, D. K. Duvenaud, and A. Goldenberg (2020) What went wrong and when? Instance-wise feature importance for time-series black-box models. In NeurIPS, p. 799–809. Cited by: §I, §I. [55] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin (2017) Attention is all you need. In NeurIPS, p. 5998–6008. Cited by: §VI-A1. [56] Z. Wang, I. Samsten, I. Miliou, R. Mochaourab, and P. Papapetrou (2024) Glacier: guided locally constrained counterfactual explanations for time series classification. Machine Learning 113 (7), p. 4639–4669. Cited by: §I. [57] Z. Wang, I. Samsten, R. Mochaourab, and P. Papapetrou (2021) Learning time series counterfactuals via latent space representations. In International Conference on Discovery Science, p. 369–384. Cited by: §I. [58] Y. Zhang, P. Tiňo, A. Leonardis, and K. Tang (2021) A survey on neural network interpretability. IEEE Transactions on Emerging Topics in Computational Intelligence 5 (5), p. 726–742. Cited by: §I. [59] B. Zhao, S. Yu, W. Ma, M. Yu, S. Mei, A. Wang, J. He, A. Yuille, and A. Kortylewski (2022) OOD-CV: a benchmark for robustness to out-of-distribution shifts of individual nuisances in natural images. In ECCV, p. 163–180. Cited by: §I, §I. [60] X. Zheng, C. Lin, S. Chen, Z. Chen, J. Shi, J. Obeysekera, J. Ni, W. Cheng, J. Liu, and D. Luo (2026) Uncovering insights of compound flooding with data-driven AI. In SIGKDD, External Links: Link Cited by: §I. [61] X. Zheng, F. Shirani, Z. Chen, C. Lin, W. Cheng, W. Guo, and D. Luo (2025) F-fidelity: a robust framework for faithfulness evaluation of explainable ai. In ICLR, Y. Yue, A. Garg, N. Peng, F. Sha, and R. Yu (Eds.), Vol. 2025, p. 12772–12804. External Links: Link Cited by: §I.