<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xml:lang="en" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">CMC</journal-id>
<journal-id journal-id-type="nlm-ta">CMC</journal-id>
<journal-id journal-id-type="publisher-id">CMC</journal-id>
<journal-title-group>
<journal-title>Computers, Materials &#x0026; Continua</journal-title>
</journal-title-group>
<issn pub-type="epub">1546-2226</issn>
<issn pub-type="ppub">1546-2218</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">69152</article-id>
<article-id pub-id-type="doi">10.32604/cmc.2025.069152</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Ponzi Scheme Detection for Smart Contracts Based on Oversampling</article-title>
<alt-title alt-title-type="left-running-head">Ponzi Scheme Detection for Smart Contracts Based on Oversampling</alt-title>
<alt-title alt-title-type="right-running-head">Ponzi Scheme Detection for Smart Contracts Based on Oversampling</alt-title>
</title-group>
<contrib-group>
<contrib id="author-1" contrib-type="author">
<name name-style="western"><surname>Liu</surname><given-names>Yafei</given-names></name><xref ref-type="aff" rid="aff-1">1</xref><xref ref-type="aff" rid="aff-2">2</xref></contrib>
<contrib id="author-2" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Chen</surname><given-names>Yuling</given-names></name><xref ref-type="aff" rid="aff-1">1</xref><xref ref-type="aff" rid="aff-2">2</xref><email>ylchen3@gzu.edu.cn</email></contrib>
<contrib id="author-3" contrib-type="author">
<name name-style="western"><surname>Wang</surname><given-names>Xuewei</given-names></name><xref ref-type="aff" rid="aff-3">3</xref></contrib>
<contrib id="author-4" contrib-type="author">
<name name-style="western"><surname>Yang</surname><given-names>Yuxiang</given-names></name><xref ref-type="aff" rid="aff-2">2</xref></contrib>
<contrib id="author-5" contrib-type="author">
<name name-style="western"><surname>Tan</surname><given-names>Chaoyue</given-names></name><xref ref-type="aff" rid="aff-2">2</xref></contrib>
<aff id="aff-1"><label>1</label><institution>State Key Laboratory of Public Big Data, Guizhou University</institution>, <addr-line>Guiyang, 550025</addr-line>, <country>China</country></aff>
<aff id="aff-2"><label>2</label><institution>College of Computer Science and Technology, Guizhou University</institution>, <addr-line>Guiyang, 550025</addr-line>, <country>China</country></aff>
<aff id="aff-3"><label>3</label><institution>Computer College, Weifang University of Science and Technology</institution>, <addr-line>Weifang, 262700</addr-line>, <country>China</country></aff>
</contrib-group>
<author-notes>
<corresp id="cor1"><label>&#x002A;</label>Corresponding Author: Yuling Chen. Email: <email>ylchen3@gzu.edu.cn</email></corresp>
</author-notes>
<pub-date date-type="collection" publication-format="electronic">
<year>2025</year></pub-date>
<pub-date date-type="pub" publication-format="electronic">
<day>10</day>
<month>11</month>
<year>2025</year>
</pub-date>
<volume>86</volume>
<issue>1</issue>
<fpage>1</fpage>
<lpage>21</lpage>
<history>
<date date-type="received">
<day>16</day>
<month>6</month>
<year>2025</year>
</date>
<date date-type="accepted">
<day>25</day>
<month>8</month>
<year>2025</year>
</date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2025 The Authors.</copyright-statement>
<copyright-year>2025</copyright-year>
<copyright-holder>Published by Tech Science Press.</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_CMC_69152.pdf"></self-uri>
<abstract>
<p>As blockchain technology rapidly evolves, smart contracts have seen widespread adoption in financial transactions and beyond. However, the growing prevalence of malicious Ponzi scheme contracts presents serious security threats to blockchain ecosystems. Although numerous detection techniques have been proposed, existing methods suffer from significant limitations, such as class imbalance and insufficient modeling of transaction-related semantic features. To address these challenges, this paper proposes an oversampling-based detection framework for Ponzi smart contracts. We enhance the Adaptive Synthetic Sampling (ADASYN) algorithm by incorporating sample proximity to decision boundaries and ensuring realistic sample distributions. This enhancement facilitates the generation of high-quality minority class samples and effectively mitigates class imbalance. In addition, we design a Contract Transaction Graph (CTG) construction algorithm to preserve key transactional semantics through feature extraction from contract code. A graph neural network (GNN) is then applied for classification. This study employs a publicly available dataset from the XBlock platform, consisting of 318 verified Ponzi contracts and 6498 benign contracts. Sourced from real Ethereum deployments, the dataset reflects diverse application scenarios and captures the varied characteristics of Ponzi schemes. Experimental results demonstrate that our approach achieves an accuracy of 96%, a recall of 92%, and an F1-score of 94% in detecting Ponzi contracts, outperforming state-of-the-art methods.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Blockchain</kwd>
<kwd>smart contracts</kwd>
<kwd>Ponzi schemes</kwd>
<kwd>class imbalance</kwd>
<kwd>graph structure construction</kwd>
</kwd-group>
<funding-group>
<award-group id="awg1">
<funding-source>National Natural Science Foundation of China</funding-source>
<award-id>U24A20241</award-id>
</award-group>
<award-group id="awg2">
<funding-source>Key Technologies of Data Security Trading Based on Blockchain</funding-source>
<award-id>62202118</award-id>
</award-group>
<award-group id="awg3">
<funding-source>Major Scientific and Technological Special Project of Guizhou Province</funding-source>
<award-id>[2024]014</award-id>
</award-group>
<award-group id="awg4">
<funding-source>Scientific and Technological Research Projects from the Guizhou Education Department</funding-source>
<award-id>[2023]003</award-id>
</award-group>
<award-group id="awg5">
<funding-source>Qiankehe Platform Talent-GCC</funding-source>
<award-id>[2023]018</award-id>
</award-group>
<award-group id="awg6">
<funding-source>Qiankehe Major Project</funding-source>
<award-id>[2024]003</award-id>
</award-group>
<award-group id="awg7">
<funding-source>Qiankehe Talent CXTD</funding-source>
<award-id>[2025]029</award-id>
</award-group>
</funding-group>
</article-meta>
</front>
<body>
<sec id="s1">
<label>1</label>
<title>Introduction</title>
<p>As a decentralized technology, blockchain has gained global recognition for its unique transparency, immutability, and anonymity [<xref ref-type="bibr" rid="ref-1">1</xref>,<xref ref-type="bibr" rid="ref-2">2</xref>]. The innovative utilization of smart contract technology is propelling blockchain into new developmental stages across various industries, such as finance, healthcare, the Internet of Things (IoT), and edge computing (EC) [<xref ref-type="bibr" rid="ref-3">3</xref>]. Ethereum, as the preeminent blockchain platform for smart contracts, holds the second-largest market capitalization in the cryptocurrency domain, surpassed only by Bitcoin. By automatically executing predefined contractual terms, smart contracts significantly reduce the dependence of trusted third parties in transactions, establishing a solid foundation for the continued expansion of the blockchain in industries.</p>
<p>However, while smart contracts facilitate financial innovation, they simultaneously introduce novel avenues for financial fraud, with Ponzi schemes leveraging smart contract functionality emerging as a particularly salient concern. As a classic financial fraud model, Ponzi schemes were first organized and carried out by Charles Ponzi in the early 20th century. Their core operational mechanism relies on using funds from new investors to pay returns to earlier ones, creating a false appearance of profitability to lure more investors into the scheme [<xref ref-type="bibr" rid="ref-4">4</xref>]. In blockchain environments, the automated execution of smart contracts enhances the concealment and deceptiveness of Ponzi schemes. For instance, TRM Labs&#x2019; (2022) investigative report on illicit cryptocurrency ecosystems reveals that blockchain-based Ponzi schemes predominantly exploit investor psychology by advertising unrealistic returns and employing hierarchical referral-based profit structures [<xref ref-type="bibr" rid="ref-5">5</xref>]. Participants earn rewards not only through direct referrals but also via tiered gains based on subsequent investments by recruited members. Such mechanisms have drawn global participation, resulting in approximately a <inline-formula id="ieqn-1"><mml:math id="mml-ieqn-1"><mml:mn>7.8</mml:mn></mml:math></inline-formula> billion in investor losses. Fraudsters exploit cryptocurrency&#x2019;s transactional features to obscure fund trails while leveraging blockchain&#x2019;s anonymity and decentralization to evade regulatory oversight [<xref ref-type="bibr" rid="ref-5">5</xref>,<xref ref-type="bibr" rid="ref-6">6</xref>]. In recent years, the rising prevalence of smart contract-based Ponzi schemes has caused substantial financial losses to investors and jeopardized the sustainable growth of blockchain ecosystems [<xref ref-type="bibr" rid="ref-7">7</xref>,<xref ref-type="bibr" rid="ref-8">8</xref>]. Consequently, developing effective detection mechanisms to identify smart contract Ponzi schemes and fostering a secure investment environment have become critical issues that need addressing.</p>
<p>Recent scholarly efforts in detecting smart contract-based Ponzi schemes have predominantly concentrated on feature extraction methodologies operating at the bytecode and opcode levels. However, these features often fail to comprehensively or accurately capture the intrinsic characteristics of Ponzi schemes. Existing approaches inadequately leverage the rich semantic and syntactic information embedded in high-level programming languages, as well as complex control and data dependencies, resulting in detection models that struggle to identify the core logic of such frauds. Additionally, the vast and rapidly growing number of smart contracts on Ethereum, combined with the extremely low proportion of Ponzi scheme contracts, exacerbates class imbalance issues. Although traditional oversampling methods such as Synthetic Minority Over-Sampling Technique (SMOTE) and Adaptive Synthetic Sampling (ADASYN) [<xref ref-type="bibr" rid="ref-9">9</xref>] can partially alleviate class imbalance, they often generate minority-class samples that cluster around existing instances. This approach neglects critical boundary samples, thereby reducing the model&#x2019;s discriminative ability. Effectively identifying limited Ponzi scheme contracts within massive datasets remains an unresolved challenge. Thus, it is essential to employ data science methodologies to develop efficient and precise detection models, enabling the effective identification and prevention of Ponzi schemes in Ethereum smart contracts.</p>
<p>To address issues of class imbalance, single-source feature extraction, and incomplete representation of transaction semantics in smart contracts, we propose an oversampling-based detection method. First, we apply oversampling techniques to balance the dataset between normal and Ponzi scheme samples. Then, we construct transaction graphs to remove redundant information and capture complex transaction relationships within smart contracts. Finally, we employ graph neural networks for feature extraction and classification to accurately identify Ponzi schemes. Our main contributions include:
<list list-type="bullet">
<list-item>
<p>An improved ADASYN algorithm addressing limitations in handling class imbalance by considering both the proximity of generated samples to decision boundaries and their distribution in feature space, enhancing the model&#x2019;s ability to identify critical boundary samples.</p></list-item>
<list-item>
<p>A novel Contract Transaction Graph (CTG) construction method that transforms contract source code into graphs, removes redundancy, and captures comprehensive transaction-related semantics of smart contracts.</p></list-item>
<list-item>
<p>Through rigorous comparative experiments and comprehensive statistical analysis, the proposed method demonstrates substantial improvements in performance indicators such as accuracy, recall, and F-score compared to traditional methods.</p></list-item>
</list></p>
<p>The subsequent sections of this paper are structured as follows. <xref ref-type="sec" rid="s2">Section 2</xref> provides a review of related research, while <xref ref-type="sec" rid="s3">Section 3</xref> introduces fundamental concepts. In <xref ref-type="sec" rid="s4">Section 4</xref>, we elaborate on the design of our detection methodology. <xref ref-type="sec" rid="s5">Section 5</xref> presents an experimental analysis of the proposed method. Finally, <xref ref-type="sec" rid="s6">Section 6</xref> concludes the paper and discusses future research directions.</p>
</sec>
<sec id="s2">
<label>2</label>
<title>Related Work</title>
<p>Ethereum stands as the leading platform for building and executing smart contracts, offering many unique advantages. It provides a rich and powerful set of application programming interfaces, giving developers convenient tools to efficiently create complex smart contracts. Within the Ethereum blockchain ecosystem, programming languages like Solidity have been used to successfully develop and deploy a vast number of decentralized applications. These applications are implemented as smart contracts, significantly broadening the application scenarios of blockchain technology. The Ethereum Virtual Machine (EVM) plays a crucial role in enabling Ethereum&#x2019;s Turing-complete computational capabilities, primarily responsible for executing smart contract bytecode. Upon a smart contract being invoked, the EVM systematically carries out the specified actions and stack operations as defined by the contract&#x2019;s instructions. Throughout this process, the EVM interacts closely with storage to read, store, and update data. Smart contracts are self-executing programs deployed on blockchain networks, engineered to automatically enforce predefined contractual terms upon the fulfillment of specified conditions. Unlike traditional contracts that rely on third-party intermediaries for execution, smart contracts operate autonomously through deterministic code. This approach delivers substantial benefits in operational efficiency, transactional transparency, and cryptographic security. Once deployed on a blockchain, smart contracts persist indefinitely, with state modifications permitted only through their predefined functions. This immutability ensures a high degree of tamper resistance and operational reliability, making them particularly suitable for decentralized finance (DeFi), digital asset management, and supply chain traceability applications.</p>
<p>However, this has also spurred the emergence of numerous Ponzi scheme contracts, prompting extensive research efforts to address their detection. This section centers on discussing detection methods for Ponzi schemes, which can be broadly classified into three categories: bytecode-based features, opcode-based features, and transaction-based features.</p>
<p><bold>Bytecode Features.</bold> Bartoletti et al. [<xref ref-type="bibr" rid="ref-10">10</xref>] proposed using the normalized Levenshtein distance (NLD) to measure contract similarity, which calculates the number of character modifications needed to transform one bytecode into another for identifying Ponzi schemes. This approach aids in detecting Ponzi schemes by quantifying character-level modifications between bytecode sequences. Fan et al. [<xref ref-type="bibr" rid="ref-11">11</xref>] adopted a distinct strategy: they enriched their dataset by analyzing decentralized applications (DApps) and trained detection models using an ordered boosting algorithm. Their model mapped the frequency distributions of various opcodes in smart Ponzi schemes, DApp Ponzi schemes, and non-Ponzi schemes. However, this single-feature frequency analysis has limitations, as it does not reveal the directional impact of feature values on the model. Zheng et al. [<xref ref-type="bibr" rid="ref-12">12</xref>] proposed extracting features from multi-dimensional perspectives, including bytecode, semantics, and developer information, and applied machine learning methods for Ponzi scheme detection. Nevertheless, bytecode features may vary across different compiler versions and often fail to capture the semantic logic of contracts. To achieve more comprehensive feature representation, Zhang et al. [<xref ref-type="bibr" rid="ref-13">13</xref>] integrated user transaction information and opcode frequencies while extracting bytecode features, then introduced an improved LightGBM-based method for identifying smart contract Ponzi schemes. This approach significantly enhanced both model training speed and detection performance.</p>
<p><bold>Opcode Features.</bold> Trozze et al. [<xref ref-type="bibr" rid="ref-14">14</xref>] focused on the frequency distribution of opcodes in DeFi project token smart contracts to detect securities violations. However, such techniques are constrained by their sole reliance on opcode frequency distributions, thereby failing to comprehensively and precisely characterize Ponzi schemes. Peng and Xiao [<xref ref-type="bibr" rid="ref-15">15</xref>] developed an efficient automatic detection model for smart Ponzi schemes by leveraging opcode functionalities. They systematically modeled these functionalities to enable detection at the initial deployment phase of smart contracts. Wang and Huang [<xref ref-type="bibr" rid="ref-16">16</xref>] adopted the N-gram algorithm to extract more comprehensive opcode features and introduced adaptive synthetic sampling techniques to tackle class imbalance issues. They eventually used an AdaBoost classifier for detecting fraudulent contracts.</p>
<p><bold>Transaction Features.</bold> Chen et al. [<xref ref-type="bibr" rid="ref-17">17</xref>] put forward a transaction data-driven approach, which improves detection capabilities by extracting six new behavioral features. However, their feature importance analysis only included one behavioral feature. At the same time, Jung et al. [<xref ref-type="bibr" rid="ref-18">18</xref>] used the trans2vec network embedding algorithm to construct transaction networks from datasets and adopted one-class SVM for phishing contract classification. Similarly, Wu et al. [<xref ref-type="bibr" rid="ref-19">19</xref>] created a transaction record dataset, applied trans2vec for transaction network construction, and classified fraudulent contracts through one-class support vector machine (SVM). Hu et al. [<xref ref-type="bibr" rid="ref-20">20</xref>] developed 14 time-series features based on contract activity patterns and trained a long short-term memory (LSTM) network to identify contract types. Jin et al. [<xref ref-type="bibr" rid="ref-21">21</xref>] introduced a heterogeneous feature enhancement module that aggregates meta-path behavioral features from auxiliary heterogeneous interaction graphs into account nodes within homogeneous graphs for detection, capturing heterogeneous behavioral patterns. He et al. [<xref ref-type="bibr" rid="ref-22">22</xref>] proposed Ethereum-CTRF, which extracts lexical features, sequence features, and transaction features from contract code and applies simple random oversampling to build a multi-granularity network model. However, this approach has the risk of overfitting.</p>
<p>Despite progress in accuracy and efficiency for detecting Ponzi schemes in smart contracts, existing methods face several limitations hindering further performance improvements. First, they struggle to fully capture semantic information related to Ponzi schemes within smart contracts. While these methods can extract features from entire contracts, core characteristics of Ponzi schemes often manifest in unique transaction patterns that constitute only a small portion of the contract code. Non-transaction-related parts may introduce noise, disrupting the learning process and reducing detection effectiveness. Second, class imbalance further limits detection model performance, leading to inadequate recognition of minority class datasets. To tackle these challenges, this study puts forward an oversampling-based detection method. The aim is to boost the model&#x2019;s recognition ability for Ponzi scheme contracts by balancing the class distribution of the dataset.</p>
</sec>
<sec id="s3">
<label>3</label>
<title>Preliminary</title>
<p>This section elaborates on the fundamental concepts of Ponzi schemes, ADASYN, and graph construction addressed in this research, with the aim of promoting a deeper comprehension of the detection methods proposed in the article.</p>
<sec id="s3_1">
<label>3.1</label>
<title>Smart Contract Ponzi Scheme</title>
<p>Smart Ponzi schemes exploit the automated execution features of blockchain technology, using smart contracts on decentralized platforms to automate operations. This makes it harder to trace and monitor the scheme&#x2019;s execution and fund flows. Smart contracts are essentially self-executing programs that automatically enforce the terms of a contract without intermediaries, thus greatly enhancing operational efficiency [<xref ref-type="bibr" rid="ref-7">7</xref>]. However, they also provide more covert methods for illicit activities. Scammers often disguise these schemes as fake financial investment platforms, gambling games, or other types of applications designed to attract users, convincing investors of high returns to lure them into investing.</p>
<p>The decentralized nature of blockchain eliminates reliance on centralized institutions, with all transaction records being stored in a distributed manner across network nodes, thereby ensuring data transparency and tamper-proof characteristics. This ensures data transparency and immutability, securing the safety and authenticity of transactions. Yet, this same feature also offers convenience to fraudsters. They exploit anonymity to hide their identities and evade regulation. Additionally, due to the irreversible nature of blockchain transactions, once funds are transferred to the scammer&#x2019;s control, they are almost impossible to recover, leaving victims with few options for recourse. Compared to traditional Ponzi schemes, smart contract Ponzi schemes exhibit several distinctive features [<xref ref-type="bibr" rid="ref-6">6</xref>]. First, they utilize blockchain anonymity to keep the scammer&#x2019;s identity concealed. Second, after deployment, smart contracts cannot be altered or halted, which adds stability to the fraudulent environment. Third, while the public and automatic execution of smart contract code theoretically increases transparency, in practice, this can mislead investors into believing in their safety, thereby lowering their guard and extending the duration of the scam.</p>
</sec>
<sec id="s3_2">
<label>3.2</label>
<title>ADASYN</title>
<p>ADASYN [<xref ref-type="bibr" rid="ref-23">23</xref>] is an advanced oversampling technique developed to tackle the issue of data imbalance in classification tasks. Its main idea is to dynamically adjust the strategy for generating synthetic samples, prioritizing the increase of minority class density near classification boundaries. This enhances a model&#x2019;s ability to learn complex decision boundaries. As an advanced version of the SMOTE algorithm, ADASYN not only generates new samples through linear interpolation but also introduces an adaptive weighting mechanism based on classification difficulty. Initially, the method computes the density ratio of majority instances in the local vicinity of each minority sample, defined as the classification difficulty coefficient. Samples surrounded by more majority class samples are assigned higher weights and generate more synthetic samples. Conversely, simpler samples with concentrated distributions generate fewer. This approach focuses on areas with higher classification difficulty by analyzing local distribution characteristics of minority class samples. In the context of detecting Ponzi schemes, fraudulent contracts frequently share characteristics with legitimate ones in various features. Traditional uniform sampling methods may overlook these boundary samples due to identical time intervals between samplings. In contrast, ADASYN generates synthetic samples densely within risky neighborhoods through linear interpolation. This forces classifiers to recalibrate decision boundaries, significantly improving the recognition rate of high-risk samples. Compared to SMOTE, ADASYN&#x2019;s advantage lies in its adaptive capability to data distribution [<xref ref-type="bibr" rid="ref-9">9</xref>]. By allocating weights, it reduces redundant replication of simple samples while enhancing sample density in boundary regions.</p>
</sec>
<sec id="s3_3">
<label>3.3</label>
<title>Graph Construction</title>
<p>Graphs serve as fundamental data structures in computer science, employed to depict complex relationships among entities. Their core components consist of nodes and edges. Nodes represent entities or data objects, whereas edges illustrate the connections between these entities. This structural design is particularly well-suited for modeling many-to-many interaction patterns [<xref ref-type="bibr" rid="ref-24">24</xref>]. In the field of program analysis graph construction algorithms achieve deep analysis by abstracting source code into a graph structure. These algorithms typically follow three construction phases. First, functions and key variables are abstracted into nodes. Second, two types of connections are established: one is control flow edges, and the other is data flow edges. Finally, the algorithm integrates the syntactic semantics and dependencies of the program. Control flow edges are constructed based on the execution paths of the program while data flow edges are generated based on the definition and usage relationships between variables. Control flow graphs as a core tool in program analysis use basic blocks as their node units. A basic block refers to a linear sequence of code without jump instructions. The connections between edges reflect control transfer logic such as conditional branches and loop jumps fully presenting all possible execution paths of the program. Data flow graphs focus on the lifecycle of data within the program tracking the entire process of data storage.</p>
</sec>
</sec>
<sec id="s4">
<label>4</label>
<title>Methodology</title>
<p>In this section, we introduce the Ponzi scheme detection for smart contracts based on oversampling, a specific methodology leveraging oversampling techniques to identify Ponzi schemes in smart contracts. As illustrated in <xref ref-type="fig" rid="fig-1">Fig. 1</xref>, the overall workflow of our approach comprises four stages.</p>
<fig id="fig-1">
<label>Figure 1</label>
<caption>
<title>Framework of the proposed method</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_69152-fig-1.tif"/>
</fig>
<p><bold><italic>1) Data Collection:</italic></bold> Crawling smart contract source code and transaction information from <ext-link ext-link-type="uri" xlink:href="https://etherscan.io/">https://etherscan.io/</ext-link> (accessed on 24 August 2025). based on the contract address.</p>
<p><bold><italic>2) Sample Balancing:</italic></bold> To tackle the challenge of learning from a limited number of samples in the dataset, we expand the quantity of smart contract Ponzi scheme samples through an enhanced ADASYN technique. This approach avoids ineffective identification by generating high-quality minority-class samples.</p>
<p><bold><italic>3) Contract Transaction Graph Construction:</italic></bold> Through static analysis of smart contract source code, we extract fund management-related functions and variables to construct a Directed Graph of Contract (DGC). Next, we extract transaction-related semantic segments in two steps based on the transfer interface and transaction-related state variables. We remove redundant information to construct the Contract Transaction Graph (CTG), highlighting features critical for Ponzi scheme detection. This offers high-quality input for subsequent graph neural network training.</p>
<p><bold><italic>4) Model Detection:</italic></bold> We utilize Graph Neural Networks (GNN) [<xref ref-type="bibr" rid="ref-25">25</xref>] to train and analyze the extracted CTG, thereby determining whether a contract belongs to the Ponzi scheme category.</p>
<sec id="s4_1">
<label>4.1</label>
<title>Data Collection</title>
<p>This study collects smart contract source code through <ext-link ext-link-type="uri" xlink:href="https://etherscan.io/">https://etherscan.io/</ext-link> and retrieves all transaction records associated with specific contracts using a modified Ethereum client. To ensure data integrity and analytical reliability, the acquired transaction data undergoes a filtering process. Since certain transactions may fail due to <inline-formula id="ieqn-2"><mml:math id="mml-ieqn-2"><mml:mi>g</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi></mml:math></inline-formula> exhaustion or execution errors, these are flagged with an <inline-formula id="ieqn-3"><mml:math id="mml-ieqn-3"><mml:mi>E</mml:mi><mml:mi>r</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>r</mml:mi></mml:math></inline-formula> status. To guarantee transactional validity, this research retains only successfully executed transactions in the dataset while excluding all failed ones, thereby enhancing the accuracy and credibility of subsequent analyses.</p>
</sec>
<sec id="s4_2">
<label>4.2</label>
<title>Sample Balancing</title>
<p>Given that the majority class dominates the sample set, minority samples are frequently neglected, resulting in a classifier biased towards the majority class with compromised performance. To tackle this imbalance issue, we improve the ADASYN oversampling algorithm for data processing.</p>
<p>In synthesizing new examples, two critical factors are considered: the proximity of these samples to the decision boundary and their distribution within the feature space. The proximity of generated samples to the decision boundary has a direct impact on the accuracy of the learned classification boundary. Meanwhile, how these samples are combined affects their distribution reasonableness in the feature space. Improper combination can result in sample concentration in non-representative areas, impacting the model&#x2019;s generalization ability. Our enhanced ADASYN approach addresses these two critical aspects by generating synthetic samples in close proximity to the decision boundary, thereby strengthening the classifier&#x2019;s discriminative capability. Furthermore, the method incorporates an optimized sample combination strategy that ensures a balanced distribution throughout the feature space, effectively avoiding excessive clustering in less informative regions. The main implementation process of this method is shown in Algorithm 1:</p>
<fig id="fig-5">
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_69152-fig-5.tif"/>
</fig>
<p>Define the original dataset <italic>G</italic>, the generated synthetic sample set <inline-formula id="ieqn-14"><mml:math id="mml-ieqn-14"><mml:msub><mml:mi>X</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:math></inline-formula>, the minority sample subset <inline-formula id="ieqn-15"><mml:math id="mml-ieqn-15"><mml:msub><mml:mi>G</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:math></inline-formula>, and the majority sample subset <inline-formula id="ieqn-16"><mml:math id="mml-ieqn-16"><mml:msub><mml:mi>G</mml:mi><mml:mi>l</mml:mi></mml:msub></mml:math></inline-formula>.</p>
<p>1) Determine the quantity of minority class samples <italic>Q</italic> requiring synthesis:
<disp-formula id="eqn-1"><label>(1)</label><mml:math id="mml-eqn-1" display="block"><mml:mi>Q</mml:mi><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>m</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>m</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x00D7;</mml:mo><mml:mi>&#x03B2;</mml:mi></mml:math></disp-formula></p>
<p>Here, <inline-formula id="ieqn-17"><mml:math id="mml-ieqn-17"><mml:msub><mml:mi>m</mml:mi><mml:mi>l</mml:mi></mml:msub></mml:math></inline-formula> is the number of majority class samples, and <inline-formula id="ieqn-18"><mml:math id="mml-ieqn-18"><mml:msub><mml:mi>m</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:math></inline-formula> is the number of minority class samples. <inline-formula id="ieqn-19"><mml:math id="mml-ieqn-19"><mml:mi>&#x03B2;</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula>. If <inline-formula id="ieqn-20"><mml:math id="mml-ieqn-20"><mml:mi>&#x03B2;</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:math></inline-formula>, then the positive and negative samples after sampling will be in a 1:1. The value of <inline-formula id="ieqn-21"><mml:math id="mml-ieqn-21"><mml:mi>&#x03B2;</mml:mi></mml:math></inline-formula> used in this paper is 1.</p>
<p>2) For each minority class sample <inline-formula id="ieqn-22"><mml:math id="mml-ieqn-22"><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>, compute its complexity. Let <inline-formula id="ieqn-23"><mml:math id="mml-ieqn-23"><mml:msub><mml:mi>r</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> denote the proportion of majority class samples among the <inline-formula id="ieqn-24"><mml:math id="mml-ieqn-24"><mml:mi>k</mml:mi></mml:math></inline-formula> nearest neighbors of sample <inline-formula id="ieqn-25"><mml:math id="mml-ieqn-25"><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>:
<disp-formula id="eqn-2"><label>(2)</label><mml:math id="mml-eqn-2" display="block"><mml:msub><mml:mi>r</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder><mml:mi>I</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mi>l</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mi>k</mml:mi></mml:mfrac></mml:math></disp-formula></p>
<p>Here, <inline-formula id="ieqn-26"><mml:math id="mml-ieqn-26"><mml:msub><mml:mi>N</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> represents the set of <inline-formula id="ieqn-27"><mml:math id="mml-ieqn-27"><mml:mi>k</mml:mi></mml:math></inline-formula> nearest neighbor samples <inline-formula id="ieqn-28"><mml:math id="mml-ieqn-28"><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>within the combined set <inline-formula id="ieqn-29"><mml:math id="mml-ieqn-29"><mml:mi>G</mml:mi><mml:mo>&#x222A;</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:math></inline-formula>. The indicator function <inline-formula id="ieqn-30"><mml:math id="mml-ieqn-30"><mml:mi>I</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> outputs 1 when the condition is satisfied and 0 otherwise. Moreover, to accommodate the variability in data distributions, a fixed value for <inline-formula id="ieqn-31"><mml:math id="mml-ieqn-31"><mml:mi>k</mml:mi></mml:math></inline-formula> is not used. Instead, a dynamic adjustment strategy is employed. This strategy determines the minimal number of neighbors for each minority class sample based on its local distribution, ensuring that at least one of the <inline-formula id="ieqn-32"><mml:math id="mml-ieqn-32"><mml:mi>k</mml:mi></mml:math></inline-formula> nearest neighbors belongs to the majority class. This approach facilitates effective coverage of the class boundary region during the sampling process.</p>
<p>3) Normalize <inline-formula id="ieqn-33"><mml:math id="mml-ieqn-33"><mml:msub><mml:mi>r</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> to obtain the weight <inline-formula id="ieqn-34"><mml:math id="mml-ieqn-34"><mml:msub><mml:mrow><mml:mover><mml:mi>r</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>:
<disp-formula id="eqn-3"><label>(3)</label><mml:math id="mml-eqn-3" display="block"><mml:msub><mml:mrow><mml:mover><mml:mi>r</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:msub><mml:mi>r</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>S</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow></mml:mrow></mml:munderover><mml:msub><mml:mi>r</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:math></disp-formula></p>
<p>4) Calculate the number of synthetic samples <inline-formula id="ieqn-35"><mml:math id="mml-ieqn-35"><mml:msub><mml:mi>q</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> for each minority class sample <inline-formula id="ieqn-36"><mml:math id="mml-ieqn-36"><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>:
<disp-formula id="eqn-4"><label>(4)</label><mml:math id="mml-eqn-4" display="block"><mml:msub><mml:mi>q</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>r</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>&#x00D7;</mml:mo><mml:mi>Q</mml:mi></mml:math></disp-formula></p>
<p>5) Select secondary samples <inline-formula id="ieqn-37"><mml:math id="mml-ieqn-37"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> based on probability <inline-formula id="ieqn-38"><mml:math id="mml-ieqn-38"><mml:msub><mml:mi>p</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>:
<disp-formula id="eqn-5"><label>(5)</label><mml:math id="mml-eqn-5" display="block"><mml:msub><mml:mi>p</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:msub><mml:mi>l</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mrow><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msub><mml:mi>G</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow></mml:mrow></mml:munderover><mml:msub><mml:mi>l</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:math></disp-formula>
<disp-formula id="eqn-6"><label>(6)</label><mml:math id="mml-eqn-6" display="block"><mml:msub><mml:mi>l</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>&#x03B1;</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>r</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mfrac><mml:mi>&#x03B1;</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:mi>&#x03B5;</mml:mi></mml:mrow></mml:mfrac></mml:math></disp-formula></p>
<p>Here, <inline-formula id="ieqn-39"><mml:math id="mml-ieqn-39"><mml:msub><mml:mrow><mml:mover><mml:mi>r</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> is the normalized <inline-formula id="ieqn-40"><mml:math id="mml-ieqn-40"><mml:msub><mml:mi>r</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>, and <inline-formula id="ieqn-41"><mml:math id="mml-ieqn-41"><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is the Euclidean distance between samples, <inline-formula id="ieqn-42"><mml:math id="mml-ieqn-42"><mml:mi>&#x03B5;</mml:mi></mml:math></inline-formula> is a small constant term.</p>
<p>6) Generate new samples <inline-formula id="ieqn-43"><mml:math id="mml-ieqn-43"><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> based on each sample pair <inline-formula id="ieqn-44"><mml:math id="mml-ieqn-44"><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>:
<disp-formula id="eqn-7"><label>(7)</label><mml:math id="mml-eqn-7" display="block"><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x00D7;</mml:mo><mml:mi>&#x03BB;</mml:mi></mml:math></disp-formula></p>
<p>Here, <inline-formula id="ieqn-45"><mml:math id="mml-ieqn-45"><mml:mi>&#x03BB;</mml:mi></mml:math></inline-formula> is a random value in the range (0, 1).</p>
</sec>
<sec id="s4_3">
<label>4.3</label>
<title>Contract Transaction Graph Construction</title>
<p>This section presents a comprehensive overview of the methodology for constructing transaction contract graphs and outlines the procedures involved in extracting transaction graphs. The construction process of CTG is presented in Algorithm 2. The overall architecture of this method includes the following four stages:</p>
<p><bold><italic>1) Static Analysis:</italic></bold> To meet the requirements for generating a smart contract graph, we start with a static analysis of the source code. Our goal is to identify functions related to transaction and fund management operations and extract their various semantic relationships. From there, we can build a contract graph based on the results of this static analysis. Specifically, we initiate the analysis by examining the contract&#x2019;s source code to gather essential function attributes, such as function names, visibility modifiers, and payable designations.</p>
<fig id="fig-6">
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_69152-fig-6.tif"/>
</fig>
<p>Notably, we exclude the <inline-formula id="ieqn-74"><mml:math id="mml-ieqn-74"><mml:mi>f</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi><mml:mi>b</mml:mi><mml:mi>a</mml:mi><mml:mi>c</mml:mi><mml:mi>k</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> function from our analysis. As a default safety mechanism in smart contracts, the fallback function is primarily used for receiving Ether or handling calls that do not correspond to any defined functions. However, in fraudulent contracts like Ponzi schemes, the role of the fallback function is quite limited. These contracts are procedurally legal but their fraudulent nature mainly lies in their fund flow patterns rather than in exploiting vulnerabilities. Therefore, when constructing the contract graph, we choose to eliminate nodes representing the fallback function and remove any edges connected to them. Lines 1&#x2013;5 of Algorithm 2 correspond to the implementation of the aforementioned static analysis process.</p>
<p><bold><italic>2) Graph Generation Phase:</italic></bold> In the graph generation phase, we use the extracted function attributes and data dependencies to construct a contract graph. This simulation helps in understanding the behavior of anomalous contracts and triggers their functionalities. As shown in Lines 6 to 14 of Algorithm 2. We construct a directed contract graph, denoted as DGC and represented by <inline-formula id="ieqn-75"><mml:math id="mml-ieqn-75"><mml:mi>G</mml:mi><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>V</mml:mi><mml:mo>,</mml:mo><mml:mi>E</mml:mi><mml:mo>,</mml:mo><mml:mi>&#x03B1;</mml:mi><mml:mo>,</mml:mo><mml:mi>&#x03B2;</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, which comprises a node set <italic>V</italic> and an edge set <italic>E</italic>. The function <inline-formula id="ieqn-76"><mml:math id="mml-ieqn-76"><mml:mi>&#x03B1;</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>V</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> maps node types to distinguish among different node categories, while <inline-formula id="ieqn-77"><mml:math id="mml-ieqn-77"><mml:mi>&#x03B2;</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>E</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> maps edge types to differentiate between various edge categories. Here, <italic>V</italic> and <italic>E</italic> denote the node set and edge set, respectively.</p>
<p>Node Representation. Nodes represent the key elements of the contract graph, including functions and variables. The contract graph comprises three types of nodes: core nodes, function nodes, and variable nodes. <xref ref-type="table" rid="table-1">Table 1</xref> details the classification of these three node types. Core nodes signify key variables or function calls related to Ponzi schemes. Function nodes represent functions that have not been extracted as core nodes. Variable nodes represent variables that have not been extracted as core nodes.</p>
<table-wrap id="table-1">
<label>Table 1</label>
<caption>
<title>Node type classification and representation</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Node type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Core nodes</td>
<td>User balance variables;</td>
</tr>
<tr>
<td></td>
<td>Variables for calculating dividend ratios;</td>
</tr>
<tr>
<td></td>
<td>Functions that call <inline-formula id="ieqn-78"><mml:math id="mml-ieqn-78"><mml:mi>c</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi><mml:mo>.</mml:mo><mml:mi>v</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>u</mml:mi><mml:mi>e</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, <inline-formula id="ieqn-79"><mml:math id="mml-ieqn-79"><mml:mi>t</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>s</mml:mi><mml:mi>f</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, or <inline-formula id="ieqn-80"><mml:math id="mml-ieqn-80"><mml:mi>s</mml:mi><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>;</td>
</tr>
<tr>
<td></td>
<td>Variables that can directly affect user balances;</td>
</tr>
<tr>
<td></td>
<td>Loop condition variables.</td>
</tr>
<tr>
<td>Function nodes</td>
<td>Functions not extracted as core nodes.</td>
</tr>
<tr>
<td>Variable nodes</td>
<td>Variables not extracted as core nodes.</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>As illustrated in <xref ref-type="fig" rid="fig-2">Fig. 2</xref>, this exemplifies a simplistic case of a Ponzi scheme contract. The contract embodies a quintessential Ponzi scheme framework, where returns promised to early investors are fulfilled primarily through capital inflows from subsequent investors, rather than from legitimate business operations or investment gains. Upon calling the <inline-formula id="ieqn-81"><mml:math id="mml-ieqn-81"><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> function, the contract first deducts 10% of the investment amount as a fee, with the remaining 90% allocated to <inline-formula id="ieqn-82"><mml:math id="mml-ieqn-82"><mml:mi>b</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>c</mml:mi><mml:mi>e</mml:mi></mml:math></inline-formula>, as defined in line four. Simultaneously, the investor&#x2019;s details are recorded in the <inline-formula id="ieqn-83"><mml:math id="mml-ieqn-83"><mml:mi>p</mml:mi><mml:mi>a</mml:mi><mml:mi>r</mml:mi><mml:mi>t</mml:mi><mml:mi>i</mml:mi><mml:mi>c</mml:mi><mml:mi>i</mml:mi><mml:mi>p</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi><mml:mi>s</mml:mi></mml:math></inline-formula> array. The contract promises a fixed return rate of 150%, as outlined in line six. Before transferring 150% of the principal to the earliest investor waiting for payout, it checks if the current balance can cover the total amount due, including profit, to the investor indexed by <inline-formula id="ieqn-84"><mml:math id="mml-ieqn-84"><mml:mi>p</mml:mi><mml:mi>a</mml:mi><mml:mi>y</mml:mi><mml:mi>o</mml:mi><mml:mi>u</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>d</mml:mi><mml:mi>x</mml:mi></mml:math></inline-formula>. If sufficient, the transfer is made, the balance is updated and the <inline-formula id="ieqn-85"><mml:math id="mml-ieqn-85"><mml:mi>p</mml:mi><mml:mi>a</mml:mi><mml:mi>y</mml:mi><mml:mi>o</mml:mi><mml:mi>u</mml:mi><mml:mi>t</mml:mi><mml:mi>I</mml:mi><mml:mi>d</mml:mi><mml:mi>x</mml:mi></mml:math></inline-formula> increments to the next investor awaiting payment. This operation relies entirely on a continuous inflow of new investments to sustain the balance. A decline or halt in new investors leads to an inability to meet promised high returns, putting later investors at risk of losing both returns and principal. Moreover, the contract owner can withdraw accumulated fees at any time via the <inline-formula id="ieqn-86"><mml:math id="mml-ieqn-86"><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi><mml:mi>t</mml:mi><mml:mi>F</mml:mi><mml:mi>e</mml:mi><mml:mi>e</mml:mi><mml:mi>s</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> function is activated, further destabilizing the balance. High return rates, reliance on incoming funds, lack of underlying profitable activities, and unequal risks between owners and investors characterize this as a typical Ponzi scheme. Inevitably, without new investors, the financial chain breaks down, likely resulting in significant losses for latecomers.</p>
<fig id="fig-2">
<label>Figure 2</label>
<caption>
<title>Ponzi scheme example</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_69152-fig-2.tif"/>
</fig>
<p>To facilitate the subsequent edge construction process, we have labeled each node with corresponding colors and sequence numbers in the figure.</p>
<p>Directed Edge Representation. To capture the rich semantic relationships between nodes, we define two levels of edge classification. Different nodes are connected based on static analysis of statement descriptions, with all edges categorized as either control flow or data flow. <xref ref-type="table" rid="table-2">Table 2</xref> details the types and semantics of these directed edges. Control flow edges represent program statements that describe contract execution paths. Data flow edges track variable usage, reflecting changes and movements of funds or account balances, including variable access or modification. <italic>S</italic> represents statements, code blocks and <inline-formula id="ieqn-87"><mml:math id="mml-ieqn-87"><mml:mi>e</mml:mi></mml:math></inline-formula> expressions, including Boolean logic expressions and arithmetic operations.</p>
<table-wrap id="table-2">
<label>Table 2</label>
<caption>
<title>Classification and representation of edge types</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th align="center">Semantic</th>
<th align="center">Statement</th>
<th align="center">Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>Assertion</td>
<td>Assert <inline-formula id="ieqn-88"><mml:math id="mml-ieqn-88"><mml:mi>e</mml:mi></mml:math></inline-formula></td>
<td>Control flow</td>
</tr>
<tr>
<td>Condition check</td>
<td>Require <inline-formula id="ieqn-89"><mml:math id="mml-ieqn-89"><mml:mi>e</mml:mi></mml:math></inline-formula></td>
<td></td>
</tr>
<tr>
<td>Transaction revert</td>
<td>Revert <inline-formula id="ieqn-90"><mml:math id="mml-ieqn-90"><mml:mi>e</mml:mi></mml:math></inline-formula></td>
<td></td>
</tr>
<tr>
<td>Exception throw</td>
<td>Throw <inline-formula id="ieqn-91"><mml:math id="mml-ieqn-91"><mml:mi>e</mml:mi></mml:math></inline-formula></td>
<td></td>
</tr>
<tr>
<td>Conditional control</td>
<td>If <inline-formula id="ieqn-92"><mml:math id="mml-ieqn-92"><mml:mi>e</mml:mi></mml:math></inline-formula></td>
<td></td>
</tr>
<tr>
<td></td>
<td>If {}else {}</td>
<td></td>
</tr>
<tr>
<td></td>
<td>If {}then {}</td>
<td></td>
</tr>
<tr>
<td>Loop control</td>
<td>While {}do {}</td>
<td></td>
</tr>
<tr>
<td></td>
<td>For <inline-formula id="ieqn-93"><mml:math id="mml-ieqn-93"><mml:mi>e</mml:mi></mml:math></inline-formula></td>
<td></td>
</tr>
<tr>
<td>Sequence</td>
<td><inline-formula id="ieqn-94"><mml:math id="mml-ieqn-94"><mml:msub><mml:mi>s</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:math></inline-formula>;<inline-formula id="ieqn-95"><mml:math id="mml-ieqn-95"><mml:msub><mml:mi>s</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:math></inline-formula></td>
<td></td>
</tr>
<tr>
<td>Declare and assign</td>
<td>Let x: y &#x003D; <inline-formula id="ieqn-96"><mml:math id="mml-ieqn-96"><mml:mi>e</mml:mi></mml:math></inline-formula></td>
<td>Data flow</td>
</tr>
<tr>
<td>Assignment</td>
<td><inline-formula id="ieqn-97"><mml:math id="mml-ieqn-97"><mml:msub><mml:mi>e</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:math></inline-formula> &#x003D; <inline-formula id="ieqn-98"><mml:math id="mml-ieqn-98"><mml:msub><mml:mi>e</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:math></inline-formula></td>
<td></td>
</tr>
</tbody>
</table>
</table-wrap>
<p><xref ref-type="fig" rid="fig-3">Fig. 3a</xref> shows the contract graph constructed based on the Ponzi scheme contract example illustrated in <xref ref-type="fig" rid="fig-2">Fig. 2</xref>.</p>
<fig id="fig-3">
<label>Figure 3</label>
<caption>
<title>Graph construction process and interpretability</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_69152-fig-3.tif"/>
</fig>
<p><bold><italic>3) Key Graph Information Extraction:</italic></bold> During information propagation in graph neural networks, existing approaches often fail to adequately account for interference from transaction-irrelevant code segments. These segments may disrupt the model&#x2019;s learning of Ponzi scheme-related features, ultimately compromising detection accuracy. Moreover, the varied structural compositions of graphs derived from different smart contract source codes pose challenges to the effectiveness of GNN training.</p>
<p>In Ponzi scheme detection, only transaction-relevant semantic information proves critical. To enhance detection accuracy and efficiency, we must eliminate irrelevant redundant information while preserving transaction-related semantics in the contract graph. This process not only highlights detection-critical information but also substantially reduces graph complexity by removing non-essential elements. The simplified graph representation enables GNNs to more effectively learn features vital for Ponzi scheme identification, thereby improving overall model performance. Based on the contract graph, we carry out two steps to extract transaction-related semantic segments. Corresponding to Lines 14 to 28 in Algorithm 2. In the first step, the transfer interface is employed as an extraction criterion for backward information retrieval, with the goal of identifying the nodes on which the transfer interface relies. In step two, we use the state variables identified in step one as criteria for forward and backward extraction, retaining the semantics of all state variables within functions dependent on transactions.</p>
<p><italic><bold>Step 1:</bold> Extraction Based on Transfer Interface</italic>. Smart contracts leverage the transfer interface to facilitate cryptocurrency transmission on blockchain platforms. The significance of this assertion resides not only in its semantic content but also in its profound connection to the execution context. By analyzing the transfer interface and its dependent code snippets, one can understand how the function implements the specific semantics of transactions. The transfer interface and its associated codes fully display the logic for executing fund transfers. Before invoking this interface, smart contracts usually perform a series of conditional checks, including permission verification, account status checks, and business rule constraints, among other control logics. Moreover, the input parameters of the transfer interface define the transaction recipient and amount. Thus, integrating the transfer operation with its associated data context can uncover how the semantics of transaction recipients and amounts are computed within the smart contract code. By combining the transfer statement with its dependent context, we can collect semantic information about the transfer&#x2019;s execution and derive specific semantics related to the transaction recipient and amount. This approach ensures that important code snippets related to transactions are retained from the smart contract code to the greatest extent possible. We construct an extraction standard node set (Extract standard nodes) <italic>ES</italic>, which includes all nodes related to transaction operations, such as function calls like <inline-formula id="ieqn-99"><mml:math id="mml-ieqn-99"><mml:mi>c</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi><mml:mo>.</mml:mo><mml:mi>v</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>u</mml:mi><mml:mi>e</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, <inline-formula id="ieqn-100"><mml:math id="mml-ieqn-100"><mml:mi>t</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>s</mml:mi><mml:mi>f</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, or <inline-formula id="ieqn-101"><mml:math id="mml-ieqn-101"><mml:mi>s</mml:mi><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>. These nodes serve as starting points for extraction. We use each node <inline-formula id="ieqn-102"><mml:math id="mml-ieqn-102"><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>&#x2208;</mml:mo><mml:mi>E</mml:mi><mml:mi>S</mml:mi></mml:math></inline-formula> as an extraction criterion and start extracting based on the control flow and data flow in <inline-formula id="ieqn-103"><mml:math id="mml-ieqn-103"><mml:mi>D</mml:mi><mml:mi>G</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>. This process yields the corresponding contract extraction graph and records all nodes, forming the node set <inline-formula id="ieqn-104"><mml:math id="mml-ieqn-104"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mi>G</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msubsup></mml:math></inline-formula>.</p>
<p><italic><bold>Step 2:</bold></italic> In smart contracts, state variables are stored on the blockchain and affect both current and future executions. When transactions rely on specific state variables, it is essential to extract the semantics of all transaction-related state variables&#x2014;rather than merely those associated with the transfer interface in the first step. From the key information extracted in the first step, we have obtained all nodes related to the transfer interface, denoted as <inline-formula id="ieqn-105"><mml:math id="mml-ieqn-105"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mi>G</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msubsup></mml:math></inline-formula>. Therefore, these nodes contain all transaction-related state variables. We extract all state variables that depend on transactions to construct a set of transaction-dependent state variables <inline-formula id="ieqn-106"><mml:math id="mml-ieqn-106"><mml:mi>S</mml:mi><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mi>G</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msubsup></mml:math></inline-formula>. Each state variable <inline-formula id="ieqn-107"><mml:math id="mml-ieqn-107"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msubsup><mml:mo>&#x2208;</mml:mo><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mi>G</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msubsup></mml:math></inline-formula> forms part of this set. Then, using all state variables <inline-formula id="ieqn-108"><mml:math id="mml-ieqn-108"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msubsup><mml:mo>&#x2208;</mml:mo><mml:mi>S</mml:mi><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mi>G</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msubsup></mml:math></inline-formula> as extraction criteria, we perform forward and backward extraction <inline-formula id="ieqn-109"><mml:math id="mml-ieqn-109"><mml:mi>D</mml:mi><mml:mi>G</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> to obtain the corresponding nodes related to these state variables, denoted as <inline-formula id="ieqn-110"><mml:math id="mml-ieqn-110"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>D</mml:mi><mml:mi>G</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msubsup></mml:math></inline-formula>. We add the nodes in the state-variable-dependent node set <inline-formula id="ieqn-111"><mml:math id="mml-ieqn-111"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>D</mml:mi><mml:mi>G</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msubsup></mml:math></inline-formula><inline-formula id="ieqn-112"><mml:math id="mml-ieqn-112"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mi>G</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msubsup></mml:math></inline-formula> to expand the dependency node set. Using the expanded dependency node set <inline-formula id="ieqn-113"><mml:math id="mml-ieqn-113"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mi>G</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msubsup><mml:mo>&#x222A;</mml:mo><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>D</mml:mi><mml:mi>G</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msubsup></mml:math></inline-formula> and their related edges, we construct the final contract transaction graph <inline-formula id="ieqn-114"><mml:math id="mml-ieqn-114"><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>D</mml:mi><mml:mi>C</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msub></mml:math></inline-formula>.</p>
<p>This process not only includes semantic fragments directly related to the transfer interface but also considers the cross-transaction effects of state variables. The resulting CTG after extraction is shown in <xref ref-type="fig" rid="fig-3">Fig. 3b</xref>.</p>

