Next Article in Journal
Formulas for the Number of Weak Homomorphisms from Paths to Rectangular Grid Graphs
Previous Article in Journal
The Second-Order Approximation of Superpotentials Based on SUSYQM
Previous Article in Special Issue
A Study on Network Anomaly Detection Using Fast Persistent Contrastive Divergence
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Enhancing Cryptocurrency Security: Leveraging Embeddings and Large Language Models for Creating Cryptocurrency Security Expert Systems

1
Faculty of Information Technology and Computer Science, Nile University, Cairo 12588, Egypt
2
Informatics Department, Electronics Research Institute (ERI), Cairo 11843, Egypt
3
AI Laboratory, DeltaX Co., Ltd., 5F, 590 Gyeongin-ro, Guro-gu, Seoul 08213, Republic of Korea
4
Department of Computer Engineering, Gachon University, Seongnam 13415, Republic of Korea
5
National Telecommunication Institute, Cairo 12578, Egypt
*
Authors to whom correspondence should be addressed.
Symmetry 2025, 17(4), 496; https://doi.org/10.3390/sym17040496
Submission received: 31 January 2025 / Revised: 7 March 2025 / Accepted: 17 March 2025 / Published: 26 March 2025
(This article belongs to the Special Issue Information Security in AI)

Abstract

:
In recent years, the rapid growth of cryptocurrency markets has highlighted the urgent need for advanced security solutions capable of addressing a spectrum of unique threats, from phishing and wallet hacks to complex blockchain vulnerabilities. This paper presents a comprehensive approach to fortifying cryptocurrency systems by harnessing the structural symmetry inherent in transactional patterns. By leveraging local large language models (LLMs), embeddings, and vector databases, we develop an intelligent and scalable security expert system that exploits symmetry-based anomaly detection to enhance threat identification. Cryptocurrency networks face increasing threats from sophisticated attacks that often exploit asymmetric vulnerabilities. To counteract these risks, we propose a novel security expert system that integrates symmetry-aware analysis through LLMs and advanced embedding techniques. Our system efficiently captures symmetrical transaction patterns, enabling robust detection of anomalies and threats while preserving structural integrity. By integrating a modular framework with LangChain and a vector database (Chroma DB), we achieve improved accuracy, recall, and precision by leveraging the symmetry of transaction distributions and behavioral patterns. This work sets a new benchmark for LLM-driven cybersecurity solutions, offering a scalable and adaptive approach to reinforcing the security symmetry in cryptocurrency systems. The proposed expert system was evaluated using a benchmark dataset of cryptocurrency transactions, including real-world threat scenarios involving phishing, fraudulent transactions, and blockchain anomalies. The system achieved an accuracy of 92%, a precision of 89%, and a recall of 93%, demonstrating a 10% improvement over existing security frameworks. Compared to traditional rule-based and machine learning-based detection methods, our approach significantly enhances real-time threat detection while reducing false positives. The integration of LLMs with embeddings and vector retrieval enables more efficient contextual anomaly detection, setting a new benchmark for AI-driven security solutions in the cryptocurrency domain.

1. Introduction

The emergence and rapid adoption of cryptocurrencies have transformed the financial landscape, introducing a decentralized model for secure, peer-to-peer transactions. However, this growth has been accompanied by a rise in security challenges, with cryptocurrencies becoming increasingly targeted by sophisticated cyber threats. As traditional security mechanisms often fall short in addressing these dynamic and complex risks, the need for advanced, AI-driven solutions has become evident. Large language models (LLMs) are one promising approach, offering significant potential for enhancing the security infrastructure within cryptocurrency and blockchain ecosystems. During this process of asset exchange over the blockchain, multiple activities take place. The user initiates a request, which could involve sending or receiving assets, executing a function, or querying data from the blockchain. This request triggers a smart contract, an autonomous piece of code that governs the execution logic according to predefined rules and conditions.
Once the smart contract is activated, it processes the user’s request and generates a corresponding transaction. This transaction is a record of the interaction, encapsulating details such as the involved parties, the action performed, and any resulting asset transfers or state changes. The transaction is then broadcasted to the blockchain network, where it is validated and appended to the distributed ledger—the secure, immutable database that maintains the full history of all blockchain transactions. This interaction sequence ensures transparency, traceability, and security within the blockchain ecosystem, as every action is verifiable and permanently stored. The image highlights how smart contracts automate and enforce interactions, while the distributed ledger guarantees a trusted record, thereby enhancing the reliability and integrity of decentralized applications.
The customization of the asset exchange process on money transfer, which is the core process among cryptocurrencies, begins with the sender, who initiates the transaction by specifying the amount of cryptocurrency to transfer and the receiver’s wallet address. This transaction request is then processed by the cryptocurrency smart contract, which enforces the rules and conditions of the transaction, ensuring it meets network requirements and is correctly formatted.
Once the transaction is validated by the smart contract, it is forwarded to miners within the network. Miners play a critical role in verifying the authenticity of the transaction through consensus mechanisms, such as Proof of Work or Proof of Stake, depending on the blockchain. Upon successful validation, miners bundle the transaction into a block and append it to the distributed ledger, which is the immutable record of all transactions on the blockchain.
Finally, the transaction reaches the receiver’s wallet, where the specified amount of cryptocurrency is credited, completing the transfer. This flow ensures that every transaction is securely validated, recorded, and traceable within the distributed ledger, highlighting the transparency and trust that cryptocurrency networks bring to digital financial transactions.
Figure 1 illustrates the interaction flow among a user, a smart contract, transactions, and the distributed ledger within a blockchain network.
Figure 2 illustrates the flow of a financial transaction within a cryptocurrency network, showcasing the interaction between the sender, a cryptocurrency smart contract, miners, the distributed ledger, and the receiver’s wallet.
Recent studies have explored various applications of LLMs in the realm of blockchain and cryptocurrency security. For instance, He et al. conducted a systematic literature review that examined the application of LLMs for tasks such as smart contract auditing, anomaly detection, and threat intelligence within blockchain systems. This study highlighted challenges like data scarcity and model interpretability while also suggesting areas for further research to improve LLM integration for blockchain security [1].
Another approach to enhancing blockchain security involves combining retrieval augmented generation (RAG) with LLMs to improve smart contract vulnerability detection. Johnson et al. demonstrated that integrating LLMs with retrieval mechanisms to access a database of known vulnerabilities increases accuracy and contextual relevance, enhancing the auditing process of smart contracts [2]. Apart from direct applications in security, blockchain technology itself has been investigated as a means to bolster LLM safety and integrity. Geren et al. proposed that blockchain’s decentralized and tamper-proof data storage could enhance the transparency and security of data used in training and deploying LLMs. Their study addressed both the potential benefits and the challenges of scalability in such an integrated system, providing a holistic view of blockchain’s role in ensuring LLM security [3]. Machine learning, including LLMs and embedding-based approaches, has also shown promise in analyzing blockchain data for applications such as fraud detection and predictive analytics. Kumar et al. reviewed these applications, highlighting the progress made and the opportunities for further research, particularly in developing more robust models and integrating domain-specific knowledge into the analysis process [4]. The potential for LLMs extends beyond technical applications, as explored by Garcia et al., who examined the utility of LLMs, specifically GPT models, in assisting legal professionals within cryptocurrency securities cases. However, although these models can support legal reasoning and regulatory interpretation, the study cautioned that LLMs still require oversight to maintain accuracy and compliance in complex legal scenarios [5]. This paper aims to build upon these insights by proposing a novel cryptocurrency security expert system that integrates embeddings, LLMs, and vector databases for comprehensive threat detection and response. By leveraging a local instance of an LLM, our system ensures data privacy and control, making it suitable for sensitive financial environments. The proposed expert system provides capabilities for real-time threat detection, anomaly identification, and proactive mitigation strategies, addressing existing gaps in cryptocurrency security measures. In doing so, this research contributes to the ongoing development of adaptive, AI-driven security solutions that can evolve alongside emerging threats within the cryptocurrency landscape.
The emergence of cryptocurrencies has transformed the financial landscape, offering decentralized and secure transaction mechanisms. However, the rapid adoption of blockchain technology has also introduced significant security challenges, including phishing attacks, smart contract vulnerabilities, wallet exploits, and fraudulent transactions. Traditional security mechanisms often fail to address these dynamic threats, necessitating advanced AI-driven approaches for cryptocurrency risk mitigation.
Recent advances in LLMs have shown great promise in cybersecurity applications, particularly in threat detection, anomaly identification, and fraud prevention. Transformers, the foundation of modern LLMs, have enabled efficient real-time security monitoring by analyzing unstructured transaction data and identifying attack patterns. Several studies have explored LLM-based intrusion detection, with models such as BERT, GPT-4, and LLaMA proving effective in detecting security anomalies in decentralized systems. For instance, Kheddar et al. (2023) proposed a transformer-based intrusion detection system (IDS) that enhances cybersecurity defenses by leveraging contextual embeddings and anomaly aware architectures [6]. Similarly, Gai et al. (2024) applied LLM-powered anomaly detection in blockchain networks, significantly improving fraud detection rates compared to conventional heuristic models [7].
Embeddings have also played a crucial role in cryptocurrency security, as they enable high-dimensional vector representations of transactions, smart contract behaviors, and fraud patterns. Luo et al. (2023) introduced an embedding-based detection model that maps blockchain transaction sequences to vector spaces, allowing for the detection of fraudulent activity in decentralized finance (DeFi) platforms [8]. Additionally, Li and Wang (2024) integrated LLMs with vector databases to improve transaction monitoring, demonstrating how RAG enhances security decision-making by accessing a repository of known vulnerabilities [9].
Building upon these advancements, our study proposes an LLM-driven expert system that integrates context-aware embeddings and real-time retrieval mechanisms to improve security in cryptocurrency transactions. Unlike prior studies, our framework leverages local LLMs, optimized vector retrieval (ChromaDB), and embeddings-based threat detection, enabling scalable and adaptive risk assessment. Our contributions include the following:
A modular security expert system that employs LLMs and embeddings for contextual anomaly detection in cryptocurrency networks. A comparative evaluation demonstrating a 10% improvement in accuracy over traditional fraud detection methods. A real-time processing pipeline that ensures efficient detection with a latency reduction of up to 50% compared to conventional models. By addressing existing gaps in blockchain security, this work establishes a new benchmark for AI-driven anomaly detection in cryptocurrency transactions.
The structure of this paper is organized as follows: Section 2 provides a comprehensive review of the existing literature on cryptocurrency security systems, applications of embeddings and LLMs in cybersecurity, and current gaps in traditional approaches. Section 3 introduces the proposed framework for the cryptocurrency security expert system, detailing its architecture, the use of embeddings for data representation, and the integration of LLMs for contextual analysis and threat detection. Section 4 outlines the implementation details, including the design of workflows, the integration of Chroma Vector DB, and the methods employed to utilize embeddings and prompting techniques effectively. Section 5 presents the experiments and evaluation, describing the datasets used, key performance metrics (such as accuracy, recall, and precision), and a comparative analysis with traditional methods. Section 6 discusses the challenges encountered during development, such as data handling and computational costs, and highlights future directions, including continuous learning and the adoption of advanced LLMs. Finally, Section 7 concludes this paper by summarizing the key contributions, achievements, and implications of the proposed system for advancing cryptocurrency security.

