Volume: 03, Issue: 01, Page: 4-10

Hybrid CNN–BiLSTM–GRU architecture for PAMAP2-based human activity recognition in patient monitoring

1 Department of Computer Science and Engineering, Bangladesh Army University of Engineering & Technology (BAUET), Qadirabad Cantonment, Natore-6431, Rajshahi, Bangladesh

2 Department of Computer Science and Engineering, University of Rajshahi, Rajshahi-6205, Bangladesh

3 Department of Information and Communication Engineering, University of Rajshahi, Rajshahi-6205, Bangladesh

*Corresponding authors

Email address: sksubrata96@gmail.com (Subrata Kumer Paul)

doi: https://doi.org/10.69517/cser.2026.03.01.0002

Share:

Received:
29 October 2025

Revised:
02 January 2026

Accepted:
24 January 2026

Published:
29 January 2026

Highlights

  • Achieved 99.50% accuracy on PAMAP2 using a hybrid CNN–BiLSTM–GRU model.
  • Hybrid architecture effectively captures both spatial and bidirectional temporal features.
  • Proposed model outperforms CNN, LSTM, BiLSTM, and GRU baseline architectures.
  • Robust performance validated using 5-fold cross-validation and ROC analysis.
  • Model demonstrates high reliability for real-time patient activity monitoring.

Abstract

Human Activity Recognition (HAR) is essential in modern patient monitoring systems, facilitating real-time health assessments and timely interventions. This study introduces a hybrid deep learning framework that combines Convolutional Neural Networks (CNN), Bidirectional Long Short-Term Memory (BiLSTM), and Gated Recurrent Units (GRU) to achieve high-precision activity classification using the PAMAP2 public activity sensor dataset, which includes 18 activities collected from nine subjects. In this architecture, the CNN module extracts complex spatial features, the BiLSTM component captures bidirectional temporal dependencies, and the GRU layer improves sequential processing efficiency. Through thorough preprocessing and hyperparameter optimization, the model achieves an impressive accuracy of 99.50%, surpassing previously reported benchmarks on the dataset. This outstanding performance underscores the model’s suitability for reliable patient monitoring and its applicability to related areas such as elderly fall detection, fitness tracking, smart home automation, rehabilitation monitoring, and workplace safety. Future enhancements may include integrating attention mechanisms to highlight critical patterns, employing transfer learning to enhance generalizability, utilizing multi-sensor fusion for richer contextual information, and optimizing the model for lightweight deployment on edge devices to ensure efficient real-time responsiveness.

Graphical abstract

Keywords

PAMAP2 dataset, Hybrid model, Activity sensor dataset, CNN-LSTM, Retaliation monitoring, Gated recurrent unit

1. Introduction

