计算机科学 ›› 2026, Vol. 53 ›› Issue (11A): 260200038-425.doi: 10.11896/jsjkx.260200038

• 图像处理&多媒体技术 • 上一篇    下一篇

用于图像分类的视觉Transformer高频特征恢复算法

闫岱松1, 解书凯2, 龚勋1   

  1. 1 西南交通大学计算机与人工智能学院 成都 611756
    2 绵阳职业技术学院 四川 绵阳 621000
  • 出版日期:2026-11-16 发布日期:2026-11-16
  • 通讯作者: 龚勋(xgong@swjtu.edu.cn)
  • 作者简介:(daisongyan@my.swjtu.edu.cn)
  • 基金资助:
    绵阳市科技计划(2025ZYDF076);国家自然科学基金(62576296);唐山市基础研究科技计划(23130230E)

Vision Transformer High-frequency Feature Recovery Algorithm for Image Classification

YAN Daisong1, XIE Shukai2, GONG Xun1   

  1. 1 School of Computing and Artificial Intelligence,Southwest Jiaotong University,Chengdu 611756,China
    2 Mianyang Vocational and Technical College,Mianyang,Sichuan 621000,China
  • Published:2026-11-16 Online:2026-11-16
  • About author:YAN Daisong,born in 1999,doctoral candidate.His main research interests include computer vision,image classification and intelligent medicine.
    GONG Xun,born in 1980,Ph.D,professor.His main research interests include general vision,intelligent medicine and intelligent geological disaster management.
  • Supported by:
    This work was supported by the Mianyang Science and Technology Plan Funding(2025ZYDF076),National Natural Science Foundation of China(62576296) and Tangshan Basic Research Science and Technology Plan(23130230E).

摘要: 视觉Transformer(ViT)模型内在的自注意力模块,导致ViT模型在前向传播中持续丢失高频信息,使其在小数据集上分类精度较低。为此,提出了一种名为高频特征恢复器HFR(High Frequency Reconstruction)的ViT辅助训练方法。HFR是一个即插即用的辅助训练模块,通过引导主干网络学习如何保留对图像分类至关重要的高频特征,提升模型在小数据集上的分类精度。由于HFR仅参与训练过程,在推理阶段可被完全移除,因此该方法不会使模型增加任何额外推理开销,也不会改变模型推理时的原有结构。在3个常用数据集上使用多种ViT模型进行了图像分类实验。图像分类实验和消融实验的结果表明,所提出的HFR方法使不同种类的ViT模型在不同小数据集上的性能均有提升。在Mini-ImageNet数据集上,使用HFR后ViT-T和ViT-B的准确率分别提升6.75%,4.51%。

关键词: 图像分类, 视觉Transformer, 卷积神经网络, 辅助训练方法

Abstract: Due to the self-attention module of vision transformer(ViT) models,high-frequency information is continuously lost during forward propagation,which results in sub-optimal classification accuracy on small datasets.To address this problem,this paper proposes an auxiliary training strategy for ViTs called high frequency reconstruction(HFR).HFR is a plug-and-play approach that improves classification accuracy on small datasets by guiding the backbone network to preserve high-frequency features,which are crucial for image classification.HFR is only used during the training process and can be completely removed during inference;thus,it incurs no additional inference overhead and maintains the original model structure.This paper conducts image classification experiments using various ViT models on three common datasets.Results from comparative and ablation studies indicate that the proposed HFR method consistently improves the performance of different ViT models across different small datasets.On the Mini-ImageNet dataset,HFR improves the accuracy of ViT-T and ViT-B by 6.75% and 4.51%,respectively.

Key words: Image classification, Vision Transformer, Convolutional neural networks, Auxiliary training strategy

中图分类号: 

  • TP391
