Semantic Graph Bug Detection for Explainable Root Cause Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing software bug detection methods, both rule-based and machine learning-based, struggle to provide accurate root cause analysis for software bugs, often relying on black-box models and syntactic representations that lack explainability.
Innovation Solution
The use of program-derived semantic graphs (PSGs) combined with code similarity systems like MISIM and Aroma to detect software bugs and provide semantically meaningful root cause analysis, enabling precise identification and correction of bugs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If rule-based or machine learning-based methods are used for bug detection, then bug detection capability is improved, but root cause analysis accuracy deteriorates due to black-box models and syntactic representations
Solution Approach 1:
The patent introduces program-derived semantic graphs (PSGs) as an intermediary representation between source code and bug detection models. PSGs transform syntactic code structures into semantic graphs that capture program meaning, enabling both accurate bug detection and explainable root cause analysis by showing the semantic relationships that lead to bugs.
Solution Approach 2:
The patent replaces traditional syntactic code representations (Abstract Syntax Trees) with semantic graph representations. This substitution allows the system to work with meaning-based structures rather than syntax-based structures, improving both detection accuracy and root cause explainability by capturing the actual semantic relationships in code.
2Extent of automation
If black-box models are used for bug detection, then detection automation is improved, but explainability deteriorates
Solution Approach 1:
PSGs serve as an interpretable intermediary that bridges automated detection and human understanding. The semantic graphs provide a visual and structured representation of code meaning that both automates the detection process and maintains explainability by showing which semantic elements are involved in detected bugs.
3Device complexity
If syntactic representations are used for code analysis, then processing simplicity is improved, but semantic accuracy deteriorates
Solution Approach 1:
The patent substitutes syntactic representations (Abstract Syntax Trees) with semantic graph representations (PSGs). This replacement maintains computational tractability while significantly improving semantic accuracy by capturing the actual meaning and relationships in code rather than just syntactic structure.
Data Source
AI summary
Methods, systems, and apparatus for automatic detection of software bugs are disclosed. An example apparatus includes a comparator to compare reference code to input code to detect a source code error in the input code; a graph generator to generate a graphical representation of the reference code or the input code, the graphical representation to identify non-overlapping code regions; and a root cause determiner to determine a root cause of the source code error in the input code, the root cause based on the non-overlapping code regions.