Human Activity Recognition (HAR) has become a fundamental component of intelligent healthcare systems, particularly in patient monitoring applications. Continuous observation of daily activities supports clinical assessment, early anomaly detection, and timely medical intervention (Nweke et al., 2018). Wearable sensor-based HAR systems automatically recognize activities such as walking, sitting, running, and transitional movements, which serve as important indicators of physical condition, rehabilitation progress, and overall well-being (Mishra et al., 2021). These capabilities are especially relevant in elderly care, chronic disease management, post-operative monitoring, and assisted living environments, where deviations from normal activity patterns may indicate emerging health risks.
Despite substantial progress in this domain, wearable sensor-based HAR remains challenging due to the complex nature of multi-sensor signals and the strong temporal dependencies present in human motion data. Traditional machine learning approaches generally rely on handcrafted features and often struggle to model high-dimensional time-series data effectively, resulting in limited generalization across subjects and activities (Sun et al., 2023; Nayak et al., 2022). Although deep learning techniques, such as Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs), have demonstrated superior performance by automatically learning features from raw data, standalone architectures frequently emphasize either spatial characteristics (CNNs) or temporal dependencies (RNNs), but not both simultaneously, which can lead to incomplete activity representation (Bhattacharya et al., 2022; Moya Rueda et al., 2018).
Recent studies have explored hybrid architectures to overcome these limitations. CNN–LSTM and CNN–GRU models have shown improved performance by combining spatial and temporal modeling capabilities (Jameer and Syed, 2023; Dua et al., 2021). Furthermore, Bidirectional LSTM (BiLSTM) networks have been reported to capture richer contextual information by learning temporal dependencies in both forward and backward directions (Islam et al., 2022). However, BiLSTM models are computationally expensive, limiting their practicality in real-time healthcare applications, particularly for deployment on wearable or edge devices. In contrast, GRU models offer a computationally efficient alternative but are less frequently explored in combination with BiLSTM and CNN for wearable HAR tasks. This leads to the following research question, can a unified hybrid deep learning architecture that integrates CNN, BiLSTM, and GRU effectively capture both spatial and bidirectional temporal characteristics of wearable sensor data, thereby significantly improving HAR performance for patient monitoring systems? This study hypothesizes that combining CNN for spatial feature extraction, BiLSTM for bidirectional temporal modeling, and GRU for efficient sequential learning can provide a richer feature representation and achieve superior generalization across subjects and activities compared to existing single-model and dual-model approaches.
The main objective of this research is to design and evaluate a robust hybrid CNN–BiLSTM–GRU architecture for HAR using the PAMAP2 wearable sensor dataset. Specifically, this study aims to develop a model capable of extracting discriminative spatial features from multivariate sensor signals using convolutional layers, capturing both short-term and long-term bidirectional temporal dependencies through recurrent architectures, and achieving reliable, high-accuracy activity classification suitable for real-time patient monitoring applications. By integrating CNN, BiLSTM, and GRU into a unified framework, the study seeks to enhance generalization across subjects and activities while maintaining computational efficiency for practical healthcare deployment.
The PAMAP2 dataset is widely recognized as a benchmark in HAR research due to its diversity of activities, multi-sensor configuration, and inter-subject variability (Sultana et al., 2024). However, its high dimensionality and complex temporal dynamics present significant modeling challenges, making it an appropriate platform for evaluating advanced hybrid deep learning architectures.
This study contributes to the existing literature by proposing a unified CNN–BiLSTM–GRU framework that jointly exploits spatial, temporal, and bidirectional sequence modeling, supported by extensive preprocessing, data augmentation, and systematic experimental evaluation. The results demonstrate that the proposed model significantly outperforms baseline and state-of-the-art models, highlighting its potential applicability in practical patient monitoring systems.
The remainder of the paper is organized as follows, Section 2 reviews related work, Section 3 describes the dataset and preprocessing steps, Section 4 presents the proposed methodology, Section 5 discusses experimental results, Section 6 outlines limitations, and Section 7 concludes the study with future research directions.


2. Literature review

