ChatPaper.aiChatPaper

Program-as-Weights:ファジィ関数のためのプログラミングパラダイム

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

July 2, 2026
著者: Wentao Zhang, Liliana Hotsko, Woojeong Kim, Pengyu Nie, Stuart Shieber, Yuntian Deng
cs.AI

要旨

多くの日常的なプログラミングタスク、例えば重要なログ行への警告、不正な形式のJSONの修復、意図による検索結果のランキングなどは、クリーンなルールベースの実装に抵抗があり、局所性、再現性、コストを犠牲にして大規模言語モデルAPIに外部委託されることが増えている。我々はファジー関数プログラミングを提案する。これは、自然言語の仕様からそのような関数をコンパクトでローカル実行可能なニューラル成果物にコンパイルするものである。我々はこのパラダイムをProgram-as-Weights (PAW)として具体化する。これは、FuzzyBench(我々が公開する1000万サンプルのデータセット)で訓練された4Bのコンパイラが、凍結された軽量インタプリタ用のパラメータ効率的なアダプタを生成するものである。PAWプログラムを実行する0.6BのQwen3インタプリタは、Qwen3-32Bの直接プロンプトの性能に匹敵しつつ、約50分の1の推論メモリを使用し、MacBook M3上で30トークン/秒で動作する。PAWは、基盤モデルを入力ごとの問題解決器からツール構築器へと再定義する。関数定義ごとに一度呼び出され、再利用可能な小さな成果物を生成し、その後の関数適用ごとの呼び出しは安価でオフラインで行われる。
English
Many everyday programming tasks resist clean rule-based implementation, such as alerting on important log lines, repairing malformed JSON, or ranking search results by intent, and are increasingly outsourced to large language model APIs at the cost of locality, reproducibility, and price. We propose fuzzy-function programming: compiling such a function from a natural-language specification into a compact, locally-executable neural artifact. We instantiate this paradigm with Program-as-Weights (PAW), in which a 4B compiler trained on FuzzyBench, a 10M-example dataset we release, emits parameter-efficient adapters for a frozen, lightweight interpreter. A 0.6B Qwen3 interpreter executing PAW programs matches the performance of direct prompting of Qwen3-32B, while using roughly one fiftieth of the inference memory and running at 30 tokens/s on a MacBook M3. PAW reframes the foundation model from a per-input problem solver into a tool builder: invoked once per function definition, it produces a small reusable artifact whose subsequent calls per function application are cheap and offline.