期刊文献+

基于层级注意力机制与双向长短期记忆神经网络的智能合约自动分类模型 被引量:7

Automatic smart contract classification model based on hierarchical attention mechanism and bidirectional long short-term memory neural network
下载PDF
导出
摘要 针对区块链平台上智能合约应用种类繁多,人工筛选合适的智能合约应用服务日益困难的问题,提出一种基于层级注意力机制与双向长短期记忆(Bi-LSTM)神经网络的智能合约自动分类模型——HANN-SCA。首先,利用Bi-LSTM网络从智能合约源代码和账户信息两个角度同时建模,最大限度地提取智能合约的特征信息。其中源代码角度关注智能合约中的代码语义特征,账户信息角度关注智能合约的账户特征。然后,在特征学习过程中从词层面和句层面分别引入注意力机制,重点捕获对智能合约分类有重要意义的单词和句子。最后,拼接代码特征与账户特征以生成智能合约文档级特征表示,通过Softmax层完成分类任务。实验结果表明,所提模型在Dataset-E、Dataset-N和Dataset-EO数据集上的分类正确率分别达到了93.1%、91.7%和92.1%,效果明显优于传统的支持向量机模型(SVM)和其他神经网络基准模型,且具有更好的稳定性与更高的收敛速度。 For that the variety of smart contract applications on the blockchain platform exists more widely and manual filtering the suitable smart contract application services is more difficult,a hierarchical attention mechanism and Bidirectional Long Short-Term Memory(Bi-LSTM)neural network based model was proposed for automatic smart contract classification,namely HANN-SCA(Hierarchical Attention Neural Network with Source Code and Account).Firstly,the Bi-LSTM network was used to simultaneously model the smart contract source code and account information to extract the feature information of smart contract to the greatest extent.The source code perspective focused on the semantic features of code,and the account information perspective focused on the features of the account.Then,in the process of feature learning,the attention mechanism was introduced into the word level and the sentence level respectively to focus on the words and sentences that were important to the classification of smart contract.Finally,the code features and the account features were spliced to generate the document-level feature representation of the smart contract,and the classification task was completed through the Softmax layer.Experimental results on datasets of Dataset-E,Dataset-N and Dataset-EO show that the classification precisions of HANN-SCA model reach 93.1%,91.7%and 92.1%respectively,which are better than those of the traditional Support Vector Machine(SVM)model and other neural network benchmark models,and the proposed model also has better stability and higher convergence speed.
作者 吴雨芯 蔡婷 张大斌 WU Yuxin;CAI Ting;ZHANG Dabin(School of Big Data and Computer Science,Guangdong Baiyun University,Guangzhou Guangdong 510450,China;School of Data and Computer Science,Sun Yat-sen University,Guangzhou Guangdong 510006,China;School of Big Data and Software Engineering,College of Mobile Telecommunications,Chongqing University of Posts and Telecommunications,Chongqing 401520,China)
出处 《计算机应用》 CSCD 北大核心 2020年第4期978-984,共7页 journal of Computer Applications
基金 重庆市教育委员会科学技术研究项目(KJZD-K201802401) 广东白云学院2018年度科研项目(2018BYKYK05)。
关键词 智能合约分类 层级注意力机制 双向长短期记忆网络 代码语义特征 账户特征 smart contract classification hierarchical attention mechanism Bidirectional Long Short-Term Memory(Bi-LSTM)network code semantic feature account feature
  • 相关文献

参考文献1

共引文献12

同被引文献86

引证文献7

二级引证文献16

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部