SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.03746 · 2021

Efficient Training of Visual Transformers with Small Datasets

arXiv · PDF · Open in the Atlas

Code that ran

16 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 12 failures of our instrument; 3 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2106.03746.json · badge: /api/ran/2106.03746.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
yhlleo/VTs-Drloc canonical (classifier label)
classifier basis: census
16 ran · 3 no recorded run
FunctionStatusWhere it lives
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yhlleo/VTs-Drloc/models/swin.py
pointer only (licence: MIT) · get_code("144d10b49baeb8a6")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, yhlleo/VTs-Drloc, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_optimizer Ran
ran; our contract draft was wrong, not the code
yhlleo/VTs-Drloc/optimizer.py
pointer only (licence: MIT); the stored copy get_code serves, from CBalance/SSD, is pointer only (licence: NONE) · get_code("e35a4b2e4114b1a5")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, yhlleo/VTs-Drloc, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_scheduler Ran
ran; our contract draft was wrong, not the code
yhlleo/VTs-Drloc/lr_scheduler.py
pointer only (licence: MIT); the stored copy get_code serves, from ghrua/seqpe, is pointer only (licence: NONE) · get_code("c02cc4e0b5720211")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, yhlleo/VTs-Drloc, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

check_keywords_in_name Ran
ran, violated the contract we drafted
yhlleo/VTs-Drloc/optimizer.py
pointer only (licence: MIT); the stored copy get_code serves, from leaplabthu/inline, is pointer only (licence: NONE) · get_code("b0a5beb34716d5a6")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, yhlleo/VTs-Drloc, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

collect_samples_faster Ran
ran; our contract draft was wrong, not the code
yhlleo/VTs-Drloc/drloc/aux_modules.py
pointer only (licence: MIT); the stored copy get_code serves, from iemprog/mimi, is pointer only (licence: NONE) · get_code("d50eceebc1eabdc2")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from iemprog/mimi, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_logger Ran
ran; our contract draft was wrong, not the code
yhlleo/VTs-Drloc/logger.py
pointer only (licence: MIT); the stored copy get_code serves, from ghrua/seqpe, is pointer only (licence: NONE) · get_code("80450600f7f09b0a")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, yhlleo/VTs-Drloc, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_sinusoid_encoding Ran
ran, honoured the contract we drafted
yhlleo/VTs-Drloc/models/t2t.py
pointer only (licence: MIT) · get_code("ced6bc2bfdfe0059")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, yhlleo/VTs-Drloc, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

