SS ViT: Observing pathologies of multi-layer perceptron weights and re-setting vision transformer

IF 7.5 1区 计算机科学 Q1 COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE Pattern Recognition Pub Date : 2025-02-05 DOI:10.1016/j.patcog.2025.111422
Chao Ning, Hongping Gan
{"title":"SS ViT: Observing pathologies of multi-layer perceptron weights and re-setting vision transformer","authors":"Chao Ning,&nbsp;Hongping Gan","doi":"10.1016/j.patcog.2025.111422","DOIUrl":null,"url":null,"abstract":"<div><div>Vision Transformer (ViT) usually adopts a columnar or hierarchical structure with four stages, where identical block settings are applied within the same stage. To achieve more nuanced configurations for each ViT block, additional search is conducted to explore stronger architectures. However, the search cost is typically expensive and the results may not be transferable to different ViT architectures. In this paper, we present a DFC module, which exploits two lightweight grouped linear (GL) layers to learn the representations of the expansion layer between two fully connected layers and the nonlinear activation of multi-layer perceptron (MLP), respectively. Afterwards, we introduce the DFC module into vanilla ViT and analyze the learned weights of its GL layers. Interestingly, several pathologies arise even though the GL layers share the same initialization strategy. For instance, the GL layer weights display different patterns across various depths, and the GL1 and GL2 weights have different patterns in the same depth. We progressively compare and analyze these pathologies and derive a specific setting (SS) for ViT blocks at different depths. Experimental results demonstrate that SS generically improves the performance of various ViT architectures, not only enhancing accuracy but also reducing inference time and computational complexity. For example, on ImageNet-1k classification task, SS yields a significant 0.8% accuracy improvement, approximately 12.9% faster inference speed, and 25% fewer floating-point operations (FLOPs) on PVTv2 model. The codes and trained models are available at <span><span>https://github.com/ICSResearch/SS</span><svg><path></path></svg></span>.</div></div>","PeriodicalId":49713,"journal":{"name":"Pattern Recognition","volume":"162 ","pages":"Article 111422"},"PeriodicalIF":7.5000,"publicationDate":"2025-02-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Pattern Recognition","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0031320325000822","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE","Score":null,"Total":0}
引用次数: 0

Abstract

Vision Transformer (ViT) usually adopts a columnar or hierarchical structure with four stages, where identical block settings are applied within the same stage. To achieve more nuanced configurations for each ViT block, additional search is conducted to explore stronger architectures. However, the search cost is typically expensive and the results may not be transferable to different ViT architectures. In this paper, we present a DFC module, which exploits two lightweight grouped linear (GL) layers to learn the representations of the expansion layer between two fully connected layers and the nonlinear activation of multi-layer perceptron (MLP), respectively. Afterwards, we introduce the DFC module into vanilla ViT and analyze the learned weights of its GL layers. Interestingly, several pathologies arise even though the GL layers share the same initialization strategy. For instance, the GL layer weights display different patterns across various depths, and the GL1 and GL2 weights have different patterns in the same depth. We progressively compare and analyze these pathologies and derive a specific setting (SS) for ViT blocks at different depths. Experimental results demonstrate that SS generically improves the performance of various ViT architectures, not only enhancing accuracy but also reducing inference time and computational complexity. For example, on ImageNet-1k classification task, SS yields a significant 0.8% accuracy improvement, approximately 12.9% faster inference speed, and 25% fewer floating-point operations (FLOPs) on PVTv2 model. The codes and trained models are available at https://github.com/ICSResearch/SS.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
求助全文
约1分钟内获得全文 去求助
来源期刊
Pattern Recognition
Pattern Recognition 工程技术-工程:电子与电气
CiteScore
14.40
自引率
16.20%
发文量
683
审稿时长
5.6 months
期刊介绍: The field of Pattern Recognition is both mature and rapidly evolving, playing a crucial role in various related fields such as computer vision, image processing, text analysis, and neural networks. It closely intersects with machine learning and is being applied in emerging areas like biometrics, bioinformatics, multimedia data analysis, and data science. The journal Pattern Recognition, established half a century ago during the early days of computer science, has since grown significantly in scope and influence.
期刊最新文献
Editorial Board One-hot constrained symmetric nonnegative matrix factorization for image clustering Collaboratively enhanced and integrated detail-context information for low-light image enhancement A novel 6DoF pose estimation method using transformer fusion SS ViT: Observing pathologies of multi-layer perceptron weights and re-setting vision transformer
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1