Quadratic Attention With Group Normalization for Recurrent Inference

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large language models (LLMs) trained with transformers have high training efficiency and scaling performance but incur linearly increasing inference costs, while RNNs offer fixed inference costs but lack training efficiency, necessitating a hybrid model that combines the benefits of both.

Innovation Solution

Modify a pre-trained transformer's architecture to replace dot-product softmax attention with a linear kernel squared dot product attention layer utilizing Group Normalization, converting it into an RNN for efficient inference.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If transformers are used for LLM training, then training efficiency and scaling performance are improved, but inference cost increases linearly with the number of tokens

Engineering Contradiction:
Improvetraining efficiencyVSAvoidinference cost
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The patent transforms the attention mechanism by changing the normalization parameter from softmax to Group Normalization, and modifies the attention score computation from dot-product to squared dot-product with linear kernels. This parameter change enables the model to achieve RNN-like fixed inference cost while maintaining transformer training efficiency

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent segments the attention computation into distinct components: linear projection layers (WQ, WK, WV), squared dot-product scoring, and Group Normalization. This segmentation allows each component to be optimized independently, with the linear projections enabling efficient computation that reduces inference cost from linear to fixed complexity

Inventive Principle:
Principle #1Segmentation

2Use of energy by moving object

If RNNs are used for sequence modeling, then inference cost is fixed, but training efficiency and scaling performance deteriorate

Engineering Contradiction:
Improveinference costVSAvoidtraining efficiency
Core Design Contradiction:
Use of energy by moving objectVSProductivity

Solution Approach 1:

The patent merges the architectural benefits of transformers (parallel training efficiency, scaling performance) with the inference advantages of RNNs (fixed cost). By combining transformer-style attention with linear projections and Group Normalization, the model achieves both training efficiency and fixed inference cost in a unified architecture

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent introduces dynamic linear projections that adapt the attention computation based on input characteristics. The linear kernels and Group Normalization dynamically adjust the computation path, enabling the model to maintain high training efficiency while achieving fixed inference cost characteristics

Inventive Principle:
Principle #15Dynamics

3Device complexity

If dot-product softmax attention is used, then attention computation is simple, but memory and computation costs increase

Engineering Contradiction:
Improveattention mechanism simplicityVSAvoidcomputation cost
Core Design Contradiction:
Device complexityVSUse of energy by moving object

Solution Approach 1:

The patent substitutes the traditional softmax attention mechanism with a linear kernel-based squared dot-product attention. This replacement eliminates the computationally expensive softmax operation while maintaining attention functionality through linear projections and Group Normalization, reducing computation cost from linear to fixed complexity

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

Data Source

PatentUS20250307616A1Quadratic attention for recurrent inference
Publication Date: 2025.10.02 TOYOTA RESEARCH INSTITUTE INC
  • US20250307616A1 patent drawing
  • US20250307616A1 patent drawing
  • US20250307616A1 patent drawing

AI summary

A method may include receiving parameters associated with a pre-trained transformer trained on first training data, modifying an architecture of the pre-trained transformer to generate a modified transformer, the modified transformer replacing a dot-product softmax attention layer with a linear kernel squared dot product attention layer utilizing Group Normalization, receiving second training data, and training the modified transformer based on the training data.