Axial Attention Mechanism for Efficient Image Transformation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Autoregressive models face challenges in efficiently processing long sequences due to the high computational complexity of self-attention mechanisms, which limits their application to high-dimensional image and video datasets.

Innovation Solution

The implementation of an axial attention mechanism that applies attention along a single axis of the tensor without flattening, reducing computational and memory requirements while maintaining full expressiveness over joint distributions, allowing for parallel computation during decoding.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If self-attention is applied to process long sequences in autoregressive models, then the model can capture long-range dependencies and express joint distributions over data, but the memory and computation consumed grows quadratically with sequence length, making it expensive to apply to large datasets

Engineering Contradiction:
Improvemodel accuracyVSAvoidcomputational complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the self-attention computation by introducing axial attention that processes sequences along different axes (row and column dimensions) separately. This divides the quadratic complexity problem into manageable linear segments, allowing the model to capture long-range dependencies without quadratic memory and computation growth.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transforms the traditional single-sequence self-attention into multi-dimensional axial attention. By operating along row and column axes independently in a 2D tensor space, the model captures long-range dependencies across the entire sequence while reducing computational complexity from quadratic to linear growth with sequence length.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Productivity

If axial attention is applied to maintain independence between rows and columns, then computational efficiency is improved, but the ability to capture complex interactions across the entire sequence may be limited

Engineering Contradiction:
Improvecomputational efficiencyVSAvoidmodel expressiveness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent merges the results of row-wise and column-wise axial attention computations to capture comprehensive sequence dependencies. By combining the independent axis-specific attention mechanisms, the model achieves both computational efficiency and full sequence context understanding, resolving the trade-off between efficiency and expressiveness.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS12182965B2Conditional axial transformer layers for high-fidelity image transformation
Publication Date: 2024.12.31 GOOGLE LLC
  • US12182965B2 patent drawing
  • US12182965B2 patent drawing
  • US12182965B2 patent drawing

AI summary

Apparatus and methods relate to receiving an input image comprising an array of pixels, wherein the input image is associated with a first characteristic; applying a neural network to transform the input image to an output image associated with a second characteristic by generating, by an encoder and for each pixel of the array of pixels of the input image, an encoded pixel, providing, to a decoder, the array of encoded pixels, applying, by the decoder, axial attention to decode a given pixel, wherein the axial attention comprises a row attention or a column attention applied to one or more previously decoded pixels in rows or columns preceding a row or column associated with the given pixel, wherein the row or column attention mixes information within a respective row or column, and maintains independence between respective different rows or different columns; and generating, by the neural network, the output image.