IDENTIFYING PATTERNS AND MECHANISMS OF AI INTEGRATION IN BLOCKCHAIN FOR E-VOTING NETWORK SECURITY

The study focuses on the enhancement of e-voting blockchain network security through the integration of artificial intelligence. The critical problem addressed is the existing limitations in real-time threat detection and anomaly detection within blockchain transactions. These limitations can compromise the integrity and security of blockchain networks, making them vulnerable to attacks and fraudulent activities. The core results of the research include the development and implementation of sophisticated AI algorithms designed to enhance the monitoring of blockchain transactions and the auditing of smart contracts. These AI-driven advancements introduce unique features, such as the capability to detect and respond to security threats and anomalies in real-time. This significantly strengthens and optimizes the security frameworks of blockchain systems in e-voting. These results are explained by the strategic application of machine learning and natural language processing methodologies. By employing these advanced AI techniques, the study has achieved more accurate and efficient threat detection, thereby addressing the security challenges previously mentioned. The practical applications of these findings are extensive and diverse. Enhanced security mechanisms can be utilized in financial transactions, supply chain management, and decentralized applications, providing a robust framework for improved blockchain-based e-voting security. In conclusion, integrating AI into blockchain security mechanisms addresses current limitations in threat detection and offers a scalable and effective solution for future security challenges


The study focuses on the enhancement of e-voting blockchain network security through the integration of artificial intelligence. The critical problem addressed is the existing limitations in realtime threat detection and anomaly detection within blockchain transactions. These limitations can compromise the integrity and security of blockchain networks, making them vulnerable to attacks and fraudulent activities. The core results of the research include the development and implementation of sophisticated AI algorithms designed to enhance the monitoring of blockchain transactions and the auditing of smart contracts. These AI-driven advancements introduce unique features, such as the capability to detect and respond to security threats and anomalies in real-time. This significantly strengthens and optimizes the security frameworks of blockchain systems in e-voting. These results are explained by the strategic application of machine learning and natural language processing methodologies. By employing these advanced AI techniques, the study has achieved more accurate and efficient threat detection, thereby addressing the security challenges previously mentioned. The practical applications of these findings are extensive and diverse. Enhanced security mechanisms can be utilized in financial transactions, supply chain management, and decentralized applications, providing a robust framework for improved blockchain-based e-voting security. In conclusion, integrating AI into blockchain security mechanisms addresses current limitations in threat detection and offers a scalable and effective solution for future security challenges Keywords: artificial intelligence, blockchain, network security, smart contracts, e-voting, optimization
UDC 004.896DOI: 10.15587/1729-4061.2024.305696

Introduction
The integration of Artificial Intelligence (AI) with blockchain technology represents a significant leap forward in enhancing the security and efficiency of digital Therefore, studies that are devoted to exploring the integration of AI in blockchain technology are of significant scientific relevance.They address the critical need for enhanced security in modern digital infrastructures and contribute to the development of technologies that will shape the future of secure digital transactions.

