Vision Transformer Variable Patch Size Training

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Neural networks, specifically Vision Transformers (ViTs), face a challenge in maintaining accuracy and efficiency across varying image patch sizes, as changing patch size requires retraining the model, limiting their adaptability to different computational budgets and downstream tasks.

Innovation Solution

Implementing a variable image patch generation scheme during training, allowing the ViT to operate effectively across a range of patch sizes, thereby enabling flexible performance and computational cost tuning at deployment time.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If the patch size is reduced to increase accuracy, then the classification accuracy is improved, but the computational cost increases

Engineering Contradiction:
Improveclassification accuracyVSAvoidcomputational cost
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent implements dynamic patch size adjustment during training by introducing a patch size scheduler that varies the patch size across different training epochs. This allows the model to learn features at multiple scales, enabling it to achieve high accuracy while adapting to different computational budgets at deployment time by selecting appropriate patch sizes without retraining.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the patch size parameter during the training process according to a scheduled pattern. The patch size scheduler modifies this parameter systematically, allowing the model to adapt to different resolution requirements and computational constraints, thereby resolving the trade-off between accuracy and computational cost.

Inventive Principle:
Principle #35Parameter changes

2Adaptability or versatility

If the patch size is changed to adapt to different computational budgets, then the flexibility is improved, but the model requires retraining

Engineering Contradiction:
ImproveflexibilityVSAvoidretraining time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent makes the ViT model universal across different patch sizes by training it with variable patch sizes scheduled over time. This multi-functional training approach enables a single model to serve multiple deployment scenarios with different computational budgets, eliminating the need for separate retraining for different patch sizes and significantly reducing time loss.

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

3Adaptability or versatility

If multiple ViTs are trained with different patch sizes to cover various downstream tasks, then the coverage of tasks is improved, but the number of models increases

Engineering Contradiction:
Improvetask coverageVSAvoidnumber of models
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent merges the functionality of multiple patch-size-specific models into a single ViT model by implementing variable patch size training with a scheduler. This combination allows one model to perform the work of multiple models, reducing device complexity while maintaining comprehensive task coverage across different downstream applications.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentEP4375879A1Training large-scale vision transformer neural networks with variable patch sizes
Publication Date: 2024.05.29 GOOGLE LLC
  • EP4375879A1 patent drawingFigure 1
  • EP4375879A1 patent drawingFigure 2
  • EP4375879A1 patent drawingFigure 3

AI summary

This specification relates to training neural networks. This specification describes a system implemented as computer programs on one or more computers in one or more locations that trains a Vision Transformer neural network (ViT). A ViT is a neural network that processes an input that includes an image, i.e., that processes the intensity values of the pixels of the image, to generate an output for the image, e.g., a classification or a regression output, and that includes one or more self-attention layers and one or more output layers.