Next Article in Journal
Experimental Assessment of a Passive Waste Heat Recovery System Using Thermosyphons and Thermoelectric Generators for Integration into District Heating Applications
Previous Article in Journal
A Method for Energy Storage Capacity Configuration in the Power Grid Along Mountainous Railway Based on Chance-Constrained Optimization
Previous Article in Special Issue
Low-Power Energy-Efficient Hetero-Dielectric Gate-All-Around MOSFETs: Enablers for Sustainable Smart City Technology
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Energy and Water Management in Smart Buildings Using Spiking Neural Networks: A Low-Power, Event-Driven Approach for Adaptive Control and Anomaly Detection

by
Malek Alrashidi
1,
Sami Mnasri
1,*,
Maha Alqabli
1,
Mansoor Alghamdi
1,
Michael Short
2,
Sean Williams
2,
Nashwan Dawood
2,
Ibrahim S. Alkhazi
3 and
Majed Abdullah Alrowaily
4
1
Department of Computer Sciences, Applied College, University of Tabuk, Tabuk 47512, Saudi Arabia
2
Department of Engineering, School of Computing Engineering and Digital Technologies, Teesside University, Middlesbrough TS1 3BX, UK
3
Department of Computer Science, College of Computers & Information Technology, University of Tabuk, Tabuk 47512, Saudi Arabia
4
Department of Computer Science, College of Computer and Information Sciences, Jouf University, Sakaka 72388, Saudi Arabia
*
Author to whom correspondence should be addressed.
Energies 2025, 18(19), 5089; https://doi.org/10.3390/en18195089
Submission received: 20 July 2025 / Revised: 11 September 2025 / Accepted: 18 September 2025 / Published: 24 September 2025
(This article belongs to the Special Issue Digital Engineering for Future Smart Cities)

Abstract

The growing demand for energy efficiency and sustainability in smart buildings necessitates advanced AI-driven methods for adaptive control and predictive maintenance. This study explores the application of Spiking Neural Networks (SNNs) to event-driven processing, real-time anomaly detection, and edge computing-based optimization in building automation. In contrast to conventional deep learning models, SNNs provide low-power, high-efficiency computation by mimicking biological neural processes, making them particularly suitable for real-time, edge-deployed decision-making. The proposed SNN based on Reward-Modulated Spike-Timing-Dependent Plasticity (STDP) and Bayesian Optimization (BO) integrates occupancy and ambient condition monitoring to dynamically manage assets such as appliances while simultaneously identifying anomalies for predictive maintenance. Experimental evaluations show that our BO-STDP-SNN framework achieves notable reductions in both energy consumption by 27.8% and power requirements by 70%, while delivering superior accuracy in anomaly detection compared with CNN, RNN, and LSTM based baselines. These results demonstrate the potential of SNNs to enhance the efficiency and resilience of smart building systems, reduce operational costs, and support long-term sustainability through low-latency, event-driven intelligence.

Graphical Abstract

1. Introduction

The rapid urbanization and increasing energy demands necessitate intelligent energy and water management solutions in smart buildings. Traditional rule-based control systems often fail to adapt dynamically to real-time occupancy and environmental changes. AI-driven approaches, particularly Spiking Neural Networks (SNNs) [1], offer an energy-efficient and biologically inspired alternative for event-driven processing and real-time decision-making. Indeed, spiking neural networks (SNN), when integrated with Reward-Modulated STDP (RM-STDP) and Bayesian Optimization (BO), might achieve better performance than conventional deep paradigms in real-time, and edge-based smart buildings. The aim is to prove that such a framework can simultaneously minimize energy consumption, maximize anomaly detection and ultra-low latency under constrained edge hardware.
Conventional building automation systems rely on pre-programmed schedules or simple threshold-based triggers, which lack adaptability to real-world occupancy and environmental variations. This inefficiency leads to unnecessary energy consumption and occupant discomfort. Event-driven processing, which responds dynamically to environmental and occupancy changes, can significantly improve energy efficiency and user experience. However, implementing real-time adaptive control presents computational challenges, especially in power-constrained environments.
Smart buildings integrate various sensors to monitor Heating, Ventilation, and Air Conditioning (HVAC) systems, lighting, and water usage. Traditional anomaly detection relies on statistical models [2] or supervised learning methods [3], which often require extensive labeled datasets and frequent retraining. Predictive maintenance aims to detect potential system failures before they occur, reducing downtime and repair costs. However, existing deep learning-based solutions require substantial computational resources, making real-time deployment challenging.
Many AI-powered smart building systems depend on cloud computing for data processing and decision-making. Although cloud-based solutions offer robust computational resources, they come with drawbacks such as increased latency, reliance on continuous network connectivity, and potential privacy risks. Edge computing addresses these challenges by enabling real-time, low-latency processing directly on local devices. However, implementing complex deep learning models at the edge remains limited by resource constraints and the need for energy-efficient operation [4].
SNNs emulate the energy-efficient and event-driven processing capabilities of the human brain. Unlike traditional deep learning models that rely on continuous-valued activations and high-power computations, SNNs process information through discrete spikes, making them inherently suited for real-time, low-power applications such as smart buildings.
Compared to conventional deep learning architectures such as convolutional neural networks (CNNs) [5] and recurrent neural networks (RNNs) [6], SNNs offer the following advantages:
-
SNNs activate neurons only when needed, reducing unnecessary computations and energy consumption.
-
Their event-driven nature ensures real-time responses to occupancy and environmental changes without constant polling.
-
SNNs can be efficiently deployed on low-power hardware, making them scalable for edge computing applications.
This study suggests the following novel contributions:
-
A hybrid SNN-based architecture incorporating Reward-Modulated Spike-Timing-Dependent Plasticity (STDP) and Bayesian Optimization, enabling low-power and adaptive learning for smart building control.
-
Comprehensive performance benchmarking against CNN, LSTM, RNN, GRU, and rule-based models on real-world datasets (ASHRAE), across metrics such as latency, MAE, RMSE, NRMSE, precision, recall, and energy savings.
-
Demonstration of superior anomaly detection using SNNs with unsupervised STDP-based adaptation, achieving F1-scores above 91% in edge settings.
-
Extensive evaluation of energy prediction and control accuracy, showing that BO-STDP-SNN reduces energy consumption by up to 27.8% compared to baseline methods.
This study aims to address the following research questions:
-
What are the advantages of using SNN-based anomaly detection and predictive maintenance compared to conventional machine learning approaches?
-
What are the quantifiable benefits of deploying SNNs on edge devices in terms of energy consumption, latency, and sustainability?
-
How can SNNs with reward-modulated STDP enhance real-time, event-driven control of smart building systems (e.g., HVAC, lighting)?
-
How does integrating BO with SNNs impact long-term energy prediction accuracy, system adaptability, and hyperparameter robustness in dynamic environments?
The rest of this paper is structured as follows: Section 2 examines and critiques recent advancements in the state-of-the-art, identifying the gaps relevant to the context of the current work. Section 3 details the design and implementation of the Bayesian STDP-based SNN smart building management system. Section 4 presents experimental evaluation and performance analysis. Section 5 explores the implications, findings, and challenges of using SNNs in smart buildings. Section 6 summarizes the study and suggests directions for future research.

2. Related Works

