Autonomous Agent for LLM Adversarial Defense

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deep neural networks (DNNs), particularly Generative Neural Networks (GNNs) like Large Language Models, are vulnerable to adversarial attacks, which can manipulate inputs to misclassify data, and existing defense mechanisms are often ineffective against sophisticated attacks such as Zeroth Order Optimization and targeted adversarial prompting.

Innovation Solution

An autonomous agent system is introduced that includes a software agent configured to interact with DNNs and data pools, capable of identifying and filtering adversarial examples by employing Generative Adversarial Networks (GANs) and Stochastic Neural Networks (SNNs) to detect and replace poisoned data, thereby enhancing the robustness of DNNs against adversarial attacks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional defense mechanisms are used against adversarial attacks, then the model structure remains simple, but the robustness against sophisticated attacks such as Zeroth Order Optimization and targeted adversarial prompting is insufficient

Engineering Contradiction:
Improverobustness against adversarial attacksVSAvoidmodel structure complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary defense system consisting of multiple components: a prompt injection detector that identifies malicious prompts, a classification system that determines attack types, and a response generator that creates appropriate responses. This intermediary layer sits between the user input and the main LLM, filtering and processing inputs before they reach the core model, thereby improving robustness without fundamentally changing the LLM's internal structure.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system performs preliminary actions by detecting and neutralizing potential adversarial prompts before they can affect the LLM. The prompt injection detector analyzes inputs in advance, and the response generator pre-prevents malicious operations by generating safe responses or blocking harmful requests before they reach the core model, thus protecting the system proactively rather than reactively.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the model uses sophisticated defense mechanisms to improve robustness, then the resistance to adversarial attacks increases, but the computational resources and processing time required increase

Engineering Contradiction:
Improveresistance to adversarial attacksVSAvoidcomputational resources
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The defense system is segmented into distinct functional modules: a prompt injection detector module, a classification module, and a response generator module. Each module handles a specific aspect of the defense task independently, allowing the system to process inputs through multiple stages with varying computational intensity. This segmentation enables the system to apply heavy computational resources only where needed while using lighter processing for routine cases.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system applies partial defense actions by selectively analyzing prompts based on their characteristics and potential threat level. Not all inputs require full-depth analysis; the system can use lighter detection methods for obviously benign prompts and reserve comprehensive analysis for suspicious inputs, thus reducing overall computational burden while maintaining effective defense.

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If the system implements comprehensive adversarial detection and filtering, then the accuracy of classifications improves, but the speed of processing decreases

Engineering Contradiction:
Improveclassification accuracyVSAvoidprocessing speed
Core Design Contradiction:
Measurement precisionVSSpeed

Solution Approach 1:

The system implements periodic action by processing inputs through multiple stages in a sequential manner, where each stage performs specific detection and filtering functions. The prompt injection detector operates continuously to identify malicious patterns, followed by periodic classification and response generation. This staged, periodic processing allows the system to maintain high accuracy through thorough analysis while managing processing speed through efficient stage transitions.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

By performing preliminary detection and classification actions before the main processing stage, the system filters out obviously malicious inputs early, allowing the core LLM to focus computational resources only on inputs that require full analysis. This preliminary action reduces the overall processing time for malicious inputs while maintaining high accuracy for legitimate classifications.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20250021653A1Defenses for Large Language Models
Publication Date: 2025.01.16 SEN ROBI
  • US20250021653A1 patent drawing
  • US20250021653A1 patent drawing
  • US20250021653A1 patent drawing

AI summary

An autonomous intelligent agent operates in a distributed computing environment to analyze data collected from a data pool, wherein the data collection is performed in a manner that is independent of activities of a deep-learning neural network (DNN) that fetches data from the data pool. A computer processor circuit implementing the agent comprises at least one generative adversarial neural network (GNN) and at least one Stochastic Neural Network (SNN). The agent retrieves original data from a data pool; uses the SNN to add noise to multiple evaluations of the original data; from the multiple evaluations, determines a proximity of the original data to a decision boundary; based on the proximity, determines if the original data is adversarial; upon determining that the original data is adversarial, employs the GNN to fabricate benign data from the original data; and then replaces the original data in the data pool with the benign data.