实例编程

通过实例编程(PBE)在AI是一个新的前沿领域,使用户能够从输入输出示例创建脚本。PBE可以为一些任务域中的开发者提供10-100X的生产力提升。99%的计算机用户是非程序员,PBE可以使他们创建小脚本来自动化重复任务。PBE是革命性的数据争吵。数据科学家花了80%倍的时间将数据转换成适合于机器学习(ML)的形式。PBE支持许多数据操作任务的自动化,如字符串转换(例如,将“FirstName LastName”转换为“LastName,FirstName”)、列分裂、从日志文件/网页中提取字段、将半结构化电子表格规范化为结构化表。这种PBE功能已经在包括Excel、Powershell、OMS和Azure ML工作台在内的多个Microsoft产品中发布。合成的脚本性能很好,AML Workbench甚至能够使用SPARK运行时执行大型数据集。
展开查看详情

1.Programming by Examples Sumit Gulwani, Microsoft #Res8SAIS

2.Example-based help-forum interaction 300_w30_aniSh_c1_b à w30 300_w5_aniSh_c1_b à w5 =MID(B1,5,2) =MID(B1,FIND(“_”,$B:$B)+1, FIND(“_”,REPLACE($B:$B,1,FIND(“_”,$B:$B),””))-1) #Res8SAIS 2

3.Flash Fill (Excel feature) #Res8SAIS “Automating string processing in spreadsheets using input-output examples” 3 [POPL 2011] Sumit Gulwani

4.Number, DateTime Transformations Input Output (round to 2 decimal places) Excel/C#: #.00 123.4567 123.46 Python/C: .2f 123.4 123.40 Java: #.## 78.234 78.23 Input Output (3-hour weekday bucket) CEDAR AVE & COTTAGE AVE; HORSHAM; Fri, 12PM - 3PM 2015-12-11 @ 13:34:52; RT202 PKWY; MONTGOMERY; 2016-01-13 Wed, 9AM - 12PM @ 09:05:41-Station:STA18; ; UPPER GWYNEDD; 2015-12-11 @ 21:11:18; Fri, 9PM - 12AM #Res8SAIS “Synthesizing Number Transformations from Input-Output Examples” 4 [CAV 2012] Rishabh Singh, Sumit Gulwani

5.Data Science Class Assignment #Res8SAIS “FlashExtract: A Framework for data extraction by examples” 5 [PLDI 2014] Vu Le, Sumit Gulwani

6. PBE Architecture Examples Search More Examples DSL D Engine Program set Intended Program Program in D Disambiguator Ranker Ranked Program set Test inputs Search • Logical Deduction: [OOPSLA ‘15] FlashMeta: A framework for inductive program synthesis • Machine Learning: [ICLR ‘18] Neural-guided deductive search for real-time program synthesis from examples Ranking • Program Features: [CAV ‘15] Predicting a correct program in programming by example • Output Features: [IJCAI ‘17] Learning to learn programs from examples: going beyond program structure #Res8SAIS “Programming by Examples: PL meets ML” 6 [APLAS 2017] Sumit Gulwani, Prateek Jain

7.New Frontiers Predictive Synthesis Synthesis of intended programs from just the input. • Tabular data extraction, Sort, Join Synthesis of readable/modifiable code Synthesis in target language of choice. • Scala, R, PySpark Code-first experience in existing workflows. • IDE, Notebook #Res8SAIS “Automated Data Extraction using Predictive Program Synthesis” 7 [AAAI 2017] Mohammad Raza, Sumit Gulwani

8.Code Transformations by Examples • Code refactoring consumes 40% time in migration. – Old version to new version – On-prem to cloud – One framework to another • Custom formatting • Performance enhancements • Repetitive bug fixes – Feedback generation for programming education #Res8SAIS “Learning syntactic program transformations from examples” 8 [ICSE 2017] Reudismam Rolim, Gustavo Soares, et.al.

9. Conclusion Programming by examples is a new frontier in AI. • 10-100x productivity increase in some domains. – Data Wrangling: Data scientists spend 80% time. – Code Refactoring: Developers spend 40% time in migration. • 99% of end users are non-programmers. Next-generational AI techniques under the hood • Logical Reasoning + Machine Learning The Future: Multi-modal programming with Examples and NL Questions/Feedback: Contact me at sumitg@microsoft.com #Res8SAIS Microsoft PROSE (PROgram Synthesis by Examples) Framework 9 Available for non-commercial use : https://microsoft.github.io/prose/