Vector Embedding for Source Code Defect Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional methods for detecting defective source code commits in microservices deployments are inefficient, often requiring manual log analysis and human intervention, which can lead to misidentification of issues and delayed resolution in production environments.

Innovation Solution

A computer-implemented method using deep learning models, specifically Siamese neural networks, to analyze log differences and system metrics, generating vector embeddings that determine the likelihood of defects in source code commits, allowing for automated identification and remediation of potentially problematic commits.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If manual log analysis and human intervention are used to detect defective source code commits, then detection accuracy can be maintained through human judgment, but detection efficiency and speed are significantly reduced

Engineering Contradiction:
Improvedetection efficiencyVSAvoidtime to identify defects
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent replaces manual human analysis of logs with an automated machine learning system that processes log data, generates embeddings, and identifies defective commits automatically. This substitution eliminates the time-consuming manual review process while maintaining detection capability through algorithmic analysis of log patterns and similarities.

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

Solution Approach 2:

The system creates vector embeddings as digital representations (copies) of log data, allowing automated comparison and analysis of commit patterns without requiring human reviewers to manually examine raw logs. These embeddings enable efficient automated similarity searches and defect identification.

Inventive Principle:
Principle #26Copying

2Ease of operation

If manual log analysis is performed to identify defective commits, then detailed human insight can be applied, but the process becomes complex and requires significant human resources

Engineering Contradiction:
Improveoperational simplicityVSAvoidcomplexity of detection process
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The system performs self-service by automatically ingesting log data, generating embeddings, training models, and identifying defective commits without requiring human operators to manually analyze logs. The automated pipeline handles the entire detection process, reducing operational complexity despite the sophisticated underlying technology.

Inventive Principle:
Principle #25Self-service

3Reliability

If traditional detection methods are used, then implementation is simpler with fewer advanced technologies, but detection accuracy and reliability are reduced

Engineering Contradiction:
Improveaccuracy of defect identificationVSAvoidcomplexity of system architecture
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the defect detection process into distinct modular components: log ingestion, embedding generation, model training, and defect identification. This segmentation allows each component to be optimized independently while working together to achieve high detection accuracy, managing complexity through modular architecture.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system transforms log data into a different dimensional representation through vector embeddings, converting unstructured text logs into structured numerical vectors that can be efficiently processed by machine learning models. This dimensional transformation enables sophisticated pattern recognition and similarity analysis for improved detection accuracy.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Data Source

PatentUS11379220B2Vector embedding of relational code sets
Publication Date: 2022.07.05 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11379220B2 patent drawing
  • US11379220B2 patent drawing
  • US11379220B2 patent drawing

AI summary

In an approach, one or more computer processors create a dictionary for each source code commit in a set of historical source code commits associated with a software deployment; create a similarity model based on the created dictionary for each source code commit in the set of historical source code commits; generate a vector embedding for a source code commit pair based on a set of log differences between source code commit pairs utilizing the created similarity model; generate, responsive to a new source code commit, a new vector embedding based on a set of log differences between the new source code commit and a preceding source code commit utilizing the created similarity model; generate a defect likelihood utilizing the generated new vector embedding; determine, responsive to the generated defect likelihood exceeding a defect likelihood threshold, that the new source code commit contains defects.