HAR using wearable sensors has been extensively studied, with the PAMAP2 dataset serving as a key benchmark due to its comprehensive collection of IMU data across 18 activities from 9 subjects (Sun et al., 2022). The dataset's high-dimensional and temporal nature has prompted researchers to explore both traditional machine learning and deep learning approaches, each yielding varying degrees of success. This section reviews prior methods applied to the PAMAP2 dataset, their reported accuracies, and identifies research gaps that our proposed CNN-BiLSTM-GRU model addresses.
Early approaches to HAR on the PAMAP2 dataset relied on traditional machine learning techniques. Previous study employed feature engineering combined with classifiers such as Decision Trees and SVM. They extracted time-domain features (e.g., mean, variance) and frequency-domain features (e.g., Fourier coefficients) from IMU signals, achieving an accuracy of approximately 71.2% for activity classification. While these methods were computationally efficient, their reliance on handcrafted features limited their ability to capture complex temporal and spatial patterns, resulting in moderate performance, particularly for dynamic activities like running or cycling (Sinha et al., 2025).
The advent of deep learning has significantly improved HAR performance on the PAMAP2 dataset. CNNs have been widely adopted for their ability to automatically extract spatial features from raw sensor data. Bhattacharya et al. (2022) proposed a CNN-based model with multiple 1D convolutional layers, achieving an accuracy of 85.6%. Their approach leveraged convolutional filters to detect local patterns in acceleration and angular velocity signals, reducing the need for manual feature engineering (Paul et al., 2022). However, CNNs alone struggle to model the temporal dependencies inherent in sequential activities, limiting their effectiveness for tasks requiring context over extended time periods.
RNNs, particularly LSTM networks, have been employed to address the temporal nature of PAMAP2 data. Moya Rueda et al. (2018) developed a deep LSTM model that processed sequential IMU data, achieving an accuracy of 87.4%. The LSTM algorithm's ability to maintain long-term dependencies improved performance over CNNs for activities with prolonged patterns, such as walking or stair climbing. However, standard LSTMs process data unidirectionally, potentially missing bidirectional contextual cues that are critical for complex activities like transitions between sitting and standing. To combine the strengths of spatial and temporal modeling, hybrid architectures have gained traction.
Jameer and Syed (2023) proposed a CNN-LSTM model that utilized CNN layers for feature extraction, followed by LSTM layers for sequence modeling, achieving an accuracy of 89.86% on the PAMAP2 dataset. This approach outperformed standalone CNN and LSTM models by effectively capturing both local patterns and temporal dependencies. However, the unidirectional LSTM component limited its ability to fully exploit bidirectional temporal relationships, which are crucial for activities with context-dependent dynamics.
More recent studies have explored advanced recurrent architectures. Islam et al. (2022) investigated Bidirectional LSTM (BiLSTM) on the PAMAP2 dataset, achieving an accuracy of 90.26%. BiLSTM processes data in both forward and backward directions, capturing richer temporal contexts and improving performance on activities with complex transitions. However, BiLSTM is computationally expensive, which may hinder its deployment in real-time patient monitoring systems. Gated Recurrent Units (GRUs), which offer a simpler alternative to LSTMs, have been less explored in the context of PAMAP2.
Despite these advancements, several research gaps remain. Firstly, most hybrid models, such as CNN-LSTM, do not incorporate bidirectional temporal modelling, limiting their ability to capture the full context of activities in the PAMAP2 dataset. Secondly, while BiLSTM improves temporal modelling, its high computational cost poses challenges for resource-constrained devices used in patient monitoring. Thirdly, few studies have explored the integration of CNNs with both BiLSTM and GRUs to balance accuracy and efficiency. Finally, achieving accuracies above 90% remains challenging due to dataset variability across subjects and activities, necessitating robust pre-processing and augmentation techniques.
Although CNN, BiLSTM, and GRU models have been used in HAR before, our work introduces a unique hybrid design that combines all three in a unified architecture. The CNN extracts spatial features, the BiLSTM captures bidirectional temporal patterns, and the GRU enhances sequential efficiency while reducing computational load. By integrating these strengths, the model balances high accuracy with faster processing, which is essential for real-time patient monitoring. Additionally, we apply extensive preprocessing, augmentation, and optimized hyperparameters to enhance robustness across different subjects and activities. Our results demonstrate that this combined architecture achieves significantly higher accuracy than existing single-model or dual-model approaches. Overall, the proposed hybrid framework offers a more comprehensive and efficient solution for HAR compared to previous methods.
Our proposed CNN-BiLSTM-GRU model addresses these gaps by combining CNNs for spatial feature extraction, BiLSTM for bidirectional temporal modeling, and GRUs for efficient sequence processing, achieving a state-of-the-art accuracy of 99.50% on the PAMAP2 dataset.


3. Dataset description

3.1 PAMAP2 dataset

The public dataset PAMAP2 serves as a comprehensive benchmark for HAR (Samoon et al., 2025). It includes data from nine subjects performing 18 activities, such as walking, running, cycling, vacuum cleaning, and rope jumping. Data is collected using three inertial measurement units (IMUs) positioned on the chest, hand, and ankle, in addition to a heart rate monitor. Each IMU provides 17 features: 3D acceleration (ms−2), 3D angular velocity (rads−1), 3D magnetometer data, and temperature, all sampled at 100 Hz. The heart rate monitor adds one additional feature, resulting in a total of 52 features per sample. The dataset's multisensory setup and variety of activities make it ideal for evaluating complex HAR models; however, its high dimensionality and inter-subject variability present significant challenges. Figure 1 illustrates the placement of the wearable sensors used in the PAMAP2 dataset.


Figure 1. Body positions of wearable sensors employed in the PAMAP2 dataset
Figure 1. Body positions of wearable sensors employed in the PAMAP2 dataset.

3.2 Data preprocessing

The PAMAP2 dataset was preprocessed to ensure compatibility with the proposed hybrid model and to enhance robustness and generalization. Continuous sensor data were segmented into fixed-length sliding windows of 5.12 seconds, corresponding to 512 samples at a sampling rate of 100 Hz, with a 50% overlap. This approach effectively captures temporal activity patterns while maintaining computational efficiency (Liu et al., 2021). Each segmented window was normalized to the range [0, 1] using min–max scaling, standardizing feature magnitudes across sensors and subjects to mitigate variations in sensor sensitivities. Missing values caused by sensor malfunctions or data transmission errors were identified and imputed using linear interpolation to preserve temporal continuity in the sensor signals. To further improve model generalization and address inter-subject variability, data augmentation techniques were applied, including random rotations to simulate changes in sensor orientation and Gaussian noise injection to mimic real-world sensor noise, resulting in an approximately 20% increase in dataset size. After preprocessing, the data were represented as input tensors of shape (samples, 512, 52), where each sample corresponds to a window of 512 time steps with 52 sensor features.
The fixed-length sliding-window technique used in this work is illustrated in Figure 2, where continuous sensor data is divided into overlapping time windows. This segmentation approach preserves temporal continuity while ensuring that important activity patterns and transitions are effectively captured, enabling the HAR model to learn both stable motion characteristics and subtle changes occurring between successive activities.


