vix.ing · top · new · best · stats

Differential syntactic and semantic encoding in LLMs

2026/01/08 by Santiago Acevedo, Alessandro Laio, Marco Baroni · 2 voices
Computer Science · Physics and Astronomy · Social Sciences · #Computational and Text Analysis Methods #Differential coding #Encoding (memory) #Generative Adversarial Networks and Image Synthesis #Semantics (computer science) #Sentence #Similarity (geometry) #Syntactic structure #Syntax #Topic Modeling #cs.AI #cs.CL #cs.LG #physics.comp-ph

paper · pdf · open access · doi:10.48550/arxiv.2601.04765

published in arXiv (Cornell University) (Cornell University)

openalex publication_date 2026/01/08 · arxiv published 2026/01/08 · openalex created_date 2026/01/10 · arxiv updated 2026/05/28 · openalex updated_date 2026/07/28

Abstract

We study how syntactic and semantic information is encoded in inner layer representations of Large Language Models (LLMs), focusing on the very large DeepSeek-V3. We find that, by averaging hidden-representation vectors of sentences sharing syntactic structure or meaning, we obtain vectors that capture a significant proportion of the syntactic and semantic information contained in the representations. In particular, subtracting these syntactic and semantic ``centroids'' from sentence vectors strongly affects their similarity with syntactically and semantically matched sentences, respectively, suggesting that syntax and semantics are, at least partially, linearly encoded. We also find that the cross-layer encoding profiles of syntax and semantics are different, and that the two signals can to some extent be decoupled, suggesting differential encoding of these two types of linguistic information in LLM representations.

Citations

Discussions

Related