跳转至

文章背景与核心概要

许多重复出现的文本处理功能用自然语言很容易描述,但要用传统的僵化规则来实现却十分困难。然而,如果对每一个单独的输入都依赖大型远程模型,就会带来重复的成本、延迟以及对外部服务商的不必要依赖。

为了解决这一问题,作者们引入了“通过训练编译”(compile by training)方法——这是一种将自然语言规范转化为可重用的本地神经函数的创新技术。在编译时,教师模型生成特定任务的示例,用于训练紧凑型解释器的小型适配器;在运行时,生成的函数完全独立于教师模型运行,能够像普通软件一样进行存储、版本控制和组合。实验表明,在 FuzzyBench-Hard(传统“权重即程序”快速编译器无法产生任何精确匹配的高难子集)上,通过训练编译实现了 83.6% 的语义准确率,代价是编译时间从几秒钟略微增加到约一分钟。


Compile by Training: Turning Natural-Language Specifications into Local Neural Functions

Authors: Yuntian Deng, Pengyu Nie, Stuart Shieber
Submitted: 3 September 2026
Subjects: Computation and Language (cs.CL); Artificial Intelligence (cs.AI); Machine Learning (cs.LG)
Cite as: arXiv:2609.04199 [cs.CL]
Conference: EMNLP 2026 System Demonstrations (Interactive Demo)

通过训练编译:将自然语言规范转化为本地神经函数

作者: Yuntian Deng, Pengyu Nie, Stuart Shieber
提交时间: 2026年9月3日
研究领域: 计算与语言 (cs.CL); 人工智能 (cs.AI); 机器学习 (cs.LG)
引用格式: arXiv:2609.04199 [cs.CL]
会议: EMNLP 2026 系统演示 (交互式演示)


Abstract Summary

Many recurring text functions are easy to describe in natural language but difficult to implement using rigid rules. However, relying on a large remote model for every individual input introduces repeated costs, latency, and an unwanted dependency on an external provider.

To address this, the authors introduce compile by training—a method that transforms a natural-language specification into a reusable, local neural function: * Compile Time: Teacher models generate task-specific examples used to train a small adapter for a compact interpreter. * Run Time: The resulting function operates entirely independently of the teacher models. It can be stored, versioned, and composed just like ordinary software. * Performance: On FuzzyBench-Hard (a challenging subset where a traditional "Program-as-Weights" fast compiler produced zero exact matches), compile by training achieves 83.6% semantic accuracy. * Trade-off: This high accuracy requires a slightly higher compile-time cost of roughly one minute, compared to a few seconds for fast compilers.

摘要概要

许多重复出现的文本功能用自然语言很容易描述,但要用僵化的规则来实现却十分困难。然而,如果对每一个单独的输入都依赖大型远程模型,就会带来重复的成本、延迟以及对外部服务商的不必要依赖。

为了解决这一问题,作者们引入了通过训练编译(compile by training)——这是一种将自然语言规范转化为可重用的本地神经函数的方法: * 编译时: 教师模型生成特定任务的示例,用于训练紧凑型解释器的小型适配器。 * 运行时: 生成的函数完全独立于教师模型运行。它可以像普通软件一样进行存储、版本控制和组合。 * 性能:FuzzyBench-Hard(传统“权重即程序”快速编译器无法产生任何精确匹配的高难子集)上,通过训练编译实现了 83.6% 的语义准确率。 * 权衡: 这种高准确率需要付出稍高的编译成本(大约一分钟),而快速编译器通常只需几秒钟。


Practical Applications & Demos

The authors deploy this compiler in a public interactive service and demonstrate its utility across several use cases: * A multi-site website helper * A language-controlled 3D avatar * A bidirectional English-Claudish translator

实际应用与演示

作者将该编译器部署在一个公开的交互式服务中,并展示了其在多个用例中的实用性: * 多站点网站助手 * 语言控制的 3D 虚拟形象 * 双向英语-克劳德语(English-Claudish)翻译器


链接与资源