Papers › Attribute Surrogates Learning and Spectral Tokens Pooling in Transformers for Few-shot Learning

Attribute Surrogates Learning and Spectral Tokens Pooling in Transformers for Few-shot Learning

17 Mar 2022CVPR 2022 1arXiv:2203.09064archive 2025-07-28

Yangji He, Weihan Liang, Dongyang Zhao, Hong-Yu Zhou, Weifeng Ge, Yizhou Yu, Wenqiang Zhang

This paper presents new hierarchically cascaded transformers that can improve data efficiency through attribute surrogates learning and spectral tokens pooling. Vision transformers have recently been thought of as a promising alternative to convolutional neural networks for visual recognition. But when there is no sufficient data, it gets stuck in overfitting and shows inferior performance. To improve data efficiency, we propose hierarchically cascaded transformers that exploit intrinsic image structures through spectral tokens pooling and optimize the learnable parameters through latent attribute surrogates. The intrinsic image structure is utilized to reduce the ambiguity between foreground content and background noise by spectral tokens pooling. And the attribute surrogate learning scheme is designed to benefit from the rich visual information in image-label pairs instead of simple visual concepts assigned by their labels. Our Hierarchically Cascaded Transformers, called HCTransformers, is built upon a self-supervised learning framework DINO and is tested on several popular few-shot learning benchmarks. In the inductive setting, HCTransformers surpass the DINO baseline by a large margin of 9.7% 5-way 1-shot accuracy and 9.17% 5-way 5-shot accuracy on miniImageNet, which demonstrates HCTransformers are efficient to extract discriminative features. Also, HCTransformers show clear advantages over SOTA few-shot classification methods in both 5-way 1-shot and 5-way 5-shot settings on four popular benchmark datasets, including miniImageNet, tieredImageNet, FC100, and CIFAR-FS. The trained weights and codes are available at https://github.com/StomachCold/HCTransformers.

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

Code

Syntology Ran 4 of 5 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 1 ran · fixture could not drive it; 1 ran with no contract checked.

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

stomachcold/hctransformers officialmentioned in papermentioned on GitHubpytorchApache-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

5 samples harvested; 4 ran; 1 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 · honoured contract
1ran · our draft was wrong
1ran · fixture could not drive it
1ran
1unverified

Licence: 0 of the 5 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 StomachCold/HCTransformers. “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.

MultiKMeans StomachCold/HCTransformers/spectral_cluster.py official repository ran Apache-2.0 (permissive) · c5d1a05832204fff · report
get_neighbor_mask_old StomachCold/HCTransformers/spectral_cluster.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · f454fd53689fe3d8 · report
graph_laplacian StomachCold/HCTransformers/spectral_cluster.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 2889c1d335446de7 · report
neighbor_mask_reduce StomachCold/HCTransformers/spectral_cluster.py official repository ran · our draft was wrong Apache-2.0 (permissive) · e13665dd67f83791 · report
spectral_cluster StomachCold/HCTransformers/spectral_cluster.py official repository unverified Apache-2.0 (permissive) · 24ff42dbb948bdad · report

Tasks

AttributeFew-Shot Image ClassificationFew-Shot LearningSelf-Supervised Learning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Few-Shot Image Classification CIFAR-FS 5-way (1-shot) HCTransformers Accuracy 78.89 #14 of 38 Archive leaderboard report
Few-Shot Image Classification CIFAR-FS 5-way (5-shot) HCTransformers Accuracy 90.50 #10 of 39 Archive leaderboard report
Few-Shot Image Classification FC100 5-way (1-shot) HCTransformers Accuracy 48.27 #7 of 22 Archive leaderboard report
Few-Shot Image Classification FC100 5-way (5-shot) HCTransformers Accuracy 66.42 #6 of 22 Archive leaderboard report
Few-Shot Image Classification Mini-Imagenet 5-way (1-shot) HCTransformers Accuracy 74.74 #24 of 105 Archive leaderboard report
Few-Shot Image Classification Mini-Imagenet 5-way (5-shot) HCTransformers Accuracy 89.19 #12 of 95 Archive leaderboard report
Few-Shot Image Classification Tiered ImageNet 5-way (1-shot) HCTransformers Accuracy 79.67 #13 of 49 Archive leaderboard report
Few-Shot Image Classification Tiered ImageNet 5-way (5-shot) HCTransformers Accuracy 91.72 #3 of 51 Archive leaderboard report
Few-Shot Learning Mini-ImageNet - 1-Shot Learning HCTransformers Acc 74.74 #1 of 2 Archive leaderboard report
Few-Shot Learning Mini-Imagenet 5-way (1-shot) HCTransformers 5 way 1~2 shot 74.74 #3 of 3 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

AttentionDense ConnectionsLayer NormalizationLinear LayerMulti-Head AttentionResidual ConnectionSoftmaxVision Transformer

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