Binary Code Source Recovery With Latent Semantic Embeddings

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods struggle to determine the source code of compiled binary software code when the source code is not available, making it difficult to analyze security risks such as malware presence.

Innovation Solution

A generative artificial intelligence language model is used to decompile binary code by conditioning on an embedded representation, leveraging a file encoder model and a natural language model to generate source code from binary code, utilizing a trainable semantic embedding and distance functions to select matching source code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If binary code is analyzed directly without source code, then security analysis can be performed on compiled software, but the ability to accurately identify security risks and malware is limited

Engineering Contradiction:
Improvesecurity analysis accuracyVSAvoidsource code availability
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The patent creates a latent space representation that copies and preserves the essential semantic information from source code into a format that can be derived from binary code. The encoder-decoder architecture learns to map binary code back to source code representations, effectively creating a copy of the source code information without requiring the original source code to be available.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent introduces a latent space as an intermediary representation between binary code and source code. This latent space serves as a mediator that captures the semantic meaning of source code in a compressed form, allowing the system to bridge the gap between compiled binary code and human-readable source code through learned mappings.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If decompilation is attempted using traditional methods, then source code can be recovered, but the process is time-consuming and computationally intensive

Engineering Contradiction:
Improvesource code recovery speedVSAvoiddecompilation time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent replaces traditional mechanical decompilation processes with a neural network-based encoder-decoder system. Instead of using rule-based or heuristic decompilation methods, the system learns the mapping from binary to source code through training, substituting the mechanical decompilation process with a learned probabilistic model that is both faster and more accurate.

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

Solution Approach 2:

The patent performs preliminary training of the encoder-decoder model on pairs of source code and binary code before actual decompilation. This preliminary action of pre-training the neural network on relevant data enables the system to perform rapid source code recovery during actual use, avoiding the need for time-consuming traditional decompilation processes.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If the latent space dimension is increased to capture more source code information, then the accuracy of source code determination improves, but the computational complexity and training requirements increase

Engineering Contradiction:
Improvesource code determination accuracyVSAvoidmodel complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent employs dynamic adjustment of the latent space dimension during the training and inference process. The system can adaptively determine the appropriate level of compression and information retention in the latent space, balancing between capturing sufficient source code information and maintaining computational efficiency through learned representations.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS20250272089A1Determining source code of a software code
Publication Date: 2025.08.28 CYLANCE INC
  • US20250272089A1 patent drawing
  • US20250272089A1 patent drawing
  • US20250272089A1 patent drawing

AI summary

Systems, methods, and software can be used to determine source code of a software code. In some aspects, a method includes: processing a binary code by using a file encoder model to obtain a file embedding vector; and selecting one or more source code samples based on the file embedding vector and a distance function.