Multi-Axis Vision Transformer

The multi-axis self-attention block efficiently balances global and local interactions, addressing scalability issues in transformers, resulting in improved performance and reduced resource consumption for computer vision tasks.

JP7823222B2Active Publication Date: 2026-03-03GOOGLE LLC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024557764
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-03-30
Filing Date
2023-03-30
Publication Date
2026-03-03
Estimated Expiration
2043-03-30

AI Technical Summary

Technical Problem

Transformers in computer vision face challenges with scalability due to the lack of efficient incorporation of global and local interactions, leading to computational inefficiencies and limited performance in larger data regimes.

Method used

A multi-axis self-attention block that decomposes attention into local and global operations, allowing for serial configuration and linear complexity, enhancing model capabilities and flexibility.

Benefits of technology

The proposed model achieves state-of-the-art performance across various computer vision tasks with reduced computational resources, demonstrating superior accuracy and efficiency compared to existing transformers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007823222000006
    Figure 0007823222000006
  • Figure 0007823222000007
    Figure 0007823222000007
  • Figure 0007823222000008
    Figure 0007823222000008
Patent Text Reader

Abstract

An efficient and scalable attention model is provided, which can be referred to as multi-axis attention. An exemplary implementation can include two aspects: blocked local attention and spread global attention. These design choices enable global-local spatial interaction for any input resolution with only linear complexity. This disclosure also presents a new architectural element by effectively fusing convolution with the proposed multi-axis attention model. In addition, this disclosure proposes a simple hierarchical vision backbone by simply repeating basic building blocks across multiple stages, an exemplary implementation of which can be referred to as MaxViT. In particular, MaxViT is able to "see" globally throughout the entire network, even in earlier, high-resolution stages.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates generally to more efficient machine learning architectures for vision tasks, and more specifically to multi-axis vision transformers that include one or more multi-axis blocks that include local and global attention axes in series.

[0002] [Related Applications] This application claims priority to and the benefit of U.S. Provisional Patent Application No. 63 / 325,356, filed March 30, 2022. U.S. Provisional Patent Application No. 63 / 325,356 is incorporated herein by reference in its entirety. [Background technology]

[0003] Transformers have gained significant attention in recent years in the computer vision community. However, the lack of scalability of self-attention mechanisms with respect to image size has limited their widespread adoption in state-of-the-art vision backbones.

[0004] More specifically, convolutional neural networks (ConvNets) have historically been the dominant architectural design choice for computer vision. ConvNets continue to perform impressively on a multitude of vision problems by becoming deeper and more extensive, adding dense connections, efficient separable convolutions, atrous convolutions, using an encoder-decoder framework, and even incorporating modern microdesign components.

[0005] Meanwhile, inspired by the advances in self-attention models like the Transformer in natural language processing (Vaswani et al., Attention is all you need. Advances in Neural Information Processing Systems 30 (2017)), many researchers have begun to incorporate attention mechanisms into vision models. As one example, the Vision Transformer (ViT) (Dosovitskiy et al., An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929 (2020)) is perhaps the first fully Transformer-based architecture for vision, whereby image patches are simply viewed as a sequence of words and a Transform encoder is applied to those visual tokens. When pre-trained on large datasets, ViT can achieve convincing results for image recognition.

[0006] However, it has been observed that without extensive pre-training, ViT performs poorly for image recognition. This is due to ViT's strong modeling ability, which is given less inductive bias, leading to overfitting. To properly regularize the modeling ability and improve its scalability, numerous subsequent efforts have investigated sparse transformer models tailored for vision tasks, such as local attention. These methods typically reintroduce hierarchical architectures to compensate for the lack of nonlocality. The Swin Transformer (Liu et al., "Swin Transformer: Hierarchical Vision Transformer Using Shifted Windows." In: Proceedings of the IEEE / CVF International Conference on Computer Vision, pp. 10012-10022 (2021)) is one such successful attempt, which modifies the transformer by applying self-attention to shifted, non-overlapping windows. For the first time, this approach outperformed ConvNets on the ImageNet benchmark with pure vision transformers. Despite being more flexible and generalizable than full attention used in ViT, windowed attention has been observed to limit model capabilities due to a lack of nonlocality, and subsequently scales poorly to larger data regimes such as ImageNet-21K and JFT. However, capturing global interactions via full attention at early or high-resolution stages within a hierarchical network is computationally heavy, as the attention operator requires quadratic complexity.

[0007] Therefore, how to efficiently incorporate global and local interactions to balance model performance and generalization under a computational budget remains a challenge. Summary of the Invention

[0008] Aspects and advantages of embodiments of the present disclosure will be set forth in part in the description that follows, or may be learned from the description, or may be learned by practice of the embodiments.

[0009] One exemplary aspect of the present disclosure is directed to a computing system that performs computer vision tasks with improved efficiency. The computing system includes one or more processors and one or more non-transitory computer-readable media that collectively store a machine-learned computer vision model configured to process input image data to generate output predictions. The machine-learned computer vision model includes one or more multi-axis self-attention blocks. Each of the one or more multi-axis self-attention blocks includes a local processing portion configured to perform a local attention operation on a first set of feature data and a global processing portion configured to perform a global attention operation on a second set of feature data. The global processing portion and the local processing portion are arranged in a serial configuration with respect to each other.

