---
title: Bidirectional Mamba Network
url: https://www.emergentmind.com/topics/bidirectional-mamba-network
type: topic
---

# Bidirectional Mamba Network

Searching arXiv for recent papers on bidirectional Mamba networks and related variants across vision, audio, graphs, and sequence modeling.
Bidirectional Mamba Network denotes a class of Mamba-based selective state-space architectures in which information is propagated in more than one scan direction, typically by pairing a forward scan with a reverse-order scan, or by extending that idea to multiple spatial, spectral, task, or volumetric axes. In the recent literature, the concept is used across image backbones, speech and music systems, medical imaging, recommendation, graphs, and scientific time-series analysis. This suggests that “Bidirectional Mamba Network” is best understood as a design pattern for adapting the originally causal, 1D Mamba formulation to non-causal or offline settings in which both earlier and later context are useful [2404.18861, 2502.07161].

## 1. Conceptual scope and defining rationale

Original Mamba is introduced in the visual surveys as a selective structured state-space model with linear scalability in sequence length, but its default formulation is causal and sequence-order dependent. In the vision setting, the surveys state that this causes a mismatch with non-causal image sequences, and motivates bidirectional or multi-directional scanning so that a token can aggregate information beyond the already scanned prefix [2404.18861, 2502.07161].

The literature uses several closely related meanings. In the narrowest sense, a bidirectional Mamba network runs one Mamba path in natural order and another on a reversed sequence, then fuses the two outputs. This is the clearest pattern in Vim-style blocks, GCAMba, MambaNet, BMACE, XLSR-Mamba, and several biomedical or audio systems [2502.07161, 2511.06756, 2601.17108, 2601.02101, 2411.10027]. In a broader sense, visual and volumetric systems generalize bidirectionality into multi-directional scan sets: VMamba performs bi-directional scanning along horizontal and vertical axes; BIM combines task-first and position-first scanning with forward and reversed task order; BiSegMamba creates forward and backward scans for each of three orthogonal 3D orientations [2404.18861, 2508.20376, 2605.30972].

Across application papers, bidirectionality is usually introduced when the task is described as offline, non-causal, or inherently spatial. The music-separation model TS-BSMAMBA2 is explicitly non-causal and uses bidirectional Mamba-2 because source separation can use both past and future context; ABS-Mamba argues that medical images are noncausal spatial fields; MambaNet states that subcarrier channel gains are non-causal; BiT-MamSleep uses both past and future EEG context for sleep staging [2409.06245, 2505.07687, 2601.17108, 2411.01589].

## 2. State-space substrate and bidirectional constructions

The common substrate is the state-space model. The visual Mamba survey gives the continuous-time form
\[
h'(t)=\mathbf{A}h(t)+\mathbf{B}x(t), \qquad y(t)=\mathbf{C}h(t),
\]
with zero-order-hold discretization
\[
\overline{\mathbf{A}}=\exp(\Delta\mathbf{A}), \qquad
\overline{\mathbf{B}}=(\Delta\mathbf{A})^{-1}(\exp(\Delta\mathbf{A})-\mathbf{I})\Delta\mathbf{B},
\]
and discrete recurrence
\[
h_t=\overline{\mathbf{A}}h_{t-1}+\overline{\mathbf{B}}x_t, \qquad y_t=\mathbf{C}h_t.
\]
The same survey states that Mamba makes the model selective by letting \(\mathbf{B},\mathbf{C},\Delta = Linear(\boldsymbol{x})\), so the effective dynamics become input-dependent [2404.18861].

