Program-as-Weights · Research

A programming paradigm
for fuzzy functions

Describe a function. Compile it once.
Reuse a neural program locally.

Some useful functions are hard to express as exact rules: repairing malformed JSON, finding important log messages, or matching a query to its intent. Program-as-Weights (PAW) turns descriptions like these into small neural programs that run locally.

Long-term vision

Yuntian Deng · Essay on X

From AI as Problem Solver to AI as Tool Builder

When a task repeats, we should be able to build a tool once and reuse it. Yuntian Deng’s essay proposes pretraining models to generate small neural programs for computers, phones, and robots. People could create and update these programs in natural language, then run them locally.

This is the long-term goal behind PAW.

Read the full essay on X ↗

The original PAW paper

First arXiv submission

Program-as-Weights: A Programming Paradigm for Fuzzy Functions

Wentao Zhang, Liliana Hotsko, Woojeong Kim, Pengyu Nie, Stuart Shieber, Yuntian Deng

Wentao Zhang, Liliana Hotsko, and Woojeong Kim contributed equally.

What PAW introduces

FuzzyBench results

July 2026

On FuzzyBench, PAW with a Qwen3-0.6B interpreter achieves 73.78% exact match, compared with 68.70% for direct Qwen3-32B prompting.

The paper also tests noisy specifications, quantization, and execution on a MacBook M3. Read the results and limitations.

Compile by Training

First arXiv submission

EMNLP 2026 System Demonstrations

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

Yuntian Deng, Pengyu Nie, Stuart Shieber

Compile by Training uses teacher models to generate examples from a function description. It initializes a program with the fast compiler, then trains it on those examples. The saved program uses the same PAW runtime and runs locally without further teacher calls.

Trading compilation time for accuracy

On FuzzyBench-Hard, Compile by Training improves LLM-judged semantic accuracy (LEM) from 22.4% to 83.6%. FuzzyBench-Hard contains specifications where the fast compiler produced no exact matches; LEM also credits correct outputs whose wording differs from the reference. A cold compile of one specification takes 50.9 seconds on a B300, compared with 3.5 seconds for the fast compiler.

Compiled functions power a website helper, a 3D avatar controlled through language, and an English–Claudish translator.

Papers and software

Cite the research

Program-as-Weights

Wentao Zhang, Liliana Hotsko, Woojeong Kim, Pengyu Nie, Stuart Shieber, Yuntian Deng. Program-as-Weights: A Programming Paradigm for Fuzzy Functions. arXiv:2607.02512, 2026.

@misc{paw_2607_02512,
  title = { {Program-as-Weights: A Programming Paradigm for Fuzzy Functions} },
  author = {Zhang, Wentao and Hotsko, Liliana and Kim, Woojeong and Nie, Pengyu and Shieber, Stuart and Deng, Yuntian},
  year = {2026},
  note = {arXiv preprint},
  eprint = {2607.02512},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.02512}
}

Compile by Training

Yuntian Deng, Pengyu Nie, Stuart Shieber. Compile by Training: Turning Natural-Language Specifications into Local Neural Functions. arXiv:2609.04199, 2026.

@misc{paw_2609_04199,
  title = { {Compile by Training: Turning Natural-Language Specifications into Local Neural Functions} },
  author = {Deng, Yuntian and Nie, Pengyu and Shieber, Stuart},
  year = {2026},
  note = {arXiv preprint},
  eprint = {2609.04199},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.04199}
}