MaBERT:A Padding Safe Interleaved Transformer Mamba Hybrid Encoder for Efficient Extended Context Masked Language Modeling
On the map: State-space sequence models (S4, Mamba) → Core SSM architectures for language
Abstract (arXiv)
Self attention encoders such as Bidirectional Encoder Representations from Transformers(BERT) scale quadratically with sequence length, making long context modeling expensive. Linear time state space models, such as Mamba, are efficient; however, they show limitations in modeling global interactions and can suffer from padding induced state contamination. We propose MaBERT, a hybrid encoder that interleaves Transformer layers for global dependency modeling with Mamba layers for linear time state updates. This design alternates global contextual integration with fast state accumulation, enabling efficient training and inference on long inputs. To stabilize variable length batching, we introduce paddingsafe masking, which blocks state propagation through padded positions, and mask aware attention pooling, which aggregates information only from valid tokens. On GLUE, MaBERT achieves the best mean score on five of the eight tasks, with strong performance on the CoLA and sentence pair inference tasks. When extending the context from 512 to 4,096 tokens, MaBERT reduces training time and inference latency by 2.36x and 2.43x, respectively, relative to the average of encoder baselines, demonstrating a practical long context efficient encoder.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Core SSM architectures for language, one of 10 directions in State-space sequence models (S4, Mamba). Builds on 25 of its 33 references that are in the map. First posted on arXiv 3 Mar 2026.
Builds on
25 of 33 references.
Closest ancestors · 5
Same direction, newest first
- 2025Understanding and Enhancing Mamba-Transformer Hybrids for Memory Recall and Language Modeling30 Oct
- 2024Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modeling11 Jun
- 2024Jamba: A Hybrid Transformer-Mamba Language Model28 Mar
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spaces1 Dec
- 2022How to Train Your HiPPO: State Space Models with Generalized Orthogonal Basis Projections24 Jun
Other references · 20
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,307
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,790
- 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,181
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,043
- 2020On Layer Normalization in the Transformer Architecturecited by 922
8 more
- 2024Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inferencecited by 554
- 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 499
- 2020MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devicescited by 482
- 2019BEHRT: Transformer for Electronic Health Recordscited by 263
- 2022On The Computational Complexity of Self-Attentioncited by 139
- 2020Deep Encoder, Shallow Decoder: Reevaluating Non-autoregressive Machine Translationcited by 105
- 2020Understanding and Improving Encoder Layer Fusion in Sequence-to-Sequence Learningcited by 26
- 2025Silent Tokens, Loud Effects: Padding in LLMscited by 4
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025TransMamba: A Sequence-Level Hybrid Transformer-Mamba Language Model
- 2024Taipan: Efficient and Expressive State Space Language Models with Selective Attention
- 2024DeciMamba: Exploring the Length Extrapolation Potential of Mamba
- 2024An Empirical Study of Mamba-based Language Models
- 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Tasks
- 2025LongMamba: Enhancing Mamba's Long Context Capabilities via Training-Free Receptive Field Enlargement
- 2024The Mamba in the Llama: Distilling and Accelerating Hybrid Models
- 2023Dodo: Dynamic Contextual Compression for Decoder-only LMs