Bidirectional variants preserve this substrate but alter the scan wrapper. In the Vim-style block summarized in the survey fragment, each direction \(o \in \{\text{forward},\text{backward}\}\) computes direction-specific \(\text{Conv1d}_o\), \(B_o\), \(C_o\), and \(\Delta_o\), forms \(\bar A_o\) and \(\bar B_o\), applies
\[
y_o=\text{SSM}(\bar A_o,\bar B_o,C_o)(x'_o),
\]
gates both directional outputs with \(\text{SiLU}(z)\), then sums them and adds a residual projection [2502.07161]. This is the canonical “two directional scans, one fused block” pattern.

Other papers make the bidirectional recurrence explicit. MambaNet defines a forward scan
\[
\mathbf{h}^{\mathrm{f}}_t=\mathbf{a}_t\circ \mathbf{h}^{\mathrm{f}}_{t-1}+\mathbf{b}_t
\]
and a backward scan
\[
\mathbf{h}^{\mathrm{b}}_t=\mathbf{a}_t\circ \mathbf{h}^{\mathrm{b}}_{t+1}+\mathbf{b}_t,
\]
then fuses them by
\[
\mathbf{h}_t=\mathbf{h}^{\mathrm{f}}_t+\mathbf{h}^{\mathrm{b}}_t
\]
before output gating and projection [2601.17108]. LBMamba instead embeds a local backward recurrence inside the forward selective scan:
\[
h_t^b=
\begin{cases}
B^f x_t & \text{if } t \% M = 0 \\
\bar A^f h_{t+1}^b + \bar B^f x_t & \text{otherwise}
\end{cases},
\qquad
h_t=h_t^f+(h_t^b-B^f x_t),
\]
and then alternates global scan direction across layers through explicit sequence reversal [2506.15976]. This is not full bidirectionality in one layer, but an efficiency-oriented approximation.

A recurring feature is that the internal selective-SSM equations are often omitted once the architecture moves into domain-specific papers. Several works specify the forward/backward wrapper, the fusion rule, and the surrounding convolutions or projections, but not the low-level selective scan kernel, state size, or exact gating internals. This suggests that the field treats bidirectionality primarily as an architectural adaptation around an already accepted Mamba core.

## 3. Architectural motifs in the literature

One motif is the **dual-path sequence block**. ABS-Mamba reshapes a 2D feature map into a spiral-ordered sequence \(\tilde X_1\), constructs \(\tilde X_2=\text{Flip}(\tilde X_1,\text{dim}=1)\), applies two independent Mamba modules, and fuses the outputs through a residual convolutional block with \(1\times1\) and \(3\times3\) convolutions [2505.07687]. XLSR-Mamba’s DuaBiMamba uses two entire Mamba columns, one on the original utterance sequence and one on the reversed sequence, reverses the backward output back to original order, and concatenates the two directional outputs [2411.10027]. BMACE follows a similar high-level pattern: two Mamba blocks with opposite masking directions, concatenation, a fully connected layer to restore dimensionality, and residual connections [2601.02101].

A second motif is **bidirectionality along more than one axis**. TS-BSMAMBA2 applies bidirectional Mamba-2 first along the temporal dimension \(T\) and then along the band dimension \(K\) inside BMAMBA2-DualNet, so the system is dual-axis bidirectional rather than merely temporal [2409.06245]. TF-Mamba similarly places BiMamba in both a per-frame frequency-sequence module and a per-frequency time-sequence module, thereby factorizing time-frequency modeling into two bidirectional 1D scans [2409.05034]. BIM serializes multi-task dense-prediction features in task-first order and then in position-first order, while also running a backward branch that reverses task order; the two branches are finally concatenated along channels [2508.20376].

A third motif is **task-aware or efficiency-aware departure from full reverse scanning**. SIGMA’s PF-Mamba does not reverse the whole sequence; it reverses the first \(n\) items while preserving the last \(r\) items in original order, then fuses original and partially flipped Mamba outputs with an input-dependent Dense Selective Gate [2408.11451]. LBMamba avoids a second full sweep and confines the backward recurrence to local chunks of size \(M\), relying on cross-layer direction alternation to recover a global receptive field over depth [2506.15976].

A fourth motif is **orientation-specific bidirectionality in 3D**. BiSegMamba flattens each feature tensor into three orthogonal views \(d,w,h\), constructs reversed sequences for all three, concatenates the six sequences along the batch dimension, processes them by one Mamba call, then fuses forward and backward outputs per orientation with learnable channel-wise weights before a second adaptive fusion across orientations [2605.30972].

## 4. Representative instantiations across domains

The breadth of the design pattern is visible in recent application papers.

| Domain | Representative architecture | Bidirectional mechanism |
|---|---|---|
| Music source separation | TS-BSMAMBA2 [2409.06245] | Bidirectional Mamba-2 along time \(T\) and band \(K\); two-stage mask plus residual refinement |
| Medical image translation | ABS-Mamba [2505.07687] | Spiral sequence plus reversed sequence, two Mamba branches, residual convolutional fusion |
| Speech anti-spoofing | XLSR-Mamba [2411.10027] | Dual-column Mamba on original and reversed utterance features, concatenation fusion |
| Sound source localization | TF-Mamba [2409.05034] | BiMamba in both frequency-sequence and time-sequence paths; directional outputs averaged |
| Sequential recommendation | SIGMA / PF-Mamba [2408.11451] | Original order plus partially flipped prefix, DS Gate weighting, FE-GRU parallel branch |
| 3D medical segmentation | BiSegMamba [2605.30972] | Forward/backward scans for each of \(d,w,h\) orientations, then adaptive directional fusion |

Other domains confirm that the same idea is not tied to one modality. BiT-MamSleep uses separate forward and backward temporal Mamba paths over EEG features, gates both with the same \(z\), and fuses them with an output projection and residual connection [2411.01589]. The anomalous-diffusion model Bi-Mamba processes original and time-flipped trajectory features in two Mamba branches, concatenates the outputs, and feeds them to a feedforward layer before downstream segmentation and regression [2412.07299]. DMbaGCN contains a Global Context-Aware Mamba branch
\[
\hat{\mathbf{Y}}^{\mathbf{G}}=(1-\beta)\big(f_\varphi(\mathbf{F})+\mathrm{Re}(f_\varphi(\mathrm{Re}(\mathbf{F})))\big)+\beta \mathbf{X}^{(0)},
\]
which is explicitly bidirectional over the serialized node sequence, even though the overall graph model is dual-path rather than a single bidirectional encoder [2511.06756]. MambaNet applies forward and backward selective scans because OFDM subcarrier gains are described as non-causal [2601.17108].

This distribution of examples suggests that bidirectional Mamba is not domain-bound. What changes from paper to paper is the definition of the sequence itself: temporal samples, image tokens, band sequences, node trajectories across GNN depth, task-ordered dense features, or flattened 3D voxels.

## 5. Empirical performance and efficiency

The strongest evidence is domain-specific rather than universal. In music source separation, TS-BSMAMBA2 (SS) reports **9.56 cSDR / 8.71 uSDR** average on MUSDB18-HQ, compared with **8.59 cSDR / 8.14 uSDR** for the first stage alone; its efficiency table reports **35.52M** parameters and **212.11 G/s MACs**, compared with **146.57M** and **611.01 G/s MACs** for BSRNN [2409.06245].

In medical image translation, ABS-Mamba reports **SSIM 0.935±0.009** and **PSNR 31.70±0.56** on BraTS2019 T1-to-T2 translation. Its ablation indicates that the configuration with **SIE, 2 BRMN, and RFFN** reaches **0.935** SSIM, while **1 BRMN + SIE + RFFN** gives **0.926** and **3 BRMN + SIE + RFFN** gives **0.931**, suggesting an optimum at two BMRN modules in that setup [2505.07687].

In speech and spatial audio, the bidirectional effect is directly quantified. XLSR+DuaBiMamba reaches **LA EER 0.93**, **LA min t-DCF 0.208**, **DF EER 1.88**, and **average EER 1.41**, improving over plain XLSR+Mamba at **average EER 1.79**. TF-Mamba’s best configuration reports **ACC(\(15^\circ\)) 98.9**, **ACC(\(10^\circ\)) 96.9**, and **MAE 2.52°**, whereas the **w/o BiMamba** ablation gives **97.1**, **93.6**, and **2.84°** [2411.10027, 2409.05034].

The efficiency–accuracy trade-off is particularly explicit in LBMamba. Compared to vanilla Mamba’s CUDA kernel, LBMamba increases FLOPs by about **27%** while reducing throughput by only **1.9\%-2.3\%**, with unchanged GPU memory. At matched throughput, widened LBVim variants improve over Vim by **0.8% to 1.6%** top-1 on ImageNet-1K, **0.6% to 2.7%** mIoU on ADE20K, and **0.9** AP\(^b\) plus **1.1** AP\(^m\) on COCO [2506.15976]. The paper’s argument is not that local bidirectionality matches full bidirectionality exactly, but that the saved runtime can be reinvested in model size more effectively.

BiSegMamba shows the same trade-off in volumetric vision. On BraTS2023, compared with SegMamba-V2, parameters drop from **138.77M** to **47.38M** and FLOPs from **1853.19G** to **410.28G**. In the ACDC ablation, moving from **+ Patch Merging** to **+ Bi-ToOM** improves **DSC 92.20 → 92.35** and **HD95 1.16 → 1.11**, while the subsequent addition of adaptive directional fusion improves to **DSC 92.53** and **HD95 1.08** [2605.30972].

## 6. Ambiguities, misconceptions, and open directions

The literature does not use the term in one uniform way. Some papers describe a conventional forward/backward inference architecture; others use partial reversal, local backward windows, task-order reversal, or bidirectional distillation. TransMamba, for example, is primarily a Transformer-to-Mamba adaptation framework whose bidirectional contribution is an **Adaptive Bidirectional distillation** strategy for bidirectional visual Mamba students, rather than a newly proposed bidirectional inference block [2502.15130]. This suggests that “Bidirectional Mamba Network” should be read as a family resemblance rather than a single canonical module.

A second recurring issue is incomplete specification. TS-BSMAMBA2 states “the superiority of bidirectional Mamba-2” but does not provide a separate ablation against unidirectional Mamba-2, and it does not specify the exact internal bidirectional fusion rule inside BMAMBA2 [2409.06245]. ABS-Mamba introduces a spiral transformation matrix \(S\) and a bidirectional Mamba residual network, but does not give the explicit spiral indexing algorithm or all low-level Mamba hyperparameters [2505.07687]. DiM-3D states that each DiM block uses bidirectional sequence modeling and merges the two directions, yet leaves the exact fusion operator unspecified [2406.05038]. BiT-MamSleep presents an inconsistency between an averaging-style bidirectional equation and an algorithm that performs gated summation plus projection and residual addition [2411.01589]. BMACE, as a short extended abstract, omits the internal Mamba equations and several architectural hyperparameters [2601.02101].

A third issue is that bidirectionality is not always isolated experimentally. TS-BSMAMBA2, ABS-Mamba, and DiM-3D all present strong end-to-end gains, but the provided text does not include a clean bidirectional-versus-unidirectional ablation for the core Mamba block itself [2409.06245, 2505.07687, 2406.05038]. By contrast, TF-Mamba, XLSR-Mamba, BiT-MamSleep, SIGMA, and BiSegMamba do provide more direct evidence that the bidirectional wrapper contributes materially to performance [2409.05034, 2411.10027, 2411.01589, 2408.11451, 2605.30972].

Finally, bidirectionality and efficiency remain in tension. Full reverse sweeps add computation and may erode Mamba’s efficiency advantage. LBMamba is the clearest response: it replaces a full backward sweep with a local backward recurrence in per-thread registers and recovers global context across layers via sequence reversal [2506.15976]. A plausible implication is that future bidirectional Mamba research will continue to separate **exact non-causal bidirectionality** from **hardware-aware approximations**, and will standardize how scan order, fusion, and ablation are reported.

Source: https://www.emergentmind.com/topics/bidirectional-mamba-network