NLP Classification Against Character Swap Encoding Attacks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current dictionary-based methods for detecting cyberattacks in text-based electronic messages are unreliable against character swap attacks where characters are visually equivalent but swapped, disrupting effective classification.

Innovation Solution

A system and method that utilizes a similarity probability engine to generate a distribution of text similarity probabilities for characters likely to be swapped, creating a synthetic training corpus to train NLP models for robust classification, identifying and neutralizing character swap attacks without additional processing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If dictionary-based text detection methods are used, then text classification can be performed efficiently, but the system becomes vulnerable to character swap attacks where visually equivalent characters disrupt detection accuracy

Engineering Contradiction:
Improvetext classification efficiencyVSAvoiddetection accuracy under character swap attacks
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary action by generating a distribution of text similarity probabilities for characters likely to be swapped before the actual classification task. This pre-computed distribution is then applied to the true text corpus to create a synthetic training corpus that anticipates potential character swap attacks, enabling the NLP model to be trained on adversarial examples in advance.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The invention transitions from traditional character-level or word-level text analysis to a new dimension by incorporating visual similarity probability distributions across different character encodings. This dimensional shift allows the system to consider characters from multiple encoding schemes simultaneously, creating a more robust feature space that captures visual equivalence relationships between characters from different languages or encoding systems.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Measurement precision

If traditional NLP models are trained on standard text corpora, then classification accuracy is maintained for normal text, but the models fail to detect character swap attacks that preserve visual appearance

Engineering Contradiction:
Improveclassification accuracy for normal textVSAvoiddetection capability against character swap attacks
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The system creates copies of the true text corpus by substituting characters with visually equivalent alternatives identified through the similarity probability distribution. These synthetic copies form a training corpus that mirrors real-world character swap attacks, allowing the NLP model to learn detection patterns without requiring actual attack data.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The invention changes the training parameters by incorporating character similarity probability distributions into the model training process. Instead of training on static text corpora, the system dynamically generates training examples by substituting characters based on their visual similarity probabilities, fundamentally altering the parameter space the model learns from.

Inventive Principle:
Principle #35Parameter changes

3Ease of manufacture

If character swap attacks are not anticipated during training, then model training is simpler and faster, but the system cannot neutralize attacks that use visually equivalent characters from different encodings

Engineering Contradiction:
Improvemodel training simplicityVSAvoidattack neutralization capability
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The system applies preliminary anti-action by proactively generating synthetic training data that incorporates character swap patterns before the model is deployed. By pre-computing the distribution of text similarity probabilities and applying it to create adversarial training examples, the system prepares the model to resist character swap attacks without requiring complex post-deployment defenses.

Inventive Principle:
Principle #9Preliminary anti-action

Data Source

PatentUS12585765B2System and method for robust natural language classification under character encoding
Publication Date: 2026.03.24 BARRACUDA NETWORKS INC
  • US12585765B2 patent drawing
  • US12585765B2 patent drawing

AI summary

A new approach is proposed to support robust natural language classification under character encoding. A plurality of images that represent a plurality of characters under various language encoding schemes for a target language character are accepted and utilized to create a distribution of text similarity probabilities for the plurality of characters likely to be swapped/replaced/substituted with the target language character to trick a human user. The distribution of text similarity probabilities is then applied against a true text corpus comprising a set of real/actual texts to generate a synthetic text corpus that further includes a set of characters being swapped with one or more of the plurality of characters based on the distribution of text similarity probabilities. The synthetic text corpus is then utilized to train one or more NLP models, which are then utilized to correctly classify and recognize an incoming electronic message that contains a character swap attack.