Papers
Topics
Authors
Recent
Search
2000 character limit reached

Dual-Path Mamba Group (DPMG)

Updated 8 July 2026
  • DPMG is a dual-path module that combines horizontal scanning for global structure with mask-aware adaptive scanning for precise shadow region restoration.
  • It integrates into a UNet backbone in the D2-Mamba pipeline, effectively addressing non-uniform shadow degradation and reducing boundary artifacts.
  • Empirical results demonstrate improved PSNR, SSIM, and RMSE across benchmarks, validating its design for reconciling global context with region-specific corrections.

Dual-Path Mamba Group (DPMG) is a Mamba-based module introduced in D2-Mamba for shadow removal, a restoration setting in which degradation is spatially localized and non-uniform rather than globally distributed. The module is designed to selectively propagate contextual information based on transformation similarity across regions by combining two scanning mechanisms: horizontal scanning for global feature capture and mask-aware adaptive scanning for region-specific modeling. In the full D2-Mamba pipeline, DPMG functions as the main building block in a UNet backbone and operates alongside the Dual-Scale Fusion Mamba Block (DFMB), which fuses original features with low-resolution features to reduce boundary artifacts (Li et al., 18 Aug 2025).

1. Problem formulation and design motivation

The design of DPMG is tied to the specific structure of shadow removal. In this task, shadowed regions are only partially degraded, while non-shadow regions retain abundant information that can guide restoration. At the same time, the transformation required to correct shadowed areas can differ significantly from the transformation appropriate for well-lit regions. This makes uniform correction strategies inadequate and creates a requirement for both non-local contextual aggregation and adaptive modeling of region-specific transformations (Li et al., 18 Aug 2025).

The D2-Mamba formulation presents DPMG as a response to limitations in prior SSM-based scanning strategies. Existing Mamba or SSM variants are described as typically relying on a single global or local scan order, such as row-wise scanning, window-based scanning, or region grouping. According to the paper, such single-path strategies are ill-suited to discontinuities at shadow boundaries and to the need for fine-grained modeling inside shadow areas, because they can disrupt spatial adjacency or introduce artifacts. DPMG therefore adopts a dual-path design intended to preserve global continuity while also respecting region-adaptive, mask-aware propagation constraints (Li et al., 18 Aug 2025).

A common misconception is to treat DPMG as a generic two-branch enhancement block. In the D2-Mamba formulation, its two paths are not interchangeable generic feature streams; they are specialized scanning orders chosen to address the asymmetry between shadow and non-shadow regions. This distinction is central to the module’s role.

2. Architectural composition of the group

DPMG comprises two complementary paths: Horizontal Scanning (HS) and Mask-Aware Adaptive Scanning (MAS). The paper states that these paths process the image sequentially, and that the order HS \rightarrow MAS yields better results empirically than either path alone or the reverse ordering (Li et al., 18 Aug 2025).

Path Primary role Scan behavior
Horizontal Scanning (HS) Capture global scene structure and long-range dependencies efficiently Bidirectional left-to-right and right-to-left scanning along rows, described as a Z-shaped path
Mask-Aware Adaptive Scanning (MAS) Achieve transform-consistent modeling within regions of similar illumination and restore local continuity Uses the shadow mask to partition shadow and non-shadow sub-blocks and defines region-specific adaptive traversal

HS is the global branch. Its function is to enable each spatial position to aggregate features from distant locations horizontally, supporting holistic brightness and structure consistency. MAS is the adaptive branch. Its function is to model regions according to illumination similarity, especially at shadow boundaries where transform inconsistency is most severe. The paper describes the two as complementary rather than redundant: HS ensures global coherence, while MAS emphasizes local adaptivity and fine-grained detail restoration (Li et al., 18 Aug 2025).

This organization also clarifies another frequent source of confusion. DPMG is not defined by “dual-path” in the sense of simultaneous local convolution and global state-space processing. In D2-Mamba, “dual-path” refers specifically to two scan paths within the Mamba framework: a horizontal global path and a mask-aware adaptive path.

