Unicode Prompt Obfuscation Detection for GenAI Security

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for protecting large language models and other generative AI systems from cyberattacks are ineffective against attacks that obfuscate prompts using unicode, such as unicode font obfuscation, invisible unicode injections, and GNOY attacks.

Innovation Solution

A system that receives prompts for a generative AI model, tokenizes them, identifies and removes repeating sequences, and then determines whether ingestion by the AI model will result in undesired behavior. If not, the modified prompt is passed to the model; otherwise, remediation actions are initiated.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Object-affected harmful factors

If unicode obfuscation is used in prompts, then the attack can bypass existing security measures, but the model becomes vulnerable to manipulation

Engineering Contradiction:
Improvevulnerability to prompt injection attacksVSAvoidmodel behavior reliability
Core Design Contradiction:
Object-affected harmful factorsVSReliability

Solution Approach 1:

The system performs preliminary analysis of prompts before they are processed by the GenAI model. By detecting unicode obfuscation patterns and repeating sequences in advance, the system can prevent malicious prompts from reaching the model, thereby maintaining reliability without requiring the model to be modified

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

An intermediary security layer is introduced between the user input and the GenAI model. This intermediary component analyzes prompts for unicode obfuscation and repeating sequences, acting as a filter that blocks malicious inputs while allowing legitimate requests to pass through to the model

Inventive Principle:
Principle #24Intermediary (Mediator)

2Difficulty of detecting and measuring

If tokenization and sequence removal are applied to prompts, then attack detection capability is improved, but processing complexity increases

Engineering Contradiction:
Improveattack detection capabilityVSAvoidprompt processing complexity
Core Design Contradiction:
Difficulty of detecting and measuringVSDevice complexity

Solution Approach 1:

The prompt processing is segmented into distinct stages: tokenization, repeated sequence identification, sequence removal, and security analysis. This segmentation allows each stage to be optimized independently and makes the overall complex process more manageable and maintainable

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system extracts and removes repeating sequences from prompts before security analysis. By taking out the redundant unicode characters that form repeating patterns, the system simplifies the prompt structure while preserving the core semantic meaning, making attack detection more effective

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If multiple remediation actions are implemented, then security coverage is improved, but system response time increases

Engineering Contradiction:
Improvesecurity coverageVSAvoidprompt processing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system implements partial remediation actions based on the severity and type of detected attack. Not all prompts require the full suite of remediation actions, allowing the system to balance security coverage with processing speed by applying only necessary measures to each specific case

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS12273381B1Detection of machine learning model attacks obfuscated in unicode
Publication Date: 2025.04.08 HIDDENLAYER INC
  • US12273381B1 patent drawing
  • US12273381B1 patent drawing
  • US12273381B1 patent drawing

AI summary

A prompt for a generative artificial intelligence (GenAI) model which contains unicode is received. The prompt is then tokenized to result in a plurality of tokens. Token forming part of a repeating sequence are identified and then removed to result in a modified set of tokens. The modified set of tokens are subsequently detokenized to result in a modified prompt. It is then determined, whether ingestion of the modified prompt by the GenAI model will result in the GenAI model behaving in an undesired manner. The modified prompt is passed to the GenAI model when it is determined that ingestion of the modified prompt will not result in the GenAI model behaving in an undesired manner. Otherwise, at least one remediation action is initiated when it is determined that ingestion of the modified prompt by the GenAI model will result in the GenAI model behaving in an undesired manner.