Ajay K. Gogineni, S. Swayamjyoti, Devadatta Sahoo, K. Sahu, R. Kishore
{"title":"使用AWD-LSTM对智能合约中的漏洞进行多类分类,预训练编码器的灵感来自自然语言处理","authors":"Ajay K. Gogineni, S. Swayamjyoti, Devadatta Sahoo, K. Sahu, R. Kishore","doi":"10.1088/2633-1357/abcd29","DOIUrl":null,"url":null,"abstract":"Vulnerability detection and safety of smart contracts are of paramount importance because of their immutable nature. Symbolic tools like OYENTE and MAIAN are typically used for vulnerability prediction in smart contracts. As these tools are computationally expensive, they are typically used to detect vulnerabilities until some predefined invocation depth. These tools require more search time as the invocation depth increases. Since the use of smart contracts increases rapidly, their analysis becomes difficult using these traditional tools. Recently, a machine learning technique called Long Short Term Memory (LSTM) has been used to predict the vulnerability of a smart contract. In the present article, we present how to classify smart contracts into Suicidal, Prodigal, Greedy, or Normal categories using Average Stochastic Gradient Descent Weight-Dropped LSTM (AWD-LSTM), a variant of LSTM. We reduced the class imbalance by considering only distinct opcode combinations for normal contracts and achieved a weighted average F1 score of 90.0%. Such techniques can be utilized in real-time to analyze a large number of smart contracts and to improve their security.","PeriodicalId":93771,"journal":{"name":"IOP SciNotes","volume":" ","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2020-03-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"15","resultStr":"{\"title\":\"Multi-Class classification of vulnerabilities in smart contracts using AWD-LSTM, with pre-trained encoder inspired from natural language processing\",\"authors\":\"Ajay K. Gogineni, S. Swayamjyoti, Devadatta Sahoo, K. Sahu, R. Kishore\",\"doi\":\"10.1088/2633-1357/abcd29\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Vulnerability detection and safety of smart contracts are of paramount importance because of their immutable nature. Symbolic tools like OYENTE and MAIAN are typically used for vulnerability prediction in smart contracts. As these tools are computationally expensive, they are typically used to detect vulnerabilities until some predefined invocation depth. These tools require more search time as the invocation depth increases. Since the use of smart contracts increases rapidly, their analysis becomes difficult using these traditional tools. Recently, a machine learning technique called Long Short Term Memory (LSTM) has been used to predict the vulnerability of a smart contract. In the present article, we present how to classify smart contracts into Suicidal, Prodigal, Greedy, or Normal categories using Average Stochastic Gradient Descent Weight-Dropped LSTM (AWD-LSTM), a variant of LSTM. We reduced the class imbalance by considering only distinct opcode combinations for normal contracts and achieved a weighted average F1 score of 90.0%. Such techniques can be utilized in real-time to analyze a large number of smart contracts and to improve their security.\",\"PeriodicalId\":93771,\"journal\":{\"name\":\"IOP SciNotes\",\"volume\":\" \",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-03-21\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"15\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"IOP SciNotes\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1088/2633-1357/abcd29\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"IOP SciNotes","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1088/2633-1357/abcd29","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Multi-Class classification of vulnerabilities in smart contracts using AWD-LSTM, with pre-trained encoder inspired from natural language processing
Vulnerability detection and safety of smart contracts are of paramount importance because of their immutable nature. Symbolic tools like OYENTE and MAIAN are typically used for vulnerability prediction in smart contracts. As these tools are computationally expensive, they are typically used to detect vulnerabilities until some predefined invocation depth. These tools require more search time as the invocation depth increases. Since the use of smart contracts increases rapidly, their analysis becomes difficult using these traditional tools. Recently, a machine learning technique called Long Short Term Memory (LSTM) has been used to predict the vulnerability of a smart contract. In the present article, we present how to classify smart contracts into Suicidal, Prodigal, Greedy, or Normal categories using Average Stochastic Gradient Descent Weight-Dropped LSTM (AWD-LSTM), a variant of LSTM. We reduced the class imbalance by considering only distinct opcode combinations for normal contracts and achieved a weighted average F1 score of 90.0%. Such techniques can be utilized in real-time to analyze a large number of smart contracts and to improve their security.