[0010] Another exemplary aspect of the present disclosure is directed to a computer-implemented method for performing a computer vision task. The method includes acquiring an input image. The method includes processing the input image with a machine-learned computer vision model to generate output predictions, where processing the input image with the machine-learned computer vision model includes: performing, in each of one or more multi-axis self-attention blocks of the machine-learned computer vision model, a first segmentation operation in a local processing portion of the multi-axis self-attention block to segment a first set of feature data into a plurality of local windows, and performing a respective local attention operation for each of the plurality of local windows. The method also includes performing, in a global processing portion of the multi-axis self-attention block, a second segmentation operation to segment a second set of feature data into a plurality of global windows, and performing a respective global attention operation for each of the plurality of global windows. The local processing portion and the global processing portion are arranged in a serial configuration with respect to each other. The method includes providing the output predictions as an output.

[0011] Another exemplary aspect of the present disclosure is directed to a computing system that performs image generation tasks with improved efficiency. The computing system includes one or more processors and one or more non-transitory computer-readable media that collectively store a machine-learned image generation model configured to process input data to generate an output image. The machine-learned image generation model includes one or more multi-axis self-attention blocks. Each of the one or more multi-axis self-attention blocks includes a global processing portion configured to perform a global attention operation on a second set of feature data and a local processing portion configured to perform a local attention operation on a first set of feature data. The global processing portion and the local processing portion are arranged in a serial configuration with respect to each other.

[0012] Other aspects of the present disclosure are directed to various systems, apparatus, non-transitory computer-readable media, user interfaces, and electronic devices.

[0013] These and other features, aspects, and advantages of various embodiments of the present disclosure will become better understood with reference to the following description and appended claims. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the present disclosure and, together with the detailed description, serve to explain associated principles.

[0014] Detailed descriptions of embodiments directed to those skilled in the art are set forth herein with reference to the accompanying drawings. [Brief explanation of the drawings]

[0015] [Figure 1A] FIG. 1A depicts exemplary experimental results, for example, embodiments of the present disclosure. [Figure 1B] FIG. 1B depicts exemplary experimental results, for example, embodiments of the present disclosure. [Figure 2] 1 illustrates a graphical diagram of an exemplary network architecture including an exemplary multi-axis self-attention block, according to an exemplary embodiment of the present disclosure. [Figure 3] 1 illustrates a graphical representation of an exemplary portion of an exemplary multi-axis self-attention block, according to an exemplary embodiment of the present disclosure. [Figure 4] 1 illustrates a graphical diagram of an exemplary network architecture including an exemplary multi-axis self-attention block, according to an exemplary embodiment of the present disclosure. [Figure 5A] 1 illustrates a block diagram of an exemplary computing system according to an exemplary embodiment of the present disclosure. [Figure 5B] 1 illustrates a block diagram of an exemplary computing device according to an exemplary embodiment of the present disclosure. [Figure 5C] 1 illustrates a block diagram of an exemplary computing device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0016] Reference numbers repeated among the drawings are intended to identify like features in the various embodiments.

[0017] [Overview] In general, the present disclosure is directed to an efficient and scalable attention model, which can be referred to as multi-axis attention. Exemplary implementations can include two aspects: blocked local attention and spread global attention. These design choices enable global-local spatial interaction for any input resolution with only linear complexity. The present disclosure also presents a new architectural element by effectively fusing convolution with the proposed multi-axis attention model. Additionally, by simply repeating basic building blocks across multiple stages, the present disclosure proposes a simple hierarchical vision backbone, an exemplary implementation of which can be referred to as MaxViT. In particular, MaxViT is capable of "looking" holistically throughout the entire network, even in earlier, high-resolution stages.

[0018] The effectiveness of exemplary implementations of the proposed model has been demonstrated for a wide spectrum of vision tasks. For image classification, MaxViT achieves state-of-the-art performance under various settings: without extra data, MaxViT achieves 86.5% top-1 accuracy on ImageNet-1K, and with pre-training on ImageNet-21K, the model achieves 88.7% top-1 accuracy. For downstream tasks, MaxViT, as a backbone, achieves favorable performance for visual aesthetic evaluation along with object detection. The proposed model also exhibits strong generative modeling capabilities on ImageNet, demonstrating the excellent potential of the MaxViT block as a universal vision module.

[0019] More specifically, this disclosure presents a new type of transformer module, called multi-axis self-attention (Max-SA), which successfully serves as a fundamental architectural component capable of performing both local and global spatial interactions within a single block. Compared to full self-attention, Max-SA enjoys greater flexibility and efficiency, i.e., it is naturally adaptive to different input lengths with linear complexity, and, in contrast to (shifted) window / local attention, Max-SA enables more powerful model capabilities by proposing a global receptive field. Moreover, Max-SA can be used as a global standalone attention module in any layer of the network, even at earlier, high-resolution stages, with negligible linear complexity.

