TY - GEN
T1 - Vulnerability detection via typestate-guided code representation learning
AU - Cheng, Xiao
PY - 2023
Y1 - 2023
N2 - Machine learning, including deep learning, has found success in various domains. Recently, the focus has shifted to using deep learning, like graph neural networks, for static vulnerability detection. Existing methods represent code as an embedding vector and train models on safe and vulnerable code patterns to predict vulnerabilities. However, these models lack precise bug detection, as they prioritize coarse-grained classification over understanding vulnerability semantics, such as typestate properties. This paper introduces an innovative typestate-guided code embedding technique for accurate static vulnerability detection. We select and retain feasible typestate sequences extracted from typestate analysis using self-supervised contrastive learning in a pretrained path embedding model. This reduces the need for labeled data in training downstream models for vulnerability detection. Evaluation on real-world projects showcases our approach’s superiority over recent learning-based approaches. It outperforms them by substantial margins across various metrics like precision, recall and F1 Score.
AB - Machine learning, including deep learning, has found success in various domains. Recently, the focus has shifted to using deep learning, like graph neural networks, for static vulnerability detection. Existing methods represent code as an embedding vector and train models on safe and vulnerable code patterns to predict vulnerabilities. However, these models lack precise bug detection, as they prioritize coarse-grained classification over understanding vulnerability semantics, such as typestate properties. This paper introduces an innovative typestate-guided code embedding technique for accurate static vulnerability detection. We select and retain feasible typestate sequences extracted from typestate analysis using self-supervised contrastive learning in a pretrained path embedding model. This reduces the need for labeled data in training downstream models for vulnerability detection. Evaluation on real-world projects showcases our approach’s superiority over recent learning-based approaches. It outperforms them by substantial margins across various metrics like precision, recall and F1 Score.
KW - code embedding
KW - Typestate
KW - vulnerabilities
UR - https://www.scopus.com/pages/publications/85177163808
U2 - 10.1007/978-981-99-7584-6_22
DO - 10.1007/978-981-99-7584-6_22
M3 - Conference proceeding contribution
SN - 9789819975839
T3 - Lecture Notes in Computer Science
SP - 291
EP - 297
BT - Formal methods and software engineering
A2 - Li, Yi
A2 - Tahar, Sofiène
PB - Springer, Springer Nature
CY - Singapore
T2 - 24th International Conference on Formal Engineering Methods, ICFEM 2023
Y2 - 21 November 2023 through 24 November 2023
ER -