Elamur Research

SwiftFormer: Efficient Additive Attention for Transformer-based Real-time Mobile Vision Applications

Paper · 2023 · Abdelrahman Shaker, Muhammad Maaz, Hanoona Rasheed et al.

Summary

A vision system running on a phone has to make sense of an image within a tight time budget. Convolutions can process nearby details efficiently, but a decision about one region may depend on something much farther away. Global self-attention gives a vision transformer that wider view by comparing features from different locations. The comparison becomes expensive when the image is represented by many locations, since the usual calculation assigns a score to every pair. SwiftFormer asks whether those separate pairwise scores are necessary to get useful image-wide information.

The authors’ alternative, efficient additive attention, first learns how strongly each location should contribute to a shared description of the image. It pools the contributions into a single vector, then combines that vector with the features at each location through element-wise multiplication. A linear layer transforms the result. Every location can draw on information from across the image while retaining its own features, and the amount of work in the attention calculation grows linearly with the number of locations at a fixed feature width. This makes it practical to put an attention block at every stage of the network, including early stages that still have finely spaced image features. Convolutions handle local processing at each scale.

On ImageNet-1K classification, SwiftFormer-S achieves 78.5% top-1 accuracy, the share of images for which the highest-ranked prediction is correct. Its inference latency is 0.8 ms on an iPhone 14, and the paper reports that it is more accurate and 2× faster than the MobileViT-v2 comparison. SwiftFormer-L3 reaches 83.0% top-1 accuracy with 1.9 ms latency on the same device. In a comparison against EfficientFormer-L1, the complete SwiftFormer-L1 design gives a reported 1.7% absolute accuracy gain at the same latency. Replacing the baseline’s final-stage attention alone incurs a small accuracy loss. The gain comes with the broader redesign, which also changes local processing and uses attention across the feature hierarchy.

The authors also test SwiftFormer as a feature extractor for tasks that need to locate objects or label parts of an image. With Mask-RCNN on MS-COCO 2017, SwiftFormer-L1 improves both box detection and instance masks over EfficientFormer-L1. It also improves semantic segmentation on ADE20K with a semantic FPN decoder. These experiments show that the simplified attention can support spatial predictions as well as whole-image labels. The direct evidence for phone latency comes from the classification experiments, while the detection and segmentation experiments measure prediction quality.

Deep dive: SwiftFormer: Efficient Additive Attention for Transformer-based Real-time Mobile Vision Applications

SwiftFormer uses additive attention to share information across an image, improving the accuracy and speed of vision networks on an iPhone. · about 31 minutes to read

The problem and its context

Why early image features make global attention expensive

A vision network converts an image into features it can use to make predictions. A feature at a given location is a vector of learned measurements about that region. A token in this paper is one such vector, treated as an entry in a sequence for attention. A grid with finer spatial resolution yields more entries than a coarser grid. Early stages of a vision network commonly work with the finer grids, where neighboring features carry details that subsequent downsampling may compress. The problem is how to let these features exchange information across the image while there are still many of them.

A convolution starts with a small neighborhood. It applies the same learned filter at different locations, so its immediate view moves across the grid with the feature being processed. A stack of local operations can extend the receptive field, the portion of the input that can influence a feature. But an individual local operation has no direct connection to a distant location. The paper treats this as a tradeoff. Convolutions are attractive for mobile inference because they are efficient, while the combination of a local neighborhood and a shared filter constrains how directly an output can respond to the rest of the image.

Standard global self-attention offers a different way to make the connection. Each token produces a query that can be compared with a key from every token, including itself. The scores say how heavily to weight the information supplied by those tokens. A location can draw on a distant part of the image in the same operation that considers its immediate neighbors. The price is a matrix whose rows and columns both correspond to spatial locations. Increasing the length of the sequence enlarges both axes of that matrix. The resulting burden affects the amount of computation and the memory needed to hold the pairwise scores.

This matters when going from a network that performs well on a benchmark to one that must return predictions quickly on a mobile device. The authors care about latency, the time to run an inference, alongside accuracy and estimates of computational work. An architectural change can save operations on paper while retaining projections, reshaping, or indexing that are expensive in the deployed computation. The paper’s question is therefore about the operations used to carry information between locations and whether those operations translate into short measured inference times.

What earlier mobile designs changed

One line of work made the local building blocks cheaper. The MobileNet family used depth-wise separable convolutions, which divide spatial filtering and channel mixing into separate operations, as well as efficient inverted residual blocks. The paper also describes work on dilated depth-wise convolutions, channel shuffling, and grouped pointwise convolutions. Other efforts reduced the number or precision of the learned quantities used at inference, or searched for architectures that performed well under a deployment constraint. These approaches made convolutional networks practical reference points for mobile speed. They left room for a mechanism that could communicate across the image more directly.

Hybrid designs combined lightweight convolutional processing with attention. A common arrangement was to use local operators while the feature grid was large and reserve global attention for later stages. Downsampling between stages reduces the number of locations, so the same kind of pairwise operation becomes more affordable near the end. EfficientFormer is the particular starting point for SwiftFormer. It uses local pooling-based blocks in the earlier part of the network and places multi-head self-attention in the final stage. Multi-head attention performs several attention calculations so the network can learn different ways of relating the input features. Putting it late gives it access to coarser, more processed features and keeps it away from the most expensive spatial grids.

Another line of work changed which tokens could enter a comparison. Swin carries out attention within local windows. The multiscale approach described in the paper reduces spatial features through pooling before attention, and Pyramid Vision Transformer downsamples keys and values. Sparse approaches such as EdgeViT let global attention use a subset of tokens. Each of these changes addresses the size of the attention calculation by limiting the locations compared in some way. Hierarchical designs also reduce resolution as features pass through the network, whether or not sparsity is part of the attention rule.

Other approaches changed the axis or structure of the comparison itself. EdgeNeXt’s transposed attention correlates feature channels across tokens. The comparison matrix is then indexed by channels, which removes the quadratic dependence on spatial token count while leaving a quadratic dependence on channel width. The paper also describes LinFormer’s low-rank approximation of the attention matrix and Reformer’s use of locality-sensitive hashing to group tokens. The authors caution that projections can consume some of the savings promised by a factorization and that Reformer’s efficiency advantage concerns longer sequences than they regard as typical for vision transformers.

