{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,1]],"date-time":"2026-07-01T12:12:38Z","timestamp":1782907958154,"version":"3.54.5"},"reference-count":65,"publisher":"MDPI AG","issue":"5","license":[{"start":{"date-parts":[[2022,2,25]],"date-time":"2022-02-25T00:00:00Z","timestamp":1645747200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"National Key R&amp;D Program of China","award":["2020YFB1005900"],"award-info":[{"award-number":["2020YFB1005900"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Sensors"],"abstract":"<jats:p>The key issue in the field of smart contract security is efficient and rapid vulnerability detection in smart contracts. Most of the existing detection methods can only detect the presence of vulnerabilities in the contract and can hardly identify their type. Furthermore, they have poor scalability. To resolve these issues, in this study, we developed a smart contract vulnerability detection model based on multi-task learning. By setting auxiliary tasks to learn more directional vulnerability features, the detection capability of the model was improved to realize the detection and recognition of vulnerabilities. The model is based on a hard-sharing design, which consists of two parts. First, the bottom sharing layer is mainly used to learn the semantic information of the input contract. The text representation is first transformed into a new vector by word and positional embedding, and then the neural network, based on an attention mechanism, is used to learn and extract the feature vector of the contract. Second, the task-specific layer is mainly employed to realize the functions of each task. A classical convolutional neural network was used to construct a classification model for each task that learns and extracts features from the shared layer for training to achieve their respective task objectives. The experimental results show that the model can better identify the types of vulnerabilities after adding the auxiliary vulnerability detection task. This model realizes the detection of vulnerabilities and recognizes three types of vulnerabilities. The multi-task model was observed to perform better and is less expensive than a single-task model in terms of time, computation, and storage.<\/jats:p>","DOI":"10.3390\/s22051829","type":"journal-article","created":{"date-parts":[[2022,2,27]],"date-time":"2022-02-27T20:48:33Z","timestamp":1645994913000},"page":"1829","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":71,"title":["Smart Contract Vulnerability Detection Model Based on Multi-Task Learning"],"prefix":"10.3390","volume":"22","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-8804-7150","authenticated-orcid":false,"given":"Jing","family":"Huang","sequence":"first","affiliation":[{"name":"Faculty of Information Technology, Beijing University of Technology, Beijing 100124, China"},{"name":"Beijing Key Laboratory of Computational Intelligence and Intelligence System, Beijing 100124, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Kuo","family":"Zhou","sequence":"additional","affiliation":[{"name":"Faculty of Information Technology, Beijing University of Technology, Beijing 100124, China"},{"name":"Beijing Key Laboratory of Computational Intelligence and Intelligence System, Beijing 100124, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ao","family":"Xiong","sequence":"additional","affiliation":[{"name":"State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing 100876, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Dongmeng","family":"Li","sequence":"additional","affiliation":[{"name":"Faculty of Information Technology, Beijing University of Technology, Beijing 100124, China"},{"name":"Beijing Key Laboratory of Computational Intelligence and Intelligence System, Beijing 100124, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2022,2,25]]},"reference":[{"key":"ref_1","first-page":"18","article-title":"Smart contracts: Building blocks for digital markets","volume":"16","author":"Szabo","year":"1996","journal-title":"EXTROPY J. Transhumanist Thought"},{"key":"ref_2","unstructured":"Nakamoto, S. (2008). Bitcoin: A peer-to-peer electronic cash system. Decentralized Bus. Rev., 21260."},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Dannen, C. (2017). Introducing Ethereum and Solidity, Apress.","DOI":"10.1007\/978-1-4842-2535-6"},{"key":"ref_4","unstructured":"(2021, October 28). Hyperledger Project. Available online: https:\/\/www.hyperledger.org\/."},{"key":"ref_5","first-page":"653","article-title":"A survey of blockchain security issues and challenges","volume":"19","author":"Lin","year":"2017","journal-title":"Int. J. Netw. Secur."},{"key":"ref_6","unstructured":"(2021, October 28). The Solidity Contract-Oriented Programming Language. Available online: https:\/\/github.com\/ethereum\/solidity."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Atzei, N., Bartoletti, M., and Cimoli, T. (2017, January 24\u201325). A survey of attacks on ethereum smart contracts (sok). Proceedings of the International Conference on Principles of Security and Trust, Uppsala, Sweden.","DOI":"10.1007\/978-3-662-54455-6_8"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"19","DOI":"10.4018\/JCIT.2019010102","article-title":"Understanding a Revolutionary and Flawed Grand Experiment in Blockchain","volume":"21","author":"Mehar","year":"2019","journal-title":"J. Cases Inf. Technol."},{"key":"ref_9","unstructured":"(2021, October 28). The Parity Wallet Hack Explained. Available online: https:\/\/blog.openzeppelin.com\/on-the-parity-wallet-multisig-hack-405a8c12e8f7\/."},{"key":"ref_10","unstructured":"(2021, October 28). Batch Overflow Bug on Ethereum ERC20 Token Contracts and SafeMath. Available online: https:\/\/blog.matryx.ai\/batch-overflow-bug-on-ethereum-erc20-token-contracts-and-safemath-f9ebcc137434."},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Luu, L., Chu, D.H., Olickel, H., Saxena, P., and Hobor, A. (2016, January 24\u201328). Making smart contracts smarter. Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria.","DOI":"10.1145\/2976749.2978309"},{"key":"ref_12","doi-asserted-by":"crossref","unstructured":"Torres, C.F., Sch\u00fctte, J., and State, R. (2018, January 3\u20137). Osiris: Hunting for integer bugs in ethereum smart contracts. Proceedings of the 34th Annual Computer Security Applications Conference, New York, NY, USA.","DOI":"10.1145\/3274694.3274737"},{"key":"ref_13","unstructured":"(2021, October 28). Mythril-Reversing and Bug Hunting Framework for the Ethereum Blockchain. Available online: https:\/\/pypi.org\/project\/mythril\/0.8.2\/."},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Nikoli\u0107, I., Kolluri, A., Sergey, I., Saxena, P., and Hpbpr, A. (2018, January 3\u20137). Finding the greedy, prodigal, and suicidal contracts at scale. Proceedings of the 34th Annual Computer Security Applications Conference, New York, NY, USA.","DOI":"10.1145\/3274694.3274743"},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Mossberg, M., Manzano, F., Hennenfent, E., Groce, A., Grieco, G., Feist, J., Brunson, T., and Dinaburg, A. (2019, January 11\u201315). Manticore: A user-friendly symbolic execution framework for binaries and smart contracts. Proceedings of the 2019 34th IEEE\/ACM International Conference on Automated Software Engineering (ASE), San Diego, CA, USA.","DOI":"10.1109\/ASE.2019.00133"},{"key":"ref_16","first-page":"1","article-title":"Ethereum: A secure decentralised generalised transaction ledger","volume":"151","author":"Wood","year":"2014","journal-title":"Ethereum Proj. Yellow Pap."},{"key":"ref_17","unstructured":"(2021, October 28). Formal Verification of Deed Contract in Ethereum Name Service. Available online: https:\/\/yoichihirai.com\/deed.pdf."},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Kalra, S., Goel, S., Dhawan, M., and Sharma, S. (2018, January 18\u201321). Zeus: Analyzing safety of smart contracts. Proceedings of the Network and Distributed System Symposium (NDSS), San Diego, CA, USA.","DOI":"10.14722\/ndss.2018.23082"},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Hildenbrandt, E., Saxena, M., Rodrigues, N., Zhu, X., Daian, P., Guth, D., Moore, B., Park, D., Zhang, Y., and Stefanescu, A. (2018, January 9\u201312). KEVM: A complete formal semantics of the ethereum virtual machine. Proceedings of the 2018 IEEE 31st Computer Security Foundations Symposium (CSF), Oxford, UK.","DOI":"10.1109\/CSF.2018.00022"},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Bhargavan, K., Delignat-Lavaud, A., Fournet, C., Gollamudi, A., Gonthier, G., Kobeissi, N., Kulatova, N., Rastogi, A., Sibut-Pinote, T., and Swamy, N. (2016, January 20\u201324). Formal verification of smart contracts: Short paper. Proceedings of the 2016 ACM Workshop on Programming Languages and Analysis for Security, Vienna, Austria.","DOI":"10.1145\/2993600.2993611"},{"key":"ref_21","doi-asserted-by":"crossref","unstructured":"Grishchenko, I., Maffei, M., and Schneidewind, C. (2018, January 16\u201319). A semantic framework for the security analysis of ethereum smart contracts. Proceeding of the International Conference on Principles of Security and Trust, Thessaloniki, Greece.","DOI":"10.1007\/978-3-319-89722-6_10"},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Tsankov, P., Dan, A., Drachsler-Cohen, D., Gervais, A., B\u00fcnzli, F., and Vechev, M. (2018, January 15\u201319). Securify: Practical security analysis of smart contracts. Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, Toronto, ON, Canada.","DOI":"10.1145\/3243734.3243780"},{"key":"ref_23","doi-asserted-by":"crossref","unstructured":"Permenev, A., Dimitrov, D., Tsankov, P., Drachsler-Cohen, D., and Vechev, M. (2020, January 17\u201321). Verx: Safety verification of smart contracts. Proceedings of the 2020 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA.","DOI":"10.1109\/SP40000.2020.00024"},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Grieco, G., Song, W., Cygan, A., Feist, J., and Groce, A. (2020, January 18\u201322). Echidna: Effective, usable, and fast fuzzing for smart contracts. Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis, New York, NY, USA.","DOI":"10.1145\/3395363.3404366"},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Jiang, B., Liu, Y., and Chan, W.K. (2018, January 3\u20137). ContractFuzzer: Fuzzing Smart Contracts for Vulnerability Detection. Proceedings of the 33rd ACM\/IEEE International Conference on Automated Software Engineering, New York, NY, USA.","DOI":"10.1145\/3238147.3238177"},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"He, J., Balunovi\u0107, M., Ambroladze, N., Tsankov, P., and Vechev, M. (2019, January 11\u201315). Learning to fuzz from symbolic execution with application to smart contracts. Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, London, UK.","DOI":"10.1145\/3319535.3363230"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"W\u00fcstholz, V., and Christakis, M. (2020, January 6\u20138). Harvey: A greybox fuzzer for smart contracts. Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, Rome, Italy.","DOI":"10.1145\/3368089.3417064"},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Zhou, E., Hua, S., Pi, B., Sun, J., Nomura, Y., Yamashita, K., and Kurihara, H. (2018, January 26\u201328). Security assurance for smart contract. Proceedings of the 2018 9th IFIP International Conference on New Technologies, Mobility and Security (NTMS), Paris, France.","DOI":"10.1109\/NTMS.2018.8328743"},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Tikhomirov, S., Voskresenskaya, E., Ivanitskiy, I., Takhaview, R., Marchenko, E., and Alexandrov, Y. (2018, January 27). Smartcheck: Static analysis of ethereum smart contracts. Proceedings of the 1st International Workshop on Emerging Trends in Software Engineering for Blockchain, Gothenburg, Sweden.","DOI":"10.1145\/3194113.3194115"},{"key":"ref_30","unstructured":"(2021, October 28). Slither. Available online: https:\/\/github.com\/crytic\/slither."},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Rodler, M., Li, W., Karame, G.O., and Davi, L. (2019, January 24\u201327). Sereum: Protecting existing smart contracts against re-entrancy attacks. Proceedings of the 2019 Network and Distributed System Security Symposium, San Diego, CA, USA.","DOI":"10.14722\/ndss.2019.23413"},{"key":"ref_32","first-page":"215","article-title":"Software Vulnerability Analysis Technology","volume":"52","author":"Wu","year":"2012","journal-title":"Sci. Press"},{"key":"ref_33","unstructured":"Fey, G. (2011, January 14\u201316). Assessing system vulnerability using formal verification techniques. Proceedings of the International Doctoral Workshop on Mathematical and Engineering Methods in Computer Science, Berlin\/Heidelberg, Germany."},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1186\/s42400-018-0002-y","article-title":"Fuzzing: A survey","volume":"1","author":"Li","year":"2018","journal-title":"Cybersecurity"},{"key":"ref_35","unstructured":"Huang, T.T.H.D. (2018). Hunting the ethereum smart contract: Color-inspired inspection of potential attacks. arXiv."},{"key":"ref_36","unstructured":"Tann, W.J.W., Han, X.J., Gupta, S.S., and Ong, Y.-S. (2018). Towards safer smart contracts: A sequence learning approach to detecting security threats. arXiv."},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"1133","DOI":"10.1109\/TNSE.2020.2968505","article-title":"Contractward: Automated vulnerability detection models for ethereum smart contracts","volume":"8","author":"Wang","year":"2020","journal-title":"IEEE Trans. Netw. Sci. Eng."},{"key":"ref_38","unstructured":"Merity, S., Keskar, N.S., and Socher, R. (2017). Regularizing and optimizing LSTM language models. arXiv."},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"Zhuang, Y., Liu, Z., Qian, P., Liu, Q., Wang, X., and He, Q. (2020, January 11\u201313). Smart Contract Vulnerability Detection using Graph Neural Network. Proceedings of the International Joint Conferences on Artificial Intelligence (IJCAI), Online.","DOI":"10.24963\/ijcai.2020\/454"},{"key":"ref_40","doi-asserted-by":"crossref","unstructured":"Zhang, Y., and Yang, Q. (2021). A survey on multi-task learning. IEEE Trans. Knowl. Data Eng., 1.","DOI":"10.1109\/TKDE.2022.3203904"},{"key":"ref_41","doi-asserted-by":"crossref","first-page":"436","DOI":"10.1038\/nature14539","article-title":"Deep learning","volume":"521","author":"LeCun","year":"2015","journal-title":"Nature"},{"key":"ref_42","doi-asserted-by":"crossref","unstructured":"Huang, Y., Kong, Q., Jia, N., Chen, X., and Zheng, Z. (2019, January 25\u201326). Recommending differentiated code to support smart contract update. Proceedings of the 2019 IEEE\/ACM 27th International Conference on Program Comprehension (ICPC), Montreal, QC, Canada.","DOI":"10.1109\/ICPC.2019.00045"},{"key":"ref_43","unstructured":"Buterin, V. (2014). A next-generation smart contract and decentralized application platform. White Pap., 3."},{"key":"ref_44","doi-asserted-by":"crossref","first-page":"266","DOI":"10.1093\/ijlit\/eaz008","article-title":"How to regulate bitcoin? Decentralized regulation for a decentralized cryptocurrency","volume":"27","author":"Nabilou","year":"2019","journal-title":"Int. J. Law Inf. Technol."},{"key":"ref_45","unstructured":"(2021, October 28). Smart Contract Weakness Classification and Test Cases. Available online: http:\/\/swcregistry.io."},{"key":"ref_46","unstructured":"Hirai, Y. (2019, January 24\u201326). Formal verification of Deed contract in Ethereum name service. Proceedings of the 10th IFIP International Conference on New Technologies, Mobility and Security (NTMS), Canary Islands, Spain."},{"key":"ref_47","unstructured":"(2022, February 13). SeaHorn. Verification Framework. Available online: https:\/\/seahorn.github.io\/."},{"key":"ref_48","doi-asserted-by":"crossref","first-page":"012004","DOI":"10.1088\/1742-6596\/1820\/1\/012004","article-title":"Attention-based Machine Learning Model for Smart Contract Vulnerability Detection","volume":"1820","author":"Sun","year":"2021","journal-title":"J. Phys. Conf. Ser."},{"key":"ref_49","unstructured":"Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., and Polosukhin, I. (2017, January 4\u20139). Attention is all you need. Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS), San Diego, CA, USA."},{"key":"ref_50","doi-asserted-by":"crossref","unstructured":"Momeni, P., Wang, Y., and Samavi, R. (2019, January 26\u201328). Machine learning model for smart contracts security analysis. Proceedings of the 2019 17th International Conference on Privacy, Security and Trust (PST), Fredericton, NB, Canada.","DOI":"10.1109\/PST47121.2019.8949045"},{"key":"ref_51","unstructured":"Cavnar, W.B., and Trenkle, J.M. (1994, January 11\u201313). N-gram-based text categorization. Proceedings of the SDAIR-94, 3rd Annual Symposium on Document Analysis and Information Retrieval, Las Vegas, NV, USA."},{"key":"ref_52","unstructured":"Lutz, O., Chen, H., Fereidooni, H., Sender, C., Dmitrienko, A., Sadeghi, A.R., and Koushanfar, F. (2021). ESCORT: Ethereum Smart Contracts Vulnerability Detection using Deep Neural Network and Transfer Learning. arXiv."},{"key":"ref_53","doi-asserted-by":"crossref","unstructured":"Collobert, R., and Weston, J. (2008, January 5\u20139). A unified architecture for natural language processing: Deep neural networks with multitask learning. Proceedings of the 25th International Conference on Machine Learning, Helsinki, Finland.","DOI":"10.1145\/1390156.1390177"},{"key":"ref_54","doi-asserted-by":"crossref","first-page":"1239","DOI":"10.1007\/s11063-018-9873-x","article-title":"Multi-task character-level attentional networks for medical concept normalization","volume":"49","author":"Niu","year":"2019","journal-title":"Neural Processing Lett."},{"key":"ref_55","unstructured":"Liu, P., Qiu, X., and Huang, X. (2016). Recurrent neural network for text classification with multi-task learning. arXiv."},{"key":"ref_56","doi-asserted-by":"crossref","unstructured":"Yang, J., Liu, Y., Qian, M., Guan, C., and Yuan, X. (2019). Information Extraction from Electronic Medical Records Using Multitask Recurrent Neural Network with Contextual Word Embedding. Appl. Sci., 9.","DOI":"10.3390\/app9183658"},{"key":"ref_57","doi-asserted-by":"crossref","first-page":"41","DOI":"10.1023\/A:1007379606734","article-title":"Multitask learning","volume":"28","author":"Caruana","year":"1997","journal-title":"Mach. Learn."},{"key":"ref_58","doi-asserted-by":"crossref","unstructured":"Duong, L., Cohn, T., Bird, S., and Cook, P. (2015, January 26\u201331). Low resource dependency parsing: Cross-lingual parameter sharing in a neural network parser. Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing, Beijing, China. short papers.","DOI":"10.3115\/v1\/P15-2139"},{"key":"ref_59","doi-asserted-by":"crossref","unstructured":"Barandela, R., S\u00e1nchez, J.S., Garc\u00eda, V., and Ferri, F.J. (2003, January 4\u20136). Learning from imbalanced sets through resampling and weighting. Proceedings of the Iberian Conference on Pattern Recognition and Image Analysis, Puerto de Andratx, Spain.","DOI":"10.1007\/978-3-540-44871-6_10"},{"key":"ref_60","doi-asserted-by":"crossref","unstructured":"Lin, T.Y., Goyal, P., Girshick, R., He, K., and Dollar, P. (2017, January 22\u201329). Focal loss for dense object detection. Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy.","DOI":"10.1109\/ICCV.2017.324"},{"key":"ref_61","unstructured":"(2021, October 28). Google Machine Learning Glossary. Available online: https:\/\/developers.google.com\/machine-learning\/glossary."},{"key":"ref_62","unstructured":"Powers, D.M.W. (2020). Evaluation: From precision, recall and F-measure to ROC, informedness, markedness and correlation. arXiv."},{"key":"ref_63","unstructured":"(2021, October 28). Xpath Cover Page\u2014W3C. Available online: https:\/\/www.w3.org\/TR\/xpath\/all\/."},{"key":"ref_64","unstructured":"Goodfellow, I., Bengio, Y., and Courville, A. (2016). Deep Learning, MIT Press."},{"key":"ref_65","doi-asserted-by":"crossref","unstructured":"Ma, J., Zhao, Z., Yi, X., Hong, L., and Chi, E.H. (2018, January 19\u201323). Modeling task relationships in multi-task learning with multi-gate mixture-of-experts. Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, London, UK.","DOI":"10.1145\/3219819.3220007"}],"container-title":["Sensors"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1424-8220\/22\/5\/1829\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T22:27:29Z","timestamp":1760135249000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1424-8220\/22\/5\/1829"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,2,25]]},"references-count":65,"journal-issue":{"issue":"5","published-online":{"date-parts":[[2022,3]]}},"alternative-id":["s22051829"],"URL":"https:\/\/doi.org\/10.3390\/s22051829","relation":{},"ISSN":["1424-8220"],"issn-type":[{"value":"1424-8220","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,2,25]]}}}