Literature review and problem statement
The integration of artificial intelligence with blockchain technology can significantly enhance network security.Recent studies [2] demonstrate that AI models like neural networks can improve transaction security and efficiency through real-time monitoring and fraud detection.However, unresolved issues related to the scalability of blockchain networks, and the real-time detection of sophisticated cyber threats persist.These challenges stem from limitations in processing capabilities when handling high transaction volumes and complex threat patterns, as the computational demands of AI often exceed the capabilities of current blockchain systems, leading to potential bottlenecks and inefficiencies.
Further research [3] explored the use of collaborative threat intelligence to enhance IoT security via blockchain and machine learning integration.This study demonstrated the potential of ensemble learning techniques and federated learning frameworks to improve threat detection and response times.However, unresolved issues persist in the implementation of real-time anomaly detection and optimization of network performance in dynamic environments.These difficulties are compounded by the high costs and complexity of maintaining advanced AI systems, which can limit their practical deployment in large-scale IoT networks.
A comprehensive review [4] highlighted the benefits of using blockchain for secure, decentralized AI in cybersecurity.The researchers employed blockchain-based AI models to ensure data integrity and enhance security measures.Significant challenges such as automated auditing of smart contracts and efficient scaling of blockchain networks were identified.These unresolved issues suggest a need for further research to develop methods for automatic vulnerability detection in smart contracts and to optimize blockchain performance.Automated auditing of smart contracts, while promising, faces hurdles in accurately identifying and mitigating vulnerabilities without human intervention.
Another study [5] investigated the influence of blockchain and AI on audit quality, providing evidence from Turkey.Their findings showed that blockchain could enhance audit transparency and security through AI-driven audit processes and anomaly detection models.However, unresolved issues related to the integration of AI for real-time anomaly detection and the automated auditing of blockchain transactions, along with significant cost implications, make further research into cost-effective solutions necessary.The financial burden of adopting AI-driven blockchain solutions can be prohibitive, particularly for small and medium-sized enterprises.
Research [6] discussed the integration of explainable AI and blockchain in smart agriculture, focusing on decision-making and improved security.The study utilized AI techniques such as decision trees and explainable neural networks to enhance transparency and decision-making processes.While their study demonstrated significant potential still face significant security vulnerabilities, particularly in smart contracts and network scalability, which could potentially undermine their effectiveness.
The importance of this scientific topic is highlighted by the persistent and evolving nature of cyber threats targeting blockchain systems.Traditional security measures are increasingly inadequate in addressing these sophisticated threats, necessitating innovative solutions.Leveraging AI and machine learning within blockchain frameworks enhances network security by providing robust solutions to counter these threats.AI algorithms can monitor and analyze blockchain transactions in real-time, identifying patterns that indicate fraudulent activity, potential security breaches, or anomalous behavior.This proactive detection allows for immediate responses, securing the network before malicious actors can exploit vulnerabilities.Moreover, AI-driven security protocols can adapt and evolve based on new data, ensuring that the blockchain's defense mechanisms improve over time.
By integrating AI and machine learning for enhanced security, blockchain networks not only benefit from the inherent security features of distributed ledger technology but also gain a dynamic and adaptive shield against cyber threats, making them more resilient and trustworthy.The susceptibility of smart contracts to malicious exploits and the complexity involved in managing and scaling blockchain networks remain significant challenges.These issues are compounded by the dynamic nature of cyber threats, which conventional security mechanisms often fail to address comprehensively.Recent studies indicate that over 90 % of smart contracts contain at least one security vulnerability, underscoring the critical need for improved security measures [1].Given the urgency of addressing these security vulnerabilities, this work focuses on developing AI-integrated solutions for blockchain security.The study proposes novel AI-based approaches to tackle specific unresolved challenges such as real-time threat detection, smart contract vulnerabilities, and network performance optimization.The contributions of this research are threefold: first, it develops an AI-based framework employing advanced machine learning models, such as Isolation Forests and Neural Networks, to identify and mitigate potential security threats in real-time within blockchain transactions; second, it introduces an automated auditing process using AI to preemptively identify and rectify vulnerabilities in smart contracts before deployment; and third, it applies neural networks to optimize data flow and validation processes within blockchain networks, significantly enhancing their efficiency and scalability.
The necessity of conducting research on this topic in modern conditions is driven by the growing reliance on blockchain technologies across various industries, from finance to healthcare.As these technologies become more integrated into critical infrastructure, the risks associated with their vulnerabilities also increase.Research in this area is crucial for developing AI-enhanced security protocols that can protect blockchain networks from current and future threats.
The practical implications of these studies are profound.By fortifying blockchain networks with AI, it I possible to create more resilient systems that not only withstand cyber-attacks but also improve the overall efficiency of digital transactions.This advancement will pave the way for broader adoption of blockchain technology, ultimately leading to more secure and efficient digital economies.
Contemporary research highlights key findings on integrating AI with blockchain technology.AI, particularly neural networks and machine learning, significantly enhances blockchain security through advanced monitoring and fraud detection.However, challenges such as scalability and real-time data processing hinder widespread adoption due to high computational demands and complexity.
This leads to the central research problem: developing scalable and efficient AI-integrated solutions for real-time application in blockchain networks.Current research shows a critical gap in achieving robust security without compromising performance and scalability.The literature highlights several persistent challenges in the integration of AI with blockchain technology, including the scalability of blockchain networks, the real-time detection of complex cyber threats, and the automated auditing of smart contracts.These challenges are compounded by the high computational demands of AI-driven solutions, which hinder their practical deployment on a large scale.Despite ongoing research, a significant gap remains in achieving robust security and operational efficiency without compromising scalability.All this allows to assert that it is expedient to conduct a study on developing scalable, efficient AI-integrated solutions that effectively address these critical issues, thereby enabling the widespread and practical application of AI within blockchain networks.

The aim and objectives of the study
The aim of this study is to improve the security and efficiency of blockchain networks by integrating advanced AI and machine learning methodologies.This study specifically targets real-time threat detection, smart contract security, and network performance optimization, thus contributing to the understanding and practical application of AI in blockchain systems.
To achieve this aim, the following objectives are accomplished: -develop a real-time anomaly detection framework: by integrating AI models, such as Isolation Forests and Neural Networks, into blockchain systems for real-time anomaly detection, the outcome will be the establishment of a framework that can identify and mitigate potential security threats as they occur; -automate smart contract auditing: the desired outcome is to implement NLP methods to detect and rectify security issues in smart contracts prior to deployment; -optimize network performance: the objective is to develop neural network models to optimize data flow and transaction validation processes within blockchain networks.The outcome is to enhance the scalability and efficiency of blockchain networks through AI-driven optimizations.

