1. Introduction
The Internet of Things (IoT) is connected devices equipped with sensors and software that continuously collect and exchange a large amount of data. With the use of the IoT expanding across various domains such as smart homes, smart healthcare, and agriculture, it is estimated that up to 500 billion connected devices will be deployed by 2030 [
1]. However, IoT networks are inherently vulnerable due to their heterogeneity and the lack of strong security mechanisms in low-power devices [
2,
3], which results in many IoT networks relying on centralized architectures that can be easily exploited by attackers [
4]. These make IoT susceptible to numerous cyber-attacks, including data interception, Denial of Service (DoS), and Distributed Denial of Service (DDoS) [
5,
6]. For example, the Mirai botnet attack on DNS provider Dyn (
https://account.dyn.com/) was reported to have affected more than 600,000 low-power IoT devices, including IP cameras, printers, and routers [
7], which, as a result, disrupted major websites such as Amazon, Airbnb, and Netflix [
5,
8]. Flaws in the device authentication mechanisms in home routers have also led to complete network compromises [
9], and the centralized architecture of the IoT has caused Single Points of Failure (SPOF) that affected all connected devices [
10]. As new variants of attacks continue to emerge [
6], developing robust and reliable security measures to protect IoT networks has become increasingly crucial.
Blockchain has emerged as a trustworthy and secure mechanism for storing and exchanging data. Despite being originally designed for cryptocurrencies [
11], blockchains are increasingly used for identity verification, creating decentralization, and providing tamper-proof records in the Internet of Vehicles (IoV), Industrial Internet of Things (IIoT), Internet of Medical Things (IoMT), etc. A blockchain network effectively follows the CIA security model by ensuring confidentiality through public-key cryptography, maintaining integrity through hashing, and guaranteeing availability through decentralization [
12]. However, as all nodes independently verify transactions, when the transaction volume increases or the network expands, the latency also increases, leading to different nodes having different versions of the transaction history, which is referred to as forking. The immutable and append-only ledger requires significant space for storing transactions, and storing transactions in their original format can raise security concerns.
Deep Neural Networks (DNNs) are significantly advancing multiple industries by incorporating Artificial Intelligence (AI) for decision-making [
13]. DNNs have been shown to enhance the anomaly detection, classification, and prediction functionalities in wearables, self-driving cars, smart homes, smart offices, and virtual assistants [
13]. Nonetheless, today’s DNN systems heavily rely on centralized servers, making them susceptible to SPOF. There is also no mechanism in place to ensure the integrity of DNN models and their training data.
Extensive research has been conducted on integrating blockchain and DNNs to enhance IoT networks by establishing trust, identifying anomalies, and ensuring secure data storage and transmission [
14,
15]. Despite significant advancements, existing studies have not fully addressed the challenges in generic IoT networks primarily due to the lack of an effective blockchain–DNN integration framework that optimizes network latency, throughput, storage, computational efficiency, and data security [
16,
17]. Sapkota et al. [
18] proposed an optimized blockchain–DNN framework leveraging an LSTM autoencoder to detect anomalous transactions and reduce storage overhead in IoT networks. Nonetheless, this solution has overlooked the blockchain consensus process, leaving the network vulnerable to malicious nodes while limiting the improvements on latency and throughput. Goh et al. [
19] and Papaioannou et al. [
20] proposed to optimize blockchain consensus with DNNs, ensuring only honest nodes participate in the consensus process. However, neither study addressed the handling of anomalous transactions and nodes. How to fully leverage the mutual enhancement of blockchain and DNNs within an integration framework to mitigate anomalies, reduce storage overhead, and enable efficient and secure data dissemination in generic IoT networks remains an open question.
To address this remaining gap, the authors propose DeepChainIoT, a comprehensive blockchain–DNN integration framework that detects anomalies, enhances the consensus with transaction prioritization and node rating, enables efficient transaction storage and dissemination through encoding, and decentralizes DNNs. Overall, this paper makes the following major contributions:
Analyzes blockchains and DNNs as independent technologies in depth and finds that blockchain is suitable for IoT transaction processing due to its decentralization, but it suffers from issues such as high latency, low throughput, limited storage space, privacy, and is susceptible to network and smart contract attacks. DNNs can be used to detect anomalies in transactions, devices, and users but are often deployed in centralized systems without mechanisms to guarantee the integrity of the models and their training data.
Conducts an extensive literature survey on existing frameworks that integrate blockchain and DNNs in IoT networks and categorizes these frameworks into three main types, anomaly detection, secure data storage, and secure distributed networks, and identifies their limitations, including a lack of integration between the blockchain and DNN, using complex architectures with separate components, which, as a result, increases the network latency and storage overhead and overlooks the importance of consensus algorithms.
Proposes a novel framework—DeepChainIoT—that fully leverages the mutual enhancement of blockchain and DNN to address security, storage, and data dissemination issues in generic IoT networks and shows that DeepChainIoT offers efficient and secure transaction processing, storage, and dissemination through a blockchain network that uses Long Short-Term Memory (LSTM) autoencoders to analyze and detect anomalies in transactions, nodes, network traffic, and smart contracts and uses an optimized Practical Byzantine Fault Tolerance (PBFT) consensus with node rating to prioritize critical transactions and prevent malicious nodes. At the same time, DeepChainIoT uses a blockchain network to decentralize DNN models and preserves the integrity of the models and training data.
Evaluates the LSTM autoencoder with an anomaly detection task on a pump sensor dataset collected from a smart water system. The LSTM autoencoder achieved an accuracy of 99.6%, a recall of 100%, a precision of 97.95%, and an F1-score of 98.97%. It also achieved a data compression ratio of 23.9, showing its ability to compress data and hence reduce storage and bandwidth requirements for blockchain nodes. Malicious sensors were categorized based on the number of anomalous transactions they sent within a defined transaction window, and transactions from non-malicious sensors were prioritized, and it evaluates the effectiveness of the LSTM autoencoder model in real-time anomaly detection. This marks significant improvements in anomaly detection compared to the results presented by Sapkota et al. [
18], which only optimized the compression ratio.
The rest of the paper is organized as follows.
Section 2 introduces blockchain and DNN technologies and discusses their limitations separately.
Section 3 reviews existing studies on blockchain–DNN integration for IoT networks, categorizes and compares the frameworks proposed in these studies, discusses their limitations, and summarizes the overlooked potentials in integrating blockchain and DNN, which leads to the introduction and evaluation of the proposed DeepChainIoT framework in
Section 4 and
Section 5. Finally,
Section 6 concludes the paper and identifies avenues for future research.
3. The Blockchain–DNN Integration for the IoT
Multiple research studies have shown the integration of blockchain and DNNs allows them to effectively complement each other’s limitations and provide a robust solution to solve the security, privacy, and storage issues in generic IoT networks. To ensure a comprehensive review, the frameworks were selected according to the following criteria:
Relevance: Blockchain–DNN integrated frameworks are used to solve security issues regardless of their application domains.
Publication quality and impact: Peer-reviewed articles from high-impact conferences and journals published within the last five years.
Diversity: A variety of studies to ensure a broad perspective.
Based on these criteria, twenty frameworks were selected and classified into anomaly detection, secure data storage, and secure data distribution categories according to their objectives. Among these twenty frameworks, eight focus on anomaly detection, six on secure data storage, and six on secure distributed networks.
3.1. Review of Blockchain–DNN Integration Frameworks
Table 3 summarizes and compares the selected frameworks in terms of their abilities in anomaly detection, storage overhead reduction, and more. Detailed reviews of each of these frameworks are available in
Appendix A.
3.2. Remaining Challenges
The subsection below highlights areas where further research and development are needed to enhance the effectiveness, reliability, and usability of blockchain–DNN integration frameworks by exploring the remaining challenges identified in existing studies.
Many existing studies tend to overlook the importance of the consensus mechanism. The most common consensus algorithms are PoW, PoS, and PBFT. PoW consumes excessive energy and often results in slow transaction processing. PoS validators are selected based on stakes; centralization is inevitable when minorities control majority of the stake. PBFT is fast but allows up to one-third of the nodes to behave maliciously. The efficiency of these consensus algorithms is crucial for minimizing network delays, as synchronization in a decentralized network is often challenging and time-consuming. The energy consumption of these mechanisms is influenced more by the network size than by transaction volume. Therefore, optimizing and accelerating the consensus is vital for improving the overall performance and sustainability.
The neural network algorithms and blockchain platforms used in these frameworks are often used separately and not optimized together. This lack of integration prevents neural networks from utilizing the tamper-proof and immutable properties of blockchain, leaving training data and models vulnerable.
Most existing studies proposed to store transactions in their original forms on-chain, which requires substantial storage spaces. This also allows any node to easily view transaction information, which may compromise privacy. Some frameworks proposed to use cloud for data storage, leaving authentication on-chain. However, this results in increased latency especially when data is frequently transmitted between the blockchain and the cloud.
Therefore, there is a need for a novel framework where blockchain and neural networks are optimized together as a single platform. Blockchain’s immutability can be used to prevent the neural network models and their training data from being tampered with. With neural networks, anomalies in transactions can be detected and discarded before further processing in the blockchain to reduce the transaction volume. With transaction compression before sending them to the blockchain, the storage space required on-chain is reduced without losing important information. The DNN model should also be simple, yet effective, fast, and reliable.
3.3. The Overlooked Potentials
Considering the limitations of DNNs and blockchain as standalone technologies, as well as the remaining gaps in existing integrated blockchain–DNN frameworks, the overlooked potentials in integrating blockchain and DNNs within IoT networks are identified and summarized in
Table 4 (how blockchain can improve DNNs),
Table 5 (how DNNs can enhance blockchain—Part 1), and
Table 6 (how DNNs can enhance blockchain—Part 2).
Overall, DNNs can enhance the performance of the blockchain network by reducing forking, latency, and storage overhead; improving transaction throughput; optimizing message sequences to improve consensus efficiency; mitigating smart contract vulnerabilities; preserving privacy; and enabling better network management through node rating. Blockchain eliminates centralization and preserves the integrity of the DNN models and their training data.
Figure 1 summarizes and visualizes these mutual enhancements. By fully leveraging these overlooked potentials, the integration of DNNs and blockchain can be used to create more secure, efficient, and resilient IoT applications.
5. Evaluation
This section provides a comprehensive evaluation of the proposed DeepChainIoT framework, analyzing its key features and performance across various aspects. Specifically, the LSTM autoencoder’s performance is assessed using multiple metrics on the pump sensor dataset for a smart water system, and enhancements to the PBFT consensus mechanism are evaluated. The framework’s impact is examined on user experience, trust, and data control, along with scalability, cost, and comparisons with existing frameworks. Finally, the challenges of implementing DeepChainIoT in real-world IoT environments are discussed.
5.1. Features
DeepChainIoT uses public-key based identity management to verify transaction senders’ identities and prevent unauthorized access to data shared in the network. This achieves a similar authentication benefit as using a public key-based proxy in [
114].
DeepChainIoT uses an LSTM autoencoder-embedded smart contract to detect and discard malicious transactions and network traffic before further processing the transactions in the blockchain.
DeepChainIoT monitors node behaviors to identify malicious activities and nodes. When a node is found malicious, an alert is sent to the admin to take appropriate actions.
Enhances PBFT algorithm consensus efficiency by prioritizing critical transactions.
DeepChainIoT collects various real-time network data and analyzes them with the LSTM autoencoder-based DNN model to detect conflicts, predict network failures, and dynamically adjust the consensus algorithm, which significantly reduces the likelihood of forking.
Transferring large volumes of data within a blockchain network poses challenges related to bandwidth, storage, and privacy. After the anomaly detection, only legitimate transactions undergo an LSTM autoencoder-based encoding. As a result, the reduction in transaction volume and size reduces the workload and storage space needed by the validating nodes. At the same time, by storing encoded transactions in the shared ledger, only authorized users with the corresponding decoding algorithm can access the original content. The blockchain provides immutability, making it hard for malicious players to tamper with the validated transactions.
The reduced transaction volume and size also reduces the latency for propagating transactions, leading to an improved transaction throughput.
The DNN model and the data used for training are immutable, as they are implemented within the blockchain network on validating nodes, preventing any unauthorized alterations and access.
Decentralization is provided by the blockchain network, which mitigates SPOF, synchronizes DNN model updates across all nodes, and ensures continuous operation of the network despite node churn.
5.2. Performance of the LSTM Autoencoder
To evaluate our proposed LSTM autoencoder for anomaly detection and secure communication, a pump sensor dataset collected from a smart water system [
115] was used. The pump sensor dataset contains 220,320 timestamped entries, each capturing readings from 52 sensors that monitor key environmental and operational parameters such as pressure, flow rate, temperature, etc. During preprocessing, unnecessary columns were removed, missing values were replaced with the column-wise mean, and the ’machine_status’ labels were encoded into ’Normal’, ’Recovering’, and ’Broken’, with both ’Recovering’ and ’Broken’ statuses considered as anomalous, as the readings during these two statuses are unreliable and indicate potential pump malfunctions or deviations from expected behavior. This resulted in 205,836 normal entries and 14,484 anomalous entries; 70% of the normal data (144,085 entries) was used for training and the remaining 30% (61,751 entries) for testing. All features were standardized using a standard scaler, and the data was reshaped into sequences of 30 time steps with 51 features to match the input requirements of the LSTM model. The LSTM autoencoder model was composed of two main components: an encoder and a decoder. The encoder consisted of two LSTM layers, the first with 128 units and return_sequences set to True, followed by a dropout layer with a rate of 0.2. The second LSTM layer had 64 units with ReLU activation and return_sequences set to False, followed by another dropout layer with a rate of 0.2. The decoder mirrored this structure, beginning with a RepeatVector layer to match the time steps, followed by an LSTM layer with 64 units and ReLU activation (return_sequences = True), a dropout layer (rate = 0.2), and a second LSTM layer with 128 units (return_sequences = True) followed by another dropout layer. A TimeDistributed dense layer was used at the output to reconstruct the input with 51 features. The model was compiled using the Adam optimizer and trained for 10 epochs with a batch size of 512, using 10% of the training data for validation. The model achieved a training loss of 0.5763 and a validation loss of 0.5751.
An anomaly detection threshold of 0.79 was determined based on the mean absolute error (MAE) of the training data, which was calculated as the average of the absolute differences between the predicted and actual values across all 52 sensors. Any data point from the normal or anomalous set exceeding this threshold was classified as anomalous.
Figure 4 shows a comparison of MAE values between the normal and anomalous datasets, clearly indicating that the MAE value for anomalous data is significantly higher than for normal data, with most values exceeding the anomaly detection threshold of 0.79.
The model correctly classified 61,416 normal instances (true negatives) and 14,454 anomalous instances (true positives), achieving an accuracy of 99.6%. It attained a recall of 100%, indicating flawless detection of all true positive cases, as shown in the confusion matrix in
Figure 5. The model also achieved a precision of 97.93% and an F1-score of 98.96%, reflecting a well-balanced and robust performance. Furthermore, the autoencoder effectively compressed the data by a factor of 23.9, significantly reducing the data size while preserving critical information required for anomaly detection.
The sensors in the network that exhibit anomalous behavior and pose potential threats were identified and are illustrated in
Figure 6.
Sapkota et al. [
18] also applied an autoencoder model to the same pump sensor dataset, derived the anomaly detection threshold as 0.781, and achieved a compression ratio of 47.81. However, their analysis did not account for other critical performance metrics such as accuracy, recall, precision, and the F1-score. In comparison, with a reduced compression ratio, our model achieves an overall better performance in detecting anomalies.
5.3. LSTM-Enhanced PBFT Consensus
To detect malicious nodes in the network, a transaction window is defined, representing a fixed number of transactions sent by a node before evaluation. Within this window, if the number of anomalous transactions sent by a node exceeds a predefined threshold, the node is classified as anomalous and appropriate actions are taken. Once a transaction window is completed, a new window begins, resetting the anomalous transaction count to ensure that past behavior does not indefinitely affect the node’s status. This approach prevents all nodes from eventually being classified as malicious while maintaining continuous monitoring.
In our pump sensor analysis, the LSTM autoencoder model continuously monitors transactions within a fixed transaction window of 14,454 total sensor entries, as shown in
Figure 6, and categorizes sensors based on their anomalous transaction counts, summarized in
Table 7. If a sensor exceeds 12,000 anomalous transactions within its transaction window, it is classified as critical, requiring immediate action. This method ensures a balanced evaluation by detecting malicious activity within a controlled scope. If a node is identified as anomalous, its transactions undergo additional review before processing, while normal transactions continue to be processed with minimal delay. This ensures that the network prioritizes legitimate transactions, maintaining efficiency and preventing bottlenecks caused by potentially malicious nodes.
Additionally, the model’s ability to process 61,728 samples with a batch size of 16 (totaling 3858 batches) demonstrates its efficiency, completing the prediction process in 134 s, with each batch taking approximately 35 milliseconds and each sample around 2.19 milliseconds. This performance meets the real-time constraints of our smart water system, where transactions must be processed within milliseconds. If needed, efficiency can be further improved through model quantization or hardware acceleration, ensuring fast transaction validation and anomaly detection without disrupting the consensus mechanism.
Integrating the LSTM autoencoder into PBFT introduces a DNN-driven consensus optimization that enhances both efficiency and security in blockchain networks. The adaptive node rating mechanism enhances PBFT’s fault tolerance by continuously evaluating node behaviors and managing their participation in consensus. By dynamically prioritizing transactions, our approach ensures that critical operations are processed with minimal delays while transactions from suspicious nodes undergo additional review. Lastly, our framework optimizes real-time fraud and anomaly detection, making blockchain-based systems more secure and reliable for IoT applications.
5.4. Theoretical Foundation of DeepChainIoT
To strengthen the theoretical foundation of DeepChainIoT, explanations of the key components that enable anomaly detection, secure transaction validation, and resource optimization are detailed below.
5.4.1. LSTM Autoencoder for Anomaly Detection
The LSTM autoencoder forms the basis of anomaly detection in DeepChainIoT [
46,
113]. Each input sequence
, where
represents
d-dimensional sensor data at time
t and is encoded into a hidden representation using stacked LSTM layers.
where
and
are input and recurrent weight matrices,
is the bias term, and
is an activation function (e.g., ReLU or sigmoid).
The decoder reconstructs the input sequence
where
and
are output weights and bias, and
is a linear or sigmoid activation.
The anomaly value is computed as the reconstruction error:
Transactions are flagged as anomalous if their reconstruction error exceeds a predefined threshold
.
The threshold is empirically derived from the training distribution of normal data to minimize false positives.
5.4.2. PBFT Consensus and Node Rating Optimization
The underlying blockchain in DeepChainIoT employs a Practical Byzantine Fault Tolerance (PBFT) consensus protocol, which in its standard form requires
message exchanges among
n validators [
32]. To improve efficiency and resilience, DeepChainIoT integrates a
node rating mechanism and transaction prioritization strategy.
The node rating is directly linked to the anomaly detection outcomes of the LSTM autoencoder. For each node
n, a count
representing the number of anomalous data points detected over time is maintained. Nodes are categorized based on the anomaly count ranges defined in
Table 7.
Nodes that exceed the
Critical anomaly count threshold (
) are considered untrustworthy and are excluded from participating in PBFT consensus. For the remaining nodes, transactions are assigned a trust score
based on their anomaly category.
where
is a monotonic decreasing function mapping higher anomaly counts to lower trust scores.
In addition, DeepChainIoT introduces transaction prioritization based on the urgency of the data contained in each transaction. Transactions are assigned a priority level
, and higher-priority transactions are queued and validated before lower-priority ones:
This dual mechanism of node rating and transaction prioritization significantly reduces the likelihood of malicious or unreliable nodes influencing the consensus process. At the same time, it ensures that time-sensitive transactions are processed first, maintaining both the security and responsiveness of the blockchain network while preserving the PBFT guarantees of safety and guaranteed progress in processing valid transactions.
5.4.3. Data Compression and Storage Efficiency
The encoded output from the LSTM autoencoder not only reduces data dimensionality but also optimizes blockchain storage. The compression ratio is defined as [
116]
In our implementation, DeepChainIoT achieves an average compression ratio of . This directly reduces storage overhead on the blockchain ledger and minimizes communication bandwidth between validators.
These theoretical formulations demonstrate that DeepChainIoT is designed to balance detection accuracy, consensus security, and resource efficiency. By combining anomaly-aware transaction filtering, optimized PBFT consensus, and high compression ratios, our framework is theoretically robust and scalable for large-scale IoT deployments.
5.5. Feasibility of DeepChainIoT Deployment on IoT, Edge Devices
The practical feasibility of deploying DeepChainIoT in real-world IoT and edge environments is evaluated based on the storage, computational, and memory requirements of both the LSTM autoencoder and the smart contract logic (chaincode) on Hyperledger Fabric.
The trained LSTM autoencoder model occupies approximately 5.59 MB of storage, which is lightweight enough for deployment on most modern edge devices equipped with ARM Cortex-A processors or higher [
117]. To assess computational efficiency, the LSTM autoencoder’s inference performance was evaluated on a desktop system with 16 GB RAM and a 64-bit CPU. The model processed 61,728 samples (each with 30 time steps and 51 features) in 3858 batches (batch size = 16), completing inference in 134 s—approximately 35 ms per batch and 2.19 ms per sample. While tested on a PC, prior studies [
117,
118] and benchmarks have shown that similar DNN models achieve 2–5 ms per-sample inference latency on edge devices such as Raspberry Pi 4, particularly after model optimization using TensorFlow Lite conversion and quantization techniques. These methods significantly reduce model size and inference time while preserving performance [
119]. Therefore, considering that our model’s computational load is limited to forward-pass inference on edge nodes (with training performed offline), the deployment is feasible for real-world IoT or edge environments where lightweight and efficient anomaly detection is essential.
Despite not being directly compiled for deployment, the logic of DeepChainIoT chaincode includes components for anomaly detection, transaction prioritization, and node trust evaluation. Past studies such as Wang and Chu [
120] and Guggenberger et al. [
121] report that moderately complex Hyperledger Fabric chaincodes typically compile to between 1 and 2 MB. Based on the scope of our modules, it is reasonable to expect that the compiled DeepChainIoT chaincode would fall within this range, indicating its deployability on resource-constrained systems without excessive overhead. Since the actual model training is performed offline and only the encoded output or anomaly flag is submitted to the blockchain, the on-chain operations remain minimal and efficient. Furthermore, the data compression ratio of 23.9× achieved by the autoencoder significantly reduces communication and storage overhead on the blockchain. These observations collectively suggest that DeepChainIoT is both computationally and structurally feasible for integration into real-world IoT–edge–blockchain frameworks.
5.6. Addressing Security Under Attack Scenarios
While DeepChainIoT implementation currently evaluates anomaly detection using only genuine and malfunctioning sensor readings, empirical testing under adversarial conditions such as Sybil or DDoS attacks is an important next step. The use of permissioned blockchain (Hyperledger Fabric) inherently restricts unauthorized participation, which can mitigate Sybil attacks. Moreover, the integration of an LSTM autoencoder for anomaly detection enables early identification of abnormal patterns, which is a widely adopted approach for detecting volumetric anomalies such as those caused by DDoS attacks. Existing research, however, supports the theoretical resilience of our framework. For example, Meidan et al. [
122] demonstrated that LSTM-based autoencoders can effectively detect network-based IoT botnet attacks (e.g., Mirai and BASHLITE), showing strong real-time performance at the network edge. Likewise, Wei et al. [
123] proposed an LSTM autoencoder architecture that achieved over 99% accuracy in detecting reflection-based DDoS attacks (DNS, LDAP, SNMP) in multivariate time-series data. Furthermore, Wang and Chu [
120] and Guggenberger et al. [
121] explore how richer chaincode logic and blockchain complexity can be resilient against threats like Sybil attacks by leveraging membership control and validation logic, implying that permissioned blockchains such as Hyperledger Fabric have inherent Sybil resistance properties.
These studies indicate that frameworks similar to ours combining LSTM autoencoder detection with permissioned blockchain are conceptually equipped to mitigate both volumetric and identity-based attacks. While no such attacks have been simulated within DeepChainIoT, its architecture aligns closely with prior models that have been validated under these threat conditions. Future work involves attack simulations and adversarial testing (e.g., using synthetic Sybil and DDoS scenarios) in our future work to practically demonstrate and validate the security strength of our framework.
5.7. Data Privacy Consideration
Even though DeepChainIoT stores only anomaly-free encoded outputs or anomaly flags on-chain avoiding raw IoT data, it is important to acknowledge that privacy risks such as inference attacks or metadata leakage still require careful consideration. To further enhance confidentiality, homomorphic encryption (HE) can be applied, enabling computations on encrypted data without decryption and thus preserving privacy during model validation or data aggregation [
124,
125]. Additionally, zero-knowledge proofs (ZKPs) offer a mechanism to verify transaction validity or model decisions without revealing any underlying information [
126,
127]. Secure multi-party computation (SMPC) [
128] or confidential computing techniques [
129] can also be incorporated to split processing across multiple parties or within trusted execution environments, further mitigating the risk of data exposure.
For practical compliance with data protection regulations (e.g., the GDPR), an approach can be proposed that involves using off-chain storage for raw data (such as IPFS), combining it with on-chain encoded outputs and incorporating advanced privacy-preserving techniques like HE, ZKP, or SMPC. Although our current implementation does not yet integrate these techniques, future work will explore their integration to ensure that DeepChainIoT not only maintains performance and security but also meets privacy standards and regulatory requirements.
5.8. Impact on User Experience, Trust, and Data Control
DeepChainIoT significantly enhances user experience by improving storage efficiency and response time and strengthening data security and overall system trust. During evaluation (cf.
Section 5.2), out of 220,320 data entries collected from 52 sensors, 14,484 anomalous entries (6.57%) were accurately identified and excluded by the LSTM autoencoder, preventing unnecessary processing of malicious data and reducing network congestion. This early rejection of anomalous transactions during the validation phase saves time, streamlines transaction processing, and improves system responsiveness. Furthermore, this targeted detection reduces the computational and validation load on normal, non-malicious nodes, enhancing the overall user experience.
Trust is further reinforced by an adaptive node rating mechanism that ensures only reliable nodes participate in the consensus process. The model groups data into 14,484 transaction windows (cf.
Section 5.3), and any sensor exceeding 12,000 anomalous transactions within a window is classified as critical. Sensors such as sensor_0, sensor_05, sensor_10, sensor_11, and sensor_12 were flagged as high risk, demonstrating the system’s effectiveness in isolating compromised nodes. By identifying and removing malicious nodes, DeepChainIoT prevents collusion and Byzantine attacks, thereby strengthening network integrity. Additionally, by dynamically prioritizing transactions, users submitting high-priority requests experience significantly reduced delays compared to traditional PBFT networks, ensuring reliable communication even under heavy load.
The LSTM autoencoder also achieved a compression factor of 23.9, substantially reducing blockchain storage requirements. This not only cuts storage costs but also accelerates synchronization and query operations for both users and validators, resulting in a faster and lighter experience. Verified and encoded transactions stored on-chain guarantee data integrity and make it infeasible for unauthorized actors to manipulate or disrupt the consensus process.
When users request data, they receive encoded transactions from the blockchain rather than raw data. This allows them to perform decryption locally within their own applications, ensuring that sensitive information remains secure even if accessed by unauthorized parties. By allowing only legitimate, non-anomalous transactions into the ledger and continuously monitoring the network to remove malicious nodes, DeepChainIoT ensures that only trusted entities handle user data. As a result, it provides a secure, efficient, and trustworthy IoT data management environment.
5.9. Scalability Considerations
Scalability is a key concern when integrating blockchain and DNNs for IoT security. DeepChainIoT tackles scalability challenges at multiple levels.
DeepChainIoT rejects anomalous transactions before processing them on-chain, reducing the time and resources that would otherwise be spent on them. DeepChainIoT utilizes an LSTM autoencoder to encode non-anomalous transactions, inherently compressing them before storing them in the ledger, which significantly reduces storage overhead and minimizes transaction size, improving the system’s capacity to handle large-scale IoT data.
Traditional PBFT suffers from communication overhead O(n
2) [
20], making it less scalable for large networks. DeepChainIoT overcomes this by prioritizing critical transactions and restricting malicious nodes from participating in consensus.
The LSTM autoencoder is lighter weight compared to traditional deep learning models. The LSTM autoencoder model processes transactions in real time during the initial validation phase. Since only the non-anomalous subset of transactions is sent to the blockchain for validation, the workload of the blockchain network is reduced. Blockchain decentralization also enables the simultaneous update of the LSTM autoencoder model, ensuring accurate and efficient real-time anomaly detection and transaction encoding.
IoT data is first aggregated, processed, and validated by validating nodes before being forwarded to the entire blockchain network. This offloads computational burden and ensures only verified and essential transactions are added to the blockchain. This prevents network congestion, making the system scalable for large IoT deployments.
As the number of IoT devices grows, our adaptive PBFT consensus mechanism scales dynamically by increasing the number of validator nodes while maintaining efficient transaction processing and using dynamic node rating to prevent consensus slowdowns.
5.10. Cost Analysis
Deploying blockchain technology in real-life smart water systems involves various cost factors that influence feasibility and scalability. DeepChainIoT is designed to optimize performance while addressing potential resource constraints.
DeepChainIoT can be deployed on a permissioned blockchain, e.g., using Hyperledger Fabric. This eliminates direct transaction fees.
Our LSTM autoencoder-based compression achieves a 23.9× data reduction, minimizing storage demands while preserving critical anomaly detection information.
DeepChainIoT employs PBFT consensus, which is more energy-efficient than PoW-based blockchains, making it suitable for IoT applications. The prioritization-based consensus mechanism further enhances efficiency by reducing redundant verifications, lowering overall energy consumption.
5.11. Comparison with Existing Studies
To strengthen our evaluation, a baseline comparison of DeepChainIoT with existing frameworks was conducted, including standalone LSTM, traditional PBFT-only models, and neural networks integrated with blockchain. The standalone LSTM [
130,
131,
132] achieves strong anomaly detection performance but lacks blockchain integration, limiting its applicability for secure IoT communication. Traditional PBFT, while effective for consensus [
133,
134,
135], does not support anomaly detection or data size optimization. Previous frameworks that combined neural networks with blockchain [
79,
136] improved security to some extent but suffered from higher latency and lacked transaction prioritization.
In contrast, DeepChainIoT optimally integrates DNNs and blockchain into a single platform, enabling both technologies to complement each other. This integration supports anomaly detection, data compression, transaction filtering, and node rating, resulting in enhanced end-to-end performance and improved security for IoT networks unlike many existing frameworks [
50,
74,
76,
80,
90] where blockchain and DNNs are implemented separately or not efficiently optimized together. Our DNN model detects anomalies in transactions, transaction senders, and network traffic; discards anomalous transactions; and encodes non-anomalous transactions to reduce the transaction volume and size on the blockchain network, thus addressing storage management issues faced by other studies [
78,
81,
82,
86]. As the encoded data in the blockchain can only be decoded with specialized decoding algorithms, DeepChainIoT also provides a higher level of privacy than many existing frameworks [
49,
86]. Moreover, DeepChainIoT emphasizes the importance of the consensus algorithm, which is often overlooked in other studies [
18,
75]. By optimizing consensus with DNNs, DeepChainIoT prioritizes important transactions and excludes malicious nodes, resulting in an effective node rating mechanism that enhances security and reliability. This is a significant improvement compared to the work of Sapkota et al. [
18]. Additionally, our optimized smart contract and consensus mechanisms help reduce overall network latency and increase transaction throughput, addressing the performance issues that many existing works have struggled with [
14,
75,
85]. In [
19,
20], PBFT consensus optimization with DNNs demonstrates good performance but focuses solely on honest nodes. In contrast, our solution incorporates not only node rating but also transaction prioritization, anomaly detection, and rule-based handling of detected anomalies, which is expected to improve reliability, transactions per second (TPS) performance, and security beyond the approach proposed in [
19,
20]. Overall, DeepChainIoT is a comprehensive framework that demonstrates enhanced security features and improved performance in securing generic IoT networks.
5.12. Challenges in Implementing DeepChainIoT in Real-Life IoT Environments
While DeepChainIoT offers a promising approach to securing IoT applications using blockchain and DNNs, several practical challenges must be considered for real-life deployment.
Blockchain networks introduce transaction validation delays and storage overhead, particularly when processing large volumes of IoT data. DeepChainIoT reduces this by rejecting anomalous transactions and compressing non-anomalous transactions before storage. However, additional optimizations, such as pruning techniques, may be necessary for larger-scale deployments.
As the number of IoT devices grows, consensus mechanisms like PBFT may face performance bottlenecks. While DeepChainIoT optimizes PBFT using dynamic node selection, real-life implementation may require hybrid consensus mechanisms that balance security and scalability.
The effectiveness of anomaly detection depends on model training quality and dataset variations. IoT environments are highly dynamic, and unseen attack patterns could affect detection accuracy. Continuous model retraining and federated learning approaches could enhance adaptability to evolving threats.
Blockchain and deep learning models require significant energy resources, which may be impractical for battery-powered IoT devices. Techniques such as energy-efficient DNN models and lightweight cryptographic methods could help reduce power consumption.
6. Conclusions and Future Work
This paper explores the integration of blockchain and DNNs to develop secure, efficient IoT networks. Our proposed framework—DeepChainIoT—utilizes DNNs to identify malicious transactions, nodes, and network traffic; an optimized PBFT consensus to improve transaction processing efficiency; and blockchain’s decentralization and immutability to ensure the integrity of the DNN model and its training data. More specifically, using an LSTM autoencoder-based DNN algorithm, DeepChainIoT tackles challenges such as forking, latency, throughput, and storage limitations through anomaly detection, secure transaction encoding, and optimized consensus. The empirical evaluation on a pump sensor dataset demonstrated the effectiveness of the LSTM autoencoder-based anomaly detection model, with an accuracy of 99.6%, a recall of 100%, a precision of 97.95%, and an F1-score of 98.97%. The autoencoder also achieved significant data compression, reducing the data size by a factor of 23.9, significantly improving storage and transmission efficiency within the network. Additionally, it effectively identified malicious sensors and categorized them based on the number of anomalous transactions sent within a defined transaction window, enabling appropriate actions to be taken. This efficiently demonstrates the application of the LSTM autoencoder in node rating and prioritization within an optimized consensus mechanism. Despite being evaluated on a particular dataset, the architecture of DeepChainIoT can be adapted and applied to other types of IoT networks. The DNN anomaly detection model can also be redesigned based on the unique characteristics of these IoT systems. Therefore, DeepChainIoT can ensure secure, efficient data transmission and strengthens resilience against malicious activities in generic IoT networks. Compared to existing studies, DeepChainIoT demonstrates significant improvements with its ability to reduce forking, improve latency and throughput, authenticate and monitor node behaviors, detect anomalies, and efficiently store and disseminate data while preserving privacy.
Future research will focus on developing and deploying a functional prototype of DeepChainIoT on a small-scale Hyperledger Fabric network, consisting of multiple peer nodes, an orderer node, and smart contracts integrated with an LSTM autoencoder for anomaly detection. Efforts will also be made to incorporate an LSTM-optimized PBFT consensus mechanism. To evaluate system performance and feasibility in resource-constrained IoT environments, benchmark tests will be performed against key metrics such as transaction throughput, network latency, real-time anomaly detection accuracy, processing time, and resource usage (CPU, memory, and storage).
Deploying DeepChainIoT in real-life IoT applications involves integrating techniques such as Federated Learning to support continual model retraining, thereby improving detection accuracy against evolving threats. Deep learning architectures need to be modified and lightweight cryptographic methods will be used for resource-constrained IoT devices. Off-chain storage strategies, including IPFS and sharding, will also be explored to further minimize on-chain storage overhead.