<p><bold><italic>4) Graph Embedding:</italic></bold> Graph embedding, a crucial data preprocessing technique, plays a significant role in the field of graph data processing [<xref ref-type="bibr" rid="ref-26">26</xref>]. Its main function is to transform high-dimensional and sparsely featured graph data into low-dimensional, dense, and continuous vector representations. In practical applications, graph embedding techniques convert all nodes in a graph to their corresponding vector representations. This mapping allows the similarity between nodes to be effectively translated into distances or similarity measures between vectors. By utilizing this feature, graph embedding has become extensively applied across a range of graph-related activities, such as the visualization of graph data to provide clear and understandable representations of intricate structures; extracting features to uncover key information within graph data; aiding classification by accurately determining node categories based on vector features; and facilitating clustering by grouping nodes with similar characteristics.</p>
<p>After normalizing the contract graph, it encompasses features across both nodes and directed edges. These features are further consolidated into core node features and presented in text form. To prepare these features for input into neural networks, we use the word2vec [<xref ref-type="bibr" rid="ref-27">27</xref>] model to vectorize node and edge features, transforming textual features into low-dimensional vectors that meet the input data format requirements of neural networks. By concatenating the feature vectors of nodes and edges, we form the node feature vectors, completing the construction of CTG for subsequent model training.</p>
</sec>
<sec id="s4_4">
<label>4.4</label>
<title>Model Detection</title>
<p>Deep learning, leveraging its ability to automatically extract features from raw data, has demonstrated exceptional performance across diverse domains. However, traditional deep learning models are mainly limited to processing data in the form of vectors or matrices. On the other hand, GNNs possess unique advantages in handling graph-structured data, effectively modeling and analyzing complex relationships within graphs [<xref ref-type="bibr" rid="ref-25">25</xref>]. Based on this characteristic, this study utilizes graph-structured data constructed from smart contract transactions and implements an effective detection of Ponzi schemes through the GNN model.</p>
<p><bold>Graph Embedding Learning.</bold> We utilize CTG as input to the GNN model, where the node feature matrix <inline-formula id="ieqn-115"><mml:math id="mml-ieqn-115"><mml:mrow><mml:mtext mathvariant="bold">X</mml:mtext></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>V</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>&#x00D7;</mml:mo><mml:mi>F</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> encodes the feature vectors of each node, and the edge feature matrix <inline-formula id="ieqn-116"><mml:math id="mml-ieqn-116"><mml:mrow><mml:mtext mathvariant="bold">E</mml:mtext></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mi>E</mml:mi><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>&#x00D7;</mml:mo><mml:mi>D</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>. Graph Attention Networks (GAT) are selected as the convolutional layer component of the GNN. GAT employs a self-attention mechanism to perform weighted aggregation of neighborhood information, enabling more effective capture of node-to-node relationships and graph structural characteristics. Specifically, for each node <inline-formula id="ieqn-117"><mml:math id="mml-ieqn-117"><mml:msub><mml:mi>v</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>&#x2208;</mml:mo><mml:mi>V</mml:mi></mml:math></inline-formula>, its updated feature vector <inline-formula id="ieqn-118"><mml:math id="mml-ieqn-118"><mml:msubsup><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> is computed using the following formula:
<disp-formula id="eqn-8"><label>(8)</label><mml:math id="mml-eqn-8" display="block"><mml:msubsup><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:munder><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mi>W</mml:mi><mml:msub><mml:mi>h</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>where <inline-formula id="ieqn-119"><mml:math id="mml-ieqn-119"><mml:msub><mml:mi>N</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> denotes the set of neighboring nodes of node <inline-formula id="ieqn-120"><mml:math id="mml-ieqn-120"><mml:msub><mml:mi>v</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>, <italic>W</italic> represents a learnable weight matrix, <inline-formula id="ieqn-121"><mml:math id="mml-ieqn-121"><mml:mi>&#x03C3;</mml:mi></mml:math></inline-formula> signifies a nonlinear activation function, and <inline-formula id="ieqn-122"><mml:math id="mml-ieqn-122"><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> stands for the attention coefficient between nodes <inline-formula id="ieqn-123"><mml:math id="mml-ieqn-123"><mml:msub><mml:mi>v</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-124"><mml:math id="mml-ieqn-124"><mml:msub><mml:mi>v</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:math></inline-formula>, computed as follows:
<disp-formula id="eqn-9"><label>(9)</label><mml:math id="mml-eqn-9" display="block"><mml:msub><mml:mi>a</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:munder><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mfrac></mml:math></disp-formula>where <inline-formula id="ieqn-125"><mml:math id="mml-ieqn-125"><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the feature vector of nodes <inline-formula id="ieqn-126"><mml:math id="mml-ieqn-126"><mml:msub><mml:mi>v</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> and, <inline-formula id="ieqn-127"><mml:math id="mml-ieqn-127"><mml:msub><mml:mi>v</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:math></inline-formula> after linear transformation, calculated as follows:
<disp-formula id="eqn-10"><label>(10)</label><mml:math id="mml-eqn-10" display="block"><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mtext>LeakyReLU</mml:mtext></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>&#x03B1;</mml:mi><mml:mi>T</mml:mi></mml:msup><mml:mo stretchy="false">[</mml:mo><mml:mi>W</mml:mi><mml:msub><mml:mi>h</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mi>W</mml:mi><mml:msub><mml:mi>h</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msub><mml:mi>W</mml:mi><mml:mi>e</mml:mi></mml:msub><mml:msub><mml:mi>m</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">]</mml:mo><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>where <inline-formula id="ieqn-128"><mml:math id="mml-ieqn-128"><mml:mtext>LeakyReLU</mml:mtext></mml:math></inline-formula> serves as the activation function, <inline-formula id="ieqn-129"><mml:math id="mml-ieqn-129"><mml:mi>&#x03B1;</mml:mi></mml:math></inline-formula> denotes a learnable weight vector, &#x2225; signifies the concatenation operation, <inline-formula id="ieqn-130"><mml:math id="mml-ieqn-130"><mml:msub><mml:mi>h</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> represents the feature vector of node <italic>i</italic>, and <inline-formula id="ieqn-131"><mml:math id="mml-ieqn-131"><mml:msub><mml:mi>m</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> denotes the edge feature vector between nodes <inline-formula id="ieqn-132"><mml:math id="mml-ieqn-132"><mml:mi>i</mml:mi></mml:math></inline-formula> and <inline-formula id="ieqn-133"><mml:math id="mml-ieqn-133"><mml:mi>j</mml:mi></mml:math></inline-formula>.</p>
<p>After completing the graph embedding process, we utilize mean pooling to aggregate node features, yielding an overall graph representation.</p>
<p><bold>Classification Detection.</bold> The classifier consists of a fully connected layer and a dropout layer. The fully connected layer is intended to learn intricate nonlinear interactions among input data features, which helps capture comprehensive feature representations and improve classification accuracy. Dropout layers randomly set neuron outputs to zero, effectively preventing model overfitting and enhancing generalization ability. In graph classification tasks, the global feature representation of a graph is input into the classifier. After processing through fully connected and dropout layers, the classifier outputs predicted class labels for the graphs. Using this approach, the model assesses whether a target smart contract constitutes a Ponzi scheme, thereby facilitating efficient identification of such schemes.</p>
</sec>
<sec id="s4_5">
<label>4.5</label>
<title>Model Interpretability</title>
<p>To enhance the interpretability of the model, this study incorporates GNNExplainer [<xref ref-type="bibr" rid="ref-28">28</xref>]. GNNExplainer is capable of automatically identifying and revealing the critical subgraph structures and node features that the model relies on when making predictions. The core idea of GNNExplainer is to extract the most influential subgraph and key node features by minimizing the entropy of the subgraph structure and feature subset while preserving the model&#x2019;s original prediction. As a model-agnostic explanation technique, GNNExplainer can provide interpretability for any GNN-based model. When applied to the CTG constructed in this work, GNNExplainer effectively highlights which function nodes, variable nodes, and their dependencies play a decisive role in the model&#x2019;s classification of a contract as a Ponzi scheme. The detailed procedure of the GNNExplainer subgraph extraction method is as follows:</p>
<p><bold><italic>Step 1:</italic></bold> Initialization. Initialize the graph mask matrix and feature mask matrix to select important subgraph structures and node features.</p>
<p><bold><italic>Step 2:</italic></bold> Input Data. Provide a trained GNN model along with its prediction results.</p>
<p><bold><italic>Step 3:</italic></bold> Subgraph Generation. Adjust the graph mask to generate a subgraph that has the greatest impact on the GNN model&#x2019;s prediction.</p>
<p><bold><italic>Step 4:</italic></bold> Feature Selection. Input the trained GNN model and its prediction results.</p>
<p><bold><italic>Step 5:</italic></bold> Objective Definition. For the target node <inline-formula id="ieqn-134"><mml:math id="mml-ieqn-134"><mml:mi>v</mml:mi></mml:math></inline-formula>, identify the subgraph structure <inline-formula id="ieqn-135"><mml:math id="mml-ieqn-135"><mml:msub><mml:mi>G</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>&#x2286;</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mi>c</mml:mi></mml:msub></mml:math></inline-formula> (where <inline-formula id="ieqn-136"><mml:math id="mml-ieqn-136"><mml:mi>c</mml:mi></mml:math></inline-formula> denotes the class) and corresponding features <inline-formula id="ieqn-137"><mml:math id="mml-ieqn-137"><mml:msub><mml:mi>X</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:math></inline-formula> that have a critical impact on its predicted outcome <inline-formula id="ieqn-138"><mml:math id="mml-ieqn-138"><mml:mrow><mml:mover><mml:mi>y</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula>.</p>
<p><bold><italic>Step 6:</italic></bold> Optimization Objective. Formalize the notion of &#x201C;importance&#x201D; by maximizing the mutual information between the subgraph and the prediction outcome.</p>
<p><bold><italic>Step 7:</italic></bold> Explanation Output. The resulting subgraph structure is the explanation subgraph, representing the parts of the graph structure and features that the GNN model actually focuses on when making predictions.</p>
<p>Following the above steps, GNNExplainer extracts the subgraph from the CTG that truly influences the prediction outcome. This subgraph, referred to as the explanation subgraph, serves as an interpretation of the model&#x2019;s decision. Taking a Ponzi scheme contract illustrated in <xref ref-type="fig" rid="fig-2">Fig. 2</xref> as an example, <xref ref-type="fig" rid="fig-3">Fig. 3c</xref> presents the key subgraph identified by GNNExplainer. This subgraph refines the original transaction graph by retaining nodes and edges critical to the classification, including function nodes, variable nodes, and their dependency relationships, while filtering out redundant information to highlight the core logical pathways. Notably, the variable node &#x201C;balance&#x201D; represents a key factor reflecting the core mechanism of fund allocation and cyclical returns within the contract. These critical nodes and their relationships constitute essential criteria for identifying Ponzi schemes. Furthermore, as shown in <xref ref-type="fig" rid="fig-3">Fig. 3b</xref>, the explanation subgraph aligns closely with the model&#x2019;s prediction, thereby validating the interpretability of the model&#x2019;s decision process and the soundness of its rationale.</p>