3.3 Statistical analysis

Statistical analysis was conducted to evaluate the reliability, consistency, and comparative performance of the proposed CNN–BiLSTM–GRU model. Model performance was quantified using standard classification metrics, including accuracy, precision, recall, and F1-score, computed for each activity class and averaged across all classes. A 5-fold cross-validation strategy was employed to reduce bias and variance, partitioning the dataset into five stratified folds based on subjects and activity labels. Results were reported as mean values with corresponding standard deviations to assess performance stability. Class-wise confusion matrices were analyzed to identify misclassification patterns and inter-class similarities. Additionally, Receiver Operating Characteristic (ROC) curves and Area Under the Curve (AUC) values were computed using a one-vs-rest approach to evaluate the model's discriminative capability across activity classes. A comparative statistical evaluation was performed by benchmarking the proposed method against baseline and existing models under identical experimental conditions, allowing for an objective assessment of performance improvements.


Figure 2. Schematic representation of the fixed length sliding window approach employed in this study
Figure 2. Schematic representation of the fixed-length sliding window approach employed in this study.

4. Methodology and experimental setup

4.1 Environment setup

The experimental setup was designed to ensure a robust evaluation and reproducibility of the proposed model. The dataset was partitioned into training (70%), validation (15%), and testing (15%) subsets, with stratification applied across subjects and activity classes to maintain a balanced data distribution. Model training utilized the Adam optimizer with a learning rate of 0.0005, and categorical cross-entropy was employed as the loss function. A batch size of 32 was used, and the training process was conducted for a maximum of 100 epochs, incorporating an early stopping strategy based on validation loss with a patience value of 10 to prevent overfitting. Model performance was evaluated using standard classification metrics, including accuracy, precision, recall, and F1-score, while overall robustness was assessed through 5-fold cross-validation. All experiments were implemented in TensorFlow version 2.16 and executed on an NVIDIA RTX 3080 GPU with 16 GB of VRAM.


4.2 Proposed hybrid model architecture

In the proposed architecture for HAR in patient monitoring, raw multi-sensor data is initially collected and preprocessed using linear interpolation to address missing values. This is followed by scaling, normalization, and segmentation into meaningful time windows (Figure 3). Relevant features are then extracted, and the dataset is divided into training and testing sets. The segmented input is processed through an ensemble of three parallel pipelines. Each pipeline consists of a 1D Convolutional Neural Network (1D-CNN) layer for local feature extraction, incorporating max-pooling and dropout for dimensionality reduction and regularization. This is followed by Bidirectional LSTM (BiLSTM) and GRU layers to capture both forward–backward and sequential dependencies, along with a final LSTM layer for additional temporal refinement. The outputs of the parallel branches are combined in an ensemble RNN layer, passed through a dense layer, and ultimately classified into activity classes using a SoftMax activation function. This process enables robust and accurate real-time recognition of patient activities. Additionally, the hybrid CNN–BiLSTM–GRU framework utilizes CNN for spatial feature extraction and BiLSTM–GRU for modeling temporal dependencies, resulting in a highly effective HAR system.


Figure 3. Proposed workflow diagram in this study
Figure 3. Proposed workflow diagram in this study.

4.3 Layer-by-layer CNN-BiLSTM-GRU model architecture

The CNN–BiLSTM–GRU model architecture effectively captures both spatial and temporal characteristics of wearable sensor data. It has an input shape of (512, 52), corresponding to 5.12-second windows that contain 512 time steps and 52 sensor features from the PAMAP2 dataset. The input sequence is first processed through a one-dimensional convolutional layer featuring 128 filters, a kernel size of 3, a stride of 1, and ReLU activation. This produces feature maps with a shape of (510, 128). A max-pooling layer with a pool size of 2 then reduces the dimensionality to (255, 128). Next, a second Conv1D layer with 64 filters and a kernel size of 3 extracts higher-level spatial features, generating an output of shape (253, 64), which is subsequently downsampled by another max-pooling layer to (126, 64). The extracted features are passed to a Bidirectional Long Short-Term Memory (BiLSTM) layer with 256 units (128 units in each direction) and a dropout rate of 0.5. This enables the model to learn bidirectional temporal dependencies, resulting in an output shape of (126, 256) (Paul et al., 2025). Following this, a Gated Recurrent Unit (GRU) layer with 128 units and a dropout rate of 0.5 enhances sequential learning efficiency and reduces computational complexity, producing an output of shape (batch, 128). Finally, a fully connected dense layer with 18 neurons and a SoftMax activation function outputs the probability distribution over the 18 activity classes, completing the activity classification process.


