计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (12): 311-318.DOI: 10.3778/j.issn.1002-8331.2405-0014

• 网络、通信与安全 • 上一篇    下一篇

基于少样本学习的区块链地址身份推断方法研究

陈彦宇,黎凯,付章杰   

  1. 1.南京信息工程大学 数字取证教育部工程研究中心,南京 210044
    2.西安电子科技大学 综合业务网理论及关键技术国家重点实验室,西安 710071
  • 出版日期:2025-06-15 发布日期:2025-06-13

Research on Blockchain Address Identity Inference Method Based on Few-Shot Learning

CHEN Yanyu, LI Kai, FU Zhangjie   

  1. 1.Engineering Research Center of Digital Forensics, Ministry of Education, Nanjing University of Information Science and Technology, Nanjing 210044, China
    2.The State Key Laboratory of Integrated Services Networks, Xidian University,Xi’an 710071, China
  • Online:2025-06-15 Published:2025-06-13

摘要: 由于区块链的匿名性,钓鱼诈骗、黑客攻击等安全威胁层出不穷,造成了巨大经济损失。区块链身份推断可有效分析匿名地址的交易行为特征,推断地址的身份类型,以加强区块链监管治理。现有的身份推断模型大多依赖大量标记样本进行训练,但是现实中往往难以获取足量的标签地址,对于少量标签的身份类型的检测能力不足。因此,首次提出在少样本环境下的进行区块链地址身份推断,提出了基于少样本学习的区块链地址身份推断方案。为了实现对交易图的深入特征提取,设计了改进的三元组损失函数,该函数在嵌入空间中有效聚集同类样本,同时分离异类样本,显著提升了特征嵌入表示在不同身份类型间的区分度。创新性地提出了一种基于距离加权的原型网络,能够根据样本与均值中心的距离动态调整注意力权重,有效减少异常值和噪声值的干扰,增强类原型计算的准确性。使用度量学习模块将每个样本与各类原型进行距离度量来得到最终的预测结果。这些改进不仅提升了模型在少样本条件下的性能,还增强了模型对未知身份类型推断的泛化能力。实验结果表明,该模型在真实以太坊的交易数据集上测试取得了优异性能,证明了方法的有效性。

关键词: 区块链, 以太坊, 少样本学习, 身份推断

Abstract: Blockchain has attracted wide attention from various fields due to its decentralized and tamper-proof features. However, the anonymity of blockchain has also become a hotbed for attackers to engage in illegal activities, causing huge economic losses every year. Blockchain identity inference can effectively analyze the transaction behavior characteristics of anonymous addresses and infer the identity types of addresses, such as hackers, phishing scams, and so on. Most existing identity inference models rely on a large number of labeled samples for training. However, it is often difficult to obtain sufficient labeled addresses in reality, resulting in insufficient detection ability for identity types with few labels. Therefore, this paper first proposes blockchain address identity inference in a few-shot learning environment. A few-shot learning-based blockchain address identity inference framework is presented. Firstly, to achieve deep feature extraction from the transaction graph, this paper designs an improved triplet loss function that effectively clusters similar samples while separating dissimilar ones in the embedding space, significantly enhancing the discrimination of feature embeddings across different identity types. Secondly, this paper innovatively proposes a distance-weighted prototype network, which dynamically adjusts the attention weights based on the distance between samples and their mean centers, effectively reducing the impact of outliers and noise, and improving the accuracy of prototype calculation. Finally, the metric learning module measures the distance between each sample and various prototypes to obtain the final prediction. These improvements not only enhance performance of the model under few-shot conditions but also improve its generalization capability for inferring unknown identity types. Experimental results show that the model achieves excellent performance on a real Ethereum transaction dataset, demonstrating the effectiveness of the proposed method.

Key words: blockchain, Ethereum, few-shot learning, identity inference