Program-as-Weights: A Programming Paradigm for Fuzzy Functions
Program-as-Weights: A Programming Paradigm for Fuzzy Functions
Authors: Wentao Zhang, Liliana Hotsko, Woojeong Kim, Pengyu Nie, Stuart Shieber, and Yuntian Deng
arXiv Identifier: 2607.02512 | Submitted: July 2, 2026
📌 Overview
Many common software engineering requirements are inherently "fuzzy," meaning they are difficult to implement using traditional, rigid rule-based logic. Examples include:
- Identifying critical patterns in system logs for alerting.
- Fixing structural errors in malformed JSON strings.
- Ranking search results based on nuanced user intent.
Traditionally, developers have outsourced these tasks to massive Large Language Model (LLM) APIs. However, this approach introduces significant drawbacks regarding price, reproducibility, and data locality.
The Proposal: The authors introduce fuzzy-function programming, a method to compile a natural-language specification into a compact, neural artifact that can be executed locally.
⚙️ The PAW Architecture
The authors instantiate this paradigm through Program-as-Weights (PAW). Instead of prompting a giant model for every single request, PAW splits the process into a compiler and an interpreter.
The Workflow
Technical Components
- The Compiler: A
4Bparameter model trained on FuzzyBench, a massive dataset containing (10 million) examples. - The Artifact: The compiler generates small, efficient adapters (the "weights" that act as the "program").
- The Interpreter: A frozen, lightweight
Qwen3-0.6Bmodel that executes these adapters.
Conceptual Implementation
If we were to represent the PAW process in pseudo-code, it would look like this:
# PAW Compilation Process
def compile_fuzzy_function(nl_spec):
# Compiler (4B) transforms text to weights
weights = PAW_Compiler.generate_adapter(nl_spec)
return weights
def execute_fuzzy_function(input_data, weights):
# Interpreter (0.6B) runs the weights
return Qwen3_Interpreter.run(input_data, weights)
📊 Performance & Efficiency
The PAW approach allows a tiny model to punch far above its weight class. By using a specialized adapter, a 0.6B interpreter can match the quality of a 32B model.
| Metric | Direct Prompting (Qwen3-32B) | PAW (Qwen3-0.6B + Adapter) |
|---|---|---|
| Performance | Baseline High | Equivalent |
| Inference Memory | ||
| Local Speed | Slow/API Dependent | (on MacBook M3) |
🚀 A New Paradigm
PAW fundamentally changes the role of the foundation model. It shifts the LLM from being a per-input problem solver to a tool builder.
- Old Way: (Expensive & Slow)
- PAW Way: (Cheap & Fast)
This ensures that the heavy lifting (compilation) happens only once per function definition, while the application of that function remains offline and lightweight.
Metadata & Classification
- Subjects:
cs.LG(Machine Learning)cs.AI(Artificial Intelligence)cs.CL(Computation and Language)
- DOI:
10.48550/arXiv.2607.02512
![]()