2. Literature Review

This section explores recent improvements in cryptocurrency security, focusing on existing security systems, standards, and best practices. It begins with an analysis of current security protocols in cryptocurrency ecosystems, emphasizing the necessity of continuous improvements to counter evolving threats [10]. The review highlights the importance of due diligence in the security of cryptocurrency, stressing the best practices essential to protect digital assets [11]. Key frameworks such as the cryptocurrency security standard (CCSS) are discussed, describing their structure and role in risk mitigation [12]. The section also examines the auditing process for CCSS compliance, underscoring the value of regular audits in secure platforms [13]. Practical guides for individuals and organizations are reviewed, covering best practices such as using hardware wallets, enabling two-factor authentication, and understanding the inherent strengths and limitations of the blockchain [14,15,16,17]. In addition, privacy considerations are discussed, including methods to improve privacy within cryptocurrency transactions [18]. In general, this section synthesizes a wide range of studies to highlight the current state of cryptocurrency security and best practices for both users and platforms.

2.1. Overview of Cryptocurrency Security Challenges

The rapid proliferation of cryptocurrencies has introduced significant security challenges that require a comprehensive understanding of existing security systems and standards. This section examines recent advances in cryptocurrency security, focusing on current measures, standards, and best practices. He et al. provide an in-depth analysis of current security measures in cryptocurrency systems, discussing prevalent threats, and evaluating existing defense mechanisms [10]. The study highlights the need for continuous improvement in security protocols to address evolving threats in the cryptocurrency landscape. Johnson emphasizes the importance of due diligence in cryptocurrency security, outlining best practices and standards for safeguarding digital assets [11]. The article underscores that thorough research and adherence to security protocols are crucial for protecting investments in the volatile cryptocurrency market. CCSS is a framework designed to enhance the security of cryptocurrency systems. Smith provides insights into the structure and application of CCSS, detailing how adherence to the standard can mitigate risks associated with digital asset management [12]. Building upon the CCSS framework, Martinez discusses the auditing process for ensuring compliance with security standards [13]. This work highlights the role of regular audits in maintaining high security standards within cryptocurrency platforms, thereby fostering trust among users. Chen’s guide provides a comprehensive overview of various aspects of cryptocurrency security, including best practices, common vulnerabilities, and strategies for protecting digital assets [14]. It serves as a valuable resource for both novice and experienced users aiming to enhance their security posture in the cryptocurrency space. Wilson’s guide offers an overview of cryptocurrency security, discussing common threats and providing recommendations for securing digital assets [15]. This guide emphasizes the importance of user education and proactive measures in preventing security breaches. Roberts offers practical tips for enhancing cryptocurrency security, focusing on individual measures to protect assets [16]. The article includes advice on using hardware wallets, enabling two-factor authentication, and staying vigilant against phishing attacks. Wu examines the inherent security features of blockchain technology, evaluating its strengths and potential vulnerabilities [17]. This work provides a balanced perspective on the security assurances offered by blockchain and the areas where caution is warranted. Lopez explores the privacy aspects of cryptocurrencies, discussing how users can enhance their privacy and security [18]. This article delves into techniques such as using privacy-focused coins and employing mixing services to obfuscate transaction trails. Brown provides a comprehensive guide to CCSS, detailing its requirements and implementation strategies for ensuring robust security in cryptocurrency systems [19]. This work serves as a roadmap for organizations aiming to achieve compliance and strengthen their security frameworks. Collectively, these works provide a thorough understanding of the current state of cryptocurrency security, highlighting the importance of standards like CCSS, the necessity of due diligence, and practical measures for individuals and organizations to safeguard their digital assets.

2.2. Existing Applications of Embeddings and Large Language Models in Cybersecurity

The integration of embeddings and LLMs into cybersecurity has garnered significant attention, leading to advancements in threat detection, vulnerability assessment, and strategic defense mechanisms. Nourmohammadzadeh Motlagh et al. provide a comprehensive review of LLM applications in cybersecurity, highlighting their dual role in enhancing defense mechanisms and the potential for misuse [20]. The study categorizes the articles within the existing literature using frameworks, like NIST and MITRE ATT&CK, offering a structured understanding of LLMs’ impact on cybersecurity. Ranade et al. introduce CyBERT, a domain-specific BERT model fine-tuned with extensive cybersecurity data [21]. CyBERT demonstrates high accuracy in tasks such as named entity recognition and multi-class classification, showcasing the benefits of contextualized embeddings tailored for the cybersecurity domain. The development of Crimson, as presented by authors in [22], exemplifies the application of LLMs in strategic reasoning within cybersecurity. Crimson enhances threat anticipation and defense strategies, underscoring the potential of LLMs in proactive cybersecurity measures. The exploration of generative AI and LLMs in cybersecurity is further expanded in [23], where the authors discuss applications across various domains, including hardware design security, intrusion detection, and malware detection. This work emphasizes the transformative potential of LLMs in addressing complex cybersecurity challenges. Privacy concerns associated with embeddings in LLMs are addressed in [24]. The study investigates input reconstruction attacks, where malicious entities could recover user inputs from embeddings, highlighting the need for robust privacy safeguards in distributed learning systems. A systematic literature review by authors in [25] provides a holistic view of LLM applications in cybersecurity. The survey covers diverse problems addressed by LLMs, offering insights into their effectiveness and areas requiring further research. The evaluation of LLMs’ performance in cybersecurity contexts is discussed in [26]. The article emphasizes the necessity for benchmarks that accurately reflect real-world scenarios, ensuring that LLMs’ capabilities are effectively harnessed in cybersecurity applications. Recommendations for evaluating LLMs in cybersecurity are provided by the Software Engineering Institute and OpenAI in [27]. The white paper advocates for assessments using complex, real-world scenarios to understand LLMs’ capabilities and risks comprehensively. The implications of LLMs in cybersecurity, including potential threats and safety measures, are explored in [28]. This work offers a nuanced perspective on the dual-edged nature of LLMs in the cybersecurity landscape. Lastly, the integration of generative AI and LLMs in cybersecurity is comprehensively reviewed in [29]. The chapter discusses benefits, challenges, and diverse methods, providing a foundational understanding of LLMs’ role in modern cybersecurity practices. Collectively, these studies underscore the transformative impact of embeddings and LLMs in cybersecurity, highlighting both their potential benefits and the challenges that accompany their integration into security frameworks.

2.3. Gaps in Current Approaches to Cryptocurrency Security and the Potential of LLMs and Embeddings

Despite advancements in cryptocurrency security, significant vulnerabilities persist. Traditional security measures often struggle to keep pace with the evolving tactics of cybercriminals. A report by the U.S. Government Accountability Office highlights regulatory gaps in blockchain-related financial products, underscoring the need for enhanced security protocols [30]. Similarly, a study on the future of cryptocurrency identifies challenges, such as inadequate regulatory frameworks and technological vulnerabilities, emphasizing the necessity for innovative solutions [31]. LLMs and embeddings offer promising avenues to address these security gaps. LLMs can analyze vast amounts of data to detect anomalies and predict potential threats, thereby enhancing the security of decentralized finance platforms [32]. Additionally, LLMs can assist in legal contexts by identifying security vulnerabilities and providing insights into complex cryptocurrency security cases [5]. Embeddings, which transform data into vector representations, facilitate more effective analyses of complex datasets. In the context of cryptocurrency, embeddings can be utilized to construct sentiment indices, providing valuable insights into market dynamics and potential security implications [33]. Furthermore, understanding the building blocks of LLMs, such as vectors, tokens, and embeddings, is crucial for developing robust security frameworks [34]. In summary, integrating LLMs and embeddings into cryptocurrency security strategies can address existing vulnerabilities by enhancing threat detection, providing legal insights, and offering a deeper understanding of market dynamics.

3. Proposed Framework for Cryptocurrency Security Expert System

In this section, we present a comprehensive framework for a cryptocurrency security expert system designed to enhance the security backbone of cryptocurrency platforms. The framework integrates advanced computational techniques to effectively identify and mitigate potential threats.

3.1. Architecture of an Expert System

The architecture of the proposed cryptocurrency security expert system is designed to be modular, scalable, and efficient, addressing the unique challenges associated with analyzing high-dimensional cryptocurrency data and detecting threats in real time. Figure 3 provides a visual representation of the system’s components and their interactions.
  • Frontend Layer
    The system’s user interface is developed using Next.js, a modern framework that ensures a responsive and interactive experience. This layer enables users to submit queries and view insights related to cryptocurrency transactions and potential threats. The frontend communicates seamlessly with the backend through well-defined APIs.
  • Backend Layer
    The backend is powered by Flask, a lightweight web framework, and Python, which serves as the core language for processing user requests and implementing business logic. This layer handles communication between the user interface and the underlying components, ensuring efficient data flow and response generation.
  • LLM Integration
    At the core of the system’s analytical capabilities is LLaMA, a state-of-the-art large language model hosted on the Ollama platform. The LLM is responsible for contextual analysis, anomaly detection, and interpreting transaction patterns to identify potential threats. It uses domain-specific prompts and embeddings to enhance its understanding of cryptocurrency-related queries.
  • Embedding and Data Management
    To process and analyze high-dimensional cryptocurrency data, the system employs Nomic-Embed, an embedding model that converts textual and transactional data into vector representations. These embeddings are stored in Chroma Vector DB, a high-performance vector database that supports efficient retrieval and similarity searches. This setup allows the system to compare current transaction patterns with historical data to identify anomalies effectively.

3.2. RAG-Based System for Active Cryptocurrency Security

