Scaling Local Self-Attention for Parameter Efficient Visual Backbones
Paper · 2021 · Ashish Vaswani, Prajit Ramachandran, Aravind Srinivas et al.
Summary
How far can an image-recognition system look without becoming too expensive to train? A convolution learns a matrix of weights for each offset in its filter and reuses those matrices across the image. Self-attention can give different weight to the same offset at different locations, depending on the features it finds there. It can also look over a wider region with little change in the number of learned parameters. The difficulty lies in execution. Gathering overlapping neighborhoods separately for every feature location takes memory, and comparing every location with every other location takes substantial computation. The authors develop HaloNet to make the intermediate option, local self-attention, practical at the scale of strong convolutional backbones. The underlying operation comes from the Transformer and attention.
HaloNet partitions a feature map into blocks and gathers one source region for each block. That region includes the block itself and a surrounding band, the halo. Individual locations in a block compute their own attention weights, but they draw from the same collection of neighboring features. An earlier implementation used masks to give each location a centered window within that collection. HaloNet lets each location read the whole gathered region. It gains access to more context using the same blocked computation, while its response to an image shift can change when features cross a block boundary. To build a hierarchy of successively coarser features, the authors also reduce the number of locations that request an output at each downsampling layer. The remaining locations still read the full source region.
On ImageNet, HaloNet reaches approximately the same accuracy as EfficientNet, or slightly higher accuracy, at comparable parameter counts. The strongest variant, H7, scores 84.9% top-1 on the ImageNet validation set and 74.7% top-1 on ImageNet V2. The main classification runs train directly on ImageNet. In separate experiments that begin with ImageNet-21k pretraining, widened HaloNet variants compare favorably with ViT and BiT in accuracy and in inference speed on larger images. On COCO, adding attention late in otherwise convolutional backbones improves both bounding-box detection and instance segmentation over strengthened baselines. The main classification benchmark is ImageNet.
Parameter count and training speed tell different stories. HaloNet backbones that use attention throughout their main stages train more slowly than comparable EfficientNets in the reported measurements. Keeping convolution in the early, high-resolution stages recovers much of the speed while retaining most of H7’s accuracy. The controlled studies also find that enlarging the attention window helps within the tested range, that HaloNet responds more strongly than ResNet to the tested combination of data augmentation and label smoothing, and that a pair of architectural additions gives ResNet the larger gain. These comparisons show which changes make local attention competitive and where its costs remain concentrated. The main convolutional reference for the family is EfficientNet.
Deep dive: Scaling Local Self-Attention for Parameter Efficient Visual Backbones
HaloNet makes local attention practical for image recognition by sharing neighborhoods, and rivals EfficientNet at similar parameter counts. · about 39 minutes to read
The problem and its context
What a visual backbone has to preserve
A visual backbone converts the input image into grids of feature vectors. Each vector describes a location using channels, the separate coordinates of the representation at that location. A classifier can pool the eventual grid into a description of the whole image. A detector needs features that retain spatial information so it can locate objects. A system that segments individual objects also has to distinguish their shapes and separate their masks. The operation that mixes information across locations matters to all these uses, but so does the way the backbone changes the resolution of its grids.
The paper takes local processing as a sensible starting point. Edges and textures can be recognized from nearby evidence. A convolution can learn to respond to such a pattern and apply the same rule wherever the pattern occurs. Relative position has a direct role in that rule. The transformation applied to a feature above the output position can differ from the transformation applied to a feature beside it. Those offset-specific transformations are shared across the image. The paper situates this approach in the history of ImageNet Classification with Deep Convolutional Neural Networks.
Attention introduces another way to use the same grid. A feature at the output location participates in deciding which nearby features will contribute to its updated representation. A particular offset can receive a strong weight around one object and a weak weight around another. The learned transformations that produce these weights are reused across locations. The weights themselves are computed from the current image. The authors view this as a way to generate a spatial filter whose behavior varies with the features it encounters.
A larger receptive field gives an output access to a wider span of its input. With a dense convolution, increasing the spatial dimensions of the filter adds a learned matrix for each new offset. In the paper’s attention formulation, the projections used to construct the features for comparison and aggregation are independent of how many locations are available. The relative-position parameters do grow with the window. They make up a small part of the count in the authors’ example. This opens a way to scale spatial coverage while spending most of the learned parameters on the channels used to represent features.
The computation still has to compare each query with its candidate sources. At high resolution, even a single feature map has many locations available to participate in these comparisons. A rule that connects every location directly to every other location is attractive for distant interactions, but the number of pairs and the memory occupied by their scores can be prohibitive. Restricting attention to nearby features preserves its dependence on content and limits the number of pairs. The resulting challenge is to get those features into the right arrangement without moving and storing many copies.
How earlier systems approached attention in vision
The paper traces attention from sequence processing into vision. In translation, a system generating part of an output sequence could use attention to select relevant information from an input sequence. In image captioning, the source could be a spatial collection of image features and the output could be a sequence of words. The visual features were available for the text generator to select from. HaloNet applies attention within the visual grid itself, where a location uses other visual locations to form a new representation. The paper cites Neural Machine Translation by Jointly Learning to Align and Translate and Show, Attend and Tell.
The authors also connect attention with non-local means, an image-denoising method that aggregates pixels with weights based on relationships between them. Work discussed in the paper uses a related operation on spatially reduced convolutional features for video classification. Another approach combines spatially downsampled attention outputs with convolutional features. Image generation provides an example of restricting attention to local image regions. These approaches expose different choices about where to perform attention, how many spatial locations it should consider, and whether it should provide the main spatial operation or supplement an existing one.
The immediate predecessor is Stand-Alone Self-Attention, abbreviated SASA. It uses attention over a centered local window as a substitute for the spatial convolutions of a residual backbone. In the authors’ account, SASA had already improved on its conventional residual reference while using fewer parameters and fewer floating-point operations. The question HaloNet pursues is whether local attention can be scaled into a family that compares well with convolutional architectures whose depth, width, and resolution have themselves been developed for strong benchmark performance. The residual reference architecture comes from Deep Residual Learning for Image Recognition.
EfficientNet exemplifies why the stronger comparison matters. Changing the spatial operation in an established backbone tests one architectural choice. Building a competitive family requires choosing how to spend additional capacity, how to process larger images, and what to do when a setting that works at small scale becomes expensive. The authors also point to work on searchable architectures and network design spaces as examples of how much performance depends on the organization around the spatial operation. These examples include Learning Transferable Architectures for Scalable Image Recognition and Designing Network Design Spaces.
The paper describes another route in Vision Transformer, or ViT. It starts by projecting disjoint image patches and applies a Transformer to the resulting sequence. The architecture discussed by the authors lacks the progressively coarser feature hierarchy that HaloNet uses. Its cited recognition results rely on pretraining with larger labeled datasets, including ImageNet-21k and JFT-300M. HaloNet’s central classification question concerns training on ImageNet itself. The paper adds larger-dataset pretraining later as a separate comparison. The patch-based approach is described in the Vision Transformer paper.
Why the layout of the computation matters
Convolution had benefited from years of algorithm and software development by the time of this study. The authors describe faster ways of doing the arithmetic, software support for accelerators, and structural changes such as grouping channels or separating operations. Libraries handle the work of finding the local inputs for a convolution. The authors’ local attention layer needs an explicit way to assemble its neighborhoods on the available hardware. One example in the paper’s account of convolution software is Caffe.
Gathering independently at every output location can create a large intermediate array, even if each neighborhood occupies only a small fraction of the image. Much of that array contains repeated feature vectors because adjacent locations have overlapping neighborhoods. Conversely, arranging every feature so that all queries can reuse the same collection of inputs leads to global attention, with a much larger score calculation. The useful comparison is therefore between implementations that incur different amounts of data replication, arithmetic, and temporary storage.
The authors approach the problem by asking which queries can use a common set of inputs. That question reaches into the definition of the operation. A centered window has the same shape and relative offsets at every location. A window shared by a block is centered around the group and can sit asymmetrically around an individual query. The paper tests how much the centered rule matters once the execution has already been organized around groups. The practical aim is to preserve the advantages of local processing at resolutions where broader interactions would be expensive.
The method, step by step
Follow a feature through one attention layer
Imagine a feature map in which a location has picked up evidence for an edge. To update it, the layer first makes a query vector from that location’s feature. Each nearby candidate supplies a key vector used to decide its relevance and a value vector carrying the information that can enter the result. Comparing the query with the keys gives part of the score. A learned representation of the relative displacement of each candidate provides the other part. After normalizing these scores across the available candidates, the layer adds their value vectors in the resulting proportions.
Several output locations can make their requests using the same collection of keys and values. HaloNet puts those locations into a square block. It gathers the block and a border around it, then treats this larger region as the source of keys and values for the entire block. A location near the edge of the block can use features on the other side of that edge. Features from there are present in the halo. Each query makes a separate weighted combination, so sharing the input region still permits different outputs throughout the block.
The next stage may need a coarser grid. For a downsampling layer, HaloNet selects a sparser set of query locations before computing attention. The keys and values still come from the region that would serve the block at full query density. The output grid follows the query locations. In either case, the attention operation updates representations within a residual backbone. The residual connection carries a path around the block’s transformations, and a succession of blocks builds the feature hierarchy.
How a HaloNet attention layer updates its feature map
The steps in order.
Write spatial mixing in a common form
The authors express convolution and attention as versions of local spatial pooling. Pooling here means combining information across a set of spatial sites. Let the input grid have height H, width W, and cᵢₙ channels. The result at each output location has cₒᵤₜ channels. The local rule can be written as follows.
yᵢⱼ = ∑₍ₐ,ᵦ₎∈𝒩 f(i, j, a, b) xₐᵦ
The indices i and j locate the output vector yᵢⱼ by row and column. The indices a and b locate the input vector xₐᵦ in the source grid. The set 𝒩 contains the source locations available to the output, and ∈ marks membership in that set. The function f gives the weight matrix for the contribution from a source location to the output position. The summation adds the transformed feature vectors. Each matrix maps the cᵢₙ input channels into the cₒᵤₜ output channels. In the centered example the authors use to introduce the mathematics, 𝒩 is a square window of side length k around the output site.
Convolution selects its weight matrix by the relative displacement alone.
fconv(i, j, a, b) = W[a − i, b − j]
Here fconv is f for convolution. W in this equation denotes the collection of learned matrices, with the brackets selecting the matrix indexed by the row difference a − i and column difference b − j. It is distinct from W used for grid width. The four indices have the same meanings as in the pooling equation. A neighbor at a given displacement is transformed in the same way wherever the window is placed. The feature it contributes depends on the image at that site.
Attention builds the corresponding weighting from learned projections. At an output site, its query is given by:
qᵢⱼ = WQ xᵢⱼ
The query vector qᵢⱼ describes the feature at row i and column j for the purpose of scoring candidates. The vector xᵢⱼ is the input representation at that location. WQ is the learned query projection, shared across the grid.
At each source site, a different projection produces a key.
kₐᵦ = WK xₐᵦ
The symbol kₐᵦ denotes the key at row a and column b. WK is the learned key projection and xₐᵦ is the input feature there. The indexed vector kₐᵦ and the unindexed window side length k refer to different quantities.
A source site also supplies a value.
vₐᵦ = WV xₐᵦ
The vector vₐᵦ is the representation from row a and column b to be mixed into the result. WV is the shared value projection applied to the source feature xₐᵦ. The key projection determines the representation used for comparing source features with the query. The value projection determines the representation that will be carried forward when the comparison assigns it weight.
Score content and displacement together
The attention rule assigns each candidate a weight using a content comparison and a spatial comparison. The spatial term is relative to the query site. A candidate’s displacement selects a learned vector, and the query determines how that vector contributes to the score. The paper follows Self-Attention with Relative Position Representations.
pᵢⱼ(a, b) = softmax₍ₐ,ᵦ₎(qᵢⱼᵀ kₐᵦ + qᵢⱼᵀ r[a − i, b − j])
The scalar pᵢⱼ(a, b) is the weight assigned by the query at i, j to the candidate at a, b. The transpose symbol ᵀ makes the products with the vectors kₐᵦ and r into dot products. The first compares the projected query and key features. The second compares the same query with the learned embedding r selected by the vertical and horizontal displacements in brackets. Softmax turns the candidate scores into normalized weights for that query, with the subscript indicating that normalization runs over the source locations a, b available in the window.
The spatial comparison is itself sensitive to content. The same displacement selects the same relative embedding, but the dot product with that embedding can vary as the query changes. Consider a position where features indicate a smooth region and another where features indicate a textured region. Even if the corresponding windows have identical geometry, the query and key vectors can differ, and the rule can assign different weights to corresponding offsets. The layer has a way to learn preferences about geometry whose strength depends on the features being processed.
In terms of the common spatial pooling rule, the effective weight matrix for a candidate is:
fatt(i, j, a, b) = pᵢⱼ(a, b) WV
Here fatt is the function f for attention, i and j index the output, and a and b index the source. The scalar pᵢⱼ(a, b) multiplies the shared value projection WV. The variation among the effective weight matrices comes from the computed scalar. This is the precise sense in which attention produces a filter that changes across the grid.
The appendix writes the output directly in terms of the candidate values.
yᵢⱼ = ∑₍ₐ,ᵦ₎∈𝒩 softmax₍ₐ,ᵦ₎(qᵢⱼᵀ kₐᵦ + qᵢⱼᵀ r[a − i, b − j]) vₐᵦ
The vector yᵢⱼ is the result at row i and column j. The sum runs over the candidate positions a, b belonging to 𝒩. Softmax supplies each candidate’s share of the weight using the transposed query qᵢⱼᵀ, the key kₐᵦ, and the embedding r at the candidate’s relative displacement. The value vₐᵦ is multiplied by that candidate’s weight before being added to the output.
The computation described by the equation is for an attention head. In multi-head attention, several sets of projections carry out the operation in parallel. They can use different feature comparisons and value representations for the same source region. The paper shares the relative-position embedding parameters across the heads. It invokes grouped convolution as an analogy for dividing processing into parallel groups, while the heads here compute attention weights from features.
Separate the cost of parameters from the cost of pairs
Enlarging the window changes how many vectors are compared and combined. It leaves the sizes of WQ, WK, and WV unchanged for fixed channel dimensions. Relative embeddings are the part of the learned attention rule that grows with spatial extent. The appendix describes factorizing them along the height and width axes and assigning half of the channels within a head to each direction. For its fixed head dimension, it gives the following count.
Nᵣ = 2(k − 1) × 16
Here Nᵣ is the number of relative-embedding parameters in the appendix’s layer calculation. The symbol k denotes the centered window size in that calculation, and 16 is the fixed dimension of a head. The factor involving k describes the displacement extent, and the count uses the factorized height and width representation shared among heads.
The appendix compares that count with the combined size of the projections in an equal-width calculation.
Nᵣ / Nₚ = [2(k − 1) × 16] / (3d²)
The numerator is the relative-position count Nᵣ, with k and 16 as above. The denominator Nₚ is the total parameter count for the query, key, and value projections under the stated assumption. The symbol d is the channel width of the attention layer, d² is the count for each square projection, and 3 is the number of such projections. The quotient is the share relative to the projections in this comparison. HaloNet can vary projection widths in its architecture studies, so the expression serves to explain the counting argument at equal width.
At a fixed number of queries, increasing the side length of a square window increases the number of candidate sites quadratically. Each additional candidate brings a score and a weighted contribution. The paper therefore treats the window as a way to get broader access to input features at a low cost in learned weights, with an execution cost that can still be substantial. The distinction is central to how it evaluates efficient models and compression.
Gather one neighborhood around each block
A straightforward implementation of centered local attention extracts the window around every output position. The paper describes the resulting replication of feature content as a factor of k² for windows of side k. An interior feature can appear in the gathered input for every nearby output whose window includes it. The size of that intermediate collection can make an otherwise plausible attention operation impossible to run at the intended resolution.
The authors exploit how little a centered window changes when its query moves to an adjacent position along an image axis. For a window of side k, the overlap for that move is:
O = k × (k − 1)
The quantity O counts shared spatial sites for the adjacent windows in the paper’s overlap example. The symbol k is the window side length. The factor k − 1 is the shared extent along the direction of motion, and the other factor k is the extent along the perpendicular direction. This overlap motivates gathering a larger region for a group of outputs, then reusing it for all of them.
HaloNet tiles the grid into non-overlapping square query blocks. Write b for the block side length in this discussion and h for the width of the surrounding band. Here b describes the block, separate from its earlier use as a source column index. The halo extends the block in both directions along each spatial axis.
s = b + 2h
The symbol s is the side length of the gathered source region. The center block has side b, and the factor 2 accounts for one extension of width h at each opposite side along an axis. Image boundaries are handled with padding when gathering. Where blocks divide the grid as in the authors’ construction, their shared source regions can be represented by the following shape.
shape(G) = (H/b, W/b, b + 2h, b + 2h, c)
The tensor G holds the gathered neighborhoods. The function shape gives the list of its dimension sizes. The grid height H and width W give H/b block rows and W/b block columns. The repeated quantity b + 2h gives the two spatial dimensions inside the gathered region. The last dimension c is the channel count. A group of queries is paired with the corresponding region at its block row and block column. Attention for the different groups can run in parallel.
The paper illustrates the layout on an input of shape [4, 4, c], with a block size of 2 and a halo of 1. Each block supplies a region of shape [2, 2, c] for making queries before any sub-sampling. The halo gathering supplies a [4, 4, c] region for making keys and values, with padding where the window reaches outside the feature map. With stride 1, the outputs retain the spatial arrangement of the queries. The illustration makes the two roles of the block clear. It identifies the positions for which the layer will produce an update and identifies which gathered region those positions may consult.
Grouping lies between the two arrangements that motivate the design. At block size 1, each position has its own gathered region. When one block covers the full spatial grid, the layer can perform global attention. Sharing the candidate features globally avoids replicating a local window for every site, but the score matrix now has to represent pairs across the whole grid. The paper gives an illustrative arithmetic comparison at 128×128 resolution and 64 channels. Under those conditions, global self-attention uses about 28 times the FLOPs of a 3×3 convolution with 64 input and output channels. FLOPs count floating-point operations. The example compares arithmetic under a stated setup and explains why the larger feature maps motivate a restricted neighborhood.
Let the individual queries use the whole region
SASA also uses blocking. It gathers a region around a group and then masks the scores to enforce a square window centered on each query. The mask makes source sites outside the individual centered window unavailable during normalization and aggregation. The paper describes the following relation between the centered window size and the halo used to support it.
h = ⌊k / 2⌋
The symbol h is the halo width, k is the side length of the centered window, and the floor brackets select the integer obtained by rounding the quotient down. The divisor 2 corresponds to extending the block on each side to cover the radius of the centered window. The cited SASA setting uses a halo of 3 for its 7×7 window.
A centered relative rule has a spatial symmetry. If a feature pattern shifts, the centered window can follow it, with the same features and offsets leading to the same response at the shifted site. This is translation equivariance, the property that shifting the input correspondingly shifts the output. The reasoning applies to the local rule where corresponding neighborhoods are available. The image boundaries still depend on how the operation handles padding.
HaloNet removes the mask that enforces centering. The blocked implementation has already set up the interactions between queries and the larger source region. Removing the mask lets the query use that region without gathering a new one or enlarging the blocked score calculation. The shared region is square, but its placement relative to an individual query depends on where the query sits inside the block. A site near an edge has access to more context on the side toward the interior of its block and the halo beyond it. If an image shift carries that site across a block boundary, the available relative offsets can change. The corresponding symmetry in the blocked layer is for shifts aligned with the block size, subject to the boundary conditions. Relative-position scoring still applies to all candidate sites.
Reduce the query grid at stage transitions
A backbone that builds coarse features has to reduce spatial resolution between stages. The earlier attention implementation could update the full grid and then use strided average pooling to combine those outputs into a smaller grid. HaloNet performs the stride in attention by selecting query positions at the intended output spacing. The reduction in queries saves work because each query otherwise requires comparisons and aggregation over its entire source region.
The keys and values still come from the same neighborhood gathered for the stride 1 operation. Features at sites without a query can influence the retained outputs through their keys and values. This makes the operation comparable in purpose to strided convolution. The layer calculates outputs at a subset of spatial locations while reading a surrounding input region at each of those sites. The authors report a 4× reduction in FLOPs in the downsampling layers and no change in accuracy from the substitution under the tested conditions. The factor applies to the downsampling layers.
Keep feature data in the layout the layers use
The authors keep the feature grid in blocked form across the network. Within each block, the spatial positions are flattened into a sequence, meaning the positions are indexed along one dimension within the block. The block-row and block-column indices remain separate. The layout used in the appendix is:
shape(Xblocked) = (B, H/b, W/b, b², c)
The tensor Xblocked stores the blocked features. Its shape starts with the batch dimension B, which indexes the images being processed together. The next dimensions index the H/b rows and W/b columns of blocks across the feature map. The term b² counts the positions in a square block of side b. Each position carries c channels. The dimensions H and W are the height and width of the spatial grid at that point in the network.
Keeping this representation requires operations such as batch normalization to handle the blocked layout directly. The gain comes from avoiding repeated conversions back to the ordinary layout of a batch of spatial grids. Halo gathering also produces neighborhoods in a flattened blocked format. The implementation uses 3D convolutions as gathers, moving the required features into their neighborhood positions through an available operation. In this role the convolution implements data collection. The query, key, and value calculations still define the learned spatial mixing.
The downsampling change and the layout optimizations together improve measured step time by up to 2× on TPU v3. The paper attributes this combined improvement to doing fewer operations in the downsampling layers and reducing the overhead of rearranging features. It leaves operations that fuse stages of computation, and better coordination of memory access with arithmetic, for future implementation work.
Assemble the layers into a family
HaloNet uses the organization of a residual backbone. A residual bottleneck block has channel transformations around a central spatial operation, with a skip path around the block. Halo attention takes the central spatial role in the attention stages. As the hierarchy progresses, the grids become smaller and their channels can become wider. The authors usually use local attention on the high-resolution grids and allow global attention on the smallest maps. A feature hierarchy also gives a detector access to representations at different scales, the role the authors associate with Feature Pyramid Networks.
The family varies the image size, query-block size, halo width, the channel width produced by attention, and the output width of the bottleneck. It also changes how many bottleneck blocks the third group contains and, when an extra final projection is present, how wide that projection is. The paper describes changing the traditional bottleneck factor of 4 and the spatial operation’s traditional output multiplier of 1. It also describes reducing the third-stage block count from 4 to 3 in the design and treats that count as a setting to vary when scaling the family. Larger members can use a final 1×1 convolution before global average pooling, which condenses the spatial grid for classification.
Across the four stages the attention head counts are fixed at (4, 8, 8, 8). The smaller early allocation reflects the greater cost of adding heads on a large spatial grid. The family’s reported local neighborhoods range from 14×14 with block size 8 and halo width 3 to 18×18 with block size 14 and halo width 2. For a given architecture, the authors use common block and halo settings across layers. The features available to a layer still depend on the resolution at which it runs.
The classification family is trained directly on ImageNet. The main experimental protocol uses Nesterov’s accelerated gradient for 350 epochs with a batch size of 4096. It describes a learning rate of 1.6 with a linear warmup over 10 epochs followed by cosine decay. Warmup increases the rate at the start of the run, and the cosine schedule reduces it as training proceeds. The authors train with weight decay, dropout, and image augmentation, and use stochastic depth for larger members. Weight decay penalizes large weights, dropout suppresses some activations during training, and stochastic depth varies which residual transformations participate in training. The paper draws on Dropout and Stochastic Depth.
The family also uses label smoothing and the activation SiLU/Swish-1 following the component experiments. Label smoothing gives some training-target weight to classes other than the labeled class. For data augmentation, the paper increases the strength setting across the family with the sequence 6, 8, 10, 14, 17, 19, 24 and 31. It describes those settings as only lightly tuned. The authors also report late overfitting in the largest variants and use a non-zero endpoint for cosine decay, given as 1.0/128 of the original rate. The classification appendix lists a learning rate of 0.1 and weight decay of 2e⁻⁵. The main schedule and the appendix rate are best understood as separate statements because the paper gives no explicit conversion between them. The image augmentation procedure is RandAugment.
Experiments and results
Classification trained directly on ImageNet
The main experiment evaluates the H0–H7 family on ImageNet ILSVRC-2012. Top-1 accuracy measures how often the class with the highest predicted score agrees with the image’s assigned class. The family comparison pairs HaloNet and EfficientNet at comparable parameter counts and uses comparable image sizes for the corresponding variants. The HaloNet image sizes reach 600×600 in training. The authors state that they tune regularization, including augmentation settings, for the baselines as well as HaloNet and evaluate accuracy at the end of training. The comparison uses RandAugment results for EfficientNet B5 and B7.
On the accuracy versus parameter plot, the authors report that HaloNet runs approximately level with EfficientNet or slightly above it and leads the other families in the comparison. H7 achieves 84.9% top-1 accuracy on the ImageNet validation set. On ImageNet V2, H7 achieves 74.7% top-1 accuracy. The reported gap relative to the linear fit in the cited ImageNet V2 work is -0.5%. That last value measures deviation from the fit. The original validation score and the V2 score are accuracies on different evaluations.
Training directly on ImageNet makes this comparison distinct from the later pretraining study. The result shows that the particular combination of local attention, a multiscale backbone, and the training recipe can be competitive in the parameter range the authors examine. The comparison of training-step times gives a different ranking. For the TPUv3 measurement with batch size 32 per core, attention-heavy HaloNets take longer per step than the corresponding EfficientNets. The paper reports a comparable speed–accuracy tradeoff for hybrids that use convolution early. The H7 hybrid ablation examines how varying the stages assigned to attention changes this balance.
A matched residual comparison
To study particular design choices, the authors create HaloNet-50 by taking the layer allocation and channel widths of ResNet-50 and replacing its spatial convolutions with local attention. The paper reports 77.6% ImageNet accuracy for its tuned ResNet-50, against 76.3% for the original ResNet result it cites. The tuned network is the authors’ convolutional reference for their component study.
The matched backbone designs have different parameter costs because their central operations use weights differently. ResNet-50 has about 25.5 million parameters and HaloNet-50 has about 18.0 million. For the ImageNet studies the authors train both for 150 epochs on images of size 256×256 with a learning rate of 0.1. The usual attention setting in HaloNet-50 uses block size 8, halo width 3, and 16 channels per head. The masked reference uses a 7×7 centered window.
Backbone parameter counts in the matched ImageNet classification study
Local attention uses fewer learned parameters at the matched stage widths and depths.
The numbers
| System or setting | million parameters |
|---|---|
| ResNet-50 | 25.5 |
| HaloNet-50 (this paper) | 18.0 |
These runs address a different question from the full family comparison. Holding layer allocation and channel widths fixed makes the response to specific additions easier to examine. Comparing whole families allows each design to change its settings as it grows. The ablations consequently use the smaller residual comparison for many tests and return to H7 to study the placement of attention in a larger backbone.
Transfer from ImageNet-21k to ImageNet
The transfer experiments start from a labeled dataset with 14.2 million images and 21k labels. The authors pretrain a widened version of H4 on ImageNet-21k and then perform a shorter training run on ImageNet. The idea is to carry over features learned from the larger set and adapt them to the target task by fine-tuning.
For this test the base-width factor is 2.0, giving a base width of 128. The bottleneck factor moves from 3.0 to 4.0, and the second stage grows from 3 layers to 4. The authors remove the final extra 1×1 convolution to give the label embeddings a wider feature representation in pretraining. Their hybrid uses convolutions in the first two stages. Those stages omit Squeeze-and-Excitation, a module that recalibrates feature channels, for the comparison with BiT. The authors also investigate a stem built from linear projections of non-overlapping 4×4 patches in place of the convolutional stem.
Pretraining uses 256×256 images, block size 8, and halo width 2. It runs for 90 epochs at batch size 4096 with a base learning rate of 0.16. The schedule warms up linearly for 2 epochs, then decays with the cosine schedule. The authors use weight decay of 0.00008 and Nesterov optimization. For fine-tuning, the block size and halo width are 12 and 2 at 384×384 resolution, and 16 and 1 at 512×512 resolution. Most learned parameters come from the final pretraining checkpoint. The target label embeddings begin at zero, and the relative embeddings for the new spatial geometry are initialized by linear interpolation from the pretrained embeddings.
The target training runs for 8 epochs with batch size 512. It uses a learning rate of 0.016, warmed up over 0.5 epochs before cosine decay, and label smoothing of 0.1. The authors do without Polyak averaging, an averaging procedure for weights over training. The pretraining timing is TPUv3 compute time for batch size 32 per core. The inference comparison also uses a single TPUv3 core.
The authors report that the widened H4 and its hybrid achieve better ImageNet accuracy than the compared ViT and BiT variants after pretraining, and that their inference is faster on larger images. The BiT reference is a ResNet-152 with 4× width. The result concerns this pretraining source, the target fine-tuning procedure, and the reported inference conditions. It extends the evidence beyond the original parameter-matched classification family into a setting where a larger labeled corpus supplies the starting representations.
Detection and instance segmentation on COCO
For the structured prediction experiments, the paper uses Mask R-CNN with residual backbones. Detection predicts a bounding box for each object instance. Instance segmentation predicts a mask identifying pixels that belong to each instance. The authors report mean average precision, or mAP, separately for boxes and masks. Average precision evaluates ranked predictions using their precision and recall, and the paper also considers results broken down by object size. The benchmark is Microsoft COCO.
The attention variants modify the last stage of ResNet-50 or ResNet-101. The common geometry uses block size 8 and halo width 3. For ResNet-50 the authors also try block size 32 with halo width 3 to examine the effect of extending the area each query can see. They use Squeeze-and-Excitation with convolution in these backbones. The convolutional baseline is itself strengthened, and the paper reports that its ResNet-50 substantially improves on a more conventional reference. The comparison of interest is the gain above that stronger baseline.
The backbones are pretrained on ImageNet for 350 epochs using 512×512 images. The authors choose that resolution to bring pretraining closer to the detection resolution. The pretraining recipe includes label smoothing, RandAugment at magnitude 15, and stochastic depth with probability 0.1. Squeeze-and-Excitation uses reduction factor 1/8. The weights learned for the backbone are carried over to Mask R-CNN. The remaining detector parameters begin training from scratch.
The COCO experiment uses 1024×1024 images and runs for 32 epochs in the paper’s main description. The authors use the Cloud TPU Detection Codebase. The appendix specifies 67,500 steps, with 0.1× learning-rate changes at 60,000 and 65,000 steps. It gives a learning rate of 0.1 for stochastic gradient descent, momentum of 0.9, and a warmup of 500 steps at a fixed rate of 2/300. The batch size is 64. The appendix also specifies L2 weight decay of 4e⁻⁵ and multiscale jitter, varying the input scale over the stated interval from 4/5 to 5/4.
Against the strengthened baselines, the attention variants improve bounding-box performance by at least 0.7 mAP and mask performance by at least 0.6 mAP on COCO. With block size 8, the gain above the ResNet-50 baseline covers half of the detection mAP gap to the ResNet-101 baseline. For instance segmentation it covers 70% of the corresponding mAP gap, while the increase in wall-clock time is less than a third of the increase between the two baseline runs. The paper also reports an accuracy gain from local attention with the deeper ResNet-101 backbone.
The paper measures backbone speed separately from full training time. The backbone timing excludes the feature pyramid network and measures milliseconds for batch size 32 on 2 TPUv3 cores. The training-time comparison uses the peak images per second of Mask R-CNN runs at batch size 64, with the caption specifying 8 TPUv3 cores for that timing. The experiments therefore report an accuracy gain on the full prediction tasks alongside timing measures with explicitly different scopes.
What the ablations show
The effect of centering the window
The masked comparison holds the block size at 8 and the halo width at 3. The SASA-style mask restricts each query to its own 7×7 centered neighborhood. The HaloNet setting uses the entire source region that was gathered for the group. The unmasked version obtains higher ImageNet accuracy, and the paper shows a wider advantage when more regularization is used. This supports the decision to make the extra source sites available in the scaled family.
The experiment ties two effects together. A query has access to a larger receptive field when the mask is removed, and its set of relative offsets can vary with its block position. The observed gain belongs to the combination of broader access and the resulting change in symmetry. The authors suspect that translations and crops in image augmentation reduce the need to impose the centered rule. The comparison shows that regularization changes the size of the advantage. Identifying which augmentation accounts for the effect would require a more targeted intervention.
Neighborhood extent, overlap, and image resolution
Increasing the neighborhood from 6×6 to 12×12 produces a reported 1.3% accuracy gain in the HaloNet ImageNet architecture study. The authors report improvements as the window grows within the useful range and indicate that the gains level off. A wider window lets the query consider features at greater distances with the same learned content projections. It also adds candidate pairs, so the accuracy result helps explain why the authors spend some computation on larger neighborhoods while continuing to restrict high-resolution layers to local attention.
The halo and query block play distinct roles in this comparison. A larger halo adds surrounding evidence. A larger query block increases the group of positions that reuse the same source region. For a fixed source-window size, using a larger block with a smaller halo reduces the number of separately gathered regions. The paper reports that changing the block size for a fixed window size has little effect on accuracy in the tested settings. The combination of those observations gives a way to choose how much neighborhood data to replicate without incurring a clear accuracy loss within the comparison.
The authors also test what happens when the halo is removed altogether. Using block size 4 with halo width 1 gives higher accuracy than using block size 8 with halo width 0, even though the zero-halo setting has the larger source window. The smaller window with a halo permits queries to use information across block boundaries. In the zero-halo case, those boundaries separate the groups for that layer. The comparison shows why the number of candidate positions and the connectivity imposed by the tiling are both relevant. A larger isolated block can include more sites while cutting off some immediately adjacent evidence that an overlapping region would include.
The image-size study scales the input grid and examines how each backbone uses the extra detail. HaloNet-50 continues to improve as image size increases. ResNet-50 also benefits from larger images, with its improvement tapering in the comparison described by the authors. The accuracy gap persists across the tested sizes. Image resolution and the area available to an individual layer are separate settings. A grid can contain more detail while still using a fixed spatial operator, or it can combine the larger input with a larger attention window. The two studies together provide evidence that both forms of scaling can be productive for HaloNet.
Relative offsets still matter in blocked attention
The appendix replaces the relative-position contribution with factorized absolute position encodings. The alternative adds position information to the activations before local attention in every layer. In the HaloNet ImageNet component setup, the relative version achieves 78.6% accuracy and the absolute version achieves 77.5%.
ImageNet classification accuracy with two HaloNet position encodings
The relative position rule gives higher accuracy in the reported comparison.
The numbers
| System or setting | accuracy % |
|---|---|
| Factorized absolute position encoding | 77.5 |
| Relative position encoding (this paper) | 78.6 |
The geometry of the source region and the way a query learns about geometry are distinct choices. Removing the centering mask changes the set of sites the query may read. Relative scoring represents each permitted site by its displacement from the query. With absolute encoding, position is incorporated into the features before attention. The reported comparison supports the paper’s relative scoring design under blocked attention even though the neighborhoods themselves depend on the block grid. Since the two versions inject positional information at different points in the calculation, the result compares the implemented encoding schemes as a whole.
Regularizers and architectural additions transfer differently
The component study evaluates additions drawn from convolutional practice. The regularization pair is label smoothing and RandAugment. The architectural pair is Squeeze-and-Excitation and SiLU/Swish-1. Squeeze-and-Excitation recalibrates channels after spatial processing. SiLU changes each activation through a weight determined by the activation itself. The paper defines it as:
SiLU(x) = x × sigmoid(x)
Here x is the input activation, sigmoid(x) is its sigmoid gate, and × multiplies the activation by that gate. SiLU(x) is the resulting activation, with the same function called Swish-1 in the paper.
Adding the two regularizers improves HaloNet-50’s ImageNet classification accuracy by 1.3% and ResNet-50’s by 0.8%. The authors describe HaloNet-50 as having around 30% fewer parameters in this comparison. Its stronger response to regularization suggests that parameter count alone gives a poor indication of which training recipe will suit the change in spatial operation. The authors propose the expressive interactions in attention as one reason it might benefit from regularization strengths associated with larger convolutional networks.
ImageNet accuracy gains from adding label smoothing and RandAugment
The combined regularization additions improve HaloNet more than ResNet.
The numbers
| System or setting | reported accuracy gain % |
|---|---|
| ResNet-50 | 0.8 |
| HaloNet-50 (this paper) | 1.3 |
The study uses RandAugment magnitude 10 for the settings with augmentation. Weight decay is 0.00004 with RandAugment and 0.00008 otherwise. The authors found the higher decay setting appeared to harm ResNet-50 accuracy alongside RandAugment. Thus the gain applies to the tested augmented recipe. It reflects a comparison in which the surrounding regularization settings are also important to interpreting the result.
Squeeze-and-Excitation together with SiLU/Swish-1 shows the reverse pattern. ImageNet accuracy improves by 1.3% for ResNet-50 and by 0.4% for HaloNet-50 when the pair is added. The authors speculate that attention already supplies some gating and multiplicative interactions that can make a further channel gate less valuable. The paired gain establishes how well the two additions work together in the comparison. It leaves open how much of the result comes from each addition or its interaction with the other. The authors ultimately include label smoothing, RandAugment, and SiLU/Swish-1 in the H-series recipe.
Where additional capacity pays off
In the appendix, the authors enlarge HaloNet-50 by varying settings against a parameter budget of 30 million. They find the most productive changes are to increase the channel width of the attention values and to add layers. The value projection controls what representation gets passed into the weighted sum. The query and key projections determine the features used to score candidates. A wider value path can carry a richer representation into the output even when the method of computing the weights remains the same. An extra layer gives the backbone another round of feature transformation and spatial interaction.
This exercise complements the window-size comparison. A larger window changes which features the operation can use, and a wider value representation changes what those features can contribute. More layers change how frequently the backbone performs such mixing. Those are distinct ways to spend capacity. The reported preference for wider values and more layers is specific to the HaloNet-50 expansion and its tested parameter budget.
Which stages are worth assigning to attention
The H7 hybrid study replaces attention in selected stages with convolution plus Squeeze-and-Excitation. The variants have about 67 million parameters. The reported training and inference times are normalized to EfficientNet B7. Using convolution in stages 1–3 and reserving attention for the final stage gives the fastest variant, with a reported 1% loss in ImageNet top-1 accuracy. Applying convolution in the first two stages and attention in the last two keeps accuracy nearer to H7’s and makes both training and inference steps substantially faster.
Keeping attention in the later stages reduces the number of spatial output sites at which the backbone must evaluate that operation. The experiment shows that the assignment across stages has a practical effect at a similar parameter count. It also shows that retaining attention only at the very end has a larger accuracy cost than using it across the later part of the hierarchy. The experiment changes an entire stage’s processing, including the use of the channel module with convolution. Its timing and accuracy differences belong to those stage substitutions.
What larger windows change in detection
For the ResNet-50 detector, the block size 32 variant gives similar overall COCO performance to the block size 8 variant and takes longer to run. The larger-block version performs considerably better for small objects in the authors’ comparison. Large-object localization shows the greatest improvement when attention is added to the convolutional reference. These findings refer to different comparisons. One changes the extent of attention within the hybrid, and the other examines the effect of adding attention relative to a convolutional baseline.
The late feature map in the block size 32 setting has 32 sites on each spatial axis after downsampling. The authors explain the resulting resolution from the detector input as:
1024 / 32 = 32
Here 1024 is the length of one input-image axis, the divisor 32 is the spatial downsampling factor by that stage, and the result 32 is the feature-map length on that axis. A block of size 32 can therefore cover the entire map, and the paper describes attention there as global. The comparison tests an increase in context that reaches beyond the usual local halo setting. Similar overall mAP can coexist with different outcomes by object size and different execution costs, which is why the aggregate and the size-specific observations both matter.
Limitations
Limits the authors state
The paper identifies training speed as an unfinished part of the work. HaloNets that use attention for the spatial processing throughout the residual stages are slower to train than comparable EfficientNets in the reported setting. The authors call these backbones pure attention while retaining a convolutional stem. The speed gains from sub-sampling queries and improving data layout make larger training runs feasible. Closing the remaining gap motivates their suggestions for better memory management, fused operations, and closer coordination of gathering with computation.
The authors also treat the architecture as a starting point for designs built specifically around attention. The hierarchy comes from ResNet, and shared settings for block and halo size across layers simplify the design. The cost of a query and the usefulness of a particular context region can change as the grid shrinks and the feature width grows. The paper proposes searching over these choices with a target accelerator in mind. It also leaves open whether widening the attention operations would make arithmetic, rather than data movement, the main runtime constraint.
The parameter comparison covers the range of HaloNet variants the authors build and train. The paper defers training larger HaloNets for comparison with larger EfficientNets. Similarly, the ImageNet-21k transfer results are described as preliminary, with larger HaloNet and hybrid variants left for future investigation. The result from direct ImageNet training and the result after ImageNet-21k pretraining address distinct regimes, each with its own architecture and training choices.
The structured prediction work is explicitly an initial investigation. Attention is added late in strong convolutional backbones, and the authors leave more extensive replacements for future work. The gains establish that attention can complement those backbones for COCO box and mask prediction. They leave open how performance, training cost, and the effect of receptive-field size would change if attention were used earlier or more widely through the detector.
Limits inferred from the comparisons
Parameter count gives a measure of the learned weights. Runtime also depends on how many pairs enter the attention calculation, which tensors must be held in memory, and how well the data layout maps to a particular accelerator. A backbone can achieve a better accuracy per parameter while requiring more time per training step. The paper measures several of these dimensions separately. Its timings are tied to particular batch sizes and TPUv3 configurations, and its detector backbone timing excludes the feature pyramid network. End-to-end latency at a different batch size or on another accelerator remains an open measurement.
The ablations support design choices more directly than they establish general explanations. The mask test changes receptive-field access and translation symmetry together. The absolute-position comparison changes both the kind of position information and the point at which it enters the operation. The H7 hybrid substitution introduces convolution together with Squeeze-and-Excitation. Each result is evidence for one implemented configuration against another. Assigning the entire measured difference to a single theoretical property would require a comparison that separates the changes.
The regularization results likewise concern particular combinations, with weight decay adjusted in the RandAugment runs. They show which recipe produces the greater improvement in the matched residual study. They leave individual effects and interactions unresolved. The image-size and window studies give empirical trends over the explored configurations. Window arithmetic continues to rise with the candidate area, and the paper reports a point beyond which adding more context brings diminishing improvement. A particular choice of grid resolution and neighborhood still has to be judged in the architecture where it will run.
Some reported settings are difficult to reconcile as an exact specification. The main ImageNet protocol gives a learning rate of 1.6, while the appendix gives 0.1 in its classification description. The detection appendix distributes a batch of 64 over 32 TPUv3 cores, whereas the training-time estimate in the throughput caption is based on a batch of 64 and 8 TPUv3 cores. These passages may concern different configurations, and the paper leaves their relationship unclear. The description of the late detection substitutions also uses different layer counts in different passages. The placement in the final backbone stage and the reported block and halo settings are clearer than the exact count of substituted layers.
There is a related ambiguity in the positional parameter example. The main discussion gives 1008 relative-position parameters for its example with window size 63 and head dimension 16. The appendix gives the factorized expression with a different counting form. The paper does not reconcile those presentations. Its architectural argument can be read from the dependence of the projection sizes on channel width and the much smaller contribution assigned to the spatial embeddings in both discussions. An exact count for a particular implementation requires knowing how the relative offsets are indexed and shared there.
The evidence concerns recognition on the ImageNet evaluations and the stated transfer and COCO tasks. Self-attention’s use in language helps motivate the method, while the measured performance depends on a spatial grid, block boundaries, and a multiscale visual hierarchy. The paper’s direct finding is that those choices can support competitive visual recognition at the tested parameter budgets, with speed depending strongly on stage placement and execution conditions.
What came after
MLP-Mixer cites HaloNet and addresses the design of a vision architecture through an all-MLP approach. An MLP is a multilayer perceptron. The connection places HaloNet among work reconsidering the basic operations used in visual recognition. HaloNet studies how to organize content-dependent spatial comparisons within a residual hierarchy. MLP-Mixer’s stated architectural direction is to use MLPs throughout.
The citation establishes a connection between the two papers. The nature of any technical reuse is unspecified. Claims that MLP-Mixer adopted the shared halo, query sub-sampling, or the blocked layout would need evidence about how it used the cited work. The documented connection is between two investigations of how to build image-recognition architectures around different operations.
Cite
Cite as Ashish Vaswani, Prajit Ramachandran, Aravind Srinivas, Niki Parmar, Blake A. Hechtman and Jonathon Shlens. 2021. Scaling Local Self-Attention for Parameter Efficient Visual Backbones. IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings.
@inproceedings{vaswani2021scaling,
title = {{Scaling Local Self-Attention for Parameter Efficient Visual Backbones}},
author = {Ashish Vaswani, Prajit Ramachandran, Aravind Srinivas, Niki Parmar, Blake A. Hechtman and Jonathon Shlens},
booktitle = {IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings},
year = {2021},
doi = {10.1109/cvpr46437.2021.01270},
eprint = {2103.12731},
archivePrefix = {arXiv},
url = {https://doi.org/10.1109/cvpr46437.2021.01270}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/vaswani-2021-scaling-local-self-attention-parameter/
References
- Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. our card
- Irwan Bello. Lambdanetworks: Modeling long-range interactions without attention. arXiv preprint arXiv:2102.08602, 2021. OpenAlex ↗ · Scholar ↗
- Irwan Bello, Barret Zoph, Ashish Vaswani, Jonathon Shlens, and Quoc V Le. Attention augmented convolutional networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 3286–3295, 2019. our card
- Antoni Buades, Bartomeu Coll, and J-M Morel. A non-local algorithm for image denoising. In 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'05), volume 2, pages 60–65. IEEE, 2005. OpenAlex ↗ · Scholar ↗
- Kumar Chellapilla, Sidd Puri, and Patrice Simard. High performance convolutional neural networks for document processing. In Tenth International Workshop on Frontiers in Handwriting Recognition, 2006. OpenAlex ↗ · Scholar ↗
- Sharan Chetlur, Cliff Woolley, Philippe Vandermersch, Jonathan Cohen, John Tran, Bryan Catanzaro, and Evan Shelhamer. cudnn: Efficient primitives for deep learning. arXiv preprint arXiv:1410.0759, 2014. our card
- Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019. our card
- Jean-Baptiste Cordonnier, Andreas Loukas, and Martin Jaggi. On the relationship between self-attention and convolutional layers. arXiv preprint arXiv:1911.03584, 2019. OpenAlex ↗ · Scholar ↗
- Ekin D Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V Le. Autoaugment: Learning augmentation strategies from data. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 113–123, 2019. OpenAlex ↗ · Scholar ↗
- Ekin D Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V Le. Randaugment: Practical data augmentation with no separate search. arXiv preprint arXiv:1909.13719, 2019. OpenAlex ↗ · Scholar ↗
- J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009. OpenAlex ↗ · Scholar ↗
- 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
- Stefan Elfwing, Eiji Uchibe, and Kenji Doya. Sigmoid-weighted linear units for neural network function approximation in reinforcement learning. Neural Networks, 107:3–11, 2018. OpenAlex ↗ · Scholar ↗
- Gamaleldin F Elsayed, Prajit Ramachandran, Jonathon Shlens, and Simon Kornblith. Revisiting spatial invariance with low-rank local connectivity. arXiv preprint arXiv:2002.02959, 2020. OpenAlex ↗ · Scholar ↗
- Alex Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. our card
- Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In ICCV, 2017. OpenAlex ↗ · Scholar ↗
- Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016. our card
- Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pages 630–645. Springer, 2016. OpenAlex ↗ · Scholar ↗
- Tong He, Zhi Zhang, Hang Zhang, Zhongyue Zhang, Junyuan Xie, and Mu Li. Bag of tricks for image classification with convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 558–567, 2019. OpenAlex ↗ · Scholar ↗
- Dan Hendrycks and Kevin Gimpel. Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415, 2016. OpenAlex ↗ · Scholar ↗
- Jonathan Ho, Nal Kalchbrenner, Dirk Weissenborn, and Tim Salimans. Axial attention in multidimensional transformers. arXiv preprint arXiv:1912.12180, 2019. OpenAlex ↗ · Scholar ↗
- Han Hu, Zheng Zhang, Zhenda Xie, and Stephen Lin. Local relation networks for image recognition. In Proceedings of the IEEE International Conference on Computer Vision, pages 3464–3473, 2019. OpenAlex ↗ · Scholar ↗
- Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7132–7141, 2018. OpenAlex ↗ · Scholar ↗
- Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In European conference on computer vision, pages 646–661. Springer, 2016. our card
- David H Hubel and TN Wiesel. Shape and arrangement of columns in cat's striate cortex. The Journal of physiology, 165(3):559, 1963. OpenAlex ↗ · Scholar ↗
- David H Hubel and Torsten N Wiesel. Receptive fields and functional architecture of monkey striate cortex. The Journal of physiology, 195(1):215–243, 1968. OpenAlex ↗ · Scholar ↗
- Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. OpenAlex ↗ · Scholar ↗
- Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. In Proceedings of the 22nd ACM international conference on Multimedia, pages 675–678, 2014. our card
- Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, and Neil Houlsby. Big transfer (bit): General visual representation learning. arXiv preprint arXiv:1912.11370, 6(2):8, 2019. OpenAlex ↗ · Scholar ↗
- Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NeurIPS, 2012. our card
- Andrew Lavin and Scott Gray. Fast algorithms for convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4013–4021, 2016. our card
- Linjie Li, Zhe Gan, Yu Cheng, and Jingjing Liu. Relation-aware graph attention network for visual question answering. In Proceedings of the IEEE International Conference on Computer Vision, pages 10313–10322, 2019. OpenAlex ↗ · Scholar ↗
- Xiang Li, Wenhai Wang, Xiaolin Hu, and Jian Yang. Selective kernel networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 510–519, 2019. OpenAlex ↗ · Scholar ↗
- Tsung-Yi Lin, Piotr Dollár, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2117–2125, 2017. our card
- 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, pages 740–755. Springer, 2014. our card
- Zhouhan Lin, Minwei Feng, Cicero Nogueira dos Santos, Mo Yu, Bing Xiang, Bowen Zhou, and Yoshua Bengio. A structured self-attentive sentence embedding. arXiv preprint arXiv:1703.03130, 2017. our card
- Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983, 2016. our card
- Michael Mathieu, Mikael Henaff, and Yann LeCun. Fast training of convolutional networks through ffts. arXiv preprint arXiv:1312.5851, 2013. OpenAlex ↗ · Scholar ↗
- Y. E. NESTEROV. A method for solving the convex programming problem with convergence rate $o(1/k^2)$. Dokl. Akad. Nauk SSSR, 269:543–547, 1983. OpenAlex ↗ · Scholar ↗
- Ankur P Parikh, Oscar Täckström, Dipanjan Das, and Jakob Uszkoreit. A decomposable attention model for natural language inference. arXiv preprint arXiv:1606.01933, 2016. our card
- Sylvain Paris, Pierre Kornprobst, Jack Tumblin, and Frédo Durand. Bilateral filtering: Theory and applications. Now Publishers Inc, 2009. OpenAlex ↗ · Scholar ↗
- Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Łukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. In International Conference on Machine Learning, 2018. OpenAlex ↗ · Scholar ↗
- Boris T Polyak and Anatoli B Juditsky. Acceleration of stochastic approximation by averaging. SIAM journal on control and optimization, 30(4):838–855, 1992. OpenAlex ↗ · Scholar ↗
- Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. arXiv preprint arXiv:2003.13678, 2020. our card
- Prajit Ramachandran, Niki Parmar, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jon Shlens. Stand-alone self-attention in vision models. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 68–80. Curran Associates, Inc., 2019. OpenAlex ↗ · Scholar ↗
- Prajit Ramachandran, Barret Zoph, and Quoc V Le. Searching for activation functions. arXiv preprint arXiv:1710.05941, 2017. OpenAlex ↗ · Scholar ↗
- Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imagenet? In International Conference on Machine Learning, pages 5389–5400. PMLR, 2019. OpenAlex ↗ · Scholar ↗
- Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based sparse attention with routing transformers. arXiv preprint arXiv:2003.05997, 2020. our card
- Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision, 115(3):211–252, 2015. our card
- Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Self-attention with relative position representations. arXiv preprint arXiv:1803.02155, 2018. our card
- Laurent Sifre. Rigid-motion scattering for image classification. Ph. D. thesis, 2014. OpenAlex ↗ · Scholar ↗
- Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. arXiv preprint arXiv:2101.11605, 2021. OpenAlex ↗ · Scholar ↗
- Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1):1929–1958, 2014. our card
- Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In Proceedings of the IEEE international conference on computer vision, pages 843–852, 2017. our card
- Ilya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In International Conference on Machine Learning, 2013. OpenAlex ↗ · Scholar ↗
- Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2818–2826, 2016. OpenAlex ↗ · Scholar ↗
- Mingxing Tan and Quoc V Le. Efficientnet: Rethinking model scaling for convolutional neural networks. arXiv preprint arXiv:1905.11946, 2019. our card
- Nicolas Vasilache, Jeff Johnson, Michael Mathieu, Soumith Chintala, Serkan Piantino, and Yann LeCun. Fast convolutional nets with fbfft: A gpu performance evaluation. arXiv preprint arXiv:1412.7580, 2014. OpenAlex ↗ · Scholar ↗
- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998–6008, 2017. our card
- Huiyu Wang, Yukun Zhu, Bradley Green, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. Axial-deeplab: Stand-alone axial-attention for panoptic segmentation. arXiv preprint arXiv:2003.07853, 2020. OpenAlex ↗ · Scholar ↗
- Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7794–7803, 2018. OpenAlex ↗ · Scholar ↗
- Shmuel Winograd. Arithmetic complexity of computations, volume 33. Siam, 1980. OpenAlex ↗ · Scholar ↗
- Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1492–1500, 2017. OpenAlex ↗ · Scholar ↗
- Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International conference on machine learning, pages 2048–2057, 2015. our card
- Jiancheng Yang, Qiang Zhang, Bingbing Ni, Linguo Li, Jinxian Liu, Mengdie Zhou, and Qi Tian. Modeling point clouds with self-attention and gumbel subset sampling. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3323–3332, 2019. OpenAlex ↗ · Scholar ↗
- Jiahui Yu, Pengchong Jin, Hanxiao Liu, Gabriel Bender, Pieter-Jan Kindermans, Mingxing Tan, Thomas Huang, Xiaodan Song, Ruoming Pang, and Quoc Le. Bignas: Scaling up neural architecture search with big single-stage models. arXiv preprint arXiv:2003.11142, 2020. OpenAlex ↗ · Scholar ↗
- Richard Zhang. Making convolutional networks shift-invariant again. arXiv preprint arXiv:1904.11486, 2019. OpenAlex ↗ · Scholar ↗
- Hengshuang Zhao, Jiaya Jia, and Vladlen Koltun. Exploring self-attention for image recognition. arXiv preprint arXiv:2004.13621, 2020. OpenAlex ↗ · Scholar ↗
- Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8697–8710, 2018. our card