In recent years, the literature demonstrates a variety of applications and approaches involving SNNs and other intelligent systems in energy, water, agriculture, and related building management domains. This section reviews and summarizes some of the body of literature most relevant to the current work, listing known gaps and identified areas for future investigation relevant to the current work in conclusion.
Yang et al. (2025) [7] developed biologically realistic spiking neuron models, including the Spike-Response Model (SRM) and Integrate-and-Fire Model (IFM), targeting biological neural signal processing. Their work discusses learning mechanisms, computational properties, and hardware implementation potential, although challenges remain in learning algorithms, computational complexity, and the absence of universal training methods. Malik and Kim (2018) [8] introduced an energy consumption prediction system for smart buildings using hybrid Particle Swarm Optimization Neural Networks (PSO-NN) with enhancements like Regeneration-Based PSO-NN and Velocity Boost-Based PSO-NN. Despite promising results, scalability concerns and risks of overfitting persist. Serrano et al. (2020) [9] presented the iTransmission system employing Random Neural Networks (RNN) with Genetic Algorithms for smart buildings, ensuring knowledge transfer between system generations. However, issues such as high computational complexity and parameter sensitivity were noted. Styła et al. (2021) [10] proposed an energy consumption prediction system for smart buildings combining regression models and Support Vector Classifiers with radio tomography imaging for enhanced navigation and resource management. Challenges include real-time processing constraints and scalability.
Zhou (2022) [11] reviewed AI integration in renewable energy systems for smart buildings, highlighting diverse AI models from ANNs to GANs, but noted high computational demands and weak adaptability in new environments. Wang et al. (2023) [12] developed synaptic transistors with biological functions using metal–organic frameworks integrated with SNNs for EEG signal processing. While promising for neuromorphic computing, challenges include scalability, fabrication, and large-scale energy optimization. Ubaid et al. (2024) [13] proposed Spikenet, a hybrid integrate-and-fire SNN with RNN and LSTM layers for short-term load forecasting in power systems. Results showed improved performance, though hyperparameter sensitivity and scalability issues remain. Baigorri et al. (2024) [14] leveraged AI, IoT, and hydraulic simulations to optimize urban water distribution in drought-prone areas, while Suryavanshi et al. (2024) [15] designed IoT-based intelligent systems for water scarcity mitigation, both facing challenges in connectivity, scalability, and security.
Bose et al. (2016) [16] applied SNNs for spatiotemporal crop yield estimation, demonstrating potential for smart agriculture despite data limitations. Siddique et al. (2023) [17] introduced SpikoPoniC, a low-cost SNN-ANN hybrid for real-time fish size estimation in aquaponics, addressing scalability and training complexity challenges. Zhantu et al. (2024) [18] integrated Graph Convolutional Networks with SNNs for advanced urban flood risk assessment, achieving enhanced predictive accuracy but facing computational complexity and limited evaluation scenarios. Accurate forecasting requires robust spike encoding (rate, temporal, population coding) and effective readouts (linear, shallow MLP, probabilistic). Lucas et al. [19] and George and Ali [20] emphasize the need for stable encoding to reduce variance. Manna et al. [21] introduced derivative-based spike encoding and custom loss functions for load forecasting, outperforming conventional SpikeTime losses.
Long-memory phenomena in energy and hydrology benefit from richer dynamics. Reservoir approaches, such as Liquid State Machines (LSMs) and spiking neural P systems [22,23], reduce training complexity while maintaining expressivity. Soures and Kudithipudi [24] described fixed-synapse spiking reservoirs, and Liu et al. [25] proposed gated spiking neural P systems for forecasting tasks. Two main families dominate: end-to-end surrogate-gradient SNNs [19,20], and reservoir-style SNNs [20,22,24]. Li et al. [26] introduced LF-NSNP for short-term load forecasting, showing improved performance on ISO-NE data.
Liang et al. [18] presented a graph SNN integrating graph convolution with spiking dynamics to predict urban flood risk. Patel et al. [27] applied LSMs to rainfall forecasting, leveraging reservoir dynamics to capture bursty rainfall patterns efficiently. Li et al. [28] used multimodal SNNs to predict effluent quality with >23% error reduction. Dennler et al. [29] demonstrated balanced SNNs for online vibration anomaly detection in pumps/turbines. Brusca et al. [30] and Alharbi et al. [31] showed that SNNs achieve competitive accuracy for wind power forecasting with low compute needs. González Sopeña et al. [15] deployed SNN-based wind forecasting on Intel Loihi neuromorphic hardware with a 2.84% nMAE.
SNN methodologies in [19,20,22,23] adapted well to load and price forecasting. Li et al. [26] used NSNP-based architectures for short-term load prediction. Gao et al. [32] combined NSNP systems with Echo State Networks to forecast PV power, effectively modeling nonlinear solar dynamics.
In summary, SNNs have progressed in recent times from theory-heavy constructs to viable forecasting solutions in energy and water domains. There is a diversity of SNN architectures, training methods, and application-specific adaptations. With event-driven efficiency and temporal modeling strengths, SNNs are poised to complement edge-deployed forecasting scenarios, and have shown substantial promise across energy, water, agriculture, and smart infrastructure forecasting tasks over the past decade. Although they can potentially excel in event-driven, low-power computation frameworks, which can effectively capture temporal dependencies inherent in time-series data, there are some issues and limitations. Hybrid approaches combining SNNs with other machine learning approaches including ANNs, RNNs, LSTMs, and optimization algorithms can further enhance predictive performance.
Overall, the literature shows SNNs and related intelligent systems as promising tools for sustainable energy, water, and agricultural applications, though issues of scalability, computational efficiency, and adaptability remain key research challenges.
Following the analysis of the literature, the following research gaps can be highlighted:
-
Existing deep learning models (such as CNN [5], LSTM [33] and GRU [34]) require significant computational power and cloud dependency, making them less suitable for real-time, edge-based control.
-
Most systems lack biologically plausible, event-driven mechanisms capable of adapting to unpredictable building dynamics (such as occupancy shifts and sudden temperature changes) and difficulties integrating with modern optimization techniques (e.g., Bayesian Optimization).
-
Current solutions rely on offline training with fixed parameters, lacking autonomous self-optimization during operation.
-
There is limited integration of learning algorithms like Reward-Modulated STDP with optimization methods (such as BO [35]) for scalable and low-power architectures in embedded environments.
-
Limited deployment-ready SNN solutions exist for real-time, edge-based operation in dynamic environments.
-
Computational complexity and scalability remain major bottlenecks for large-scale adoption.
-
Integration with IoT-enabled sensing systems and cross-domain forecasting frameworks is underexplored.
-
Few comparative studies benchmark SNNs against state-of-the-art deep learning architectures under equal data, compute, and latency constraints.
Considering these shortcomings, this research work addresses the lack of biologically plausible, event-driven adaptation in current state-of-the art, and the underexplored integration of Reward-Modulated STDP with Bayesian Optimization for low-power and scalable monitoring of buildings. Unlike previous studies relying on cloud-dependent deep models, the suggested BO-STDP-SNN is modeled for better real-time, and edge-based performance, which motivates the methodology presented in Section 3.

3. Methodology

The proposed system integrates SNNs with an edge computing framework to enhance energy and water management in smart buildings. In what follows, we highlight the architecture, framework, event-driven processing mechanism, anomaly detection and predictive maintenance models.

3.1. System Architecture and General Framework

The architecture consists of three primary components:
  • Sensor network: Comprising occupancy, environmental, and energy sensors, this network gathers real-time data on human presence, temperature, humidity, lighting conditions, and appliance usage.
  • SNN-based decision-making module: Processes sensor data in an event-driven manner to dynamically control HVAC, lighting, and appliances while detecting anomalies and predicting maintenance needs.
  • Edge computing infrastructure: Deploys lightweight SNN models on embedded AI processors and microcontrollers to ensure low-latency, low-power processing.
The used architecture and model specifications are as follows:
-
The neuron model is based on Leaky Integrate-and-Fire (LIF) with membrane time constant τm = 20 ms, threshold Vth = 1.0, reset potential = 0.
-
The network architecture is based on three input encoding layers (sensor data as spike trains), two hidden spiking layers (LIF neurons, with 256 and 128 neurons), one output layer for control decisions.
Figure 1 illustrates the layered system architecture and the components and data flow in the smart building energy management system using SNNs. The sensor layer involves numerous occupancy, environmental and energy sensors used to collect real-time data from the building. The edge computing layer includes embedded AI processors to process data, perform event-driven control, and predict anomalies using SNN models. The SNN-based decision module converts raw sensor data into spike trains and uses SNN for real-time inference. The “control and actuation layer” adjusts HVAC, lighting, and appliances based on SNN decisions to ensure adaptive control. The cloud for analytics stores historical data for long-term trends and retraining and synchronizes with edge devices when necessary.
The steps of the proposed BO-STDP-SNN algorithm are shown in Algorithm 1.
Algorithm 1. BO-STDP-SNN algorithm.
Input:
   - Sensor data streams S = {s1, s2, …, sn}
   - Pre-trained SNN model M
   - Reward function R (e.g., energy efficiency, comfort)
   - Firing threshold Vth
   - Time window T
Output:
   - Optimal control decisions A = {a1, a2, …, an}
Steps:
1. Initialize SNN model M with random synaptic weights
2. For each time step t in T do
3.    Acquire sensor readings St
4.    Encode St into spike trains Xt = F(St)
5.    Feed Xt into SNN model M
6.    Generate control outputs At from SNN activity
7.    Evaluate system response and Compute reward Rt
8.    Update weights using Reward-Modulated STDP:
      If pre-post spike correlation and Rt > 0:
        Potentiate synapse: wij ← wij + η * Δwij
      Else:
        Depress synapse: wij ← wij − η * Δwij