Unlike traditional security information systems that primarily serve as knowledge repositories, the proposed RAG-based expert system actively contributes to cryptocurrency security by dynamically retrieving threat intelligence and providing context-aware risk mitigation strategies. The system continuously monitors user queries related to transactions, smart contracts, and security events, retrieving relevant security knowledge from an updated database of attack patterns, vulnerability reports, and fraud case studies. By leveraging LLM-powered contextual analysis, the system not only informs users about potential risks but also generates proactive security recommendations, such as detecting suspicious wallet addresses, identifying vulnerabilities in smart contracts, and advising on best practices for secure cryptocurrency transactions. Furthermore, the integration of real-time retrieval ensures that emerging threats are incorporated into the system’s knowledge base, enabling adaptive security responses rather than static guidance. This real-time adaptability makes the system a practical security enhancement tool rather than just an educational resource.

3.3. Embedding Model and Data Processing

The proposed expert system employs Nomic-Embed, a transformer-based embedding model optimized for high-dimensional text and numerical representations. This model is specifically fine-tuned to capture semantic relationships in cryptocurrency transactions, enabling enhanced retrieval of security knowledge.
To ensure efficient processing, the system segments transaction logs and security reports into 256-token chunks, preserving contextual integrity while maintaining computational efficiency. Each chunk is converted into a dense vector representation using Nomic-Embed’s embedding pipeline, which transforms textual data into a 768-dimensional vector space.
For similarity search and retrieval, we utilize the cosine similarity metric, which measures the angular difference between vector embeddings. This choice ensures that semantically similar transactions or security threats can be effectively retrieved even when exact keyword matches are absent. The embeddings are stored in ChromaDB, a high-performance vector database, enabling real-time similarity search across security intelligence data.
During query processing, user inputs are embedded using the same pipeline and matched against pre-stored transaction embeddings. The retrieval process dynamically pulls the most relevant records from the vector database, enriching the expert system’s ability to provide context-aware threat assessments, anomaly detection insights, and security recommendations. This architecture enhances the system’s ability to adapt to emerging threats in cryptocurrency transactions by leveraging a continuously updated knowledge base.
Embeddings play a crucial role in the expert system by transforming complex cryptocurrency-related data into high-dimensional vector representations. These representations capture semantic relationships and patterns in the data, enabling efficient analysis and contextual understanding. Using Nomic-Embed, the system generates embeddings for transactional data, wallet interactions, and metadata associated with cryptocurrency transactions. These embeddings allow the system to identify anomalies, detect fraud patterns, and analyze trends by comparing current data against historical embeddings stored in Chroma Vector DB. The high-dimensional vectors created through embeddings enable the large language model (LLM) to process and analyze data effectively. This approach bridges the gap between raw data and actionable insights, ensuring that the system can adapt to evolving transaction patterns and emerging threats in the cryptocurrency landscape.

3.4. Utilization of Large Language Models for Contextual Analysis and Pattern Recognition in Threat Identification

LLMs serve as the analytical core of the expert system, enabling advanced contextual understanding and pattern recognition for threat identification. By leveraging LLaMA, hosted on the Ollama platform, the system interprets transactional data, wallet interactions, and associated metadata to identify anomalies and potential threats. The LLM utilizes embeddings generated by Nomic-Embed to perform contextual analysis, connecting transaction patterns with historical data stored in Chroma Vector DB. This allows the system to recognize subtle relationships and deviations, such as fraudulent activities or irregular transaction behaviors. Through domain-specific prompts and continuous learning capabilities, the LLM enhances the system’s ability to adapt to emerging threats, making it an essential element in ensuring strong cryptocurrency security.

3.5. Architecture of the Expert System Using Large Language Models

The proposed expert system leverages LLMs to enhance cryptocurrency security through a modular and collaborative architecture. This design integrates multiple specialized agents, each fine-tuned for specific tasks, to collectively address complex security challenges.

3.5.1. System Overview

The architecture comprises several key components:
  • Specialized Agents: Each agent is an LLM tailored to a particular domain within cryptocurrency security, such as threat detection, transaction analysis, or regulatory compliance. This specialization enables precise handling of domain-specific tasks [35].
  • Collaboration Layer: A coordination mechanism that facilitates interaction among agents, allowing them to share insights and collaboratively solve multifaceted security issues. This layer employs a Mixture of Experts (MoE) approach, where different experts are activated based on the input context, enhancing efficiency and specialization [36].
  • Knowledge Base: A centralized repository that stores domain-specific information, threat intelligence, and historical data. Agents access this knowledge base to inform their analyses and decisions, ensuring consistency and up-to-date information.
  • User Interface: An intuitive interface that enables users to interact with the expert system, submit queries, and receive actionable insights. The interface supports natural language processing, allowing users to communicate in plain language.

3.5.2. Operational Workflow (Algorithm 1)

The system operates through the following workflow:
  • Input Processing: User inputs, such as queries or data streams, are received through the user interface and preprocessed to extract relevant features.
  • Agent Activation: Based on the processed input, the collaboration layer determines which specialized agents are most suitable for addressing the task. The MoE mechanism ensures that only pertinent agents are engaged, optimizing resource utilization [37].
  • Collaborative Analysis: Activated agents perform their respective analyses, accessing the knowledge base as needed. They communicate findings through the collaboration layer, allowing for a comprehensive assessment of the security issue.
  • Response Generation: The system synthesizes the agents’ outputs to generate a coherent and actionable response, which is then presented to the user via the interface.
Algorithm 1 LLM-driven cryptocurrency security expert system.
Require: User Query Q, LLM Model M, Embedding Model E, Vector Database V D B ,
 Knowledge Base K B
Ensure: Security Recommendation Response R
  1:
User Query Processing:
  2:
   Receive user security-related query Q via chat interface
  3:
   Preprocess query (tokenization, keyword extraction)
  4:
Knowledge Retrieval:
  5:
   Retrieve relevant knowledge base entries from K B based on Q
  6:
   Generate contextual embeddings using E
  7:
   Search for similar security patterns in vector database V D B
  8:
Expert System Response Generation:
  9:
   Pass retrieved knowledge and embeddings to LLM M
10:
   Generate security recommendation or risk mitigation advice
11:
   Validate response consistency with expert system rules
12:
User Output and Interaction:
13:
   Present security recommendation response R to the user
14:
   Allow follow-up interactions for clarification or further inquiries
15:
return R as the final expert system recommendation

3.5.3. Advantages of the Architecture

This architecture offers several benefits:
  • Scalability: The modular design allows for the addition of new agents as emerging threats are identified, ensuring the system remains adaptable to the evolving cybersecurity landscape [38].
  • Efficiency: The MoE approach reduces computational overhead by activating only the necessary agents for a given task, leading to faster response times and lower resource consumption [36].
  • Specialization: Each agent’s focus on a specific domain enhances the accuracy and relevance of analyses, providing users with expert-level insights tailored to particular aspects of cryptocurrency security [35].

3.5.4. Implementation Considerations

Key considerations for implementing this architecture include the following:
  • Agent Development: Training LLMs for each specialized agent requires domain-specific datasets and expertise to ensure high performance in their respective areas.
  • Collaboration Protocols: Defining clear protocols for inter-agent communication is essential to prevent information silos and ensure seamless collaboration.
  • Security Measures: Implementing robust security protocols is crucial to protect the system from adversarial attacks and unauthorized access, maintaining the integrity and confidentiality of the analyses.
By integrating LLMs into a collaborative expert system architecture, this approach aims to provide a comprehensive and adaptive solution for enhancing cryptocurrency security.
Figure 3 illustrates the architecture of the proposed cryptocurrency security expert system, which leverages LLMs to provide a comprehensive approach to security analysis and threat mitigation. The system consists of several core components, each responsible for distinct functions within the expert system framework. These components work together to process user inputs, analyze data, and generate insights.
  • User Interface (UI): This component acts as the entry point for the user, where queries or data streams related to cryptocurrency security are received. The UI is designed to support natural language input, allowing users to interact with the system intuitively.
  • Input Processing: Once data are received from the user interface, it passes through the input processing module. This stage includes preprocessing steps, such as data cleansing, feature extraction, and encoding, preparing the data for analysis by specialized agents.
  • Specialized Agents: The architecture includes multiple LLM-based specialized agents, each fine-tuned for specific tasks like transaction monitoring, threat detection, or regulatory analysis. The agents are selectively activated based on the nature of the input, allowing the system to tailor its analysis to specific security contexts.
  • Collaboration Layer: The collaboration layer coordinates interactions between specialized agents, facilitating a cooperative approach to data analysis. By leveraging MoE framework, the collaboration layer ensures that only the most relevant agents are engaged, optimizing both computational efficiency and analytical accuracy.
  • Knowledge Base: This centralized repository provides agents with access to domain-specific information, historical data, and known threat patterns. The knowledge base enhances the agents’ contextual understanding, enabling more accurate threat assessments and response strategies.
  • Response Generation: After analysis, the system synthesizes insights from the activated agents and generates a comprehensive response. This output is delivered back to the user via the user interface, offering actionable security recommendations or answers to specific queries.
This architecture provides a modular, scalable, and efficient approach to cryptocurrency security. By integrating LLMs in a collaborative expert system, the framework is designed to adapt to evolving security challenges, continuously enhancing its threat detection and mitigation capabilities.

3.6. Explanation of Embeddings and Their Representation of Cryptocurrency-Related Data

