Scalable Software Sample Clustering via Multi-Stage Hashing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Clustering software samples based on their features is challenging due to the large number of features and varying similarities, leading to scalability issues in processing time, storage space, and computation efficiency.

Innovation Solution

A method that disassembles software samples, applies hashing (using SPP-NOP and mini-hashing), and performs similarity calculations to reduce the number of comparisons, employing stride hashing and grouping to efficiently cluster software samples, thereby reducing storage and CPU cycles.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional clustering methods are used to process software samples with many features, then clustering accuracy can be maintained, but processing time increases significantly and scalability is reduced

Engineering Contradiction:
Improveclustering accuracyVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent segments the clustering process into multiple stages: (1) computing first hash results for all software samples, (2) computing second hash results for selected samples, (3) computing third hash results for further refinement, and (4) performing similarity calculations only on reduced candidate sets. This segmentation allows the system to maintain clustering accuracy while dramatically reducing processing time by avoiding exhaustive comparisons of all samples.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies preliminary hashing operations to software samples before the actual clustering process. By computing first, second, and third hash results in advance, the system pre-processes the data to create compact representations that enable faster similarity calculations later, thus reducing the time required for the main clustering operation.

Inventive Principle:
Principle #10Preliminary action

2Loss of information

If all features of software samples are stored and processed, then comprehensive clustering analysis is achieved, but storage space requirements increase significantly

Engineering Contradiction:
Improvefeature completenessVSAvoidstorage space
Core Design Contradiction:
Loss of informationVSQuantity of substance

Solution Approach 1:

The patent creates hash-based copies of software sample features instead of storing the complete feature sets. The first, second, and third hash results serve as compact representations that preserve the essential information needed for clustering while occupying minimal storage space, thus maintaining feature completeness information while reducing storage requirements.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent transforms the feature representation from raw feature data to hashed values through multiple hashing stages. This parameter transformation compresses the feature space significantly, allowing the system to retain the essential clustering information in a much more space-efficient format.

Inventive Principle:
Principle #35Parameter changes

3Measurement precision

If similarity calculations are performed on all software sample pairs, then accurate clustering results are obtained, but CPU cycle consumption becomes prohibitive for large datasets

Engineering Contradiction:
Improvesimilarity calculation accuracyVSAvoidcomputation efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent segments the similarity calculation process by first identifying candidate pairs using hash result comparisons, then performing detailed similarity calculations only on these reduced candidate sets. This segmentation avoids the computationally prohibitive exhaustive comparison of all sample pairs while maintaining calculation accuracy for the relevant subsets.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs similarity calculations partially by limiting the scope to candidate pairs identified through hash-based filtering rather than calculating similarities for all possible pairs. This partial action is sufficient to achieve accurate clustering results without the excessive computational cost of complete pairwise comparison.

Inventive Principle:
Principle #16Partial or excessive action

4Productivity

If multiple hashing stages are applied to software samples, then computational efficiency and storage reduction are achieved, but system complexity increases

Engineering Contradiction:
Improveclustering processing efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the hashing process into distinct stages (first hash, second hash, third hash), where each stage serves a specific purpose in reducing the data size and identifying candidate pairs. This segmentation makes the complex multi-stage hashing process more manageable and allows for optimized implementation of each individual hashing stage.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11880391B2Clustering software codes in scalable manner
Publication Date: 2024.01.23 CYLANCE INC
  • US11880391B2 patent drawing
  • US11880391B2 patent drawing
  • US11880391B2 patent drawing

AI summary

Systems, methods, and software can be used to cluster software codes in a scalable manner. In some aspects, a computer-implemented method comprises: obtaining a plurality of software samples; computing one or more first hash results for each of the plurality of software samples; computing one or more second hash results for each of the plurality of software samples based on the one or more first hash results, wherein an amount of the one or more second hash results is less than an amount of the one or more first hash results; determining a similarity output based on the one or more second hash results of two of the plurality of software samples; and clustering the plurality of software samples based on the similarity output to generate one or more software sample clusters.