Text Classification Model Adversarial Robustness via Embedding Space Regions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing techniques for training text classification machine learning models are inadequate in making them robust against adversarial attacks, particularly in determining and utilizing a region in the embedding space for text inputs, which is more challenging than for image inputs due to the discrete nature of text data.

Innovation Solution

The system generates perturbed text samples by modifying training text samples with synonyms or minor typos, determines a region in the embedding space occupied by these perturbed samples, and trains the model to assign the target classification to all feature representations within this region, ensuring robustness against similar but unseen text samples.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the model is trained only on exact training text samples, then training simplicity is maintained, but robustness to adversarial attacks deteriorates

Engineering Contradiction:
Improverobustness to adversarial attacksVSAvoidtraining process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system performs preliminary actions by generating perturbed text samples during the training phase. Adversarial examples are created in advance by applying various perturbations (synonym replacement, random insertion, random deletion, random swapping) to training samples. The model is trained on both original and perturbed samples, preparing it beforehand to handle adversarial attacks during deployment without requiring complex runtime defenses.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If perturbed text samples are generated using multiple perturbation techniques, then robustness to adversarial behavior is improved, but training time and computational resources increase

Engineering Contradiction:
Improverobustness to adversarial behaviorVSAvoidtraining time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system applies multiple perturbation techniques (synonym replacement, random insertion, random deletion, random swapping) to generate a comprehensive set of adversarial examples. By performing excessive perturbation actions during training, the model learns to robustly classify text samples under various attack scenarios. The training process iterates through multiple epochs with different perturbation strengths, ensuring thorough coverage of adversarial possibilities.

Inventive Principle:
Principle #16Partial or excessive action

3Adaptability or versatility

If the model is trained to recognize only seen text samples, then training data requirements are minimized, but ability to classify unseen adversarial samples deteriorates

Engineering Contradiction:
Improveability to classify unseen text samplesVSAvoidtraining data volume
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The training process segments the learning task by separately handling original text samples and perturbed adversarial samples. The model learns distinct patterns from both segments, with the perturbed segment teaching robustness to variations. This segmentation allows the model to generalize from limited training data by understanding the underlying semantics rather than memorizing exact sample patterns.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11847414B2Robustness to adversarial behavior for text classification models
Publication Date: 2023.12.19 GDM HOLDING LLC
  • US11847414B2 patent drawing
  • US11847414B2 patent drawing
  • US11847414B2 patent drawing

AI summary

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for training a text classification machine learning model. One of the methods includes training a model having a plurality of parameters and configured to generate a classification of a text sample comprising a plurality of words by processing a model input that includes a combined feature representation of the plurality of words in the text sample, wherein the training comprises receiving a text sample and a target classification for the text sample; generating a plurality of perturbed combined feature representations; determining, based on the plurality of perturbed combined feature representations, a region in the embedding space; and determining an update to the parameters based on an adversarial objective that encourages the model to assign the target classification for the text sample for all of the combined feature representations in the region in the embedding space.