# Revealing and Mitigating the Local Pattern Shortcuts of Mamba

Source: [Revealing and Mitigating the Local Pattern Shortcuts of Mamba](<https://www.sota2.com/research/paper/68fa75561e209131cea674ab>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-01-04T04:54:48.859Z

Authors: Wangjie You, Zecheng Tang, Juntao Li, Lili Yao, Min Zhang

Published: 2024-10-21T06:42:11.000Z

## Abstract

Large language models (LLMs) have advanced significantly due to the attention mechanism, but their quadratic complexity and linear memory demands limit their performance on long-context tasks. Recently, researchers introduced Mamba, an advanced model built upon State Space Models(SSMs) that offers linear complexity and constant memory. Although Mamba is reported to match or surpass the performance of attention-based models, our analysis reveals a performance gap: Mamba excels in tasks that involve localized key information but faces challenges with tasks that require handling distributed key information. Our controlled experiments suggest that this inconsistency arises from Mamba's reliance on local pattern shortcuts, which enable the model to remember local key information within its limited memory but hinder its ability to retain more dispersed information. Therefore, we introduce a global selection module into the Mamba model to address this issue. Experiments on both existing and proposed synthetic tasks, as well as real-world tasks, demonstrate the effectiveness of our method. Notably, with the introduction of only 4M extra parameters, our approach enables the Mamba model(130M) to achieve a significant improvement on tasks with distributed information, increasing its performance from 0 to 80.54 points.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Multi-Query Associative Recall (MQAR) on MQAR K2V2-Robustness v1](<https://www.sota2.com/research/sota/multi-query-associative-recall-mqar-on-mqar-k2v2-robustness-v1.md>): Multi-Query Associative Recall (MQAR); MQAR K2V2-Robustness v1; Accuracy: 81.46.

- [Multi-Query Associative Recall (MQAR) on MQAR Std-Last v1](<https://www.sota2.com/research/sota/multi-query-associative-recall-mqar-on-mqar-std-last-v1.md>): Multi-Query Associative Recall (MQAR); MQAR Std-Last v1; Accuracy: 41.97.

- [Multi-Query Associative Recall (MQAR) on MQAR Shuffle v1](<https://www.sota2.com/research/sota/multi-query-associative-recall-mqar-on-mqar-shuffle-v1.md>): Multi-Query Associative Recall (MQAR); MQAR Shuffle v1; Accuracy: 90.45.

- [Multi-Query Associative Recall (MQAR) on MQAR K2V2 v1](<https://www.sota2.com/research/sota/multi-query-associative-recall-mqar-on-mqar-k2v2-v1.md>): Multi-Query Associative Recall (MQAR); MQAR K2V2 v1; Accuracy: 99.06.

- [Commonsense Reasoning on Winogrande (accuracy)](<https://www.sota2.com/research/sota/commonsense-reasoning-on-winogrande-accuracy.md>): Commonsense Reasoning; WinoGrande; Accuracy: 52.41.

- [Language Modeling on WikiText](<https://www.sota2.com/research/sota/language-modeling-on-wikitext.md>): Language Modeling; WikiText; PPL: 38.92.

- [Commonsense Reasoning on PIQA](<https://www.sota2.com/research/sota/commonsense-reasoning-on-piqa.md>): Commonsense Reasoning; PIQA; Accuracy: 62.62.

- [Commonsense Reasoning on HellaSwag](<https://www.sota2.com/research/sota/commonsense-reasoning-on-hellaswag.md>): Commonsense Reasoning; HellaSwag; Accuracy: 28.79.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2410.15678>)

[PDF](<https://arxiv.org/pdf/2410.15678.pdf>)

[Implementation](<https://github.com/ZetangForward/Global_Mamba.git>)
