Contextual Attention Gating for Natural Image In-Filling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing machine learning models for in-filling perceptual representations, such as images, face challenges in generating refined sample values that appear natural and high-quality due to the computational cost of computing contextual attention features at reduced resolution, leading to unnatural artifacts.

Innovation Solution

A gating architecture is introduced to determine the relative proportions of generative convolutional features and copied contextual attention features, using a gate to weight these features and generate refined sample values through a machine learning model, thereby improving the quality of in-filled portions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Use of energy by stationary object

If contextual attention features are computed at reduced resolution to reduce computational cost, then computational cost is reduced, but the quality of in-filled portions deteriorates due to unnatural artifacts

Engineering Contradiction:
Improvecomputational costVSAvoidquality of in-filled portions
Core Design Contradiction:
Use of energy by stationary objectVSManufacturing precision

Solution Approach 1:

The patent segments the feature representation into two distinct pathways: convolutional features for generative components and contextual attention features for copied components. This segmentation allows each pathway to be processed at different resolutions optimally - contextual attention at reduced resolution for efficiency, and convolutional at full resolution for quality, resolving the contradiction between computational cost and quality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The gating mechanism applies local quality by dynamically weighting different feature types differently for different spatial locations. The gate values determine the relative contribution of generative versus copied features locally, allowing high quality where needed while using computational resources efficiently where copying suffices, thus balancing quality and computational cost.

Inventive Principle:
Principle #3Local quality

2Use of energy by stationary object

If only copied features are used for in-filling, then computational cost is reduced, but the naturalness of in-filled portions deteriorates due to synthetic artifacts

Engineering Contradiction:
Improvecomputational costVSAvoidsynthetic artifacts
Core Design Contradiction:
Use of energy by stationary objectVSObject-generated harmful factors

Solution Approach 1:

The patent merges two feature pathways - convolutional (generative) and contextual attention (copied) - through a gating mechanism that combines them into a unified representation. This merging allows the system to leverage the computational efficiency of copying while incorporating the naturalness of generative modeling, eliminating synthetic artifacts without the full computational burden of pure generation.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The gating mechanism changes the parameter of feature contribution by introducing gate values that dynamically adjust the relative weight of generative versus copied features. This parameter change allows the system to optimize the balance between naturalness and computational cost, preventing synthetic artifacts while maintaining efficiency.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12524852B2Gating of contextual attention and convolutional features
Publication Date: 2026.01.13 GOOGLE LLC
  • US12524852B2 patent drawing
  • US12524852B2 patent drawing
  • US12524852B2 patent drawing

AI summary

A method includes determining a mask defining a portion of a perceptual representation, convolutional features associated with the perceptual representation, and contextual attention features associated with the perceptual representation. The method also includes determining a concatenation of the mask, the convolutional features, and the contextual attention features. The method additionally includes determining gate values for the portion, where determining gate values includes processing the concatenation using a machine learning model. The method further includes determining gated convolutional features based on the convolutional features and the gate values and gated contextual attention features based on the contextual attention features and the gate values. The method yet further includes generating refined values for the portion based on the gated convolutional features and the gated contextual attention features.