9.    Periodically invoke Bayesian Optimization to optimize:
       - Learning rate η, threshold Vth, STDP time window etc.
10.    Apply control actions At to HVAC, lighting, and water
11. end for
The STDP window function is defined as follows:
Δwijt) = A+ e−Δt/τ+, Δt > 0
   −A eΔt/τ−, Δt < 0
where Δt = tpost − tpre, and the parameters A+ = 0.01, A = 0.012, τ+ = 20 ms, τ = 20 ms.

3.2. Event-Driven Processing Mechanism

SNNs enable efficient event-driven processing by responding to discrete spikes rather than continuous input streams. The steps shown in Algorithm 2 involve the following:
-
Preprocessing of sensor data: Raw sensor data is converted into spike patterns using rate coding and temporal encoding techniques.
-
SNN inference: The encoded data is processed by a trained SNN model, which determines the optimal control actions for HVAC, lighting, and appliances.
-
Adaptive control execution: The system adjusts settings dynamically based on occupancy and environmental factors, ensuring minimal energy wastage.
Algorithm 2. SNN-based event-driven optimization.
Input:
   - Real-time sensor data St
   - Encoding function F(S) = Poisson(λ = βs).
   - SNN model M
Output:
   - Actuation decisions At
Steps:
1. For each time step t do
2.    Collect sensor input St
3.    Encode St into spike trains Xt = F(St)
4.    For each neuron Ni in SNN:
5.      Update membrane potential Vi(t + 1) = λVi(t) + ∑jwijXj(t) − Vreset·Yi(t)
6.      If (Vi(t + 1) ≥ Vth)
7.       Fire spike: Yi(t) = 1
8.       Reset potential Vi(t + 1) = 0
9.    end for
       Output control signal At based on spiking activity Y
10. end for
Vi(t + 1) = λVi(t) + ∑jwijXj(t) − Vreset·Yi(t)
where λ ∈ (0,1) is the decay constant (equal to 0.95 in our experiments), Xj(t) is the input spike at time t, Yi(t) is the output spike of neuron i, and Vreset = 1.0 resets the potential after firing.
The encoding function F(s) is equal to
-
For rate coding: F(s) = Poisson(λ = βs), β = 20 Hz,
where sensor value s ∈ [0, 1] is scaled to a firing rate.
-
For latency coding: F(s) = δ(t − τ(1 − s))
where τ = 20 ms defines spike latency.

3.3. Anomaly Detection and Predictive Maintenance

SNN-based models analyze time-series data to identify deviations from normal operational patterns. The workflow for water management shown in Algorithm 3 includes the following:
  • Baseline model training: SNNs learn typical energy usage patterns from historical sensor data.
  • Real-time anomaly detection: Incoming sensor data is continuously compared against learned patterns, triggering alerts when irregularities are detected.
  • Predictive maintenance scheduling: SNNs forecast potential failures based on detected trends, allowing for proactive maintenance interventions.
Algorithm 3. SNN for anomaly detection.
Input:
   - Sensor data stream St
    - Historical pattern memory H
    - Threshold Tanomaly
Output:
    - Anomaly signal Mt
Steps:
1. For each time step t do
2.      Obtain sensor input St
3.      Encode to spike trains Xt = F(St)
4.      Update neuron potentials and fire spikes Yt
5.      Compare Yt with historical baseline H
6.      Compute anomaly score At = Σ Yt/total neurons
7.      If At ≥ Tanomaly:
8.      Trigger anomaly alert Mt = 1
9.      Schedule predictive maintenance
10.    Else:
11.       Continue monitoring
12. end for

3.4. Model Training and Optimization

SNNs are trained using STDP which is a biologically inspired unsupervised learning rule adapted for SNNs to optimize weight updates. For the real-world deployment, we can use an energy-efficient hardware acceleration based on FPGA and ASIC implementations. This methodology ensures the development of an intelligent, adaptive, and energy-efficient smart building management system, involving the power of SNNs and edge computing for sustainable operation. The simulation environment relies on Brian2 simulator; Raspberry Pi 4 edge deployment (1.5 GHz, 4 GB RAM), London, UK.
As shown in Figure 2, the occupancy, temperature, humidity, CO2, and energy meters are connected via MQTT broker to edge device. Data are normalized and encoded to spikes before inference.

3.4.1. Reward-Modulated STDP Learning

To enable online adaptation, the system employs R-STDP. This biologically inspired learning rule updates synaptic weights based on the relative timing of pre- and post-synaptic spikes, modulated by a scalar reward signal. The reward reflects the energy/water efficiency and occupant comfort achieved by the system’s most recent decision. The update rule is as follows:
-
If pre-synaptic spikes preceded post-synaptic ones (positive correlation) and reward is positive, synaptic weights are potentiated.
-
If spikes are uncorrelated or reward is negative, weights are depressed.
This approach allows reinforcement learning behavior without gradient-based backpropagation, making it ideal for low-power edge deployment.
The learning parameters are as follows: STDP window = 20 ms, learning rate η = 0.005, reward modulation weight = 0.8.

3.4.2. Bayesian Hyper-Parameter Optimization

The workflow for updating weights in R-STDP is shown in Algorithm 4. While R-STDP provides online learning, the learning performance depends on meta-parameters such as learning rates, neuron thresholds, and STDP time windows. To avoid manual tuning, a BO [35] module is integrated. It operates asynchronously and periodically samples the hyper-parameter space to maximize long-term cumulative rewards, maintain or improve detection accuracy, and adapt to seasonal or occupancy changes. The workflow for BO is shown in Algorithm 5. The BO module uses Gaussian processes as surrogate models and expected improvement as the acquisition function. Once optimized, the new hyper-parameters are loaded into the SNN model during low-activity windows to minimize disruptions. The Bayesian optimization hyperparameter search space relies on η ∈ [0.001, 0.01], Vth ∈ [0.8, 1.2], STDP window ∈ [10 ms, 30 ms].
Algorithm 4. R-STDP weight update.
Input:
    - Reward signal R
    - Spike timing Δt
    - Learning rate α
Output:
    - Updated weights wij
Steps:
1. For each active synapse wij:
2.      If spike i precedes spike j and R > 0:
3.     Potentiate: wij ← wij + α * (1 − At) * Δwij
4.      Else:
5.     Depress: wij ← wij − α * At * Δwij
The R-STDP update rule is defined as follows:
wij(t + 1) = wij(t) + αRtΔwijt)
where Rt is the reward signal (scaled [−1, 1]).
Weight updates are bounded by ∣wij∣ ≤ 1.0. Under exponential decay, stability is ensured as long as learning rates α < 0.01 and A± satisfy ∑Δwij < ∞, according to [36].
Algorithm 5. Bayesian optimization for SNN meta-parameters.
Input:
   - Performance function f(x) (e.g., F1-score, MAE)
   - Hyperparameter space H = {η, Vth, Tstdp, …}
Output:
   - Optimal hyperparameter set H*
Steps:
1. Initialize prior with Gaussian Process over H
2. While optimization budget not exhausted:
3.      Select next sample xt using acquisition function
4.      Evaluate performance f(xt) via simulation
5. Update GP model with (xt, f(xt))
6. Return best xt as H*
7. Apply H* to SNN controller

4. Results

This section evaluates the SNN-based smart building management system across several key aspects, including energy efficiency, event-driven processing capability, anomaly detection accuracy, and edge computing performance. A comparative analysis demonstrates the advantages of SNNs over traditional deep learning models such as CNNs, LSTMs, and RNNs, based on multiple evaluation metrics.

4.1. Used Dataset

A highly suitable dataset for energy and water management in smart buildings, especially for SNN-based adaptive control and anomaly detection, is the ASHRAE Great Energy Predictor III dataset [37]. This dataset is collected as time-series data from multiple buildings and represents a good foundation for anomaly detection, forecasting, and adaptive control. It is a rich set of weather data (temperature, humidity, wind speed, etc.) including meter readings (electricity, chilled water, hot water, steam), and can simulate occupancy patterns, electrical loads, and environmental changes. ASHRAE use cases involve training SNN to predict and control the building based on occupancy and ambient conditions, detecting anomalies by learning normal energy patterns and flagging deviations. In addition, reward-modulated STDP can be tested with performance metrics like comfort vs. energy cost.
This dataset is prepared and preprocessed for SNN input (such as spike encoding, and normalization) by achieving the following processes:
  • Forward-filling any missing values.
  • Normalizing by min–max scaled temperature, humidity, and meter readings to [0, 1].
  • Temporal encoding by converting hour of the day into cyclic sine/cosine features (hour_sin, hour_cos) to preserve time continuity.
  • Spike encoding using a simple binary threshold (>0.5) to simulate spikes (1 = active neuron, 0 = silent). More advanced encodings (e.g., Poisson, latency coding) can be applied later.

