Text Classification with Attention Weights for Explainability

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The reliability of text classification results outputted by deep learning models is not sufficiently high in existing technologies, leading to inconsistent and unexplainable outcomes.

Innovation Solution

A text classification method and apparatus that utilize an attention mechanism to process feature information, determining attention weights for each feature and providing class detection results with accompanying interpretation information, which includes class distribution probabilities and feature impact analysis, thereby improving the reliability and explainability of the classification process.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If deep learning model is used for text classification, then classification capability is improved, but reliability of classification result deteriorates

Engineering Contradiction:
Improveclassification capabilityVSAvoidreliability of classification result
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces a feedback mechanism where the attention weights generated by the attention mechanism are used to interpret and validate the classification results. The system continuously adjusts and optimizes the classification by incorporating the importance weights of different features, creating a closed-loop system that improves reliability through self-validation and iterative refinement.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The attention mechanism serves as an intermediary between the deep learning model and the classification output. It introduces attention weights as a mediating element that explains which features contributed most to the classification decision, thereby bridging the gap between complex model processing and reliable, interpretable results.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If deep learning model processes text classification, then classification speed is improved, but explainability of result deteriorates

Engineering Contradiction:
Improveclassification speedVSAvoidexplainability of result
Core Design Contradiction:
ProductivityVSLoss of information

Solution Approach 1:

The attention mechanism acts as an intermediary that preserves and communicates the reasoning process. It generates attention weights that serve as explanatory information, allowing the system to maintain high processing speed while providing insight into which features influenced the classification decision.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The attention weights can be visualized as a form of 'color coding' or highlighting that indicates the importance of different features. This visualization approach makes the classification process transparent and explainable without slowing down the processing, as the attention weights are generated simultaneously with the classification output.

Inventive Principle:
Principle #32Color changes

3Device complexity

If traditional text classification method is used, then simplicity is maintained, but reliability of result deteriorates

Engineering Contradiction:
Improvesimplicity of methodVSAvoidreliability of classification result
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent merges the simplicity of traditional text classification with the power of deep learning by integrating the attention mechanism into the classification pipeline. This combination allows the system to maintain ease of use while incorporating advanced features that improve reliability through attention-weighted feature processing.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS12182191B2Text classification method and apparatus, device, and computer-readable storage medium
Publication Date: 2024.12.31 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • US12182191B2 patent drawing
  • US12182191B2 patent drawing
  • US12182191B2 patent drawing

AI summary

A text classification method includes: obtaining a target text and an associated text corresponding to the target text; performing feature extraction on the target text and the associated text to obtain feature information, the feature information including one or more features; processing the feature information by using an attention mechanism to obtain one or more attention weights respectively corresponding to the one or more features, an attention weight indicating importance of the corresponding feature for the target text and the associated text; and obtaining a class detection result and result interpretation information corresponding to the target text based on the feature information and the one or more attention weights, the class detection result comprising a class distribution probability corresponding to the target text, and the result interpretation information describing impact of the one or more features on the class detection result.