Materials and methods
The object of this study is the blockchain network, focusing on enhancing its security and efficiency through the integration of advanced AI and machine learning methodologies.The primary hypothesis is that AI-driven solutions can significantly improve anomaly detection, smart contract auditing, and network performance in blockchain systems.The study assumes a blockchain environment and considers benefits, unresolved issues related to the practical implementation and real-time processing capabilities of these technologies in large-scale operations were highlighted.Innovative approaches are required to integrate AI and blockchain more efficiently to overcome these difficulties.The scalability and real-time data processing needs of smart agriculture applications present unique challenges that current AI-blockchain integrations struggle to meet.
Investigations [7] examined miner selection in blockchain using Proof of Artificial Intelligence, showing how AI can optimize the mining process.They utilized reinforcement learning algorithms to improve miner selection and optimize resource allocation.However, unresolved issues related to the scalability of this approach and its applicability in real-time scenarios remain.The fundamental challenge lies in adapting AI techniques to the specific needs of blockchain mining while ensuring real-time efficiency.The proof-of-AI approach, while innovative, requires significant computational resources, which may limit its practicality in real-world applications.
Additional studies [8] on leveraging AI within blockchain frameworks showed enhanced network security by monitoring and analyzing transactions in real-time.The integration of AI and machine learning significantly improves network security by identifying fraudulent activities and potential security breaches.However, significant security vulnerabilities in smart contracts and network scalability issues persist, highlighting the need for scalable, robust AI solutions.
Recent research [9] emphasized AI-driven security protocols that adapt and evolve based on new data, improving blockchain defenses over time.The study demonstrated the potential of using advanced AI algorithms to provide real-time analysis and threat detection.Despite these advancements, practical integration into existing systems remains a challenge due to computational demands and the need for continuous updates to the AI models to handle new types of threats.
A study [10] analyzed the role of AI in enhancing blockchain's real-time threat detection capabilities.It was found that advanced algorithms like Isolation Forests and Neural Networks can provide immediate responses to potential threats.However, integrating these AI techniques with blockchain poses significant technical and computational challenges.The study highlighted the need for more efficient algorithms and better integration strategies to overcome these issues.
Research [11] discussed the potential of using Natural Language Processing (NLP) for automated smart contract auditing.It suggested that NLP could streamline the auditing process and reduce errors by automatically identifying and rectifying vulnerabilities before deployment.However, developing robust NLP models that can handle the complexity of smart contracts remains challenging.The study pointed out the necessity for further research to enhance the accuracy and reliability of NLP techniques for smart contract auditing.
Lastly, studies [12] on neural networks for blockchain network performance optimization showed potential in enhancing efficiency and scalability.The research demonstrated how neural networks could optimize data flow and validation processes within blockchain networks.However, implementing these techniques requires sophisticated algorithms and significant computational resources, indicating a need for advanced research to develop more efficient solutions.the challenges of real-time processing, data integrity, and scalability.
The research hypothesizes that AI models can be effectively integrated into blockchain systems to provide real-time anomaly detection without compromising performance.It also posits that Natural Language Processing (NLP) techniques can automatically and accurately audit smart contracts, ensuring their security and reliability.Additionally, the hypothesis suggests that neural networks can optimize data flow and validation processes within blockchain networks, enhancing efficiency and scalability.The assumptions underlying this research include the ability to simulate the blockchain network with synthetic datasets and the effectiveness of historical data in training AI models for predictive accuracy.Furthermore, it is assumed that the necessary computational resources required for AI model training are available.
Theoretical methods.
The research employs a combination of advanced AI methodologies tailored to enhance the security features of blockchain technologies.For anomaly detection, the Isolation Forest Algorithm was chosen due to its effectiveness in identifying outliers within high-dimensional datasets, making it ideal for detecting anomalies in complex transaction data.The algorithm was implemented using the Scikit-learn library in Python, and the model was trained on a synthetic dataset representing typical blockchain transactions.This dataset included features such as transaction amounts, types, timestamps, account balances, and transaction frequencies.
For smart contract auditing, several specific methods of Natural Language Processing (NLP) were employed, including tokenization, part-of-speech tagging, named entity recognition, and dependency parsing.These techniques analyze and extract meaningful patterns from smart contract code, enabling the identification of potential vulnerabilities.NLP tasks were handled using the Natural Language Toolkit (NLTK) in Python, with models trained on historical data to recognize patterns and anomalies in smart contract code.
To optimize network performance, various neural network architectures were employed, including Recurrent Neural Networks (RNNs) for sequence prediction tasks within blockchain transaction data, Convolutional Neural Networks (CNNs) for identifying patterns and anomalies in smart contract code, and Feedforward Neural Networks for general optimization of data flow and transaction validation.Neural networks were chosen for their ability to handle complex patterns and large datasets efficiently.These models were built and trained using TensorFlow and Keras in Python.
Neural network architecture.
The multi-level neural network architecture consists of several layers.The input layer receives raw transaction data, including transaction types, amounts, timestamps, and originating nodes.The first hidden layer consists of neurons that apply activation functions such as ReLU (Rectified Linear Unit) to capture initial transaction patterns.The second hidden layer uses LSTM (Long Short-Term Memory) cells to model sequential dependencies and detect temporal anomalies.The third hidden layer comprises convolutional layers to identify spatial patterns and relationships in smart contract code.Finally, the output layer provides the final decision on routing optimizations and validation results, determining the most efficient pathway for data and confirming transaction legitimacy.

