Abstract
While State Space Models (SSMs) like Mamba have emerged as efficient, linear-time alternatives to Transformers, adapting them to downstream tasks remains a challenge. Traditional parameter-efficient fine-tuning (PEFT) methods, such as Prompt Tuning, often fail in SSMs due to the inherent "forgetting" property of recurrent architectures. We present State-offset Tuning, a novel PEFT approach that injects a trainable offset directly into the model's hidden state at every timestep. This method ensures a persistent tuning signal throughout long sequences, outperforming LoRA in accuracy while significantly reducing memory usage and computational overhead.
Introduction
Transformers have dominated natural language processing, but their quadratic computational complexity poses significant scaling challenges for long-sequence tasks. State Space Models (SSMs), particularly the Mamba architecture, offer a promising alternative by achieving linear scaling. However, the best practices for fine-tuning these models efficiently are still being established.
In Transformer-based models, "Prompt Tuning" or "Prefix Tuning"—where virtual trainable tokens are prepended to the input—is a standard PEFT strategy. However, these methods are notably less effective for SSMs. Because SSMs are fundamentally recurrent, they possess a decay mechanism that causes the influence of early tokens to diminish exponentially as the sequence progresses. By the time the model processes the end of a long sequence, the instruction signal from a prefix is often lost.
Methodology: State-offset Tuning
To overcome the limitations of prompt-based methods, we propose shifting the tuning mechanism from the input space to the state space. Instead of adding tokens at the beginning of a sequence, State-offset Tuning introduces a trainable constant vector that is applied at every timestep $t$.
We introduce two primary variants of this method:
- State-offset Tuning ($h$): A trainable offset vector $h'$ is added to the model's latent state $h_t$ before the output projection. This ensures the tuning signal is refreshed at every step of the recurrence.
- State-offset Tuning ($y$): A more lightweight version where the offset $y'$ is added directly to the output features. This variant further minimizes the number of trainable parameters.
By applying the offset uniformly across all timesteps, the method bypasses the "forgetting" problem. Mathematically, this approach is equivalent to a hypothetical "Iterative Suffix-Tuning," where a virtual tuning token is effectively shifted to the "last" position at every step of the computation.
Experimental Setup
We evaluated State-offset Tuning across a diverse range of benchmarks and Mamba model sizes (from 130M to 2.8B parameters), including the Mamba-2 architecture. The benchmarks included:
- Spider: Complex text-to-SQL generation.
- SAMSum: Dialogue summarization.
- DART: Structured data-to-text generation.
- GLUE: Natural Language Understanding (NLU) tasks, including sentiment analysis and linguistic acceptability.
Key Results and Discussion
Performance and Efficiency
State-offset Tuning consistently outperformed existing PEFT methods. On the Spider dataset using Mamba 1.4B, the ($h$) variant achieved an execution accuracy of 57.4%, surpassing LoRA (56.3%) and significantly outperforming Prompt Tuning (43.6%).
The ($y$) variant demonstrated extreme parameter efficiency, utilizing as little as 0.01% of the model's total parameters. Despite this minimal footprint, it outperformed Initial State Tuning, which requires 23 times more parameters.
Computational Advantages
Unlike LoRA, which introduces additional matrix multiplications during the forward pass, State-offset Tuning relies on simple vector addition. This results in negligible computational overhead:
- Inference Speed: The method adds less than 0.03% FLOP overhead during inference. In comparison, unmerged LoRA layers can increase computational overhead by over 30x.
- Memory Footprint: During training, State-offset Tuning reduced VRAM consumption by 15-20% compared to LoRA. This efficiency allows researchers to utilize larger batch sizes or process longer sequences on standard hardware.
Conclusion
State-offset Tuning provides a robust and efficient framework for adapting State Space Models. By addressing the recurrent decay of information through constant state-based offsets, it achieves superior performance to LoRA with a fraction of the computational cost. While currently validated on text-based SSMs, future work will explore the application of state-based offsets to other domains such as computer vision and speech processing, as well as its scalability in Mixture of Experts (MoE) architectures.
Summary updated