MobileViT-v2 is the closest comparison at the level of the attention operation. Its separable self-attention scores queries, uses those scores to pool keys into a context vector, and then uses the vector to modulate values. The expensive interaction between all pairs of spatial tokens gives way to element-wise operations and a reduction across the sequence. The paper also relates its proposal to Fastformer, an additive attention design from language processing in which query, key, and value interactions form a chain of dependent computations. Both comparisons raise a more specific question than whether attention can be made linear in token count. They ask how many separate feature projections and interactions are needed once the shared context itself is compact.

The design choice SwiftFormer tests

SwiftFormer keeps the hierarchical arrangement and gives local processing and global processing a regular place in each stage. It changes how the local features are mixed and replaces dense global attention with a pooled query that interacts with the keys. By removing a separate value interaction, it makes the output depend on a shorter sequence of operations. At the architecture level this puts the same kind of global mixing before and after reductions in spatial resolution.

The placement matters because a global operation on a fine grid receives different features from a global operation on a coarse one. The earlier grid retains a more detailed spatial arrangement. The later grid carries the results of more local processing and downsampling. A single late attention block only receives the latter. SwiftFormer’s shared design across stages lets a fine-scale feature incorporate a description of the rest of the grid before it is passed into coarser processing. The rest of the paper tests whether this cheaper way to exchange information is sufficient for the tasks the authors chose.

The method, step by step

From an image to a hierarchy of features

SwiftFormer first turns the image into a grid of feature vectors. Each stage processes the grid locally, then applies a SwiftFormer Encoder that combines local features with an image-wide summary at the current scale. The summary is rebuilt from the features entering that attention block. After the stage, downsampling gives the next stage a smaller grid with more channels. A channel is one component of the feature vector at each location. More channels give the next stage a wider description of each region, even as there are fewer regions to process.

Within the attention block, it helps to keep separate what gets pooled and what stays spatial. The queries determine both the contents of the shared summary and the relative contribution of different locations to it. The keys are kept as a grid’s worth of separate vectors. After every key has interacted with the same pooled query, the output still has a distinct feature vector for every input location. That is how a global summary can modify the spatial representation while the later stages still have locations to work with.

How SwiftFormer builds local and global image features

The steps in order.

How SwiftFormer builds local and global image featuresStep 1: Embed the image into a feature grid1. Embed the image into a feature gridStep 2: Mix neighboring features with convolutions2. Mix neighboring features with convolutionsStep 3: Project local features into queries and keys3. Project local features into queries and keysStep 4: Pool weighted queries into a global vector4. Pool weighted queries into a global vectorStep 5: Modulate each key with the global vector5. Modulate each key with the global vectorStep 6: Project, add residuals, and mix channels6. Project, add residuals, and mix channelsStep 7: Downsample between stages and repeat7. Downsample between stages and repeat

Three attention calculations that explain the change

The paper starts with ordinary self-attention. Think of the input as a matrix with a row for each spatial token. The row holds the channels for that location. Learned projections turn the same input into queries, keys, and values. Queries describe what each location uses for matching, keys supply the features against which the matches are scored, and values supply the content to be aggregated once the matches have been scored. In the notation the paper uses, the operation is written as follows.

x̂ = Softmax((Q · Kᵀ) / √d) · V

Here x̂ is the output, and Q, K, and V are the projected query, key, and value matrices. Kᵀ is the transpose of K, which exchanges its rows and columns. The centered dot denotes matrix multiplication. The quantity d is the feature width in the paper’s notation, and √d is its square root, used to scale the query-key scores before normalization. Softmax converts the scores for each query into relative weights over the keys. Multiplication by V then combines the value vectors using those weights. In multi-head attention, the heads provide separate views of the input on which to perform attention.

O(n² · d)

Here O describes the order of growth of the computation, n counts the spatial tokens, and d is the feature width. The squared term comes from making a comparison for each query and key pair. The multiplication dot in this complexity expression combines the dependence on token count with the dependence on width. The expression describes the cost of the attention computation in the paper’s account. The measured time for the whole network also includes the projections, local processing, and the execution of those operations on the device.

In the transposed attention used for comparison, the product is arranged so that channels are paired and the accumulation runs across tokens. Each entry in the resulting correlation matrix reflects a relationship between feature dimensions. The matrix then acts on the values at each spatial location. In the paper’s notation, this is the following change.

x̂ = V · Softmax((Qᵀ · K) / √d)

Here x̂ is the output, V contains the values, and Qᵀ is the transpose of the query matrix Q. K is the key matrix. The centered dot denotes matrix multiplication, d is the feature width, and √d scales the channel scores before Softmax turns them into weights. Since the scores connect channels, the multiplication by V applies the channel weights to features at the spatial locations. Information from across the grid has already entered through the product of Qᵀ and K.

O(n · d²)

Here O denotes order of growth, n counts tokens, and d counts feature dimensions. The token dependence is linear because tokens are the axis over which the channel correlations accumulate. The quadratic term now belongs to feature width, since the calculation pairs channels with channels. A stage can therefore benefit from moving away from spatial pairing and still incur substantial work if its feature width is large.

The separable formulation gets global context with a weighted sum. It projects each query to a scalar, normalizes those scalars across locations, and uses them to combine the keys into a context vector. The paper’s sequence of operations can be made explicit by grouping the terms inside the sum.

x̂ = V ∗ Σ(K ∗ Softmax(q))

Here x̂ is the output, V is the value matrix, K is the key matrix, and q is the vector of scalar scores projected from the queries, with an entry for each token. Softmax turns q into context weights across the sequence. The symbol ∗ denotes element-wise multiplication. Within the sum, each token’s weight scales the corresponding row of K. The symbol Σ denotes summation across tokens, yielding a feature vector that is broadcast across the spatial rows of V for the final element-wise product. Broadcasting means applying the same vector to each row without giving it a separate learned copy for each position.

This last calculation makes the point of departure for SwiftFormer easier to see. In separable attention, the scalar scores come from the queries, the summary contains weighted keys, and the output is conditioned by the values. In SwiftFormer, the summary contains weighted queries, and the token-specific part of the interaction comes directly from the keys. The result goes through a linear transformation. Both designs let every token contribute to an operation with a global field of view, but differ in which feature vectors are pooled, which participate at the output, and where the learned linear mapping is used.

Scoring the queries and rebuilding context at each location