Technical setup.
The technical setup for the research included the development environment of Jupyter Notebooks for interactive coding and data visualization.The hardware configuration consisted of a high-performance computing cluster with multi-core Intel Xeon E5-2690 v4 processors (2.60GHz), 64 GB of RAM, NVIDIA Tesla P100 GPUs with 16 GB memory for accelerated machine learning model training, 1 TB SSD for fast data access and processing, and the Ubuntu 18.04 LTS operating system.
Performance indicators.
To ensure comprehensive analysis and evaluation, several performance indicators were identified.These included the accuracy of the AI model, which refers to its correctness in identifying anomalies within blockchain transactions, and detection time, which measures the time taken by the AI model to identify an anomaly from the moment the transaction is recorded.Other indicators included the number of security vulnerabilities identified in the smart contract code (vulnerabilities), the duration required to complete the smart contract audit (audit time), the average time taken to process a transaction within the blockchain network (transaction speed), the percentage of CPU resources utilized during peak transaction loads (CPU usage), and the amount of memory used during blockchain operations (memory utilization) [13].Additional indicators were the total cost of maintaining the blockchain network, including energy consumption and hardware maintenance (operational costs), the percentage of time the system is operational without downtime (system reliability), the transactions per second the system can manage during peak loads (load handling), and the total energy consumed by the network (energy consumption).
Anomaly detection system.
To create a comprehensive anomaly detection system, a synthetic dataset representing typical blockchain transactions was generated.Advanced feature engineering techniques were employed to enhance the model's predictive accuracy, involving the encoding of categorical variables and scaling of continuous features.The Isolation Forest model was trained on the pre-processed synthetic dataset, undergoing multiple iterations with cross-validation to ensure its robustness.
Fig. 1 provides a high-level overview of the integrated AI-blockchain workflow.Below is a detailed description of its execution: 1. Data collection: transaction data and smart contract code are collected from the blockchain network.Data is pre-processed to handle missing values, normalize numeric features, and encode categorical variables.
2. Anomaly detection: the pre-processed transaction data is fed into the Isolation Forest algorithm.The algorithm identifies outliers and flags suspicious transactions for further review.5. Performance monitoring: the system continuously monitors performance metrics to ensure real-time threat detection and response.Identified anomalies and vulnerabilities are logged and addressed promptly.Fig. 2 shows a code segment illustrating the implementation of the Isolation Forest algorithm for detecting anomalies in blockchain transaction data.It includes the initialization and fitting of the model with specific hyperparameters (n_estimators and contamination) to the scaled data.The code then predicts anomalies, integrating the results into the original DataFrame (Fig. 2).Anomalies are labeled '1' and normal transactions are labeled '0'.Previous research has highlighted the effectiveness of the Isolation Forest algorithm in high-dimensional datasets for detecting anomalies and fraud [14], supporting its use in our study for real-time anomaly detection in blockchain transactions.
Validation of proposed solutions.
The adequacy of the proposed models was validated using various techniques.The anomaly detection model was assessed through cross-validation to confirm its accuracy and reliability in real-time detection.The NLP approach for smart contract auditing was evaluated by its ability to identify known vulnerabilities in test contracts [15].The effectiveness of the neural networks for performance optimization was measured by simulating network conditions and quantifying improvements in throughput and latency.
Model validation.
The validation of the models was performed through various methods.Anomaly detection models were validated using cross-validation metrics such as accuracy, precision, recall, and F1-score.NLP models for smart contract auditing were tested for their ability to identify known vulnerabilities in test contracts.Neural networks for performance optimization were validated through simulated network conditions, measuring improvements in throughput and latency.
Fig. 3 illustrates the model's capability to flag transactions that significantly deviate from typical patterns, considering a broad range of features indicative of potential fraud or security issues.By integrating diverse transactional attributes, the model enhances its ability to detect anomalies (Fig. 3).The anomaly detection model, using complex features, identified five anomalies from a dataset of 1,000 transactions.This demonstrates the effectiveness of the Isolation Forest algorithm in detecting fraud in high-dimensional datasets, validating its use for identifying anomalies in blockchain transactions [16][17][18][19][20].
Transaction 11: a significant transaction amount with a high account balance and a moderate transaction fee, occurring just after midnight.
Transaction 39: a lower transaction amount from an account with a low balance, zero transactions in the last hour, with a higher-than-average transaction fee, around midday.
Transaction 61: a higher transaction amount late at night with a high account balance, active in the last hour, and a lower transaction fee.
Transaction 67: an exceptionally low transaction amount in the early afternoon from an account with an incredibly low balance, a high number of transactions in the last hour, indicating potentially suspicious activity.
Transaction 76: a moderate transaction amount in the evening from an account with a very high balance, moderate activity, and a low transaction fee (Fig. 3).Transaction 39: a lower transaction amount from an account with a low balance, zero transactions in the last hour, with a higher-than-average transaction fee, around midday.

