Traditional generative models are limited to predicting sequences of terminal tokens. However, ambiguities in the generation task may lead to incorrect outputs. Towards addressing this, we introduce Grammformers, transformer-based grammar-guided models that learn (without explicit supervision) to generate sketches -- sequences of tokens with holes. Through reinforcement learning, Grammformers learn to introduce holes avoiding the generation of incorrect tokens where there is ambiguity in the target task. We train Grammformers for statement-level source code completion, i.e., the generation of code snippets given an ambiguous user intent, such as a partial code context. We evaluate Grammformers on code completion for C# and Python and show that it generates 10-50% more accurate sketches compared to traditional generative models and 37-50% longer sketches compared to sketch-generating baselines trained with similar techniques.


翻译:传统基因模型仅限于预测终端符号序列。 但是, 生成任务中的模糊性可能导致不正确的输出。 为了解决这个问题, 我们引入了格拉姆弗德、 以变压器为基础的语法指导模型来学习( 没有明确的监督) 来生成草图 -- -- 带有孔的象征序列。 通过强化学习, 格拉姆弗德学会了引入洞洞以避免生成不正确的符号, 目标任务中存在模糊性。 我们培训格拉姆斯特完成语句级源代码, 即生成代码片时用户的意图模糊不清, 例如部分代码背景。 我们评估了C# 和 Python 的代码完成率, 并表明与传统的基因模型相比, 和用类似技术培训的草图生成基线相比, 其生成的精确度要高出10-50%。

0
下载
关闭预览

相关内容

Linux导论,Introduction to Linux,96页ppt
专知会员服务
82+阅读 · 2020年7月26日
零样本文本分类,Zero-Shot Learning for Text Classification
专知会员服务
97+阅读 · 2020年5月31日
Python计算导论,560页pdf,Introduction to Computing Using Python
专知会员服务
77+阅读 · 2020年5月5日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
GAN新书《生成式深度学习》,Generative Deep Learning,379页pdf
专知会员服务
209+阅读 · 2019年9月30日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
开发者应当了解的18套机器学习平台
深度学习世界
5+阅读 · 2018年8月14日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
carla 学习笔记
CreateAMind
9+阅读 · 2018年2月7日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
VIP会员
最新内容
战力倍增器:自主武器系统与乌克兰及加沙冲突
人工智能赋能战场情报:提速决策进程
专知会员服务
1+阅读 · 7月17日
《拥抱新兴技术:面向未来军官的教育革新》
专知会员服务
4+阅读 · 7月17日
《无人地面战车(UGV)的崛起》报告
专知会员服务
7+阅读 · 7月16日
美陆军任务式指挥人工智能解决方案
专知会员服务
13+阅读 · 7月16日
相关VIP内容
Linux导论,Introduction to Linux,96页ppt
专知会员服务
82+阅读 · 2020年7月26日
零样本文本分类,Zero-Shot Learning for Text Classification
专知会员服务
97+阅读 · 2020年5月31日
Python计算导论,560页pdf,Introduction to Computing Using Python
专知会员服务
77+阅读 · 2020年5月5日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
GAN新书《生成式深度学习》,Generative Deep Learning,379页pdf
专知会员服务
209+阅读 · 2019年9月30日
相关资讯
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
开发者应当了解的18套机器学习平台
深度学习世界
5+阅读 · 2018年8月14日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
carla 学习笔记
CreateAMind
9+阅读 · 2018年2月7日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员