Transformer Recurrence With Lightweight RNN Gating for Faster Training

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Transformers incorporating both attention and recurrence face challenges in achieving parity in performance with attention-only models, requiring significant computational resources and complex architectures like LSTM RNNs, which are not efficiently scalable on GPUs and TPUs.

Innovation Solution

A lightweight RNN block, such as SwishRNN, is integrated into the transformer architecture, utilizing element-wise operations and multiplicative gating functions to minimize computational steps, enabling efficient training and operation on GPUs and TPUs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a combined attention and recurrence model (e.g., LSTM RNN) is used to improve language model accuracy, then model performance improves, but computational resources and complexity increase significantly

Engineering Contradiction:
Improvelanguage model accuracyVSAvoidcomputational complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts only the essential recurrent processing capability needed for language modeling, discarding the complex LSTM architecture. The simplified recurrent block retains the core function of sequential processing while removing unnecessary computational complexity, achieving comparable accuracy with significantly reduced resources

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes key parameters of the recurrent block, using element-wise operations instead of full matrix multiplications, and employing a simplified gating mechanism. These parameter changes reduce computational complexity from O(n²) to O(n), maintaining accuracy while reducing resource requirements

Inventive Principle:
Principle #35Parameter changes

2Reliability

If a complex RNN architecture like LSTM is used to achieve better accuracy, then model performance improves, but training time and resource requirements increase

Engineering Contradiction:
Improvemodel accuracyVSAvoidtraining time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent extracts only the critical recurrent processing function needed for sequential language understanding, eliminating the multi-layer gating mechanisms of LSTM that contribute to training time without providing proportional accuracy benefits. This results in faster training with maintained performance

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent employs a lightweight recurrent block that uses simpler, computationally cheaper operations compared to LSTM. The simplified architecture requires fewer floating-point operations per training step, reducing training time while maintaining adequate accuracy for language modeling tasks

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

3Adaptability or versatility

If recurrence is incorporated into transformer architecture to improve sequential processing, then model capability improves, but computational throughput decreases

Engineering Contradiction:
Improvesequential processing capabilityVSAvoidcomputation throughput
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent substitutes the traditional matrix-multiplication-based recurrent operations with element-wise operations. This mechanical substitution changes the computational paradigm from heavy linear algebra to lighter element-wise computations, maintaining sequential processing capability while improving computation throughput and enabling efficient GPU/TPU utilization

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

4Productivity

If a lightweight RNN block is used to reduce computational resources, then training efficiency improves, but model accuracy may decrease

Engineering Contradiction:
Improvetraining efficiencyVSAvoidmodel accuracy
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies partial action by implementing only the essential recurrent processing needed for language modeling, rather than the full complexity of LSTM. This partial implementation achieves sufficient accuracy for the task while dramatically improving training efficiency, as the simplified block processes sequences with fewer operations

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS20250356166A1Recurrence in transformer architecture
Publication Date: 2025.11.20 GOOGLE LLC
  • US20250356166A1 patent drawing
  • US20250356166A1 patent drawing

AI summary

Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for recurrence in a transformer architecture. In one aspect, a method includes receiving input embeddings representing a sequence of words as input; generating as output attention vectors for each of the words, the attention vectors for each word indicating an importance of the word in the sequence relative to other words in the sequence; generating first and second linear transformations X1 and X2 of the attention vectors; determining, in a recurrent neural network, a hidden state corresponding to each attention vector using only element wise operations on the first linear transformation of the attention vectors during a recurrent step; and generating a set of output vectors using a multiplicative gating function in combination with the second linear transformation.