Bayesian CNN-transformer hybrid architecture for uncertainty-aware intermittent fault detection in WSNs
Intermittent faults in wireless sensor networks (WSNs) remain a major obstacle to system stability, since they occur rarely, evolve nonlinearly, and depend on changing network conditions, making timely detection difficult. Existing fault-detection approaches are largely deterministic, relying on conventional deep learning models such as CNNs and LSTMs or on rule-based systems, and fail in the joint modeling of inter-feature relations and have no method of calculating the uncertainty in prediction. The purpose of this research work is to develop an architecture for uncertainty-aware fault detection, which determines the presence of a fault in a certain sensor reading, instead of predicting the fault in WSNs, using a combination of a Bayesian CNN and a Transformer model. The proposed model uses a residual convolutional network for feature extraction followed by a Transformer encoder modeling the relations between the five input features (Reading, Mote ID, Humidity, Temperature, Is_Singlehop). Monte Carlo dropout performs approximate Bayesian inference, letting the model estimate its own epistemic uncertainty at prediction time and support confidence-based, selective decision-making rather than purely deterministic classification. On the test set, predictions in the most confident decile (12.8% of samples, entropy-based confidence above 0.9) reach 99.84% accuracy, while overall calibration is reasonable (ECE = 0.067; 95% CI: 0.060–0.073; 10 fixed bins). At full, 100% coverage, the model’s accuracy is comparable to, and on metrics such as precision and false alarm rate somewhat below, the strongest deterministic baseline. Its principal advantage lies in uncertainty-driven selective prediction: restricting output to the 79–80% most confident predictions raises accuracy to 84.00–84.29% and substantially lowers the false alarm rate, at the cost of a larger parameter count (approximately 2.19 M versus 83 K–105 K for the baselines). Under untargeted FGSM adversarial perturbation on a synthetic dataset of spike and random-noise intermittent faults, the proposed architecture also shows the smallest accuracy degradation among all models compared. Together, these results indicate that the Bayesian CNN-Transformer hybrid improves predictive reliability, interpretability, and robustness, though confirming this robustness on naturally occurring faults will require field or structural-health-monitoring deployment testing, left for future work.
Authors
- P. Iswarya (ORCID: https://orcid.org/0009-0006-3198-2459)
- K. Manikandan (ORCID: https://orcid.org/0000-0002-7383-3869)
Institutions
- Vellore Institute of Technology University (IN)
Publication Details
- Journal
- Frontiers in Artificial Intelligence
- Published
- 2026-11-13
- DOI
- https://doi.org/10.3389/frai.2026.1951754
- Primary Topic
- Energy Efficient Wireless Sensor Networks
- Type
- article
- Field-Weighted Citation Impact
- 0.00