Large Language Model Query Filtering for Pattern Evasion

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large language models are vulnerable to pattern evasion attacks, allowing malicious queries to bypass framing and obtain unauthorized information, posing a cybersecurity risk, especially for white-box models, which can also affect black-box models.

Innovation Solution

A method and device for securing large language models by filtering initial character strings to detect and replace special characters with spaces, segmenting into fragments, and verifying these fragments against dictionaries and lists of authorized words, deleting unauthorized fragments to ensure the query remains within the intended legal framework.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If pattern evasion attacks are applied to large language models, then unauthorized information can be obtained by bypassing framing, but the model security and reliability deteriorate

Engineering Contradiction:
Improvemodel framing bypass capabilityVSAvoidmodel security
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent applies preliminary action by implementing query preprocessing steps before the query reaches the large language model. The system detects special characters, segments the query into fragments, verifies fragments against dictionaries of authorized words, and modifies unauthorized fragments in advance. This prevents pattern evasion attacks from reaching the model, thereby maintaining security while preserving legitimate model functionality.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If query filtering and fragment verification are implemented, then model security improves, but processing time and device complexity increase

Engineering Contradiction:
Improvemodel securityVSAvoidquery processing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies segmentation by dividing the query into smaller fragments based on special characters and spaces. This allows the system to process and verify each fragment independently against dictionaries of authorized words, improving security through comprehensive checking while reducing processing time compared to analyzing the entire query string at once.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary processing layer between the user query and the large language model. This intermediary system performs character detection, fragment segmentation, and dictionary verification as a buffer, blocking malicious queries before they reach the model while maintaining efficient communication for authorized queries.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Object-affected harmful factors

If fragment deletion for unauthorized words is applied, then illegal use is prevented, but authorized fragments may be removed reducing model performance

Engineering Contradiction:
Improveillegal query preventionVSAvoidmodel response accuracy
Core Design Contradiction:
Object-affected harmful factorsVSProductivity

Solution Approach 1:

The patent applies local quality by treating different fragments of the query differently based on their content. Authorized fragments are preserved and passed to the model, while only unauthorized fragments containing special characters or words not in the authorized dictionary are modified or removed. This selective approach prevents illegal use while maintaining the integrity and performance of authorized queries.

Inventive Principle:
Principle #3Local quality

Data Source

PatentEP4575882A1Method and device for securing large language model
Publication Date: 2025.06.25 THALES SA
  • EP4575882A1 patent drawingFigure 1
  • EP4575882A1 patent drawingFigure 2
  • EP4575882A1 patent drawingFigure 3

AI summary

The method for securing a large language model comprises steps of: - acquisition (30) of a query in the form of an initial character string (CH-i), - first filtering (32) of said initial character string to obtain a filtered character string (CH-f), the first filtering comprising a detection of special characters in the initial character string and replacement of each special character detected by a space, - extraction (34, 36) from the filtered character string of at least one fragment formed of a group of characters followed and/or preceded by a space, and verification (38) of a presence of said fragment in a dictionary of authorized words, and - second filtering (40) of the initial character string to obtain a processed character string (CH-T), said second filtering (40) comprising a deletion from the initial character string of said fragments not belonging to said dictionary of authorized words.