5. Results and Discussion

5.1 Fold-by-fold performance analysis

The proposed model was evaluated using 5-fold cross-validation to ensure robustness and minimize bias from data partitioning. The model achieved a mean accuracy of 99.50% with a very low standard deviation of 0.04, demonstrating exceptional consistency across different folds (Table 1). The minimal performance variation indicates that the model does not rely on a specific subset of the data and generalizes well across various subject distributions. Fold 4 achieved the highest accuracy at 99.55%, while Fold 3 exhibited slightly lower accuracy at 99.45%. This difference can be attributed to a greater representation of highly dynamic activities, such as rope jumping and running, which inherently exhibit higher inter-subject variability and sensor noise, making classification more challenging (Nweke et al., 2018; Moya Rueda et al., 2018).
The low validation loss of 0.03 and stable performance confirm that the application of dropout (0.50), early stopping, and data augmentation effectively prevented overfitting. This is particularly important in healthcare-oriented systems, where consistent generalization across unseen users is essential for safe deployment.
From a methodological perspective, the consistently high performance across folds supports the effectiveness of the hybrid architectural design. The integration of CNNs for spatial feature extraction with BiLSTMs for bidirectional temporal learning enables the model to leverage both local signal patterns and long-range dependencies, which are critical characteristics of wearable sensor data. This finding aligns with previous research by Islam et al. (2022) and Lalwani and Ramasamy (2024), who highlighted the importance of bidirectional temporal modeling for complex HAR tasks. Additionally, the significantly higher stability observed in our model suggests that the incorporation of GRUs enhances generalization and training efficiency.


Table 1. Fold-by-fold performance of CNN-BiLSTM-GRU model.


5.2 Confusion matrix Interpretation

The normalized confusion matrix further illustrates the discriminative power of the proposed model (Figure 4). The dominance of diagonal elements confirms that nearly all activity classes are classified correctly, with misclassification rates below 0.5% for most classes. Static activities, such as lying and sitting, exhibit almost perfect classification due to their highly distinct and stable signal patterns. More complex activities, like vacuum cleaning and rope jumping, show slightly higher confusion, which is expected since these actions share overlapping motion characteristics with other dynamic movements. However, even in these challenging cases, the model maintains excellent recognition accuracy, demonstrating its robustness. This strong class separability confirms that the hybrid architecture successfully learns meaningful representations across both spatial and temporal dimensions of the sensor signals.
The observed misclassification patterns are consistent with the inherent biomechanical similarities between certain activities. For example, vacuum cleaning and rope jumping involve overlapping upper-body and lower-body movement patterns, which has been reported as a challenge in previous HAR studies (Bhattacharya et al., 2022; Dua et al., 2021; Nweke et al., 2018). Nevertheless, the extremely low confusion rates indicate that the proposed model successfully learns fine-grained representations beyond basic motion similarity. This suggests that the hybrid architecture does not merely memorize signal patterns but develops a meaningful hierarchical understanding of activity dynamics.


Figure 4. Normalized confusion matrix of the proposed model
Figure 4. Normalized confusion matrix of the proposed model.

5.3 Class-wise performance analysis

The class-wise precision, recall, and F1-score results further validate the model's effectiveness. Most activities achieve near-perfect performance, particularly routine actions such as walking, sitting, and lying (Figure 5).
The slightly reduced performance for complex activities (e.g., rope jumping, vacuum cleaning) can be attributed to higher variability in motion patterns across subjects. Nevertheless, the overall F1-scores remain exceptionally high, indicating that the model maintains a strong balance between sensitivity and specificity. This balance is particularly important for healthcare applications, where false negatives (missed critical events) can have serious consequences.
From an application perspective, the strong class-wise performance has significant implications for patient monitoring systems. High recall values ensure that critical activities or abnormal behaviors are unlikely to be overlooked, while high precision minimizes false alarms. This balance is essential in healthcare environments, where inaccurate predictions could lead to unnecessary interventions or missed emergencies. Compared to prior studies that reported reduced performance for complex activities (Jameer and Syed, 2023; Moya Rueda et al., 2018), the proposed approach demonstrates superior robustness across both simple and complex movements.


