Transformer Attention Sampling for Image Processing Efficiency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Transformer-based technology, originally developed for Natural Language Processing, faces challenges when extended to image-processing domains due to its high data-intensiveness and complexity of data items like images, which can overwhelm computing resources.

Innovation Solution

A modified transformer architecture that includes a modified attention component, which generates original attention information and then produces modified attention information by removing attention values based on score information generated from a classification token, reducing data-intensiveness and enabling processing on devices with limited resources.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If transformer-based technology is applied to process images and other complex data items, then the capability to handle non-NLP fields is improved, but the computational resources required become excessive

Engineering Contradiction:
Improvecapability to process imagesVSAvoidcomputational resources
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The patent extracts and removes less important attention values from the attention map based on score thresholds. This extraction principle directly reduces the data volume processed in subsequent transformer operations, thereby lowering computational resource requirements while preserving the essential information needed for accurate image classification.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Instead of processing all attention values equally, the patent applies partial action by selectively retaining only those attention values that exceed a certain score threshold. This partial processing approach maintains classification accuracy for important features while avoiding the computational overhead of processing all attention values, thus resolving the contradiction between versatility and resource consumption.

Inventive Principle:
Principle #16Partial or excessive action

2Reliability

If all attention values are processed in the transformer, then classification accuracy is maintained, but the data-intensiveness increases computational cost

Engineering Contradiction:
Improveclassification accuracyVSAvoidcomputational efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts only the significant attention values that contribute meaningfully to classification accuracy. By removing redundant or low-importance attention values through threshold-based filtering, the system maintains reliable classification performance while significantly improving computational efficiency and reducing data-intensiveness.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies different quality levels to different attention values based on their importance scores. High-scoring attention values are preserved with full detail to maintain classification accuracy, while low-scoring values are removed or downsampled. This local differentiation optimizes the balance between reliability and productivity by allocating computational resources proportionally to their actual value.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12306906B2Adaptive token sampling for efficient transformer
Publication Date: 2025.05.20 MICROSOFT TECHNOLOGY LICENSING LLC
  • US12306906B2 patent drawing
  • US12306906B2 patent drawing
  • US12306906B2 patent drawing

AI summary

A transformer is described herein for using transformer-based technology to process data items (e.g., image items). The transformer increases the efficiency of the transformer-based technology by using a modified attention component. In operation, the modified attention component accepts embedding vectors that represent a plurality of item tokens, together with a classification token. A first stage of the modified attention component generates original attention information based on the embedding vectors. A second stage generates score information based on a portion of the original attention information that pertains to the classification token. A third stage produces modified attention information by removing attention values from the original attention information, as guided by a sampling operation that is performed on the score information. The second and third stages do not rely on machine-trained values, which expedites the deployment of these functions in existing transformers.