Semantic Vulnerability Graph for Code Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current source code vulnerability detection methods, particularly those using rule-based systems and graph-based models, face limitations in capturing dynamic behavior and long-range dependencies, leading to high false-positive and false-negative rates and inadequate granularity in vulnerability identification.

Innovation Solution

The introduction of a Semantic Vulnerability Graph (SVG) that combines data flow, control flow, sequential flow, and novel Poacher Flow edges, along with a Multitask RoBERTa-PFGCN architecture using RoBERTa for node embeddings and Graph Convolutional Networks, to generate richer semantic and syntactic features for vulnerability detection and classification.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If rule-based systems are used for vulnerability detection, then detection coverage can be achieved, but false-positive and false-negative rates increase

Engineering Contradiction:
Improvedetection accuracyVSAvoidfalse-positive rate
Core Design Contradiction:
ReliabilityVSMeasurement precision

Solution Approach 1:

The patent replaces rule-based mechanical detection systems with machine learning models (Random Forest, XGBoost, Graph Neural Networks) that learn vulnerability patterns from training data, automatically adapting to diverse vulnerability types without manual rule updates, thereby reducing false positives and negatives

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent transforms the detection approach by changing from fixed rule parameters to dynamic learned parameters through machine learning models trained on large datasets, enabling the system to adapt detection thresholds and patterns based on actual vulnerability distributions

Inventive Principle:
Principle #35Parameter changes

2Loss of information

If AST-based graph representations are used, then syntactic information is captured, but original graph syntactics are suppressed during flattening

Engineering Contradiction:
Improvesyntactic information retentionVSAvoidgraph representation complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent segments the code analysis into multiple graph representations (AST, CPG, control flow graph) that are processed separately and then integrated through multi-view graph neural networks, preserving syntactic information from each view without requiring flattening that would lose structural details

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent embeds multiple graph representations hierarchically, where AST provides syntactic structure, CPG adds data flow information, and control flow graphs add execution path context, with each layer nested within and enhancing the previous layers while maintaining individual structural integrity

Inventive Principle:
Principle #7Nested doll (Nesting)

3Adaptability or versatility

If traditional ML methods are used, then alternative to automated vulnerability discovery is provided, but generalizability is limited compared to deep learning

Engineering Contradiction:
Improvemethod flexibilityVSAvoidgeneralizability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent employs dynamic graph neural networks that adapt their structure and parameters based on the input code's complexity and vulnerability patterns, allowing the model to dynamically adjust its analysis depth and focus, thereby achieving both flexibility and high generalizability across different codebases

Inventive Principle:
Principle #15Dynamics

4Measurement precision

If function or file level detection is used, then vulnerability detection is achieved, but granularity for programmer perspective is insufficient

Engineering Contradiction:
Improvevulnerability location precisionVSAvoidanalysis granularity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments vulnerability detection to the statement level by analyzing individual code statements and their relationships in the control flow graph, enabling precise localization of vulnerabilities to specific lines of code rather than broader function or file levels, which directly benefits programmers needing fine-grained feedback

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20240354424A1System and methods for unbiased transformer source code vulnerability learning with semantic code graph
Publication Date: 2024.10.24 BOARD OF RGT THE UNIV OF TEXAS SYST
  • US20240354424A1 patent drawing
  • US20240354424A1 patent drawing
  • US20240354424A1 patent drawing

AI summary

The present disclosure presents vulnerability code detection systems and related methods. One such method comprises executing, by a client computing device, a joint RoBERTa and graph convolutional neural network model that is configured to detect a code vulnerability attack on a computing device. The model can analyze the code structure and its connections and identify any irregularities or patterns that could be used to exploit vulnerabilities. Once the GCNN model has analyzed the code, it can provide insights to the user or system administrator about potential vulnerabilities and provide suggested actions to remediate them.