UIS-Mamba: Exploring Mamba for Underwater Instance Segmentation via Dynamic Tree Scan and Hidden State Weaken

Runmin Cong, Zongji Yu, Hao Fang, Haoyan Sun, Sam Kwong

TL;DR

UIS-Mamba is the first Mamba-based model tailored for underwater instance segmentation, overcoming severe color distortion and complex backgrounds. By introducing a Dynamic Tree Scan (DTS) module for flexible patch scanning and a Hidden State Weaken (HSW) module to suppress background noise, it achieves state-of-the-art performance with a fraction of the parameters required by Transformer-based alternatives.

What Problem Does This Paper Address?

Underwater computer vision is notoriously difficult. Light attenuation (especially the rapid fading of the red channel) and water scattering cause severe color distortion, low contrast, and blurred object boundaries.

While Convolutional Neural Networks (CNNs) struggle to capture global context and Transformers suffer from quadratic computational complexity, State Space Models (SSMs) like Mamba have emerged as an efficient alternative due to their linear complexity and global receptive fields. However, standard Vision Mamba models rely on a rigid, fixed-patch scanning mechanism. In underwater scenes, this fixed grid breaks the semantic continuity of objects with blurred boundaries and treats complex backgrounds equally with foreground objects, leading to corrupted hidden states and poor segmentation.

The authors address this gap by adapting Mamba specifically to the challenges of underwater instance segmentation (UIS) and underwater salient instance segmentation (USIS).

Methods

The authors propose UIS-Mamba, integrating two novel modules into a Mamba-based backbone network:

  1. Dynamic Tree Scan (DTS) Module: Instead of scanning a rigid grid, DTS allows patches to dynamically shift and scale (via Adaptive Graph Deformation) to better encompass distinct parts of an object. It constructs a 4-connected graph that blends spatial distance and semantic similarity, which is then pruned into a Minimum Spanning Tree (MST). This ensures that the scanning path respects the natural boundaries of underwater instances.
  2. Hidden State Weaken (HSW) Module: To prevent complex background textures from overwhelming the model's memory, HSW applies a Normalized Cut (Ncut) algorithm directly to the MST generated by the DTS module. This efficiently categorizes patches into foreground or background. A suppression hyperparameter ($\phi$) is then applied to the background patches during the sequential hidden state update phase, forcing the model to focus its information flow on the target instances.
Figure 2: Framework of UIS-Mamba. UIS-Mamba include: (a) The UIS-Mamba Backbone; (b) The FPN Module; (c) The UIS-VSS Block; (d) The Dynamic Tree Scan Module (DTS); (e) The Hidden State Weaken Module (HSW). Our major improvements are contained in the Dynamic Tree Topology SSM and use the same detection and segmentation heads as WaterMask.

The overall architecture combines this enhanced Mamba backbone with a Feature Pyramid Network (FPN) and standard detection/segmentation heads.

Datasets

The model was evaluated on two primary benchmark datasets:

  • UIIS (Underwater Instance Segmentation): Contains 3,937 training and 691 validation images featuring multi-object, multi-instance targets across 7 categories (Fish, Reefs, Aquatic plants, Wrecks/ruins, Human divers, Robots, and Sea-floor).
  • USIS10K (Underwater Salient Instance Segmentation): A larger dataset of 10,632 images used to evaluate both class-agnostic and multi-class salient instance segmentation using the same 7 categories.

Key Insights and Ideas

  • Breaking the Grid: Fixed-patch chunking creates a "semantic cutoff" at object boundaries. Allowing the patches themselves to deform and scale dynamically preserves the integrity of local features before they enter the state-space model.
  • Selective Memory Filtering: Because Mamba updates its hidden states sequentially, background noise can easily propagate and corrupt the representation of downstream objects. Selectively weakening background states acts as an elegant attention mechanism without the heavy computational cost of standard Transformer self-attention.
  • Algorithmic Synergy: Instead of running a costly standalone segmentation algorithm for background removal, HSW reuses the Minimum Spanning Tree already computed by the DTS module, keeping the computational overhead remarkably low.

Key Results

UIS-Mamba achieves state-of-the-art (SOTA) results across both datasets while maintaining high efficiency:

  • UIIS Dataset: The large variant, UIS-Mamba-B, achieved 31.2 mAP, outperforming the SOTA Transformer-based model, USIS-SAM (which uses a massive ViT-H backbone with 700M parameters), by 1.8 mAP. Crucially, UIS-Mamba-B achieves this while using only 115M parameters—just 16.4% of USIS-SAM's parameter count.
  • USIS10K Dataset: UIS-Mamba set new performance benchmarks in both class-agnostic (63.8 mAP) and multi-class (46.2 mAP) salient instance segmentation tasks.
  • Qualitative Excellence: Visual comparisons demonstrate that the model excels at cleanly segmenting highly camouflaged or obscured targets, such as aquatic plants and reefs, where previous methods suffered from under-segmentation or boundary confusion.
Figure 3: Qualitative comparison on the UIIS and USIS10K dataset. Each class of instance in the same image is represented by a unique color, and the segmented mask is superimposed on the image.

Limitations and Future Work

Not discussed in the paper.

Summary updated

BibTeX
@inproceedings{cong2025uis,
  author = {Runmin Cong and Zongji Yu and Hao Fang and Haoyan Sun and Sam Kwong},
  title = {{UIS-Mamba: Exploring Mamba for Underwater Instance Segmentation via Dynamic Tree Scan and Hidden State Weaken}},
  booktitle = {ACM Multimedia},
  year = {2025},
  doi = {10.1145/3746027.3755131},
}
Figure