Emergent Structured Representations Support Flexible In-Context Inference in Large Language Models

Ningyu Xu, Qi Zhang, Xipeng Qiu, Xuanjing Huang
2/8/2026
cs.CLcs.AI

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

Abstract

Large language models (LLMs) exhibit emergent behaviors suggestive of human-like reasoning. While recent work has identified structured, human-like conceptual representations within these models, it remains unclear whether they functionally rely on such representations for reasoning. Here we investigate the internal processing of LLMs during in-context concept inference. Our results reveal a conceptual subspace emerging in middle to late layers, whose representational structure persists across contexts. Using causal mediation analyses, we demonstrate that this subspace is not merely an epiphenomenon but is functionally central to model predictions, establishing its causal role in inference. We further identify a layer-wise progression where attention heads in early-to-middle layers integrate contextual cues to construct and refine the subspace, which is subsequently leveraged by later layers to generate predictions. Together, these findings provide evidence that LLMs dynamically construct and use structured, latent representations in context for inference, offering insights into the computational processes underlying flexible adaptation.

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. 7 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{xu2026emergent,
  title  = {Emergent Structured Representations Support Flexible In-Context Inference in Large Language Models},
  author = {Ningyu Xu and Qi Zhang and Xipeng Qiu and Xuanjing Huang},
  year   = {2026},
  eprint = {2602.07794},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.07794v2}
}

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/2602.07794.svg)](https://codeofpaper.com/paper/2602.07794)

Discussion