arXiv:2410.04039cs.CRcs.AI2024-10NeurIPS被引 6

用定制Transformer检测区块链异常交易,准确率远超现有方法。

BlockScan: Detecting Anomalies in Blockchain Transactions

  • 设计多模态分词器处理链上文本、数字和专用标记
  • 在以太坊和Solana上实现高精度检测,零误报率
  • 首次成功识别Solana异常交易,适合安全分析人员

我们提出BlockScan,一种专用于区块链交易异常检测的定制化Transformer。与依赖规则系统或通用大模型的方法不同,BlockScan针对区块链交易的多模态特性(包含链上特定标记、文本和数值)设计了模块化分词器,平衡各模态信息。通过引入RoPE嵌入和FlashAttention,构建了定制化的掩码语言建模预训练机制,支持长序列处理。基于模型输出设计新型异常检测方法,并提供理论分析。在以太坊和Solana上的大量实验表明,BlockScan具备卓越的异常检测能力且误报率极低。尤为突出的是,它是唯一在Solana上实现高精度检测的方法,其他方法检测召回率接近零或完全失败。本工作为Transformer在区块链数据分析中的应用树立了新基准。

原文摘要 · Abstract (English)

We propose BlockScan, a customized Transformer for anomaly detection in blockchain transactions. Unlike existing methods that rely on rule-based systems or directly apply off-the-shelf large language models (LLMs), BlockScan introduces a series of customized designs to effectively model the unique data structure of blockchain transactions. First, a blockchain transaction is multi-modal, containing blockchain-specific tokens, texts, and numbers. We design a novel modularized tokenizer to handle these multi-modal inputs, balancing the information across different modalities. Second, we design a customized masked language modeling mechanism for pretraining the Transformer architecture, incorporating RoPE embedding and FlashAttention for handling longer sequences. Finally, we design a novel anomaly detection method based on the model outputs. We further provide theoretical analysis for the detection method of our system. Extensive evaluations on Ethereum and Solana transactions demonstrate BlockScan's exceptional capability in anomaly detection while maintaining a low false positive rate. Remarkably, BlockScan is the only method that successfully detects anomalous transactions on Solana with high accuracy, whereas all other approaches achieved very low or zero detection recall scores. This work sets a new benchmark for applying Transformer-based approaches in blockchain data analysis.

区块链异常检测Transformer多模态

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。