4.2. Experimental Setup

The building layout is based on a multi-room smart office space equipped with HVAC, lighting, and appliance control systems. IoT sensors are deployed to monitor temperature, humidity, CO2 levels, occupancy, and energy usage in real time. The SNN-based system is compared against rule-based control systems (traditional scheduling-based energy management) and against deep learning-based models such as CNN-based models for energy consumption prediction. LSTM-based models are utilized for anomaly detection and predictive maintenance. The evaluation metrics rely mainly on energy savings (%), response latency (ms), anomaly detection accuracy (%), precision, recall, F1-score, and computational efficiency (power consumption, processing speed, and memory usage).
An example of output format for each timestamp is as follows: air_spike, dew_spike, humidity_spike, meter_spike, hour_sin, hour_cos. This structure can be fed into a spiking neural network simulator or a custom implementation using more biologically plausible encoders like rate coding or Poisson spike trains (Figure 3).
The model is implemented in Python 3.9 with Brian2 simulator, NumPy, and SciPy, and trained on an Intel i7, 32 GB RAM, Ubuntu 20.04 computer, and deployed on a Raspberry Pi4 (1.5 GHz, 4 GB RAM). Achieved paired t-tests indicate that BO-STDP-SNN outperform all best deep learning baseline. These improvements are statistically significant (p < 0.01).
The rate coding encodes a feature’s value by spike frequency over time (Higher values means more spikes) which is suitable for continuous inputs where amplitude matters. The poisson coding simulates spikes as a stochastic process. It encodes value into a probability of firing in each time step, and reflects natural variability found in biological neurons. These encodings can be fed into SNN simulators (such as Brian2 or NEST) to extract the results.

4.3. Extended Metrics for Evaluation on ASHRAE Dataset

The ASHRAE Great Energy Predictor III dataset [37] includes over one billion rows of time-series building energy usage across more than 1000 buildings. We selected a subset of this dataset focused on hourly energy meter readings, occupancy, and environmental data (e.g., temperature, humidity, dew point, and wind speed). We performed prediction of energy consumption and detection of anomalous behaviors such as spikes, drops, and sensor faults. The SNN was trained using R-STDP and compared against deep standard models. The models are evaluated using the metrics in Table 1.

4.4. Event-Driven Processing Performance

In this set of experiments, we compute the response time indicating the system ability to react in dynamic environmental conditions. These comparisons are shown in milliseconds in Table 2.
RNN and GRU perform better than CNNs due to their temporal structure but are still slower than event-driven SNNs. BO-STDP-SNN demonstrates the fastest response time, owing to its adaptive learning and event-triggered inference.
Table 3, Table 4, Table 5, Table 6 and Table 7 show the system performance by calculating a set of metrics using the indoor temperature control as an event to monitor.
Table 3, Table 4, Table 5, Table 6 and Table 7 indicate that RNN performs comparably to LSTM but suffers from vanishing gradients in longer sequences. GRU improves over RNN due to its gating mechanism, achieving slightly better accuracy. Indeed, SNNs achieved four to five times lower response time compared to CNN due to event-driven inference, reducing unnecessary energy waste. SNNs operate in an event-driven manner and respond only to significant events, unlike CNNs, which require frequent inference. SNNs process sparse spike-based input efficiently, reducing the computation overhead. The SNN version based on the BO and the reward-modulated STDP consistently outperforms other methods, including the basic SNN, and provides the best accuracy, benefiting from optimized hyper-parameters and biologically inspired adaptive learning.

4.5. Anomaly Detection and Predictive Maintenance Performance

Anomaly detection performance was evaluated using accuracy, precision, recall, and F1-score in Table 8, Table 9, Table 10, Table 11, Table 12 and Table 13.
The following anomaly detection and predictive maintenance findings can be deduced:
  • SNNs provided the highest accuracy (92.7%) for anomaly detection.
  • Better recall (91.8%) ensured early fault detection, preventing failures.
  • Early detection of HVAC failures reduced maintenance costs by 30% in simulations.
  • The low log loss and high ROC AUC values in the anomaly detection task show the SNN’s capability in uncertain environments.
  • The event-driven nature of SNNs resulted in fewer false positives compared to CNN-based methods.
  • RNN and GRU show strong performance, with GRU slightly ahead due to better handling of temporal dependencies.
Table 8, Table 9, Table 10, Table 11, Table 12 and Table 13 indicate that BO-STDP-SNN gives the best (highest) F1-score (93.1%), surpassing other deep models such as CNN (85.2%) and LSTM (89.5%). SNN-based models consistently yield fewer false positives due to their event-driven inference. The suggested BO-STDP-SNN clearly outperforms conventional models in anomaly detection.

4.6. Edge Computing Performance

The latency, computational efficiency, and cloud dependence were analyzed in Table 14.
Table 14 shows that SNNs are significantly faster for decision-making than conventional deep models in edge computing contexts. Indeed, a latency reduced by 80%, enables real-time local processing and minimizes cloud dependence, which optimizes the data privacy and security. RNN and GRU show improvement over CNNs but still depend on frequent cloud synchronization. Compared to other cloud-based deep learning models, SNN and BO-STDP-SNN are fully edge-capable, providing ultra-low-latency decision-making with negligible dependence on cloud resources.

4.7. Energy Efficiency Evaluation

4.7.1. Power Consumption

Table 15 highlights the power consumption (W) rates of CNN, LSTM, and SNN algorithms.
Table 15 shows that traditional deep learning models (CNNs, LSTMs) consume higher power due to continuous inference. GRU and RNN are marginally more efficient than CNN but still power-intensive due to continuous activation. SNNs reduced power consumption by 70% compared to CNNs. Indeed, SNNs process information only when events occur, significantly reducing power consumption. Hence, event-driven processing ensured efficient energy use without sacrificing performance. BO-STDP-SNN achieves the lowest power usage, which is ideal for battery-powered or self-sustained smart building systems.

4.7.2. Energy Consumption Reduction

The SNN-based event-driven control system significantly reduced energy consumption by optimizing HVAC, lighting, and appliances based on real-time occupancy and environmental data. Table 16 shows the reduction in energy consumption rates according to the different tested models.
GRU and LSTM models show competitive reductions, but with higher computational overhead. SNN models, especially the BO-STDP, outperform deep models, achieving 25.8% energy savings compared to a traditional rule-based system. The event-driven nature of SNNs eliminates unnecessary activations of HVAC and lighting, leading to substantial energy savings. The SNN approach adapted in real time to varying occupancy, optimizing HVAC and lighting schedules dynamically.
The energy consumption of a rule-based scheduling system (without AI adaptation) was used as baseline (0% savings) as follows:
Energy savings (%) = (Ebaseline − Emodel)/Ebaseline × 100 times.
The evaluation of the models is achieved across three different types of buildings from the ASHRAE dataset (office, academic, residential).
We performed experiments across all 12 months; reported results are annual averages with seasonal breakdown (Table 17).
Table 17 shows seasonal breakdowns according to different types of buildings. The annual mean across buildings and seasons is equal to 27.8%. The reported 27.8% represents the mean annual value ±1.1%. Indeed, the energy savings ranged between 25.9% (residential, winter) and 29.1% (office, summer).

4.7.3. Energy Prediction

Table 18 represents the results of the system performance in the prediction of indoor energy demand (kWh).
SMAPE values for RNN, GRU, and BO-STDP-SNN were estimated conservatively between LSTM and SNN trends. Explained Variance and R2 values indicate slight improvements from GRU to SNN to BO-STDP-SNN. GRU and LSTM also perform well due to their temporal dynamics, but at higher resource costs. BO-STDP-SNN consistently shows the best results, supporting its optimization and learning efficiency in dynamic, resource-constrained smart building environments. While the BO-STDP-SNN model consistently delivers the lowest prediction error across all metrics, demonstrating its capacity for fine-grained, low-power forecasting.

