Analog In-Memory Attention Engine for Faster SDPA Matrix Multiplication

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The performance of neural networks that use Scaled Dot-Product Attention (SDPA) is hindered by the increasing processing time as input sequence lengths grow, necessitating a method to accelerate SDPA operations.

Innovation Solution

An attention engine is introduced, which is an in-memory computing module that performs matrix multiplication for SDPA operations in the analog domain, utilizing a dot product circuit and a multiplier circuit within programmable crossbar arrays.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If digital-domain matrix multiplication is used for SDPA operations, then computational precision is maintained, but processing speed decreases and power consumption increases

Engineering Contradiction:
Improveprocessing speedVSAvoidpower consumption
Core Design Contradiction:
SpeedVSUse of energy by moving object

Solution Approach 1:

The patent replaces digital-domain computational operations with analog-domain electrical operations. Specifically, it uses crossbar arrays where conductance values represent matrix elements, and electrical currents automatically perform matrix multiplication through Ohm's law and Kirchhoff's current law, eliminating the need for traditional digital computation hardware

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

Solution Approach 2:

The patent changes the domain of computation from digital to analog by mapping matrix elements to conductance parameters in the crossbar array. The computation is performed by applying voltage signals and measuring resulting currents, where the analog electrical parameters directly encode and process the mathematical operations

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If input sequence length increases, then model accuracy improves, but processing time increases quadratically

Engineering Contradiction:
Improvemodel accuracyVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent replaces sequential digital computation with parallel analog computation using crossbar arrays. The parallel nature of electrical circuits allows all matrix multiplication operations to occur simultaneously, reducing the time complexity from quadratic O(n²) to linear O(n) with respect to sequence length

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

Solution Approach 2:

The patent transitions from temporal computation (sequential operations over time) to spatial computation (parallel operations across the crossbar array structure). The crossbar array's two-dimensional architecture enables simultaneous execution of multiple multiplication operations that would otherwise require sequential processing

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Productivity

If traditional digital computing architecture is used, then system complexity is low, but SDPA operation efficiency is poor

Engineering Contradiction:
ImproveSDPA operation efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent replaces general-purpose digital computing architecture with a specialized analog computing system using crossbar arrays. This dedicated hardware architecture is optimized specifically for matrix multiplication operations, achieving superior efficiency for SDPA tasks despite increased hardware complexity

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

Solution Approach 2:

The crossbar array architecture provides a universal platform for matrix operations that can be reconfigured for different SDPA computations. The same hardware structure handles various matrix dimensions and operations by programmably setting conductance values, making it adaptable to different neural network models and sequence lengths

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

Applied Scientific Principles

This section explains which scientific principles are used to turn an abstract innovation direction into a practical engineering solution.

Function Achieved in This Case

This approach significantly improves the speed and reduces power consumption of SDPA operations, thereby enhancing the overall performance of neural networks by maintaining efficiency even with longer input sequences.

Implementation Method 1

performs matrix multiplication for SDPA operations in the analog domain, utilizing a dot product circuit and a multiplier circuit within programmable crossbar arrays

Methodology Applied
Scientific EffectAnalog domain computation: Conduction (electrical)

Data Source

PatentUS20250077181A1In-memory attention engine
Publication Date: 2025.03.06 HEWLETT PACKARD ENTERPRISE DEV LP
  • US20250077181A1 patent drawing
  • US20250077181A1 patent drawing
  • US20250077181A1 patent drawing

AI summary

A computing system that includes an attention engine is disclosed. The attention engine is an in-memory computing module that may be used to accelerate attention operations. The attention engine includes a dot product circuit and a multiplier circuit, which together are used to perform matrix generation and matrix multiplication in the analog domain. Performing matrix multiplication in the analog domain may be faster and/or consume less power than performing matrix multiplication in the digital domain.