Machine Learning Attention Using L1 Differences and Lookup Tables

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional attention-based machine learning techniques require significant computational resources and power consumption due to extensive multiplication steps in determining attention weights, leading to increased latency and the risk of divide-by-zero errors, limiting their application to less-specialized hardware.

Innovation Solution

Reduce computational complexity by determining attention weights based on L1 or L2 differences between query and key values, and utilize lookup tables to eliminate multiplication steps, normalizing differences based on vector size instead of softmax steps.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If conventional attention-based machine learning techniques are used with extensive multiplication steps, then attention weights can be determined with traditional softmax normalization, but computing resource utilization and power consumption increase significantly

Engineering Contradiction:
Improveattention weight accuracyVSAvoidpower consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent changes the computational parameters from multiplication-based dot products to addition-based operations. Specifically, it transforms the attention mechanism to use element-wise addition and subtraction instead of multiplication, fundamentally altering the mathematical operations to reduce computational complexity and energy consumption while maintaining attention weight functionality

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent substitutes the traditional multiplication-based computational mechanism with an addition-based mechanism. By replacing multiplication operations with addition operations in the attention weight calculation, the system achieves the same functional outcome with significantly reduced computational resources and energy consumption

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Measurement precision

If conventional attention mechanisms with multiplication steps are implemented, then attention weights can be computed, but latency increases due to extensive computational operations

Engineering Contradiction:
Improveattention weight calculation accuracyVSAvoidcomputational latency
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent changes the computational parameters from multiplication-based dot products to addition-based operations. Specifically, it transforms the attention mechanism to use element-wise addition and subtraction instead of multiplication, fundamentally altering the mathematical operations to reduce computational complexity and energy consumption while maintaining attention weight functionality

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent extracts and removes the multiplication operations from the attention mechanism, keeping only the essential addition and subtraction operations. By taking out the computationally expensive multiplication steps while retaining the core attention functionality through addition-based comparisons, the system reduces latency significantly

Inventive Principle:
Principle #2Taking out (Extraction)

3Measurement precision

If conventional attention mechanisms are used, then attention weights can be determined through softmax normalization, but the system requires specialized hardware due to computational complexity

Engineering Contradiction:
Improveattention weight determination accuracyVSAvoidhardware specialization requirement
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent changes the computational parameters from multiplication-based dot products to addition-based operations. Specifically, it transforms the attention mechanism to use element-wise addition and subtraction instead of multiplication, fundamentally altering the mathematical operations to reduce computational complexity and energy consumption while maintaining attention weight functionality

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent substitutes the traditional multiplication-based computational mechanism with an addition-based mechanism. By replacing multiplication operations with addition operations in the attention weight calculation, the system achieves the same functional outcome with significantly reduced computational resources and energy consumption

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

4Measurement precision

If conventional attention mechanisms are implemented, then attention weights can be computed using standard methods, but the risk of divide-by-zero errors increases

Engineering Contradiction:
Improveattention weight computation accuracyVSAvoidnumerical stability
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The patent substitutes the traditional multiplication-based computational mechanism with an addition-based mechanism. By replacing multiplication operations with addition operations in the attention weight calculation, the system achieves the same functional outcome with significantly reduced computational resources and energy consumption

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent converts the potential harm of division operations (which can cause divide-by-zero errors) into a beneficial addition-based system. By replacing the normalization division step with an addition-based computational approach, the system eliminates the source of numerical instability while maintaining the attention mechanism's ability to compute meaningful weights

Inventive Principle:
Principle #22Blessing in disguise (Convert harm into benefit)

Data Source

PatentUS20250225431A1Efficient attention mechanisms for machine learning applications
Publication Date: 2025.07.10 QUALCOMM INC
  • US20250225431A1 patent drawing
  • US20250225431A1 patent drawing
  • US20250225431A1 patent drawing

AI summary

This disclosure provides systems, methods, and devices for machine learning techniques that support attention mechanisms. In one aspect, a method is provided that includes receiving encoded input data that includes query values and key values. Differences between the query and key values may be determined, and these differences may be used to determine attention weights. For example, attention weights may be determined based on L1 and/or L2 differences between the values. In certain aspects, the attention weights may be determined with reduced multiplication steps, such as using a lookup table. Output data may then be determined based on the attention weights and the encoded input data. Other aspects and features are also claimed and described.