Abstract
Detecting malicious activity on the Ethereum blockchain is hindered by the massive scale of transaction data and the ability of attackers to manipulate obvious behavioral features. This paper presents TGC4Eth, a compression framework that reduces the Ethereum transaction graph to approximately 1% of its original size while enhancing detection robustness. By combining a "low-importance" feature selection strategy to thwart evasion and a two-stage topological coarsening process (Focusing and Coarsening), the method enables Graph Neural Networks (GNNs) to efficiently identify scams and hacks. Results show that GNNs on the compressed graph maintain high accuracy and demonstrate superior resistance to adversarial attacks compared to traditional machine learning models.
Introduction
The Ethereum ecosystem, characterized by tens of millions of accounts and hundreds of millions of transactions, presents a significant challenge for malicious account detection. Standard graph mining techniques are often computationally prohibitive at this scale, necessitating aggressive sampling that can destroy critical structural information. Furthermore, malicious actors frequently employ evasion tactics by adjusting behaviors associated with "high-importance" features, such as transaction volume, to bypass detection systems. There is a critical need for a "lightweight" transaction graph that preserves the structural fingerprints of malicious activity while remaining resilient to manipulation.
The TGC4Eth Framework
The proposed TGC4Eth framework achieves graph reduction through two primary mechanisms: feature-level and topology-level compression.
Feature-Level Compression
Counter-intuitively, TGC4Eth selects features based on low importance as quantified by LightGBM gain. The rationale is that high-importance features are the primary targets for attacker manipulation. By training on a subset of 9 stable, less-obvious features—such as average income per minute and account lifecycle duration—the model becomes significantly more robust against evasion.
Topology-Level Compression
The topological reduction occurs in two stages:
- Graph Focusing: The algorithm identifies "Target Accounts" (labeled nodes) and "Bridge Accounts" (nodes connecting targets). Nodes that do not contribute to the connectivity between targets are discarded.
- Graph Coarsening: To further shrink the graph, "Subordinate Accounts" (neighbors of targets that are not bridges) are mathematically aggregated into the target nodes. Their features are fused into the target's representation, preserving their influence without requiring individual nodes.
Experimental Setup and Datasets
The study utilized real-world Ethereum data from January 2018 to January 2020, with labels sourced from Etherscan and CryptoscamDB. The initial dataset comprised over 53 million accounts and 493 million transactions. After applying TGC4Eth, the final compressed graph ($G_C$) was reduced to approximately 817,000 nodes—a 99% reduction in the total account count.
Results and Key Insights
The experiments yielded several critical findings:
- Efficiency and Connectivity: Despite the 99% reduction in nodes, the coarsening method maintained a connectivity score of ~0.98. This ensures that GNNs can still effectively perform message passing across the graph.
- Performance Stability: GNN models, including GCN, GraphSAGE, and SGC, maintained or slightly improved their Accuracy and AUC on the compressed graph compared to larger, uncompressed versions.
- Adversarial Robustness: In simulated evasion attacks, traditional models like LightGBM experienced accuracy drops of up to 12%. In contrast, GNNs utilizing TGC4Eth features only saw performance declines of 1-2%.
Conclusion
TGC4Eth demonstrates that for GNN-based detection, maintaining the paths between target nodes is more vital than preserving every peripheral node. By intentionally ignoring easily manipulated features and focusing on structural connectivity, the framework provides a scalable and robust solution for securing the Ethereum network. Future work will focus on optimizing the compression process for real-time data streams and exploring adversarial training to further refine feature selection.
Summary updated