[1] KRIZHEVSKY A,SUTSKEVER I,HINTON G E.Imagenetclassification with deep convolutional neural networks[C]//Advances in Neural Information Processing Systems.2012:84-90.
[2] SIMONYAN K,ZISSERMAN A.Very deep convolutional networks for large-scale image recognition[C]//Proceedings of the International Conference on Learning Representations.2015:1-14.
[3] HE K M,ZHANG X,REN S,et al.Deep residual learning for image recognition[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2016:770-778.
[4] LIU Z,MAO H,WU C Y,et al.A convnet for the 2020s[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2022:11976-11986.
[5] LONG X,HUANG W,HU K.Bi-MI ViT:Bi-directional Multi-level Interaction Vision Transformer for Lung CT Image Classification[J].Computer Science,2025,52(S1):240700183-6.
[6] HE K M,GKIOXARI G,DOLLÁR P,et al.Mask r-cnn[C]//Proceedings of the IEEE International Conference on Computer Vision.2017:2961-2969.
[7] LEI S,QIU M X,LIU X H,et al.Image Classification Model for Waste Household Appliance Recycling Based on Multi-scaleDepthwise Separable ResNet[J].Computer Science,2025,52(S1):240500057-7.
[8] VASWANI A,SHAZEER N,PARMAR N,et al.Attention isall you need[C]//Advances in Neural Information Processing Systems.2017:5998-6008.
[9] BELTAGY I,PETERS M E,COHAN A.Longformer:Thelong-document transformer[J].arXiv:004.05150,2020.
[10] DOSOVITSKIY A,BEYER L,KOLESNIKOV A,et al.Animage is worth 16x16 words:Transformers for image recognition at scale[C]//Proceedings of the International Conference on Learning Representations,2021:1-22.
[11] TOUVRON H,CORD M,DOUZE M,et al.Training data-efficient image transformers & distillation through attention[C]//Proceedings of the International Conference on Machine Lear-ning.2021:10347-10357.
[12] TOUVRON H,CORD M,SABLAYROLLES A,et al.Goingdeeper with image transformers[C]//Proceedings of the IEEE International Conference on Computer Vision.2021:32-42.
[13] CHU X,TIAN Z,ZHANG B,et al.Conditional positional encodings for vision transformers[J].arXiv:2102.10882,2021.
[14] MA X,GUO J,SANSOM A,et al.Spatial pyramid attention for deep convolutional neural networks[J].IEEE Transactions on Multimedia,2021,23:3048-3058.
[15] WANG P,ZHENG W,CHEN T,et al.Anti-oversmoothing in deep vision transformers via the fourier domain analysis:From theory to practice[J].arXiv:2203.05962,2022.
[16] YUAN L,CHEN Y,WANG T,et al.Tokens-to-token vit:trai-ning vision transformers from scratch on imagenet[C]//Procee-dings of the IEEE International Conference on Computer Vision.2021:558-567.
[17] LIU Z,LIN Y,CAO Y,et al.Swin transformer:hierarchical vision transformer using shifted windows[C]//Proceedings of the IEEE International Conference on Computer Vision.2021:10012-10022.
[18] DONG X,BAO J,CHEN D,et al.Cswin transformer:a general vision transformer backbone with cross-shaped windows[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2022:12124-12134.
[19] TU Z,TALEBI H,ZHANG H,et al.Maxvit:multi-axis vision transformer[C]//Proceedings of the European Conference on Computer Vision.2022:459-479.
[20] LI Y,YANG C,ZENG H,et al.Frequency-aligned knowledge distillation for lightweight spatiotemporal forecasting[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision.2025:7262-7272.
[21] RANGWANI H,MONDAL P,MISHRA M,et al.Deit-lt:Distillation strikes back for vision transformer training on long-tailed datasets[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2024:23396-23406.
[22] KAYA A,BILIK I,STAINVAS I.A Comparative Study of Vision Transformers and CNNs for Few-Shot Rigid Transformation and Fundamental Matrix Estimation[J].arXiv:2510.04794,2025.
[23] XIAO T,SINGH M,MINTUN E,et al.Early convolutions help transformers see better[C]//Advances in Neural Information Processing Systems.2021:30392-30400.
[24] CHU Z,CHEN J,CHEN C,et al.DualToken-ViT:position-aware efficient vision transformer with dual token fusion[C]//Proceedings of the 2024 SIAM International Conference on Data Mining(SDM).2024:688-696.
[25] WU H,XIAO B,CODELLA N,et al.Cvt:introducing convolutions to vision transformers[C]//Proceedings of the IEEE International Conference on Computer Vision.2021:22-31.
[26] LOSHCHILOV I,HUTTER F.Decoupled weight decay regularization[J].arXiv:1711.05101,2017.
[27] ZHANG H,CISSE M,DAUPHIN Y N,et al.Mixup:beyondempirical risk minimization[J].arXiv:1710.09412,2017.
[28] YUN S,HAN D,OH S J,et al.Cutmix:regularization strategy to train strong classifiers with localizable features[C]//Procee-dings of the IEEE International Conference on Computer Vision.2019:6023-6032.
[29] SELVARAJU R R,COGSWELL M,DAS A,et al.Grad-cam:Visual explanations from deep networks via gradient-based localization[C]//Proceedings of the IEEE International Confe-rence on Computer Vision.2017:618-626.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!