HAFN: a federated learning framework for privacy-preserving stress detection
Stress detection using wrist-worn physiological sensors offers an optimistic pathway toward unobtrusive and continuous health monitoring. Traditional centralized training paradigms come with limitations due to the inherently sensitive nature of physiological data. Federated learning frameworks provide a feasible solution to this problem by ensuring that raw data remains on-device. This study proposes a federated learning framework, the Hierarchical Attention Fusion Network (HAFN) combined with the FedNova aggregation strategy for privacy-preserving multimodal stress classification. Proposed framework was validated using the WESAD benchmark dataset. The framework leverages physiological sensor channels including blood volume pulse (BVP), electrodermal activity (EDA), tri-axial accelerometry (ACC), and skin temperature (TEMP). The proposed model employs modality-specific bidirectional LSTM encoders augmented with learned positional encoding and temporal self-attention, a motion artifact gate that suppresses movement induced interference in BVP and EDA prior to cross-modal fusion. Additionally, auxiliary branches extract frequency-domain HRV statistics and distributional channel features to complement the temporal representation. Evaluated across 15 clients under multiple aggregation strategies, the proposed HAFN-FedNova framework achieves the best overall performance, consistently outperforming baseline architectures while maintaining minimal performance variance (0.74 percentage points). The results highlight that HAFN attains 92.22% accuracy and a macro-F1 score of 0.8938, demonstrating robustness and effectiveness of the proposed framework.