信息网络安全 ›› 2026, Vol. 26 ›› Issue (4): 579-590.doi: 10.3969/j.issn.1671-1122.2026.04.006

• 学术研究 • 上一篇    下一篇

基于时序图注意力网络的区块链异常交易检测方法

李锦凯1, 王靖雯1, 董立波2, 姚文翰3, 刘成杰1, 文伟平1()   

  1. 1 北京大学软件与微电子学院北京 100871
    2 北京市公安局海淀分局北京 100089
    3 湘潭大学计算机学院湘潭 411100
  • 收稿日期:2025-12-28 出版日期:2026-04-10 发布日期:2026-04-29
  • 通讯作者: 文伟平 E-mail:weipingwen@pku.edu.cn
  • 作者简介:李锦凯(2001—),男,陕西,硕士研究生,主要研究方向为区块链安全、人工智能安全|王靖雯(2002—),女,山东,硕士研究生,主要研究方向为网络安全、人工智能安全、系统安全|董立波(1981—),男,北京,硕士,主要研究方向为人工智能应用、大数据分析|姚文翰(1997—),男,江西,博士研究生,主要研究方向为人工智能安全、语音生成|刘成杰(1998—),男,湖南,博士研究生,主要研究方向为漏洞利用、恶意软件分析|文伟平(1976—),男,湖南,教授,博士,主要研究方向为系统与软件安全、云安全、人工智能安全
  • 基金资助:
    国家重点研发计划(2020YFB1005802)

A Blockchain Anomaly Transaction Detection Method Based on Temporal Graph Attention Network

LI Jinkai1, WANG Jingwen1, DONG Libo2, YAO Wenhan3, LIU Chengjie1, WEN Weiping1()   

  1. 1 School of Software & Microelectronics, Peking University, Beijing 100871, China
    2 Haidian Branch of the Beijing Municipal Public Security Bureau, Beijing 100089, China
    3 School of Computer Science, Xiangtan University, Xiangtan 411100, China
  • Received:2025-12-28 Online:2026-04-10 Published:2026-04-29

摘要:

随着区块链技术的快速发展,链上异常交易检测成为数字资产安全的重大挑战之一。然而,现有方法由于难以有效捕捉交易网络的复杂拓扑依赖与动态时间演化信息,对异常行为的识别能力有限。文章提出一种基于时序图注意力网络(TGAT)的区块链异常交易检测方法。该方法构建了行为范式驱动的“时序-结构”耦合建模框架,利用正余弦时间编码同步量化交易时序与交互拓扑,可精准识别动态异常模式,还设计了多粒度注意力优化机制,并行学习资金汇聚与链式分散等多元行为模式,显著提升了复杂环境下的特征提取精度。实验结果表明,模型在精确率、召回率与F1分数等核心指标上显著优于基准方法,F1分数指标较基准方法提升10%以上。消融实验证明了时序编码和多头注意力机制对性能提升的关键贡献,以及在保证性能的情况下3层网络模型在时间开销上的优势。该工作为多个金融合规场景提供了智能化的技术路径,具有重要的借鉴意义。

关键词: 区块链, 金融安全, 异常检测, 时序图神经网络

Abstract:

With the rapid evolution of blockchain technology, the detection of anomalous on-chain transactions has emerged as a critical challenge for securing digital assets. However, current methods struggle to capture the complex topology and dynamic timing of transaction networks, resulting in limited detection accuracy. This paper proposed a blockchain anomaly transaction detection method based on the temporal graph attention network(TGAT). The approach introduced a behavioral paradigm-driven “temporal-structural” coupled modeling framework that utilized sine-cosine temporal encoding to synchronously quantify transaction timing and interaction topology, thereby enabling the precise identification of dynamic anomaly patterns. Furthermore, a multi-granularity attention optimization mechanism was designed to learn diverse behavioral patterns—such as fund convergence and chain-like dispersion—in parallel, significantly enhancing feature extraction precision in complex environments. Experimental results demonstrate that the proposed model substantially outperforms baseline methods in core metrics including precision, recall, and F1-score, with the F1-score improving by over 10%. Ablation studies verify the critical contributions of temporal encoding and multi-head attention mechanisms to performance enhancement, while highlighting the computational efficiency of the three-layer network architecture. This work provides an intelligent technical pathway for financial compliance scenarios, such as anti-money laundering and fraud detection, and possesses significant practical implications for the industry.

Key words: blockchain, financial security, anomaly detection, temporal graph neural network

中图分类号: