Token Vector Encoding with Repetition Count for NLP

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing natural language processing methods using neural networks fail to effectively account for token repetition, leading to vulnerabilities in handling repeated sequences, as they do not consider the historical output when determining positional encoding, resulting in potential repetition of outputs.

Innovation Solution

A processor-implemented method that converts natural language phrases into token vectors, calculates repetition counts, and generates input vectors by encoding these vectors based on both repetition counts and positional information, using sinusoidal functions and learnable matrices to enhance positional encoding and account for token history.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If existing positional encoding is used without considering token history, then the implementation is simple, but the model produces repeated outputs and fails to identify token order properly

Engineering Contradiction:
Improveoutput accuracyVSAvoidencoding complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent combines repetition count encoding with positional encoding to create a unified encoding scheme. The repetition count is integrated into the positional encoding process, allowing the model to simultaneously capture both the position of tokens and how many times they have been repeated, thereby improving output accuracy without requiring separate encoding mechanisms

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent calculates repetition counts in advance before feeding tokens into the neural network. By pre-computing how many times each token has appeared and incorporating this information into the positional encoding beforehand, the model can better distinguish between repeated tokens and maintain output accuracy without adding computational complexity during the main processing phase

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If repetition count encoding is added to positional encoding, then the model can handle repeated tokens better, but the encoding process becomes more complex

Engineering Contradiction:
Improvetoken repetition handlingVSAvoidencoding process complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the encoding process into distinct components: positional encoding and repetition count encoding. By separating these functions and then combining them, the system can handle repeated tokens more effectively while maintaining a clear and organized encoding process that doesn't excessively increase overall complexity

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The unified encoding scheme serves multiple functions simultaneously: it encodes token position, tracks repetition counts, and provides historical context to the neural network. This multi-functional encoding approach improves adaptability to repeated tokens without requiring multiple separate encoding mechanisms, thereby limiting the increase in encoding process complexity

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

Data Source

PatentUS11249756B2Natural language processing method and apparatus
Publication Date: 2022.02.15 SAMSUNG ELECTRONICS CO LTD
  • US11249756B2 patent drawing
  • US11249756B2 patent drawing
  • US11249756B2 patent drawing

AI summary

A processor implemented natural language processing method and apparatus are provided. The natural language processing method includes converting a natural language phrase into a token vector, calculating a repetition count of the token vector, and generating an input vector by encoding the token vector based on the calculated repetition count and a position of the token vector.