Text Generation Using Self-Attention and Placeholders

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional natural language processing methods suffer from exposure deviation and low decoding accuracy due to error propagation during the prediction of subsequent words based on previously predicted words.

Innovation Solution

A method and apparatus that utilize a self-attention mechanism to generate text by obtaining a vector representation of a word to be predicted, which is calculated using a placeholder and the source text along with previous predicted words, thereby reducing the impact of errors in previous predictions and improving decoding accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If conventional methods predict following words based on previously predicted words, then the decoding process can proceed sequentially, but error propagation occurs leading to exposure deviation and low decoding accuracy

Engineering Contradiction:
Improvedecoding speedVSAvoiddecoding accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent introduces a placeholder as an intermediary element that represents the current word being predicted without directly using the potentially erroneous previous predicted word. This placeholder acts as a buffer that prevents error propagation from affecting the current prediction, thereby maintaining decoding accuracy while preserving sequential processing capability

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments the decoding process into distinct components: using the placeholder mechanism to separate the influence of previous predictions from the current word prediction. This segmentation allows the system to process words sequentially while isolating error propagation through the placeholder barrier

Inventive Principle:
Principle #1Segmentation

2Measurement precision

If error propagation is prevented by not using previous predicted words, then decoding accuracy improves, but the sequential dependency necessary for text generation is lost

Engineering Contradiction:
Improvedecoding accuracyVSAvoidmodel complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The placeholder serves as a minimal-complexity intermediary that maintains sequential dependency without direct error transmission. Instead of completely decoupling predictions or using complex error correction mechanisms, the simple placeholder token provides the necessary isolation with minimal added complexity

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the parameter representation by introducing a special placeholder token that has distinct semantic properties. This parameter change allows the model to distinguish between actual previous words and placeholder positions, enabling accurate prediction without complex structural modifications

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11461549B2Method and apparatus for generating text based on semantic representation, and medium
Publication Date: 2022.10.04 BEIJING BAIDU NETCOM SCI & TECH CO LTD
  • US11461549B2 patent drawing
  • US11461549B2 patent drawing
  • US11461549B2 patent drawing

AI summary

The present disclosure discloses a method and an apparatus for generating a text based on a semantic representation and relates to a field of natural language processing (NLP) technologies. The method for generating the text includes: obtaining an input text, the input text comprising a source text; obtaining a placeholder of an ith word to be predicted in a target text; obtaining a vector representation of the ith word to be predicted, in which the vector representation of the ith word to be predicted is obtained by calculating the placeholder of the ith word to be predicted, the source text and 1st to (i−1)th predicted words by employing a self-attention mechanism; and generating an ith predicted word based on the vector representation of the ith word to be predicted, to obtain a target text.