Split Self-Attention Model for Stable NLP Training

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing self-attention mechanisms in machine learning models fail to effectively leverage the distinct relationships between on- and off-diagonal components in the self-attention matrix, leading to issues with training stability and task optimization due to the use of a single parameter matrix for both.

Innovation Solution

Implementing a split self-attention approach with separate learnable parameters for on- and off-diagonal attention components, using two sets of keys and values initialized differently based on whether the query position is equal or unequal to the key position, to prioritize the importance of diagonal elements.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If a single parameter matrix is used for both on- and off-diagonal attention components, then the model structure remains simple, but training stability deteriorates and task optimization is compromised

Engineering Contradiction:
Improvemodel structure complexityVSAvoidtraining stability
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent divides the single parameter matrix into two separate parameter matrices: one dedicated to on-diagonal attention components and another for off-diagonal components. This segmentation allows each matrix to be optimized independently for its specific function, resolving the conflict between structural simplicity and training stability by introducing targeted complexity only where needed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies different parameter matrices to different parts of the attention mechanism based on their functional requirements. On-diagonal components (where query position equals key position) use one parameter matrix, while off-diagonal components use another, allowing each local region to have optimized properties suited to its specific attention computation needs.

Inventive Principle:
Principle #3Local quality

2Reliability

If separate parameter matrices are used for on- and off-diagonal attention components, then training stability and task optimization improve, but model complexity increases

Engineering Contradiction:
Improvetraining stabilityVSAvoidmodel structure complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

By segmenting the parameter matrices into two distinct sets, the patent enables independent optimization of on-diagonal and off-diagonal attention components, improving training stability and task performance while keeping the overall architecture relatively simple and modular.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent maintains a unified attention mechanism framework that can handle both on-diagonal and off-diagonal components, allowing the same attention computation logic to be applied universally while using different parameter matrices for different component types, thus balancing complexity and functionality.

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

3Ease of manufacture

If a single parameter matrix is used for all attention components, then the model is easier to train, but convergence speed deteriorates

Engineering Contradiction:
Improveease of trainingVSAvoidconvergence speed
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The patent segments the parameter matrices to enable specialized optimization for different attention components, which accelerates convergence by allowing each segment to learn its specific patterns more efficiently, while the modular structure keeps the training process manageable and not excessively complex.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the parameters by introducing separate parameter matrices with different initialization schemes and update rules for on-diagonal versus off-diagonal components, enabling faster convergence through targeted parameter optimization without making the overall training process prohibitively complex.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20240370701A1Split key and value self-attention machine learning
Publication Date: 2024.11.07 SAMSUNG ELECTRONICS CO LTD
  • US20240370701A1 patent drawing
  • US20240370701A1 patent drawing
  • US20240370701A1 patent drawing

AI summary

A method includes receiving an input by a self-attention machine learning model and generating a set of queries using the input. This method also includes generating at least one of two sets of keys using the input and two sets of values using the input. This method also includes determining an output of the self-attention machine learning model using the two sets of keys, the two sets of values, or both. Another method includes identifying a query position for the set of queries, identifying a key position for the two sets of keys, and when the query position is determined to be equal to the key position, calculating an attention score using a first set of the two sets of keys, or, when the query position is determined to be unequal to the key position, calculating the attention score using a second set of the two sets of keys.