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.


翻译:本研究探讨了句法信息与语义信息在大语言模型内部层表示中的编码方式,重点关注超大规模模型DeepSeek-V3。我们发现,通过对具有相同句法结构或语义的句子的隐藏表示向量进行平均,可以获得捕获表示中所含句法与语义信息显著部分的向量。具体而言,从句子向量中减去这些句法与语义“质心”会分别强烈影响其与句法匹配及语义匹配句子的相似度,这表明句法与语义至少是部分线性编码的。我们还发现,句法与语义的跨层编码模式存在差异,且这两种信号在某种程度上可以解耦,这提示大语言模型表示中对这两类语言信息存在差异化编码。

0
下载
关闭预览

相关内容

稀疏自编码器综述:解释大语言模型的内部机制
专知会员服务
17+阅读 · 2025年12月27日
大语言模型与小语言模型协同机制综述
专知会员服务
38+阅读 · 2025年5月15日
大型语言模型(LLMs),附Slides与视频
专知会员服务
70+阅读 · 2024年6月30日
主流大语言模型的技术原理细节
专知会员服务
167+阅读 · 2023年9月16日
【深度语义匹配模型】原理篇二:交互篇
AINLP
16+阅读 · 2020年5月18日
别说还不懂依存句法分析
人工智能头条
23+阅读 · 2019年4月8日
学会原创 | 自然语言的语义表示学习方法与应用
中国人工智能学会
11+阅读 · 2019年3月7日
NLP预训练模型大集合!
机器之心
21+阅读 · 2018年12月28日
语料库构建——自然语言理解的基础
计算机研究与发展
11+阅读 · 2017年8月21日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Arxiv
0+阅读 · 1月2日
VIP会员
相关资讯
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员