Fig. 2. Isolation Forest Anomaly Detection Implementation
Transaction 61: a higher transaction amount late at night with a high account balance, active in the last hour, and a lower transaction fee.
Transaction 67: an exceptionally low transaction amount in the early afternoon from an account with an incredibly low balance, a high number of transactions in the last hour, indicating potentially suspicious activity.
Transaction 76: a moderate transaction amount in the evening from an account with a very high balance, moderate activity, and a low transaction fee (Fig. 3).
This approach introduces a more nuanced analysis, considering the broader context of each transaction, which enhances the identification of anomalous behavior.Utilizing a detailed dataset and refined model training techniques aims to increase the accuracy and relevance of anomaly detection in blockchain transactions.
In the anomaly detection and evaluation step, our trained Isolation Forest model scrutinizes transactional data in real-time, flagging anomalies as they occur within the blockchain network.Fig. 3 illustrates this process, showing transaction amounts over time with marked anomalies and tracking the average anomaly score, indicating the severity of deviations from typical transaction patterns.
The anomaly detection score for blockchain transactions using the Isolation Forest algorithm is a crucial metric for identifying potential security threats.This score is derived from several advanced statistical measures, considering both the isolation mechanism and blockchain-specific transaction characteristics.The algorithm isolates observations by randomly selecting a feature and a split value, with anomalies being easier to isolate and having shorter paths in the tree structure [21].
Anomaly score calculation: 1. Path length calculation: for each transaction x, the path length h(x) is the number of edges traversed from the root node to the terminal node.Anomalies typically have shorter path lengths due to fewer conditions required to isolate them.
2. Expected path length: the expected path length E(h(x)) for a random forest of n samples is adjusted by a factor derived from the harmonic number, approximated by 2log(n-1)+0.57721566492(Euler's constant).This adjustment accounts for the natural logarithm of the sample size minus one, providing a normalization that scales with the size of the dataset.

, , E h x c n c n s x n
where c(n) -average path length in an unsupervised random forest; n -the total number of transactions in the dataset; log -the natural logarithm function; 0.5772156649 -the Euler-Mascheroni constant, a mathematical constant used to improve the accuracy of the normalization.
c'(n) is a scaling factor to adjust the sensitivity of the model to the specific dynamics of blockchain transactions.The scaling factor c'(n) is introduced to modulate the response based on transaction complexity and volume, enhancing the model's adaptability to diverse blockchain environments: This derivative c′(n) measures how the normalization constant changes as the dataset size varies.It plays a role in adjusting the sensitivity of the anomaly detection model, particularly in dynamic blockchain environments where transaction volumes and complexities fluctuate.
Anomaly threshold.A critical value τ is set based on the distribution of scores, where s(x,n)>τ indicates an anomaly.The threshold is determined through cross-validation on a data subset, balancing false positives and true positive rates.Blockchain-specific adjustments consider varying transaction attributes, such as amount, gas fees, and contract interactions.The model can weigh these attributes differently, making it sensitive to nuances in blockchain transactions that might indicate sophisticated fraud attempts or irregularities.
By applying this refined scoring method in blockchain monitoring, transactions that significantly deviate from typical patterns are flagged.This enhanced detection capability allows blockchain network managers to preemptively address potential threats before they can impact the network's integrity.
The Fig. 4 represents the collaborative role of Artificial Intelligence and Blockchain in fortifying data security frameworks.AI contributes by detecting potential security breaches, authenticating user identities, and optimizing smart contract functions [22].Conversely, Blockchain fortifies the integrity of data through its immutable transaction records, secure storage solutions, and transparency in supply chain operations.Together, they form a robust defense against cyber threats, ensuring a secure digital environment (Fig. 4).
Blockchain's inherent attributes of immutability and decentralization enhance security.Immutability ensures transactions are tamper-proof once recorded, while decentralization distributes the ledger across many nodes, reducing the risk of a single point of failure compromising the network.AI enhances these features by adding intelligent monitoring and decision-making, bolstering blockchain integrity through advanced real-time analysis.AI algorithms can scrutinize the consensus process in decentralized networks to detect anomalies, such as those indicating a 51 % attack, where an entity attempts to control most of the network's hashing power.

1. Development of an AIbased framework for real-time anomaly detection resulted in increased efficiency and accuracy
The first task was to develop an AI-based framework for real-time anomaly detection in blockchain transactions.As a result, the application of AI algorithms demonstrated significant improvements in identifying and mitigating security threats within blockchain networks.The AI-audited smart contracts showed a marked reduction in vulnerabilities, while the optimized network management algorithms enhanced overall system efficiency and resilience.
The proposed framework in the Fig. 5 leverages AI technologies according to Fig. 1, 2, specifically Isolation Forest and Neural Networks, to detect anomalies in blockchain transactions in real-time.This framework is designed to enhance the efficiency and accuracy of anomaly detection, thereby improving overall network security.
The data ingestion layer collects real-time transaction data from the blockchain network, cleans and normalizes it, and extracts relevant features like transaction amounts and sender-receiver patterns [23,24].
The anomaly detection engine includes an Isolation Forest model, which trains on historical data to learn normal patterns and identify outliers, and a neural network model, which enhances detection by learning complex patterns and relationships (Fig. 5).
Then as it shown in the Fig. 5 the decision layer assigns anomaly scores to transactions, generates alerts for high scores, and continuously updates models with new data to improve accuracy.This framework developed according to the results of Fig. 3, 4.
The framework's visualization and reporting components include a real-time dashboard and reporting tools for detailed anomaly reports.
Integration and deployment are facilitated by an API layer for seamless integration and a deployment pipeline for automated model delivery and monitoring.
The workflow involves collecting and preprocessing real-time data, training anomaly detection models on historical data, performing real-time anomaly detection, generating alerts, and updating models with new data to maintain accuracy (Fig. 5).Fig. 6 illustrates the network performance metrics before and after the implementation of neural networks.The graph compares: -transaction processing speed (TPS): measured in transactions per second (tps), shown in red.Solid lines represent performance before AI implementation, and dashed lines represent performance after; -data validation times (DVT): measured in milliseconds per transaction, shown in blue.Again, solid lines indicate the metric before AI, and dashed lines after (Fig. 6).
The deployment and auditing of smart contracts are critical to ensuring the security and reliability of blockchain transactions [25].AI techniques, particularly Natural Lan- guage Processing (NLP), are employed to automatically audit smart contract code, identifying patterns historically correlated with vulnerabilities.This proactive approach mitigates risks by addressing potential flaws before the contracts are deployed.Table 1 provides a quantitative summary of the improvements across various system performance metrics post-AI integration.Significant enhancements are observed in areas like anomaly detection accuracy and smart contract auditing, with AI adoption leading to considerable reductions in detection times and vulnerabilities.These pivotal findings underscore the transformative impact of AI integration into blockchain technology.
Calculating resource-oriented parameters: 1. Anomaly detection.Accuracy (%) measures how well the AI model identifies anomalies compared to total transactions, reflecting improved anomaly distinction.Detection time (s) indicates the time taken to identify an anomaly from the moment a transaction is recorded, with reduced time signifying faster anomaly detection.
2. Smart contract auditing.The number of identified vulnerabilities in smart contract code indicates pre-deployment security improvements [26].Audit time (min) measures the time needed to complete an audit, with shorter times leading to quicker deployment.
3. Network performance.Transaction speed (s) is the average time to process a transaction, assessed before and after AI integration.CPU usage (%) shows the percentage of CPU resources used during peak loads, with lower usage indicating improved efficiency.Memory utilization (GB) reflects memory used during operations, with reduced usage suggesting better resource management.
4. Cost savings.Operational costs ($) were calculated based on the total cost of maintaining the blockchain network, including energy consumption and hardware maintenance.AI optimization reduces these costs by enhancing efficiency.
5. User satisfaction.System reliability (uptime %) is a percentage of time the system is operational without downtime.Improved reliability enhances user trust and satisfaction.
6. Scalability.Load handling (TPS) is the transactions per second the system can handle during peak loads.Increased TPS indicates better scalability and capacity to handle higher transaction volumes.7. Environmental impact.Energy consumption (kWh) denotes total network energy use, with lower consumption reflecting a more environmentally friendly system [27].By providing these detailed calculations and explanations, it is possible to ensure transparency in the methodology used to derive the resource-oriented parameters, thereby reinforcing the credibility of the improvements achieved through AI integration.

2. Automated smart contract auditing processes resulted in enhanced security and efficiency
AI techniques, particularly Natural Language Processing, are employed to automatically audit smart contract code, identifying patterns that historically correlate with vulnerabilities.This proactive approach mitigates risks by addressing potential flaws before the contracts are deployed.
The comprehensive workflow for deploying and optimizing smart contracts with AI integration is shown in Fig. 7. Fig. 7 illustrates the comprehensive framework for deploying and optimizing smart contracts.The process begins with initial smart contract code development, followed by an AI-driven auditing phase using NLP techniques to identify vulnerabilities.Detected issues are rectified before final deployment on the blockchain, ensuring security and reducing the risk of exploits.AI algorithms significantly improve identification and mitigation of security threats within blockchain networks.AI-audited smart contracts show a marked reduction in vulnerabilities, while optimized network management enhances overall efficiency and resilience.Compared to existing security measures, the AI-integrated approach demonstrates advantages in transaction processing speed and data validation times over a 24-hour period.
The Table 2 summarizes the key differences and improvements our method offers over traditional approaches.This comparison illustrates the superior capabilities of our AIbased framework in enhancing blockchain network security and performance.By leveraging advanced AI techniques, our solution provides robust, real-time monitoring, fraud detection, and smart contract optimization, addressing the limitations found in current methodologies.The AI implementation in smart contract auditing enhances security by reducing vulnerabilities and improving system efficiency and reliability.Automating auditing tasks speeds up process and ensures higher accuracy in detecting potential flaws, leading to more secure and efficient smart contract deployments and fostering greater trust and stability within the blockchain network.

3. Optimization of blockchain network performance resulted in improved speed and reduced resource utilization
The deployment and auditing of smart contracts are critical to ensuring the security and reliability of blockchain transactions.The application of AI algorithms demonstrated significant improvements in identifying and mitigating security threats within blockchain networks.The AI-audited smart contracts showed a marked reduction in vulnerabilities, while the optimized network management algorithms enhanced overall system efficiency and resilience.
As shown in Table 3, the comparison of system performance metrics before and after AI integration highlights the substantial improvements achieved.Table 3 presents a detailed comparison of system performance metrics before and after AI integration, highlighting improvements in transaction processing speed and data validation times over a 24-hour period.The data underscores the significant impact of AI on enhancing blockchain network security and efficiency (Table 3).
The results demonstrate that AI integration has markedly improved blockchain performance, reducing data validation times and vulnerabilities while increasing transaction processing speed.These advancements contribute to more reliable and secure transactions, fostering greater trust and stability within the blockchain ecosystem.

Discussion of the results of a study on the AI use to improve the security and efficiency of blockchain technologies through anomaly detection and smart contract auditing
The implementation of AI techniques, particularly the Isolation Forest and Neural Networks, has significantly improved both the accuracy and efficiency of anomaly detection.The results, depicted in Fig. 5, 6, illustrate a remarkable improvement in anomaly detection accuracy, from 85 % to 98 %, and a reduction in detection time by 60 %.These enhancements were achieved through continuous model learning from transaction data, which enables the reliable identification of potential threats in real-time.This proves that AI can effectively bolster blockchain security.The integration of AI improved anomaly detection accuracy by 15.3 % and reduced detection time by 60 %, as highlighted in Table 1, significantly enhancing blockchain security.These results demonstrate that AI effectively bolsters the system's ability to detect and respond to potential threats in real-time.
NLP-based AI systems reduced the time required for auditing smart contracts by 66.7 % and identified 80 % more vulnerabilities than traditional manual methods.Fig. 6 illustrates the comprehensive framework for deploying and optimizing smart contracts with AI, showcasing the process from initial code development to the final deployment on the blockchain.The use of AI has not only sped up the auditing process but also ensured higher accuracy in detecting potential security flaws.This result demonstrating that AI integration significantly enhances both the security and efficiency of blockchain networks by proactively mitigating risks before deployment.Table 2 presents a comparative analysis of the developed AI-based framework against existing blockchain solutions, highlighting the superior capabilities of the AI-enhanced approach in real-time monitoring, fraud detection, data security, and smart contract optimization.The study's practical contributions extend to various economic sectors, including financial services, supply chain management, healthcare, government, energy, intellectual property management, and IT, where the AI-driven solutions can improve security, efficiency, and scalability.
As illustrated in Table 3, the deployment of AI algorithms has led to substantial improvements in key performance metrics, including a 150 % increase in transaction processing speed (TPS) and a 50 % reduction in data validation times (DVT).These advancements have also contributed to a marked decrease in resource utilization, as seen in the reduced CPU and memory usage (Table 3).The deployment of AI increased transaction processing speed by 150 % and reduced data validation times by 50 %, as reflected in Table 1, optimizing overall network performance.Additionally, the reductions in CPU and memory usage, along with cost savings, further demonstrate the efficiency gains achieved through AI integration.By leveraging neural networks, the study successfully addressed the scalability issues inherent in traditional blockchain systems, making the network more efficient and capable of handling higher transaction volumes.This result confirms that AI integration not only enhances blockchain security but also significantly improves network performance and efficiency.
Despite the positive results, this study has certain limitations that must be acknowledged.For instance, the Isolation Forest model, while effective, may still produce false positives, and the NLP models might not be universally applicable to all types of smart contracts.Moreover, the training of neural networks requires substantial computational resources, which could be a limiting factor for wider adoption.Future research should focus on minimizing these limitations by refining AI algorithms to reduce false positives, expanding NLP model datasets to cover a broader range of smart contracts, and developing more efficient neural network architectures.Additionally, further integration of AI with other blockchain components, such as consensus mechanisms and data privacy, could lead to even greater advancements in the field.

Conclusions
1. Real-time anomaly detection: we successfully developed and implemented an AI-based real-time anomaly detec-tion system framework using the Isolation Forest algorithm.This framework effectively identified and flagged abnormal activities within blockchain transactions.Quantitative analysis demonstrated an accuracy rate of 95 %, with a precision of 92 % and a recall of 90 %, significantly reducing the risk of undetected malicious activities.Qualitatively, the system provided a robust and scalable solution, enhancing the overall security posture of blockchain networks and fostering greater trust among users and stakeholders.
2. Automated smart contract auditing: we implemented an AI-driven method for automated smart contract auditing using Natural Language Processing (NLP) techniques.This method identified and mitigated vulnerabilities in smart contracts with an accuracy of 93 %.The auditing capability ensured that 85 % of common vulnerabilities were detected and resolved before contract deployment.Qualitatively, this improved the reliability and integrity of smart contracts, facilitating more secure and efficient contract execution processes and reducing the reliance on time-consuming manual audits.
3. Network performance optimization: by optimizing blockchain network performance using neural networks, we achieved substantial improvements in transaction processing speeds and network latency.The neural network model reduced average transaction processing time by 40 % and decreased network latency by 35 %.Qualitatively, this led to a more responsive and efficient blockchain network, capable of handling higher transaction volumes with lower delays.The enhanced performance fostered greater user satisfaction and operational efficiency, enabling the blockchain network to support a broader range of applications and services.
These solutions demonstrate that AI can play a critical role in addressing the vulnerabilities and performance issues in blockchain technology.The research provides robust solutions to the identified challenges, with quantitative benefits in terms of metrics and qualitative improvements in user trust and system reliability.

3 .
Smart contract auditing: NLP techniques are applied to the smart contract code to extract and analyze semantic patterns.The NLP model identifies potential vulnerabilities based on predefined patterns and known issues.4. Neural network optimization: the neural network architecture processes the transaction data to optimize data flow and validation processes.RNNs predict transaction sequences, CNNs analyze smart contract patterns, and the final feedforward layers determine optimization strategies.

Fig. 1 .Fig. 3 .
Fig. 1.Anomaly detection in blockchain transactions workflow , n) -normalized score for a transaction x within a dataset of size n.The score indicates the likelihood of the transaction being an anomaly; E(h(x)) -expected value of the heuristic function h applied to the transaction x.It reflects the initial assessment of the transaction's deviation from normal behavior; c(n) -a normalization constant dependent on n, the number of transactions.It adjusts the score to account for the size of the dataset; c′(n) -the derivative of the normalization constant c(n) with respect to n.It measures how the normalization constant changes as the dataset size varies:

Table 1
Summary of system improvements post AI integration

Table 2
Comparative analysis of own AI solutions for real-time blockchain transaction monitoring with existing solutions

Table 3
Detailed comparison of system performance metrics before and after AI integration