SwiftFormer begins with the input embedding matrix x, which has n token rows and d feature columns. The two learned projection matrices Wq and Wk each have d rows and d columns. They turn x into Q and K, respectively. Each projected matrix still has n rows and d columns. The attention rule uses no separate value projection. It does retain the two dense feature projections, so the efficiency claim concerns removing the expensive pairwise operations across the sequence, not doing away with learned multiplication in the network.

The first computation gives each query a scalar weight. A learned vector acts as a common scoring direction for the queries. Because the input features differ between locations and between images, the same scoring vector can yield different pooling weights for different inputs.

α = (Q · wₐ) / √d

Here α is the vector of query weights, with one component per token. Q is the projected query matrix, and wₐ is the learned scoring vector with d components. The centered dot applies that vector to each row of Q, yielding one scalar per row. The quantity d is the embedding width, and its square root scales those scores. The formula specifies the scaled projection directly. The Softmax shown explicitly in the earlier attention equations does not appear in this expression.

The next operation pools the queries themselves. Each scalar acts on the entire feature vector for its token. This collects information over all locations into a single global query whose width is the same as that of an individual token.

q = Σᵢ₌₁ⁿ (αᵢ ∗ Qᵢ)

Here q is the global query vector. The summation Σ runs over token index i, beginning at the first token and ending at n, the sequence length. The symbol αᵢ is the scalar weight assigned to token i, and Qᵢ is the query vector for the same token. The star denotes scaling the components of that query vector by the scalar. Each term has d components, so their sum has d components as well. The symbol q here refers to the pooled vector in SwiftFormer. In the preceding separable attention equation, it referred to a sequence of scalar scores.

The pooled query now interacts with the keys. For each spatial location, each channel of its key is multiplied by the corresponding channel of the global query. The same global vector participates at every location, but a location’s key determines how that global signal changes its features. The resulting array has a feature row for each token. The linear transformation acts on the combined features, and a normalized form of the query matrix is added to the result.

x̂ = Q̂ + T(K ∗ q)

Here x̂ is the attention output, and Q̂ denotes the normalized query matrix in the paper. K is the matrix of location-specific keys, and q is the pooled global query. The symbol ∗ means element-wise multiplication with q broadcast across the rows of K. The function T is the learned linear transformation applied to the resulting features. The plus sign adds the transformed features and normalized queries at corresponding positions. This addition keeps a direct contribution from the queries alongside the path through pooled context.

An object’s feature at a particular location can therefore depend on distant regions, since the global query includes a contribution from potentially every token. The form of that dependence is shared. Ordinary self-attention can construct a different distribution over distant locations for each query. SwiftFormer constructs one summary for the current grid and lets the keys make its effect location-specific. A feature receives a different combination of channels through its interaction with the shared vector, without independently selecting a separate set of source locations. This is the structural reason the attention computation can scale linearly with token count at a fixed width. Scoring, aggregation, broadcast multiplication, and row-wise transformation all avoid building a spatial pair matrix.

How the attention block fits into SwiftFormer

The feature hierarchy begins with a color image of height H and width W. The paper describes the input as having 3 channels. Patch embedding uses two 3×3 convolutions, each with stride 2. Stride is the step the filter takes as it moves over the input. Together those layers produce the first feature grid at 1/4 of the input height and width, with the first stage’s channel width. A downsampling layer between consecutive stages reduces the spatial dimensions and increases channel width. The later stages operate at 1/8, 1/16, and 1/32 of the original spatial dimensions.

Every stage places convolutional encoder blocks before a SwiftFormer Encoder. The convolutional blocks replace the average-pooling token mixer used by EfficientFormer. A depth-wise filter learns spatial patterns independently within each channel, and a pointwise convolution mixes channels at a single grid location. Together they provide a way to change both the local spatial evidence and the combination of feature channels without asking the attention operation to handle both jobs.

The depth-wise convolution in the Conv. Encoder uses a 3×3 neighborhood and is followed by batch normalization, which rescales features through learned normalization. Two pointwise operations follow, with a GeLU activation between them. GeLU is the nonlinear step in this part of the block. A skip connection adds the input features to the result so the block can supply a change to a representation that already has a direct path forward. The paper writes the sequence as follows.

𝒳̂ᵢ = Conv₁(Conv₁,ᴳ(DWConvᴮᴺ(𝒳ᵢ))) + 𝒳ᵢ

Here 𝒳ᵢ denotes the input feature map at the position indexed by i in the block notation, and 𝒳̂ᵢ denotes its output. DWConvᴮᴺ is depth-wise convolution followed by batch normalization. Conv₁,ᴳ is a pointwise convolution followed by GeLU, and Conv₁ is a pointwise convolution. The parentheses specify the order from the innermost operation outward. The plus sign is the skip connection that adds the original feature map to the processed feature map.

The SwiftFormer Encoder then applies another local spatial operation, global attention, and a final channel-mixing block. The notation in the paper reuses the feature symbol after successive updates. Reading the equalities as assignments in execution order makes the data flow clear. The first line means that the features available before the local block are used as its input and are updated by its output.

𝒳̂ᵢ = Conv₁(DWConvᴮᴺ(𝒳̂ᵢ))

Here the 𝒳̂ᵢ on the right is the feature map entering this part of the encoder, and the 𝒳̂ᵢ on the left is that map after local processing. The subscript i marks the current feature state in the paper’s notation. DWConvᴮᴺ is the depth-wise convolution followed by batch normalization, and Conv₁ is the pointwise convolution that follows it. The 3×3 depth-wise operation lets the upcoming attention calculation start with features that already incorporate a spatial neighborhood.

𝒳̂ᵢ = QK(𝒳̂ᵢ) + 𝒳̂ᵢ

Here the 𝒳̂ᵢ on the right is the locally processed feature map. QK is the function that applies the efficient additive attention just described, and the plus sign adds its result to the existing map. The 𝒳̂ᵢ on the left now contains the result of both paths. The label QK names the block in this equation. It does not denote a matrix product. This residual addition is at the level of the encoder and is separate from the addition of normalized queries within the attention rule.

𝒳̂ᵢ₊₁ = Conv₁(Convᴮᴺ,₁,ᴳ(𝒳̂ᵢ)) + 𝒳̂ᵢ