Embeddings are a fundamental technique in machine learning that transform high-dimensional data into lower-dimensional vector spaces, preserving essential relationships and structures. In the context of cryptocurrency, embeddings facilitate the analysis of complex transaction networks by capturing intricate patterns and associations.
  • Graph-Based Embeddings: Cryptocurrency transactions can be modeled as graphs, where nodes represent entities (e.g., users, wallets) and edges denote transactions. Graph-based embeddings, such as those derived from graph convolutional networks (GCNs), are effective in this domain. For instance, the study by Lo et al. introduced Inspection-L, a self-supervised GNN framework designed for money laundering detection in Bitcoin transactions. This approach generates node embeddings that encapsulate both topological and feature information, enhancing the detection of illicit activities [39].
  • Temporal Dynamics in Embeddings: The dynamic nature of cryptocurrency transactions necessitates embeddings that account for temporal aspects. Temporal graph convolutional networks (T-GCNs) have been employed to capture time-evolving patterns in transaction networks. Chen et al. proposed a motif-aware temporal GCN for fraud detection in signed cryptocurrency trust networks, effectively identifying fraudulent behavior by incorporating temporal motifs into the embedding process [40].
  • Autoencoder-Based Embeddings: Autoencoders, particularly deep convolutional autoencoders, have been utilized to learn embeddings that represent complex market behaviors. The work by McNally et al. demonstrated the application of a deep convolutional autoencoder for cryptocurrency market analysis, enabling the extraction of features that inform predictive models for market trends [41].
  • Textual Data Embeddings: Beyond transaction data, textual information from social media and news sources significantly influences cryptocurrency markets. Embeddings derived from textual data, such as those using FinBERT, capture sentiment and discourse patterns. Jang and Lee developed a multimodal model incorporating Twitter FinBERT embeddings to predict extreme price movements of Bitcoin, highlighting the impact of social media sentiment on market dynamics [42].
  • Comprehensive Analysis Techniques: A holistic approach to analyzing illicit Bitcoin transactions involves integrating various embedding techniques. The survey by Conti et al. provides an overview of analysis techniques for illicit Bitcoin transactions, emphasizing the role of embeddings in uncovering hidden patterns and associations within transaction data [43].
  • Social Media Analysis: Understanding the discourse surrounding cryptocurrencies on platforms like Twitter is crucial. The study “Deciphering Crypto Twitter” explores how embeddings can be used to analyze social media discussions, providing insights into public sentiment and its correlation with market movements [44].
  • Fraud Detection in Ethereum: Machine learning approaches, including LightGBM (LGBM), have been applied to detect fraud in Ethereum transactions. The research by Pham and Lee presents an LGBM-based model for Ethereum fraud detection, demonstrating the effectiveness of embeddings in identifying fraudulent activities [45].
  • Systematic Literature Reviews: Systematic literature reviews, such as the one by Bartoletti et al., analyze how texts are examined in blockchain research, shedding light on the methodologies and embedding techniques employed in the field [46].
  • Ransomware Payment Analysis: Analyzing Bitcoin payments related to ransomware involves understanding the flow of funds and the entities involved. The study by Huang et al. addresses the intelligence applications of Bitcoin payments in ransomware cases, utilizing embeddings to trace and analyze illicit transactions [47].
In summary, embeddings serve as a powerful tool in representing and analyzing cryptocurrency-related data. By transforming complex, high-dimensional information into structured vector spaces, embeddings enable the detection of fraudulent activities, market trend analysis, and the understanding of social media influences within the cryptocurrency ecosystem.

3.7. Use of LLMs for Contextual Analysis and Pattern Recognition in Threat Identification

LLMs have emerged as powerful tools in cybersecurity, particularly in contextual analysis and pattern recognition for threat identification. Their ability to process and understand complex language structures enables them to detect subtle anomalies and patterns indicative of cyber threats.
  • Enhancing Cyber Threat Detection: LLMs, such as BERT, have been adapted for cyber threat detection in IoT and IIoT devices. The SecurityBERT model integrates privacy-preserving encoding techniques to autonomously identify network-based attacks with high precision and minimal computational requirements [48].
  • Advancements in Cybersecurity Applications: The integration of LLMs in cybersecurity has been extensively reviewed, highlighting their capabilities in contextual analysis and pattern recognition. These models enhance real-time cybersecurity defenses by understanding complex patterns and contexts within security data [49].
  • Improving Software Vulnerability Detection: LLMs have been utilized to enhance the detection and handling of software vulnerabilities and cybersecurity threats. Their integration into cyber threat detection frameworks and incident response systems has been emphasized, demonstrating their effectiveness in identifying and mitigating threats [50].
  • State-of-the-Art Applications in Cybersecurity: A comprehensive review of LLMs in cybersecurity examines their roles in both defensive and adversarial applications. The study provides a thorough characterization of their contributions to cyber threat detection and response, highlighting their effectiveness in understanding complex patterns and contexts within security data [20].
  • Emerging Threats in the Age of AI: The use of LLM technology by threat actors has been analyzed, revealing behaviors consistent with attackers using AI as a productivity tool on the offensive landscape. This research focuses on emerging threats in the age of AI, including prompt injections and attempted misuse of LLMs [51].
  • Enhancing Code Analysis Capabilities: Combining LLMs with advanced pattern detection and self-enhancement techniques improves code analysis capabilities. This approach aims to make detection more scalable and improve coverage, catching previously overlooked malicious packages [52].
  • Comprehensive Overview of LLMs for Cyber Defense: A survey provides an overview of recent activities of LLMs in cyber defense, categorizing their applications in threat intelligence, vulnerability assessment, network security, privacy preservation, awareness and training, automation, and ethical guidelines [53].
  • Contextual Object Detection with Multimodal LLMs: Addressing the limitation of multimodal large language models (MLLMs) in object detection, a novel research problem of contextual object detection has been introduced. This work focuses on understanding visible objects within different human–AI interactive contexts, leveraging the capabilities of LLMs in contextual analysis [54].
  • Real-Time Anomaly Detection Using LLMs: The application of LLMs in real-time anomaly detection has been discussed, highlighting how LLMs can be utilized to decipher context and patterns in data. This makes them suitable candidates for anomaly detection by identifying deviations that traditional methods might overlook [55].
In summary, LLMs significantly enhance contextual analysis and pattern recognition in threat identification. Their ability to process complex language structures and understand nuanced contexts makes them invaluable in detecting and mitigating cyber threats.

4. Implementation Details

This section delineates the practical aspects of developing the proposed cryptocurrency security expert system. It encompasses two primary components: an exploration of embeddings and prompting tailored to cryptocurrency-specific data, and the design of workflows integrating with Chroma Vector DB, the chosen vector database for data embedding. The first component delves into the methodologies for generating and utilizing embeddings to effectively represent cryptocurrency-related information, facilitating enhanced contextual analysis and pattern recognition. The second component focuses on the architectural design and integration strategies employed to seamlessly incorporate Chroma Vector DB into the system, ensuring efficient storage, retrieval, and management of embedding vectors pertinent to cryptocurrency security.

4.1. LLM Model Details

The cryptocurrency security expert system utilizes the LLaMA model to provide intelligent, security-related recommendations. Below are key specifications of the model and its integration within the system:

4.1.1. Model Architecture

The system uses the LLaMA 3.2 model with 7 billion parameters, employing a decoder-only Transformer architecture. It is fine-tuned on cybersecurity datasets, including blockchain threat intelligence reports and cryptocurrency security guidelines.

4.1.2. Input–Output Format and Tokenization

The model processes security-related queries in natural language, which are converted into embeddings for retrieval-augmented generation (RAG). It employs the SentencePiece tokenizer, optimized for handling cryptocurrency-related text. The output consists of structured security insights and recommended actions based on retrieved knowledge. The model supports up to 4096 tokens per query, allowing for extensive contextual responses.

4.1.3. Justification for Model Selection

LLaMA 3.2 provides superior comprehension of complex security queries compared to smaller LLMs. Additionally, it offers comparable performance to GPT-4 while maintaining significantly lower computational overhead, making it a more efficient choice for the expert system.

4.2. Justification for Using ChromaDB

The expert system utilizes ChromaDB as the vector database for storing and retrieving embeddings. The selection of ChromaDB over alternatives such as FAISS and Milvus is based on the following criteria:
  • Performance: ChromaDB exhibits efficient query handling and real-time retrieval performance, as shown in Table 1.
  • Scalability: Unlike FAISS, which requires manual partitioning for large datasets, ChromaDB supports automatic sharding and distributed indexing, making it more suitable for handling large-scale security knowledge.
  • Compatibility: ChromaDB seamlessly integrates with the system’s RAG framework, supporting metadata filtering and SQL-like query capabilities that FAISS lacks.
  • Overall Justification: Lower query latency, scalability, and native compatibility with metadata-driven retrieval enhance the efficiency of security-related recommendations.

4.3. Embeddings and Prompting for Cryptocurrency-Specific Data

The system employs advanced embedding techniques and prompting strategies tailored to cryptocurrency data.

4.3.1. Graph-Based Embeddings for Fraud Detection

Cryptocurrency transactions often form network-like structures where entities and interactions are represented graphically. Inspired by graph embedding techniques, we designed a model to capture transactional patterns, aiding in the detection of abnormal activities.

4.3.2. Self-Supervised Node Embeddings for Money Laundering Detection

Money laundering detection is enhanced using self-supervised graph neural network (GNN) embeddings that capture illicit transactional behaviors, improving detection accuracy.

4.3.3. Scalable Embedding Techniques

Large-scale transaction analysis requires scalable embedding methods. The expert system adopts optimized graph embeddings, influenced by RiskSEA, to efficiently process vast amounts of cryptocurrency data.

4.3.4. Sentiment Analysis with Embeddings

Market sentiment impacts cryptocurrency valuation. By integrating FinBERT-generated sentiment embeddings from social media, the system improves the contextual understanding of cryptocurrency trends.

4.3.5. Transaction Graph Analysis

The traversal of cryptocurrency transaction graphs, utilizing embeddings, provides insights into transaction flows and network relationships, improving fraud detection.

4.3.6. Embedding-Based Analysis of Illicit Nodes

Identifying illicit nodes within cryptocurrency networks is crucial. The system implements embedding-based analysis to recognize and track high-risk entities, enhancing security measures.

4.3.7. Fundamental Components of LLMs

Understanding vectors, tokens, and embeddings is essential for effective LLM applications. The system ensures appropriate representation of cryptocurrency-specific data for contextual analysis.

4.3.8. Prompting Techniques for Cryptocurrency Data

Tailored LLM prompts improve the interpretation of cryptocurrency data, enhancing context-specific understanding and risk mitigation.

4.4. Workflow and Integration with Chroma Vector DB

The integration of ChromaDB into the expert system ensures efficient storage, retrieval, and management of high-dimensional embeddings.

4.4.1. Workflow Design

The system follows the following structured steps:
  • Data Collection and Preprocessing: Aggregation and refinement of cryptocurrency transaction data.
  • Embedding Generation: Transformation of data into high-dimensional vector representations.
  • Storage in ChromaDB: Efficient ingestion and management of embeddings.
  • Query and Retrieval: Retrieval of relevant embeddings to support security-related tasks.
  • Analysis and Decision Making: Application of analytical models to retrieved embeddings for threat detection.

4.4.2. Integration Strategy

To optimize ChromaDB performance, the integration adheres to the following principles:
  • API Utilization: Leveraging ChromaDB’s API for efficient embedding operations.
  • Batch Processing: Handling large embedding volumes with optimized batch processing.
  • Indexing Strategies: Using advanced indexing techniques for faster similarity searches.
  • Scalability: Ensuring the architecture supports expanding cryptocurrency security data.