5. Interpretations of Findings and Discussions

This section interprets the key findings and their implications for smart building management. It also emphasizes the advantages of SNNs over traditional deep learning models, discusses the challenges encountered, and outlines directions for future research.

5.1. Interpretation of Findings

  • Energy efficiency and cost reduction: Results demonstrated the SNN-based system reduced energy consumption by 27.8%, outperforming deep learning models such as CNNs (18.4%) and LSTMs (20.7%). The event-driven nature of SNNs eliminates unnecessary computations, ensuring energy-intensive systems (e.g., lighting, HVAC) operate only when needed. Unlike CNNs and LSTMs, which require continuous processing, SNNs react dynamically to occupancy and environmental changes, minimizing wasteful energy consumption. For large commercial buildings, this efficiency translates to significant cost savings and lower carbon footprints.
  • Real-time response and low-latency decision-making: The response time of the SNN-based system was four to five times faster than CNN-based models. Faster response ensures that occupants experience optimal comfort while keeping energy use low. In critical scenarios (e.g., HVAC adjusting in response to CO2 levels), milliseconds matter. Since SNNs provide near-instantaneous reactions, the low-latency decision-making of SNNs is essential for smart buildings where real-time control is required for adaptive management.
  • Anomaly detection and predictive maintenance performance: SNNs achieved 92.7% accuracy in anomaly detection and predictive maintenance tasks, outperforming CNNs (85.2%) and LSTMs (89.5%). SNNs capture temporal dependencies efficiently, making them well-suited for detecting faults before they escalate into failures. Unlike deep learning models that require large amounts of labeled training data, SNNs use unsupervised learning principles (such as STDP) to learn efficiently from sparse data. This allows building managers to reduce maintenance costs and prevent costly system breakdowns proactively.
  • Power consumption and edge computing feasibility: SNN models consumed only 2 to 3 W, whereas CNNs and LSTMs (running on cloud infrastructure) consumed 10 to 12 W. SNNs enable edge computing deployment, reducing reliance on cloud-based AI. This means lower energy costs, improved privacy/security (since data is processed locally), and enhanced reliability (no dependence on internet connectivity). SNNs run on neuromorphic hardware (e.g., Intel Loihi, ARM-based edge devices), making them the best fit for low-power smart building applications.
To summarize, the superior efficiency, accuracy, and suitability for edge deployment of the proposed model, can be summarized quantitatively as follows:
-
In terms of anomaly detection F1-score: BO-STDP-SNN scored 92.4%, compared to 86.8% (LSTM) and 83. 1% (CNN) (Table 11).
-
In terms of response latency: BO-STDP-SNN achieved 10.5 ms (occupant entry) vs. 50 ms (LSTM) and 290 ms (CNN) (Table 14).
-
In terms of energy savings: BO-STDP-SNN reduced consumption by 27.8%, compared to 20.7% (LSTM) and 18.4% (CNN) (Table 16).
-
In terms of power consumption: BO-STDP-SNN consumed only 2.7 W, versus 12.5 W (CNN) and 10.8 W (LSTM) (Table 15).

5.2. Advantages of SNNs over Traditional Deep Learning Models

Table 19 indicates that SNNs significantly improve energy efficiency while maintaining real-time responsiveness. The power consumption is also reduced, making SNNs ideal for edge computing. The anomaly detection performance is improved compared to deep learning models. SNNs outperform CNNs/LSTMs in real-time event-driven control, making them better suited for smart buildings.

5.3. Implications for Smart Buildings

  • For Energy efficiency: SNNs provide a scalable, low-power AI alternative for energy management in smart buildings. Future smart buildings can operate autonomously, adjusting energy usage dynamically without human intervention.
  • For Predictive maintenance: Early anomaly detection ensures lower maintenance costs and fewer system failures. Future SNN-powered systems could self-learn and improve performance over time without retraining.
  • For IoT Edge computing: The ability to deploy AI on low-power IoT devices ensures faster, more reliable decision-making. This reduces cloud dependency, enhancing security and real-time processing.

5.4. Challenges and Limitations

The training of SNNs remains more complex than traditional deep learning models [38] or optimization paradigms [39], and the use of methods like Backpropagation Through Time (BPTT) are computationally expensive. A potential solution for this is to involve unsupervised learning (STDP) or hybrid models (ANN to SNN conversion techniques) to simplify training.
Furthermore, neuromorphic chips (such as Intel Loihi) [40] are still in development, limiting the widespread deployment, and many existing IoT edge devices are not optimized for SNNs yet, which indicates the need for advancements in neuromorphic computing hardware and integration with existing IoT platforms.
To summarize, SNNs present a game-changing approach for smart building automation. Their low-power, real-time event-driven nature makes them an ideal solution for sustainable and autonomous building management systems. Future perspectives include the use of NetZero Teesside [41] energy platform.

6. Conclusions

This study investigated the use of SNNs for energy-efficient and intelligent management of smart buildings. Leveraging event-driven processing, anomaly detection, and edge computing, SNNs demonstrated superior performance in dynamically controlling lighting and appliances based on real-time occupancy and environmental conditions. Compared to traditional deep learning models, SNNs achieved greater energy efficiency, reduced computational costs, and enhanced real-time responsiveness, making them well-suited for deployment on low-power edge devices. Experimental results revealed a 25.8% reduction in energy consumption, 92.7% accuracy in anomaly detection, and a 70% decrease in power requirements compared to CNNs and LSTMs, underscoring the effectiveness of the proposed approach in optimizing smart building operations.
Despite these advantages, challenges remain in scalability, training complexity, and hardware compatibility. Training SNNs, especially using backpropagation through time, is computationally intensive and requires further optimization for large-scale deployment. Additionally, the limited availability of neuromorphic hardware constrains real-world implementation. Future research should explore hybrid AI architectures that integrate SNNs with traditional deep learning models, development of advanced neuromorphic hardware for large-scale applications, and transfer learning techniques to enhance adaptability of SNN-based smart building systems. Addressing these challenges will facilitate broader adoption of SNNs in smart energy management, promoting sustainable, efficient, and autonomous building operations.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/en18195089/s1, Codes for comparisons with other models on ASHRAE data.

Author Contributions

Data collection, verification, and curation: M.A. (Maha Alqabli), S.M., M.A. (Mansoor Alghamdi), M.A. (Malek Alrashidi) and M.S.; Formal analysis and resources: S.W., S.M., N.D., M.A. (Malek Alrashidi), M.A. (Maha Alqabli), I.S.A. and M.S.; Data annotation, preprocessing, and technical validation: S.W., S.M., M.A. (Mansoor Alghamdi) and M.A.A.; Software: M.S., I.S.A., S.M., M.A.A., N.D. and M.A. (Maha Alqabli); Writing the manuscript: S.W., N.D., M.S., S.M., M.A. (Mansoor Alghamdi) and M.A. (Malek Alrashidi). All authors have read and agreed to the published version of the manuscript.

Funding

The authors extend their appreciation to the Deanship of Research and Graduate Studies at University of Tabuk for funding this work through research no. 0149-1444-S.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

Data are available in ASHRAE Great Energy Predictor III competition and codes are available as Supplementary Material.

Conflicts of Interest

The authors declare no competing interests.

