# Poster 29980

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/29980

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hi, my name is Seyed Amin and today I'll be presenting our paper titled Mamba Extend the Training -Free Approach to Improve Long Context Extension of Mamba Models.
You know, the transformer-based models struggle with long context in terms of efficiency due to the quality complexity, and that's why the Mamba models were proposed. They are efficient in processing long sequences, but they face issues in terms of preserving the accuracy in the long context. And here we see two plots that show the performance degradation of the pure Mamba model when evaluated on very long context in terms of their perplexity.
an exit explosion. You see that the perpetuity easily increases as you go beyond the pre-training context. And we have identified the source of problem which we believe lies in a delta TV discretization matrix of the Mamba architecture.
If we go back to the SSM architecture, we see that there is a state transition matrix A, from which the A bar T, which is the discretized version, is created. Discretized version is the exponentiation of delta T A.
And if you look at the input-output behavior of the six-layer, we see that the delta t appears. If we consider for a context sense of p, the value of the attention that token number p has to initial token z1, z2, we see that they are proportional to the summation of the delta t over the basically the p, the total p. So as the p increases, the summation of delta t would increase since delta t is positive and a is negative.
A times theta becomes a very big negative number and exponentiation of that goes to zero. That's why the attention of the token number P to the initial tokens basically diminishes as the P increases. And we aim to basically tackle this issue by scaling down the value of delta T, so decreasing the value of the summation of the delta T. And we do that by introducing some scaling factors for the delta T tensor.
And the method is very similar to a position interpolation in the transformer-based models. What we do is that we want to remain training free and we don't want to update the parameters of the model. So we introduce some delta T scaling factors SI.
For each layer we have a scaling factor so for N different layers we have L parameters to optimize L scaling factors between zero and one they are multiplied by Delta T metrics to scale down the summation of Delta T and we aim to improve the long context understanding by using this by optimizing these Delta T scaling factors as eyes.
We don't use truly different basically optimization methods like with optimization methods to find these scaling factors for each of the layers. We do not do uniform scaling. We do basically per layer.
Scaling each layer can have different scaling factors and we find those scaling factors using two life rate method. One of them relies on back propagation. We call that calibration function CFPB back propagation. It uses gradient descent on only the scaling factors. The original weights of the model are frozen to find these scaling factors and multiply the delta t matrix with them.
Improve the lung context understanding. It's very similar to position interpolation and it app gives dynamic version of position interpolation. The other version of our calibration function is zeroth order which doesn't require gradient. It's very cheap, very lightweight and only requires forward passes. We use SPSA gradient free optimization method. It is a little bit less accurate but it has more efficiency.
In terms of experimental results, we are able to improve our baseline which are the original Mamba model, the fine-tuned Mamba model and also the SIMD Mamba which also requires fine-tuning and we see that on a pi data set we are able to basically keep the perplexity down up to 64k which is 32 times the pre-training context length for the basic Mamba extent and in many cases we even improve the baseline accuracy on the
the paper published on the toolkit you also report results on the alarm bench task we report we see that the average accuracy is improved noticeably and also report results on passkey triple passkey triple is a very important task in long context understanding our baselines are mamba extent so the dc mamba and the original mamba
In terms of the efficiency, we see that although we are improving the accuracy, the retrieval score, we are also better in terms of the efficiency and efficiency is reported by looking at the peak memory, the calibration time, and also the normalized parameter count. And we are better in terms of all of the metrics. Thank you.
