Work

Bayesian CNN-transformer hybrid architecture for uncertainty-aware intermittent fault detection in WSNs

Year: 2026
Type: article
Abstract: 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.
Language: English
Open Access status: gold
Estimated APC paid: $2,353
OpenAlex ID: W7226012215
FWCI:
Cites: 29
Cited by:
Related to: 10