By integrating ChromaDB into our workflow, the system enhances retrieval efficiency, security analysis, and adaptability to evolving cryptocurrency threats. This structured approach ensures that embedding-based security insights remain accurate, comprehensive, and scalable.

5. Experiments and Evaluation

This section presents the evaluation methodology employed to assess the effectiveness of our cryptocurrency security expert system. The evaluation process involved rigorous testing on relevant datasets, with key performance metrics such as accuracy, recall, and precision being measured to gauge the model’s effectiveness. Additionally, we performed a comparative analysis with traditional methods to highlight the benefits and improvements offered by our expert model.

5.1. Datasets Used for Testing

The evaluation of the proposed cryptocurrency security expert system incorporates data from several foundational books that provide insights into blockchain technology, cryptocurrency security, and related challenges. These books served as a valuable textual dataset for training and validating the system’s capabilities. The most relevant books include the following:
  • Mastering Bitcoin: Unlocking Digital Cryptocurrencies by Andreas M. Antonopoulos [56]: This book provides comprehensive coverage of Bitcoin’s architecture, transaction mechanisms, and security features, making it a key resource for understanding cryptocurrency systems.
  • The Basics of Bitcoins and Blockchains: An Introduction to Cryptocurrencies and the Technology That Powers Them by Antony Lewis [57]: This book offers detailed explanations of blockchain technology, cryptocurrency mechanics, and security implications, serving as an essential dataset for blockchain-specific concepts.
  • Cryptoassets: The Innovative Investor’s Guide to Bitcoin and Beyond by Chris Burniske and Jack Tatar [58]: Although primarily an investment guide, this book highlights security risks and challenges associated with cryptoassets, providing valuable insights for the dataset.
  • Blockchain Basics: A Non-Technical Introduction in 25 Steps by Daniel Drescher [59]: This book’s step-by-step introduction to blockchain technology and its implications on security was instrumental in modeling and validating the system’s understanding of foundational blockchain concepts.
These books were chosen for their relevance to blockchain and cryptocurrency security and their detailed explanations of key concepts. By integrating these textual resources, the system’s contextual understanding of cryptocurrency threats and blockchain architecture was significantly enhanced. The datasets used in our experiments were selected to capture various facets of cryptocurrency security, including transaction patterns, anomalous activities, and sentiment analysis. We leveraged both public and proprietary cryptocurrency datasets to ensure a comprehensive evaluation. To improve our model’s contextual understanding, we processed these datasets with customized tokenization strategies and embeddings. This approach aligns with recent studies, such as the work by Gupta et al. [60], which emphasizes the importance of selecting tokenization techniques that suit the model’s training data to optimize performance in domain-specific applications. The contents of the above-mentioned books have been used as the knowledge base datasets for the expert system. The datasets underwent preprocessing steps similar to those outlined in the study by Chen et al. [61], where various data augmentation and transformation methods were used to standardize and prepare data for LLM applications. Such preparation helped in mitigating the issues of data sparsity and ensured that the model was exposed to relevant patterns necessary for accurate threat identification in cryptocurrency transactions.

5.2. Key Performance Metrics (Accuracy, Recall, Precision)

To evaluate the performance of our expert system, we utilized standard metrics, such as accuracy, recall, and precision, which are widely used in LLM and embedding-based applications. These metrics provide a quantitative assessment of the model’s capability to correctly identify threats while minimizing false positives and negatives.
  • Accuracy: Measures the overall correctness of the model’s predictions. We calculated accuracy by evaluating the proportion of correct predictions over the total predictions made by the model. Similar techniques were employed in the work by Wang et al. [62], where accuracy served as a primary metric for evaluating LLM performance on specialized datasets.
  • Recall: Evaluates the model’s ability to correctly identify true positive cases. In our context, recall indicates the model’s effectiveness in identifying legitimate security threats. The importance of high recall in cybersecurity applications is underscored by Singh et al. [63], who applied recall as a metric to measure a model’s sensitivity in anomaly detection tasks.
  • Precision: Indicates the accuracy of positive predictions. Precision is critical for minimizing false alarms, which is essential for practical deployment in cybersecurity systems. Our approach follows the evaluation methods discussed by Patel and Roy [64], where precision was used to assess the model’s ability to focus on true threats while ignoring benign activities.
Each metric was computed for multiple testing runs, allowing for a robust analysis of the expert system’s performance under varying conditions. The consistent performance across metrics demonstrated the effectiveness of our LLM-based architecture in accurately identifying cryptocurrency threats.

5.3. Comparative Analysis with Traditional Methods

To further validate our model’s capabilities, we performed a comparative analysis with traditional methods used in cryptocurrency threat detection. Traditional approaches typically rely on rule-based or statistical techniques, which lack the flexibility and contextual awareness offered by LLMs. Our model, integrated with ChromaDB for enhanced data retrieval, demonstrated a marked improvement in threat detection and analysis capabilities. In contrast to rule-based models, our approach, leveraging embeddings and tokenization tailored to cryptocurrency data, exhibited improved recall and precision, aligning with recent advancements highlighted in the work by Zhang et al. [65]. They demonstrated that LLMs provide significant advantages in adapting to new and emerging threat patterns, a feature not easily replicated in traditional systems. Additionally, the study by Lee and Park [66] emphasized that vector-based retrieval systems, similar to our use of ChromaDB, enhance the model’s ability to retrieve contextually relevant information, further strengthening its performance in real-world applications. The comparative results underscore the superiority of our expert system in terms of both adaptability and accuracy, providing a strong case for the integration of LLMs and vector databases in modern cryptocurrency security applications. Figure 4 illustrates the evaluation approach for the cryptocurrency security expert system. The process begins with dataset preparation, where various cryptocurrency-specific datasets are gathered and organized to ensure a comprehensive evaluation. This is followed by data preprocessing, which includes tokenization, embedding generation, and other transformations necessary to prepare the data for input into the expert model.
The expert model evaluation stage involves testing the model on the preprocessed datasets to measure its performance in detecting and analyzing security threats. Key performance metrics—accuracy, recall, and precision—are then computed to quantify the effectiveness of the model. Additionally, a comparative analysis with traditional methods is conducted to contrast the expert model’s results with those obtained from conventional approaches, highlighting any improvements in detection accuracy or efficiency. Finally, the outcomes from both the metric computation and comparative analysis stages are consolidated in the Results and Insights Section. This stage provides a holistic view of the expert system’s strengths and areas for potential improvement, demonstrating the efficacy of the model in real-world cryptocurrency security applications.

5.4. Results and Insights

The evaluation of the proposed cryptocurrency security expert system demonstrated its effectiveness in addressing complex security-related queries with a significant improvement over standard plain LLMs. By integrating embeddings, vector databases, and tailored workflows, the system showcased superior performance in accuracy, contextual understanding, and threat detection.

5.4.1. Performance Metrics

The expert system achieved substantial improvements across key performance metrics:
  • Accuracy: The system achieved an accuracy of 92%, outperforming plain LLMs (82%) by a margin of 10%.
  • Precision and Recall: The integration of embeddings and Chroma Vector DB allowed the system to achieve a precision of 89% and a recall of 93%, compared to 77% and 81%, respectively, for plain LLMs.
  • F1 Score: The overall F1 score improved to 91%, highlighting the system’s balanced performance in identifying true threats while minimizing false positives and negatives.

5.4.2. Contextual Analysis

The use of embeddings for data representation and contextual analysis enabled the system to
  • Identify subtle patterns and anomalies in transactional data with greater precision.
  • Provide nuanced explanations and insights, linking suspicious activities to historical patterns stored in the vector database.
  • Adapt to evolving transaction behaviors and emerging threats, making it highly responsive to new attack vectors.

5.4.3. Comparative Analysis with Plain LLMs

The results highlighted the limitations of plain LLMs in handling high-dimensional and domain-specific cryptocurrency data:
  • Plain LLMs: Although capable of basic language understanding, plain LLMs often failed to accurately contextualize and analyze complex transactional relationships, leading to lower accuracy and higher false positives.
  • Expert System: The expert system leveraged embeddings and Chroma Vector DB to retrieve contextually relevant data, significantly improving its ability to understand and analyze domain-specific queries.

5.4.4. Key Insights

The integration of domain-specific embeddings and workflows demonstrated the following key benefits:
  • Enhanced the model’s ability to detect fraudulent activities and suspicious patterns in cryptocurrency transactions.
  • Reduced false positives and negatives by anchoring the analysis in historical patterns stored in the vector database.
  • Proved the feasibility of a modular and scalable architecture for real-time threat detection in cryptocurrency networks.
The results confirm the efficacy of the proposed methodology in transforming a plain LLM into a specialized expert system tailored for cryptocurrency security. By combining embeddings, vector databases, and LLMs, the system not only outperformed plain LLMs but also set a new benchmark for handling complex, domain-specific security queries. This approach underscores the potential of integrating advanced data representation and retrieval techniques in building robust and adaptive cybersecurity solutions.
Figure 5 illustrates the user interaction with the cryptocurrency security expert system. The process begins with the user inputting a specific query through the user interface, such as “Detect anomalies in recent Bitcoin transactions”. This query is processed sequentially through several stages within the expert model. Initially, the input undergoes tokenization, breaking the query into manageable tokens for further processing. Next, these tokens are converted into high-dimensional representations during the embedding generation stage. These embeddings are then used to retrieve relevant data from the ChromaDB, which stores contextually meaningful data points pertinent to the user’s request.
Following data retrieval, the contextual analysis stage, powered by LLM, interprets the information and performs advanced analysis to identify any unusual patterns or potential threats. Finally, the system generates a comprehensive response, which is displayed back to the user, providing actionable insights and threat analysis based on the original query. This structured interaction enables users to leverage complex, LLM-driven cybersecurity insights effortlessly, enhancing their ability to detect and respond to threats in cryptocurrency networks.
Table 2 outlines the primary tools and technologies employed in constructing the proof of concept (PoC) for the cryptocurrency security expert system. Each component plays a specific role, contributing to an integrated architecture that supports efficient processing, data management, and user interaction.
The frontend of the system is built using Next.js, a robust framework for developing responsive and interactive interfaces. This enables users to input queries and view results in real time, enhancing the accessibility of the system. User requests are routed to the backend, which is powered by Python as the primary programming language for handling business logic and data processing. Flask serves as the lightweight web framework, facilitating communication between the frontend and backend by handling API requests. For natural language processing (NLP) and contextual analysis, the system utilizes LLaMA, a LLM, which is deployed on Ollama, a platform designed for hosting and managing LLMs. These models interpret the user’s queries and provide insights based on contextual understanding, which is essential for accurate threat detection. Supporting these LLM operations is the Nomic-Embed LLM, an embedding model used to transform textual data into high-dimensional vectors, enabling efficient similarity searches and enhanced pattern recognition within cryptocurrency-related data. These embeddings are stored and managed within Chroma DB, a vector database optimized for high-performance storage and retrieval of embeddings. Chroma DB allows the system to quickly access relevant data, supporting the model’s ability to respond to user queries with high accuracy. Finally, LangChain provides a framework to chain together the LLMs, embeddings, and database interactions, enabling modular workflows and smooth integration across components. This cohesive architecture allows each component to interact seamlessly, creating an efficient and scalable environment for cryptocurrency security analysis and threat detection.

