Binder Multi-Head Attention Mechanism for Linear Complexity

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing natural language processing (NLP) models employing Transformer architectures with self-attention mechanisms face computational inefficiencies due to quadratic time complexity, making them resource-intensive for long input sequences.

Innovation Solution

The introduction of a binder multi-head attention mechanism that uses learnable binder vectors to compute attention weights, reducing computational complexity from quadratic to linear with respect to the input sequence length.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If self-attention mechanism is used to compute attention weights pair-wisely between all positions, then the importance or relevance of different tokens can be captured, but the time complexity becomes quadratic with respect to input sequence length

Engineering Contradiction:
Improveattention weight computation accuracyVSAvoidcomputational time complexity
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent segments the self-attention computation by introducing a query vector that is shared across all positions, dividing the quadratic attention computation into linear position-specific key-value computations. Instead of computing attention between all position pairs, the system computes attention between a single query vector and multiple key vectors, reducing complexity from O(n²) to O(n).

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The query vector serves as a universal attention mechanism that can attend to all positions in the sequence simultaneously. This single query vector performs the function of multiple position-specific queries, enabling the model to capture global dependencies without requiring separate computations for each position pair.

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

2Reliability

If self-attention mechanism computes attention weights for all position pairs, then comprehensive token relevance can be captured, but resource consumption increases significantly

Engineering Contradiction:
Improvetoken relevance captureVSAvoidcomputational resource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The computation is segmented into a universal query component and position-specific key components. This segmentation allows the system to process token relevance information more efficiently by avoiding redundant computations between all position pairs, thereby reducing resource consumption while maintaining reliability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The query vector is copied and applied to all positions in the sequence, allowing the same attention mechanism to be reused across different positions. This copying approach eliminates the need for unique query vectors at each position, reducing computational overhead and resource consumption.

Inventive Principle:
Principle #26Copying

3Measurement precision

If quadratic time complexity is accepted for accurate attention computation, then processing accuracy is maintained, but processing speed decreases

Engineering Contradiction:
Improveattention computation accuracyVSAvoidprocessing speed
Core Design Contradiction:
Measurement precisionVSSpeed

Solution Approach 1:

The patent changes the parameter structure by introducing a shared query vector that transforms the attention computation from O(n²) to O(n). This parameter change maintains the ability to compute accurate attention weights while significantly improving processing speed by reducing the number of computational operations required.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The attention mechanism is segmented into a global query computation and local key-value computations. This segmentation enables parallel processing of position-specific operations while maintaining a single query vector, thereby improving processing speed without sacrificing computation accuracy.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20250131246A1Systems and methods for an attention-based neural network architecture
Publication Date: 2025.04.24 SALESFORCE INC
  • US20250131246A1 patent drawing
  • US20250131246A1 patent drawing
  • US20250131246A1 patent drawing

AI summary

Embodiments provide an attention mechanism that computes attention weights for an input sequence by employing a set of multi-head learnable vectors (referred to as “binder vectors”) to attend to the input sequence.