Brain-Inspired Stepwise Patch Merging for Vision Transformers

Yonghao Yu, Dongcheng Zhao, Guobin Shen, Yiting Dong, Yi Zeng
9/11/2024
cs.CV

Official code: Yonghao-Yu/StepwisePatchMerging (4 stars, last commit 2025-08-10).

Abstract

The hierarchical architecture has become a mainstream design paradigm for Vision Transformers (ViTs), with Patch Merging serving as the pivotal component that transforms a columnar architecture into a hierarchical one. Drawing inspiration from the brain's ability to integrate global and local information for comprehensive visual understanding, we propose Stepwise Patch Merging (SPM), which enhances the subsequent attention mechanism's ability to 'see' better. SPM consists of Multi-Scale Aggregation (MSA) and Guided Local Enhancement (GLE) striking a proper balance between long-range dependency modeling and local feature enhancement. Extensive experiments conducted on benchmark datasets, including ImageNet-1K, COCO, and ADE20K, demonstrate that SPM significantly improves the performance of various models, particularly in dense prediction tasks such as object detection and semantic segmentation. Meanwhile, experiments show that combining SPM with different backbones can further improve performance. The code has been released at https://github.com/Yonghao-Yu/StepwisePatchMerging.

View on arXivView PDF

Code Implementations(1)

[IJCAI 2025] This is an official implementation for "Brain-Inspired Stepwise Patch Merging for Vision Transformers".

40PythonMay 13, 20251 years ago

Similar Papers

Cite this paper

@article{yu2024braininspired,
  title  = {Brain-Inspired Stepwise Patch Merging for Vision Transformers},
  author = {Yonghao Yu and Dongcheng Zhao and Guobin Shen and Yiting Dong and Yi Zeng},
  year   = {2024},
  eprint = {2409.06963},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.06963v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.06963.svg)](https://codeofpaper.com/paper/2409.06963)

Discussion