How the AI pinpoints the function that contains a security flaw (IMAGE)
Caption
How the AI finds the function that contains a flaw. (1) The smart contract is turned into a graph: circles are code elements, lines are their relationships, and colors show which function each element belongs to. (2) The AI looks in two ways at once. The across-functions view (left) also uses the links between functions (dark lines), so it can notice dangers that arise when functions work together. The inside-each-function view (right) ignores those links (dotted lines) and examines each function in detail. (3) The two results are combined, and the AI learns how much to rely on each view; steps 2 and 3 repeat several times. (4) Each function is compared with the others to decide which one contains a flaw, shown here for a reentrancy flaw in Function B. Separating the two views improved function-level accuracy (F1) by 23.6 points.
Credit
Professor Le-Minh Nguyen from Japan Advanced Institute of Science and Technology (JAIST), Japan
Usage Restrictions
Credit must be given to the creator.
License
Original content