Figure 5. Class wise performance for selected activities
Figure 5. Class-wise performance for selected activities.

5.4 Training and validation accuracy and loss curve

The training accuracy stabilizes at approximately 99.80%, while the validation accuracy reaches 99.50%, with closely aligned loss curves (Figure 6). The lack of significant divergence between the training and validation curves confirms that the model is not suffering from overfitting. This stability can be attributed to several design choices: effective window segmentation, data augmentation, dropout regularization, and optimized hyper-parameters. Such stable convergence behavior is essential for deploying HAR models in real-world patient monitoring systems, where reliability is critical.

Figure 6. Training and validation loss of our proposed model
Figure 6. Training and validation loss of our proposed model.

The smooth convergence behavior further underscores the architectural stability of the proposed model. Unlike many deep learning-based HAR systems that struggle with overfitting due to limited subject diversity (Sun et al., 2023), the close alignment between the training and validation curves indicates that the model learns generalizable patterns rather than dataset-specific noise. This reinforces the assertion that the proposed framework is not only high-performing but also reliable for real-world deployment.


5.5 Receiver Operating Characteristic (ROC) curve Analysis

The ROC curves further illustrate the model's excellent discriminative capability. The AUC values, ranging from 0.98 to 1.00, indicate that the model can almost perfectly distinguish between activity classes (Figure 7). High AUC values are particularly important in healthcare applications, as they provide strong confidence in classification decisions. This ensures that the system can reliably differentiate between normal and potentially risky activity patterns.


Figure 7. ROC curve of proposed model
Figure 7. ROC curve of proposed model.

5.6 Performance comparison

Single architectures such as CNN (96.44%) and GRU (96.75%) perform well but do not fully capture both spatial and temporal characteristics simultaneously (Table 2). The CNN–BiLSTM and BiLSTM–GRU hybrids further enhance performance, achieving accuracies of 98.34% and 98.92%, respectively. This confirms that hybridization significantly boosts recognition capabilities. However, the proposed CNN–BiLSTM–GRU model reaches the highest accuracy at 99.50%, demonstrating that the integration of spatial modeling, bidirectional temporal learning, and efficient sequence modeling produces a synergistic effect. This result empirically supports the study's hypothesis.


Table 2. Performance comparison of different tested models on the same dataset in our experiment.


The performance improvement achieved by the proposed model is not merely incremental but structurally significant. The results show that increasing model depth, such as with standalone LSTM or BiLSTM, does not ensure strong performance. Instead, architectural synergy is crucial. The CNN extracts robust spatial abstractions, the BiLSTM enhances temporal context awareness, and the GRU improves learning efficiency and stability. This supports the theoretical expectation that hybrid architectures outperform isolated models when handling complex multivariate time-series data.
Finally, our proposed CNN-BiLSTM-GRU model achieved the highest accuracy of 99.50%, demonstrating that the combination of CNN's spatial feature extraction, BiLSTM's bidirectional temporal modeling, and GRU's efficient sequence learning significantly enhances overall recognition performance for human activity monitoring (Figure 8).


5.7 Comparison with other models

While recent hybrid models, such as BiLSTM–GRU, have achieved strong performance (98.67%), the proposed model outperforms all previously reported methods (Table 3). This improvement is attributed to the joint exploitation of spatial, temporal, and bidirectional feature representations, the implementation of a robust preprocessing and data augmentation strategy, and the use of an optimized architectural design and training configuration. Overall, these findings suggest that the proposed framework represents a significant advancement over existing HAR architectures for wearable sensor-based applications.


Figure 8. Performance comparison of different tested models
Figure 8. Performance comparison of different tested models.

Table 3. Performance comparison on PAMAP2 dataset.


Compared to existing literature, the improvement achieved in this study is substantial rather than marginal. Many recent state-of-the-art approaches fall short of 99% accuracy due to challenges such as subject variability, sensor noise, and dataset complexity. The proposed model addresses these challenges through a combination of architectural integration, rigorous preprocessing, and optimized hyper-parameters. This indicates that the framework contributes not only to improved performance but also to a methodological advancement in designing hybrid HAR systems for healthcare-oriented applications.