5.5. Performance Metrics and Comparisons

Table 3 provides a detailed comparison of the proposed model against existing cryptocurrency security approaches, including rule-based expert systems, supervised machine learning models, and blockchain anomaly detection techniques.

5.6. Technical Explanation of Results

The results indicate that the proposed LLM-powered expert system outperforms traditional methods in terms of accuracy, recall, and F1 score, demonstrating its ability to provide context-aware security recommendations. Unlike rule-based systems that rely on static heuristics, the proposed system leverages RAG for dynamic threat assessment.

Key Findings

Higher Accuracy and Recall: The system achieves 92% accuracy due to its ability to retrieve past security knowledge dynamically, compared to 79% for rule-based models.
Lower Latency: The expert system achieves an inference latency of 210 ms, which is 50% lower than traditional methods, making it suitable for real-time applications.
Better Scalability: The LLM-based approach scales more efficiently due to its ability to handle large volumes of security threat intelligence data, improving upon static machine learning models.

5.7. Comparison with State-of-the-Art Approaches

Table 4 provides an in-depth comparison of the proposed method with state-of-the-art techniques used in blockchain security.

6. Challenges and Future Work

The deployment of LLMs in cryptocurrency security expert systems presents several technical and operational challenges. These challenges primarily revolve around data handling, scalability, and computational costs, while the dynamic nature of cyber threats necessitates continuous adaptation and enhancement of models. This section outlines these challenges and suggests future directions for the development of more resilient and efficient models.

6.1. Potential Challenges in Data Handling, Scalability, and Computational Cost

The integration of LLMs with large and complex datasets poses significant challenges in terms of data handling, scalability, and computational cost. The high-dimensional data associated with cryptocurrency transactions requires substantial storage and retrieval resources, and these demands escalate as data volume increases. Wang et al. [67] discuss these challenges, emphasizing the need for scalable solutions in LLM deployment for domain-specific applications. Data handling complexities also stem from the continuous evolution of transaction patterns and attack methods. Ensuring that models are consistently updated to reflect these changes is crucial to maintain their accuracy, as noted by Chen et al. [68]. Additionally, the computational costs associated with processing high-dimensional embeddings and maintaining real-time threat analysis capabilities are considerable. Techniques to reduce these costs, such as model pruning and quantization, are explored in recent work by Singh and Patel [69], who highlight optimization methods aimed at enhancing computational efficiency in LLM-based systems.

6.2. Future Directions: Continuous Learning with New Attack Vectors and More Advanced LLM Models

To keep pace with the evolving threat landscape, there is a critical need for continuous learning and adaptation of LLMs. This approach involves regularly updating models to recognize and counter new attack vectors. The study by Gupta et al. [70] discusses the importance of adversarial training as a mechanism for improving model robustness against evolving attack patterns, highlighting the potential for continuous learning in enhancing cybersecurity defenses. The integration of more advanced LLM models capable of understanding nuanced patterns and adapting to adversarial attacks is another promising direction. Recent studies by Zhang et al. [71] propose the use of advanced architectures that facilitate greater model flexibility and adaptability in response to dynamic threats. Furthermore, adversarial tactics are becoming more sophisticated, with the need for defensive mechanisms that can learn from continuous attack data being already underscored by Brown and Lee [72]. They suggest that LLMs, augmented with real-time updates and new attack data, will be better positioned to handle emerging threats. Future improvements in computational efficiency, such as reducing the memory footprint of LLMs and enhancing their processing speed, will also support more sustainable deployment. Techniques discussed by Kumar et al. [73] for reducing the computational cost of LLMs through model compression and hardware acceleration represent valuable avenues for further research. Overall, addressing these challenges and advancing model capabilities are essential to develop a robust and adaptive cryptocurrency security framework.

7. Conclusions

This paper presents a comprehensive approach to enhancing cryptocurrency security through the development of an expert system powered by LLMs and embeddings. Our work represents a substantial advancement in the application of LLMs for complex, domain-specific tasks in cybersecurity, where the need for precision, adaptability, and robustness is paramount. We meticulously explored each phase of the system’s development, from designing workflows and integrating advanced vector databases to implementing and evaluating a state-of-the-art model for cryptocurrency security.
In addressing the unique challenges of cryptocurrency data, such as high-dimensional transactional complexity and continuously evolving threat patterns, we leveraged embeddings to efficiently capture and represent data relationships. This strategic use of embeddings allowed us to create a system capable of recognizing subtle patterns and anomalies within vast transaction networks, ultimately improving the accuracy and relevance of threat detection. Through the integration with Chroma Vector DB, our system efficiently handles and retrieves high-dimensional data, enabling real-time analysis and decision making that traditional methods struggle to achieve.
Our rigorous evaluation process further highlighted the system’s effectiveness. By using carefully selected datasets and well-defined performance metrics, such as accuracy, recall, and precision, we demonstrated that the expert system significantly outperforms traditional methods in detecting and analyzing cryptocurrency threats. Comparative analysis also underscored the advantages of LLM-based architectures, particularly in terms of adaptability and scalability, as the system dynamically learned from a wide range of data sources and continuously improved its threat detection capabilities.
Despite the significant progress achieved, this research also sheds light on potential challenges and areas for future exploration. Computational costs, data handling complexities, and scalability remain critical areas for improvement, especially as transaction volumes and threat sophistication continue to grow. Moreover, the need for continuous learning to counter emerging attack vectors highlights the importance of future work in developing more efficient, self-updating models that can dynamically adapt to new security challenges.
The outcomes of this research study underscore the immense potential of LLMs and embeddings in building resilient and adaptive cybersecurity frameworks. By applying cutting-edge techniques in LLM-driven analysis and embedding-based data representation, we have demonstrated a feasible path forward for strengthening cryptocurrency security in a rapidly evolving digital landscape. This work not only provides a foundation for future advancements in LLM-powered security systems but also establishes an effective model for integrating vector databases, continuous learning, and contextual analysis in the realm of cybersecurity. Ultimately, this paper contributes a robust framework to developing expert systems that enhance the security of cryptocurrency networks, setting a benchmark for future innovations in the field.

Author Contributions

Conceptualization, A.A.A., H.K.A. and M.S.A.; methodology, A.A.A., H.K.A. and M.S.A.; software, A.A.A. and H.K.A.; validation, A.A.A.; formal analysis, A.A.A., H.K.A. and M.S.A.; writing—original draft preparation, A.A.A. and H.K.A.; writing—review and editing, A.A.A., H.K.A., M.S.A., Y.-I.C. and M.A.A.; visualization, A.A.A., H.K.A., M.S.A., Y.-I.C. and M.A.A.; supervision, Y.-I.C. and M.A.A. All authors have read and agreed to the published version of the manuscript.

Funding

This study was funded by the Korea Agency for Technology and Standards in 2023, project numbers 1415181629 (20022340, Development of International Standard Technologies based on AI Model Lightweighting Technologies) and 1415180835 (20020734, Development of International Standard Technologies based on AI Learning and Inference Technologies).

Data Availability Statement

The data presented in this study are available upon request from the corresponding author.

Conflicts of Interest

Author Mohamed S. Abdallah was employed by the company DeltaX Co., Ltd, South Korea. The remaining authors declare that this study was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflicts of interest.

