[论文解读] Blockchain Large Language Models
BlockGPT 训练一个大型语言模型,通过从交易执行轨迹中学习,在不使用预定义规则的情况下实时检测异常的 Ethereum 交易,未设定规则,达到高吞吐量并在最异常交易中识别出多起攻击。
This paper presents a dynamic, real-time approach to detecting anomalous blockchain transactions. The proposed tool, BlockGPT, generates tracing representations of blockchain activity and trains from scratch a large language model to act as a real-time Intrusion Detection System. Unlike traditional methods, BlockGPT is designed to offer an unrestricted search space and does not rely on predefined rules or patterns, enabling it to detect a broader range of anomalies. We demonstrate the effectiveness of BlockGPT through its use as an anomaly detection tool for Ethereum transactions. In our experiments, it effectively identifies abnormal transactions among a dataset of 68M transactions and has a batched throughput of 2284 transactions per second on average. Our results show that, BlockGPT identifies abnormal transactions by ranking 49 out of 124 attacks among the top-3 most abnormal transactions interacting with their victim contracts. This work makes contributions to the field of blockchain transaction analysis by introducing a custom data encoding compatible with the transformer architecture, a domain-specific tokenization technique, and a tree encoding method specifically crafted for the Ethereum Virtual Machine (EVM) trace representation.
研究动机与目标
- 动机:在区块链/DeFi 交易中需要动态、可扩展的异常检测。
- 提出一种自监督学习方法,用于在没有预设漏洞模式的情况下建模交易执行轨迹。
- 开发与 transformer 架构兼容的领域特定编码与分词管道。
- 展示 BlockGPT 作为在大型 Ethereum 数据集上进行异常排序的工具,并评估其实时性能。
提出的方法
- 构建一个新的中间轨迹表示(ITR),将调用、状态和日志轨迹组合成一棵树。
- 将 ITR 节点标记为领域特定的标记,形成固定词汇表。
- 将局部标记嵌入计算为 token、树位置和上下文嵌入之和。
- 应用带有树感知位置编码的 transformer 编码器来学习轨迹嵌入。
- 使用因果语言模型损失以无监督/自监督方式训练 BlockGPT。
- 按轨迹的对数似然对交易进行排序,并对最异常的交易发出警报。
实验结果
研究问题
- RQ1在 Ethereum 交易轨迹上,使用无监督/自监督学习是否能够在没有预定义漏洞模式的情况下检测到异常或恶意行为?
- RQ2在 ITR 表示上训练的 transformer-based 模型在实时排序异常交易方面的效果如何?
- RQ3BlockGPT 在高容量 DeFi 场景中能达到怎样的吞吐量与误报特征?
主要发现
- BlockGPT 的平均吞吐量为 2,284 ± 289 笔交易/秒。
- BlockGPT 在 124 起攻击中排名前 3 的最异常交易中位列第 49。
- BlockGPT 将 20 笔交易识别为最异常,20 笔为第二异常,7 笔为第三异常。
- 在高容量 DeFi 设置下,BlockGPT 在 0.01% 警报阈值下维持较低的绝对误报率(0.097%),在 0.1% FPR、每日 100 笔交易的情况下大约每 10 天发出一次警报。
- BlockGPT 展示了实时异常检测能力,平均对单笔交易进行排序需要 0.16 ± 0.3 秒。
- 该工作介绍了自定义数据编码、领域特定分词,以及针对 EVM 跟踪的树编码方法,实现了鲁棒的无监督异常检测。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。