Smart contracts hold digital coins worth billions of dollars, their security issues have drawn extensive attention in the past years. Towards smart contract vulnerability detection, conventional methods heavily rely on fixed expert rules, leading to low accuracy and poor scalability. Recent deep learning approaches alleviate this issue but fail to encode useful expert knowledge. In this paper, we explore combining deep learning with expert patterns in an explainable fashion. Specifically, we develop automatic tools to extract expert patterns from the source code. We then cast the code into a semantic graph to extract deep graph features. Thereafter, the global graph feature and local expert patterns are fused to cooperate and approach the final prediction, while yielding their interpretable weights. Experiments are conducted on all available smart contracts with source code in two platforms, Ethereum and VNT Chain. Empirically, our system significantly outperforms state-of-the-art methods. Our code is released.
翻译:智能合同持有价值数十亿美元的数字硬币,它们的安全问题在过去几年中引起了广泛的注意。 智能合同脆弱性探测,传统方法严重依赖固定的专家规则,导致准确性和可缩放性低。 最近的深层次学习方法缓解了这一问题,但未能将有用的专家知识编码。 在这份文件中,我们探索以可以解释的方式将深层次学习与专家模式相结合。 具体地说,我们开发了从源代码中提取专家模式的自动工具。 然后,我们将代码投入一个语义图解图解以提取深度图形特征。 之后,全球图形特征和当地专家模式被整合起来,以合作和接近最终预测,同时产生其可解释的重量。 在Etheum和VNT链这两个平台上,对所有可用源代码的智能合同都进行了实验。 简而言之,我们的系统大大超越了最先进的方法。 我们的代码被释放了。