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

Yuntian Deng, Pengyu Nie, Stuart Shieber

arXiv:2609.04199 · 2026-09-04 공개 · arXiv · PDF

code-generation adapter-models interpreter compile-by-training natural-language-specifications neural-functions fuzzybench-hard semantic-accuracy

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-Hard, a subset on which the Program-as-Weights fast compiler produced no exact matches, compile by training reaches 83.6% semantic accuracy. This higher accuracy comes with a higher compile-time cost: roughly a minute rather than seconds for the fast compiler. We deploy the compiler in a public interactive service and demonstrate compiled functions in a multi-site website helper, a language-controlled 3D avatar, and a bidirectional English-Claudish translator.

한국어 요약

한 줄 요약

자연어 명세를 기반으로 로컬 신경망 함수를 생성하는 "Compile by Training" 방법을 제안한다.

핵심 기여도

핵심 아이디어

기존 PAW는 빠른 컴파일(1초 내외)을 위해 단일 순방향 패스로 LoRA 어댑터를 생성하지만, 정확도가 낮은 경우가 많았다. 본 연구는 이와 대비되는 "Compile by Training" 접근법을 제안한다. 자연어 명세를 입력으로 받아, 교사 모델이 예제를 생성하고, 이 예제를 기반으로 LoRA 어댑터를 학습하여 인터프리터를 특수화한다. 이 방식은 PAW의 빠른 컴파일과는 달리, 학습 과정을 통해 정확도를 향상시키는 대신, 약 1분의 컴파일 시간이 소요된다. 핵심 통찰은 "신경망 함수를 소프트웨어처럼 컴파일하고 조합할 수 있다"는 점이다.

기술적 접근법

주요 결과

의의 및 한계

실용적 활용