Papers › ReViT: Enhancing Vision Transformers Feature Diversity with Attention Residual Connections

ReViT: Enhancing Vision Transformers Feature Diversity with Attention Residual Connections

17 Feb 2024arXiv:2402.11301archive 2025-07-28

Anxhelo Diko, Danilo Avola, Marco Cascio, Luigi Cinque

Vision Transformer (ViT) self-attention mechanism is characterized by feature collapse in deeper layers, resulting in the vanishing of low-level visual features. However, such features can be helpful to accurately represent and identify elements within an image and increase the accuracy and robustness of vision-based recognition systems. Following this rationale, we propose a novel residual attention learning method for improving ViT-based architectures, increasing their visual feature diversity and model robustness. In this way, the proposed network can capture and preserve significant low-level features, providing more details about the elements within the scene being analyzed. The effectiveness and robustness of the presented method are evaluated on five image classification benchmarks, including ImageNet1k, CIFAR10, CIFAR100, Oxford Flowers-102, and Oxford-IIIT Pet, achieving improved performances. Additionally, experiments on the COCO2017 dataset show that the devised approach discovers and incorporates semantic and spatial relationships for object detection and instance segmentation when implemented into spatial-aware transformer models.

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="2402.11301")

Code

Syntology Ran 22 of 24 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 2 ran · fixture could not drive it; 20 ran with no contract checked.

By repository: official repository: 24 samples from 1 repository, 22 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

adiko1997/revit officialmentioned in papermentioned 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

24 samples harvested; 22 ran; 0 honoured the contract we drafted; 2 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.

2ran · fixture could not drive it
20ran
2unverified

Licence: 0 of the 24 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 adiko1997/revit. “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.

GetEntities adiko1997/revit/dataset/data.py official repository ran MIT (permissive) · a3eebab667e1ae7d · report
MapClasses adiko1997/revit/dataset/data.py official repository ran MIT (permissive) · 6862b0bd0e344d92 · report
SampleList adiko1997/revit/dataset/data.py official repository ran MIT (permissive) · 1c7c19cf255af8b5 · report
attention_pool adiko1997/revit/model/attention.py official repository ran MIT (permissive) · f118f90404a2705d · report
construct_optimizer adiko1997/revit/model/optimizer.py official repository ran MIT (permissive) · 6e8d64ae2c5f0678 · report
convert_to_one_hot adiko1997/revit/dataset/mixup.py official repository ran MIT (permissive) · c1d7ffe2c3f88e99 · report
downsample adiko1997/revit/model/attention.py official repository ran MIT (permissive) · 07d1986e7f19e873 · report
drop_path adiko1997/revit/model/common.py official repository ran · fixture could not drive it fingerprinted MIT (permissive) · 314973a77b15948e · report
get_loss_func adiko1997/revit/model/loss.py official repository ran MIT (permissive) · 345d213a14918073 · report
get_param_groups adiko1997/revit/model/optimizer.py official repository ran MIT (permissive) · e41a84c48e4dfc26 · report
get_relative_position_index adiko1997/revit/model/reswin.py official repository ran MIT (permissive) · 6c1b7082e865f0e0 · report
lr_func_cosine adiko1997/revit/model/lr_policy.py official repository ran MIT (permissive) · 96179ff95fbfb203 · report
lr_func_steps_with_relative_lrs adiko1997/revit/model/lr_policy.py official repository ran MIT (permissive) · 099da579c821206a · report
mixup_target adiko1997/revit/dataset/mixup.py official repository ran MIT (permissive) · 0f31beff332194d6 · report
params_count adiko1997/revit/utils/model_stats.py official repository ran MIT (permissive) · 18037498e45c3930 · report
rand_bbox adiko1997/revit/dataset/mixup.py official repository ran MIT (permissive) · 1d66bc560c9e0685 · report
round_width adiko1997/revit/model/common.py official repository ran MIT (permissive) · 942ad4676769ca5e · report
shear_x adiko1997/revit/dataset/rand_augment.py official repository ran MIT (permissive) · e866e1196986f728 · report
shear_y adiko1997/revit/dataset/rand_augment.py official repository ran MIT (permissive) · 7b2503c99c9447fb · report
translate_x_rel adiko1997/revit/dataset/rand_augment.py official repository ran MIT (permissive) · 323759f906fbb394 · report
window_partition adiko1997/revit/model/reswin.py official repository ran · fixture could not drive it fingerprinted MIT (permissive) · 993ae96666b00cb5 · report
window_reverse adiko1997/revit/model/reswin.py official repository ran MIT (permissive) · 265c72d3ccc64544 · report
cal_rel_pos_spatial adiko1997/revit/model/attention.py official repository unverified MIT (permissive) · 5de56fec3ce10382 · report
get_lr_at_epoch adiko1997/revit/model/lr_policy.py official repository unverified MIT (permissive) · 0fd362a779c37232 · report

Tasks

DiversityImage ClassificationInstance SegmentationObject DetectionSemantic Segmentationimage-classificationobject-detection

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification ImageNet ReViT-B Top 1 Accuracy 82.4 #536 of 1060 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

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

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