Here 𝒳̂ᵢ is the feature map after attention and its skip connection. Convᴮᴺ,₁,ᴳ means batch normalization followed by a 1×1 pointwise convolution and then GeLU. Conv₁ is the following pointwise convolution. The plus sign adds the attention-updated features back after this channel-mixing sequence. The resulting feature map is 𝒳̂ᵢ₊₁, with the incremented index marking the next output state in the paper’s notation. Pointwise operations can alter the representation at a location without spending another spatial attention calculation on it.

Across its XS, S, L1, and L3 variants, the network keeps this organization and changes stage widths and the number of repeated blocks. The authors give an expansion ratio of 4 for the Conv. Encoder in all variants. They choose channel and block counts with the aim of comparing against previous systems of similar parameter size and multiply-accumulate cost. They report designing the variants without neural architecture search. The comparison to EfficientFormer therefore concerns both the blocks and their placement, since that earlier architecture used latency-driven slimming to select its configurations.

Training the classification network and reusing its features

The authors train SwiftFormer for classification from scratch on ImageNet-1K for 300 epochs, where an epoch is a pass through the training set. They use AdamW to update the learned weights. The learning-rate schedule starts from a stated setting of 1e⁻³, with a linear warm-up for 5 epochs and a cosine schedule. Images are processed at 224×224 in training and testing. The training batch size is 2048. These settings concern the process of learning the weights, separately from the smaller batches used in timing tests.

The training recipe includes hard distillation. SwiftFormer starts with its own weights to learn, while the outputs of a trained teacher provide additional supervision in the form of hard targets. Following the recipe used by EfficientFormer, the authors use RegNetY-16GF as the teacher and report its ImageNet top-1 accuracy as 82.9%. Distillation belongs to the training recipe. The mobile timing measures SwiftFormer’s inference after training.

The appendix gives the settings for the random transformations and other training controls. Color jitter, which perturbs image colors, uses a ratio of 0.4. RandAugment uses magnitude 9 and standard deviation 0.5. The authors give settings of 1 for Mixup and 0.8 for Cutmix, two procedures that combine training examples or regions of them. They use random erasing with probability 0.25, label smoothing set to 0.1, and gradient clipping set to 0.01. Label smoothing softens the training targets, and clipping limits the size of gradients used in the updates. The appendix groups these choices with the measures intended to make training more robust.

The classification training is implemented in PyTorch 1. 12 uses eight NVIDIA A100 GPUs, and the reported average training time for classification is 36 hours. For the dense prediction experiments, the authors reuse the ImageNet-trained weights to initialize the feature extractor, or backbone. A separate task component takes the backbone’s features and produces boxes, instance masks, or semantic pixel labels. The paper also points readers to the authors’ implementation of SwiftFormer.

Experiments and results

What the benchmarks measure

The experiments ask whether the architecture can deliver competitive image recognition at short phone latency and whether the underlying image features also work for predictions at particular locations. ImageNet-1K supplies the whole-image classification test. Its reported metric is top-1 accuracy, which counts an image as correct when the highest-ranked predicted class matches the target label. This task supplies the phone timing comparisons and the reported throughput tests. The dense prediction benchmarks use MS-COCO 2017 and ADE20K. They ask where objects are, which pixels belong to each object instance, or what semantic class each pixel belongs to.

For phone latency, the paper uses an iPhone 14 running iOS 16. The classification networks are compiled with CoreML and timed with a batch size of 1 on the phone’s Neural Engine. Latency is the time for the tested inference, whereas throughput measures how much input can be processed over time. The paper also tests throughput on an A100 40 GB GPU at a batch size of 128. Those measurements represent different execution conditions. The GPU run allows many images to be processed together, while the phone latency is intended to capture how quickly a single image is handled in that setup.

The authors report latency measurement error below ±0.1 ms in the caption to their classification comparison. Some of the smallest differences they discuss are on the same scale as that measurement figure. A comparison with a reported difference of 0.1 ms describes the recorded benchmark, while a larger separation gives clearer evidence about the ranking in the same setup. The paired results are still useful because they allow the reader to consider the recognition accuracy obtained at each measured time.

Batch-one phone latency for ImageNet-1K classification on iPhone 14

SwiftFormer-L1 matches EfficientFormer-L1 in latency, while SwiftFormer-S is the fastest configuration shown.

Batch-one phone latency for ImageNet-1K classification on iPhone 14EfficientFormer-L1: 1.1EfficientFormer-L11.1SwiftFormer-L1 (this paper): 1.1SwiftFormer-L1 (this paper)1.1SwiftFormer-S: 0.8SwiftFormer-S0.8SwiftFormer-L3: 1.9SwiftFormer-L31.9
The numbers
System or settingms
EfficientFormer-L11.1
SwiftFormer-L1 (this paper)1.1
SwiftFormer-S0.8
SwiftFormer-L31.9

Classification across deployment sizes

SwiftFormer-S records 78.5% top-1 accuracy on ImageNet-1K at 0.8 ms on the phone. The abstract reports higher accuracy and a 2× speed advantage against its MobileViT-v2 comparison. SwiftFormer-L3 reaches 83.0% ImageNet-1K top-1 accuracy with 1.9 ms latency. Against the specifically named MobileViT-v2×2.0, the paper reports that SwiftFormer-L3 is 2.6× faster and has a 1.8% absolute gain in top-1 accuracy. These comparisons put different points on a deployment curve. The S result describes what the architecture can deliver at very short latency, while the L3 result shows the accuracy obtainable at a longer, still measured mobile inference time.

EfficientFormer-L1 is a particularly informative baseline because it helped define the starting architectural design. With its attention block in the final stage, it achieves 79.2% ImageNet-1K top-1 accuracy and 1.1 ms latency. The authors report a 1.7% absolute top-1 gain for SwiftFormer-L1 at the same phone latency. They also compare SwiftFormer-L1 with MobileViT-v2×1.5, reporting 3× faster iPhone 14 inference and 0.5% higher ImageNet-1K top-1 accuracy. The two comparisons answer different questions. The first concerns replacing and reorganizing the components of a close architectural starting point. The second compares a complete SwiftFormer variant with a separate system that already uses a linear attention design.

