arXiv:2601.04765cs.CLcs.AI2026-01被引 7

发现大模型中句法与语义信息以不同方式线性编码。

Differential syntactic and semantic encoding in LLMs

  • 通过句法或语义相似句子的向量平均,提取出中心向量。
  • 减去这些中心向量后,句法/语义相似度显著下降。
  • 句法与语义在层间编码模式不同,可部分解耦。

我们研究了大型语言模型(LLMs)内部层表示中句法和语义信息的编码方式,重点关注超大规模模型 DeepSeek-V3。通过平均具有相同句法结构或语义的句子的隐藏表示向量,我们得到了能捕获大量句法和语义信息的中心向量。特别地,从句子向量中减去这些句法或语义中心向量后,其与句法或语义匹配句子的相似度显著降低,表明句法和语义至少部分以线性方式编码。此外,句法和语义在跨层中的编码模式不同,二者可在一定程度上分离,暗示了它们在大模型表示中存在差异化的编码机制。

原文摘要 · Abstract (English)

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.

语言模型句法编码语义编码

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。