IP Library › Granted Patent US 12,461,742
Granted Patent B2
US 12,461,742 · App. 18/496,722 · Granted Nov 4, 2025

Secure code clustering through LLM-based semantic analysis

Inventors: Damian Monea (Slatina, RO); Paul Sumedrea (Bucharest, RO); Mihaela-Petruta Gaman (Bucharest, RO); Alexandru Dinu (Bucharest, RO)
Assignee: CrowdStrike, Inc.
G06F8/75G06F21/563G06F40/30
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,461,742
App. No.
18/496,722
Filed
Oct 27, 2023
Granted
Nov 4, 2025
Kind
B2
Art Unit
2197
USPC
717/120
Abstract

An approach is provided that provides a plurality of source code samples to an artificial intelligence model (AIM) trained to describe source code based on performing semantic analysis on the source code. The approach produces, using the AIM, a plurality of semantic descriptions that describe the plurality of source code samples. Then, the approach converts the plurality of semantic descriptions into a plurality of semantic embeddings. In turn, the approach creates a plurality of clusters from the plurality of semantic embeddings, wherein each one of the plurality of clusters corresponds to two or more of the plurality of source code samples.

Claims (66)

1 . A method comprising:

providing a plurality of source code samples to an artificial intelligence model (AIM) trained to describe source code based on performing semantic analysis on the source code;

producing, by a processing device using the AIM, a plurality of semantic descriptions that describe the plurality of source code samples;

converting the plurality of semantic descriptions into a plurality of semantic embeddings; and

creating a plurality of clusters from the plurality of semantic embeddings, wherein each one of the plurality of clusters corresponds to two or more of the plurality of source code samples.

2 . The method of claim 1 , wherein each one of the plurality of semantic descriptions describe a functionality of a corresponding one of the plurality of source code samples.

3 . The method of claim 1 , further comprising:

providing the plurality of source code samples to a plurality of clustering paths, wherein the plurality of semantic descriptions, the plurality of semantic embeddings, and the plurality of clusters correspond to a first clustering path in the plurality of clustering paths;

producing, by each of the plurality of clustering paths, a plurality of different clusters based on a cluster type of their corresponding clustering path; and

re-ranking and merging the plurality of clusters with the plurality of different clusters to produce a plurality of final clusters.

4 . The method of claim 3 , wherein the plurality of clustering paths comprise a semantic clustering path, an agnostic clustering path, a label informed clustering path, and a task/label informed clustering path.

5 . The method of claim 3 , further comprising:

generating a plurality of cluster plots from the plurality of clusters and the plurality of different clusters;

identifying a discrepant cluster plot from the plurality of cluster plots that is misaligned from the remaining plurality of cluster plots;

identifying a first clustering path from the plurality of clustering paths that corresponds to the discrepant cluster plot; and

retraining the first clustering path.

6 . The method of claim 3 , wherein the plurality of final clusters comprise a first final cluster, the method further comprising:

identifying a group of source code samples from the plurality of source code samples that correspond to the first final cluster;

evaluating a subset of the group of source code samples to determine whether the group of source code samples indicate a cybersecurity threat; and

quarantining the group of source code samples in response to determining that the subset of source code samples indicate the cybersecurity threat.

7 . The method of claim 1 , further comprising:

training the AIM, wherein the training further comprises providing training source code, training source code descriptions, and one or more cybersecurity threat indicators to the AIM, wherein the one or more cybersecurity threat indicators identify one or more cybersecurity threats in the training source code.

8 . A system comprising:

a processing device; and

a memory to store instructions that, when executed by the processing device, cause the processing device to:

provide a plurality of source code samples to an artificial intelligence model (AIM) trained to describe source code based on performing semantic analysis on the source code;

produce, using the AIM, a plurality of semantic descriptions that describe the plurality of source code samples;

convert the plurality of semantic descriptions into a plurality of semantic embeddings; and

create a plurality of clusters from the plurality of semantic embeddings, wherein each one of the plurality of clusters corresponds to two or more of the plurality of source code samples.

9 . The system of claim 8 , wherein each one of the plurality of semantic descriptions describe a functionality of a corresponding one of the plurality of source code samples.

10 . The system of claim 8 , wherein, responsive to executing the instructions, further causes the system to:

provide the plurality of source code samples to a plurality of clustering paths, wherein the plurality of semantic descriptions, the plurality of semantic embeddings, and the plurality of clusters correspond to a first clustering path in the plurality of clustering paths;

produce, by each of the plurality of clustering paths, a plurality of different clusters based on a cluster type of their corresponding clustering path; and

