[论文解读] HyMo: Vulnerability Detection in Smart Contracts using a Novel Multi-Modal Hybrid Model
该论文提出 HyMo,一种用于检测智能合约漏洞(尤其是算术缺陷)的新型多模态混合深度学习模型。该模型将清洗后的源代码和编译后的字节码作为双输入,结合 FastText 词嵌入与双向门控循环单元(BiGRU)进行序列建模,在结合 ScrawlD 与 SmartBugs Dataset-Wild 的真实世界数据集上实现了 79.71% 的准确率,优于当前最先进方法。
With blockchain technology rapidly progress, the smart contracts have become a common tool in a number of industries including finance, healthcare, insurance and gaming. The number of smart contracts has multiplied, and at the same time, the security of smart contracts has drawn considerable attention due to the monetary losses brought on by smart contract vulnerabilities. Existing analysis techniques are capable of identifying a large number of smart contract security flaws, but they rely too much on rigid criteria established by specialists, where the detection process takes much longer as the complexity of the smart contract rises. In this paper, we propose HyMo as a multi-modal hybrid deep learning model, which intelligently considers various input representations to consider multimodality and FastText word embedding technique, which represents each word as an n-gram of characters with BiGRU deep learning technique, as a sequence processing model that consists of two GRUs to achieve higher accuracy in smart contract vulnerability detection. The model gathers features using various deep learning models to identify the smart contract vulnerabilities. Through a series of studies on the currently publicly accessible dataset such as ScrawlD, we show that our hybrid HyMo model has excellent smart contract vulnerability detection performance. Therefore, HyMo performs better detection of smart contract vulnerabilities against other approaches.
研究动机与目标
- 为应对智能合约漏洞(尤其是算术缺陷)日益增长的挑战,此类漏洞已导致数百万美元的财务损失。
- 克服传统符号执行与静态分析工具的局限性,这些工具依赖于僵化的、专家定义的规则,且在复杂性增加时扩展性差。
- 通过将清洗后的源代码与编译后的 EVM 字节码等多种输入表示整合到统一的深度学习框架中,提升检测准确率。
- 证明使用多模态输入、先进词嵌入(FastText)与序列建模(BiGRU)的混合模型可显著提升漏洞检测性能。
- 开发一种可扩展、高准确率且可扩展的模型,适用于除算术缺陷外的多种类型智能合约漏洞。
提出的方法
- HyMo 采用多模态混合架构,处理两种不同输入表示:清洗后的高级源代码与编译后的 EVM 字节码(操作码)。
- 使用 FastText 词嵌入将每个标记表示为字符级 n-gram,捕捉形态模式,提升对罕见或格式错误标识符的泛化能力。
- 模型采用双向门控循环单元(BiGRU)网络,包含两个 GRU:一个正向处理输入,一个反向处理,以捕捉序列代码结构中的长距离依赖。
- 评估了多种混合配置,结合不同输入类型、嵌入技术与深度学习模型,最佳配置为 FBFB (M2_M4),采用清洗代码与字节码、FastText 与 BiGRU。
- 模型在来自 ScrawlD 与 SmartBugs Dataset-Wild 的真实世界智能合约合并数据集上进行训练与评估,确保实际相关性。
- 性能通过标准指标衡量:准确率、精确率、召回率与 F1 分数,并通过消融研究隔离各组件的贡献。

实验结果
研究问题
- RQ1与单输入模型相比,结合源代码与编译后字节码表示的多模态深度学习模型是否能提升智能合约漏洞检测的准确率?
- RQ2使用建模子词模式的 FastText 词嵌入是否能增强模型在具有非标准或混淆标识符的智能合约中检测漏洞的能力?
- RQ3集成能够双向捕捉序列依赖关系的 BiGRU 网络,对检测逻辑类漏洞(如算术溢出)有何影响?
- RQ4在混合模型中,输入表示、嵌入技术与深度学习组件的最佳配置是什么?
- RQ5所提出的模型是否能泛化于多种漏洞类型,特别是算术漏洞,并可扩展用于检测其他类别的缺陷?
主要发现
- HyMo 的 FBFB (M2_M4) 配置在结合 ScrawlD 与 SmartBugs Dataset-Wild 数据集上实现了最高准确率 79.71%,召回率为 76.61%,精确率为 81.82%,F1 分数为 79.05%。
- 该模型优于当前最先进基线方法,包括 CBGRU(第二名)、Mythril 与 Osiris,展现出更高的检测准确率。
- 同时使用清洗后的源代码与编译后的字节码作为输入,显著优于仅依赖单一表示的模型。
- 消融研究证实,FastText 嵌入与 BiGRU 架构的组合对模型的鲁棒性与准确率有显著贡献。
- 模型具备本地化且高效的漏洞检测能力,表明其在实际应用中优于传统符号执行与污点分析方法。
- 结果表明,使用字符级嵌入与双向序列建模的多模态表征学习,是实现可扩展且高准确率智能合约漏洞检测的有前景方向。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。