ORACAL:一种用于智能合约漏洞检测的鲁棒且可解释的多模态框架,具有因果图增强 ORACAL: A Robust and Explainable Multimodal Framework for Smart Contract Vulnerability Detection with Causal Graph Enrichment 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-03-30
👁️ 预览文献
💡 AI 中文简介
针对智能合约漏洞检测中图神经网络难以捕捉控制流与数据依赖交互、易受对抗攻击且缺乏可解释性的问题,本文提出ORACAL框架,融合控制流图、数据流图和调用图,利用检索增强生成与大语言模型注入专家安全知识,并通过因果注意力机制剔除虚假关联。实验表明,该框架在主基准上宏F1达91.28%,比现有方法最高提升39.6个百分点,对抗攻击下F1仅下降约2.35%,且能生成可解释的漏洞触发路径。
领域区块链安全与智能合约分析
适合谁读需要一定专业背景(区块链安全、图神经网络、程序分析)
核心贡献1. 提出融合CFG、DFG、CG的异质多模态图学习框架,并利用RAG和LLM选择性增强关键子图,提升语义理解;2. 引入因果注意力机制和PGExplainer,实现鲁棒且可解释的漏洞检测,能定位漏洞触发路径。
关键数据主基准宏F1达91.28%,比MANDO-HGT、MTVHunter、GNN-SC、SCVHunter最高提升39.6个百分点;分布外数据集上CGT Weakness达91.8%,DAppScan达77.1%;PGExplainer解释与人工标注路径的平均交并比为32.51%;对抗攻击下F1仅下降约2.35%,攻击成功率仅3%,远低于对比方法的10.91%-18.73%。
推荐理由如果你关心智能合约安全,又希望模型既准又稳还能讲清楚为什么,这篇工作用因果图和RAG给出了漂亮的答案,性能提升显著,值得一读。
关键词["智能合约", "漏洞检测", "多模态图学习", "因果推理", "可解释性", "对抗鲁棒性"]

原文摘要

查看英文原文摘要

Although Graph Neural Networks (GNNs) have shown promise for smart contract vulnerability detection, they still face significant limitations. Homogeneous graph models fail to capture the interplay between control flow and data dependencies, while heterogeneous graph approaches often lack deep semantic understanding, leaving them susceptible to adversarial attacks. Moreover, most black-box models fail to provide explainable evidence, hindering trust in professional audits. To address these challenges, we propose ORACAL (Observable RAG-enhanced Analysis with CausAL reasoning), a heterogeneous multimodal graph learning framework that integrates Control Flow Graph (CFG), Data Flow Graph (DFG), and Call Graph (CG). ORACAL selectively enriches critical subgraphs with expert-level security context from Retrieval-Augmented Generation (RAG) and Large Language Models (LLMs), and employs a causal attention mechanism to disentangle true vulnerability indicators from spurious correlations. For transparency, the framework adopts PGExplainer to generate subgraph-level explanations identifying vulnerability triggering paths. Experiments on large-scale datasets demonstrate that ORACAL achieves state-of-the-art performance, outperforming MANDO-HGT, MTVHunter, GNN-SC, and SCVHunter by up to 39.6 percentage points, with a peak Macro F1 of 91.28% on the primary benchmark. ORACAL maintains strong generalization on out-of-distribution datasets with 91.8% on CGT Weakness and 77.1% on DAppScan. In explainability evaluation, PGExplainer achieves 32.51% Mean Intersection over Union (MIoU) against manually annotated vulnerability triggering paths. Under adversarial attacks, ORACAL limits performance degradation to approximately 2.35% F1 decrease with an Attack Success Rate (ASR) of only 3%, surpassing SCVHunter and MANDO-HGT which exhibit ASRs ranging from 10.91% to 18.73%.