Fraesormer: Learning Adaptive Sparse Transformer for Efficient Food Recognition

Shun Zou, Yi Zou, Mingya Zhang, Shipeng Luo, Zhihao Chen +1 more
3/15/2025
cs.CVcs.AI

No official code found. Best implementation: zs1314/Fraesormer (13 stars, Apache-2.0, last commit 2025-03-21).

Abstract

In recent years, Transformer has witnessed significant progress in food recognition. However, most existing approaches still face two critical challenges in lightweight food recognition: (1) the quadratic complexity and redundant feature representation from interactions with irrelevant tokens; (2) static feature recognition and single-scale representation, which overlook the unstructured, non-fixed nature of food images and the need for multi-scale features. To address these, we propose an adaptive and efficient sparse Transformer architecture (Fraesormer) with two core designs: Adaptive Top-k Sparse Partial Attention (ATK-SPA) and Hierarchical Scale-Sensitive Feature Gating Network (HSSFGN). ATK-SPA uses a learnable Gated Dynamic Top-K Operator (GDTKO) to retain critical attention scores, filtering low query-key matches that hinder feature aggregation. It also introduces a partial channel mechanism to reduce redundancy and promote expert information flow, enabling local-global collaborative modeling. HSSFGN employs gating mechanism to achieve multi-scale feature representation, enhancing contextual semantic information. Extensive experiments show that Fraesormer outperforms state-of-the-art methods. code is available at https://zs1314.github.io/Fraesormer.

View on arXivView PDF

Code Implementations(1)

zs1314/FraesormerCommunity63%
Apache-2.0

【ICME2025 Oral】Offical Pytorch Code for "Fraesormer: Learning Adaptive Sparse Transformer for Efficient Food Recognition"

130PythonJan 22, 20251 years agoApache-2.0
computer-visiondeep-learningfoodlightweight

Similar Papers

Cite this paper

@article{zou2025fraesormer,
  title  = {Fraesormer: Learning Adaptive Sparse Transformer for Efficient Food Recognition},
  author = {Shun Zou and Yi Zou and Mingya Zhang and Shipeng Luo and Zhihao Chen and Guangwei Gao},
  year   = {2025},
  eprint = {2503.11995},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.11995v1}
}

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/2503.11995.svg)](https://codeofpaper.com/paper/2503.11995)

Discussion