Flatten Wisely: How Patch Order Shapes Mamba-Powered Vision for MRI Segmentation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Hardan, Osama, Elshenhabi, Omar, Khattab, Tamer, Mabrok, Mohamed
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916849676976128
author Hardan, Osama
Elshenhabi, Omar
Khattab, Tamer
Mabrok, Mohamed
author_facet Hardan, Osama
Elshenhabi, Omar
Khattab, Tamer
Mabrok, Mohamed
contents Vision Mamba models promise transformer-level performance at linear computational cost, but their reliance on serializing 2D images into 1D sequences introduces a critical, yet overlooked, design choice: the patch scan order. In medical imaging, where modalities like brain MRI contain strong anatomical priors, this choice is non-trivial. This paper presents the first systematic study of how scan order impacts MRI segmentation. We introduce Multi-Scan 2D (MS2D), a parameter-free module for Mamba-based architectures that facilitates exploring diverse scan paths without additional computational cost. We conduct a large-scale benchmark of 21 scan strategies on three public datasets (BraTS 2020, ISLES 2022, LGG), covering over 70,000 slices. Our analysis shows conclusively that scan order is a statistically significant factor (Friedman test: $χ^{2}_{20}=43.9, p=0.0016$), with performance varying by as much as 27 Dice points. Spatially contiguous paths -- simple horizontal and vertical rasters -- consistently outperform disjointed diagonal scans. We conclude that scan order is a powerful, cost-free hyperparameter, and provide an evidence-based shortlist of optimal paths to maximize the performance of Mamba models in medical imaging.
format Preprint
id arxiv_https___arxiv_org_abs_2507_13384
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Flatten Wisely: How Patch Order Shapes Mamba-Powered Vision for MRI Segmentation
Hardan, Osama
Elshenhabi, Omar
Khattab, Tamer
Mabrok, Mohamed
Image and Video Processing
Computer Vision and Pattern Recognition
Machine Learning
Vision Mamba models promise transformer-level performance at linear computational cost, but their reliance on serializing 2D images into 1D sequences introduces a critical, yet overlooked, design choice: the patch scan order. In medical imaging, where modalities like brain MRI contain strong anatomical priors, this choice is non-trivial. This paper presents the first systematic study of how scan order impacts MRI segmentation. We introduce Multi-Scan 2D (MS2D), a parameter-free module for Mamba-based architectures that facilitates exploring diverse scan paths without additional computational cost. We conduct a large-scale benchmark of 21 scan strategies on three public datasets (BraTS 2020, ISLES 2022, LGG), covering over 70,000 slices. Our analysis shows conclusively that scan order is a statistically significant factor (Friedman test: $χ^{2}_{20}=43.9, p=0.0016$), with performance varying by as much as 27 Dice points. Spatially contiguous paths -- simple horizontal and vertical rasters -- consistently outperform disjointed diagonal scans. We conclude that scan order is a powerful, cost-free hyperparameter, and provide an evidence-based shortlist of optimal paths to maximize the performance of Mamba models in medical imaging.
title Flatten Wisely: How Patch Order Shapes Mamba-Powered Vision for MRI Segmentation
topic Image and Video Processing
Computer Vision and Pattern Recognition
Machine Learning
url https://arxiv.org/abs/2507.13384