Papers › XCiT: Cross-Covariance Image Transformers

XCiT: Cross-Covariance Image Transformers

17 Jun 2021NeurIPS 2021 12arXiv:2106.09681archive 2025-07-28

Alaaeldin El-Nouby, Hugo Touvron, Mathilde Caron, Piotr Bojanowski, Matthijs Douze, Armand Joulin, Ivan Laptev, Natalia Neverova, Gabriel Synnaeve, Jakob Verbeek, Hervé Jegou

Following their success in natural language processing, transformers have recently shown much promise for computer vision. The self-attention operation underlying transformers yields global interactions between all tokens ,i.e. words or image patches, and enables flexible modelling of image data beyond the local interactions of convolutions. This flexibility, however, comes with a quadratic complexity in time and memory, hindering application to long sequences and high-resolution images. We propose a "transposed" version of self-attention that operates across feature channels rather than tokens, where the interactions are based on the cross-covariance matrix between keys and queries. The resulting cross-covariance attention (XCA) has linear complexity in the number of tokens, and allows efficient processing of high-resolution images. Our cross-covariance image transformer (XCiT) is built upon XCA. It combines the accuracy of conventional transformers with the scalability of convolutional architectures. We validate the effectiveness and generality of XCiT by reporting excellent results on multiple vision benchmarks, including image classification and self-supervised feature learning on ImageNet-1k, object detection and instance segmentation on COCO, and semantic segmentation on ADE20k.

PaperPDFConference PDFCodeCode 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="2106.09681")

Code

Syntology Ran 3 of 14 code samples harvested from 2 repositories linked to this paper; 11 have no recorded run. Of those that ran: 1 ran · honoured contract; 2 ran with no contract checked.

By repository: official repository: 3 samples from 1 repository, 0 ran; community (archive-listed): 11 samples from 1 repository, 3 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/xcit officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
rwightman/pytorch-image-models officialmentioned in papermentioned on GitHubpytorch report
BrilliantYuKaimin/XCiT-PaddlePaddle mentioned on GitHubpaddle report
adrienangeli/dino mentioned on GitHubpytorchApache-2.0 report
facebookresearch/dino mentioned on GitHubpytorchApache-2.0 report
facebookresearch/vissl mentioned on GitHubpytorch report
PaddlePaddle/PASSL paddleApache-2.0 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

14 samples harvested; 3 ran; 1 honoured the contract we drafted; 11 have 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 · honoured contract
2ran
11unverified

Licence: 3 of the 14 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.

build_dataset facebookresearch/xcit/datasets.py official repository unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · 18119fb5f5299851 · report
build_transform facebookresearch/xcit/datasets.py official repository unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · e7791ea55637b67a · report
conv3x3 facebookresearch/xcit/xcit.py official repository unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · 429abe9dc8793925 · report
bool_flag adrienangeli/dino/utils.py community (archive-listed) ran Apache-2.0 (permissive) · c19231378e41dc5a · report
clip_gradients adrienangeli/dino/utils.py community (archive-listed) ran Apache-2.0 (permissive) · 2b5489053b222e00 · report
cosine_scheduler adrienangeli/dino/utils.py community (archive-listed) ran · honoured contract fingerprinted Apache-2.0 (permissive) · 361a6b24f11fc50a · report
config_imname adrienangeli/dino/eval_image_retrieval.py community (archive-listed) unverified Apache-2.0 (permissive) · 49cf1f4ce52e9613 · report
config_qimname adrienangeli/dino/eval_image_retrieval.py community (archive-listed) unverified Apache-2.0 (permissive) · 91c5ae2396603107 · report
is_image_file adrienangeli/dino/eval_copy_detection.py community (archive-listed) unverified Apache-2.0 (permissive) · dfebfd56865b6379 · report
knn_classifier adrienangeli/dino/eval_knn.py community (archive-listed) unverified Apache-2.0 (permissive) · 6ecb6791e6a9ebfb · report
label_propagation adrienangeli/dino/eval_video_segmentation.py community (archive-listed) unverified Apache-2.0 (permissive) · 3093e0466654d790 · report
norm_mask adrienangeli/dino/eval_video_segmentation.py community (archive-listed) unverified Apache-2.0 (permissive) · e015f2c93c762aff · report
restrict_neighborhood adrienangeli/dino/eval_video_segmentation.py community (archive-listed) unverified Apache-2.0 (permissive) · efc78e753491eeab · report
score_ap_from_ranks_1 adrienangeli/dino/eval_copy_detection.py community (archive-listed) unverified Apache-2.0 (permissive) · 5f21619ff716c1ce · report

