Latent Concept Disentanglement in Transformer-based Language Models

Guan Zhe Hong, Bhavya Vasudeva, Vatsal Sharan, Cyrus Rashtchian, Prabhakar Raghavan +1 more
6/20/2025
cs.LGcs.AIcs.CL

No confident code implementation found for this paper.

Abstract

When large language models (LLMs) use in-context learning (ICL) to solve a new task, they must infer latent concepts from demonstration examples. This raises the question of whether and how transformers represent latent structures as part of their computation. Our work experiments with several controlled tasks, studying this question using mechanistic interpretability. First, we show that in transitive reasoning tasks with a latent, discrete concept, the model successfully identifies the latent concept and does step-by-step concept composition. This builds upon prior work that analyzes single-step reasoning. Then, we consider tasks parameterized by a latent numerical concept. We discover low-dimensional subspaces in the model's representation space, where the geometry cleanly reflects the underlying parameterization. Overall, we show that small and large models can indeed disentangle and utilize latent concepts that they learn in-context from a handful of abbreviated demonstrations.

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. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

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

Cite this paper

@article{hong2025latent,
  title  = {Latent Concept Disentanglement in Transformer-based Language Models},
  author = {Guan Zhe Hong and Bhavya Vasudeva and Vatsal Sharan and Cyrus Rashtchian and Prabhakar Raghavan and Rina Panigrahy},
  year   = {2025},
  eprint = {2506.16975},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.16975v2}
}

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

Discussion