Block-Biased Mamba for Long-Range Sequence Processing

Annan Yu, N. Benjamin Erichson

Abstract

While Mamba (S6) has emerged as a powerful alternative to Transformers for language modeling, it exhibits a surprising performance gap on long-range dependency (LRD) tasks. This paper identifies three theoretical "failure modes" in the standard Mamba architecture: limited expressiveness due to shared selection parameters, an overly aggressive inductive bias that triggers exponential forgetting, and training instability on very long sequences. To address these, we propose $B_2S_6$ (Block-Biased S6). By incorporating block-wise selective dynamics and channel-specific biases, $B_2S_6$ restores long-range robustness. Our evaluations show that $B_2S_6$ achieves state-of-the-art performance on the Long-Range Arena (LRA) benchmark, including a 97.90% accuracy on the difficult Path-X task, without compromising its efficiency in large-scale language modeling.

Introduction

State Space Models (SSMs) such as S4 and S4D were pioneered to handle the computational challenges of extremely long sequences, where the quadratic complexity of Transformers becomes prohibitive. Mamba (S6) significantly advanced this field by introducing "selectivity"—a mechanism that allows the model to dynamically filter information based on the input. This innovation propelled Mamba to the forefront of natural language processing.

However, a performance discrepancy has been observed: Mamba often underperforms its predecessors on benchmarks specifically designed to test long-distance reasoning, such as the Long-Range Arena (LRA). This paper investigates this "long-range amnesia" and identifies three core architectural culprits. First, Mamba's shared selection parameters across channels reduce its "effective width." Second, its selection mechanism can be "too aggressive," where large input magnitudes lead to the loss of critical historical data. Finally, the input-dependent nature of the model introduces gradient sensitivity, making training unstable for very long sequences.

Methodology: The $B_2S_6$ Architecture

To mitigate these issues, we introduce $B_2S_6$ (Block-Biased S6), which refines the standard S6 unit through three principled modifications.

Comparison of S4D, S6 (Mamba), and the proposed $B_2S_6$ architectures. $B_2S_6$ introduces block-wise selection and bias terms to improve expressiveness and memory stability.

Block-wise Selective Dynamics

In the original S6, selection parameters are often shared globally, which limits the model's ability to track diverse features simultaneously. $B_2S_6$ adopts a multi-head approach by partitioning the input into smaller blocks. Each block learns its own selective behavior, effectively increasing the model's width and expressiveness. This allows the model to attend to different parts of the sequence context in parallel, similar to multi-head attention in Transformers.

Channel-Specific Bias ($B_{bias}$)

A significant theoretical finding in this work is the "Forgetting Theorem," which shows that Mamba's selection mechanism can cause it to ignore current inputs or completely forget past states when faced with large input magnitudes. To provide a "safety net" for memory, we add an input-independent bias term, $B_{bias}$, to the recurrence. This ensures that even if the selective mechanism attempts to discard information, a stable baseline of state information persists across the sequence.

Stabilized Optimization

Training on sequences of length 16k or greater often leads to vanishing or exploding gradients in selective SSMs. We address this by applying a reduced learning rate specifically to the parameters governing the sampling intervals ($Δ$). This stabilization strategy ensures that the model remains trainable even on the most demanding long-range tasks.

Experimental Evaluation

We evaluated $B_2S_6$ across diverse domains to demonstrate its versatility and robustness.

Long-Range Arena (LRA)

The LRA benchmark serves as the primary test for long-sequence modeling. It includes tasks such as ListOps, Text classification, Retrieval, and Image processing. Most notably, it includes Path-X, which requires reasoning over sequences of 16,384 tokens. While standard Mamba frequently fails to converge on Path-X, $B_2S_6$ achieved a remarkable 97.90% accuracy. Overall, $B_2S_6$ reached an average LRA score of 87.71, surpassing both the original Mamba (66.59) and specialized models like S4D (84.89).

Language Modeling

To ensure that these long-range fixes do not degrade Mamba's primary strength, we tested $B_2S_6$ on the SlimPajama-6B dataset. The results indicate that $B_2S_6$ maintains parity with Mamba's perplexity (approximately 20.97 vs. 21.07), confirming that it is a "best of both worlds" solution.

Theoretical Insights

The paper provides a rigorous mathematical foundation for these improvements. We prove that while a single-layer Mamba is not a universal approximator, the addition of the block structure or the bias term in $B_2S_6$ restores this property. Furthermore, our analysis of gradient sensitivity explains why the reduced learning rate for $Δ$ is essential for scaling to longer sequence lengths.

Conclusion

$B_2S_6$ addresses the critical limitations of the Mamba architecture in handling long-range dependencies. By introducing block-wise dynamics and stabilizing biases, we provide a model that retains the efficiency and language prowess of S6 while regaining the robustness of earlier SSMs. Future work will focus on scaling $B_2S_6$ to multi-billion parameter foundation models and further exploring the training dynamics of the selective $B$ and $C$ matrices.

Summary updated

BibTeX
@inproceedings{yu2025block,
  author = {Annan Yu and N. Benjamin Erichson},
  title = {{Block-Biased Mamba for Long-Range Sequence Processing}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=5WKEH9LhAQ},
}
Figure