Papers › Augmenting Convolutional networks with attention-based aggregation

Augmenting Convolutional networks with attention-based aggregation

27 Dec 2021arXiv:2112.13692archive 2025-07-28

Hugo Touvron, Matthieu Cord, Alaaeldin El-Nouby, Piotr Bojanowski, Armand Joulin, Gabriel Synnaeve, Hervé Jégou

We show how to augment any convolutional network with an attention-based global map to achieve non-local reasoning. We replace the final average pooling by an attention-based aggregation layer akin to a single transformer block, that weights how the patches are involved in the classification decision. We plug this learned aggregation layer with a simplistic patch-based convolutional network parametrized by 2 parameters (width and depth). In contrast with a pyramidal design, this architecture family maintains the input patch resolution across all the layers. It yields surprisingly competitive trade-offs between accuracy and complexity, in particular in terms of memory consumption, as shown by our experiments on various computer vision tasks: object classification, image segmentation and detection.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2112.13692")

Code

Syntology Ran 1 of 2 code samples harvested from 2 repositories linked to this paper; 1 has no recorded run. Of those that ran: 1 ran · our draft was wrong.

By repository: official repository: 1 sample from 1 repository, 1 ran; community (archive-listed): 1 sample from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

facebookresearch/deit officialmentioned in paperpytorch report
DarshanDeshpande/jax-models mentioned on GitHubjax report
dongkyuk/PatchConvNet-pytorch mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

2 samples harvested; 1 ran; 0 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
1unverified

Licence: 0 of the 2 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

conv3x3 facebookresearch/deit/patchconvnet_models.py official repository ran · our draft was wrong Apache-2.0 (permissive) · ba6aa5f07daca9cd · report
get_activation dongkyuk/PatchConvNet-pytorch/model/custom_blocks.py community (archive-listed) unverified MIT (permissive) · af6a4caff0775c04 · report

Tasks

ClassificationImage ClassificationImage SegmentationObject DetectionSemantic Segmentation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification ImageNet PatchConvNet-L120-21k-384 Number of params 334.3M #108 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-L120-21k-384 Top 1 Accuracy 87.1% #108 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-B60-21k-384 Number of params 99.4M #139 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-B60-21k-384 Top 1 Accuracy 86.5% #139 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-S60-21k-512 Number of params 25.2M #230 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-S60-21k-512 Top 1 Accuracy 85.4% #230 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-B120 Number of params 188.6M #360 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-B120 Top 1 Accuracy 84.1% #360 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-B60 Number of params 99.4M #423 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-B60 Top 1 Accuracy 83.5% #423 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-S120 Number of params 47.7M #458 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-S120 Top 1 Accuracy 83.2% #458 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-S60 Number of params 25.2M #574 of 1060 Archive leaderboard report
Image Classification ImageNet PatchConvNet-S60 Top 1 Accuracy 82.1% #574 of 1060 Archive leaderboard report
Object Detection COCO minival PatchConvNet-S120 (Mask R-CNN) box AP 47.0 #100 of 220 Archive leaderboard report
Object Detection COCO minival PatchConvNet-S60 (Mask R-CNN) box AP 46.4 #106 of 220 Archive leaderboard report
Semantic Segmentation ADE20K PatchConvNet-L120 (UperNet) Validation mIoU 52.9 #84 of 235 Archive leaderboard report
Semantic Segmentation ADE20K PatchConvNet-B120 (UperNet) Validation mIoU 52.8 #86 of 235 Archive leaderboard report
Semantic Segmentation ADE20K PatchConvNet-B60 (UperNet) Validation mIoU 51.1 #102 of 235 Archive leaderboard report
Semantic Segmentation ADE20K PatchConvNet-S60 (UperNet) Validation mIoU 49.3 #134 of 235 Archive leaderboard report
Semantic Segmentation ADE20K val PatchConvNet-L120 (UperNet) mIoU 52.9 #41 of 95 Archive leaderboard report
Semantic Segmentation ADE20K val PatchConvNet-B120 (UperNet) mIoU 52.8 #43 of 95 Archive leaderboard report
Semantic Segmentation ADE20K val PatchConvNet-B60 (UperNet) mIoU 51.1 #47 of 95 Archive leaderboard report
Semantic Segmentation ADE20K val PatchConvNet-S60 (UperNet) mIoU 49.3 #59 of 95 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Average PoolingClass AttentionLayerScale

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections