Sarcasm Detection via Attention Weights and GRU

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing models for detecting sarcasm in batches of text lack both high performance and interpretability, as they either rely on hand-crafted features that are not generalizable or deep learning models that are not interpretable.

Innovation Solution

A method using a multi-head self-attention architecture that converts text into aspect embeddings, which are then processed through a tokenizer, multi-head self-attention module, gated recurrent unit (GRU), and classification module to predict the tone of the text, including detection of sarcasm.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If hand-crafted features (Bag of Words, Parts of Speech, sentiment/emotions) are used to train classifiers, then the features are easily interpretable by subsequent users, but they lack high performance compared to deep learning-based models

Engineering Contradiction:
ImproveinterpretabilityVSAvoidperformance
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent introduces an attention mechanism as an intermediary layer between the deep learning model and the output. This attention mechanism computes attention weights that indicate the importance of each input token, providing an interpretable bridge that connects the complex deep learning model to human-understandable feature importance rankings, thereby maintaining high performance while improving interpretability

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the traditional mechanical feature engineering process (hand-crafted features) with a learned feature representation system using embeddings and attention mechanisms. This substitution allows the model to automatically learn relevant features from raw text while providing attention-based interpretability, achieving both high performance and ease of operation

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Reliability

If deep learning-based models (neural networks) are used to learn lexical and contextual features, then high performance is achieved, but they lack interpretability since it is not evident which data points received higher weight

Engineering Contradiction:
ImproveperformanceVSAvoidinterpretability
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The attention mechanism serves as an intermediary that translates the internal representations of the deep learning model into interpretable attention weights. These weights are computed based on the relevance between query and key vectors, providing a natural and explainable indication of which input tokens influenced the prediction most strongly

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent visualizes attention weights using color-coded representations (e.g., heatmaps or colored tokens), where different colors indicate different levels of attention. This visual encoding makes the interpretability of deep learning models intuitive and easily understandable, allowing users to see which tokens received higher attention weights at a glance

Inventive Principle:
Principle #32Color changes

3Reliability

If hand-crafted features are custom-designed for a particular batch of text, then the features work well for that specific dataset, but they cannot generalize in the presence of informal language and figurative slang widely used in online conversations

Engineering Contradiction:
Improveeffectiveness on specific datasetVSAvoidgeneralizability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent employs universal pre-trained language models (such as BERT, GPT, or other contextualized embeddings) that have been trained on large corpora of diverse text. These models provide a universal feature representation that adapts to different domains, languages, and text styles (including informal language and slang) while maintaining effectiveness across multiple datasets without requiring custom feature engineering for each specific case

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

Data Source

PatentUS12210833B2System of and method for automatically detecting sarcasm of a batch of text
Publication Date: 2025.01.28 UNIVERSITY OF CENTRAL FLORIDA RESEARCH FOUNDATION INC
  • US12210833B2 patent drawing
  • US12210833B2 patent drawing
  • US12210833B2 patent drawing

AI summary

Described, herein, relates to a system and method of accurately and efficiently detecting a tone of a batch of text that achieves both high performance and interpretability by leveraging a multi-head self-attention architecture. The presence of a tone in a batch of text provides a challenge to the performance of a sentiment analysis, since there is an inherent ambiguity in sarcastic expressions that makes sarcasm detection difficult through purely text-based interactions. As such, the multi-head self-attention architecture includes distinct components of routing data through modules comprising data pre-processing, multi-head self-attention, gated recurrent units, and classification, resulting in a modeling system with improved interpretability and accuracy.