Papers
Topics
Authors
Recent
Search
2000 character limit reached

Adaptive Group-Based Counterfactual Explanations for Time-Series Rehabilitation Data

Published 2 Jul 2026 in cs.LG | (2607.01838v1)

Abstract: Counterfactual explanations (CEs) for multivariate time-series classifiers are often difficult to interpret in domains where experts reason in terms of semantic feature groups rather than individual channels. In rehabilitation movement analysis with multi-sensor inertial measurement units (IMUs), clinicians interpret motion through muscle-group and joint-segment abstractions; yet, most existing counterfactual methods operate at the channel level, producing scattered and biomechanically incoherent explanations. We propose a two-stage framework for group-based counterfactual generation in high-dimensional IMU data. We first show that Shapley-Adaptive (SA) group ranking preserves counterfactual validity but fails to enforce group-level sparsity, motivating the need for explicit group selection. We then introduce Learnable Gate (LG) methods, which incorporate trainable per-group relevance gates jointly optimized with perturbation masks. Experiments on the KneE-PAD rehabilitation dataset demonstrate that LG substantially improves modality-group sparsity compared to the channel-level M-CELS baseline while maintaining or improving validity, temporal smoothness, and generation efficiency. Exercise-specific analyses further show that group-structured counterfactuals yield concise, muscle-level corrective guidance aligned with clinical reasoning. Overall, the proposed framework enhances interpretability without sacrificing counterfactual quality, enabling more actionable explanations for rehabilitation movement analysis.

Summary

  • The paper proposes an adaptive group-based counterfactual explanation framework that leverages sensor grouping to generate clinically aligned insights.
  • The methodology employs learnable gates and SHAP ranking to enforce group sparsity, achieving a 94.7% counterfactual success rate with fewer modified sensor groups.
  • Empirical evaluation on the KneE-PAD dataset demonstrates exercise-specific correction patterns aligned with biomechanical principles, enhancing interpretability and clinical utility.

Adaptive Group-Based Counterfactual Explanations in Sensor-Based Rehabilitation Movement Analysis

Introduction

The interpretability of machine learning predictions in clinical rehabilitation, particularly those using high-dimensional inertial measurement unit (IMU) time series, remains a significant barrier to translational deployment. Traditional explanation techniques, including channel-wise counterfactual explanations (CEs), lack semantic alignment with domain-relevant concepts such as muscular groups or joint segments, thus impeding clinical adoption and actionable feedback. The paper "Adaptive Group-Based Counterfactual Explanations for Time-Series Rehabilitation Data" (2607.01838) proposes an adaptive, group-based CE framework that explicitly leverages domain knowledge through sensor grouping and learnable feature selection, yielding explanations that are structurally and physiologically meaningful for rehabilitation settings.

Methodological Framework

The approach organizes IMU channels into semantically meaningful groups—either by IMU device (sensor) or by modality (accelerometer vs. gyroscope within anatomical placement)—to align the explanation’s granularity with clinical reasoning. The counterfactual generation process begins by ranking these groups via Shapley values, aggregating channel importances within each group using the maximum mean absolute value over time. This is followed by constraining candidate perturbations to a top-kk set of SHAP-ranked groups (hyperparameterized by ratio rr), thereby reducing the combinatorial search space and enhancing group-level sparsity.

To further adaptively enforce group sparsity, the Learnable Gate (LG) mechanism introduces trainable, per-group gates γg\gamma_g. These gates are optimized jointly with the counterfactual perturbation mask to selectively suppress irrelevant groups during optimization, enabling the joint pursuit of high counterfactual validity, strong group sparsity, and temporal plausibility. The loss function combines classification target achievement, overall and group sparsity, temporal smoothness, and explicit penalization of non-binary gate activations. The optimization employs multiplicative weights, dynamically shifting the optimization focus from classification validity to sparsity as soon as the CE reaches the target class with sufficient confidence.

Empirical Evaluation

Experiments are conducted on the KneE-PAD dataset, which provides multi-sensor IMU data for lower-limb rehabilitation exercises (squats, knee extension, gait), each with multiple clinically meaningful error classes. The fully convolutional classification model achieves strong discriminatory performance across exercise types and error conditions, enabling meaningful CE investigation.

