Skip to main navigation Skip to search Skip to main content

StructSAM: Structure- and Spectrum-Preserving Token Merging for Segment Anything Models

  • Duy M. H. Nguyen
  • , Tuan A. Tran
  • , Duong Nguyen
  • , Siwei Xie
  • , Trung Q. Nguyen
  • , Mai T. N. Truong
  • , Daniel Palenicek
  • , An T. Le
  • , Michael Barz
  • , Eric Hannus
  • , TrungTin Nguyen
  • , Tuan Dam
  • , Tran Le
  • , Ngan Le
  • , Minh N. Vu
  • , Khoa D. Doan
  • , Vien Ngo
  • , Pengtao Xie
  • , James Zou
  • , Daniel Sonntag
  • Jan Peters, Mathias Niepert
  • University of Stuttgart
  • German Research Center for Artificial Intelligence
  • VinRobotics
  • Aalto University
  • Queensland University of Technology
  • Hanoi University of Science and Technology
  • University of Arkansas
  • VinUniversity
  • University of California at San Diego
  • Stanford University

Research output: Chapter in Book/Report/Conference proceedingArticle in proceedingsResearchpeer-review

Abstract

SAM achieves strong segmentation but at high inference cost dominated by its ViT image encoder. Token merging accelerates ViTs without retraining, yet directly applying it to SAM is nontrivial: SAM mixes windowed and global attention and requires dense, prompt-conditioned features for precise boundary prediction. We systematically evaluate representative token merging methods on the SAM family in a strict off-the-shelf setting and find that existing destination-selection heuristics erode boundaries and leak prompt information as merge rates increase. We propose StructSAM, a resolution-preserving framework that computes lightweight token-energy scores from first-order feature gradients, protects boundary and prompt regions via grid-based flatness screening, and merges flat-region tokens toward low-energy targets with explicit recovery. We further present a spectral graph coarsening analysis showing that score-guided merging yields bounded Laplacian spectral distortion relative to random or window-restricted baselines. Across five natural and medical benchmarks, StructSAM reduces encoder FLOPs by 25–30% (up to 40%+ with prompt-aware merging) with minor drops in mIoU/Dice, consistently outperforming recent merging techniques at the same compute.
Original languageEnglish
Title of host publicationProceedings of the 43rd International Conference on Machine Learning 2026
Number of pages28
Publication statusAccepted/In press - 2026
Event43rd International Conference on Machine Learning - Seoul, Korea, Republic of
Duration: 6 Jul 202611 Jul 2026

Conference

Conference43rd International Conference on Machine Learning
Country/TerritoryKorea, Republic of
CitySeoul
Period06/07/202611/07/2026

Fingerprint

Dive into the research topics of 'StructSAM: Structure- and Spectrum-Preserving Token Merging for Segment Anything Models'. Together they form a unique fingerprint.

Cite this