[0020] To demonstrate its effectiveness and generality, a simple yet effective vision backbone is proposed. An exemplary implementation of the backbone can be called a multi-axis vision transformer (MaxViT). The backbone can be constructed by hierarchically stacking repeated blocks composed of Max-SA and convolution. MaxViT distinguishes itself from previous approaches in that the proposed model belongs to the category of hybrid vision transformers, and the model is tuned for simplicity by designing a basic block that integrates convolution, local attention, and global attention, and then simply repeating it.

[0021] Exemplary experiments show that MaxViT significantly improves state-of-the-art (SOTA) performance under all data regimes for a wide range of visual queries. In particular, as shown in Figures 1A-B, MaxViT outperforms all recent transformer-based models in terms of both accuracy vs. FLOPs and accuracy vs. parameters.

[0022] More specifically, Figures 1A-B show a performance comparison of MaxViT with state-of-the-art vision transformers on ImageNet-1K. In particular, Figure 1A shows the accuracy vs. FLOP performance scaling curve under the ImageNet-1K training setting at an input resolution of 224x224. Figure 1B shows the accuracy vs. parameter scaling curve under the ImageNet-1K fine-tuning setting that allows for a higher size (384 / 512). An exemplary implementation of the proposed model shows superior performance in terms of both the accuracy vs. computation tradeoff and the accuracy vs. parameter tradeoff.

[0023] Thus, one exemplary aspect of the present disclosure is directed to a generic transformer architecture (e.g., "MaxViT") that can capture both local and global spatial interactions throughout every stage of the network. Another exemplary aspect is directed to a novel standalone multi-axis attention module composed of blocked local attention and pervasive global attention that enjoys global sensitivity in linear complexity. Furthermore, extensive experiments show that MaxViT achieves SOTA results under various data regimes for a wide range of tasks, including image classification, object detection, image aesthetic evaluation, and image generation.

[0024] Thus, the present disclosure provides several technical effects and advantages. As one example, extensive experiments have shown that exemplary embodiments of the present disclosure achieve state-of-the-art results for several computer vision tasks. In particular, for image classification, MaxViT achieves state-of-the-art performance under various settings: without extra data, MaxViT achieves a top-1 accuracy of 86.5% on ImageNet-1K, and with pre-training on ImageNet-21K, the model achieves a top-1 accuracy of 88.7%. For downstream tasks, MaxViT, as a backbone, performs favorably for visual aesthetic evaluation with object detection. The proposed model also demonstrates powerful generative modeling capabilities on ImageNet, demonstrating the excellent potential of the MaxViT block as a universal vision module. Thus, the proposed system and model provide improved computer performance for a significant number of different computer vision tasks. Thus, the present disclosure represents an improvement in computer performance as it relates to specific technical objectives (e.g., computer vision tasks such as image classification, object detection, or recognition).

[0025] As another exemplary technical effect and advantage, the model architecture described herein provides superior performance even with fewer parameters and / or FLOPs. Thus, relative to existing approaches, the proposed model can perform the same task with superior results while consuming fewer computational resources. Thus, the proposed system and model conserve computational resources, such as processor utilization, memory utilization, and network bandwidth. Thus, the proposed technology corresponds to a specific technical implementation having a design motivated by technical considerations of the internal functioning of a computer.

[0026] Another exemplary technical effect is that, compared to full self-attention, Max-SA enjoys greater flexibility and efficiency, i.e., it is naturally adaptive to different input lengths with linear complexity, and, in contrast to (shifted) window / local attention, Max-SA enables stronger model capabilities by proposing a global receptive field. Moreover, Max-SA can be used as a global standalone attention module in any layer of the network, even in earlier, high-resolution stages, with negligible linear complexity. Thus, the proposed technology corresponds to a specific technical implementation, with a design motivated by technical considerations of the internal functions of computers.

[0027] Referring now to the drawings, exemplary embodiments of the present disclosure will be discussed in further detail.

[0028] Exemplary Computer Vision Model Exemplary embodiments of the present disclosure include a new type of attention module (an example of which can be called a multi-axis self-attention block (Max-SA)) that reduces the quadratic complexity of vanilla attention to linear without losing any nonlocality by decomposing the fully dense attention mechanism into two sparse forms: local attention and global attention. Because of Max-SA's flexibility and scalability, the block can contribute to a vision backbone (an example of which can be called MaxViT) by simply stacking alternate layers of Max-SA with convolution operators in a hierarchical architecture, one example of which is shown in FIG. 2. In some embodiments, the convolution operators can include an inverted linear bottleneck layer with depth-separable convolutions. One exemplary convolution block of this type is the MBConv block from Howard et al., "Mobilenets: Efficient convolutional neural networks for mobile vision applications." arXiv preprint arXiv:1704.04861. However, other convolutional operators, layers, or blocks can be used in addition or instead. MaxViT benefits from global and local receptive fields throughout the network, from shallow to deep stages, demonstrating excellent performance in terms of both modeling capacity and generalization ability.

[0029] Exemplary Attention Mechanisms

