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.


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

0
下载
关闭预览

相关内容

LLM4SR:关于大规模语言模型在科学研究中的应用综述
专知会员服务
42+阅读 · 2025年1月9日
大规模语言模型中的知识机制:综述与展望
专知会员服务
56+阅读 · 2024年7月26日
大型语言模型的模型压缩与高效推理:综述
专知会员服务
93+阅读 · 2024年2月17日
专知会员服务
123+阅读 · 2020年12月9日
论文笔记之attention mechanism专题1:SA-Net(CVPR 2018)
统计学习与视觉计算组
16+阅读 · 2018年4月5日
自然语言处理(二)机器翻译 篇 (NLP: machine translation)
DeepLearning中文论坛
12+阅读 · 2015年7月1日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
VIP会员
相关VIP内容
LLM4SR:关于大规模语言模型在科学研究中的应用综述
专知会员服务
42+阅读 · 2025年1月9日
大规模语言模型中的知识机制:综述与展望
专知会员服务
56+阅读 · 2024年7月26日
大型语言模型的模型压缩与高效推理:综述
专知会员服务
93+阅读 · 2024年2月17日
专知会员服务
123+阅读 · 2020年12月9日
相关资讯
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员