论文标题

深度智能合同意图检测

Deep Smart Contract Intent Detection

论文作者

Huang, Youwei, Fang, Sen, Li, Jianwen, Tao, Jiachun, Hu, Bin, Zhang, Tao

论文摘要

近年来,软件安全性研究集中在确定智能合约中的漏洞,以防止区块链上的加密资产损失。尽管在这一领域取得了早期的成功,但发现开发人员在智能合约方面的意图已成为一个更加紧迫的问题,因为恶意意图造成了巨大的财务损失。不幸的是,现有研究缺乏检测智能合约中发展意图的有效方法。 为了解决这一差距,我们建议\ textsc {smartintentnn}(智能合同意图神经网络),这是一种深度学习模型,旨在自动检测智能合约中的开发意图。 \ textsc {smartIntentNn}利用预先训练的句子编码器来生成智能合约的上下文表示,采用K-Means聚类模型来识别和突出显示突出的意图特征,并利用基于双向LSTM的深神经网络进行多标签分类。 我们在包含40,000多个现实世界的智能合约的数据集上培训和评估了\ textsc {smartintentnn},在我们的实验设置中采用了自我比较基线。结果表明,\ textsc {smartintentnn}在识别10个不同类别的意图方面达到了0.8633的F1得分,表现优于所有基础线,并通过合并意图分析来解决智能合约检测中的差距。

In recent years, research in software security has concentrated on identifying vulnerabilities in smart contracts to prevent significant losses of crypto assets on blockchains. Despite early successes in this area, detecting developers' intents in smart contracts has become a more pressing issue, as malicious intents have caused substantial financial losses. Unfortunately, existing research lacks effective methods for detecting development intents in smart contracts. To address this gap, we propose \textsc{SmartIntentNN} (Smart Contract Intent Neural Network), a deep learning model designed to automatically detect development intents in smart contracts. \textsc{SmartIntentNN} leverages a pre-trained sentence encoder to generate contextual representations of smart contracts, employs a K-means clustering model to identify and highlight prominent intent features, and utilizes a bidirectional LSTM-based deep neural network for multi-label classification. We trained and evaluated \textsc{SmartIntentNN} on a dataset containing over 40,000 real-world smart contracts, employing self-comparison baselines in our experimental setup. The results show that \textsc{SmartIntentNN} achieves an F1-score of 0.8633 in identifying intents across 10 distinct categories, outperforming all baselines and addressing the gap in smart contract detection by incorporating intent analysis.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源