Impact of Static vs. Adaptive Group Selection

Initial results reveal that static Shapley-Adaptive (SA) ranking, controlling only for group selection ratio rr, leads to a modest improvement in counterfactual validity as rr increases (73% to 93%), but at the cost of an approximately threefold increase in the number of modified channels, thus greatly decreasing explanation compactness. Figure 1

Figure 1: SA group ratio impact on validity vs.\ sparsity (n=150n=150). Higher ratios improve success rate modestly (73% →\to 93%) but substantially increase channel usage (10.7 →\to 29.8), reducing explanation compactness.

Learnable Gates Improve Group Sparsity and Validity

Adaptive LG methods achieve substantial improvements over both M-CELS and static SA variants in balancing validity and group sparsity. The best-performing method (LG-SHAP pruned) attains 94.7% counterfactual success with only 8.2 modified modality groups, compared to 90% success and 11.2 groups for M-CELS—a significant reduction in intervention scope while increasing reliability. Figure 2

Figure 2: Group sparsity and temporal plausibility comparison (n=150n=150). LG-SHAP pruned modifies 27% fewer modality groups (8.2 vs.\ 11.2) while maintaining comparable temporal gradient, demonstrating that structured group-level optimization improves interpretability without sacrificing plausibility.

Exercise-Specific Correction Patterns

The benefit of group-level counterfactuals is particularly pronounced in exercise-specific settings. For squats and knee extension, LG-based methods attain higher CE success rates and markedly sparser explanations relative to M-CELS. Notably, in knee extension—where precise quadriceps activation with minimal hamstring involvement is biomechanically critical—LG methods largely restrict corrective interventions to relevant muscle groups. Figure 3

Figure 3: Exercise-specific performance comparison between LG-SHAP pruned and M-CELS (n=150n=150 error-to-correct samples). LG achieves comparable or higher success rates with consistently sparser explanations across all exercise.

Analysis of modality group activation frequency further demonstrates that LG methods select biomechanically plausible groups in an exercise-specific manner, whereas M-CELS explanations remain diffuse and less consistent with domain knowledge. Figure 4

Figure 4: Modality group activation frequency for LG (SHAP pruned) vs. M-CELS across exercises. Heatmaps show the proportion of counterfactuals modifying each modality group. LG yields sparser, exercise-specific patterns consistent with biomechanics, whereas M-CELS shows diffuse group activation.

Discussion and Implications

The adaptive multi-objective framework for group-based CE enhances both interpretability and actionability for time-series classifiers in the rehabilitation domain. Explanations generated by LG methods not only achieve high validity but also manifest strong spatial and temporal coherence, closely tracking the segments and periods of interest in clinical movement assessment. The proximity and smoothness of perturbations suggest high plausibility and minimal deviation from the data manifold. Such structured explanations offer more effective support for targeted rehabilitation interventions and real-time feedback than granular, channel-level perturbations.

The technique’s strong numerical performance and physiologically meaningful group selection underline the practical advantages of domain-aligned grouping and adaptive sparsity. Still, generalizability beyond the KneE-PAD dataset and lower-limb rehabilitation must be validated. Future research directions include extending automated group discovery for multimodal/multisite IMU and sEMG data, applying the framework to additional clinical tasks, and integrating user studies to assess clinical actionability and patient trust.

From a theoretical perspective, the demonstrated tradeoff between group selection ratio and sparsity emphasizes the need for adaptive, data-driven regularization in high-dimensional explanation spaces. The modularity of the LG framework allows for integration with additional plausibility constraints, and its multi-objective formulation can be adapted to suit further clinical or biomechanical criteria.

Conclusion

The study establishes adaptive, group-based counterfactual explanation as a superior approach for interpretable, plausible, and reliable explanation of high-dimensional, sensor-based rehabilitation time series. By embedding domain knowledge through sensor grouping and optimizing group selection with learnable gates, the framework advances the state of the art in actionable XAI for clinical movement analysis. Broader application and continued methodological refinement may enable robust, interpretable AI-driven decision support across rehabilitation and related domains.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 0 likes about this paper.