“And, the most closest work to what author probably wants, a way to write a program in forth while leaving some functions as neural blackboxes to be learned from examples:”
Programming with a Differentiable Forth Interpreter
端到端可微的 Forth 解释器,程序草图的空位由数据训练
针对训练数据稀缺、需要引入先验知识的问题,论文提出一个端到端可微的 Forth 语言解释器,程序员可以写带空位的程序草图,空位处的行为由输入输出数据训练,并可用梯度下降直接优化。实验表明它能有效利用不同程度的程序结构先验,学会序列排序和加法等复杂行为;与 LSTM 连接并联合训练后,在用自然语言故事表达的数量推理上达到了当时最好的准确率。
评论者把它当作最接近「写一段 Forth 程序,把部分函数留作可由样例学习的神经黑盒」这一想法的工作,也拿它作可微编程系统的例子。
学习路径
读这篇之前,按顺序读书架上的 6 篇 · 参考文献来自 OpenAlex,顺序和要点由 Claude Code 排出这条路径帮我建立神经程序归纳的背景:seq2seq 与算法学习任务、带外部记忆的网络,再到 NPI,然后读 ∂4 如何把程序草图与可微解释器结合。
- 1
seq2seq 是后续一系列学习算法模型的基础范式,∂4 的实验里也以它为对照。
读抓编码器-解码器框架与其在长序列上的局限。
- 2
- 3
- 4
给循环网络加可微栈,是用结构化记忆注入归纳偏置的另一例。
读抓可微栈的 push / pop 连续化,以及计数类任务的结果。
- 5
- 6
NPI 学习调用子程序,展示神经方法对程序结构的建模;∂4 则允许用程序草图来写入先验。
读抓核心网络加程序记忆的结构,并对比它的强监督需求与 ∂4 只用输入输出样例的不同。
- 7Programming with a Differentiable Forth Interpreter
目标论文:端到端可微的 Forth 解释器,程序员写草图、数据填空位。
读重点读可微 Forth 抽象机的设计(数据栈、返回栈、缓冲区)、草图的槽位写法,以及排序、加法实验。
HN 书评
推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及“So it's just a char-RNN? I was hoping this was using one of the seq2seq frameworks for actually writing code, like Programming with a Differentiable Forth Interpreter”
“but both are on my to-read pile.”
“An example of a differentiable programming system is in Programming with a Differentiable Forth Interpreter”
- Programming with a Differentiable Forth Interpreter ↗sapphireblue · 2016-05-24 · 97 分
- Programming with a Differentiable Forth Interpreter (2016) ↗ghosthamlet · 2018-01-07 · 104 分