AIAny
Icon for item

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

Converts a natural-language function specification into a reusable local neural function by using teacher models to synthesize examples and finetuning a small adapter for a compact interpreter. Achieves higher semantic accuracy (83.6% on FuzzyBench-Hard) at the cost of roughly one minute compile time; produces versionable PAW artifacts for local deployment.

Introduction

Many recurring text-processing tasks are easy to describe but costly to solve by calling a large remote model for every input. The core insight of this work is to "compile" a natural-language specification into a small, reusable neural artifact: at compile time, high-capacity teacher models synthesize task-specific I/O examples, and those examples are used to finetune a compact LoRA-style adapter that specializes a frozen local interpreter. The result is a callable local function that runs without the teachers and can be stored, versioned, and composed like ordinary software.

Key Findings
  • High-accuracy localization: On a hard subset of FuzzyBench where the prior fast PAW compiler produced no exact matches, Compile by Training reaches 83.6% semantic accuracy, improving correctness for many fuzzy text functions.
  • Compile-time tradeoff: The approach raises accuracy by paying a higher compile-time cost—about a minute of finetuning per compile versus seconds for the fast compiler—while keeping per-call latency and dependency minimal because inference runs locally.
  • Modular separation of roles: The pipeline separates synthesis (teacher LLMs) from execution (small frozen interpreter + adapter), enabling small deployable artifacts (PAW programs) that can be versioned and composed in production workflows.
  • Practical demos: The authors demonstrate the approach in several deployed scenarios (multi-site website helper, language-directed 3D avatar, and a bidirectional English–Claudish translator), illustrating end-to-end usability beyond benchmarks.
Who it's for & tradeoffs

Great fit if you need repeatable, offline execution of fuzzy text functions with better-than-prompting accuracy and you can accept a non-negligible one-time compile cost. It is attractive for teams wanting to eliminate per-request remote LLM calls for latency, cost, or privacy reasons while keeping a compact local runtime.

Look elsewhere if you require strict formal guarantees or fully deterministic rule-based behavior, need zero compile latency, or cannot tolerate errors introduced by synthesized supervision: because the adapter is trained on teacher-generated examples, teacher mistakes can propagate unless validated. The method improves practical correctness but requires validation, testing, and governance when used in safety-sensitive pipelines.

Where it fits

This method sits between two extremes: lightweight prompt-based local inference (very low compile cost but limited accuracy) and always-calling large remote LLMs (high per-call cost and dependency). Compile by Training trades extra one-time compile cost to produce small, high-accuracy, versionable neural functions that run locally.

Information

  • Websitearxiv.org
  • OrganizationsUniversity of Waterloo, Harvard University
  • AuthorsYuntian Deng, Pengyu Nie, Stuart Shieber
  • Published date2026/09/03

More Items

Reuses Transformer weights across depth and neighboring tokens to improve language-model compute efficiency. It combines within-token iteration with cross-token state feedback, outperforming standard and looped baselines in matched-compute tests.

Evaluates whether language and generative models can handle the full game-development pipeline, from white-box construction and asset creation to playtesting and refinement. Across 60 tasks and four engines, strong standalone assets often fail to translate into playable integrated games.

Improves 4D video question answering by expressing object motion in the reference coordinate system required by each question. Experiments find that question-aligned relative trajectories work better than supplying world-coordinate trajectories.