</sec>
</sec>
<sec id="s5">
<label>5</label>
<title>Experiments</title>
<p>In this section, we perform experiments to assess the efficacy of our suggested detection approach. To ensure the reliability of the outcomes, these experiments utilize verified datasets. We begin by offering an overview of the experimental setup and evaluation criteria. Then, we present experiments utilizing our proposed approach for detecting Ponzi scheme smart contracts and compare its performance against other representative methods [<xref ref-type="bibr" rid="ref-29">29</xref>,<xref ref-type="bibr" rid="ref-16">16</xref>].</p>
<sec id="s5_1">
<label>5.1</label>
<title>Experimental Setup and Evaluation Metrics</title>
<p>To ensure the reliability and timeliness of the dataset, this study employs a validated and labeled dataset sourced from the XBlock website, as cited in literature [<xref ref-type="bibr" rid="ref-12">12</xref>]. The dataset includes 318 Ponzi scheme contract addresses and 6498 legitimate contract addresses. Using the contract addresses in this dataset, we systematically retrieved the full source code of each contract and all associated transaction records from the Ethereum blockchain explorer.</p>
<p>The experiments were executed on a standalone workstation featuring an Intel Core i7 processor running at 2.9 GHz and 32 GB of RAM. The proposed detection model was developed and executed locally as a standalone offline analysis tool. It does not require on-chain deployment or rely on blockchain security protocols, making it well-suited for static analysis and Ponzi structure identification in smart contracts.</p>
<p>Regarding the experimental parameter settings, the configurations for each module are as follows: In the oversampling phase, the small constant parameter of the improved oversampling algorithm is set to <inline-formula id="ieqn-139"><mml:math id="mml-ieqn-139"><mml:mn>1</mml:mn><mml:mo>&#x00D7;</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>8</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, and the maximum value for dynamic neighbor search <inline-formula id="ieqn-140"><mml:math id="mml-ieqn-140"><mml:msub><mml:mi>k</mml:mi><mml:mrow><mml:mo movablelimits="true" form="prefix">max</mml:mo></mml:mrow></mml:msub></mml:math></inline-formula> is configured as 20. For the graph neural network model, the input node feature dimension is 128, the edge feature dimension is 32, and the network architecture consists of two layers of GAT, each with four attention heads and a hidden layer size of 128. The classifier is designed as a two-layer fully connected neural network, with a binary classification output layer. During training, the AdamW optimizer is employed with a learning rate of 0.001, over 40 epochs, and a dropout rate of 0.5.</p>
<p>To conduct a comparative analysis with other typical Ponzi scheme detection methods, we evaluated the models using three key evaluation metrics: Precision, Recall, and the F1-score. The mathematical formulations for these metrics are presented in the following equations:
<disp-formula id="eqn-11"><label>(11)</label><mml:math id="mml-eqn-11" display="block"><mml:mrow><mml:mtext>Precision</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mtext>TP</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>TP</mml:mtext></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:mtext>FP</mml:mtext></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula>
<disp-formula id="eqn-12"><label>(12)</label><mml:math id="mml-eqn-12" display="block"><mml:mrow><mml:mtext>Recall</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mtext>TP</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>TP</mml:mtext></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:mtext>FN</mml:mtext></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula>
<disp-formula id="eqn-13"><label>(13)</label><mml:math id="mml-eqn-13" display="block"><mml:mrow><mml:mtext>F-score</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:mn>2</mml:mn><mml:mo>&#x00D7;</mml:mo><mml:mfrac><mml:mrow><mml:mrow><mml:mtext>Precision</mml:mtext></mml:mrow><mml:mo>&#x00D7;</mml:mo><mml:mrow><mml:mtext>Recall</mml:mtext></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:mtext>Precision</mml:mtext></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:mtext>Recall</mml:mtext></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula></p>
<p>TP (True Positives) represents the number of contracts correctly identified as Ponzi schemes. FP (False Positives) indicates the number of normal contracts mistakenly classified as Ponzi schemes. FN (False Negatives) denotes the number of Ponzi scheme contracts incorrectly predicted as normal contracts.</p>
</sec>
<sec id="s5_2">
<label>5.2</label>
<title>Handling Imbalanced Classification</title>
<p>To assess the model&#x2019;s effectiveness on imbalanced datasets and to confirm the efficacy of our oversampling algorithm in achieving sample balance, we applied various oversampling techniques to the dataset. We then performed a comparative analysis of the experimental outcomes, which are summarized in <xref ref-type="table" rid="table-3">Table 3</xref>.</p>
<table-wrap id="table-3">
<label>Table 3</label>
<caption>
<title>Test results of different oversampling algorithms</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Sampling techniques</th>
<th>Precision</th>
<th>Recall</th>
<th>F-score</th>
</tr>
</thead>
<tbody>
<tr>
<td>No sampling</td>
<td>0.90</td>
<td>0.87</td>
<td>0.88</td>
</tr>
<tr>
<td>Random oversampling</td>
<td>0.93</td>
<td>0.85</td>
<td>0.89</td>
</tr>
<tr>
<td>SMOTE</td>
<td>0.92</td>
<td>0.89</td>
<td>0.90</td>
</tr>
<tr>
<td>ADASYN</td>
<td>0.94</td>
<td>0.90</td>
<td>0.92</td>
</tr>
<tr>
<td>Ours</td>
<td>0.96</td>
<td>0.92</td>
<td>0.94</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>In this research, we utilized an enhanced version of the ADASYN algorithm to oversample the minority class instances within the training dataset. Our findings indicate that the conventional ADASYN method effectively creates new samples based on the minority class&#x2019;s density distribution, aiding in reducing class imbalance issues. Nonetheless, our refined ADASYN approach significantly improved key performance metrics, including precision, recall, and F1-score, thereby validating the effectiveness of our proposed oversampling technique for minority class instances. Specifically, our enhanced algorithm not only addresses class imbalance but also strengthens the model&#x2019;s ability to learn from minority class data. By optimizing the strategy for generating boundary samples, it further boosts overall classification performance. The substantial increase in recall indicates that the model has become more adept at identifying minority class samples. High precision also demonstrates that the model can accurately detect Ponzi scheme smart contracts&#x2014;a critical attribute for real-world applications. Incorrect identification or failure to detect a Ponzi scheme could lead to substantial financial losses.</p>
</sec>
<sec id="s5_3">
<label>5.3</label>
<title>Different Source Code Graph Construction Methods</title>
<p>To assess the effectiveness of our proposed CTG composition method, we utilized several common code composition methods to re-compose and vectorize the representations of smart contracts. Under identical experimental conditions and training parameters, we fed the results into a detection model for training and testing. The detection outcomes were then compared with those obtained from our method, as shown in <xref ref-type="table" rid="table-4">Table 4</xref>.</p>
<table-wrap id="table-4">
<label>Table 4</label>
<caption>
<title>Test results of different source code graph construction methods</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Graph methods</th>
<th>Precision</th>
<th>Recall</th>
<th>F-score</th>
</tr>
</thead>
<tbody>
<tr>
<td>AST</td>
<td>0.85</td>
<td>0.82</td>
<td>0.83</td>
</tr>
<tr>
<td>CFG</td>
<td>0.90</td>
<td>0.85</td>
<td>0.87</td>
</tr>
<tr>
<td>PDG</td>
<td>0.92</td>
<td>0.88</td>
<td>0.90</td>
</tr>
<tr>
<td>CTG</td>
<td>0.96</td>
<td>0.92</td>
<td>0.94</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The experimental outcomes show that our proposed CTG method surpasses other approaches in performance. The Abstract Syntax Tree (AST) method delivered the weakest performance. Unlike other techniques, AST only captures static syntactic structures of code and fails to represent dynamic semantic information during program execution, such as critical control-flow and data-flow dependencies. Among other graph construction methods, the Program Dependence Graph (PDG) achieved higher accuracy, recall, and F1-score than the Control Flow Graph (CFG) by 2.2%, 3.6%, and 3.4%, respectively. This advantage likely stems from PDG&#x2019;s ability to model both data-flow and control-flow dependencies, making it more effective for detecting Ponzi schemes in smart contracts, which requires identifying transaction-related patterns in source code. Our CTG method further surpasses common graph construction techniques. By eliminating redundant information and focusing on transaction-specific feature extraction, CTG generates a more targeted and comprehensive graph representation. This enables CTG to accurately capture key behavioral patterns associated with Ponzi schemes in smart contracts.</p>
</sec>
<sec id="s5_4">
<label>5.4</label>
<title>Efficiency of Different Methods</title>
<p>To further evaluate the effectiveness of our method in identifying Ponzi schemes within smart contracts and to achieve comprehensive validation,we compared our approach with notable methods from TxClass [<xref ref-type="bibr" rid="ref-20">20</xref>], MTCformer [<xref ref-type="bibr" rid="ref-29">29</xref>] and AdaBoost [<xref ref-type="bibr" rid="ref-16">16</xref>]. We selected precision, recall, and the F-score as metrics to measure model performance. The outcomes are illustrated in <xref ref-type="fig" rid="fig-4">Fig. 4</xref>.</p>
<fig id="fig-4">
<label>Figure 4</label>
<caption>
<title>Comparison with the existing methods</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_69152-fig-4.tif"/>
</fig>
<p>Our proposed method outperforms existing detection methods across all metrics. Specifically, the proposed method achieves a recall of 0.92, representing notable improvements over the values reported by TxClass (0.70), MTCformer (0.83), and AdaBoost (0.80), with relative increases of 31.4%, 10.8%, and 15%, respectively. This substantial performance gain highlights the strong practical value of our approach in the context of smart contract Ponzi scheme detection. From a practical deployment perspective, when analyzing 100 Ponzi contracts, our method is capable of identifying at least 22 more instances than TxClass, and 9 and 12 more cases than MTCformer and AdaBoost, respectively, demonstrating a significant improvement in detection efficiency. We attribute this enhanced performance to two primary factors. First, our approach builds a more extensive graph structure for representing code semantics. Second, by effectively extracting transaction-related key information, the graph structure can more accurately interpret transaction semantics. Additionally, looking at the comprehensive evaluation metric, the F1 score, our method also performs best among the four methods, further confirming its superiority in overall performance. The experimental outcomes indicate that our proposed method is both highly dependable and practically beneficial, providing a novel approach for detecting Ponzi schemes in smart contracts.</p>
</sec>
</sec>
<sec id="s6">
<label>6</label>
<title>Conclusion</title>
<p>To address class imbalance and the challenge of fully expressing transaction semantics in smart contract Ponzi scheme detection, we proposed an oversampling-based detection method primarily targeting Ethereum smart contracts. First, we improved the ADASYN algorithm by integrating proximity to decision boundaries and distribution rationality in feature space, enhancing the identification of boundary samples and generating minority class samples to alleviate sample imbalance. Second, we designed a graph construction algorithm that includes various node and edge types, combined with key graph information extraction techniques to remove redundancy while retaining core transaction semantics. This achieves precise representation of smart contract transaction features. Finally, we utilized GNN combined with GAT for model training and detection, effectively extracting graph features. The experimental outcomes indicate that our method surpasses current advanced methods.</p>
<p>Nevertheless, this study has certain limitations. On the one hand, the accuracy of transaction semantics extraction remains suboptimal when portions of the source code are missing. On the other hand, the proposed method still faces challenges in terms of scalability and real-time applicability when processing large-scale smart contract data. These issues highlight promising directions for future research.</p>
<p>Currently, the proposed detection method is primarily based on offline analysis, relying on static analysis of smart contract source code and transaction graph construction. It does not yet support real-time detection. Given the dynamic and evolving nature of attacks in blockchain environments, real-time capability is crucial. Therefore, improving the framework&#x2019;s real-time applicability will be an important direction for future research.</p>
<p>Future research will concentrate on developing real-time detection techniques for Ponzi schemes in smart contracts, as well as adapting the proposed method to accommodate other blockchain platforms, including Binance Smart Chain (BSC) and Solana. Through comprehensive analysis of diverse features, including opcodes and bytecode, we intend to strengthen the effectiveness and precision of fraud detection mechanisms. Our research primarily seeks to recognize abnormal execution behaviors and implement adaptive monitoring systems that can efficiently uncover suspicious Ponzi structures. Furthermore, we are committed to developing a highly adaptive and scalable detection framework to continuously address evolving fraudulent tactics, thereby providing stronger technical safeguards against smart contract-based financial fraud.</p>
</sec>
</body>
<back>
<ack>
<p>Not applicable.</p>
</ack>
<sec>
<title>Funding Statement</title>
<p>This work was supported by the Key Project of Joint Fund of the National Natural Science Foundation of China &#x201C;Research on Key Technologies and Demonstration Applications for Trusted and Secure Data Circulation and Trading&#x201D; (U24A20241), the National Natural Science Foundation of China &#x201C;Research on Trusted Theories and Key Technologies of Data Security Trading Based on Blockchain&#x201D; (62202118), the Major Scientific and Technological Special Project of Guizhou Province ([2024]014), Scientific and Technological Research Projects from the Guizhou Education Department (Qian jiao ji [2023]003), the Hundred-Level Innovative Talent Project of the Guizhou Provincial Science and Technology Department (Qiankehe Platform Talent-GCC[2023]018), the Major Project of Guizhou Province &#x201C;Research and Application of Key Technologies for Trusted Large Models Oriented to Public Big Data&#x201D; (Qiankehe Major Project [2024]003), and the Guizhou Province Computational Power Network Security Protection Science and Technology Innovation Talent Team (Qiankehe Talent CXTD[2025]029).</p>
</sec>
<sec>
<title>Author Contributions</title>
<p>The authors confirm contribution to the paper as follows: Conceptualization, Yafei Liu; methodology, Yafei Liu, Yuling Chen; validation, Yuling Chen; formal analysis, Xuewei Wang; investigation, Yafei Liu; resources, Yafei Liu; data curation, Yafei Liu; writing&#x2014;original draft preparation, Yafei Liu; writing&#x2014;review and editing, Yafei Liu; visualization, Xuewei Wang, Chaoyue Tan; supervision, Yuxiang Yang, Chaoyue Tan; project administration, Yuxiang Yang; funding acquisition, Chaoyue Tan. All authors reviewed the results and approved the final version of the manuscript.</p>
</sec>
<sec sec-type="data-availability">
<title>Availability of Data and Materials</title>
<p>The data that support the findings of this study are openly available in <ext-link ext-link-type="uri" xlink:href="https://xblock.pro/#/dataset/25">https://xblock.pro/#/dataset/25</ext-link> (accessed on 24 August 2025).</p>
</sec>
<sec>
<title>Ethics Approval</title>
<p>Not applicable.</p>
</sec>
<sec sec-type="COI-statement">
<title>Conflicts of Interest</title>
<p>The authors declare no conflicts of interest to report regarding the present study.</p>
</sec>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1"><label>[1]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Yang</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Tan</surname> <given-names>C</given-names></string-name>, <string-name><surname>Luo</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>Verifiable and redactable blockchain for internet of vehicles data sharing</article-title>. <source>IEEE Internet Things J</source>. <year>2025</year>;<volume>12</volume>(<issue>4</issue>):<fpage>4249</fpage>&#x2013;<lpage>61</lpage>. doi:<pub-id pub-id-type="doi">10.1109/jiot.2024.3483809</pub-id>.</mixed-citation></ref>
<ref id="ref-2"><label>[2]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Chen</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Li</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>Q</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>X</given-names></string-name>, <string-name><surname>Li</surname> <given-names>T</given-names></string-name>, <string-name><surname>Tan</surname> <given-names>C</given-names></string-name></person-group>. <article-title>Energy trading scheme based on consortium blockchain and game theory</article-title>. <source>Comput Stand Interf</source>. <year>2023</year>;<volume>84</volume>:<fpage>103699</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.csi.2022.103699</pub-id>.</mixed-citation></ref>
<ref id="ref-3"><label>[3]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Maurya</surname> <given-names>V</given-names></string-name>, <string-name><surname>Rishiwal</surname> <given-names>V</given-names></string-name>, <string-name><surname>Yadav</surname> <given-names>M</given-names></string-name>, <string-name><surname>Shiblee</surname> <given-names>M</given-names></string-name>, <string-name><surname>Yadav</surname> <given-names>P</given-names></string-name>, <string-name><surname>Agarwal</surname> <given-names>U</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>Blockchain-driven security for IoT networks: state-of-the-art, challenges and future directions</article-title>. <source>Peer Peer Netw Appl</source>. <year>2025</year>;<volume>18</volume>(<issue>1</issue>):<fpage>1</fpage>&#x2013;<lpage>35</lpage>. doi:<pub-id pub-id-type="doi">10.1007/s12083-024-01812-w</pub-id>.</mixed-citation></ref>
<ref id="ref-4"><label>[4]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Dymkov</surname> <given-names>M</given-names></string-name>, <string-name><surname>Gorgadze</surname> <given-names>V</given-names></string-name>, <string-name><surname>Karanyuk</surname> <given-names>A</given-names></string-name>, <string-name><surname>Barger</surname> <given-names>A</given-names></string-name></person-group>. <article-title>Identifying and analyzing web3 protocols with Ponzi scheme features</article-title>. In: <conf-name>2024 6th International Conference on Blockchain Computing and Applications (BCCA); 2024 Nov 26&#x2013;29</conf-name>; <publisher-loc>Dubai, United Arab Emirates</publisher-loc>. p. <fpage>794</fpage>&#x2013;<lpage>800</lpage>.</mixed-citation></ref>
<ref id="ref-5"><label>[5]</label><mixed-citation publication-type="other"><person-group person-group-type="author"><collab>TRM Labs</collab></person-group>. <article-title>Illicit Crypto Ecosystem Report</article-title>; <year>2023 [Internet]</year>. <comment>[cited 2025 Aug 24]</comment>. Available from: <ext-link ext-link-type="uri" xlink:href="https://www.trmlabs.com/report">https://www.trmlabs.com/report</ext-link>.</mixed-citation></ref>
<ref id="ref-6"><label>[6]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Agarwal</surname> <given-names>U</given-names></string-name>, <string-name><surname>Rishiwal</surname> <given-names>V</given-names></string-name>, <string-name><surname>Tanwar</surname> <given-names>S</given-names></string-name>, <string-name><surname>Yadav</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Blockchain and crypto forensics: investigating crypto frauds</article-title>. <source>Int J Netw Manag</source>. <year>2024</year>;<volume>34</volume>(<issue>2</issue>):<fpage>e2255</fpage>. doi:<pub-id pub-id-type="doi">10.1002/nem.2255</pub-id>.</mixed-citation></ref>
<ref id="ref-7"><label>[7]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Luo</surname> <given-names>B</given-names></string-name>, <string-name><surname>Zhang</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>Q</given-names></string-name>, <string-name><surname>Ke</surname> <given-names>A</given-names></string-name>, <string-name><surname>Lu</surname> <given-names>S</given-names></string-name>, <string-name><surname>He</surname> <given-names>B</given-names></string-name></person-group>. <article-title>AI-powered fraud detection in decentralized finance: a project life cycle perspective</article-title>. <source>ACM Comput Surv</source>. <year>2024</year>;<volume>57</volume>(<issue>4</issue>):<fpage>1</fpage>&#x2013;<lpage>38</lpage>. doi:<pub-id pub-id-type="doi">10.1145/3705296</pub-id>.</mixed-citation></ref>
<ref id="ref-8"><label>[8]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Chen</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Yang</surname> <given-names>X</given-names></string-name>, <string-name><surname>Li</surname> <given-names>T</given-names></string-name>, <string-name><surname>Ren</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Long</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>A blockchain-empowered authentication scheme for worm detection in wireless sensor network</article-title>. <source>Digital Communicat Netw</source>. <year>2024</year>;<volume>10</volume>(<issue>2</issue>):<fpage>265</fpage>&#x2013;<lpage>72</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.dcan.2022.04.007</pub-id>.</mixed-citation></ref>
<ref id="ref-9"><label>[9]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Dey</surname> <given-names>I</given-names></string-name>, <string-name><surname>Pratap</surname> <given-names>V</given-names></string-name></person-group>. <article-title>A comparative study of SMOTE, borderline-SMOTE, and ADASYN oversampling techniques using different classifiers</article-title>. In: <conf-name>2023 3rd International Conference on Smart Data Intelligence (ICSMDI); 2023 Mar 30&#x2013;31</conf-name>; <publisher-loc>Trichy, India</publisher-loc>. p. <fpage>294</fpage>&#x2013;<lpage>302</lpage>.</mixed-citation></ref>
<ref id="ref-10"><label>[10]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Bartoletti</surname> <given-names>M</given-names></string-name>, <string-name><surname>Carta</surname> <given-names>S</given-names></string-name>, <string-name><surname>Cimoli</surname> <given-names>T</given-names></string-name>, <string-name><surname>Saia</surname> <given-names>R</given-names></string-name></person-group>. <article-title>Dissecting Ponzi schemes on Ethereum: identification, analysis, and impact</article-title>. <source>Future Generat Comput Syst</source>. <year>2020</year>;<volume>102</volume>(<issue>3&#x2013;4</issue>):<fpage>259</fpage>&#x2013;<lpage>77</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.future.2019.08.014</pub-id>.</mixed-citation></ref>
<ref id="ref-11"><label>[11]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fan</surname> <given-names>S</given-names></string-name>, <string-name><surname>Fu</surname> <given-names>S</given-names></string-name>, <string-name><surname>Xu</surname> <given-names>H</given-names></string-name>, <string-name><surname>Cheng</surname> <given-names>X</given-names></string-name></person-group>. <article-title>Al-SPSD: anti-leakage smart Ponzi schemes detection in blockchain</article-title>. <source>Inform Process Manag</source>. <year>2021</year>;<volume>58</volume>(<issue>4</issue>):<fpage>102587</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.ipm.2021.102587</pub-id>.</mixed-citation></ref>
<ref id="ref-12"><label>[12]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Zheng</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>W</given-names></string-name>, <string-name><surname>Zhong</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Lu</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>Securing the ethereum from smart ponzi schemes: identification using static features</article-title>. <source>ACM Transact Softw Eng Methodol</source>. <year>2023</year>;<volume>32</volume>(<issue>5</issue>):<fpage>1</fpage>&#x2013;<lpage>28</lpage>. doi:<pub-id pub-id-type="doi">10.1145/3571847</pub-id>.</mixed-citation></ref>
<ref id="ref-13"><label>[13]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Zhang</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Yu</surname> <given-names>W</given-names></string-name>, <string-name><surname>Li</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Raza</surname> <given-names>S</given-names></string-name>, <string-name><surname>Cao</surname> <given-names>H</given-names></string-name></person-group>. <article-title>Detecting ethereum Ponzi schemes based on improved LightGBM algorithm</article-title>. <source>IEEE Trans Comput Soc Syst</source>. <year>2021</year>;<volume>9</volume>(<issue>2</issue>):<fpage>624</fpage>&#x2013;<lpage>37</lpage>. doi:<pub-id pub-id-type="doi">10.1109/tcss.2021.3088145</pub-id>.</mixed-citation></ref>
<ref id="ref-14"><label>[14]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Trozze</surname> <given-names>A</given-names></string-name>, <string-name><surname>Kleinberg</surname> <given-names>B</given-names></string-name>, <string-name><surname>Davies</surname> <given-names>T</given-names></string-name></person-group>. <article-title>Detecting DeFi securities violations from token smart contract code</article-title>. <source>Financ Innovat</source>. <year>2024</year>;<volume>10</volume>(<issue>1</issue>):<fpage>1</fpage>&#x2013;<lpage>35</lpage>. doi:<pub-id pub-id-type="doi">10.1186/s40854-023-00572-5</pub-id>.</mixed-citation></ref>
<ref id="ref-15"><label>[15]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Peng</surname> <given-names>J</given-names></string-name>, <string-name><surname>Xiao</surname> <given-names>G</given-names></string-name></person-group>. <article-title>Detection of smart Ponzi schemes using opcode</article-title>. In: <conf-name>Blockchain and trustworthy systems: second international conference, BlockSys 2020</conf-name>. <publisher-loc>Cham, Switzerland</publisher-loc>: <publisher-name>Springer</publisher-name>; <year>2020</year>. p. <fpage>192</fpage>&#x2013;<lpage>204</lpage>.</mixed-citation></ref>
<ref id="ref-16"><label>[16]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Wang</surname> <given-names>M</given-names></string-name>, <string-name><surname>Huang</surname> <given-names>J</given-names></string-name></person-group>. <article-title>Detecting ethereum ponzi schemes through opcode context analysis and oversampling-based adaboost algorithm</article-title>. <source>Comput Syst Sci Eng</source>. <year>2023</year>;<volume>47</volume>(<issue>1</issue>):<fpage>1023</fpage>&#x2013;<lpage>42</lpage>. doi:<pub-id pub-id-type="doi">10.32604/csse.2023.039569</pub-id>.</mixed-citation></ref>
<ref id="ref-17"><label>[17]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Chen</surname> <given-names>W</given-names></string-name>, <string-name><surname>Zheng</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Cui</surname> <given-names>J</given-names></string-name>, <string-name><surname>Ngai</surname> <given-names>E</given-names></string-name>, <string-name><surname>Zheng</surname> <given-names>P</given-names></string-name>, <string-name><surname>Zhou</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>Detecting ponzi schemes on ethereum: towards healthier blockchain technology</article-title>. In: <conf-name>Proceedings of the 2018 world wide web conference; 2018 Apr 23&#x2013;27</conf-name>; <publisher-loc>Lyon, France</publisher-loc>. p. <fpage>1409</fpage>&#x2013;<lpage>18</lpage>.</mixed-citation></ref>
<ref id="ref-18"><label>[18]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Jung</surname> <given-names>E</given-names></string-name>, <string-name><surname>Le Tilly</surname> <given-names>M</given-names></string-name>, <string-name><surname>Gehani</surname> <given-names>A</given-names></string-name>, <string-name><surname>Ge</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>Data mining-based ethereum fraud detection</article-title>. In: <conf-name>2019 IEEE International Conference on Blockchain (Blockchain); 2019 Jul 14&#x2013;17</conf-name>; <publisher-loc>Atlanta, GA, USA</publisher-loc>. p. <fpage>266</fpage>&#x2013;<lpage>73</lpage>.</mixed-citation></ref>
<ref id="ref-19"><label>[19]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Wu</surname> <given-names>J</given-names></string-name>, <string-name><surname>Yuan</surname> <given-names>Q</given-names></string-name>, <string-name><surname>Lin</surname> <given-names>D</given-names></string-name>, <string-name><surname>You</surname> <given-names>W</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>W</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>C</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>Who are the phishers? Phishing scam detection on ethereum via network embedding</article-title>. <source>IEEE Trans Syst Man Cybern Syst</source>. <year>2020</year>;<volume>52</volume>(<issue>2</issue>):<fpage>1156</fpage>&#x2013;<lpage>66</lpage>. doi:<pub-id pub-id-type="doi">10.1109/tsmc.2020.3016821</pub-id>.</mixed-citation></ref>
<ref id="ref-20"><label>[20]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Hu</surname> <given-names>T</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>X</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>T</given-names></string-name>, <string-name><surname>Zhang</surname> <given-names>X</given-names></string-name>, <string-name><surname>Huang</surname> <given-names>X</given-names></string-name>, <string-name><surname>Niu</surname> <given-names>W</given-names></string-name>, <etal>et al.</etal></person-group> <article-title>Transaction-based classification and detection approach for Ethereum smart contract</article-title>. <source>Inform Process Manag</source>. <year>2021</year>;<volume>58</volume>(<issue>2</issue>):<fpage>102462</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.ipm.2020.102462</pub-id>.</mixed-citation></ref>
<ref id="ref-21"><label>[21]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Jin</surname> <given-names>C</given-names></string-name>, <string-name><surname>Jin</surname> <given-names>J</given-names></string-name>, <string-name><surname>Zhou</surname> <given-names>J</given-names></string-name>, <string-name><surname>Wu</surname> <given-names>J</given-names></string-name>, <string-name><surname>Xuan</surname> <given-names>Q</given-names></string-name></person-group>. <article-title>Heterogeneous feature augmentation for ponzi detection in ethereum</article-title>. <source>IEEE Transact Circuits Syst II Express Briefs</source>. <year>2022</year>;<volume>69</volume>(<issue>9</issue>):<fpage>3919</fpage>&#x2013;<lpage>23</lpage>. doi:<pub-id pub-id-type="doi">10.1109/tcsii.2022.3177898</pub-id>.</mixed-citation></ref>
<ref id="ref-22"><label>[22]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>He</surname> <given-names>X</given-names></string-name>, <string-name><surname>Yang</surname> <given-names>T</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>L</given-names></string-name></person-group>. <article-title>CTRF: ethereum-based ponzi contract identification</article-title>. <source>Secur Commun Netw</source>. <year>2022</year>;<volume>2022</volume>(<issue>1</issue>):<fpage>1554752</fpage>. doi:<pub-id pub-id-type="doi">10.1155/2022/1554752</pub-id>.</mixed-citation></ref>
<ref id="ref-23"><label>[23]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>He</surname> <given-names>H</given-names></string-name>, <string-name><surname>Bai</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Garcia</surname> <given-names>EA</given-names></string-name>, <string-name><surname>Li</surname> <given-names>S</given-names></string-name></person-group>. <article-title>ADASYN: adaptive synthetic sampling approach for imbalanced learning</article-title>. In: <conf-name>2008 IEEE International Joint Conference on Neural Networks (IEEE World Congress on Computational Intelligence); 2008 Jun 1&#x2013;8</conf-name>; <publisher-loc>Hong Kong, China</publisher-loc>; <year>2008</year>. p. <fpage>1322</fpage>&#x2013;<lpage>8</lpage>.</mixed-citation></ref>
<ref id="ref-24"><label>[24]</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><surname>Anuyah</surname> <given-names>S</given-names></string-name>, <string-name><surname>Bolade</surname> <given-names>V</given-names></string-name>, <string-name><surname>Agbaakin</surname> <given-names>O</given-names></string-name></person-group>. <article-title>Understanding graph databases: a comprehensive tutorial and survey</article-title>. <comment>arXiv:2411.09999. 2024</comment>.</mixed-citation></ref>
<ref id="ref-25"><label>[25]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Shabani</surname> <given-names>N</given-names></string-name>, <string-name><surname>Wu</surname> <given-names>J</given-names></string-name>, <string-name><surname>Beheshti</surname> <given-names>A</given-names></string-name>, <string-name><surname>Sheng</surname> <given-names>QZ</given-names></string-name>, <string-name><surname>Foo</surname> <given-names>J</given-names></string-name>, <string-name><surname>Haghighi</surname> <given-names>V</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>A comprehensive survey on graph summarization with graph neural networks</article-title>. <source>IEEE Transact Artif Intell</source>. <year>2024</year>;<volume>5</volume>(<issue>8</issue>):<fpage>3780</fpage>&#x2013;<lpage>800</lpage>. doi:<pub-id pub-id-type="doi">10.1109/tai.2024.3350545</pub-id>.</mixed-citation></ref>
<ref id="ref-26"><label>[26]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Ge</surname> <given-names>X</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>YC</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>B</given-names></string-name>, <string-name><surname>Kuo</surname> <given-names>CCJ</given-names></string-name></person-group>. <article-title>Knowledge graph embedding: an overview</article-title>. <source>APSIPA Trans Signal Inf Process</source>. <year>2024</year>;<volume>13</volume>(<issue>1</issue>):<fpage>e1</fpage>. doi:<pub-id pub-id-type="doi">10.1561/116.00000065</pub-id>.</mixed-citation></ref>
<ref id="ref-27"><label>[27]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Johnson</surname> <given-names>SJ</given-names></string-name>, <string-name><surname>Murty</surname> <given-names>MR</given-names></string-name>, <string-name><surname>Navakanth</surname> <given-names>I</given-names></string-name></person-group>. <article-title>A detailed review on word embedding techniques with emphasis on word2vec</article-title>. <source>Multimed Tools Appl</source>. <year>2024</year>;<volume>83</volume>(<issue>13</issue>):<fpage>37979</fpage>&#x2013;<lpage>8007</lpage>. doi:<pub-id pub-id-type="doi">10.1007/s11042-023-17007-z</pub-id>.</mixed-citation></ref>
<ref id="ref-28"><label>[28]</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><surname>Ying</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Bourgeois</surname> <given-names>D</given-names></string-name>, <string-name><surname>You</surname> <given-names>J</given-names></string-name>, <string-name><surname>Zitnik</surname> <given-names>M</given-names></string-name>, <string-name><surname>Leskovec</surname> <given-names>J</given-names></string-name></person-group>. <chapter-title>Gnnexplainer: generating explanations for graph neural networks</chapter-title>. In: <source>Advances in neural information processing systems</source>. <publisher-loc>Red Hook, NY, USA</publisher-loc>: <publisher-name>Curran Associates Inc.</publisher-name>; <year>2019</year>. <fpage>829</fpage> p.</mixed-citation></ref>
<ref id="ref-29"><label>[29]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Chen</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Dai</surname> <given-names>H</given-names></string-name>, <string-name><surname>Yu</surname> <given-names>X</given-names></string-name>, <string-name><surname>Hu</surname> <given-names>W</given-names></string-name>, <string-name><surname>Xie</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Tan</surname> <given-names>C</given-names></string-name></person-group>. <article-title>Improving Ponzi scheme contract detection using multi-channel TextCNN and transformer</article-title>. <source>Sensors</source>. <year>2021</year>;<volume>21</volume>(<issue>19</issue>):<fpage>6417</fpage>. doi:<pub-id pub-id-type="doi">10.3390/s21196417</pub-id>; <pub-id pub-id-type="pmid">34640737</pub-id></mixed-citation></ref>
</ref-list>
</back></article>