Profanity Detection Using Multi-Attention CLS Token Fusion
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional profanity detection technologies have low sensitivity for detecting deformed profanity, limiting their effectiveness in virtual communication spaces.
Innovation Solution
A deep learning-based method using a neural network model with multiple attention layers to derive a final token by averaging, combining, or applying weights to CLS tokens, enhancing sensitivity for deformed profanity detection.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If only the result of the last attention is used to determine profanity presence, then the system is simple to implement, but the detection sensitivity for deformed profanity is low
Solution Approach 1:
The patent merges the results of multiple attention layers by combining their CLS tokens through averaging, max, or other aggregation methods. This allows the system to leverage information from all attention layers rather than relying on only the last layer, thereby improving detection sensitivity for deformed profanity while maintaining a relatively simple implementation structure.
Solution Approach 2:
The patent transitions from using a single-dimensional approach (last attention layer only) to a multi-dimensional approach by incorporating results from multiple attention layers. Each attention layer provides a dimension of information about the profanity detection process, and combining these dimensions improves the overall detection capability without significantly increasing complexity.
2Measurement precision
If multiple attention layers are used to analyze embedded data, then the detection accuracy improves, but the computational complexity increases
Solution Approach 1:
The patent extracts and focuses on the CLS token from each attention layer, which is a specific representation that summarizes the attention mechanism's output. By extracting only these key representations rather than processing all intermediate data, the system achieves improved detection accuracy while controlling computational complexity.
Solution Approach 2:
The patent segments the neural network into multiple attention layers, each processing a specific portion of the input embedded data. This segmentation allows the system to handle complex detection tasks by dividing them into manageable sub-tasks, improving overall accuracy without creating an unmanageably complex model.
Data Source
AI summary
A method for detecting profanity according to an embodiment is performed in a computing device that includes one or more processors and a memory storing one or more programs executed by the one or more processors includes acquiring sequence data converted from a sentence input by a user, and generating embedded data containing one or more tokens by embedding the acquired sequence data, and training a neural network model to output information on whether the sentence contains profanity by inputting the generated embedded data into the neural network model.