References

  1. Nunes, J.D.; Carvalho, M.; Carneiro, D.; Cardoso, J.S. Spiking Neural Networks: A Survey. IEEE Access 2022, 10, 60738–60764. [Google Scholar] [CrossRef]
  2. Rousseeuw, P.J.; Hubert, M. Anomaly detection by robust statistics. Wiley Interdiscip. Rev. Data Min. Knowl. Discovery 2018, 8, e1236. [Google Scholar] [CrossRef]
  3. Sun, X.; Zhang, Y.; Dong, Y.; Du, B. Contrastive Self-Supervised Learning-Based Background Reconstruction for Hyperspectral Anomaly Detection. IEEE Trans. Geosci. Remote Sens. 2025, 63, 5504312. [Google Scholar] [CrossRef]
  4. Mnasri, S.; Alghamdi, M. On the interest of artificial intelligence approaches in solving the IoT coverage problem. Ad Hoc Netw. 2024, 152, 103321. [Google Scholar] [CrossRef]
  5. Chahardoli, M.; Osati Eraghi, N.; Nazari, S. An energy consumption prediction approach in smart cities by CNN-LSTM network improved with game theory and Namib Beetle Optimization (NBO) algorithm. J. Supercomput. 2025, 81, 403. [Google Scholar] [CrossRef]
  6. Yu, J.; de Antonio, A.; Villalba-Mora, E. Deep Learning (CNN, RNN) Applications for Smart Homes: A Systematic Review. Computers 2022, 11, 26. [Google Scholar] [CrossRef]
  7. Yang, L.; Zha, X.; Huang, J.; Liu, Z.; Chen, J.; Mou, C. Energy-Efficient and Comprehensive Garbage Bin Overflow Detection Model Based on Spiking Neural Networks. Smart Cities 2025, 8, 71. [Google Scholar] [CrossRef]
  8. Malik, S.; Kim, D. Prediction-Learning Algorithm for Efficient Energy Consumption in Smart Buildings Based on Particle Regeneration and Velocity Boost in Particle Swarm Optimization Neural Networks. Energies 2018, 11, 1289. [Google Scholar] [CrossRef]
  9. Serrano, W. The Random Neural Network with a Genetic algorithm in Intelligent Buildings. In Proceedings of the 2020 International Conference on Computing, Electronics & Communications Engineering (iCCECE), Southend, UK, 17–18 August 2020; pp. 182–188. [Google Scholar] [CrossRef]
  10. Styła, M.; Adamkiewicz, P.; Cieplak, T.; Skowron, S.; Dmowski, A.; Stokłosa, J. A Smart Building Resource Prediction, Navigation and Man-agement System Supported by Radio Tomography and Computational Intelligence. Energies 2021, 14, 8260. [Google Scholar] [CrossRef]
  11. Zhou, Y. Artificial intelligence in renewable systems for transformation towards intelligent buildings. Energy AI 2022, 10, 100182. [Google Scholar] [CrossRef]
  12. Wang, Q.; Zhao, C.; Sun, Y.; Xu, R.; Li, C.; Wang, C.; Liu, W.; Gu, J.; Shi, Y.; Yang, L.; et al. Synaptic transistor with multiple biological functions based on metal-organic frameworks combined with the LIF model of a spiking neural network to recognize temporal information. Microsyst. Nanoeng. 2023, 9, 96. [Google Scholar] [CrossRef] [PubMed]
  13. Ahmed, U.; Khan, A.R.; Mahmood, A.; Yadav, P.; Hammad, A.; Zoha, A. Spikenet: A hybrid model for short-term load forecasting using spike neural network. TechRxiv 2024. [Google Scholar] [CrossRef]
  14. Baigorri, G.A.; Parada, R.; Monzon Baeza, V.; Monzo, C. Leveraging Urban Water Distribution Systems with Smart Sensors for Sustainable Cities. Sensors 2024, 24, 7223. [Google Scholar] [CrossRef]
  15. Suryavanshi, A.; Mehta, S.; Chattopadhyay, S.; Aeri, M. Navigating Water Scarcity with IoT: A Smart Management System Approach. In Proceedings of the 2024 4th International Conference on Intelligent Technologies (CONIT), Bangalore, India, 21–23 June 2024; pp. 1–5. [Google Scholar] [CrossRef]
  16. Bose, P.; Kasabov, N.K.; Bruzzone, L.; Hartono, R.N. Spiking Neural Networks for Crop Yield Estimation Based on Spatiotemporal Analysis of Image Time Series. IEEE Trans. Geosci. Remote Sens. 2016, 54, 6563–6573. [Google Scholar] [CrossRef]
  17. Siddique, A.; Sun, J.; Hou, K.J.; Vai, M.I.; Pun, S.H.; Iqbal, M.A. SpikoPoniC: A Low-Cost Spiking Neuromorphic Computer for Smart Aquaponics. Agriculture 2023, 13, 2057. [Google Scholar] [CrossRef]
  18. Liang, Z.; Fang, X.; Liang, Z.; Xiong, J.; Deng, F.; Nyamasvisva, T.E. Graph spiking neural network for advanced urban flood risk assessment. iScience 2024, 27, 111037. [Google Scholar] [CrossRef]
  19. Lucas, S.; Portillo, E. Methodology based on spiking neural networks for univariate time-series forecasting. Neural Netw. 2024, 172, 106171. [Google Scholar] [CrossRef]
  20. George, A.M.; Ali, A.M.A. Online time-series forecasting using spiking reservoir. Neurocomputing 2023, 556, 126–138. [Google Scholar] [CrossRef]
  21. Manna, D.L.; Vicente-Sola, A.; Kirkland, P.; Bihl, T.J.; Di Caterina, G. Time Series Forecasting via Derivative Spike Encoding and Bespoke Loss Functions for Spiking Neural Networks. Computers 2024, 13, 202. [Google Scholar] [CrossRef]
  22. Long, L.; Guo, C.; Xiong, X.; Peng, H.; Wang, J. A reservoir computing model based on nonlinear spiking neural P systems for time series forecasting. Appl. Soft Comput. 2024, 152, 111644. [Google Scholar] [CrossRef]
  23. He, J.; Peng, H.; Wang, J.; Yang, Q.; Ramírez-De-Arellano, A. K-order echo-type spiking neural P systems for time series forecasting. Neurocomputing 2024, 567, 357–369. [Google Scholar] [CrossRef]
  24. Soures, N.; Kudithipudi, D. Spiking reservoir networks: Brain-inspired recurrent algorithms that use random, fixed synaptic strengths. IEEE Signal Process. Mag. 2019, 36, 78–87. [Google Scholar] [CrossRef]
  25. Liu, Q.; Long, L.; Peng, H.; Wang, J.; Yang, Q.; Song, X.; Riscos-Núñez, A.; Pérez-Jiménez, M.J. Gated spiking neural P systems for time series forecasting. IEEE Trans. Neural Netw. Learn. Syst. 2021, 34, 6227–6236. [Google Scholar] [CrossRef] [PubMed]
  26. Li, L.; Guo, L.; Wang, J.; Peng, H. Short-term load forecasting using nonlinear spiking neural P systems. Appl. Sci. 2023, 13, 792. [Google Scholar] [CrossRef]
  27. Patel, M.K.; Darji, M.; Patel, B. Application of Liquid State Machine for accurate rainfall prediction. Procedia Comput. Sci. 2025, 222, 295–303. [Google Scholar] [CrossRef]
  28. Li, J.; Lin, S.; Zhang, L.; Liu, Y.; Peng, Y.; Hu, Q. Brain-inspired multimodal approach for effluent quality prediction. Front. Environ. Sci. Eng. 2024, 18, 31. [Google Scholar] [CrossRef]
  29. Dennler, N.; Haessig, G.; Cartiglia, M.; Indiveri, G. Online detection of vibration anomalies using balanced spiking neural networks. In Proceedings of the 2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (AICAS), Washington, DC, USA, 6–9 June 2021; pp. 1–4. [Google Scholar]
  30. Brusca, S.; Capizzi, G.; Lo Sciuto, G.; Susi, G. A new design methodology to predict wind farm energy production using spiking neural networks. Int. J. Numer. Model. 2019, 32, e2267. [Google Scholar] [CrossRef]
  31. Alharbi, T.; Ahmed, U.; Alharbi, A.; Mahmood, A.; Saha, A.K. Integrated-and-Fire spiking neuron model for improved wind-speed forecasting. Int. J. Energy Res. 2025, 2025, 3098062. [Google Scholar] [CrossRef]
  32. Gao, Y.; Wang, J.; Guo, L.; Peng, H. Short-term PV power prediction via NSNP-ESN. Sustainability 2024, 16, 1709. [Google Scholar] [CrossRef]
  33. Karijadi, I.; Chou, S.-Y. A hybrid RF-LSTM based on CEEMDAN for improving the accuracy of building energy consumption prediction. Energy Build. 2022, 259, 111908. [Google Scholar] [CrossRef]
  34. Mahjoub, S.; Chrifi-Alaoui, L.; Marhic, B.; Delahoche, L. Predicting Energy Consumption Using LSTM, Multi-Layer GRU and Drop-GRU Neural Networks. Sensors 2022, 22, 4062. [Google Scholar] [CrossRef] [PubMed]
  35. Garnett, R. Bayesian Optimization; Cambridge University Press: Cambridge, UK, 2023. [Google Scholar] [CrossRef]
  36. Zhou, C.; Zhang, H.; Yu, L.; Ye, Y.; Zhou, Z.; Huang, L.; Ma, Z.; Fan, X.; Zhou, H.; Tian, Y. Direct training high-performance deep spiking neural networks: A review of theories and methods. Front. Neurosci. 2024, 18, 1383844. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
  37. Miller, C.; Arjunan, P.; Kathirgamanathan, A.; Fu, C.; Roth, J.; Park, J.Y.; Haberl, J. The ASHRAE Great Energy Predictor III com-petition: Overview and results. Sci. Technol. Built Environ. 2020, 26, 1427–1447. [Google Scholar] [CrossRef]
  38. Mnasri, S.; Habbash, M. Study of the influence of Arabic mother tongue on the English language using a hybrid artificial intelligence method. Interact. Learn. Environ. 2021, 31, 5568–5581. [Google Scholar] [CrossRef]
  39. Mnasri, S.; Nasri, N.; Van Den Bossche, A.; Val, T. A comparative analysis with validation of NSGA-III and MOEA/D in resolving the 3D indoor redeployment problem in DL-IoT. In Proceedings of the 2017 International Conference on Internet of Things, Embedded Systems and Communications (IINTEC), Gafsa, Tunisia, 20–22 October 2017; pp. 15–20. [Google Scholar] [CrossRef]
  40. Nagy, Á.; Szabó, R.; Toka, L. Analyzing Energy Consumption of Loihi 2 Neuromorphic Chip in a Self-driving Use-case. In Proceedings of the 2025 10th International Conference on Smart and Sustainable Technologies (SpliTech), Bol and Split, Croatia, 16–20 June 2025; pp. 1–6. [Google Scholar] [CrossRef]
  41. The Netzeroteesside Platform. Available online: https://www.netzeroteesside.co.uk/ (accessed on 9 September 2025).
