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

Yuntian Deng, Pengyu Nie, Stuart Shieber


Abstract
Many recurring text functions are easy to describe but difficult to implement with rules, while calling a large remote model for every input introduces repeated cost, latency, and dependency on a provider. We present compile by training, which turns a natural-language specification into a reusable neural function. At compile time, teacher models generate task-specific examples that are used to train a small adapter for a compact interpreter. The resulting function runs without the teachers and can be stored, versioned, and composed like ordinary software. On FuzzyBench-Focus, compile by training reaches 83.6% accuracy, compared with 22.4% for the previous Program-as-Weights compiler, which predicts function weights in a single forward pass. A representative cold compile takes 50.9 seconds on a B300 GPU. We deploy the compiler in a public interactive service and demonstrate compiled functions in a multi-site website helper and a language-controlled 3D avatar.
Anthology ID:
2026.emnlp-demos.78
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: System Demonstrations
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Sweta Agrawal, Alberto Abad
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
830–839
Language:
URL:
https://aclanthology.org/2026.emnlp-demos.78/
DOI:
Bibkey:
Cite (ACL):
Yuntian Deng, Pengyu Nie, and Stuart Shieber. 2026. Compile by Training: Turning Natural-Language Specifications into Local Neural Functions. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 830–839, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Compile by Training: Turning Natural-Language Specifications into Local Neural Functions (Deng et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-demos.78.pdf