The smallest SwiftFormer variant is compared with convolutional networks commonly used as mobile baselines. The authors report that SwiftFormer-XS is 0.1 ms faster on the iPhone 14 than MobileNet-v2×1.0 and also 0.1 ms faster than MobileNet-v3-Large×0.75. Its ImageNet-1K top-1 accuracy margins over those systems are 3.9% and 2.4%, respectively. The differences in classification accuracy distinguish the systems more clearly than the small measured differences in phone time. Against EfficientNet-b0, SwiftFormer-S has a reported speed advantage of 1.6× and an ImageNet-1K top-1 advantage of 1.4%.

For the larger convolutional comparisons, SwiftFormer-L3 has 4.5% higher ImageNet-1K top-1 accuracy than ResNet-50 at matching phone latency. It has 0.9% higher top-1 accuracy than ConvNeXt-T and is reported to be 1.3× faster on the phone. The paper also notes that fully convolutional systems can have high GPU throughput. The authors suggest that device-level support for executing convolutions together with normalization and nonlinear operations may help explain that result. The mobile latency findings establish how the particular SwiftFormer networks compare on the phone, with GPU throughput providing a separate view of execution efficiency.

Among the transformer comparisons, the authors use DeiT-S and ResNet-50 to illustrate why parameter size alone gives an incomplete account of inference time. They describe the two as similar in size and give DeiT-S a 3.3% ImageNet-1K top-1 advantage, while ResNet-50 is approximately 5.2× faster on the iPhone 14. SwiftFormer-L3 runs at the measured speed of ResNet-50 and achieves 1.2% higher ImageNet-1K top-1 accuracy than DeiT-S. In another comparison, SwiftFormer-S is roughly 4.7× faster on the phone than DeiT-T and has 6.3% higher ImageNet-1K top-1 accuracy.

The hybrid comparisons test whether combining convolutions and attention is sufficient on its own to reach these results. The paper reports that EdgeViT-XXS takes roughly 2× as long as MobileNet-v3-Large×0.75 on the phone. SwiftFormer-XS is roughly 2× faster than EdgeViT-XXS and MobileViT-XS in the authors’ comparison. Its ImageNet-1K top-1 margins over those two systems are 1.3% and 0.9%, respectively. That result places SwiftFormer-XS among the tested systems that combine better classification accuracy and lower measured latency for their comparison sets. The classification benchmark compares whole architectures and training outcomes. The ablations give a closer view of how much the attention and local processing changes contribute.

Detection and instance masks on COCO

Object detection predicts locations and categories for individual objects, scored here using the boxes around them. Instance segmentation also assigns a mask to each individual object, so distinct objects of the same class can have separate pixel regions. The authors plug the ImageNet-trained SwiftFormer backbones into Mask-RCNN for both tasks on MS-COCO 2017. The dataset has 118K training images and 5K validation images. The backbone supplies the image features. The detection and mask components of Mask-RCNN turn them into the outputs assessed by the benchmark.

The authors fine-tune the backbones for 12 epochs at an image size of 1333×800. Fine-tuning here means that training for the new task starts from the learned classification weights. They use a batch size of 32, the AdamW optimizer, and a learning rate of 2e⁻⁴, following EfficientFormer’s setup. The evaluation reports average precision for boxes and for masks. Average precision summarizes the relationship between precision, how often proposed detections are correct, and recall, how much of the ground-truth set is recovered as the scoring threshold varies. A box score and a mask score describe different notions of a correct spatial prediction.

SwiftFormer-L1 achieves 41.2 AP box in the COCO comparison. The paper gives it a margin of 7.2 points over ResNet18, 3.9 points over PoolFormer-S12, and 3.3 AP box over EfficientFormer-L1. For instance masks it reaches 38.1 AP mask, a reported gain of 2.7 points over the preceding best result. The larger SwiftFormer-L3 improves on EfficientFormer-L3 by 1.3 points in AP box and 1.0 points in AP mask. The findings show that the feature extractor can improve the Mask-RCNN system on both outputs under the tested training setup.

The paper also shows validation images in which the backbone choice changes the category assignments. In the selected examples with EfficientFormer-L1, a bird receives a sheep label in one image and a bear label in another, and kites are identified as birds in another scene. The SwiftFormer-L1 system identifies and segments the relevant objects in those examples. These illustrations give a concrete view of the errors that can accompany detection and mask prediction. The benchmark scores aggregate over the validation images and provide the basis for the quantitative comparison.

Semantic segmentation on ADE20K

Semantic segmentation gives each pixel a category for the scene parsing task. Instance segmentation distinguishes separate objects. Semantic segmentation is concerned with assigning the correct category in the correct part of the image, including the scene regions represented in ADE20K. The dataset has 20K training images, 2K validation images, and 150 scene parsing categories. SwiftFormer extracts features from the image and a semantic FPN decodes them into a spatial prediction. The decoder is the part that turns the backbone’s hierarchy of features into the labels being scored.

The authors run 40K training iterations with 512×512 images and batches of 32 in this setup. They use AdamW and a polynomial learning-rate schedule beginning at 2e⁻⁴. Evaluation uses mean intersection over union, or mIoU. For a category, intersection over union compares the overlap of the predicted and ground-truth regions with their combined area. The mean gives a score across categories. Accurate class names alone are insufficient on this metric because the predicted regions must also cover the appropriate pixels.

The SwiftFormer-L1 backbone yields 41.4% mIoU in the ADE20K comparison. The paper reports gains of 8.5% over ResNet18, 4.2% over PoolFormer-S12, and 2.5% over EfficientFormer-L1 on this metric. SwiftFormer-L3 achieves 43.9 mIoU, the highest result among the backbones in the comparison. The authors illustrate the segmentation outputs alongside ground-truth masks for validation scenes indoors and outdoors. With the COCO experiments, this provides a second setting in which the feature hierarchy remains useful when the task requires a spatially detailed output.

What the ablations show

Changing the local mixer and the attention placement

The authors first use EfficientFormer-L1 to study the changes within a common starting architecture. The baseline has its transformer block with standard self-attention in the final stage and records 79.2% ImageNet-1K top-1 accuracy at 1.1 ms on the phone. Replacing the baseline pooling mixers with the SwiftFormer convolutional encoder raises the top-1 accuracy to 79.9%, with the same measured latency. In the original mixer, averaging provides the local combination rule. With the proposed local encoder, a learned depth-wise filter controls the combination of neighboring features before pointwise processing mixes the channels. This experiment supports the local redesign separately from adding attention at more stages.