Tasks

Image ClassificationInstance SegmentationObject DetectionSelf-Supervised Image ClassificationSemantic Segmentationimage-classificationobject-detection

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification ImageNet XCiT-L24 GFLOPs 417.9 #182 of 1060 Archive leaderboard report
Image Classification ImageNet XCiT-L24 Number of params 189M #182 of 1060 Archive leaderboard report
Image Classification ImageNet XCiT-L24 Top 1 Accuracy 86% #182 of 1060 Archive leaderboard report
Image Classification ImageNet XCiT-M24 GFLOPs 188 #193 of 1060 Archive leaderboard report
Image Classification ImageNet XCiT-M24 Number of params 84M #193 of 1060 Archive leaderboard report
Image Classification ImageNet XCiT-M24 Top 1 Accuracy 85.8% #193 of 1060 Archive leaderboard report
Image Classification ImageNet XCiT-S24 GFLOPs 106 #213 of 1060 Archive leaderboard report
Image Classification ImageNet XCiT-S24 Number of params 48M #213 of 1060 Archive leaderboard report
Image Classification ImageNet XCiT-S24 Top 1 Accuracy 85.6% #213 of 1060 Archive leaderboard report
Image Classification ImageNet XCiT-S12 GFLOPs 55.6 #256 of 1060 Archive leaderboard report
Image Classification ImageNet XCiT-S12 Number of params 26M #256 of 1060 Archive leaderboard report
Image Classification ImageNet XCiT-S12 Top 1 Accuracy 85.1% #256 of 1060 Archive leaderboard report
Instance Segmentation COCO minival XCiT-M24/8 mask AP 43.7 #60 of 93 Archive leaderboard report
Instance Segmentation COCO minival XCiT-S24/8 mask AP 43.0 #63 of 93 Archive leaderboard report
Object Detection COCO minival XCiT-M24/8 box AP 48.5 #90 of 220 Archive leaderboard report
Object Detection COCO minival XCiT-S24/8 box AP 48.1 #92 of 220 Archive leaderboard report
Semantic Segmentation ADE20K XCiT-M24/8 (UperNet) Validation mIoU 48.4 #146 of 235 Archive leaderboard report
Semantic Segmentation ADE20K XCiT-S24/8 (UperNet) Validation mIoU 48.1 #152 of 235 Archive leaderboard report
Semantic Segmentation ADE20K XCiT-S24/8 (Semantic-FPN) Validation mIoU 47.1 #167 of 235 Archive leaderboard report
Semantic Segmentation ADE20K XCiT-M24/8 (Semantic-FPN) Validation mIoU 46.9 #169 of 235 Archive leaderboard report
Semantic Segmentation ADE20K XCiT-S12/8 (UperNet) Validation mIoU 46.6 #174 of 235 Archive leaderboard report
Semantic Segmentation ADE20K XCiT-S12/8 (Semantic-FPN) Validation mIoU 44.2 #204 of 235 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

Introduced by this paper: Local Patch Interaction, XCiT, XCiT Layer

Batch NormalizationCross-Covariance AttentionDense ConnectionsDepthwise ConvolutionFeedforward NetworkLayer NormalizationLocal Patch InteractionResidual ConnectionXCiTXCiT Layer

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