Figure 1. System architecture of a smart building SNN-based energy management system.
Figure 1. System architecture of a smart building SNN-based energy management system.
Energies 18 05089 g001
Figure 2. System data pipeline for BO-STDP-SNN smart building.
Figure 2. System data pipeline for BO-STDP-SNN smart building.
Energies 18 05089 g002
Figure 3. Spike train visualizations using two plausible encoders.
Figure 3. Spike train visualizations using two plausible encoders.
Energies 18 05089 g003
Table 1. Metrics used for evaluation.
Table 1. Metrics used for evaluation.
MetricMeaning in Smart Building Context
Explained VarianceProportion of variance captured by the model.
R2 (R-squared)Proportion of total variation in target variable explained by model
Log Loss (for anomaly)Measures uncertainty in classification confidence.
Inference Time (µs)Ultra-low latency evaluation on Raspberry Pi (Edge computing).
MAEAverage absolute difference between predicted and actual indoor temperature (or energy usage), indicating overall accuracy.
MSE (Average squared difference)Penalizes larger errors more severely, useful for detecting occasional large deviations in system control.
RMSE (Root of MSE)Same interpretation as MSE but in the same unit (e.g., °C, kWh), easier to interpret.
MAPE (Mean percentage error)Shows how many error occurs in relation to actual value. Useful for communicating model performance in relative terms.
SMAPESymmetric Mean Absolute Percentage Error, balances over- and under-predictions
NRMSE (Normalized RMSE)Scales RMSE by means or range of observed values. Helps compare models across different tasks (e.g., temp vs. energy).
Table 2. Assessment of tested algorithms using a set of events.
Table 2. Assessment of tested algorithms using a set of events.
EventRule-BasedCNNLSTMRNNGRUSNNBO-STDP-SNN
(Our Proposed Model)
Occupant enters room8002501801901706050
Temperature exceeds threshold9002802002101907060
Appliance left ON8503002102202006545
Table 3. Comparing the MAE of the algorithms according to temperature control event.
Table 3. Comparing the MAE of the algorithms according to temperature control event.
AlgorithmMAE (%) Mean ± SD95% CI
Rule-based0.71 ± 0.24(0.62, 0.80)
CNN0.45 ± 0.15(0.39, 0.51)
LSTM0.39 ± 0.14(0.34, 0.44)
RNN0.43 ± 0.09(0.40, 0.46)
GRU0.36 ± 0.15(0.30, 0.42)
SNN0.31 ± 0.08(0.28, 0.34)
BO-STDP-SNN0.28 ± 0.14(0.23, 0.33)
Table 4. Comparing the MSE of the algorithms according to temperature control event.
Table 4. Comparing the MSE of the algorithms according to temperature control event.
AlgorithmMSE (%) Mean ± SD95% CI
Rule-based0.84 ± 0.18[0.78, 0.90]
CNN0.38 ± 0.21[0.30, 0.46]
LSTM0.27 ± 0.29[0.17, 0.37]
RNN0.32 ± 0.17[0.26, 0.38]
GRU0.25 ± 0.16[0.19, 0.31]
SNN0.21 ± 0.12[0.17, 0.25]
BO-STDP-SNN0.19 ± 0.13[0.14, 0.24]
Table 5. Comparing the RMSE of the algorithms according to temperature control event.
Table 5. Comparing the RMSE of the algorithms according to temperature control event.
AlgorithmRMSE (%) Mean ± SD95% CI
Rule-based0.92 ± 0.14[0.87, 0.97]
CNN0.61 ± 0.21[0.53, 0.69]
LSTM0.52 ± 0.06[0.50, 0.54]
RNN0.57 ± 0.15[0.52, 0.62]
GRU0.5 ± 0.03[0.49, 0.51]
SNN0.46 ± 0.1[0.42, 0.50]
BO-STDP-SNN0.43 ± 0.08[0.40, 0.46]
Table 6. Comparing the NRMSE of the algorithms according to temperature control event.
Table 6. Comparing the NRMSE of the algorithms according to temperature control event.
AlgorithmNRMSE (%) Mean ± SD95% CI
Rule-based0.182 ± 0.04[0.168, 0.196]
CNN0.127 ± 0.09[0.095, 0.159]
LSTM0.105 ± 0.03[0.094, 0.116]
RNN0.113 ± 0.11[0.074, 0.152]
GRU0.099 ± 0.07[0.074, 0.124]
SNN0.093 ± 0.08[0.064, 0.122]
BO-STDP-SNN0.087 ± 0.12[0.044, 0.130]
Table 7. Comparing the MAPE of the algorithms according to temperature control event.
Table 7. Comparing the MAPE of the algorithms according to temperature control event.
AlgorithmMAPE (%) ± SD95% CI
Rule-based7.6 ± 0.21[7.19, 8.01]
CNN4.1 ± 0.09 [3.92, 4.28]
LSTM3.4 ± 0.04[3.32, 3.48]
RNN3.2 ± 0.13[2.95, 3.45]
GRU3.2 ± 0.11[2.98, 3.42]
SNN2.8 ± 0.02[2.76, 2.84]
BO-STDP-SNN2.7 ± 0.07[2.56, 2.84]
Table 8. Comparing BO-STDP-SNN with other algorithms according to the accuracy metric.
Table 8. Comparing BO-STDP-SNN with other algorithms according to the accuracy metric.
AlgorithmAccuracy Mean ± SD95% CI
Rule-based0.704 ± 0.06[0.586, 0.822]
CNN0.852 ± 0.09[0.676, 1]
LSTM0.895 ± 0.14[0.621, 1]
RNN0.867 ± 0.04[0.789, 0.945]
GRU0.886 ± 0.18[0.534, 1]
SNN0.927 ± 0.11[0.711, 1]
BO-STDP-SNN0.941 ± 0.08 [0.785, 1]
Table 9. Comparing BO-STDP-SNN with other algorithms according to the precision metric.
Table 9. Comparing BO-STDP-SNN with other algorithms according to the precision metric.
AlgorithmPrecision Mean ± SD95% CI
Rule-based0.681 ± 0. 22[0.450, 1]
CNN0.834 ± 0.09[0.658, 1]
LSTM0.871 ± 0.15[0.747, 1]
RNN0.842 ± 0.11[0.626, 1]
GRU0.863 ± 0.08[0.705, 1]
SNN0.903 ± 0.06[0.785, 1]
BO-STDP-SNN0.916 ± 0.1[0.720, 1]
Table 10. Comparing BO-STDP-SNN with other algorithms according to the recall metric.
Table 10. Comparing BO-STDP-SNN with other algorithms according to the recall metric.
AlgorithmRecall Mean ± SD95% CI
Rule-based0.659 ± 0.13[0.404, 0.914]
CNN0.829 ± 0.16[0.515, 1]
LSTM0.865 ± 0.08[0.709, 1]
RNN0.824 ± 0.07[0.687, 0.961]
GRU0.851 ± 0.12[0.615, 1]
SNN0.918 ± 0.09[0.742, 1]
BO-STDP-SNN0.932 ± 0.14 [0.658, 1]
Table 11. Comparing BO-STDP-SNN with other algorithms according to the F1-score metric.
Table 11. Comparing BO-STDP-SNN with other algorithms according to the F1-score metric.
AlgorithmF1-Score Mean ± SD95% CI
Rule-based0.669 ± 0.01[0.649, 0.689]
CNN0.831 ± 0.02[0.791, 0.871]
LSTM0.868 ± 0.01[0.848, 0.888]
RNN0.833 ± 0.02[0.793, 0.873]
GRU0.857 ± 0.02[0.817, 0.897]
SNN0.91 ± 0.01[0.890, 0.930]
BO-STDP-SNN0.924 ± 0.02[0.884, 0.964]
Table 12. Comparing BO-STDP-SNN with other algorithms according to the Log Loss metric.
Table 12. Comparing BO-STDP-SNN with other algorithms according to the Log Loss metric.
AlgorithmLog Loss Mean ± SD95% CI
Rule-based0.315 ± 0.11[0.099, 0.531]
CNN0.348 ± 0.08[0.192, 0.504]
LSTM0.294 ± 0.03[0.235, 0.353]
RNN0.31 ± 0.12[0.074, 0.546]
GRU0.279 ± 0.09[0.103, 0.455]
SNN0.231 ± 0.04[0.153, 0.309]
BO-STDP-SNN0.217 ± 0.02[0.177, 0.257]
Table 13. Comparing BO-STDP-SNN with other algorithms according to the ROC AUC metric.
Table 13. Comparing BO-STDP-SNN with other algorithms according to the ROC AUC metric.
AlgorithmROC AUC Mean ± SD95% CI
Rule-based0.882 ± 0.04[0.804, 0.960]
CNN0.879 ± 0.13[0.624, 1]
LSTM0.912 ± 0.06[0.794, 1]
RNN0.895 ± 0.08[0.739, 1]
GRU0.91 ± 0.16[0.596, 1]
SNN0.944 ± 0.22[0.514, 1]
BO-STDP-SNN0.957 ± 0.18[0.605, 1]
Table 14. Assessment of tested algorithms using a set of edge tasks.
Table 14. Assessment of tested algorithms using a set of edge tasks.
AlgorithmLatency (ms) ± SD95% CICloud Dependence
Rule-based320 ± 0.1[319.80, 320.20]High
CNN290 ± 0.02[289.96, 290.04]High
LSTM50 ± 0.03[49.94, 50.06]Low
RNN58 ± 0.14[57.73, 58.27]Low
GRU47 ± 0.22[46.57, 47.43]Low
SNN12.8 ± 0.12[12.56, 13.04]Very low
BO-STDP-SNN10.5 ± 0.09[10.32, 10.68]Very low
Table 15. Power consumption evaluation.
Table 15. Power consumption evaluation.
AlgorithmPower Consumption (W) ± SD95% CI
Rule-based2.8 ± 0.23[2.36, 3.24]
CNN12.5 ± 0. 12[12.27, 12.73]
LSTM10.8 ± 0.08[10.64, 10.96]
RNN10.8 ± 0. 16[10.49, 11.11]
GRU10.2 ± 0.22[9.77, 10.63]
SNN3.2 ± 0.04[3.12, 3.28]
BO-STDP-SNN2.7 ± 0.14[2.42, 2.98]
Table 16. Energy consumption reduction according to rule-based, deep and SNN models.
Table 16. Energy consumption reduction according to rule-based, deep and SNN models.
AlgorithmEnergy Savings (%) ± SD95% CI
Rule-based0.0 (Baseline)
CNN18.4 ± 0. 09[18.22, 18.58]
LSTM20.7 ± 0.14[20.42, 20.98]
RNN19.6 ± 0.05[19.50, 19.70]
GRU21.4 ± 0.2[21.00, 21.79]
SNN25.3 ± 0.11[25.08, 25.52]
BO-STDP-SNN27.8 ± 0.03[27.74, 27.86]
Table 17. Energy savings by building type and season.
Table 17. Energy savings by building type and season.
Building TypeSummer (%)Winter (%)Annual Avg (%)
Office29.126.527.9 ± 1.2
Residential28.025.926.7 ± 1.0
Academic28.526.827.6 ± 1.1
Table 18. Energy prediction (kWh).
Table 18. Energy prediction (kWh).
MetricRule-Based ± SDCNN ± SDLSTM ± SDRNN ± SDGRU ± SDSNN ± SD BO-STDP-SNN ± SD
MAE1.45 ± 0.120.92 ± 0.080.83 ± 0.070.87 ± 0.080.79 ± 0.060.64 ± 0.050.59 ± 0.05
MSE3.12 ± 0.251.61 ± 0.151.34 ± 0.121.42 ± 0.131.21 ± 0.10.91 ± 0.080.81 ± 0.07
RMSE1.77 ± 0.141.27 ± 0.11.16 ± 0.091.19 ± 0.081.10 ± 0.050.95 ± 0.050.90 ± 0.06
MAPE (%)13.9 ± 0.98.2 ± 0.57.3 ± 0.27.8 ± 0.46.7± 0.66.1 ± 0.55.4 ± 0.3
SMAPE (%)8.63 ± 0.65.42 ± 0.44.93 ± 0.35.21 ± 0.44.68 ± 0.53.97 ± 0.43.61 ± 0.7
NRMSE0.166 ± 0.0110.112 ± 0.0080.098 ± 0.0070.101 ± 0.0050.091 ± 0.0060.079 ± 0.0050.075 ± 0.007
Explained Variance0.885 ± 0.0120.888 ± 0.010.913 ± 0.0080.902 ± 0.070.918 ± 0.050.942 ± 0.090.951 ± 0.04
R20.875 ± 0.0120.873 ± 0.020.905 ± 0.090.894 ± 0.070.911 ± 0.040.937 ± 0.060.945 ± 0.05
Table 19. Comparative analysis of SNN performance with other deep models.
Table 19. Comparative analysis of SNN performance with other deep models.
FeatureRule-BasedRNN and GRUCNN and LSTMsSNNs and BO-STDP-SNN
Energy efficiencyLowModerateModerateHigh
Response timeLowSlowModerateFast
Data efficiencyRequires large datasetsRequires large datasetsRequires sequential dataLearns from sparse data
Edge computing feasibilityHigh power consumptionHigh power consumptionHigh power consumptionLow-Power and efficient
Adaptive controlFixed patternsFixed patternsPredictiveReal-time adaptive control
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Alrashidi, M.; Mnasri, S.; Alqabli, M.; Alghamdi, M.; Short, M.; Williams, S.; Dawood, N.; Alkhazi, I.S.; Alrowaily, M.A. Energy and Water Management in Smart Buildings Using Spiking Neural Networks: A Low-Power, Event-Driven Approach for Adaptive Control and Anomaly Detection. Energies 2025, 18, 5089. https://doi.org/10.3390/en18195089

