Attribute-Guided Text Perturbation for Contrastive Explanations

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing natural language processing systems lack the ability to effectively alter text while preserving semantic structure and fluency, particularly in perturbing text to highlight attribute changes and detect biases in classification models.

Innovation Solution

A system and method that uses a processor to generate perturbed text by determining classifications, applying masks to important words, and selecting perturbations based on edit distance and fluency metrics, utilizing a classifier model and language model like BERT to ensure semantic and grammatical coherence.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If text is perturbed by changing words to alter classifications, then attribute changes are highlighted and biases can be detected, but semantic structure and fluency may be compromised

Engineering Contradiction:
Improveattribute change detectionVSAvoidsemantic structure preservation
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The system uses a language model to evaluate the fluency of perturbed text and provides feedback to guide the selection of perturbations. The fluency metric acts as feedback to ensure that only perturbations maintaining acceptable semantic coherence are selected, thus resolving the contradiction between highlighting attribute changes and preserving semantic structure.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system changes parameters of the text (word substitutions) while controlling the degree of change through edit distance metrics. By adjusting the perturbation strength and selecting from multiple candidate perturbations with varying edit distances, the system can highlight attribute changes while maintaining semantic structure through controlled parameter modification.

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If multiple perturbations are generated and evaluated, then more accurate classification and bias detection are achieved, but computational complexity increases

Engineering Contradiction:
Improveclassification accuracyVSAvoidcomputational complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The system generates multiple perturbations but selects only the top-k perturbations based on fluency metrics and edit distance, rather than evaluating all possible perturbations. This partial action approach achieves accurate classification and bias detection while limiting computational complexity by focusing on the most promising candidates.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system uses pre-trained language models and classification models that can be efficiently queried multiple times. Rather than building complex custom models, the system leverages existing models as disposable computational resources that can be rapidly invoked for each perturbation evaluation, reducing overall computational complexity.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

3Reliability

If edit distance and fluency metrics are used to select perturbations, then semantic coherence is maintained, but the selection process becomes more complex

Engineering Contradiction:
Improvesemantic coherenceVSAvoidselection process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system uses a multi-functional selection process that simultaneously evaluates edit distance, fluency metrics, and classification changes through a unified objective function. This universal approach maintains semantic coherence while managing selection complexity by combining multiple criteria into a single ranked list of perturbations.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS12406140B2System and method for generating contrastive explanations for text guided by attributes
Publication Date: 2025.09.02 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12406140B2 patent drawing
  • US12406140B2 patent drawing
  • US12406140B2 patent drawing

AI summary

A method, computer program product and system are provided to generate perturbed text is provided. A processor receives a string of text from a user. A processor determines one or more classifications for at least one word in the string of text by a classification model. A processor determines a plurality of perturbations of the at least one word based on the one or more classifications, where the plurality of perturbations do not share the same one or more classifications as the at least one word in the string of text. A processor selects a perturbation of the string of text based on (i) an edit distance between the string of text and the plurality of perturbations, and (ii) a fluency metric for each of the plurality of perturbations. A processor provides the perturbation of the string of text to the user.