re-rank and merge the plurality of clusters with the plurality of different clusters to produce a plurality of final clusters.

11 . The system of claim 10 , wherein the plurality of clustering paths comprise a semantic clustering path, an agnostic clustering path, a label informed clustering path, and a task/label informed clustering path.

12 . The system of claim 10 , wherein, responsive to executing the instructions, further causes the system to:

generate a plurality of cluster plots from the plurality of clusters and the plurality of different clusters;

identify a discrepant cluster plot from the plurality of cluster plots that is misaligned from the remaining plurality of cluster plots;

identify a first clustering path from the plurality of clustering paths that corresponds to the discrepant cluster plot; and

retrain the first clustering path.

13 . The system of claim 10 , wherein the plurality of final clusters comprise a first final cluster, and wherein, responsive to executing the instructions, further causes the system to:

identify a group of source code samples from the plurality of source code samples that correspond to the first final cluster;

evaluate a subset of the group of source code samples to determine whether the group of source code samples indicate a cybersecurity threat; and

quarantine the group of source code samples in response to determining that the subset of source code samples indicate the cybersecurity threat.

14 . The system of claim 8 , wherein, responsive to executing the instructions, further causes the system to:

train the AIM by providing training source code, training source code descriptions, and one or more cybersecurity threat indicators to the AIM, wherein the one or more cybersecurity threat indicators identify one or more cybersecurity threats in the training source code.

15 . A non-transitory computer readable medium, having instructions stored thereon which, when executed by a processing device, cause the processing device to:

provide a plurality of source code samples to an artificial intelligence model (AIM) trained to describe source code based on performing semantic analysis on the source code;

produce, using the AIM, a plurality of semantic descriptions that describe the plurality of source code samples;

convert the plurality of semantic descriptions into a plurality of semantic embeddings; and

create a plurality of clusters from the plurality of semantic embeddings, wherein each one of the plurality of clusters corresponds to two or more of the plurality of source code samples.

16 . The non-transitory computer readable medium of claim 15 , wherein each one of the plurality of semantic descriptions describe a functionality of a corresponding one of the plurality of source code samples.

17 . The non-transitory computer readable medium of claim 15 , wherein the processing device is to:

provide the plurality of source code samples to a plurality of clustering paths, wherein the plurality of semantic descriptions, the plurality of semantic embeddings, and the plurality of clusters correspond to a first clustering path in the plurality of clustering paths;

produce, by each of the plurality of clustering paths, a plurality of different clusters based on a cluster type of their corresponding clustering path; and

re-rank and merge the plurality of clusters with the plurality of different clusters to produce a plurality of final clusters.

18 . The non-transitory computer readable medium of claim 17 , wherein the plurality of clustering paths comprise a semantic clustering path, an agnostic clustering path, a label informed clustering path, and a task/label informed clustering path.

19 . The non-transitory computer readable medium of claim 17 , wherein the processing device is to:

generate a plurality of cluster plots from the plurality of clusters and the plurality of different clusters;

identify a discrepant cluster plot from the plurality of cluster plots that is misaligned from the remaining plurality of cluster plots;

identify a first clustering path from the plurality of clustering paths that corresponds to the discrepant cluster plot; and

retrain the first clustering path.

20 . The non-transitory computer readable medium of claim 17 , wherein the plurality of final clusters comprise a first final cluster, and wherein the processing device is to:

identify a group of source code samples from the plurality of source code samples that correspond to the first final cluster;

evaluate a subset of the group of source code samples to determine whether the group of source code samples indicate a cybersecurity threat; and

quarantine the group of source code samples in response to determining that the subset of source code samples indicate the cybersecurity threat.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 27, 2023
From: MONEA, DAMIAN; SUMEDREA, PAUL; GAMAN, MIHAELA-PETRUTA; DINU, ALEXANDRU
To: CROWDSTRIKE, INC.
Reel/Frame 065377/0447 →
Continuity (1)
Related Publication 20250138819A1 · May 1, 2025
References Cited (4)
US 11615184B2 · Kutt · 2023 [cited by examiner]
US 11947940B2 · Suneja · 2024 [cited by examiner]
Monigatti, Leonie, “10 Exciting Project Ideas Using Large Language Models (LLMs) for Your Portfolio”, Towards Data Science, downloaded from https://towardsdatascience.com/10-exciting-project-ideas-using-large-language-m… [cited by applicant]
Tyagi, Aayush, “10 Exciting Projects on Large Language Models (LLM)”, downloaded from https://www.analyticsvidhya.com/blog/2023/05/projects-on-llm/#h-clustering-and-classifi, updated on Jun. 27, 2023, 8 pp total. [cited by applicant]