[0030] Self-attention allows spatial fusion across spatial (or sequence) locations and benefits from content-dependent weights based on regularized pairwise similarities. Standard self-attention defined in Dosovitskiy et al. and Vaswani et al. (cited in full above) is location-unaware, i.e., non-translation-equivariant, and therefore does not benefit from the significant inductive bias typically imparted to ConvNets. Relative self-attention has been proposed to improve vanilla attention by introducing a relative learned bias added to the attention weights, which has been shown to consistently outperform original attention for many vision tasks. In this work, some exemplary implementations can use pre-regularized relative self-attention defined in Dai et al. as a critical attention operator in MaxViT. See Dai et al., Coatnet: Marrying convolution and attention for all data sizes. Advances in Neural Information Processing Systems 34 (2021).

[0031] Exemplary Multi-Axis Attention

[0032] Global interaction is one of the key advantages of self-attention compared to local convolutions. However, directly applying attention along the entire space is typically computationally infeasible because the attention operator requires quadratic complexity. To address this issue, this disclosure provides a multi-axis approach that decomposes full-size attention into two sparse forms—local and global—by simply decomposing the spatial axes.

[0033]

number

[0034]

number

[0035] Despite bypassing the notoriously computationally heavy nature of full self-attention, local attention models have been observed to underfit large-scale datasets. Inspired by block attention, exemplary implementations utilize a surprisingly simple yet effective method for obtaining sparse global attention, which can be called grid attention. Instead of partitioning the feature map using a fixed window size, the global attention portion is partitioned using a fixed G × G uniform grid of shape

[0036]

number

[0037]

number

[0038] By using the same fixed window and grid size (e.g., one example is P=G=7), some exemplary implementations can perfectly balance the computation between local and global operations, both of which have only linear complexity with respect to spatial size or array length.

[0039] It should be noted that the exemplary proposed Max-SA module can be a drop-in replacement for the Swin attention module with exactly the same number of parameters and FLOPs. Yet, it enjoys global interaction capabilities without requiring masking, padding, or cyclic shifting, making the implementation more friendly to preferably shifted windowing schemes. For example, multi-axis attention can be easily implemented with einops without modifying the original attention computation (Rogozhnikov, A.: Einops: Clear and reliable tensor manipulations with einstein-like notation. In: International Conference on Learning Representations (2022)).

[0040] In some exemplary implementations, two types of attention can be stacked in a serial configuration to obtain both local and global interactions within a single block, as shown in Figure 3. Also in some exemplary implementations, using MBConv with attention further enhances the trainability of the network as well as generalization, as in using MBConv with attention. Using a convolutional layer (e.g., MBConv layer) before attention provides another advantage in that depthwise convolution can be considered as conditional positional encoding (CPE), freeing the proposed model from an explicit positional encoding layer.

[0041] It should be noted that the proposed standalone multi-axis attention can be used together or separately for different purposes—block attention for local interaction and grid attention for global fusion. These elements can be easily plugged into many vision architectures, especially for high-resolution tasks that can benefit from global interaction with acceptable computational overhead.

[0042] Exemplary Architecture Variations

[0043] Another exemplary aspect of the present disclosure is directed to a series of simple architecture variations that explore and demonstrate the effectiveness of the proposed multi-axis self-attention block, as shown in FIG. 2. Some exemplary architectures use a hierarchical backbone similar to common ConvNet practice, in which the input is first downsampled using a Conv3×3 layer within the stem stage (S0). The body of the exemplary network encompasses four stages (S1-S4), each with half the resolution (hidden dimension) of the previous one with double the number of channels. In the exemplary network shown in FIG. 2, the same MaxViT block is employed throughout the backbone. Downsampling can be applied within the Depthwise Conv3×3 layer of the first MBConv block in each stage. The expansion and contraction factors for the inverted bottleneck and squeeze-excitation (SE) are 4 and 0.25 as default examples, although other values ​​can be used. For all attention blocks, the attention headsize can be set to, for example, 32. The exemplary model can be scaled up by increasing the number of blocks per stage B and channel dimension C. The architectural configurations of the four exemplary MaxViT variants are summarized in Table 1 shown below.

[0044] [Table 1]

[0045] [Example model visualization]

[0046] As introduced above, Figure 2 depicts a graphical illustration of an exemplary computer vision model 200 including multiple exemplary multi-axis self-attention blocks 202, according to an exemplary embodiment of the present disclosure. Although multiple multi-axis self-attention blocks 202 are shown in the exemplary illustrated implementation of model 200, other model architectures according to the present disclosure may include fewer (e.g., one or more) multi-axis self-attention blocks 202. Computer vision model 200 can process an input image 204 to generate an output prediction 206.

[0047] According to aspects of the present disclosure, each of the one or more multi-axis self-attention blocks 202 may include a local processing portion 208 and a global processing portion 210. The local processing portion 208 may be configured to perform a local attention operation 212 on a first set of feature data (e.g., feature data at location 214). The global processing portion 210 is configured to perform a global attention operation 216 on a second set of feature data (e.g., feature data at location 218).

