Determining anomalous tool invocations by applications using large generative models
Abstract
This disclosure relates to utilizing a threat detection system to detect anomalous actions provided by a compromised large generative language model (LLM). For instance, the threat detection system utilizes a detection-based large generative model to process select communication between an application system and the LLM and determine when the LLM may have been potentially compromised. In various implementations, utilizing the detection-based large generative model, the threat detection system determines when an LLM is improperly instructing an application system to invoke tools to perform unapproved actions. Furthermore, when an LLM becomes compromised, the threat detection system intelligently safeguards the detection-based large generative model against similar threats that seek to evade detection or compromise the detection-based large generative model.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 9 · Forward citations: 3.
Claims (20 — 3 Independent, 17 Dependent)
- Claim 1Independent Claim
A computer-implemented method for detecting anomalous application actions, comprising: identifying a first application request from an application to a large generative language model, the first application request including a system prompt and a user prompt; obtaining a first output from the large generative language model provided to the application that instructs the application to perform a first action; in response to the application performing the first action and providing a second application request to the large generative language model, obtaining a second output from the large generative language model instructing the application to perform a second action; determining that the second output from the large generative language model is anomalous based on using a detection-based large generative model to classify the second output; and preventing the application from performing the second action based on determining that the second output is anomalous.
- Claim 2Depends on #1
The computer-implemented method of claim 1, wherein the detection-based large generative model does not receive the second application request that the application provides to the large generative language model.
- Claim 3Depends on #1
The computer-implemented method of claim 1, further comprising determining that the first output from the large generative language model is non-anomalous by using the detection-based large generative model to classify the first output based on the system prompt, the user prompt, and the first output.
- Claim 4Depends on #1
The computer-implemented method of claim 1, wherein using the detection-based large generative model to determine that the second output from the large generative language model is anomalous includes: providing the first application request including the system prompt and the user prompt, the first output, and the second output to the detection-based large generative model; and not providing the second application request to the detection-based large generative model.
- Claim 5Depends on #1
The computer-implemented method of claim 1, wherein: the application receives external content from an external source in response to performing the first action included in the first output from the large generative language model; and the application provides the external content to the large generative language model with the second application request.
- Claim 6Depends on #5
The computer-implemented method of claim 5, wherein the external content includes an indirect prompt injection attack to exploit a vulnerability of the large generative language model.
- Claim 7Depends on #6
The computer-implemented method of claim 6, wherein: the first application request also includes tools available to the application; the first action includes utilizing a first tool from the tools to get the external content from the external source; and the detection-based large generative model determines that the first output is non-anomalous based on the tools and the first action.
- Claim 8Depends on #7
The computer-implemented method of claim 7, wherein: the second action includes utilizing a second tool from the tools to access privately stored data; and the detection-based large generative model determines that the second output is anomalous based on the tools, the first action, and the second action.
- Claim 9Depends on #7
The computer-implemented method of claim 7, further comprising preventing future access to the external source by the application based on classifying the external source as a threat.
- Claim 10Depends on #1
The computer-implemented method of claim 1, wherein the second application request also includes tools available to the application.
- Claim 11Depends on #1
The computer-implemented method of claim 1, further comprising notifying the application not to perform the second action based on determining that the second output is anomalous.
- Claim 12Depends on #1
The computer-implemented method of claim 1, wherein the application and the detection-based large generative model are both within a same cloud computing system.
- Claim 13Depends on #12
The computer-implemented method of claim 12, further comprising blocking the application from performing the second action based on determining that the second output is anomalous.
- Claim 14Independent Claim
A computer-implemented method for detecting anomalous application actions, comprising: identifying a first application request from an application to a large generative language model, the first application request including a system prompt and a user prompt; obtaining a first output from the large generative language model provided to the application that instructs the application to perform a first action; in response to the application performing the first action and providing a second application request to the large generative language model, obtaining a second output from the large generative language model instructing the application to perform a second action; determining that the second output from the large generative language model is anomalous based on using a detection-based machine-learning model to classify the second output; and notifying the application to not perform the second action based on determining that the second output is anomalous.
- Claim 15Depends on #14
The computer-implemented method of claim 14, wherein the detection-based machine-learning model is located within a cloud security system that is a separate entity from a cloud computing system that implements the application.
- Claim 16Depends on #14
The computer-implemented method of claim 14, wherein the detection-based machine-learning model and the application are implemented within a cloud computing system.
- Claim 17Depends on #16
The computer-implemented method of claim 16, further comprising preventing the application from performing the second action based on determining that the second output is anomalous.
- Claim 18Depends on #14
The computer-implemented method of claim 14, wherein the detection-based machine-learning model is a large generative model trained to detect anomalous actions by the application.
- Claim 19Independent Claim
A system for detecting anomalous application actions, the system comprising: a processing system; and a computer memory comprising instructions that, when executed by the processing system, cause the system to perform operations of: identifying a first application request from an application to a large generative language model, the first application request including a system prompt, a user prompt, and tools available to the application; obtaining a first output from the large generative language model provided to the application that instructs the application to perform a first action with a first tool from the tools; in response to the application performing the first action with the first tool and providing a second application request to the large generative language model, obtaining a second output from the large generative language model instructing the application to perform a second action; determining that the second output from the large generative language model is anomalous based on using a detection-based large generative model to classify the second output; and preventing the application from performing the second action based on determining that the second output is anomalous.
- Claim 20Depends on #19
The system of claim 19, wherein the detection-based large generative model does not receive the second application request that the application provides to the large generative language model.
Technical Overview & Description
BACKGROUND The landscape of computational devices has witnessed substantial progress in both hardware and software domains, with a particular focus on the deployment of generative artificial intelligence (AI) models for executing tasks. The enhanced capabilities of these models have led to their widespread adoption across various systems and applications. However, many generative AI models still include vulnerabilities, which are increasingly being targeted by malicious entities. For example, threat actors are exploiting weak points in generative AI models to manipulate and misuse them. Furthermore, threat actors are finding ways to leverage these vulnerabilities to compromise the integrity of systems and applications linked to these models. BRIEF DESCRIPTION OF THE DRAWINGS The following detailed description provides specific and detailed implementations accompanied by drawings. Additionally, each of the figures listed below corresponds to one or more implementations discussed in this disclosure. FIG. 1 illustrates an example overview of the threat detection system using a detection-based large generative model to detect anomalous outputs and prevent applications for performing anomalous actions. FIG. 2 illustrates an example computing environment where the threat detection system is implemented. FIGS. 3 A- 3 B illustrate an example sequence diagram of using a detection-based large generative model to detect a large generative language model providing anomalous directions to an application system that invokes tools. FIG. 4 illustrates an example diagram of generating a detection-based large generative model to determine anomalous and non-anomalous classifications for large generative language model outputs. FIGS. 5 A- 5 B illustrate example diagrams of using the detection-based large generative model to determine anomalous and non-anomalous large generative language model output classifications. FIG. 6 illustrates an example series of acts of a computer-implemented
Cited By — Indexed Forward Citations (3 of 3 total)
References Cited — Backward Prior Art (9)
Non-Patent Literature (10)
- Armstrong, et al.,
- “
- Using GPT-Eliezer against ChatGPT Jailbreaking
- —
- AI Alignment Forum
- ”
- , Retrieved from URL: https://www.alignmentforum.org/posts/pNcFYZnPdXyL2RfgA/using-gpt-eliezer-against-chatgpt-jailbreaking, Dec. 6, 2022, pp. 1-18.
- International Search Report and Written Opinion received for PCT Application No. PCT/US2024/051687, mailed on Feb. 5, 2025, 13 pages.
- Phute, et al.,
- “