group_by_key_prefix_and_remove_prefix Ran
ran; our contract draft was wrong, not the code
yhlleo/VTs-Drloc/models/cvt.py
pointer only (licence: MIT); the stored copy get_code serves, from ml4sci/deeplense, is pointer only (licence: NONE) · get_code("ca4faa49da53bd5c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ml4sci/deeplense, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

group_dict_by_key Ran
ran; our contract draft was wrong, not the code
yhlleo/VTs-Drloc/models/cvt.py
pointer only (licence: MIT); the stored copy get_code serves, from ml4sci/deeplense, is pointer only (licence: NONE) · get_code("afcf8f2954675d55")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ml4sci/deeplense, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pair Ran
ran, violated the contract we drafted
yhlleo/VTs-Drloc/models/vit.py
pointer only (licence: MIT) · get_code("6ba8cee9f5daea41")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, yhlleo/VTs-Drloc, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

randn_sampling Ran
ran, honoured the contract we drafted
yhlleo/VTs-Drloc/drloc/aux_modules.py
pointer only (licence: MIT); the stored copy get_code serves, from iemprog/mimi, is pointer only (licence: NONE) · get_code("a09531f2a3bed5f5")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from iemprog/mimi, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

relative_constraint_ce Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yhlleo/VTs-Drloc/drloc/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from iemprog/mimi, is pointer only (licence: NONE) · get_code("8872e7b986aa6d2e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from iemprog/mimi, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

relative_constraint_l1 Ran
ran; our contract draft was wrong, not the code
yhlleo/VTs-Drloc/drloc/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from iemprog/mimi, is pointer only (licence: NONE) · get_code("7f1b680d6aa88b99")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from iemprog/mimi, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

set_weight_decay Ran
ran; our contract draft was wrong, not the code
yhlleo/VTs-Drloc/optimizer.py
pointer only (licence: MIT); the stored copy get_code serves, from ztx-100/efficient_vit_with_dw, is pointer only (licence: NONE) · get_code("b33222a09fc93bec")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, yhlleo/VTs-Drloc, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

variance_aware_regression Ran
ran; our contract draft was wrong, not the code
yhlleo/VTs-Drloc/drloc/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from iemprog/mimi, is pointer only (licence: NONE) · get_code("2fc56b43da8a500b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from iemprog/mimi, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

window_reverse Ran
ran; our contract draft was wrong, not the code
yhlleo/VTs-Drloc/models/swin.py
pointer only (licence: MIT) · get_code("61bf152e6a42a184")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, yhlleo/VTs-Drloc, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_model Not yet run
unverified (harvested, no recorded run)
yhlleo/VTs-Drloc/models/build.py
pointer only (licence: MIT) · get_code("6b79b63bd6d3342e")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, yhlleo/VTs-Drloc, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

collect_samples Not yet run
unverified (harvested, no recorded run)
yhlleo/VTs-Drloc/drloc/aux_modules.py
pointer only (licence: MIT); the stored copy get_code serves, from iemprog/mimi, is pointer only (licence: NONE) · get_code("e52fbbea05ecc1fb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from iemprog/mimi, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_config Not yet run
unverified (harvested, no recorded run)
yhlleo/VTs-Drloc/config.py
pointer only (licence: MIT) · get_code("8a6a17f0fb1092f7")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, yhlleo/VTs-Drloc, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 18 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 9 the same month, 18 later) and 1 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
window_reverse 227 other papers
6 dated earlier, 7 the same month, 214 later · 34 only as an assembly brick
1608.03983 (2016-08)
SGDR: Stochastic Gradient Descent with Warm Restarts
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 224 more not named here
window_partition 223 other papers
6 dated earlier, 7 the same month, 210 later · 32 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 220 more not named here
pair 90 other papers
5 dated earlier, 84 later, 1 undated · 8 only as an assembly brick
2004.13649 (2020-04)
Image Augmentation Is All You Need: Regularizing Deep Reinforcement Learning from Pixels
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2103.15691 (2021-03)
ViViT: A Video Vision Transformer
and 87 more not named here
get_config 51 other papers
1 dated earlier, 3 the same month, 47 later
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
and 48 more not named here
create_logger 35 other papers
1 dated earlier, 2 the same month, 32 later
2104.13840 (2021-04)
Twins: Revisiting the Design of Spatial Attention in Vision Transformers
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
and 32 more not named here
check_keywords_in_name 31 other papers
1 dated earlier, 2 the same month, 28 later
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
and 28 more not named here
set_weight_decay 14 other papers
1 dated earlier, 2 the same month, 11 later
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
and 11 more not named here
build_scheduler 13 other papers
2 the same month, 11 later
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
2107.08391 (2021-07)
AS-MLP: An Axial Shifted MLP Architecture for Vision
and 10 more not named here
get_sinusoid_encoding 12 other papers
2 dated earlier, 2 the same month, 8 later · 1 only as an assembly brick
2101.11986 (2021-01)
Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
2104.12099 (2021-04)
Visual Saliency Transformer
2106.04650 (2021-06)
TED-net: Convolution-free T2T Vision Transformer-based Encoder-decoder Dilation network for Low-dose CT Denoising
and 9 more not named here
build_optimizer 8 other papers
2 the same month, 6 later
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
2107.08391 (2021-07)
AS-MLP: An Axial Shifted MLP Architecture for Vision
and 5 more not named here
group_by_key_prefix_and_remove_prefix 3 other papers
1 dated earlier, 2 later
2103.15808 (2021-03)
CvT: Introducing Convolutions to Vision Transformers
2110.03414 (2021-10)
SERAB: A multi-lingual benchmark for speech emotion recognition
2112.12121 (2021-12)
Domain Adaptation for Simulation-Based Dark Matter Searches Using Strong Gravitational Lensing
group_dict_by_key 3 other papers
1 dated earlier, 2 later
2103.15808 (2021-03)
CvT: Introducing Convolutions to Vision Transformers
2110.03414 (2021-10)
SERAB: A multi-lingual benchmark for speech emotion recognition
2112.12121 (2021-12)
Domain Adaptation for Simulation-Based Dark Matter Searches Using Strong Gravitational Lensing
collect_samples 1 other paper
1 later
2311.03873 (2023-11)
Mini but Mighty: Finetuning ViTs with Mini Adapters
collect_samples_faster 1 other paper
1 later
2311.03873 (2023-11)
Mini but Mighty: Finetuning ViTs with Mini Adapters
randn_sampling 1 other paper
1 later
2311.03873 (2023-11)
Mini but Mighty: Finetuning ViTs with Mini Adapters
relative_constraint_ce 1 other paper
1 later
2311.03873 (2023-11)
Mini but Mighty: Finetuning ViTs with Mini Adapters
relative_constraint_l1 1 other paper
1 later
2311.03873 (2023-11)
Mini but Mighty: Finetuning ViTs with Mini Adapters
variance_aware_regression 1 other paper
1 later
2311.03873 (2023-11)
Mini but Mighty: Finetuning ViTs with Mini Adapters

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Visual Transformers (VTs) are emerging as an architectural paradigm alternative to Convolutional networks (CNNs). Differently from CNNs, VTs can capture global relations between image elements and they potentially have a larger representation capacity. However, the lack of the typical convolutional inductive bias makes these models more data-hungry than common CNNs. In fact, some local properties of the visual domain which are embedded in the CNN architectural design, in VTs should be learned from samples. In this paper, we empirically analyse different VTs, comparing their robustness in a small training-set regime, and we show that, despite having a comparable accuracy when trained on ImageNet, their performance on smaller datasets can be largely different. Moreover, we propose a self-supervised task which can extract additional information from images with only a negligible computational overhead. This task encourages the VTs to learn spatial relations within an image and makes the VT training much more robust when training data are scarce. Our task is used jointly with the standard (supervised) training and it does not depend on specific architectural choices, thus it can be easily plugged in the existing VTs. Using an extensive evaluation with different VTs and datasets, we show that our method can improve (sometimes dramatically) the final accuracy of the VTs. Our code is available at: https://github.com/yhlleo/VTs-Drloc.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2106.03746")
get_code_for_paper("2106.03746")
have("2106.03746")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2106.03746.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2106.03746.svg)](https://syntology.ai/paper/2106.03746)

Connect an agent — have() is free.