[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-327518-105":59,"doc-detail-327518-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","program-as-weights-a-programming-paradigm-for-fuzzy-functions","Program-as-Weights - A Programming Paradigm for Fuzzy Functions","","Many real-world programming tasks behave like “fuzzy functions,” where clean symbolic rules fail due to ambiguous intent, noisy inputs, brittle formats, and edge cases. These tasks are often outsourced to large language model APIs, causing loss of locality, reproducibility, and predictable cost. The paper introduces fuzzy-function programming by compiling a natural-language specification into a compact, locally executable neural artifact, instantiated as Program-as-Weights (PAW).",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/program-as-weights-a-programming-paradigm-for-fuzzy-functions/327518/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/program-as-weights-a-programming-paradigm-for-fuzzy-functions/327518.png","ImageObject",300,407,{"name":92,"@type":93},"Hazel","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-26","2026-09-21",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",11,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What problem does Program-as-Weights (PAW) address?","Question",{"text":113,"@type":114},"PAW targets fuzzy functions—tasks that are intuitive to humans but cannot be fully captured by crisp symbolic rules, such as log filtering, repairing malformed JSON, and intent-based ranking.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How does PAW differ from calling an LLM API for each task?",{"text":118,"@type":114},"PAW compiles the function definition once from a natural-language specification into a small reusable neural artifact, then runs locally for subsequent inputs, improving locality and reproducibility while reducing inference overhead.",{"name":120,"@type":111,"acceptedAnswer":121},"What are the main stages of PAW’s compilation process?",{"text":122,"@type":114},"The pipeline uses two stages with 4B Qwen3 models: a pseudo compiler that rewrites the spec into a pseudo-program with examples, and a trained LoRA compiler that emits a parameter-efficient adapter from the spec and pseudo-program.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},327518,1790436685,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":140,"language":141,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":67,"update_tm":145,"read_time":146,"preview_page_count":19,"preview_urls":147},137441390410,"https://ap-avatar.wpscdn.com/avatar/2000252f4ab5702993?_k=1776741390130283984","arXiv :2607 .025 12v 1 [ cs .LG] 2 Jul 2026  \nProgram-as-Weights:  \nA Programming Paradigm for Fuzzy Functions  \nWentao Zhang 1 ,∗ Liliana Hotsko 1 ,∗ Woojeong Kim2 ,∗  \nPengyu Nie 1 Stuart Shieber3 Yuntian Deng 1  \n1University of Waterloo 2 Cornell University 3Harvard University {w564zhan, lhotsko, pynie, [yuntian}@uwaterloo.ca](yuntian}@uwaterloo.ca)  \n[wk247@cornell.edu](wk247@cornell.edu) [shieber@seas.harvard.edu](shieber@seas.harvard.edu)  \n∗Equal contribution  \nAbstract  \nMany 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:  \ncompiling such a function from a natural-language specification into a compact, locally-executable neural artifact. We instantiate this paradigm with Program-asWeights (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:  \ninvoked once per function definition, it produces a small reusable artifact whose subsequent calls per function application are cheap and offline.  \n1 Introduction  \nProgramming has historically been about writing explicit rules in a formal language designed for the purpose, a programming language. A function is defined by code, and the computer executesit deterministically. For many tasks, this paradigm works beautifully: sorting numbers, processing structured data, computing matrix products. Yet a large class of real-world functions resists precise specification. Consider, for instance, filtering a computer log to alert someone only on the log lines or messages that matter, repairing malformed JSON, or ranking search results by intent. Even apparently “simple” tasks, such as writing a regular expression to parse text with many edge cases, prove brittle. Beyond underspecification, real-world inputs are noisy: typos and format drift routinely break hand-written rules and regexes. These are fuzzy functions [Rubio Manzano, 2012]: problems that humans find intuitive but that cannot be fully captured by crisp symbolic rules.  \nToday, developers frequently outsource such fuzziness to LLM APIs. It is increasingly common to find codebases where a remote LLM is called (e.g., gpt(“extract answer”, text)) to implement functions that are otherwise intractable to program. This approach is undeniably convenient, but it is costly, fragile, undermines reproducibility because providers may silently update their models [Kim et al., 2023], and prevents software from being self-contained.  \nWe propose a different paradigm with three steps: the developer describes the function in natural language; a neural compiler turns that description into a small neural binary; and a frozen, lightweight  \nPreprint.  \nFigure 1: Overview of the Program-as-Weights paradigm. Top: compile once in the cloud. A natural-language description of a fuzzy function (here,“classify if this is urgent”) is fed to a neural compiler, which produces a neural program. Bottom: run locally. A small frozen neural interpreter loads the compiled program and runs the user’s input (“Need your signature by EOD!”) to produce the output (“urgent”) . The compiled program is a single file that can be cached, version-controlled, and called offline like any other library function.  \nneural interpreter, installed once on the user’s device, runs that binary just like a user-defined function (Figure 1) . We call this paradigm Program-as-Weights (PAW) . Any sufficiently expressive pa","cbCailyXMcvANZEC","https://ap.wps.com/l/cbCailyXMcvANZEC","pdf",1811878,28,"English","# Abstract\n# Introduction\n## Program-as-Weights paradigm overview\n## Motivation: limitations of rule-based and API-based implementations\n## Proposed approach and compile pipeline\n## Results and efficiency","[{\"question\":\"What problem does Program-as-Weights (PAW) address?\",\"answer\":\"PAW targets fuzzy functions—tasks that are intuitive to humans but cannot be fully captured by crisp symbolic rules, such as log filtering, repairing malformed JSON, and intent-based ranking.\"},{\"question\":\"How does PAW differ from calling an LLM API for each task?\",\"answer\":\"PAW compiles the function definition once from a natural-language specification into a small reusable neural artifact, then runs locally for subsequent inputs, improving locality and reproducibility while reducing inference overhead.\"},{\"question\":\"What are the main stages of PAW’s compilation process?\",\"answer\":\"The pipeline uses two stages with 4B Qwen3 models: a pseudo compiler that rewrites the spec into a pseudo-program with examples, and a trained LoRA compiler that emits a parameter-efficient adapter from the spec and pseudo-program.\"}]","Program-as-Weights - A Programming Paradigm for Fuzzy Functions | PDF",1789977405,71,[148,152,156,160],{"page_no":8,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/b95de0de3726f7684eecf9cffe799609.webp",983,1272,{"page_no":14,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/fc6227f34aad1386d8e2c2daeb68931a.webp",982,1270,{"page_no":81,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/d591f7abd02887c052699337b9e0492e.webp",981,1269,{"page_no":19,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/3bc6ca7f732a6cc43c961e19d51d0a7b.webp",980,1268]