[0048] In some implementations, the global processing portion 210 and the local processing portion 208 are arranged in a serial configuration relative to each other, as illustrated in Figure 2. As one example, the local processing portion 208 may be positioned before the global processing portion 210 (i.e., in terms of data flow), as illustrated in Figure 2. However, in other implementations, the global processing portion 210 may be positioned before the local processing portion 208 (i.e., in terms of data flow).

[0049] In some implementations, as illustrated in FIG. 2 , the local processing portion 208 may include a first feedforward network 220 followed by a local attention operation 212, and the global processing portion 210 may include a second feedforward neural network 222 followed by a global attention operation 216.

[0050]

[0033] Referring now to Figure 3, Figure 3 illustrates a graphical representation of an exemplary portion of an exemplary multi-axis self-attention block, according to an exemplary embodiment of the present disclosure. In particular, Figure 3 illustrates an exemplary local attention operation 312 and an exemplary global attention operation 316.

[0051] The local attention portion can be configured to perform a local attention operation 312 on the first set of feature data (e.g., data at location 320) by partitioning 322 the first set of feature data 320 into multiple local windows. For example, as shown in FIG. 3, partitioning 322 has created four local windows, each having a size of 4×4. The local attention operation 312 can include individually performing self-attention on each of the multiple local windows. In some implementations, each of the multiple local windows has a predefined window size. In other implementations, the number of local windows can be predefined, and the window size is adaptive. In some implementations, the multiple local windows may be non-overlapping. In other implementations, the multiple local windows may overlap.

[0052] In some implementations, the global attention portion can be configured to perform a global attention operation 316 on the second set of feature data (e.g., data at location 324) by partitioning 326 the second set of feature data 324 into multiple global windows based on a grid pattern. For example, partitioning 326 results in four global windows, each having a defined grid pattern and including several non-adjacent feature values. As one example, the grid pattern can be a fixed, uniform grid, such that the size of each of the multiple global windows is adaptive. The global attention operation 316 can then include individually performing self-attention on each of the multiple global windows.

[0053] 2, in some implementations, multi-axis self-attention block 202 may include a convolution portion 224 configured to perform a convolution operation on the third set of feature data (e.g., the feature data at location 226). As an example, convolution portion 224 may be positioned (i.e., in terms of data flow) before local processing portion 208 and global processing portion 210. In some implementations, convolution portion 224 may include an inverted linear bottleneck layer with depth unit separable convolution and a squeeze-and-excite layer.

[0054] 2, an example computer vision model 200 can include multiple multi-axis self-attention blocks 202. For example, multiple multi-axis self-attention blocks can be sequentially arranged with respect to each other (e.g., to form a "backbone").

[0055] As discussed, the model 200 can process image inputs 204 to generate output predictions 206. By way of example, the output predictions 206 can be image classification predictions, image recognition predictions, object recognition predictions, and / or various other computer vision task outputs.

[0056] In other implementations, a model as described herein can be used to perform image generation tasks. As one example, Figure 4 depicts a graphical diagram of an exemplary network architecture including an exemplary multi-axis self-attention block, according to an exemplary embodiment of the present disclosure.

[0057] As illustrated in Figure 4, the model can receive input (e.g., latent embeddings) and, in response, generate an output image. The model can include several GAN ​​blocks, each of which includes a global attention portion and a local attention portion. For example, the global attention portion can be arranged before the local attention portion in a serial configuration. In some implementations, each GAN block can further include a convolution block (e.g., an MBConv block) following the local attention portion.

[0058] More specifically, as shown in Fig. 4, at every stage, the model can include a cross-attention module to focus features on the latent embedding projected from the input code, and the input code can then be fed into the proposed MaxViT block, which includes grid attention, block attention, and MBConv layers. Unlike the example models shown in Figs. 2 and 4, the order of applying the three layers is reversed from global to local.

[0059] Exemplary Devices and Systems 5A illustrates a block diagram of an exemplary computing system 100 for performing computer vision tasks, according to an exemplary embodiment of the present disclosure. The system 100 includes a user computing device 102, a server computing system 130, and a training computing system 150, communicatively coupled via a network 180.

[0060] The user computing device 102 can be any type of computing device, such as, for example, a personal computing device (e.g., a laptop or desktop), a mobile computing device (e.g., a smartphone or tablet), a gaming console or controller, a wearable computing device, an embedded computing device, or any other type of computing device.

[0061] The computing device 102 includes one or more processors 112 and memory 114. The one or more processors 112 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be a single processor or multiple operatively connected processors. The memory 114 can include one or more non-transitory computer-readable storage media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 114 can store data 116 and instructions 118 that are executed by the processor 112 to cause the user computing device 102 to perform operations.

[0062] In some implementations, the user computing device 102 can store or include one or more machine-learned models 120. For example, the machine-learned models 120 can be or otherwise include various machine-learned models, such as neural networks (e.g., deep neural networks), or other types of machine-learned models, including nonlinear and / or linear models. The neural networks can include feedforward neural networks, recurrent neural networks (e.g., long-short-term memory recurrent neural networks), convolutional neural networks, or other forms of neural networks. Some exemplary machine-learned models can leverage attention mechanisms, such as self-attention. For example, some exemplary machine-learned models can include multi-head self-attention models (e.g., Transformer models).

