Multi-Representational Learning for Source Code Malware Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current malware detection techniques face challenges in efficiently and accurately identifying malicious source code without performing dynamic analysis, which is costly and not scalable, and rely heavily on database lookups or hand-crafted features that are difficult to update and can be circumvented by adversaries.

Innovation Solution

The development of multi-representational learning (MRL) models that abstract source code into different layers such as characters, tokens, and Abstract Syntax Trees (ASTs), allowing for the extraction of complementary features and the creation of feature vectors for efficient static classification, using techniques like Convolutional Neural Networks (CNNs) for classification without the need for dynamic execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If dynamic analysis is used for malware detection, then detection accuracy is improved, but computational cost and scalability deteriorate

Engineering Contradiction:
Improvedetection accuracyVSAvoidscalability
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent creates static copies of source code representations (character sequences, token sequences, AST representations) that capture the essential structural and semantic features of malware without requiring actual execution. These copied representations enable accurate classification while avoiding the computational overhead of dynamic analysis.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent replaces the mechanical execution process (dynamic analysis) with machine learning-based classification systems that process static code representations. Multiple ML models analyze different code representations and aggregate their predictions, substituting the need for actual code execution with computational modeling.

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

2Speed

If database lookups or hand-crafted features are used for malware detection, then detection speed is improved, but adaptability to novel threats deteriorates

Engineering Contradiction:
Improvedetection speedVSAvoidresilience to novel threats
Core Design Contradiction:
SpeedVSAdaptability or versatility

Solution Approach 1:

The patent implements dynamic model selection and aggregation where multiple machine learning models with different strengths are selected and combined based on the specific code representation being analyzed. This dynamic approach allows the system to adapt to various malware types and techniques while maintaining fast detection speeds through efficient model execution.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent creates a composite detection system that combines multiple machine learning models analyzing different code representations (characters, tokens, AST). This composite approach integrates the strengths of various models and representations, creating a robust system that is both fast and highly adaptable to novel threats.

Inventive Principle:
Principle #40Composite materials

3Measurement precision

If multiple code representations are analyzed, then detection accuracy is improved, but computational complexity increases

Engineering Contradiction:
Improvedetection accuracyVSAvoidmodel complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments the code analysis process into distinct stages, each handling a specific code representation (character-level, token-level, AST-level). Different machine learning models are assigned to different segmentation levels, allowing for specialized analysis that improves accuracy while managing complexity through modular organization.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent develops universal machine learning models that can process multiple types of code representations and aggregate their outputs. These multi-functional models reduce overall system complexity by providing a unified framework that handles diverse inputs, rather than requiring separate specialized models for each representation type.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS11816214B2Building multi-representational learning models for static analysis of source code
Publication Date: 2023.11.14 PALO ALTO NETWORKS INC
  • US11816214B2 patent drawing
  • US11816214B2 patent drawing
  • US11816214B2 patent drawing

AI summary

A system/process/computer program product for building multi-representational learning models for static analysis of source code includes receiving training data, wherein the training data includes a set of source code files for training a multi-representational learning (MRL) model for classifying malicious source code and benign source code based on a static analysis; generating a first feature vector based on a set of characters extracted from the set of source code files; generating a second feature vector based on a set of tokens extracted from the set of source code files; and performing an ensemble of the first feature vector and the second feature vector to form a target feature vector for classifying malicious source code and benign source code based on the static analysis.