Stress is prevalent in many aspects of everyday life including work, healthcare, and social interactions. Many works have studied handcrafted features from various bio-signals that are indicators of stress. Recently, deep learning models have also been proposed to detect stress. Typically, stress models are trained and validated on the same dataset, often involving one stressful scenario. However, it is not practical to collect stress data for every scenario. So, it is crucial to study the generalizability of these models and determine to what extent they can be used in other scenarios. In this paper, we explore the generalization capabilities of Electrocardiogram (ECG)-based deep learning models and models based on handcrafted ECG features, i.e., Heart Rate Variability (HRV) features. To this end, we train three HRV models and two deep learning models that use ECG signals as input. We use ECG signals from two popular stress datasets - WESAD and SWELL-KW - differing in terms of stressors and recording devices. First, we evaluate the models using leave-one-subject-out (LOSO) cross-validation using training and validation samples from the same dataset. Next, we perform a cross-dataset validation of the models, that is, LOSO models trained on the WESAD dataset are validated using SWELL-KW samples and vice versa. While deep learning models achieve the best results on the same dataset, models based on HRV features considerably outperform them on data from a different dataset. This trend is observed for all the models on both datasets. Therefore, HRV models are a better choice for stress recognition in applications that are different from the dataset scenario. To the best of our knowledge, this is the first work to compare the cross-dataset generalizability between ECG-based deep learning models and HRV models.
翻译:压力普遍存在于日常生活的诸多方面,包括工作、医疗保健和社交互动等。已有许多研究探索了从各种生物信号中提取的、作为压力指标的手工特征。近年来,深度学习模型也被提出用于检测压力。通常,压力模型在同一数据集上进行训练和验证,该数据集往往仅涉及一种压力场景。然而,为每个场景收集压力数据并不现实。因此,研究这些模型的泛化能力并确定它们在其它场景中的适用程度至关重要。本文探讨了基于心电图的深度学习模型以及基于手工心电图特征(即心率变异性特征)的模型的泛化能力。为此,我们训练了三个HRV模型和两个以心电信号为输入的深度学习模型。我们使用了来自两个流行压力数据集——WESAD和SWELL-KW——的心电信号,这两个数据集在压力源和记录设备上有所不同。首先,我们使用同一数据集中的训练和验证样本,采用留一被试交叉验证方法评估模型。接着,我们对模型进行跨数据集验证,即在WESAD数据集上训练的留一被试交叉验证模型使用SWELL-KW样本进行验证,反之亦然。虽然深度学习模型在同一数据集上取得了最佳结果,但基于HRV特征的模型在不同数据集的数据上表现显著更优。这一趋势在两个数据集的所有模型上均得到观察。因此,在与数据集场景不同的应用中,HRV模型是压力识别更优的选择。据我们所知,这是首个比较基于心电图的深度学习模型与HRV模型在跨数据集泛化能力方面的工作。