[0063] In some implementations, one or more machine-learned models 120 may be received from a server computing system 130 over a network 180, may be stored in a user computing device memory 114, and may then be used or otherwise implemented by one or more processors 112. In some implementations, a user computing device 102 may implement multiple parallel instances of a single machine-learned model 120 (e.g., to perform parallel vision tasks across multiple instances of an image).

[0064] Additionally or alternatively, one or more machine-learned models 140 can be included in or otherwise stored on and implemented by a server computing system 130 that communicates with the user computing device 102 according to a client-server relationship. For example, the machine-learned models 140 can be implemented by the server computing system 140 as part of a web service (e.g., a computer vision service). Thus, one or more models 120 can be stored and implemented on the user computing device 102 and / or one or more models 140 can be stored and implemented on the server computing system 130.

[0065] The user computing device 102 may also include one or more user input components 122 that receive user input. For example, the user input component 122 may be a touch-sensitive component (e.g., a touch-sensitive display screen or touchpad) that is sensitive to the touch of a user input object (e.g., a finger or stylus). The touch-sensitive component may serve to implement a virtual keyboard. Other exemplary user input components include a microphone, a traditional keyboard, or other means by which a user can provide user input.

[0066] The server computing system 130 includes one or more processors 132 and memory 134. The one or more processors 132 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be a single processor or multiple operably connected processors. The memory 134 can include one or more non-transitory computer-readable storage media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 134 can store data 136 and instructions 138 that are executed by the processor 132 to cause the server computing system 130 to perform operations.

[0067] In some implementations, server computing system 130 includes or is otherwise implemented by one or more server computing devices. When server computing system 130 includes multiple server computing devices, such server computing devices may operate according to a sequential computing architecture, a parallel computing architecture, or some combination thereof.

[0068] As described above, the server computing system 130 can store or otherwise include one or more machine-learned models 140. For example, the models 140 can be or otherwise include various machine-learned models. Exemplary machine-learned models include neural networks or other multi-layer nonlinear models. Exemplary neural networks include feedforward neural networks, deep neural networks, recurrent neural networks, and convolutional neural networks. Some exemplary machine-learned models can utilize attention mechanisms such as self-attention. For example, some exemplary machine-learned models can include multi-head self-attention models (e.g., Transformer models).

[0069] The user computing device 102 and / or the server computing system 130 can train the models 120 and / or 140 by interacting with a training computing system 150 that is communicatively coupled via a network 180. The training computing system 150 can be separate from the server computing system 130 or can be part of the server computing system 130.

[0070] The training computing system 150 includes one or more processors 152 and memory 154. The one or more processors 152 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be a single processor or multiple operably connected processors. The memory 154 can include one or more non-transitory computer-readable storage media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 154 can store data 156 and instructions 158 that are executed by the processor 152 to cause the training computing system 150 to perform operations. In some implementations, the training computing system 150 includes or is otherwise implemented by one or more server computing devices.

[0071] The training computing system 150 may include a model trainer 160 that trains the machine-learned models 120 and / or 140 stored on the user computing device 102 and / or the server computing system 130 using various training or learning techniques, such as backpropagation. For example, a loss function may be backpropagated through the model(s) to update one or more parameters of the model(s) (e.g., based on the gradient of the loss function). Various loss functions may be used, such as mean squared error, likelihood loss, cross-entropy loss, hinge loss, and / or various other loss functions. Gradient descent may be used to iteratively update parameters over several training iterations.

[0072] In some implementations, performing backpropagation of the error may include performing truncated backpropagation over time. The model trainer 160 may implement several generalization techniques (e.g., weight decay, dropout, etc.) to improve the generalization ability of the trained model.

[0073] In particular, model trainer 160 can train machine-learned model 120 and / or 140 based on a set of training data 162. In some implementations, training examples can be provided by user computing device 102 if the user provides consent. Thus, in such implementations, model 120 provided to user computing device 102 can be trained by training computing system 150 against user-specific data received from user computing device 102. In some examples, this process can be referred to as personalizing the model.

[0074] Model trainer 160 includes computer logic utilized to provide desired functionality. Model trainer 160 can be implemented in hardware, firmware, and / or software controlling a general-purpose processor. For example, in some embodiments, model trainer 160 includes program files stored on a storage device, loaded into memory, and executed by one or more processors. In other embodiments, model trainer 160 includes one or more sets of computer-executable instructions stored on a tangible computer-readable storage medium, such as RAM, a hard disk, or optical or magnetic media.

[0075] Network 180 may be any type of communications network, such as a local area network (e.g., an intranet), a wide area network (e.g., the Internet), or some combination thereof, and may include any number of wired or wireless links. Generally, communications over network 180 may occur over any type of wired and / or wireless connection, using a wide variety of communications protocols (e.g., TCP / IP, HTTP, SMTP, FTP), encodings or formats (e.g., HTML, XML), and / or protection schemes (e.g., VPN, Secure HTTP, SSL).