3. Scanning procedures and state-space processing

In HS, the feature map XRC×H×WX \in \mathbb{R}^{C \times H \times W} is flattened into a sequence VRC×(H×W)V \in \mathbb{R}^{C \times (H \times W)}. Bidirectional scanning is then applied along rows, with both left-to-right and right-to-left traversal. Each patch is processed using Mamba SSM blocks and ConvMLP submodules, with the ConvMLP written as

z=Dropout(W2(GELU(DWConv(W1x)))).z = \text{Dropout}\left(W_2\left(\text{GELU}\left(\text{DWConv}\left(W_1 x\right)\right)\right)\right).

Here, W1W_1 and W2W_2 are fully connected transformation layers, and DWConv is a depthwise separable convolution used for local enhancement (Li et al., 18 Aug 2025).

MAS introduces the shadow mask mm into the scan construction. The mask partitions the feature map into shadow and non-shadow sub-blocks. For non-shadow regions, denoted “A,” scanning starts at the sub-block closest to an image edge and proceeds with a greedy boundary-contact search (GBS), always selecting the neighbor with the greatest boundary contact. For shadow regions, denoted “B,” scanning starts at the portion of the shadow area closest to the starting point of A and follows a spiral pattern inward. The overall scan order is explicitly given as

Sequence=[Shadow region path (pathB),Non-shadow path (pathA)].\text{Sequence} = [\text{Shadow region path } (path_B),\, \text{Non-shadow path } (path_A)].

The paper characterizes this ordering as combining mask adaptivity with a breadth-first-search element (Li et al., 18 Aug 2025).

When determining partition boundaries, the distances to image boundaries are computed as

t=max(0,cxsubsub_r12), b=min(r1,cxsub+sub_r2), l=max(0,cysubsub_c12), r=min(c1,cysub+sub_c12).\begin{aligned} t &= \max\left(0,\, cx_{\mathrm{sub}} - \frac{\mathrm{sub\_r} - 1}{2}\right), \ b &= \min\left(r - 1,\, cx_{\mathrm{sub}} + \left\lfloor \frac{\mathrm{sub\_r}}{2} \right\rfloor\right), \ l &= \max\left(0,\, cy_{\mathrm{sub}} - \frac{\mathrm{sub\_c} - 1}{2}\right), \ r &= \min\left(c - 1,\, cy_{\mathrm{sub}} + \left\lfloor \frac{\mathrm{sub\_c} - 1}{2}\right\rfloor\right). \end{aligned}

Here, (cxsub,cysub)(cx_{\mathrm{sub}}, cy_{\mathrm{sub}}) is the shadow region center (Li et al., 18 Aug 2025).

Both HS and MAS ultimately convert spatial features into 1D sequences and feed them into Mamba SSM blocks. This is the key mechanism by which DPMG exploits Mamba’s selective sequence modeling while allowing the sequence order itself to encode restoration priors derived from geometry and masking. A plausible implication is that the effectiveness of DPMG depends not only on state-space dynamics, but also on the quality of the scan order imposed before selective scanning.

4. Position inside the D2-Mamba restoration pipeline

In the overall D2-Mamba architecture, the encoder first derives features from the concatenated image and mask. DFMB then fuses multi-scale features for richer representations. The UNet backbone, which uses DPMG blocks as its main building components, performs the principal context propagation and boundary-sensitive restoration. The decoder reconstructs the shadow-free image from these processed features (Li et al., 18 Aug 2025).

Within this pipeline, DPMG should be understood as the component responsible for reconciling global scene understanding with region-adaptive restoration. DFMB addresses multi-scale representation and boundary artifact reduction, whereas DPMG addresses scan-dependent feature propagation. The paper’s separation of these roles is important: DPMG is not presented as a stand-alone shadow-removal architecture, but as a specific module embedded in a larger encoder-decoder system (Li et al., 18 Aug 2025).

