Differential syntactic and semantic encoding in LLMs

arXiv:2601.04765v33 citationsh-index: 3
Originality Incremental advance
AI Analysis

This work addresses the problem of understanding linguistic representation in LLMs for researchers in NLP and AI, providing incremental insights into encoding mechanisms.

The study investigated how syntactic and semantic information are encoded in the inner layers of the DeepSeek-V3 LLM, finding that averaging hidden representations into centroids captures significant proportions of this information, with subtraction affecting similarity scores and revealing differential encoding profiles.

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.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes