SAMamba: Adaptive state space modeling with hierarchical vision for infrared small target detection

Wenhao Xu, ShuChen Zheng, Changwei Wang, Zherui Zhang, Chuan Ren, Rongtao Xu, Shibiao Xu

Abstract

Infrared Small Target Detection (ISTD) is a critical yet challenging task due to the extreme scale discrepancy of targets and the presence of complex, cluttered backgrounds. Traditional architectures often struggle to balance global context with the preservation of fine-grained details. This paper introduces SAMamba, a novel framework that integrates the hierarchical vision capabilities of the Segment Anything Model 2 (SAM2) with the efficient global modeling of State Space Models (Mamba). By utilizing specialized adapters and a detail-preserving fusion mechanism, SAMamba achieves state-of-the-art performance across multiple benchmarks while maintaining computational efficiency.

1. Introduction

Infrared Small Target Detection (ISTD) serves as a cornerstone for applications in long-range surveillance, maritime monitoring, and early warning systems. Unlike standard object detection, ISTD faces two primary hurdles: extreme scale discrepancy, where targets often occupy less than 0.15% of the image area, and low distinguishability, where targets are frequently obscured by clouds, sea waves, or urban clutter.

Conventional Convolutional Neural Networks (CNNs) are limited by local receptive fields, often failing to distinguish targets from similar-looking background noise. Conversely, while Transformers offer global reasoning, their quadratic computational complexity makes them impractical for high-resolution infrared processing. SAMamba addresses these limitations by leveraging the efficiency of Mamba and the robust feature extraction of SAM2.

2. Methodology

SAMamba is designed as a U-Net-style framework incorporating three core innovations to bridge the gap between foundation models and the specific requirements of infrared imagery.

2.1 SAM2 Hiera Backbone and FS-Adapter

The framework adopts the hierarchical "Hiera" backbone from SAM2. To adapt this natural-light foundation model to the infrared domain, the authors introduced the Feature Selection Adapter (FS-Adapter). This module employs a learnable task embedding to dynamically select the most relevant tokens and channels, effectively "translating" SAM2’s general-purpose features for the specific textures of tiny infrared targets.

2.2 Cross-Channel State-Space Interaction (CSI)

To provide global context without the overhead of Transformers, SAMamba utilizes the Cross-Channel State-Space Interaction (CSI) module within its skip connections. Built upon Mamba (a State Space Model), the CSI module achieves global reasoning with linear complexity. To optimize performance, the module uses a parallel processing strategy, splitting channels into segments processed by independent Mamba heads before recombination, preventing parameter explosion.

2.3 Detail-Preserving Contextual Fusion (DPCF)

Standard feature fusion in U-Nets can inadvertently "blur" or suppress small targets. The Detail-Preserving Contextual Fusion (DPCF) module addresses this via a learnable gating mechanism. By calculating a weight ($\beta$) for every pixel, the network adaptively decides whether to prioritize fine-grained spatial details from skip connections or high-level semantic context from upsampled layers, ensuring target integrity is maintained throughout the decoder.

3. Experimental Evaluation

3.1 Datasets and Metrics

The model was rigorously evaluated on three benchmark datasets:

  • NUAA-SIRST: 427 real infrared images featuring targets occupying <0.1% of the area.
  • IRSTD-1k: 1,001 real images across diverse maritime and urban scenarios.
  • NUDT-SIRST: A synthetic dataset of 1,327 images simulating extremely small targets (down to 0.01% of the area) and low signal-to-noise ratios.

3.2 Performance Results

SAMamba demonstrated superior performance compared to existing state-of-the-art (SOTA) methods such as UIUNet and HCFNet. On the NUDT-SIRST dataset, the model achieved an Intersection over Union (IoU) of 93.13% and an F1-score of 96.44%.

In terms of efficiency, SAMamba proved remarkably lean. For a 1024x1024 input, it requires approximately 460G FLOPs, nearly half the requirement of standard U-Net architectures (875G), while providing significantly higher precision. Qualitative analysis further indicates that SAMamba excels at "target completeness," accurately capturing the full shape of targets rather than fragmented components.

4. Discussion and Conclusion

SAMamba represents a significant step forward in ISTD by successfully marrying foundation models with efficient state-space modeling. The FS-Adapter serves as a crucial bridge for domain adaptation, while Mamba provides the "Goldilocks" solution for global reasoning—offering the necessary context to distinguish targets from clutter without the memory footprint of Transformers.

Despite these gains, challenges remain in scenarios with extreme signal-to-clutter ratios or targets embedded in highly dense textures. Future research will focus on integrating temporal information from video data, optimizing the architecture for edge hardware, and exploring multi-modal fusion to enhance robustness in adverse weather conditions.

Summary updated

BibTeX
@article{xu2025samamba,
  author = {Wenhao Xu and ShuChen Zheng and Changwei Wang and Zherui Zhang and Chuan Ren and Rongtao Xu and Shibiao Xu},
  title = {{SAMamba: Adaptive state space modeling with hierarchical vision for infrared small target detection}},
  journal = {Information Fusion},
  year = {2025},
  doi = {10.1016/j.inffus.2025.103338},
}
Figure