The dual-path synergy is described in explicit functional terms. HS provides global coherence and long-range propagation across the image, regardless of whether a pixel lies in shadow. MAS then emphasizes local continuity and detail by grouping spatially and semantically similar regions according to the shadow mask. This makes the module particularly targeted at shadow boundaries, where global context alone is insufficient and purely local modeling is unstable.

5. Empirical findings, ablations, and interpretive boundaries

The empirical case for DPMG in D2-Mamba is established through ablations and benchmark comparisons. On the SRD dataset, Table 4 is described as showing that adding HS alone improved PSNR, MAS alone also helped, and combining both in DPMG provided higher PSNR/SSIM and the lowest RMSE. The paper further states that adding both HS and MAS to the baseline led to higher performance in shadow regions, better global metrics in both overall and non-shadow areas, and significant reduction in artifacts with more consistent shadow boundary treatment (Li et al., 18 Aug 2025).

Across other datasets, including ISTD, ISTD+, and SBU, D2-Mamba with DPMG is reported to consistently outperform both Mamba variants such as ShadowMamba, LocalMamba, and VMamba and non-Mamba state-of-the-art models. The abstract characterizes the overall method as significantly outperforming existing state-of-the-art approaches on shadow-removal benchmarks (Li et al., 18 Aug 2025).

These results support two interpretive conclusions that remain close to the paper’s own framing. First, the benefit of DPMG is not reducible to merely increasing model complexity, because the ablation evidence specifically attributes gains to the combination of HS and MAS. Second, the module’s effect is not limited to shadow interiors; the reported gains include better global metrics and more consistent treatment of shadow boundaries. At the same time, the available description does not quantify the relative contribution of scan-order design versus the underlying Mamba parameterization, so any stronger causal claim would go beyond the reported evidence.

6. Relation to the broader dual-path Mamba literature

DPMG belongs to a broader family of dual-path Mamba architectures, but its interpretation of “dual-path” is domain-specific. In speech separation, Dual-path Mamba models short-term and long-term forward and backward dependency of speech signals using selective state spaces, with intra-chunk and inter-chunk processing over chunked waveforms (Jiang et al., 2024). In medical image segmentation, PGM-UNet combines CNN and Mamba in parallel dual paths for local-global feature extraction, using a prompt-guided residual Mamba module and a local-global information fusion network (Zhang et al., 25 Mar 2025). In spatio-temporal video prediction, DIFFUMA uses a dual-path architecture in which a Mamba temporal module captures global long-range temporal context and a diffusion module restores and enhances fine-grained spatial details (Xie et al., 9 Jul 2025). In anomalous sound detection, ESTM employs a dual-path Mamba backbone with time-frequency decoupled processing, using TMamba and SMamba to model temporal and spectral dependencies separately before fusion (Ma et al., 2 Sep 2025).

This comparison shows that “dual-path” in the Mamba literature denotes a recurring design principle rather than a single canonical construction. Across these works, the paired paths correspond to complementary dependency structures: short-term versus long-term, local versus global, temporal evolution versus spatial detail, or time versus frequency. DPMG fits this lineage by pairing global horizontal propagation with mask-conditioned adaptive traversal. What distinguishes it is the use of a shadow mask to organize the scan order itself, not merely to modulate features after scanning (Li et al., 18 Aug 2025).

The D2-Mamba paper explicitly presents DPMG as the first SSM/Mamba-based module to combine global and mask-adaptive scanning, retaining sequence-modeling power while respecting the demands of shadow removal, especially at boundaries (Li et al., 18 Aug 2025). It also frames the concept as a general framework that could inspire adaptive scanning or path planning in other spatially localized, non-uniform image restoration tasks. This suggests a broader significance for DPMG within Mamba-based vision restoration: not only as a module for shadow removal, but as an example of how scan ordering can be treated as a task-specific inductive bias rather than a fixed preprocessing convention.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Dual-Path Mamba Group (DPMG).