{
  "metadata": {
    "language": "zh-CN",
    "updated_at": "2026-11-11",
    "version": "1.2.0",
    "record_count": 13,
    "canonical_url": "https://programasweights.com/zh/research/",
    "english_url": "https://programasweights.com/research/"
  },
  "content": {
    "title": "用自然语言定义函数，把程序编译成权重",
    "seo_title": "Program-as-Weights：从自然语言描述生成可复用的本地神经程序",
    "description": "Program-as-Weights（PAW）提出模糊函数编程：将函数描述编译成包含 LoRA 权重的神经程序，再由小模型在本地执行。了解编译器、解释器、程序保存与复用，以及相关论文。",
    "eyebrow": "Program-as-Weights · 研究",
    "lead": "编译一次，保存程序，在本地反复调用。",
    "intro": [
      "修复格式错误的 JSON、筛选需要处理的日志、根据用户意图匹配页面——这些函数容易用语言说清楚，却难以写成一套完整的规则。Program-as-Weights（PAW）提出模糊函数编程，把函数说明编译成可保存、可加载、可重复调用的神经程序。",
      "PAW 让大模型承担构建工具的工作。编译器读取函数说明，生成供小模型执行的程序；共享的神经解释器加载程序，处理每一次新输入。函数的行为由文本伪程序和生成的参数共同表达。"
    ],
    "example": {
      "title": "例如，定义一个判断消息是否紧急的函数",
      "intro": "PAW 论文图 1 用下面的消息分类说明编译与执行的分工。",
      "specification": "classify if this is urgent",
      "input": "Need your signature by EOD!",
      "output": "urgent",
      "explanation": "先把“判断消息是否紧急”编译成一个程序并保存。之后每收到一条消息，就把它交给加载了该程序的小模型。下一条消息继续使用同一个函数。",
      "source_url": "https://arxiv.org/html/2607.02512v1#S1"
    },
    "mechanism": {
      "title": "从函数描述到可执行的权重",
      "intro": "PAW 把函数的定义和调用分开。编译器生成程序，解释器执行程序。",
      "steps": [
        {
          "title": "写下函数说明",
          "text": "用自然语言说明输入、输出和判断规则。函数说明也支持输入输出示例。"
        },
        {
          "title": "编译并保存程序",
          "text": "PAW 先整理出文本伪程序，再用经过训练的 LoRA 编译器生成适配器权重。其中，LoRA 权重由一次前向传播产生。文本与权重一起构成可保存的神经程序。"
        },
        {
          "title": "加载后在本地执行",
          "text": "冻结的小语言模型充当共享解释器。它加载对应程序，接收新输入并返回结果。不同函数保存各自的程序，复用同一个解释器。"
        }
      ]
    },
    "stages": {
      "title": "训练、编译、执行，各自做什么？",
      "items": [
        {
          "title": "训练：学会构建函数",
          "text": "PAW 使用函数说明、输入和输出样本训练编译器，让它学会从说明生成程序。FuzzyBench 提供一千万条样本，覆盖分类、解析、格式转换、模糊匹配等任务。"
        },
        {
          "title": "编译：为一个函数生成程序",
          "text": "训练好的 PAW 编译器根据新函数的描述，一次前向传播生成 LoRA 权重，无需为这个新函数再做梯度训练。编译结果可以保存、缓存和版本管理，随后交给配套的解释器运行。"
        },
        {
          "title": "执行：把函数用于新输入",
          "text": "每次函数调用都由本地解释器完成。程序和解释器下载到设备后，执行过程不再调用远程大模型。"
        }
      ]
    },
    "contributions": [
      {
        "title": "模糊函数编程",
        "text": "把难以穷举规则的行为写成函数说明，编译为神经程序，再从普通代码中调用。"
      },
      {
        "title": "编译器与解释器接口",
        "text": "程序包含文本伪程序和参数高效模块。PAW 实现并比较了前缀向量与 LoRA 适配器两种程序表示。"
      },
      {
        "title": "评测与本地运行",
        "text": "PAW 发布 FuzzyBench，并提供 Python、JavaScript 和浏览器运行路径，让编译后的程序进入实际软件。"
      }
    ],
    "vision": {
      "title": "让 AI 构建工具",
      "text": "Yuntian Deng 在 2026 年 6 月 5 日的文章 From AI as Problem Solver to AI as Tool Builder 中提出，让预训练模型生成小型神经程序。人们用自然语言创建和更新这些工具，再把它们放到电脑、手机或机器人上运行。PAW 把这个方向落实为函数、程序、编译器和解释器。",
      "date": "2026-06-05",
      "paper_id": "2607.02512",
      "url": "/research/ai-as-tool-builder/"
    },
    "original_paper": {
      "title": "PAW 原始论文",
      "paper_id": "2607.02512",
      "first_public": "2026-07-02",
      "venue": "NeurIPS 2026",
      "equal_contribution": "第一作者为 Wentao Zhang；他与 Liliana Hotsko、Woojeong Kim 贡献相同。"
    },
    "compile_by_training": {
      "title": "Compile by Training：在编译时训练程序",
      "text": "Compile by Training 延续 PAW 的程序格式和本地解释器。教师模型根据函数说明生成训练样本，PAW 的快速编译器提供初始程序，再用这些样本训练该函数的 LoRA 适配器。训练完成后保存程序，本地执行不再调用教师模型。",
      "paper_id": "2609.04199",
      "first_public": "2026-09-03",
      "venue": "EMNLP 2026 System Demonstrations",
      "distinction": "PAW 的快速编译器直接预测新函数的权重；Compile by Training 在编译阶段加入针对这个函数的适配器训练。两者都把构建函数的工作放在调用之前，并复用保存的程序。"
    },
    "citations": {
      "title": "引用论文",
      "intro": "PAW 的编程范式、编译器与解释器接口、本地神经程序见原始 PAW 论文。在编译阶段生成样本并训练适配器的方法见 Compile by Training。"
    }
  },
  "papers": [
    {
      "id": "2607.02512",
      "title": "Program-as-Weights: A Programming Paradigm for Fuzzy Functions",
      "authors": "Wentao Zhang, Liliana Hotsko, Woojeong Kim, Pengyu Nie, Stuart Shieber, Yuntian Deng",
      "first_public": "2026-07-02",
      "first_public_source": "https://arxiv.org/abs/2607.02512",
      "arxiv_first_submission": "2026-07-02",
      "date_label": "arXiv v1",
      "arxiv": "2607.02512",
      "paper_url": "https://arxiv.org/abs/2607.02512",
      "venue": "NeurIPS 2026 (accepted)",
      "lens": [
        "neural-programs",
        "generated-adapters"
      ],
      "related_terms": [
        "Program-as-Weights",
        "ProgramAsWeights",
        "PAW",
        "fuzzy-function programming",
        "neural compiler",
        "neural interpreter",
        "FuzzyBench"
      ],
      "summary": "Proposes fuzzy-function programming: compile a natural-language function specification into a neural program, then reuse it locally.",
      "contribution": "Develops the compiler–interpreter abstraction and programs that combine text with learned parameters. Introduces the 10M-example FuzzyBench dataset, local execution interfaces, and image-conditioned compilation. Prefix tuning and LoRA are two implementations.",
      "limitations": "Each compiler produces programs for a specific interpreter. Compiled parameters are opaque, and FuzzyBench uses synthetic data.",
      "program_form": "A discrete pseudo-program and a compiler-generated parameter-efficient module.",
      "conditioning": "A function specification, optionally with examples. The image extension also accepts visual information.",
      "execution": "A frozen lightweight interpreter loads the program and runs new inputs locally.",
      "relationship": "Compile by Training builds on this programming abstraction. It keeps the same interface and refines the fast compiler’s prediction using synthesized examples.",
      "relationship_source": "https://arxiv.org/html/2609.04199v1#S1",
      "project_url": "https://programasweights.com/",
      "code_url": "https://github.com/programasweights",
      "equal_contribution": [
        "Wentao Zhang",
        "Liliana Hotsko",
        "Woojeong Kim"
      ],
      "venue_source": "https://arxiv.org/abs/2607.02512",
      "provenance": "July 2026 arXiv paper; NeurIPS 2026.",
      "author_names": [
        "Wentao Zhang",
        "Liliana Hotsko",
        "Woojeong Kim",
        "Pengyu Nie",
        "Stuart Shieber",
        "Yuntian Deng"
      ],
      "record_url": "https://programasweights.com/reading-list/papers/2607.02512/",
      "legacy_record_url": "https://programasweights.com/reading-list/papers/#paper-2607-02512",
      "citation_date": "2026",
      "json_url": "https://programasweights.com/reading-list/papers/2607.02512/record.json",
      "markdown_url": "https://programasweights.com/reading-list/papers/2607.02512/index.md",
      "bibtex_url": "https://programasweights.com/reading-list/papers/2607.02512/citation.bib",
      "csl_url": "https://programasweights.com/reading-list/papers/2607.02512/citation.csl.json",
      "publication": {
        "title": "Program-as-Weights: A Programming Paradigm for Fuzzy Functions",
        "author_names": [
          "Wentao Zhang",
          "Liliana Hotsko",
          "Woojeong Kim",
          "Pengyu Nie",
          "Stuart Shieber",
          "Yuntian Deng"
        ],
        "year": 2026,
        "type": "paper-conference",
        "container_title": "The Fortieth Annual Conference on Neural Information Processing Systems",
        "url": "https://arxiv.org/abs/2607.02512",
        "source_url": "https://arxiv.org/abs/2607.02512",
        "verified_at": "2026-10-24",
        "preferred_citation": true,
        "citation_key": "zhang2026programasweights"
      },
      "publication_bibtex_url": "https://programasweights.com/reading-list/papers/2607.02512/publication.bib",
      "publication_csl_url": "https://programasweights.com/reading-list/papers/2607.02512/publication.csl.json",
      "preferred_citation": {
        "title": "Program-as-Weights: A Programming Paradigm for Fuzzy Functions",
        "author_names": [
          "Wentao Zhang",
          "Liliana Hotsko",
          "Woojeong Kim",
          "Pengyu Nie",
          "Stuart Shieber",
          "Yuntian Deng"
        ],
        "year": 2026,
        "type": "paper-conference",
        "container_title": "The Fortieth Annual Conference on Neural Information Processing Systems",
        "url": "https://arxiv.org/abs/2607.02512",
        "source_url": "https://arxiv.org/abs/2607.02512",
        "verified_at": "2026-10-24",
        "preferred_citation": true,
        "citation_key": "zhang2026programasweights"
      },
      "citation_url": "https://arxiv.org/abs/2607.02512",
      "preprint_citation_date": "2026-07-02",
      "preprint_bibtex_url": "https://programasweights.com/reading-list/papers/2607.02512/preprint.bib",
      "preprint_csl_url": "https://programasweights.com/reading-list/papers/2607.02512/preprint.csl.json",
      "method_comparisons": [
        {
          "title": "From generated adapters to reusable functions",
          "text": "Hypter, HINT, HyperTuning, and Text-to-LoRA generate adaptations from descriptions or examples. PAW uses generated parameters as part of a program that can be saved, called from ordinary code, and reused by a fixed interpreter.",
          "source_ids": [
            "2101.00420",
            "2212.10315",
            "2211.12485",
            "2506.06105",
            "2607.02512"
          ],
          "source_urls": [
            "https://arxiv.org/html/2607.02512v1#S10",
            "https://proceedings.mlr.press/v267/charakorn25a.html"
          ],
          "source_labels": [
            "PAW related work",
            "Text-to-LoRA paper"
          ],
          "topic_id": "generated-adapters",
          "topic_label": "Generated weights and adapters",
          "topic_url": "https://programasweights.com/reading-list/guides/compilation/#generated-adapters"
        },
        {
          "title": "Code and neural programs",
          "text": "ALCHEmist generates symbolic labeling programs. PAW compiles fuzzy functions into text and learned parameters. Both build an artifact once and reuse it; one runs as code, the other on a neural interpreter.",
          "source_ids": [
            "2407.11004",
            "2607.02512"
          ],
          "source_urls": [
            "https://proceedings.neurips.cc/paper_files/paper/2024/hash/72802bef5cf1a3449e909b20c2ae18d5-Abstract-Conference.html",
            "https://arxiv.org/html/2607.02512v1#S6"
          ],
          "source_labels": [
            "ALCHEmist paper",
            "PAW evaluation"
          ],
          "topic_id": "neural-programs",
          "topic_label": "Programs and reusable artifacts",
          "topic_url": "https://programasweights.com/reading-list/guides/fuzzy-functions/"
        },
        {
          "title": "What gets reused?",
          "text": "Gisting caches a few instruction activations. Generative Adapter stores context in parameter updates. PAW saves a function as a program containing text and a neural module.",
          "source_ids": [
            "2304.08467",
            "2411.05877",
            "2607.02512"
          ],
          "source_urls": [
            "https://arxiv.org/abs/2304.08467",
            "https://arxiv.org/abs/2411.05877",
            "https://arxiv.org/html/2607.02512v1#S2"
          ],
          "source_labels": [
            "Gist paper",
            "Generative Adapter paper",
            "PAW program definition"
          ],
          "topic_id": "context-compression",
          "topic_label": "Context compression",
          "topic_url": "https://programasweights.com/reading-list/guides/compilation/#context-compression"
        },
        {
          "title": "Program form and compiler",
          "text": "LoRA represents adaptation as low-rank weight updates; prefix tuning uses continuous activations. Their original methods learn these parameters from examples. PAW generates both forms from specifications.",
          "source_ids": [
            "2106.09685",
            "2101.00190",
            "2607.02512"
          ],
          "source_urls": [
            "https://arxiv.org/abs/2106.09685",
            "https://aclanthology.org/2021.acl-long.353/",
            "https://arxiv.org/html/2607.02512v1#S3"
          ],
          "source_labels": [
            "LoRA paper",
            "Prefix-tuning paper",
            "PAW implementations"
          ],
          "topic_id": "peft",
          "topic_label": "Parameter-efficient building blocks",
          "topic_url": "https://programasweights.com/reading-list/guides/compilation/#peft"
        },
        {
          "title": "Fast prediction and training",
          "text": "PAW’s fast compiler predicts a program. Compile by Training starts from that prediction, generates examples, and trains an adapter. Both use the same runtime interface; the extra training improves semantic accuracy on FuzzyBench-Hard at a higher compilation cost.",
          "source_ids": [
            "2607.02512",
            "2609.04199"
          ],
          "source_urls": [
            "https://arxiv.org/html/2607.02512v1#S3",
            "https://arxiv.org/html/2609.04199v1#S3",
            "https://arxiv.org/html/2609.04199v1#S5"
          ],
          "source_labels": [
            "PAW compiler implementations",
            "Compile by Training method",
            "Compile by Training evaluation"
          ],
          "topic_id": "training-compilation",
          "topic_label": "Compilation through training",
          "topic_url": "https://programasweights.com/reading-list/guides/compilation/#training-compilation"
        }
      ],
      "summary_zh": "提出模糊函数编程：将自然语言函数说明编译成神经程序，保存后由小模型在本地反复执行。",
      "translations": {
        "zh-CN": {
          "summary": "提出模糊函数编程：将自然语言函数说明编译成神经程序，保存后由小模型在本地反复执行。",
          "relationship": "PAW 建立编译器与解释器接口，程序同时包含文本和生成的参数，并提供 FuzzyBench、本地运行接口及图像条件编译。Compile by Training 沿用这一程序格式和运行时。",
          "program_form": "文本伪程序与编译器生成的参数高效模块，如 LoRA 适配器或前缀向量。",
          "conditioning": "函数说明，也支持输入输出示例；图像扩展还接收视觉信息。",
          "execution": "冻结的轻量解释器加载保存的程序，在本地处理新输入。"
        }
      }
    },
    {
      "id": "2609.04199",
      "title": "Compile by Training: Turning Natural-Language Specifications into Local Neural Functions",
      "authors": "Yuntian Deng, Pengyu Nie, Stuart Shieber",
      "first_public": "2026-09-03",
      "first_public_source": "https://arxiv.org/abs/2609.04199",
      "arxiv_first_submission": "2026-09-03",
      "date_label": "arXiv v1",
      "arxiv": "2609.04199",
      "paper_url": "https://arxiv.org/abs/2609.04199",
      "original_url": "https://arxiv.org/html/2609.04199v1",
      "venue": "EMNLP 2026 System Demonstrations",
      "venue_source": "https://aclanthology.org/2026.emnlp-demos.78/",
      "lens": [
        "neural-programs",
        "training-compilation"
      ],
      "related_terms": [
        "compile by training",
        "training-based compilation",
        "specification-specific optimization",
        "synthetic supervision",
        "local neural function",
        "FuzzyBench-Hard",
        "ProgramAsWeights"
      ],
      "summary": "Compiles a function description into a reusable local program by generating training examples and optimizing an adapter.",
      "contribution": "Makes task-specific training a software build step. Raises FuzzyBench-Hard semantic accuracy (LEM) from 22.4% to 83.6% and demonstrates composition in a website helper, avatar control, and English–Claudish translation.",
      "limitations": "Synthetic examples can inherit teacher errors. Cold compilation takes 50.9 seconds for one specification on a B300. FuzzyBench-Hard selects fast-compiler failures under exact match; the reported accuracy uses an LLM judge.",
      "program_form": "A LoRA adapter, runtime prompt, specification, and interpreter metadata in a PAW program.",
      "conditioning": "The specification guides teacher synthesis. PAW’s fast compiler supplies the initial adapter and runtime prompt.",
      "execution": "A frozen Qwen3-0.6B interpreter runs the saved function locally without further teacher calls.",
      "relationship": "Extends PAW with training at compile time while keeping its program format and runtime interface.",
      "relationship_source": "https://arxiv.org/html/2609.04199v1#S1",
      "project_url": "https://programasweights.com/playground?compiler=paw-ft-bs48",
      "demo_url": "https://programasweights.com/playground?compiler=paw-ft-bs48",
      "code_url": "https://github.com/programasweights/compile-by-training",
      "provenance": "September 2026 arXiv paper; published in EMNLP 2026 System Demonstrations, pages 830–839.",
      "first_public_note": "The paper reports public-service measurements from May 2026.",
      "author_names": [
        "Yuntian Deng",
        "Pengyu Nie",
        "Stuart Shieber"
      ],
      "record_url": "https://programasweights.com/reading-list/papers/2609.04199/",
      "legacy_record_url": "https://programasweights.com/reading-list/papers/#paper-2609-04199",
      "citation_date": "2026",
      "json_url": "https://programasweights.com/reading-list/papers/2609.04199/record.json",
      "markdown_url": "https://programasweights.com/reading-list/papers/2609.04199/index.md",
      "bibtex_url": "https://programasweights.com/reading-list/papers/2609.04199/citation.bib",
      "csl_url": "https://programasweights.com/reading-list/papers/2609.04199/citation.csl.json",
      "publication": {
        "title": "Compile by Training: Turning Natural-Language Specifications into Local Neural Functions",
        "author_names": [
          "Yuntian Deng",
          "Pengyu Nie",
          "Stuart Shieber"
        ],
        "year": 2026,
        "type": "paper-conference",
        "container_title": "Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
        "editor_names": [
          "Sweta Agrawal",
          "Alberto Abad"
        ],
        "month": 10,
        "month_name": "October",
        "address": "Budapest, Hungary",
        "publisher": "Association for Computational Linguistics",
        "pages": "830-839",
        "bibtex_pages": "830--839",
        "doi": "10.18653/2026.emnlp-demos.78",
        "isbn": "979-8-89176-461-3",
        "url": "https://aclanthology.org/2026.emnlp-demos.78/",
        "source_url": "https://aclanthology.org/2026.emnlp-demos.78/",
        "verified_at": "2026-11-06",
        "preferred_citation": true,
        "citation_key": "deng-etal-2026-compile"
      },
      "publication_bibtex_url": "https://programasweights.com/reading-list/papers/2609.04199/publication.bib",
      "publication_csl_url": "https://programasweights.com/reading-list/papers/2609.04199/publication.csl.json",
      "preferred_citation": {
        "title": "Compile by Training: Turning Natural-Language Specifications into Local Neural Functions",
        "author_names": [
          "Yuntian Deng",
          "Pengyu Nie",
          "Stuart Shieber"
        ],
        "year": 2026,
        "type": "paper-conference",
        "container_title": "Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
        "editor_names": [
          "Sweta Agrawal",
          "Alberto Abad"
        ],
        "month": 10,
        "month_name": "October",
        "address": "Budapest, Hungary",
        "publisher": "Association for Computational Linguistics",
        "pages": "830-839",
        "bibtex_pages": "830--839",
        "doi": "10.18653/2026.emnlp-demos.78",
        "isbn": "979-8-89176-461-3",
        "url": "https://aclanthology.org/2026.emnlp-demos.78/",
        "source_url": "https://aclanthology.org/2026.emnlp-demos.78/",
        "verified_at": "2026-11-06",
        "preferred_citation": true,
        "citation_key": "deng-etal-2026-compile"
      },
      "citation_url": "https://aclanthology.org/2026.emnlp-demos.78/",
      "preprint_citation_date": "2026-09-03",
      "preprint_bibtex_url": "https://programasweights.com/reading-list/papers/2609.04199/preprint.bib",
      "preprint_csl_url": "https://programasweights.com/reading-list/papers/2609.04199/preprint.csl.json",
      "method_comparisons": [
        {
          "title": "Fast prediction and training",
          "text": "PAW’s fast compiler predicts a program. Compile by Training starts from that prediction, generates examples, and trains an adapter. Both use the same runtime interface; the extra training improves semantic accuracy on FuzzyBench-Hard at a higher compilation cost.",
          "source_ids": [
            "2607.02512",
            "2609.04199"
          ],
          "source_urls": [
            "https://arxiv.org/html/2607.02512v1#S3",
            "https://arxiv.org/html/2609.04199v1#S3",
            "https://arxiv.org/html/2609.04199v1#S5"
          ],
          "source_labels": [
            "PAW compiler implementations",
            "Compile by Training method",
            "Compile by Training evaluation"
          ],
          "topic_id": "training-compilation",
          "topic_label": "Compilation through training",
          "topic_url": "https://programasweights.com/reading-list/guides/compilation/#training-compilation"
        }
      ],
      "summary_zh": "根据函数说明生成训练样本，再训练 LoRA 适配器，将一次函数定义构建成可复用的本地神经程序。",
      "translations": {
        "zh-CN": {
          "summary": "根据函数说明生成训练样本，再训练 LoRA 适配器，将一次函数定义构建成可复用的本地神经程序。",
          "relationship": "在 PAW 的快速编译结果上增加针对当前函数的训练，保留 PAW 的程序格式和解释器接口。",
          "program_form": "包含 LoRA 适配器、运行提示词、函数说明和解释器元数据的 PAW 程序。",
          "conditioning": "函数说明指导教师模型生成样本，PAW 快速编译器提供初始适配器与运行提示词。",
          "execution": "冻结的 Qwen3-0.6B 解释器执行保存的函数，不再调用教师模型。"
        }
      }
    }
  ]
}