The next reported configuration replaces the standard self-attention in the baseline’s transformer block with efficient additive attention. The paper describes a 0.2% drop in ImageNet-1K top-1 accuracy at this step, alongside a 0.1 ms improvement in phone latency. This is a narrower comparison than the end-to-end result. It asks what happens when the attention rule changes within the restricted placement used for the baseline. A compact context vector and element-wise interactions make the operation cheaper, while the single replacement does not retain the full accuracy of the previous configuration.

The complete design uses the SwiftFormer Encoder at every stage and improves on the baseline ImageNet-1K accuracy while retaining its latency. The reported 1.7% absolute top-1 gain is a comparison between complete systems. Read together, the configurations show a local mixer that helps accuracy at the same measured cost, an attention substitution that trades a little accuracy for speed in the tested setting, and a full design that uses the cheaper attention more broadly. The paper does not give a separate change in accuracy from inserting the attention encoder at each particular spatial scale. The experiment supports the combined configuration without assigning a share of the gain to an individual stage.

Testing the removal of an explicit value interaction

The appendix studies the design question inside additive attention. It compares a form with explicit query, key, and value interactions against the simplification that replaces the key-value interaction with a linear transformation. The authors report a 10% reduction in latency and a 0.4% improvement in top-1 accuracy for the simplified setting. This is a different intervention from replacing standard self-attention in the baseline. It concerns which parts of the interaction are necessary within the type of attention used in SwiftFormer.

That distinction explains why the two accuracy changes can go in different directions. Standard attention can produce a separate distribution over source locations for each query. A switch from that operator to pooled attention changes how information is collected and distributed. The appendix’s comparison asks whether an additional value interaction helps once the design is already organized around a compact context representation. In the setting tested, the simpler version is both faster and more accurate on the reported metrics. The paper presents the result as evidence that the explicit interaction can be removed in this architecture. It does not break down whether the accuracy change comes from the form of the new projection, the shorter computation, or their combination.

Looking inside the COCO detection errors

The COCO error analysis compares the full SwiftFormer-L1 and EfficientFormer-L1 backbones instead of intervening on a component. The authors show precision–recall curves across categories under several evaluation conditions. They discuss the comparison for all objects and separately for large objects, then comment on results for smaller size groups. Their large-object example is useful because it distinguishes the observed performance at a specified overlap threshold from diagnostic conditions that relax particular sources of error.

For large objects at an intersection-over-union threshold of 0.75, EfficientFormer-L1 has an AP of 0.558 and SwiftFormer-L1 has an AP of 0.610. Under the paper’s perfect-localization diagnostic, the values are 0.793 and 0.837, respectively. In the further analysis excluding background false positives, the authors give 0.928 AP for EfficientFormer-L1 and 0.946 AP for SwiftFormer-L1. The altered conditions change how mistakes count in evaluation. The perfect-localization result addresses the penalty associated with spatial placement, and the background condition considers detections produced where the benchmark treats them as false alarms.

SwiftFormer-L1 leads under each of these large-object conditions. The authors also report an improvement for small and medium-sized objects without giving corresponding values in their discussion. The curves place the advantage in a more detailed context than the overall box AP alone. They show how both systems respond when the evaluator discounts particular errors and that the SwiftFormer-L1 lead survives those changes. Because the analysis compares complete backbones, it cannot attribute the lead to a particular attention stage or establish that the backbone corrects only one class of detection errors.

Limitations

Limits and trade-offs identified by the authors

The authors distinguish analytical complexity from measured mobile performance. Their discussion of earlier efficient attention methods makes the point that savings in operation counts or parameters can be offset in practice by costly projections or awkward operations on the target device. SwiftFormer addresses this through a simpler sequence of operations and reports phone measurements. The distinction still applies when interpreting the result. The linear dependence of attention on token count is a property of the formulation at fixed width. The inference times are measurements for particular compiled networks running on particular hardware.

The discussion also names a tradeoff around spatial information. Positional encodings supply information about where features occur, and attention biases can use spatial relationships to influence how attention is weighted. The authors say that attention biases can be sensitive to the input resolution in dense prediction, while adding typical positional encoding can slow inference on resource-constrained devices. They omit both from the efficient additive attention mechanism. Spatial information is still processed through the rest of the architecture, including its convolutional feature maps. The results show that the chosen combination works for the downstream benchmarks. The paper gives no controlled comparison between SwiftFormer with and without each positional mechanism to isolate its individual effect.

What the experimental setup leaves open

The phone timings establish classification latency for one device, operating system, compilation path, and single-image batch size. The A100 throughput tests describe a different hardware and batching regime. Neither setup establishes the latency ranking on other phones or accelerators. The paper’s stated latency measurement error also matters when reading the narrowest gaps. A reported tie or a difference of 0.1 ms has a different evidential scope from a speed comparison in which the reported separation is substantially larger. The experiments do not measure power draw or how latency changes during sustained use.

The paper’s argument for applying attention early follows from how the operation scales with token length. Its ImageNet-1K training and testing use 224×224 images, so the classification results are evidence at that operating point. The transfer tasks use larger stated image sizes and different prediction components. They show that the architecture can serve as a backbone in those settings, but they do not supply a controlled sweep of accuracy, latency, and memory as input resolution varies. They also do not give phone latency for a complete Mask-RCNN or semantic FPN prediction system. The dense prediction results should therefore be read as evidence for downstream prediction quality with the tested backbones.

A single global query is an information bottleneck by construction. Each attention block pools the input before the keys interact with it. Any distinctions between distant input locations that disappear in pooling are unavailable as separate source choices in that interaction. The residual paths and the local blocks preserve and transform location-specific features, and subsequent stages can build fresh global summaries. Even with those mechanisms, the operation does not provide the general pairwise weighting of ordinary global self-attention. The experiments answer the practical question of whether the simpler interaction suffices for these image tasks and comparison sets. They do not show that the two forms of attention are interchangeable for other prediction problems.

The strongest accuracy gains also belong to systems whose local blocks, attention operations, and placement differ. The baseline comparison isolates some important substitutions, and the appendix narrows attention to a test of the value interaction. There is no complete set of controlled comparisons that varies stage placement, local processing, and attention formulation independently at matched widths across all deployment sizes. The classification recipe further uses hard distillation and several training controls. The authors follow the baseline recipe with the same teacher, but give no corresponding ablation that quantifies how much the teacher contributes to each SwiftFormer result. The reported gains describe the architecture as trained and evaluated.