AMA Style

Alrashidi M, Mnasri S, Alqabli M, Alghamdi M, Short M, Williams S, Dawood N, Alkhazi IS, Alrowaily MA. Energy and Water Management in Smart Buildings Using Spiking Neural Networks: A Low-Power, Event-Driven Approach for Adaptive Control and Anomaly Detection. Energies. 2025; 18(19):5089. https://doi.org/10.3390/en18195089

Chicago/Turabian Style

Alrashidi, Malek, Sami Mnasri, Maha Alqabli, Mansoor Alghamdi, Michael Short, Sean Williams, Nashwan Dawood, Ibrahim S. Alkhazi, and Majed Abdullah Alrowaily. 2025. "Energy and Water Management in Smart Buildings Using Spiking Neural Networks: A Low-Power, Event-Driven Approach for Adaptive Control and Anomaly Detection" Energies 18, no. 19: 5089. https://doi.org/10.3390/en18195089

APA Style

Alrashidi, M., Mnasri, S., Alqabli, M., Alghamdi, M., Short, M., Williams, S., Dawood, N., Alkhazi, I. S., & Alrowaily, M. A. (2025). Energy and Water Management in Smart Buildings Using Spiking Neural Networks: A Low-Power, Event-Driven Approach for Adaptive Control and Anomaly Detection. Energies, 18(19), 5089. https://doi.org/10.3390/en18195089

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop