按年被提到
20232023 · 6 次2026
软件工程与 AI 编程›代码生成与程序合成·arXiv:2305.11169 · cs.LG

Emergent Representations of Program Semantics in Language Models Trained on Programs

在程序上训练的语言模型中涌现的程序语义表示
Charles Jin, Martin Rinard · 2023

探针实验显示代码语言模型仅靠预测下一词就学到程序语义

开始阅读 ↗PDFalphaXiv 讨论
被提及 · 5 人首次 2023-05-19 · 最近 2026-11-03
5不同的人
5活跃月份
9讨论串
18被引(OpenAlex)

论文给出证据:仅以下一词预测训练的代码语言模型,也能学会表示程序的形式语义。作者在一种控制二维网格世界导航的领域特定语言的合成程序语料上训练 Transformer,每个程序前附有若干输入输出网格状态作为(部分)规范。探针分类器能从隐藏状态中提取出越来越准确的、未被观察到的中间网格状态,表明模型涌现出形式意义上解释程序的能力;作者还设计了干预式基线来区分表示究竟来自语言模型还是探针本身。

HN 为什么提它

在争论语言模型是否只是统计鹦鹉时,评论者把它当作 LM 内部形成程序语义或世界模型表示的证据。

实证研究难度 4 / 5约 45 分钟经得起时间
读之前最好知道
1Transformer 与下一词预测训练
2探针分类器(probing)
3程序语义(形式语义)
4可解释性基础(interpretability)

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
引用og_kalu · 2023-05

“A world model is so obvious papers like these are more confirmation than surprise”

称世界模型显而易见,这类论文更多是印证而非惊喜
Just Calm Down About GPT-4 Already原评论 ↗
引用og_kalu · 2023-05

“3 of them don't even have anything to do with a existing dataset testing. so yeah, actual.”

指出其中 3 项甚至与现有数据集测试无关,所以是真实的
Governance of Superintelligence原评论 ↗
引用og_kalu · 2023-06

“Another wrong statement, you're on a roll today.”

反驳对方又一处错误,引用它说明在程序上训练的模型内部编码了程序语义
The bigger-is-better approach to AI is running out of road原评论 ↗
引用famouswaffles · 2024-08

“Case in point:”

引用它作为例证:在程序上训练的模型能学到语义
Markov chains are funnier than LLMs原评论 ↗
引用altruios · 2026-08

“We have other studies indicating that there appear to be internal representations of concepts: Emergent Representations of Program Semantics in Language Models Trained on Programs”

引用它作为其他研究之一:模型内部似乎有概念的内部表示
If your agent commits a crime, who is responsible?原评论 ↗
引用nl · 2026-11

“LLMs build models of the world[2].”

拿它说明 LLM 会建立世界模型
Astra can read and write weights to improve Qwen原评论 ↗
被提交为 story · 3 次