Modulated Softmax Attention for Novel-Input Accuracy

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing attention mechanisms in transformer networks struggle with reduced accuracy when encountering novel inputs due to fixed weight matrices and high computational costs, leading to inefficiencies in inference operations.

Innovation Solution

Implement a modulated softmax attention mechanism that calculates learnable scaling and bias vectors to adjust attention weights based on global importance, independent of pairwise token relationships, increasing model accuracy with minimal additional computational cost.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If fixed weight matrices are used in attention mechanisms, then model training is simplified, but accuracy decreases when encountering novel inputs during inference

Engineering Contradiction:
Improvesimplicity of trainingVSAvoidaccuracy on novel inputs
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The patent introduces dynamic attention modulation through learnable scaling and bias vectors that are updated during training but applied differently during inference. The scaling vectors dynamically adjust the magnitude of attention weights while bias vectors shift the attention distribution, enabling the model to adapt to novel inputs without requiring complete retraining of the weight matrices.

Inventive Principle:
Principle #15Dynamics

2Productivity

If computational costs are reduced through kernel approximations or token bucket grouping, then inference efficiency improves, but model accuracy decreases

Engineering Contradiction:
Improveinference efficiencyVSAvoidmodel accuracy
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent modifies the attention computation parameters by introducing per-token scaling values and per-token bias values that modulate the attention scores. These parameter changes allow the model to maintain accurate attention distribution without requiring computationally expensive exponential dot product operations or complex token grouping strategies, achieving both efficiency and accuracy improvements.

Inventive Principle:
Principle #35Parameter changes

3Ease of operation

If attention mechanism computes weighted sum of values with compatibility function, then attention distribution is achieved, but computational cost scales quadratically with model parameters

Engineering Contradiction:
Improveattention distribution computationVSAvoidcomputational cost
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent segments the attention computation into independent per-token operations by introducing per-token scaling vectors and per-token bias vectors. Instead of computing a single global attention distribution, the model computes separate modulation parameters for each token, which can then be applied independently to reduce the quadratic scaling of computational costs while maintaining attention distribution accuracy.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20250284938A1Modulated softmax attention for improving attention mechanisms in deep neural networks
Publication Date: 2025.09.11 DISNEY ENTERPRISES INC
  • US20250284938A1 patent drawing
  • US20250284938A1 patent drawing
  • US20250284938A1 patent drawing

AI summary

The present invention sets forth techniques for generating attention values via a modulated softmax attention mechanism. The techniques include calculating key, query, and value matrices associated with an input matrix including one or more input tokens, calculating a first vector including one or more per-token scaling values and a second vector including one or more per-token bias values. The techniques also include generating an attention prior matrix based at least on the first and second vectors, and calculating, for each of the one or more input tokens, a modulated attention score associated with the input token. The techniques further include calculating a matrix including one or more modulated attention values associated with the one or more input tokens, and transmitting the one or more modulated attention values to at least one stage included in a transformer network.