6. Limitations

In practical deployment scenarios, several limitations must be considered for the proposed patient-monitoring HAR model. Real-time performance remains a challenge, as high-complexity deep learning models require significant computational resources, which may limit their deployment on low-power wearable or edge devices. Additionally, sensor noise from placement inconsistencies, device drift, or motion artifacts can undermine model reliability in real-world conditions. Variability among subjects—such as differences in body structure, movement style, and activity patterns—can also create performance gaps when the model is applied to individuals not represented in the training data. This raises concerns about the model's generalization ability, particularly when encountering unseen patients or activities outside the PAMAP2 dataset. Addressing these issues is essential for translating high experimental accuracy into reliable real-time patient monitoring systems. Moreover, high window overlap may lead to temporal redundancy, inflating accuracy.


7. Conclusions

This paper presents a hybrid CNN-BiLSTM-GRU model for Human Activity Recognition (HAR) using the PAMAP2 dataset, achieving a state-of-the-art accuracy of 99.50%. The model utilizes CNNs for spatial feature extraction, BiLSTM for bidirectional temporal modeling, and GRUs for efficient sequence processing. It outperforms baseline models, including Decision Trees (71.20%), CNN (85.60%), LSTM (87.40%), CNN-LSTM (89.80%), BiLSTM (90.20%), and GRU (88.50%). The structured experimental setup, which includes preprocessing, 5-fold cross-validation, and detailed performance metrics (fold-by-fold, class-wise, ROC), ensures reproducibility and robustness. The model's high accuracy and stability make it a promising candidate for patient monitoring systems, enabling precise activity tracking for health assessment and intervention. Future research will focus on optimizing the model for low-resource devices, validating its performance on diverse datasets, and exploring transfer learning to enhance generalizability. This will address current limitations in computational complexity and dataset-specific optimization.


Acknowledgements

We sincerely thank the Information and Communication Technology Division of the Ministry of Posts, Telecommunications, and Information Technology, People's Republic of Bangladesh, for their invaluable support and funding of our ICT fellowship. We also extend our gratitude to our supervisor and co-authors for their guidance and contributions to this research.

Funding information

This research was supported by the University of Rajshahi under Grant Number 56.00.0000.052.33.005.21-7 (Tracking No: 22FS15306).

Ethical approval statement

Not applicable.

Data availability

The data generated from this study might be shared with a valid request from the corresponding author.

Informed consent statement

Not applicable.

Conflict of interest

The authors declare no conflict of interest.

Authors’ contribution

Conceptualization: Subrata Kumer Paul and Md. Ekramul Hamid; Methodology and data collection: Subrata Kumer Paul, Rakhi Rani Paul, and Dewan Nafiul Islam Noor; Data analysis and validation: Subrata Kumer Paul and Mirza A. F. M. Rashidul Hasan; Visualization and figure preparation: Dewan Nafiul Islam Noor; Original draft preparation: Subrata Kumer Paul; Manuscript review and editing: Md. Ekramul Hamid and Mirza A. F. M. Rashidul Hasan. All authors critically reviewed the manuscript and agreed to submit the final version of the manuscript.

References

Bhattacharya D, Sharma D, Kim W, Ijaz MF and Singh PK, 2022. Ensem-HAR: An ensemble deep learning model for smartphone sensor-based human activity recognition for measurement of elderly health monitoring. Biosensors, 12(6): 393. https://doi.org/10.3390/bios12060393

Dua N, Singh SN and Semwal VB, 2021. Multi-input CNN-GRU based human activity recognition using wearable sensors. Computing, 103(7): 1461–1478. https://doi.org/10.1007/s00607-021-00928-8

Islam MM, Nooruddin S, Karray F and Muhammad G, 2022. Human activity recognition using tools of convolutional neural networks: A state-of-the-art review, datasets, challenges and future prospects. Computers in Biology and Medicine, 149: 106060. https://doi.org/10.1016/j.compbiomed.2022.106060

Jameer S and Syed H, 2023. A DCNN-LSTM based human activity recognition by mobile and wearable sensor networks. Alexandria Engineering Journal, 80: 542–552. https://doi.org/10.1016/j.aej.2023.09.013

Lalwani P and Ramasamy G, 2024. Human activity recognition using a multi-branched CNN-BiLSTM-BiGRU model. Applied Soft Computing, 154: 111344. https://doi.org/10.1016/j.asoc.2024.111344

