- 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-k set of SHAP-ranked groups (hyperparameterized by ratio r), 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​. 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 r, leads to a modest improvement in counterfactual validity as r 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: SA group ratio impact on validity vs.\ sparsity (n=150). Higher ratios improve success rate modestly (73% → 93%) but substantially increase channel usage (10.7 → 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: Group sparsity and temporal plausibility comparison (n=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: Exercise-specific performance comparison between LG-SHAP pruned and M-CELS (n=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: 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.