[0076] The machine-learned models described herein may be used in a variety of tasks, applications, and / or use cases.

[0077] In some implementations, the input to the machine-learned model(s) of the present disclosure may be image data. The machine-learned model(s) may process the image data to generate an output. As an example, the machine-learned model(s) may process the image data to generate an image recognition output (e.g., a recognition of the image data, a latent embedding of the image data, an encoded representation of the image data, a hash of the image data, etc.). As another example, the machine-learned model(s) may process the image data to generate an image segmentation output. As another example, the machine-learned model(s) may process the image data to generate an image classification output. As another example, the machine-learned model(s) may process the image data to generate an image data modification output (e.g., an alteration of the image data, etc.). As another example, the machine-learned model(s) may process the image data to generate an encoded image data output (e.g., an encoded and / or compressed representation of the image data, etc.). As another example, the machine-learned model(s) may process the image data to generate an upscaled image data output. As another example, the machine-learned model(s) can process the image data to generate a predicted output.

[0078] In some cases, the input includes visual data and the task is a computer vision task. In some cases, the input includes pixel data of one or more images and the task is an image processing task. For example, the image processing task can be image classification, and the output is a set of scores, each score corresponding to a different object class and representing the likelihood that one or more images show an object belonging to the object class. The image processing task can be object detection, and the image processing output identifies one or more regions in one or more images and, for each region, the likelihood that the region shows an object of interest. As another example, the image processing task can be image segmentation, and the image processing output defines, for each pixel in one or more images, a respective likelihood for each category of a set of predetermined categories. For example, the set of categories can be foreground and background. As another example, the set of categories can be object classes. As another example, the image processing task can be depth estimation, and the image processing output defines, for each pixel in one or more images, a respective depth value. As another example, the image processing task may be motion estimation, where the network input includes multiple images and the image processing output defines, for each pixel of the input images, the motion of the scene represented by that pixel between the images in the network input.

[0079] 5A illustrates one exemplary computing system that can be used to implement the present disclosure. Other computing systems can be used as well. For example, in some implementations, user computing device 102 can include model trainer 160 and training dataset 162. In such implementations, model 120 can be both trained and used locally on user computing device 102. In some such implementations, user computing device 102 can implement model trainer 160 that personalizes model 120 based on user-specific data.

[0080] 5B depicts a block diagram of an exemplary computing device 10 for performing operations according to an exemplary embodiment of the present disclosure. The computing device 10 can be a user computing device or a server computing device.

[0081] Computing device 10 includes several applications (e.g., applications 1-N). Each application includes its own machine learning library and machine-learned model(s). For example, each application may include a machine-learned model. Exemplary applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc.

[0082] 5B, each application can communicate with several other components of the computing device, such as one or more sensors, a context manager, a device state component, and / or additional components. In some implementations, each application can communicate with each device component using an API (e.g., a public API). In some implementations, the API used by each application is specific to that application.

[0083] 5C depicts a block diagram of an exemplary computing device 50 for performing operations according to an exemplary embodiment of the present disclosure. Computing device 50 can be a user computing device or a server computing device.

[0084] Computing device 50 includes several applications (e.g., applications 1-N). Each application communicates with a central intelligence layer. Exemplary applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc. In some implementations, each application can communicate with the central intelligence layer (and the model(s) stored therein) using an API (e.g., a common API across all applications).

[0085] The central intelligence layer includes several machine-learned models. For example, as illustrated in FIG. 5C , each machine-learned model can be provided for each application and managed by the central intelligence layer. In other embodiments, two or more applications can share a single machine-learned model. For example, in some embodiments, the central intelligence layer can provide a single model to all applications. In some embodiments, the central intelligence layer is included within or otherwise implemented by the operating system of the computing device 50.

[0086] The central intelligence layer can communicate with a central device data layer. The central device data layer can be a centralized repository of data for the computing device 50. As illustrated in FIG. 5C , the central device data layer can communicate with several other components of the computing device, such as, for example, one or more sensors, a context manager, a device state component, and / or additional components. In some implementations, the central device data layer can communicate with each device component using an API (e.g., a private API).

[0087] [Additional Disclosures] The technology described herein refers to servers, databases, software applications, and other computer-based systems, as well as actions performed on and information sent to and from such systems. The inherent flexibility of computer-based systems allows for a wide variety of possible configurations, combinations, and divisions of tasks and functionality among components. For example, the processes discussed herein can be implemented using a single device or component, or multiple devices or components working in combination. Databases and applications can be implemented on a single system or distributed across multiple systems. Distributed components can operate in serial or parallel fashion.

[0088] While the subject matter of the present disclosure has been described in detail with reference to various specific exemplary embodiments thereof, each example is provided for purposes of explanation and not limitation of the present disclosure. Those skilled in the art, upon understanding the foregoing, will readily be able to make modifications, variations, and equivalents to such embodiments. Accordingly, the present disclosure does not exclude the inclusion of such modifications, variations, and / or additions to the subject matter as would be readily apparent to one skilled in the art. For example, features illustrated or described as part of one embodiment can be used with another embodiment to yield yet a further embodiment. Accordingly, the present disclosure is intended to cover such modifications, variations, and equivalents.

