Understanding In-Context Learning Beyond Transformers: An Investigation of State Space and Hybrid Architectures

Shenran Wang, Timothy Tin-Long Tse, Jian Zhu
10/27/2025
cs.CLcs.AI

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

We perform in-depth evaluations of in-context learning (ICL) on state-of-the-art transformer, state-space, and hybrid large language models over two categories of knowledge-based ICL tasks. Using a combination of behavioral probing and intervention-based methods, we have discovered that, while LLMs of different architectures can behave similarly in task performance, their internals could remain different. We discover that function vectors (FVs) responsible for ICL are primarily located in the self-attention and Mamba layers, and speculate that Mamba2 uses a different mechanism from FVs to perform ICL. FVs are more important for ICL involving parametric knowledge retrieval, but not for contextual knowledge understanding. Our work contributes to a more nuanced understanding across architectures and task types. Methodologically, our approach also highlights the importance of combining both behavioural and mechanistic analyses to investigate LLM capabilities.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2025understanding,
  title  = {Understanding In-Context Learning Beyond Transformers: An Investigation of State Space and Hybrid Architectures},
  author = {Shenran Wang and Timothy Tin-Long Tse and Jian Zhu},
  year   = {2025},
  eprint = {2510.23006},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.23006v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.23006.svg)](https://codeofpaper.com/paper/2510.23006)

Discussion