Finally, the downstream experiments hold to particular task frameworks. The COCO results are for Mask-RCNN with ImageNet-initialized backbones, and the ADE20K results use a semantic FPN decoder with ImageNet-initialized features. These are tests of SwiftFormer’s usefulness as a backbone within those systems. The qualitative examples illustrate the kinds of errors the authors examine, and the validation scores aggregate performance under the stated evaluation. Together they support the transfer claim for the tested combinations of data, decoder, and training procedure.

What came after

There are no documented follow-up papers to discuss here. The paper’s own evidence for reuse concerns its transfer experiments, which carry the same feature hierarchy from classification into detection, instance segmentation, and semantic segmentation.

Cite

Cite as Abdelrahman Shaker, Muhammad Maaz, Hanoona Rasheed, Salman Khan, Ming–Hsuan Yang and Fahad Shahbaz Khan. 2023. SwiftFormer: Efficient Additive Attention for Transformer-based Real-time Mobile Vision Applications. IEEE/CVF International Conference on Computer Vision (ICCV).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1109/iccv51070.2023.01598 · arXiv 2303.15446

@inproceedings{shaker2023swiftformer,
  title = {{SwiftFormer: Efficient Additive Attention for Transformer-based Real-time Mobile Vision Applications}},
  author = {Abdelrahman Shaker, Muhammad Maaz, Hanoona Rasheed, Salman Khan, Ming–Hsuan Yang and Fahad Shahbaz Khan},
  booktitle = {IEEE/CVF International Conference on Computer Vision (ICCV)},
  year = {2023},
  doi = {10.1109/iccv51070.2023.01598},
  eprint = {2303.15446},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/iccv51070.2023.01598}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/shaker-2023-swiftformer-efficient-additive-attention-transformer/

References

61 references, from the paper's own bibliography.

  1. Adrian Bulat and Georgios Tzimiropoulos. Bit-mixer: Mixed-precision networks with runtime bit-width selection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021. OpenAlex ↗ · Scholar ↗
  2. Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In European Conference on Computer Vision, 2020. our card
  3. Yinpeng Chen, Xiyang Dai, Dongdong Chen, Mengchen Liu, Xiaoyi Dong, Lu Yuan, and Zicheng Liu. Mobile-former: Bridging mobilenet and transformer. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022. OpenAlex ↗ · Scholar ↗
  4. Bowen Cheng, Ishan Misra, Alexander G. Schwing, Alexander Kirillov, and Rohit Girdhar. Masked-attention mask transformer for universal image segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022. OpenAlex ↗ · Scholar ↗
  5. Xiangxiang Chu, Zhi Tian, Yuqing Wang, Bo Zhang, Haibing Ren, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Twins: Revisiting the design of spatial attention in vision transformers. In Advances in Neural Information Processing Systems, 2021. OpenAlex ↗ · Scholar ↗
  6. CoreMLTools. Use coremltools to convert models from third-party libraries to core ml., 2021. OpenAlex ↗ · Scholar ↗
  7. Ekin Dogus Cubuk, Barret Zoph, Jon Shlens, and Quoc Le. Randaugment: Practical automated data augmentation with a reduced search space. In Advances in Neural Information Processing Systems, 2020. our card
  8. Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2009. OpenAlex ↗ · Scholar ↗
  9. Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020. our card
  10. Haoqi Fan, Bo Xiong, Karttikeya Mangalam, Yanghao Li, Zhicheng Yan, Jitendra Malik, and Christoph Feichtenhofer. Multiscale vision transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021. OpenAlex ↗ · Scholar ↗
  11. Mohsen Fayyaz, Soroush Abbasi Kouhpayegani, Farnoush Rezaei Jafari, Eric Sommerlade, Hamid Reza Vaezi Joze, Hamed Pirsiavash, and Juergen Gall. Adaptive token sampling for efficient vision transformers. 2022. OpenAlex ↗ · Scholar ↗
  12. TSong Han, Huizi Mao, and William J. Dally. Deep compression: Compressing deep neural network with pruning, trained quantization and huffman coding. In International Conference on Learning Representations, 2016. OpenAlex ↗ · Scholar ↗
  13. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2016. our card
  14. Byeongho Heo, Sangdoo Yun, Dongyoon Han, Sanghyuk Chun, Junsuk Choe, and Seong Joon Oh. Rethinking spatial dimensions of vision transformers. In ICCV, 2021. our card
  15. Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, et al. Searching for mobilenet-v3. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2019. OpenAlex ↗ · Scholar ↗
  16. Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. CoRR, abs/1704.04861, 2017. our card
  17. Benoit Jacob, Skirmantas Kligys, Bo Chen, Menglong Zhu, Matthew Tang, Andrew Howard, Hartwig Adam, and Dmitry Kalenichenko. Quantization and training of neural networks for efficient integer-arithmetic-only inference. In CVPR, 2018. our card
  18. A. Kirillov, R. Girshick, K. He, and P. Dollar. Panoptic feature pyramid networks. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. OpenAlex ↗ · Scholar ↗
  19. Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. In International Conference on Learning Representations, 2020. our card
  20. Yanyu Li, Geng Yuan, Yang Wen, Ju Hu, Georgios Evangelidis, Sergey Tulyakov, Yanzhi Wang, and Jian Ren. Efficientformer: Vision transformers at mobilenet speed. 2022. OpenAlex ↗ · Scholar ↗
  21. Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European Conference on Computer Vision, 2014. our card
  22. Yahui Liu, Enver Sangineto, Wei Bi, Nicu Sebe, Bruno Lepri, and Marco De Nadai. Efficient training of visual transformers with small datasets. In Advances in Neural Information Processing Systems, 2021. OpenAlex ↗ · Scholar ↗
  23. Ze Liu, Han Hu, Yutong Lin, Zhuliang Yao, Zhenda Xie, Yixuan Wei, Jia Ning, Yue Cao, Zheng Zhang, Li Dong, et al. Swin transformer v2: Scaling up capacity and resolution. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022. our card
  24. Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021. our card
  25. Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, and Saining Xie. A convnet for the 2020s. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022. OpenAlex ↗ · Scholar ↗
  26. Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019. our card
  27. Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet v2: Practical guidelines for efficient cnn architecture design. In European Conference on Computer Vision, 2018. OpenAlex ↗ · Scholar ↗
  28. Muhammad Maaz, Hanoona Rasheed, Salman Khan, Fahad Shahbaz Khan, Rao Muhammad Anwer, and Ming-Hsuan Yang. Class-agnostic object detection with multi-modal transformer. In European Conference on Computer Vision, 2022. OpenAlex ↗ · Scholar ↗
  29. Muhammad Maaz, Abdelrahman Shaker, Hisham Cholakkal, Salman Khan, Syed Waqas Zamir, Rao Muhammad Anwer, and Fahad Shahbaz Khan. Edgenext: Efficiently amalgamated cnn-transformer architecture for mobile vision applications. In CADL2022, 2022. OpenAlex ↗ · Scholar ↗
  30. Sachin Mehta and Mohammad Rastegari. Mobilevit: light-weight, general-purpose, and mobile-friendly vision transformer. In International Conference on Learning Representations, 2022. OpenAlex ↗ · Scholar ↗
  31. Sachin Mehta and Mohammad Rastegari. Separable self-attention for mobile vision transformers. Transactions on Machine Learning Research, 2023. OpenAlex ↗ · Scholar ↗
  32. Sachin Mehta, Mohammad Rastegari, Linda Shapiro, and Hannaneh Hajishirzi. Espnetv2: A light-weight, power efficient, and general purpose convolutional neural network. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2019. our card
  33. Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, and Jingdong Wang. Conditional detr for fast training convergence. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021. OpenAlex ↗ · Scholar ↗
  34. Junting Pan, Adrian Bulat, Fuwen Tan, Xiatian Zhu, Lukasz Dudziak, Hongsheng Li, Georgios Tzimiropoulos, and Brais Martinez. Edgevits: Competing light-weight cnns on mobile devices with vision transformers. In European Conference on Computer Vision, 2022. OpenAlex ↗ · Scholar ↗
  35. Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems, 2019. our card
  36. Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In CVPR, 2020. our card
  37. Yongming Rao, Wenliang Zhao, Benlin Liu, Jiwen Lu, Jie Zhou, and Cho-Jui Hsieh. Dynamicvit: Efficient vision transformers with dynamic token sparsification. In Advances in Neural Information Processing Systems, 2021. OpenAlex ↗ · Scholar ↗
  38. Michael Ryoo, AJ Piergiovanni, Anurag Arnab, Mostafa Dehghani, and Anelia Angelova. Tokenlearner: Adaptive space-time tokenization for videos. In Advances in Neural Information Processing Systems, 2021. OpenAlex ↗ · Scholar ↗
  39. Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenet-v2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2018. OpenAlex ↗ · Scholar ↗
  40. Abdelrahman Shaker, Muhammad Maaz, Hanoona Rasheed, Salman Khan, Ming-Hsuan Yang, and Fahad Shahbaz Khan. Unetr++: Delving into efficient and accurate 3d medical image segmentation. arXiv:2212.04497, 2022. OpenAlex ↗ · Scholar ↗
  41. Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, Mark Sandler, Andrew Howard, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2019. OpenAlex ↗ · Scholar ↗
  42. Mingxing Tan and Quoc Le. EfficientNet: Rethinking model scaling for convolutional neural networks. In Proceedings of the 36th International Conference on Machine Learning, 2019. our card
  43. Ilya Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Thomas Unterthiner, Jessica Yung, Daniel Keysers, Jakob Uszkoreit, Mario Lucic, et al. Mlp-mixer: An all-mlp architecture for vision. In Advances in Neural Information Processing Systems, 2021. our card
  44. Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. In International Conference on Machine Learning, 2021. our card
  45. Zhengzhong Tu, Hossein Talebi, Han Zhang, Feng Yang, Peyman Milanfar, Alan Bovik, and Yinxiao Li. Maxvit: Multi-axis vision transformer. In ECCV, 2022. OpenAlex ↗ · Scholar ↗
  46. Sinong Wang, Belinda Z. Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity. arXiv preprint arXiv:2006.04768, 2020. OpenAlex ↗ · Scholar ↗
  47. Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. In CVPR, 2021. OpenAlex ↗ · Scholar ↗
  48. Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 568–578, 2021. OpenAlex ↗ · Scholar ↗
  49. Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pvtv2: Improved baselines with pyramid vision transformer. Computational Visual Media, 2022. OpenAlex ↗ · Scholar ↗
  50. Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. In Advances in Neural Information Processing Systems, 2016. our card
  51. Chuhan Wu, Fangzhao Wu, Tao Qi, and Yongfeng Huang. Fastformer: Additive attention can be all you need. arXiv preprint arXiv:2108.09084, 2021. OpenAlex ↗ · Scholar ↗
  52. Weihao Yu, Mi Luo, Pan Zhou, Chenyang Si, Yichen Zhou, Xinchao Wang, Jiashi Feng, and Shuicheng Yan. Metaformer is actually what you need for vision. In CVPR, 2022. OpenAlex ↗ · Scholar ↗
  53. Weihao Yu, Mi Luo, Pan Zhou, Chenyang Si, Yichen Zhou, Xinchao Wang, Jiashi Feng, and Shuicheng Yan. Metaformer is actually what you need for vision. In CVPR, 2022. OpenAlex ↗ · Scholar ↗
  54. Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2019. our card
  55. Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In International Conference on Learning Representations, 2018. our card
  56. Haokui Zhang, Wenze Hu, and Xiaoyu Wang. Edgeformer: Improving light-weight convnets by learning from vision transformers. arXiv preprint arXiv:2203.03952, 2022. OpenAlex ↗ · Scholar ↗
  57. Haokui Zhang, Wenze Hu, and Xiaoyu Wang. Parc-net: Position aware circular convolution with merits from convnets and transformer. In European Conference on Computer Vision, 2022. OpenAlex ↗ · Scholar ↗
  58. Hao Zhang, Feng Li, Shilong Liu, Lei Zhang, Hang Su, Jun Zhu, Lionel Ni, and Harry Shum. Dino: Detr with improved denoising anchor boxes for end-to-end object detection. In International Conference on Learning Representations, 2022. OpenAlex ↗ · Scholar ↗
  59. Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2018. OpenAlex ↗ · Scholar ↗
  60. Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ade20k dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. OpenAlex ↗ · Scholar ↗
  61. Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. In International Conference on Learning Representations, 2021. OpenAlex ↗ · Scholar ↗