NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Deep Discriminative Feature Fusion of Convolutional and Attention-Based Recurrent Representations for Subject-Independent ECG Stress Recognition

Zeeshan Ahmad, Muhammad Rehman ZafararXiv 2026

It’s late, you’re tired, and your heart is likely beating at a steady, rhythmic pace. But if you were stressed, that rhythm would change in subtle, complex ways. Detecting those changes automatically is the holy grail of wearable health tech, but it’s surprisingly difficult.

A new paper by Zeeshan Ahmad and Muhammad Rehman Zafar tackles this by arguing that to understand stress, an AI needs to look at the heart from two different perspectives simultaneously: its "shape" and its "rhythm."

TL;DR

By combining the "shape-sensing" power of Convolutional Neural Networks (CNNs) with the "rhythm-tracking" ability of Recurrent Neural Networks (LSTMs), the authors created a system that recognizes stress in people it has never seen before. Their novel fusion framework, CARF, acts like a mediator that lets these two AI architectures "compare notes," achieving significantly higher accuracy than either could alone.

What Problem Does This Paper Address?

Stress isn't just a feeling; it’s a physiological state that leaves a signature on your Electrocardiogram (ECG). However, reading that signature is tricky for two reasons:

  1. The Dual Nature of ECG: An ECG signal contains morphological features (the specific shape of the peaks and valleys) and temporal features (how those shapes change and interval over time). Most AI models focus on one and ignore the other.
  2. The "Stranger" Problem: Everyone’s heart is different. A model trained on Person A might fail miserably on Person B. This is called the "subject-independent" challenge.

The authors wanted to build a system that captures both types of features and generalizes well to new, unseen users.

Methods

The researchers built a "dual-branch" architecture. Think of it as a team of two specialists looking at the same patient:

  • The Artist (1D-CNN): This branch focuses on the local "geometry" of the heartbeats. It uses three convolutional blocks to extract morphological patterns directly from the raw signal.
  • The Musician (BiLSTM-Attention): This branch treats the ECG like a sequence of music, focusing on the timing and dependencies between beats. The "Attention" mechanism helps it ignore noise and focus on the most informative parts of the rhythm.
Figure 3: Overview of the proposed fusion-based stress classification framework. Morphological features extracted from the 1D-CNN and temporal features extracted from the BiLSTM-Attention network are com- bined through a feature fusion module to construct a unified feature representation for SVM-based stress classification.

The real magic, however, is in how they fused these two perspectives. They tested three strategies, culminating in a novel framework called Cross-Attention Residual Fusion (CARF).

CARF does two clever things:

  1. Bidirectional Cross-Attention: It allows the CNN branch to "ask" the LSTM branch which temporal features are relevant to the shapes it's seeing, and vice versa. They aren't just stacked; they are communicating.
  2. Residual Learning: It uses "shortcut connections" to ensure that the original, raw insights from each branch aren't lost or "diluted" during the fusion process.

Datasets

The models were put to the test on two major benchmarks:

  • RML Dataset: Data from nine subjects in a controlled environment designed to induce three levels of stress (Low, Medium, High).
  • WESAD Dataset: A well-known multimodal dataset for stress and affect detection. The authors focused specifically on the chest-worn ECG data for 15 subjects.

Crucially, they used Leave-One-Subject-Out Cross-Validation (LOSOCV). This means the AI was always tested on a person whose data it had never seen during training—the ultimate test for a real-world wearable.

Key Insights and Ideas

  • Two Heads are Better Than One: The individual CNN and LSTM models performed okay, but they were incomplete. Fusing them provided a massive jump in performance, proving that morphology and rhythm are complementary pieces of the stress puzzle.
  • Communication is Key: Simply "gluing" the features together (concatenation) wasn't enough. The Cross-Attention mechanism allowed the model to weigh features dynamically, essentially saying, "This specific rhythm is more important because of the weird shape I just saw."
  • Don't Forget the Basics: The Residual part of CARF was vital. Without it, the complex attention math sometimes "over-processed" the data, losing the simple, clear signals that the individual branches had already found.

Key Results

The CARF framework was the clear winner across the board:

  • On the RML Dataset: It achieved 83.1% accuracy for three-class stress recognition, outperforming the standalone CNN (73.6%) and LSTM (68.9%).
  • On the WESAD Dataset: It hit 77.91% accuracy, a significant improvement over the individual branches (64.71% and 61.26% respectively).
  • Generalization: The model showed it could handle the "Stranger Problem," maintaining high performance even when faced with entirely new cardiac profiles.

Limitations and Future Work

While the results are impressive, the authors note a few areas for growth:

  • Single Channel: The study focused only on single-channel ECG. While this is great for simple wearables, adding other sensors (like skin conductance or respiration) could make the system even more robust.
  • Computational Weight: Deep fusion models can be heavy. The authors suggest that model compression will be necessary to get this running smoothly on a low-power smartwatch.
  • Real-World Noise: Controlled datasets are one thing; a person running for a bus while stressed is another. Future work will need to tackle "in-the-wild" motion artifacts.

In short? Your future smartwatch might not just count your steps—it might actually "listen" to the conversation between your heart's shape and its rhythm to tell you when it's time to take a deep breath.

Summary updated

Abstract

Stress has become a significant concern because of its negative impact on both physical and mental health and therefore drives the need for reliable automated systems to assess stress levels. Electrocardiogram (ECG) signals provide a non-invasive and objective measure of physiological stress responses and have emerged as a promising modality for continuous stress monitoring. While deep learning techniques have achieved encouraging results in ECG-based stress detection, many studies focus only on one type of feature representation, and therefore limit their ability to capture both the morphological patterns and temporal dynamics embedded in ECG signals. To address this limitation, in this paper, we propose three deep learning-based feature fusion frameworks for ECG-based stress classification. These are Residual Feature Fusion (RFF), Bidirectional Feature-Wise Cross-Attention Fusion (BFCAF), and a novel Cross-Attention Residual Fusion (CARF) framework that combines the strengths of residual learning and bidirectional cross-attention within a unified architecture. A 1D Convolutional Neural Network (1D-CNN) and a BiLSTM-Attention network are used to extract complementary morphological and temporal representations from ECG signals, respectively. The proposed fusion frameworks leverage these heterogeneous representations to improve feature interaction, information preservation, and stress discrimination. The proposed frameworks are evaluated using subject-independent Leave-One-Subject-Out Cross-Validation (LOSOCV) on the RML and WESAD datasets for three-class stress classification. Experimental results show that the proposed feature fusion methods consistently improve performance over individual CNN and BiLSTM models, with CARF achieving the highest accuracies of 83.1% and 77.91% on the RML and WESAD datasets, respectively.
BibTeX
@misc{ahmad2026deep,
  author = {Zeeshan Ahmad and Muhammad Rehman Zafar},
  title = {{Deep Discriminative Feature Fusion of Convolutional and Attention-Based Recurrent Representations for Subject-Independent ECG Stress Recognition}},
  year = {2026},
  eprint = {2611.29870},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.29870},
}
Figure