arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.04039cs.CRcs.AI
收藏

BlockScan:检测区块链交易中的异常

BlockScan: Detecting Anomalies in Blockchain Transactions

UC Santa Barbara(加州大学圣芭芭拉分校);Meta AI;New York University(纽约大学);sec3;Northwestern University(西北大学)

Jiahao Yu, Xian Wu, Hao Liu, Wenbo Guo, Xinyu Xing

AI总结:

本文提出定制化 Transformer 系统 BlockScan,通过多模态 tokenizer、掩码预训练与新型检测头识别区块链异常交易,并在 Ethereum、Solana 上取得低误报率和高召回表现。

摘要:

我们提出 BlockScan,这是一种用于区块链交易异常检测的定制化 Transformer。不同于依赖基于规则的系统或直接应用现成大型语言模型(LLM)的现有方法,BlockScan 引入了一系列定制设计,以有效建模区块链交易独特的数据结构。首先,区块链交易是多模态的,包含区块链特有的 token、文本和数字。我们设计了一种新颖的模块化 tokenizer 来处理这些多模态输入,平衡不同模态之间的信息。其次,我们设计了一种定制化掩码语言建模机制,用于预训练 Transformer 架构,并结合 RoPE embedding 和 FlashAttention 来处理更长的序列。最后,我们基于模型输出设计了一种新颖的异常检测方法。我们进一步对系统的检测方法进行了理论分析。在 Ethereum 和 Solana 交易上的大量评估表明,BlockScan 在保持较低误报率的同时,具备出色的异常检测能力。值得注意的是,BlockScan 是唯一能够以高准确率成功检测 Solana 上异常交易的方法,而所有其他方法的检测召回率都非常低,甚至为零。本工作为在区块链数据分析中应用基于 Transformer 的方法设立了新的基准。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