Lune

EMNLP2025Top-tier venue

CodeSSM: Towards State Space Models for Code Understanding

Shweta Verma, Abhinav Anand, Mira Mezini

2025Year

Abstract

Although transformers dominate many codespecific tasks, they have significant limitations. This paper explores State Space Models (SSMs) as a promising alternative for code understanding tasks such as retrieval, classification, and clone detection. We introduce CodeSSM, the first SSM-based model trained on code corpora to assess its effectiveness. Our results demonstrate that SSMs are more sampleefficient and can extrapolate to longer contexts beyond the pretraining length. Extensive experiments show that SSMs offer a viable alternative to transformers, addressing several their limitations. Additionally, CodeSSM reduces memory usage by up to 64% compared to transformers at a context length of 2048, with greater savings as context length grows. The code is available here. CodeSSM In this section, we introduce the basic architecture of CodeSSM and its variations that we investigate. We also explain the pretraining setup. Architecture CodeSSM is an encoder-only model consisting of 12 layers 1 . This model is built upon the Bidirec-

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext dee44505-7388-4ff8-beb9-d7f4d607092d

Builds on23

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines