| International Journal of Computer Applications |
| Foundation of Computer Science (FCS), NY, USA |
| Volume 187 - Number 54 |
| Year of Publication: 2025 |
| Authors: M. Karthik, M. Vijayakumar, P. Mohanraj, P. Thenmozhi |
10.5120/ijca2025925917
|
M. Karthik, M. Vijayakumar, P. Mohanraj, P. Thenmozhi . Machine Learning Driven Anomaly Detection in Wireless Sensor Networks under Varying Traffic Patterns. International Journal of Computer Applications. 187, 54 ( Nov 2025), 22-29. DOI=10.5120/ijca2025925917
Wireless Sensor Networks (WSNs) are a critical technology for applications ranging from environmental monitoring to industrial automation and smart city infrastructure. However, the reliability of these systems is frequently compromised by anomalies, which can arise from hardware malfunctions, deliberate cyber-attacks, or sudden environmental shifts. These irregularities corrupt the collected data, leading to flawed analytics and unsound decision-making. To address this challenge, we propose a novel, hierarchical machine learning framework designed for robust and efficient anomaly detection that adapts to diverse network traffic conditions. Our hybrid architecture operates across three distinct tiers to balance detection performance with resource constraints. At the sensor node level, we employ lightweight algorithms for initial feature extraction. This minimizes the computational and energy burden on individual, resource-limited nodes. The extracted features are then sent to the network edge, where a more powerful Long Short-Term Memory (LSTM) model is deployed. This model is trained to identify complex temporal patterns indicative of faults or attacks. To enhance data privacy and reduce communication overhead, the LSTM is trained using a federated learning approach; instead of raw data, only model updates are periodically aggregated from multiple edge devices. Finally, at the cloud tier, an ensemble classifier integrates outputs from various edge-level LSTM models. This global perspective enables the system to perform a comprehensive analysis and make a final anomaly classification, improving overall accuracy and resilience against localized disruptions. In this research evaluated our framework using a mixed dataset combining real-world WSN traces with synthetically generated workload variations. The results demonstrate the system's effectiveness, achieving a high detection accuracy exceeding 94% across different traffic regimes while maintaining a low false positive rate. The analysis also confirms moderate energy consumption and acceptable latency, making it suitable for practical, long-term deployments. The federated learning component further provides a significant privacy benefit by keeping raw sensor data localized.