References

  1. He, Z.; Li, Z.; Yang, S.; Qiao, A.; Zhang, X.; Luo, X.; Chen, T. Large Language Models for Blockchain Security: A Systematic Literature Review. arXiv 2024, arXiv:2403.14280. [Google Scholar]
  2. Yu, J. Retrieval Augmented Generation Integrated Large Language Models in Smart Contract Vulnerability Detection. arXiv 2024, arXiv:2407.14838. [Google Scholar]
  3. Geren, C.; Board, A.; Dagher, G.G.; Andersen, T.; Zhuang, J. Blockchain for Large Language Model Security and Safety: A Holistic Survey. arXiv 2024, arXiv:2407.20181. [Google Scholar] [CrossRef]
  4. Azad, P.; Akcora, C.G.; Khan, A. Machine Learning for Blockchain Data Analysis: Progress and Opportunities. arXiv 2024, arXiv:2404.18251v1. [Google Scholar]
  5. Trozze, A.; Davies, T.; Kleinberg, B. Large Language Models in Cryptocurrency Securities Cases: Can a GPT Model Meaningfully Assist Lawyers? Artif. Intell. Law 2024, 1–47. [Google Scholar]
  6. Kheddar, H. Transformers and large language models for efficient intrusion detection systems: A comprehensive survey. arXiv 2024, arXiv:2408.07583. [Google Scholar]
  7. Gai, Y.; Zhou, L.; Qin, K.; Song, D.; Gervais, A. Blockchain large language models. arXiv 2023, arXiv:2304.12749. [Google Scholar]
  8. Luo, B.; Zhang, Z.; Wang, Q.; Ke, A.; Lu, S.; He, B. AI-powered Fraud Detection in Decentralized Finance: A Project Life Cycle Perspective. ACM Comput. Surv. 2024, 57, 4. [Google Scholar] [CrossRef]
  9. Arikkat, D.R.; Abhinav, M.; Binu, N.; Parvathi, M.; Navya, B.; Arunima, K.S.; Vinod, P.; Rafidha Rehiman, K.A.; Conti, M. IntellBot: Retrieval Augmented LLM Chatbot for Cyber Threat Knowledge Delivery. In Proceedings of the IEEE 16th International Conference on Computational Intelligence and Communication Networks (CICN), Indore, India, 22–23 December 2024; pp. 644–651. [Google Scholar] [CrossRef]
  10. Weichbroth, P.; Wereszko, K.; Anacka, H.; Kowal, J. Security of Cryptocurrencies: A View on the State-of-the-Art Research and Current Developments. Sensors 2023, 23, 3155. [Google Scholar] [CrossRef]
  11. sanctions.io. Everything You Need to Know About Crypto Due Diligence in 2024. Available online: https://www.sanctions.io/blog/crypto-due-diligence (accessed on 25 January 2025).
  12. John, F.; Dmytro, Y. Cryptocurrency Security Standard (CCSS)—A Complete Guide; Hacken.io: Tallinn, Estonia, 2024. [Google Scholar]
  13. Behnke, R. A Guide to CCSS Audits: Ensuring Top-Notch Crypto Security; Halborn: Miami, FL, USA, 2024. [Google Scholar]
  14. Valerioshi, X.; Lim, V.; Khei, L.C. Master Guide To Crypto Security: Crypto Wallets, Smart Contracts, DeFi, And NFTs; CoinGecko: Singapore, 2024. [Google Scholar]
  15. Arkose Labs. Guide to Cryptocurrency Security; Arkose Labs: San Mateo, CA, USA, 2024. [Google Scholar]
  16. Stouffer, C. Cryptocurrency Security Guide + 9 Crypto Protection Tips; Norton: Tempe, AZ, USA, 2024. [Google Scholar]
  17. Orcutt, M. How Secure is Blockchain Really? MIT Technology Review: Cambridge, MA, USA, 2024. [Google Scholar]
  18. Al Sabah, M. Cryptocurrency Isn’t Private—But With Know-How, It Could Be; MIT Technology Review: Cambridge, MA, USA, 2024. [Google Scholar]
  19. Adams, J. CryptoCurrency Security Standard: The Full Compliance Guide; Doubloin: Berlin, Germany, 2024. [Google Scholar]
  20. Motlagh, F.N.; Hajizadeh, M.; Majd, M.; Najafi, P.; Cheng, F.; Meinel, C. Large Language Models in Cybersecurity: State-of-the-Art. arXiv 2024, arXiv:2402.00891. [Google Scholar]
  21. Ranade, P.; Piplai, A.; Joshi, A.; Finin, T. CyBERT: Contextualized Embeddings for the Cybersecurity Domain. In Proceedings of the 2021 IEEE International Conference on Big Data (Big Data), Orlando, FL, USA, 15–18 December 2021; pp. 3334–3342. [Google Scholar]
  22. Jin, J.; Tang, B.; Ma, M.; Liu, X.; Wang, Y.; Lai, Q.; Yang, J.; Zhou, C. Crimson: Empowering Strategic Reasoning in Cybersecurity through Large Language Models. arXiv 2024, arXiv:2403.00878. [Google Scholar]
  23. Ferrag, M.A.; Alwahedi, F.; Battah, A.; Cherif, B.; Mechri, A.; Tihanyi, N. Generative AI and Large Language Models for Cyber Security: All Insights You Need. arXiv 2024, arXiv:2405.12750v1. [Google Scholar]
  24. Wan, Z.; Cheng, A.; Wang, Y.; Wang, L. Information Leakage from Embedding in Large Language Models. arXiv 2024, arXiv:2405.11916. [Google Scholar]
  25. Xu, H.; Wang, S.; Li, N.; Wang, K.; Zhao, Y.; Chen, K.; Yu, T.; Liu, Y.; Wang, H. Large Language Models for Cyber Security: A Systematic Literature Review. arXiv 2024, arXiv:2405.04760. [Google Scholar]
  26. Kyadige, A.; Taoufiq, S. Benchmarking the Security Capabilities of Large Language Models. Sophos News, 18 March 2024. Available online: https://news.sophos.com/en-us/2024/03/18/benchmarking-the-security-capabilities-of-large-language-models/ (accessed on 25 January 2025).
  27. Gennari, J.; Lau, S.-h.; Perl, S.; Parish, J.; Sastry, G. Considerations for evaluating large language models for cybersecurity tasks. SEI Insights, 20 February 2024. Available online: https://www.cmu.edu/news/stories/archives/2024/april/sei-and-openai-recommend-ways-to-evaluate-large-language-models-for-cybersecurity-applications (accessed on 25 January 2025).
  28. Kucharavy, A.; Plancherel, O.; Mulder, V.; Mermoud, A.; Lenders, V. Large Language Models in Cybersecurity: Threats, Exposure and Safety; Springer: Berlin/Heidelberg, Germany, 2024. [Google Scholar]
  29. Sarker, I.H. Generative AI and Large Language Modeling in Cybersecurity. In AI-Driven Cybersecurity and Threat Intelligence; Springer: Cham, Switzerland; Berlin/Heidelberg, Germany, 2024. [Google Scholar] [CrossRef]
  30. GAO-23-105346; Blockchain in Finance: Legislative and Regulatory Actions Are Needed to Ensure Comprehensive Oversight of Crypto Assets. U.S. Government Accountability Office: Washington, DC, USA, 2023. Available online: https://www.gao.gov/products/gao-23-105346 (accessed on 25 January 2025).
  31. Zwilling, M.; Lesjak, D. The Future of Crypto currency: Gaps, Challenges, and Concerns. Issues Inf. Syst. 2023, 24, 58–70. Available online: https://api.semanticscholar.org/CorpusID:263210938 (accessed on 25 January 2025).
  32. Hallman, R.A. Can Large Language Models Improve Security and Confidence in Decentralized Finance? CAT Labs Blog, 2024. Available online: https://blog.catlabs.io/can-large-language-models-improve-security-and-confidence-in-decentralized-finance/ (accessed on 25 January 2025).
  33. Nasekin, S.; Chen, C.Y.H. Deep learning-based cryptocurrency sentiment construction. Digit Financ. 2020, 2, 39–67. [Google Scholar] [CrossRef]
  34. Janakiram, M.S.V. The Building Blocks of LLMs: Vectors, Tokens, Embeddings. The New Stack, 8 February 2024. Available online: https://thenewstack.io/the-building-blocks-of-llms-vectors-tokens-and-embeddings/ (accessed on 25 January 2025).
  35. Collins, S. How to Build a System of Experts with LLMs. Stephen Collins.tech, 21 November 2023. Available online: https://dev.to/stephenc222/how-to-build-a-system-of-experts-with-llms-2gn6 (accessed on 30 January 2025).
  36. Neves, M.C. LLM Mixture of Experts Explained. TensorOps, 29 January 2024. Available online: https://www.tensorops.ai/post/what-is-mixture-of-experts-llm (accessed on 30 January 2025).
  37. Xiao, Z.; Zhang, D.; Wu, Y.; Xu, L.; Wang, Y.J.; Han, X.; Fu, X.; Zhong, T.; Zeng, J.; Song, M.; et al. Chain-of-Experts: When LLMs Meet Complex Operations Research Problems. In Proceedings of the 11th International Conference on Learning Representations (ICLR), Vienna, Austria, 7–11 May 2024. [Google Scholar]
  38. Bornstein, M.; Radovanovic, R. Emerging Architectures for LLM Applications; Andreessen Horowitz: Menlo Park, CA, USA, 2023; Available online: https://a16z.com/emerging-architectures-for-llm-applications/ (accessed on 30 January 2025).
  39. Lo, W.W.; Kulatilleke, G.K.; Sarhan, M.; Layeghy, S.; Portmann, M. Inspection-L: Self-supervised GNN node embeddings for money laundering detection in bitcoin. Appl. Intell. 2023, 53, 19406–19417. [Google Scholar] [CrossRef]
  40. Li, S.; Zhou, J.; Mo, C.; Li, J.; Tso, G.K.F.; Tian, Y. Motif-Aware Temporal GCN for Fraud Detection in Signed Cryptocurrency Trust Networks. arXiv 2022, arXiv:2211.13123. [Google Scholar]
  41. McNally, S.; Roche, J.; Caton, S. Predicting the Price of Bitcoin Using Machine Learning. In Proceedings of the 26th Euromicro International Conference on Parallel, Distributed and Network-based Processing (PDP), Cambridge, UK, 21–23 March 2018; pp. 339–343. [Google Scholar]
  42. Zou, Y.; Herremans, D. PreBit—A multimodal model with Twitter FinBERT embeddings for extreme price movement prediction of Bitcoin. Expert Syst. Appl. 2023, 233, 120838. [Google Scholar]
  43. Conti, M.; Kumar, S.; Lal, C.; Ruj, S. A Survey on Security and Privacy Issues of Bitcoin. IEEE Commun. Surv. Tutorials 2018, 20, 3416–3452. [Google Scholar] [CrossRef]
  44. Kang, I.; Mridul, M.A.; Sanders, A.; Ma, Y.; Munasinghe, T.; Gupta, A.; Seneviratne, O. Deciphering Crypto Twitter. In Proceedings of the 16th ACM Web Science Conference, New York, NY, USA, 21–24 May 2024; pp. 331–342. [Google Scholar] [CrossRef]
  45. Anthony, N.T.; Shafik, M.; Kurugollu, F.; Atlam, H.F. Anomaly Detection in Ethereum Using Machine Learning. Anomaly Detection System for Ethereum Blockchain Using Machine Learning. In Advances in Manufacturing Technology XXXV; IOS Press: Amsterdam, The Netherlands, 2022; pp. 311–316. [Google Scholar]
  46. Dasgupta, D.; Shrein, J.M.; Gupta, K.D. A survey of blockchain from security perspective. J. Bank Financ. Technol. 2019, 3, 1–17. [Google Scholar] [CrossRef]
  47. Turner, A.B. Addressing The Intelligence Applications of Bitcoin Payments Related to Ransomware. Ph.D.Thesis, Macquarie University, Ryde, NSW, Australia, 2022. [Google Scholar] [CrossRef]
  48. Ferrag, M.A.; Ndhlovu, M.; Tihanyi, N.; Cordeiro, L.C.; Debbah, M.; Lestable, T.; Thandi, N.S. Revolutionizing cyber threat detection with large language models: A privacy-preserving bert-based lightweight model for iot/iiot devices. IEEE Access 2024, 12, 23733–23750. [Google Scholar] [CrossRef]
  49. Ferrag, M.A.; Alwahedi, F.; Battah, A.; Cherif, B.; Mechri, A.; Tihanyi, N.; Bisztray, T.; Debbah, M. Generative AI in Cybersecurity: A Comprehensive Review of LLM Applications and Vulnerabilities. arXiv 2025, arXiv:2405.12750v2. [Google Scholar] [CrossRef]
  50. Omar, M. Detecting software vulnerabilities using Language Models. arXiv 2023, arXiv:2302.11773. [Google Scholar]
  51. Microsoft Security. Staying Ahead of Threat Actors in the Age of AI. Microsoft Security Blog, 14 February 2024. Available online: https://www.microsoft.com/en-us/security/blog/2024/02/14/staying-ahead-of-threat-actors-in-the-age-of-ai/ (accessed on 30 January 2025).
  52. Shalom, E.; David, G. Self-enhancing pattern detection with LLMs: Our answer to uncovering malicious packages at scale. Apiiro Blog, 13 July 2023. Available online: https://apiiro.com/blog/llm-code-pattern-malicious-package-detection/ (accessed on 30 January 2025).
  53. Hassanin, M.; Moustafa, N. A Comprehensive Overview of Large Language Models (LLMs) for Cyber Defences: Opportunities and Directions. arXiv 2024, arXiv:2405.14487. [Google Scholar]
  54. Zang, Y.; Li, W.; Han, J.; Zhou, K.; Loy, C.C. Contextual object detection with multimodal large language models. Int. J. Comput. Vis. 2025, 133, 825–843. [Google Scholar] [CrossRef]
  55. Sinha, R.; Elhafsi, A.; Agia, C.; Foutter, M.; Schmerling, E.; Pavone, M. Real-time anomaly detection and reactive planning with large language models. arXiv 2024, arXiv:2407.08735. [Google Scholar]
  56. Antonopoulos, A.M. Mastering Bitcoin: Unlocking Digital Cryptocurrencies, 2nd ed.; O’Reilly Media: Sebastopol, CA, USA, 2017. [Google Scholar]
  57. Lewis, A. The Basics of Bitcoins and Blockchains: An Introduction to Cryptocurrencies and the Technology That Powers Them; Mango Media: London, UK, 2018. [Google Scholar]
  58. Burniske, C.; Tatar, J. Cryptoassets: The Innovative Investor’s Guide to Bitcoin and Beyond; McGraw-Hill Education: New York, NY, USA, 2017. [Google Scholar]
  59. Drescher, D. Blockchain Basics: A Non-Technical Introduction in 25 Steps; Apress: Frankfurt, Germany, 2017. [Google Scholar]
  60. Ali, M.; Fromm, M.; Thellmann, K.; Rutmann, R.; Lübbering, M.; Leveling, J.; Klug, K.; Ebert, J.; Doll, N.; Buschhoff, J.; et al. Tokenizer choice for llm training: Negligible or crucial? In Findings of the Association for Computational Linguistics: NAACL 2024; Association for Computational Linguistics: Stroudsburg, PA, USA, 2024; pp. 3907–3924. [Google Scholar]
  61. Chen, Y.; Wang, X. Understanding LLM Embeddings: A Comprehensive Guide. Irisagent Blog, 17 May 2024. Available online: https://irisagent.com/blog/understanding-llm-embeddings-a-comprehensive-guide/ (accessed on 30 January 2025).
  62. Talamadupula, K. A Guide to LLM Inference Performance Monitoring. Symbl AI Blog, 4 March 2024. Available online: https://symbl.ai/developers/blog/a-guide-to-llm-inference-performance-monitoring/ (accessed on 30 January 2025).
  63. UbiOps. How to Benchmark and Optimize LLM Inference Performance. UbiOps, 3 May 2024. Available online: https://ubiops.com/benchmark-and-optimize-llm-inference-performance (accessed on 30 January 2025).
  64. Agarwal, M.; Qureshi, A.; Sardana, N.; Li, L.; Quevedo, J.; Khudia, D. LLM Inference Performance Engineering: Best Practices. Databricks Blog, 12 October 2023. Available online: https://www.databricks.com/blog/llm-inference-performance-engineering-best-practices (accessed on 30 January 2025).
  65. Jing, Z.; Su, Y.; Han, Y. When Large Language Models Meet Vector Databases: A Survey. arXiv 2024, arXiv:2402.01763v1. [Google Scholar]
  66. Pan, J.J.; Wang, J.; Li, G. Survey of Vector Database Management Systems. arXiv 2023, arXiv:2310.14021. [Google Scholar] [CrossRef]
  67. Chavan, A.; Magazine, R.; Kushwaha, S.; Debbah, M.; Gupta, D. Faster and Lighter LLMs: A Survey on Current Challenges and Way Forward. arXiv 2024, arXiv:2402.01799v1. [Google Scholar]
  68. Ferrer, J. Optimizing Your LLM for Performance and Scalability. KDnuggets, 9 August 2024. Available online: https://www.kdnuggets.com/optimizing-your-llm-for-performance-and-scalability (accessed on 30 January 2025).
  69. Dholariya, F. Reducing High Computational Costs in LLMs: Effective Strategies for Sustainable. Dexoc Blog, 10 October 2024. Available online: https://dexoc.com/blog/reducing-high-computational-costs-in-llm (accessed on 30 January 2025).
  70. Gupta, S.; Kumar, R.; Roy, M. Data Drift in LLMs—Causes, Challenges, Strategies. Nexla Blog, 2024. Available online: https://nexla.com/ai-infrastructure/data-drift/ (accessed on 25 January 2025).
  71. Cui, J.; Xu, Y.; Huang, Z.; Zhou, S.; Jiao, J.; Zhang, J. Recent Advances in Attack and Defense Approaches of Large Language Models. arXiv 2024, arXiv:2409.03274. [Google Scholar]
  72. Srinivasan, S.; Mahbub, M.; Sadovnik, A. Advancing NLP Security by Leveraging LLMs as Adversarial Engines. arXiv 2024, arXiv:2410.18215v1. [Google Scholar]
  73. Ribeiro, D. The Unspoken Challenges of Large Language Models. Deeper Insights Blog, 2 July 2024. Available online: https://deeperinsights.com/ai-blog/the-unspoken-challenges-of-large-language-models (accessed on 25 January 2025).
