A Method for Multidimensional Graph Tensor Fusion Representation and Embedding of Codes, NO: 2023052300567880
The present invention discloses a method and application for the multi-dimensional graph tensor fusion representation and embedding of code, which belongs to the field of artificial intelligence. The method includes: extracting syntax information and hierarchical structure information from source code files and binary files; simultaneously generating 4 different heterogeneous code graph structures, namely Abstract Syntax Tree (AST), Data Dependence Graph (DDG), Control Flow Graph (CFG), and Natural Code Sequence (NCS), for both source code files and binary files; fusing four heterogeneous code graph structures to generate a high-dimensional graph tensor; using Graph Tensor Convolution Network (GTCN) to generate accurate code semantic embeddings and capture internal code features; and applying the relevant techniques to various downstream tasks such as malicious code identification, achieving a good balance between detection efficiency and accuracy.
