arXiv:2611.07865cs.CVNov 2026

Manuscript Offprint

arXiv:2611.07865

OcTreeMamba: Topology-Aware Mamba for 3D Medical Segmentation via Octree Sparsification

Kaixiang Mai, Jiaqi Yu, Yuzhu Ji, Yiqun Zhang, Zhijie Wang, Haijun Zhang, Yiu-ming Cheung

Kaixiang Mai1^{1}, Jiaqi Yu1^{1}, Yuzhu Ji1,∗^{1,*}, Yiqun Zhang1^{1}, Zhijie Wang2^{2}, Haijun Zhang3^{3}, Yiu-ming Cheung4^{4}

1^{1}Guangdong University of Technology, Guangzhou, China, 2^{2}RIKEN Center for Advanced Intelligence Project, Tokyo, Japan, 3^{3}Harbin Institute of Technology, Shenzhen, China, 4^{4}Hong Kong Baptist University, Hong Kong, China

Abstract—Accurate segmentation of 3D anatomical structures is crucial to medical image analysis. Recently, Mamba-based approaches have achieved promising segmentation performance in capturing long-range dependencies with linear-time computational complexity. However, heuristic selective scanning strategies inherently disrupt the intrinsic spatial hierarchy and increase computational redundancy, ignoring the inherent sparsity of 3D anatomical structures. To this end, we propose OcTreeMamba, a hierarchical framework that incorporates Octree structures into SSM, achieving 3D topology-aware long-range context feature propagation and integration. Specifically, a Structure Learner performs anatomy-adaptive structured sparsification through hierarchical gating and Gumbel-Softmax sampling, enabling differentiable selection of anatomical regions. The selected regions are subsequently organized by a Dynamic Octree Builder into a multi-level topology that preserves their hierarchical connectivity. Based on the constructed Octree, a bidirectional Tree-SSM propagates and integrates contextual features along connectivity-aware leaf-parent-root and root-parent-leaf trajectories. Extensive experiments on four benchmark datasets show that our proposed OcTreeMamba achieves competitive performance w.r.t. topological continuity and computational efficiency, particularly for recovering the complex structure on vascular datasets. The code is available here.

Index Terms—Octree structure, State space model, Mamba, Dynamic scan path, Medical image segmentation

I. INTRODUCTION

Automatic segmentation of anatomical structures, such as blood vessels, airways, tumors, and organs, is a foundation task in computer-aided medical image analysis and facilitates disease diagnosis, treatment planning and surgical navigation [1]–[3]. Deep Convolutional Neural Networks (DCNNs), particularly the U-Net [4] and its variants [5]–[10], have achieved remarkable progress in medical image segmentation. However, the locality of convolutional operations inherently limits their ability to capture long-range dependencies within confined receptive fields. Therefore, CNN-based models with residual connections [11], deformable convolutions [12], large kernels [13] and attention mechanisms [14] have been proposed for capturing long-range contextual features. However,

Figure

Fig. 1. Motivation of OcTreeMamba. (a) Dense scanning over 3D grids disrupts local anatomical adjacency and increases computation redundancy on non-informative background regions. (b) Anatomy-aware sparse octree topology constructed in OctreeMamba aims to propagate features along foreground structures through hierarchical interactions, improving topology preservation and structure-aware segmentation while maintaining a memory-performance balance.

it remains challenging for CNN models to segment anatomical structures, such as vessels and tumors, with intricate branching patterns, irregular shapes or elongated morphology. In contrast, Vision Transformer (ViT)-based methods [15]–[20] were proposed to model global contextual relations by using a dense query-based self-attention block. However, the quadratic computational and memory complexity in terms of the number of tokens becomes the bottleneck when applying it to 3D voxel grids. In addition, ViT-based models practically rely on sliding-window strategies and aggressive downsampling, which, to some extent, impedes the recovery of fine-grained structures with spatial details.

Recently, State Space Models (SSMs) [21], particularly the Mamba architecture [22], have been proposed for vision and natural language processing tasks. Due to efficiency for long-term feature propagation and linear scalability with the sequence length, SSM-based models have drawn significant attention [23], [24]. For medical image segmentation, Mamba-based frameworks, such as U-Mamba [25], Vim [26] and VMamba [27], have been developed. To perform sequence modeling for the 3D volumetric data, these approaches practically flatten the dense spatial grids into 1D sequences.

∗^{*} Corresponding author: Yuzhu Ji

This work was supported in part by the National Natural Science Foundation of China (NSFC) under Grants 62302104 and 62476063, the Guangdong Basic and Applied Basic Research Foundation under Grants 2026A1515011337 and 2025A1515011293, and the Science and Technology Planning Project of Guangdong under Grant No. 2021B0101220006.

Generally, handcrafted scanning patterns are introduced to obtain rich contextual relations with dense spatial traversal. However, the handcrafted scanning with fixed patterns practically corrupts the intrinsic spatial relations and makes it fail to capture the geometry and spatial distribution of anatomical structures effectively [25]. Moreover, adjacent voxels in the 3D non-causal volume data are widely separated when scanning the 1D sequence, causing inaccurate segmentation results with topological inconsistencies. In addition, the scanning algorithm generally propagates hidden states among voxels, without identifying whether the voxels contain valid contextual features. It thus increases a large amount of redundant computation and latency on multiple traversals for propagating features across structurally irrelevant regions, such as backgrounds and imaging noise. Furthermore, the sequential context feature propagation on dense grids leads to misalignment with the topology and sparse distribution of anatomical structures (see Fig. 1(a)).

We argue that, to achieve topology-preserving and computationally efficient sequence modeling, the scanning trajectories should: 1) align with the topologies of anatomical structures intrinsically, and 2) be adaptively sparse by filtering out non-informative nodes. Therefore, instead of introducing multiple handcrafted dense traversal trajectories, we reformulate feature propagation in SSM over a sparse tree-based topology to conform the propagation paths to the intrinsic anatomical structures (see Fig. 1(b)). To this end, we propose OcTreeMamba, a novel topology-adaptive state space model for 3D medical image segmentation. Our key technical insight is to reformulate feature propagation on a sparse yet efficient Octree topology on dense grids. Specifically, the proposed model consists of three key modules: 1) A Structure Learner is designed to perform differentiable anatomy-adaptive sparsification through hierarchical gating and Gumbel-Softmax sampling, enabling informative anatomical regions to be selected in an end-to-end manner; 2) A Dynamic Octree Builder is proposed to organize the selected regions into a multi-level Octree topology while preserving their hierarchical connectivity; 3) A bidirectional Tree-SSM is developed to facilitate efficient feature aggregation and broadcasting along connectivity-aware bidirectional tree traversal. Experimental results on four benchmark datasets demonstrate that OcTreeMamba achieves competitive segmentation accuracy and state-of-the-art topology preservation on vascular datasets, while maintaining a favorable memory-performance balance on dense organ and lesion segmentation tasks. In summary, our main contributions are threefold:

  1. We propose a novel Octree-based Mamba framework for 3D medical image segmentation. To the best of our knowledge, we are the first to integrate the hierarchical Octree structure to perform feature propagation along tree topology in SSM-based models for medical image segmentation.

  2. We develop a hierarchical Octree construction mechanism for preserving the differentiability of the framework, while dynamically sparsifying the Octree to enable semantic-driven structure learning.

  3. We present a topology-aware bidirectional feature propagation by adapting the Tree-SSM. It reformulates conventional scan paths as hierarchical propagation along Octree connectivity, enabling long-range dependency modeling while preserving local topology.

References (49)