Abstract
Wireless Sensor Networks (WSNs) have a decisive share in various monitoring and control systems. However, their distributed and resource-constrained nature makes them vulnerable to anomalies caused by factors such as environmental noise, sensor faults, and cyber intrusions. In this paper, HEXADWSN, a hybrid ensemble learning-based explainable anomaly detection framework for anomaly detection to improve reliability and interpretability in WSNs, has been proposed. The proposed framework integrates an ensemble learning approach using Autoencoders, Isolation Forests, and One-Class SVMs to achieve robust detection of time-series-based irregularities in the Intel Lab dataset. The framework uses stack and vote ensemble learning. The stack ensemble achieved the highest overall performance, indicating strong effectiveness in detecting varied anomaly patterns. The voting ensemble demonstrated moderate results and offered a balance between detection rate and computation, whereas LSTM, which is efficient at capturing temporal dependencies, exhibited a relatively low performance in the processed dataset. SHAP, LIME, and Permutation Feature Importance techniques are employed for model explainability. These techniques offer insights into feature relevance and anomalies at global and local levels. The framework also measures the mean energy consumption for anomalous and normal data. The interpretability results identified that temperature, humidity, and voltage are the most influential features. HEXADWSN establishes a scalable and explainable foundation for anomaly detection in WSNs, striking a balance between accuracy, interpretability, and energy management insights.