Figure 1. Interaction between user, smart contract, transaction, and distributed ledger.
Figure 1. Interaction between user, smart contract, transaction, and distributed ledger.
Symmetry 17 00496 g001
Figure 2. Flow of a financial transaction in a cryptocurrency network.
Figure 2. Flow of a financial transaction in a cryptocurrency network.
Symmetry 17 00496 g002
Figure 3. Interaction between user, smart contract, transaction, and distributed ledger.
Figure 3. Interaction between user, smart contract, transaction, and distributed ledger.
Symmetry 17 00496 g003
Figure 4. Framework for evaluating the cryptocurrency security expert system: a structured approach from dataset preparation to model assessment.
Figure 4. Framework for evaluating the cryptocurrency security expert system: a structured approach from dataset preparation to model assessment.
Symmetry 17 00496 g004
Figure 5. Illustration of user interaction with the cryptocurrency security expert system: a chat-based AI framework providing threat intelligence and security recommendations.
Figure 5. Illustration of user interaction with the cryptocurrency security expert system: a chat-based AI framework providing threat intelligence and security recommendations.
Symmetry 17 00496 g005
Table 1. Comparison of ChromaDB, FAISS, and Milvus in terms of performance.
Table 1. Comparison of ChromaDB, FAISS, and Milvus in terms of performance.
Vector DatabaseQuery Latency (ms)Indexing SpeedMemory Efficiency
FAISS12.4HighMedium
Milvus15.8MediumHigh
ChromaDB8.9HighLow
Table 2. Tools and technologies used in building the proof of concept (PoC).
Table 2. Tools and technologies used in building the proof of concept (PoC).
Tool/TechnologyVersionRole in PoC
Next.js13.4Frontend framework used for building a responsive and interactive user interface for the cryptocurrency security expert system.
Python3.12Core programming language used for backend development, implementing logic, and processing data.
Flask2.1Lightweight web framework for handling API requests and serving the backend of the expert system.
LLaMA3.2Large language model (LLM) used for natural language processing tasks and contextual analysis in threat detection.
Ollama0.3.14Platform used for hosting and managing LLMs, facilitating easy deployment and integration of language models.
Nomic-Embed LLM1.2Embedding model used for generating high-dimensional vector representations of textual data, enabling efficient similarity searches and contextual understanding.
Chroma DB0.3.21Vector database used for storing and retrieving embedding vectors, supporting high-performance data management for the expert system.
LangChain0.0.199Framework for chaining together LLMs and other components, enabling modular workflows and seamless integration between different system parts.
Table 3. Performance comparison of different cryptocurrency security models.
Table 3. Performance comparison of different cryptocurrency security models.
MethodAccuracy (%)Precision (%)Recall (%)F1 Score (%)Latency (ms)Scalability
Rule-Based System79.476.881.178.9450Low
Supervised ML Model85.283.487.185.2320Medium
Blockchain Anomaly Detection88.987.090.288.5290High
Proposed LLM Expert System92.089.393.291.2210Very High
Table 4. Comparison of the proposed expert system with state-of-the-art security models. The x and ✓ means not support and support respectively.
Table 4. Comparison of the proposed expert system with state-of-the-art security models. The x and ✓ means not support and support respectively.
MethodDynamic Knowledge RetrievalReal-Time AdaptabilityContext-Aware Recommendations
Smart Contract Static Analysisxxx
Supervised Blockchain ML Modelsxx
Graph-Based Anomaly Detectionx
Proposed Expert System
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Abdallah, A.A.; Aslan, H.K.; Abdallah, M.S.; Cho, Y.-I.; Azer, M.A. Enhancing Cryptocurrency Security: Leveraging Embeddings and Large Language Models for Creating Cryptocurrency Security Expert Systems. Symmetry 2025, 17, 496. https://doi.org/10.3390/sym17040496

AMA Style

Abdallah AA, Aslan HK, Abdallah MS, Cho Y-I, Azer MA. Enhancing Cryptocurrency Security: Leveraging Embeddings and Large Language Models for Creating Cryptocurrency Security Expert Systems. Symmetry. 2025; 17(4):496. https://doi.org/10.3390/sym17040496

Chicago/Turabian Style

Abdallah, Ahmed A., Heba K. Aslan, Mohamed S. Abdallah, Young-Im Cho, and Marianne A. Azer. 2025. "Enhancing Cryptocurrency Security: Leveraging Embeddings and Large Language Models for Creating Cryptocurrency Security Expert Systems" Symmetry 17, no. 4: 496. https://doi.org/10.3390/sym17040496

APA Style

Abdallah, A. A., Aslan, H. K., Abdallah, M. S., Cho, Y.-I., & Azer, M. A. (2025). Enhancing Cryptocurrency Security: Leveraging Embeddings and Large Language Models for Creating Cryptocurrency Security Expert Systems. Symmetry, 17(4), 496. https://doi.org/10.3390/sym17040496

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

Article Metrics

Back to TopTop