arXiv:2610.36617cs.LGOct 2026

Manuscript Offprint

arXiv:2610.36617

Balanced State Subspaces for Mamba-2 State Compression

Shang Tingyu, Cao Wenfei

Abstract

Mamba-2 compresses all context into a fixed-size recurrent state that dominates decoding memory and bandwidth. Existing compressors quantize state values or prune state coordinates, scoring each channel independently in the native basis. We examine trained Mamba-2 states and find that energy is almost rank-one, but the output does not read the energetic directions: energy concentrates in a bias-like direction accumulated by the recurrence, while the content the output reads lives in a low-dimensional subspace that is not aligned with the state's coordinates. Even output-aware scores are computed coordinate by coordinate, so they miss the directions that determine the input–output map. Compression should therefore target the write-read subspace rather than individual coordinates. We propose BASS, a post-training transform that instantiates balanced truncation with full controllability and observability Gramians and applies the rotation exactly via Mamba-2's scalar-identity transition. Because the useful rank varies widely across layers, we further introduce HARP, which allocates ranks per layer from the Hankel spectrum and protects retrieval-sensitive layers, improving both perplexity and retrieval over uniform budgets. Calibration takes a single forward pass, an order of magnitude faster than GHOST's released protocol, with lower peak memory. With HARP, BASS halves the state dimension at an average WikiText-2 perplexity increase of 0.3 points (1.8%) across 130M–2.7B, versus 1.6 (9.3%) for GHOST, and the gap widens at 25% retention.

1 Introduction

State space models (SSMs) such as Mamba and Mamba-2 have become a competitive alternative to Transformers for long-sequence modeling: they scale linearly in sequence length, avoid the growing key-value cache, and match or exceed attention-based models at small and medium scale (Gu and Dao, 2023; Dao and Gu, 2024). Their efficiency at inference stems from a single mechanism: the entire context is compressed into a fixed-size recurrent state. For Mamba-2, each layer keeps one matrix state per head (N=128 state modes), and generation updates this state in place at every token, so the state becomes the bottleneck: at batch size 128, the recurrent states of Mamba2-2.7B account for roughly 80% of decoding memory (Chen et al., 2025), and every generated token must stream them from memory (Nguyen, 2026).

Reducing the cost of the state has therefore become an active goal. Post-training quantization compresses state values (e.g., Quamba and Q-Mamba (Chiang et al., 2025b; Chen et al., 2025)). An orthogonal direction prunes state coordinates: GHOST selects state channels by an output-aware controllability×observability score (Menezes and Kyrillidis, 2026), and Nazari and Rusch (2026) discard key/query channels in linear attention. All of these methods operate in the native coordinate system of the state, scoring coordinates once from calibration statistics; even output-aware criteria score each coordinate independently, and none can represent the joint structure that governs how the state as a whole is written and read.

In this paper we ask two questions. First, how should we read trained Mamba-2 states? Second, given that structure, what is the right way to compress them? Related properties have been reported in isolation—anisotropy for Mamba-1 (Wagh and Singh, 2026), low-rank and head-stratified states for linear attention (Sun et al., 2026; Nazari and Rusch, 2026), and output-aware selection for Mamba-2 (Menezes and Kyrillidis, 2026)—but not jointly, under one measurement protocol. We therefore re-examine Mamba-2 checkpoints from 130M to 1.3B with a single capture pipeline and find three facts. (i) State energy is almost rank-

∗^{*}Corresponding author. Email: caowenf2015@gmail.com

Figure

Figure 1: BASS overview. Top: one Mamba-2 layer with pre- Δ\Delta write B~t\tilde{B}_t, read CtC_t, and step Δt\Delta_t, where Bt=Δt⊙B~tB_t = \Delta_t \odot \tilde{B}_t; state and output follow Eqs. (1)–(2). Bottom: BASS estimates WcW_c, WoW_o, keeps the balanced basis QQ, and applies H′=HQH' = HQ, B′=Q⊤BtB' = Q^\top B_t, C′=Q⊤CtC' = Q^\top C_t; the compressed layer reruns update and read with H′H', B′B', C′C'. The rotation is exact for any rr; lossless at r=Nr = N; only truncation r<Nr < N approximates. Post-training; all other parameters untouched.

one: most heads carry their energy in at most two directions, and the leading direction recurs across sequences. (ii) The state is functionally concentrated, but not in its coordinates: keeping only a handful of randomly chosen modes out of 128 recovers almost none of the output energy, the leading energy direction is bias-like rather than a readout direction, and no coordinate ordering captures the subspace that governs the input–output map. (iii) Unlike the head-level stratification reported for linear attention, heterogeneity in Mamba-2 is across layers, not heads. These findings suggest that compression should be posed as subspace selection: find the low-dimensional subspace that best preserves the input–output map, rather than discarding coordinates by a heuristic score.

We translate this insight into BASS, a post-training state-reduction transform built on balanced state subspaces. BASS estimates empirical controllability and observability Gramians of the state from forward statistics, computes the classical balanced-truncation subspace from their product, and applies it exactly by exploiting Mamba-2's scalar-identity transition: the state shrinks from N to r modes while all other parameters stay untouched (Section 5); Figure 1 summarizes the approach.

Experiments on Mamba2 checkpoints from 130M to 2.7B show that BASS halves the state dimension at an average WikiText-2 perplexity cost of 0.8 points (1.6 for GHOST); HARP lowers the 50% cost to 0.3, widens the lead at 25% retention where coordinate-space selection collapses, and improves LAMBADA over uniform allocation. Random and anti-allocated controls (ranks permuted across layers) confirm that the choice of subspace, not the budget, drives quality (Section 6).

Our contributions are:

• We show that trained Mamba-2 states (130M–1.3B) are almost rank-one in energy, yet the subspace that carries function is not coordinate-aligned, and that heterogeneity is across layers rather than heads; these observations motivate both the subspace transform and per-layer allocation (Section 4).

• We propose BASS, a post-training transform that performs balanced truncation of the recurrent state using full (non-diagonal) controllability and observability Gramians and applies the rotation exactly via Mamba-2's scalar-identity transition, without retraining; to our knowledge, this is the first balanced-truncation method to use full empirical Gramians for the recurrent state of a trained selective SSM (Section 5).

• We propose HARP, a layer-adaptive rank-selection scheme that allocates ranks from the Hankel spectrum and protects retrieval-sensitive layers with a leave-one-out probe; it improves both WikiText-2 perplexity and

LAMBADA accuracy over uniform per-layer budgets (Section 6).

References (37)