Claims

1. 1. A computing system for performing computer vision tasks with improved efficiency, comprising: one or more processors; one or more computer-readable storage media, wherein the one or more computer-readable storage media: Collectively storing machine-learned computer vision models configured to process input image data to generate output predictions, the machine-learned computer vision models including one or more multi-axis self-attention blocks, each of the one or more multi-axis self-attention blocks: a local processing portion configured to perform a local attention operation on the first set of feature data; a global processing portion configured to perform a global attention operation on the second set of feature data; the global processing portion and the local processing portion are arranged in a serial configuration with respect to each other; The overall attention part is partitioning the second set of feature data into a plurality of global windows based on a grid pattern; performing self-attention individually for each of the plurality of global windows; and performing the global attention operation on the second set of feature data by Computing system.

2. The computing system of claim 1 , wherein for at least one of the one or more multi-axis self-attention blocks, the local processing portion is positioned before the global processing portion.

3. 10. The computing system of claim 1, wherein at least one of the one or more multi-axis self-attention blocks includes a convolution portion configured to perform a convolution operation on a third set of feature data.

4. 4. The computing system of claim 3, wherein for the at least one of the one or more multi-axis self-attention blocks, the convolution portion is positioned before the local processing portion and the global processing portion.

5. The computing system of claim 3 or claim 4, wherein the convolution portion includes an inverse linear bottleneck layer with depth-unit separable convolution.

6. The computing system of claim 1 , wherein the machine-learned computer vision model includes a plurality of multi-axis self-attention blocks.

7. The computing system of claim 6 , wherein the plurality of multi-axis self-attention blocks are arranged sequentially with respect to each other.

8. The local attention part is Partitioning the first set of feature data into a plurality of local windows; performing self-attention individually for each of the plurality of local windows; and performing the local attention operation on the first set of feature data by The computing system of claim 1 .

9. The computing system of claim 8 , wherein each of the plurality of local windows has a predefined window size.

10. The computing system of claim 1 , wherein the grid pattern comprises a fixed uniform grid such that the size of each of the plurality of global windows is adaptive.

11. 2. The computing system of claim 1, wherein for at least one of the one or more multi-axis self-attention blocks, the local processing portion includes a first feedforward network following the local attention operation, and the global processing portion includes a second feedforward neural network following the global attention operation.

12. The computing system of claim 1 , wherein the output prediction comprises an image classification prediction, an image recognition prediction, or an object recognition prediction.

13. 1. A computer-implemented method for performing a computer vision task, comprising: obtaining an input image; processing the input image with a machine-learned computer vision model to generate an output prediction, wherein processing the input image with the machine-learned computer vision model includes, in each of one or more multi-axis self-attention blocks of the machine-learned computer vision model: In the local processing portion of the multi-axis self-attention block, performing a first partitioning operation to partition the first set of feature data into a plurality of local windows; performing a respective local attention operation for each of the plurality of local windows; In the overall processing portion of the multi-axis self-attention block, performing a second partitioning operation to partition the second set of feature data into a plurality of global windows; performing a respective global attention operation for each of the plurality of global windows; processing, wherein the local processing portion and the global processing portion are arranged in a serial configuration with respect to each other; providing the output prediction as an output; and 20. A computer-implemented method comprising:

14. The computer-implemented method of claim 13 , wherein for at least one of the one or more multi-axis self-attention blocks, the local processing portion is positioned before the global processing portion.

15. 14. The computer-implemented method of claim 13, wherein at least one of the one or more multi-axis self-attention blocks includes a convolution portion configured to perform a convolution operation on a third set of feature data.

16. 16. The computer-implemented method of claim 15, wherein for the at least one of the one or more multi-axis self-attention blocks, the convolution portion is positioned before the local processing portion and the global processing portion.

17. 17. The computer-implemented method of claim 15 or 16, wherein the convolution portion comprises an inverse linear bottleneck layer with depth unit separable convolution.

18. The computer-implemented method of claim 13 , wherein the machine-learned computer vision model includes a plurality of multi-axis self-attention blocks arranged in sequence with respect to one another.

19. 1. A computing system for performing image generation tasks with improved efficiency, comprising: one or more processors; one or more computer-readable storage media, wherein the one or more computer-readable storage media: collectively storing a machine-learned image generation model configured to process input data to generate an output image, the machine-learned image generation model including one or more multi-axis self-attention blocks, each of the one or more multi-axis self-attention blocks: a global processing portion configured to perform a global attention operation on the second set of feature data; a local processing portion configured to perform a local attention operation on the first set of feature data; the global processing portion and the local processing portion are arranged in a serial configuration with respect to each other; Computing system.

Citation Information

Patent Citations

  • Point cloud data processing method, neural network training method and related equipment

    CN114140841A

  • System for and method of deep learning diagnosis of plaque erosion through optical coherence tomography

    WO2022051211A1