Multi-Axis Vision Transformer
The multi-axis vision transformer (MaxViT) addresses the scalability and efficiency challenges of existing vision transformer architectures by using multi-axis self-attention blocks, achieving superior performance in computer vision tasks with reduced computational requirements.
Patent Information
- Application Number
- JP2024557764
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-03-30
- Filing Date
- 2023-03-30
- Publication Date
- 2025-04-30
- Estimated Expiration
- 2043-03-30
AI Technical Summary
Current machine learning architectures for vision tasks, such as transformers, face challenges in scalability and computational efficiency due to the quadratic complexity of self-attention mechanisms, particularly when dealing with larger image sizes and data regimes.
The proposed solution is a multi-axis vision transformer (MaxViT) that incorporates multi-axis self-attention blocks, which decompose the attention mechanism into local and global attention operations. This approach reduces complexity to linear, enabling efficient global-local spatial interactions across various input resolutions.
MaxViT achieves state-of-the-art performance in various computer vision tasks, including image classification, object detection, and image generation, while reducing computational resources and improving scalability.
Smart Images

Figure 2025513748000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates generally to more efficient machine learning architectures for vision tasks. More specifically, the present disclosure relates to a multi-axis vision transformer that includes one or more multi-axis blocks that include a local attention axis and a global attention axis 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 remarkably 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 progress of self-attention models such as transformers in natural language processing (Vaswani et al., Attention is all you need. Advances in Neural Information Processing Systems 30 (2017)), many researchers have started to introduce 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 probably 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 a large dataset, 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 later efforts have investigated sparse transformer models adapted for vision tasks, such as local attention. These methods typically reintroduce hierarchical architectures to compensate for the lack of non-locality. 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 over shifted non-overlapping windows. For the first time, this approach outperforms ConvNets on the ImageNet benchmark with pure vision transformers. Despite having more flexibility and generalization than the 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 in 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 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 of performing a computer vision task. The method includes obtaining an input image. The method includes processing the input image with a machine-learned computer vision model to generate an output prediction, 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 partitioning operation in a local processing portion of the multi-axis self-attention block to partition 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 includes performing, in a global processing portion of the multi-axis self-attention block, a second partitioning operation to partition 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 prediction 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 description 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. [Diagram 2] 1 illustrates a graphical diagram of an example network architecture including an example multi-axis self-attention block, according to an example embodiment of the present disclosure. [Diagram 3] 1 illustrates a graphical diagram 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 example network architecture including an example multi-axis self-attention block, according to an example 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 PREFERRED EMBODIMENTS
[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. 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. The present disclosure also presents a new architectural element by effectively fusing convolution with the proposed multi-axis attention model. In addition, the present 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.
[0018] The effectiveness of the exemplary implementation of the proposed model is 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 performs favorable performance on visual aesthetic evaluation with object detection as the backbone. The proposed model also exhibits strong generative modeling capabilities on ImageNet, proving the excellent potential of MaxViT blocks as universal vision modules.
[0019] More specifically, this disclosure presents a new type of transformer module, called multi-axis self-attention (Max-SA), which successfully serves as a basic architectural component that can perform both local and global spatial interactions within a single block. Compared with 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 global receptive fields. Moreover, even in earlier, high-resolution stages, Max-SA can be used as a global standalone attention module in any layer of the network with negligible linear complexity.
[0020] To prove its effectiveness and generality, a simple yet effective vision backbone is proposed. An exemplary implementation of the backbone can be called the Multi-Axis Vision Transformer (MaxViT). The backbone can be constructed by hierarchically stacking iterative blocks composed of Max-SA and convolution. MaxViT is distinguished 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 questions. 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 curves.
[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. FLOPs performance scaling curve under ImageNet-1K training settings at input resolution 224x224. Figure 1B shows the accuracy vs. parameters scaling curve under ImageNet-1K fine-tuning settings that allow for higher sizes (384 / 512). An exemplary implementation of the proposed model shows superior performance in terms of both accuracy vs. computation tradeoff and accuracy vs. parameters 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 spread global attention that enjoys global sensing 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 an 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 86.5% ImageNet-1K top-1 accuracy, and with pre-training on ImageNet-21K, the model achieves 88.7% top-1 accuracy. For downstream tasks, MaxViT performs favorable performance for visual aesthetic evaluation with object detection as the backbone. The proposed model also expresses strong generative modeling capabilities for ImageNet, proving the excellent potential of MaxViT blocks as a universal vision module, and 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 the performance of the computer itself as it relates to a specific technical objective (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 less computational resources. Thus, the proposed system and model saves computational resources such as processor utilization, memory utilization, network bandwidth, etc. 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] As another exemplary technical effect, 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 functioning of a computer.
[0027] Referring now to the drawings, exemplary embodiments of the present disclosure will be discussed in further detail.
[0028] Example 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 full dense attention mechanism into two sparse forms: local attention and global attention. Due to the flexibility and scalability of Max-SA, the block can contribute to the 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 implementations, the convolution operators can include an inverted linear bottleneck layer with depth unit separable convolution. 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, and demonstrates superior 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 biases 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 may 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 not computationally feasible since 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 heavy computation of full self-attention, local attention models have been observed to underfit large-scale datasets. Inspired by block attention, an exemplary implementation can utilize a surprisingly simple yet effective method to obtain sparse global attention, which can be called grid attention. Instead of partitioning the feature map using a fixed window size, the global attention part 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 will be noted that the exemplary proposed Max-SA module can be a drop-in replacement of the Swin attention module with exactly the same number of parameters and FLOPs. Yet it enjoys the global interaction capability without the need for 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. Some exemplary implementations also use MBConv with attention, so that a convolutional block (e.g., MBConv block) before multi-axis attention further enhances the trainability of the network as well as generalization. Using a convolutional layer (e.g., MB-Conv layer) before attention brings 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. Their elements can be easily plugged into many vision architectures, especially for high-resolution tasks that can benefit from global interaction with acceptable computation.
[0042] Exemplary Architectural Variations
[0043] Another exemplary aspect of the present disclosure is directed to a series of simple architecture variants that explore and prove 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, where the input is first downsampled using a Conv3×3 layer in the stem stage (S0). The body of the exemplary network encompasses four stages (S1-S4), each of which has 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 in the Depthwise Conv3×3 layer of the first MBConv block in each stage. The expansion and contraction ratios for the inverted bottleneck and squeeze-excitation (SE) are 4 and 0.25 as default examples, and other values can be used. For all attention blocks, the attention head size 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 example 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. The computer vision model 200 may 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 with respect to each other, as illustrated in Figure 2. As one example, the local processing portion 208 may be located 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 located 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 following the local attention operation 212, and the global processing portion 210 may include a second feedforward neural network 222 following the global attention operation 216.
[0050]
[0033] Referring now to Figure 3, Figure 3 illustrates a graphical diagram of an example portion of an example multi-axis self-attention block, according to an example embodiment of the present disclosure. In particular, Figure 3 illustrates an example local attention operation 312 and an example 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 a plurality of local windows. For example, as shown in FIG. 3, the partitioning 322 has created four local windows, each having a size of 4×4. The local attention operation 312 can include performing self-attention on each of the plurality of local windows individually. In some implementations, each of the plurality of 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 plurality of local windows may be non-overlapping. In other implementations, the plurality of local windows may be overlapping.
[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 a number of global windows based on a grid pattern. For example, the 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 performing self-attention on each of the multiple global windows individually.
[0053] 2, in some implementations, the 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, the convolution portion 224 may be positioned (i.e., in terms of data flow) before the local processing portion 208 and the global processing portion 210. In some implementations, the convolution portion 224 may include an inverted linear bottleneck layer having a 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. As examples, 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, models 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 FIG. 4, the model can receive an input (e.g., a latent embedding) 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 cross-attention module can be used, and the input code can then be fed into the proposed MaxViT block, which includes grid attention, block attention, and MBConv layers. Different from 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 a 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 processors operably connected. 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 non-linear and / or linear models. The neural networks can include feed-forward 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 may 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 may 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 may be stored and implemented in the user computing device 102 and / or one or more models 140 may be stored and implemented in 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 may provide user input.
[0066] The server computing system 130 includes one or more processors 132 and a 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 processors operably connected. 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 feed-forward neural networks, deep neural networks, recurrent neural networks, and convolutional 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-headed 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 processors operably connected. 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 can 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 of errors. For example, a loss function can 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 can be used, such as mean squared error, likelihood loss, cross entropy loss, hinge loss, and / or various other loss functions. Gradient descent can be used to iteratively update the 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 models 120 and / or 140 based on a set of training data 162. In some implementations, the 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 implementations, model trainer 160 includes program files stored in a storage device, loaded into memory, and executed by one or more processors. In other implementations, model trainer 160 includes one or more sets of computer-executable instructions stored in a tangible computer-readable storage medium, such as RAM, a hard disk, or an optical or magnetic medium.
[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. In general, communications over network 180 may occur over any type of wired and / or wireless connections, 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., recognition of the image data, 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., 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 of one or more images, a respective likelihood for each category of a set of predefined 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 comprises multiple images and the image processing output defines, for each pixel of the input images, the motion of the scene represented by those pixels 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, the user computing device 102 can include a model trainer 160 and a training dataset 162. In such implementations, the model 120 can be both trained and used locally on the user computing device 102. In some such implementations, the user computing device 102 can implement the model trainer 160 that personalizes the model 120 based on user-specific data.
[0080] 5B illustrates 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, for example, 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 illustrates a block diagram of an exemplary computing device 50 for performing operations according to an exemplary embodiment of the present disclosure. The 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 per 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, which 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 functions between components. For example, the processes discussed herein may be implemented using a single device or component, or multiple devices or components working in combination. Databases and applications may be implemented on a single system or distributed across multiple systems. Distributed components may operate in serial or parallel fashion.
[0088] Although the subject matter of the present disclosure has been described in detail with respect to various specific and exemplary embodiments thereof, each example is provided for the purpose of illustration and not for the purpose of limiting the present disclosure. Those skilled in the art, upon understanding the above content, can easily make modifications, variations, and equivalents of such embodiments. Thus, 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 those skilled in the art. For example, features illustrated or described as part of one embodiment can be used with another embodiment to produce yet another embodiment. Thus, 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; and one or more non-transitory computer-readable media, the one or more non-transitory computer-readable media comprising: collectively storing a machine-learned computer vision model configured to process input image data to generate an output prediction, the machine-learned computer vision model 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 holistic processing portion configured to perform a holistic attention operation on the second set of feature data; the global processing portion and the local processing portion are arranged in a series configuration with respect to each other; 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. 3. 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. 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 inverted 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 sequentially arranged with respect to each other.
8. The local attention part is Partitioning the first set of feature data into a number of local windows; performing self-attention for each of the plurality of local windows individually; and performing the local attention operation on the first set of feature data by A computing system according to any preceding claim.
9. The computing system of claim 8 , wherein each of the plurality of localized windows has a predefined window size.
10. 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 for each of the plurality of global windows individually; and performing the global attention operation on the second set of feature data by A computing system according to any one of claims 1 to 9.
11. The computing system of claim 10 , wherein the grid pattern comprises a fixed uniform grid such that a size of each of the plurality of global windows is adaptive.
12. 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 neural network following the local attention operation and the global processing portion includes a second feedforward neural network following the global attention operation.
13. The computing system of claim 1 , wherein the output prediction comprises an image classification prediction, an image recognition prediction, or an object recognition prediction.
14. 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, the processing of the input image with the machine-learned computer vision model comprising: 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 part 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; 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 4. A computer-implemented method comprising:
15. 15. The computer-implemented method of claim 14, 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.
16. 16. The computer-implemented method of claim 14 or 15, 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.
17. 17. The computer-implemented method of claim 16, 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.
18. 18. The computer-implemented method of claim 16 or 17, wherein the convolution portion comprises an inverted linear bottleneck layer with depth unit separable convolution.
19. 19. The computer-implemented method of claim 14, wherein the machine-learned computer vision model comprises a plurality of multi-axis self-attention blocks arranged in sequence with respect to each other.
20. 1. A computing system for performing image generation tasks with improved efficiency, comprising: one or more processors; and one or more non-transitory computer-readable media, the one or more non-transitory computer-readable media comprising: 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 series 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
Cited By
Deep learning model generation device and deep learning model generation method
JP2026020262A