Liu S, Wang J and Zhang W, 2021. Federated personalized random forest for human activity recognition. Mathematical Biosciences and Engineering, 19: 953–971. https://doi.org/10.3934/mbe.2022044

Mishra A, Sharma S, Kumar S, Ranjan P and Ujlayan A, 2021. Effect of hand grip actions on object recognition process: A machine learning-based approach for improved motor rehabilitation. Neural Computing and Applications, 33(7): 2339–2350. https://doi.org/10.1007/s00521-020-05125-w

Moya Rueda F, Grzeszick R, Fink GA, Feldhorst S and Ten Hompel M, 2018. Convolutional neural networks for human activity recognition using body-worn sensors. Informatics, 5(2): 26. https://doi.org/10.3390/informatics5020026

Nayak S, Panigrahi C, Rani Pati B, Nanda S and Hsieh M-Y, 2022. Comparative analysis of HAR datasets using classification algorithms. Computer Science and Information Systems, 19: 47–63. https://doi.org/10.2298/csis201221043n

Nweke HF, Teh YW, Al-Garadi MA and Alo UR, 2018. Deep learning algorithms for human activity recognition using mobile and wearable sensor networks: State of the art and research challenges. Expert Systems with Applications, 105: 233–261. https://doi.org/10.1016/j.eswa.2018.03.056

Paul RR, Paul SK and Hamid ME, 2022. A 2D convolution neural network based method for human emotion classification from speech signal. Proceedings of the 2022 25th International Conference on Computer and Information Technology (ICCIT): 72–77. https://doi.org/10.1109/ICCIT57492.2022.10054811

Paul SK, Miah ASM, Rahman MT, Hossain MM, Hossain MM, Rahim MA, Hamid MEH, Islam MS and Shin J, 2025. IoT-based real-time medical-related human activity recognition using skeletons and multi-stage deep learning for healthcare. Computers, Materials and Continua, 84(2): 2513–2530. https://doi.org/10.32604/cmc.2025.063563

Samoon S, Laghari G, Malkani YA and Ali Shah SA, 2025. HAR-AttenNet: Multi-head transformer for precise human activity recognition using wearable devices. VAWKUM Transactions on Computer Sciences, 13(2): 36–49. https://doi.org/10.21015/vtcs.v13i2.2179

Sinha P, Sahu D, Prakash S, Yang T, Rathore RS and Pandey VK, 2025. A high performance hybrid LSTM CNN secure architecture for IoT environments using deep learning. Scientific Reports, 15: 9684. https://doi.org/10.1038/s41598-025-94500-5

Sultana S, Rahman T, Khatun H, Sultana N, Islam MR and Ahmed N, 2024. Bayesian and genetic optimization for human activity recognition with CNN and LSTM. Proceedings of the 2024 International Conference on Intelligent and Innovative Practices in Engineering and Management (IIPEM): 1–6. IEEE. https://doi.org/10.1109/IIPEM62726.2024.10925732

Sun Z, Ke Q, Rahmani H, Bennamoun M, Wang G and Liu J, 2023. Human action recognition from various data modalities: A review. IEEE Transactions on Pattern Analysis and Machine Intelligence. 45(3): 3200-3225. https://doi.org/10.1109/TPAMI.2022.3183112

Thakur D, Biswas S, Ho ES and Chattopadhyay S, 2022. ConVAE-LSTM: Convolutional autoencoder long short-term memory network for smartphone-based human activity recognition. IEEE Access, 10: 4137–4156. https://doi.org/10.1109/ACCESS.2022.3140373

Walse KH, Dharaskar RV and Thakare VM, 2016. A study of human activity recognition using Adaboost classifiers on WISDM dataset. Institute for Integrative Omics and Applied Biotechnology Journal, 7(2): 68–76. https://doi.org/10.1063/5.0158972

Zhongkai Z, Kobayashi S, Kondo K, Hasegawa T and Koshino M, 2022. A comparative study: Toward an effective convolutional neural network architecture for sensor-based human activity recognition. IEEE Access, 10: 20547–20558. https://doi.org/10.1109/ACCESS.2022.3152530

How to cite

Paul SK, Paul RR, Noor DNI, Hamid ME and Hasan MAFMR 2025. Hybrid CNN–BiLSTM–GRU architecture for PAMAP2-based human activity recognition in patient monitoring. Computer Science and Engineering Research, 3(1): 4-10. https://doi.org/10.69517/cser.2026.03.01.0002

CrossMark Update
CROSSMARK Color horizontal
Article Metrics
[stm-calc id="1576"]