Recent advancements in large pre-trained transformer models (GPT2/3, T5) have found use in program synthesis to generate programs that satisfy a set of input/output examples. However, these models perform poorly on long-horizon and low-data tasks, and often don't seem to understand the semantics of the languages they generate. We investigate an approach that tackles both of these issues, by using attributed context-free-grammars of programming languages to generate programs, and then analyzing generated programs so that they can be annotated with compile and runtime attributes, such as types, so that information about the program can be remembered during long-horizon generation. We firstly find that synthesized datasets can be made efficiently and can provide transformer models with enough data in order to perform well on some synthesis tasks. We also find that giving models access to program attributes is especially effective in low-data environments, and tends improve the quality and reduce errors of transformer-generated programs.
翻译:大型培训前变压器模型(GPT2/3, T5)最近的进展在编程合成中发现用于生成满足一系列输入/输出示例的程序。 但是,这些模型在长正数和低数据任务上表现不佳,而且往往似乎不理解它们所生成语言的语义。 我们调查一种方法,通过使用被分配的无背景编程语言语法来生成程序,解决这两个问题,然后分析生成的程序,以便它们能够用编译和运行时间属性(如类型)来附加注释,从而可以在长正数生成过程中记住有关程序的信息。 我们首先发现,合成数据集能够高效地制作,并且能够提供足够数据来完成某些合成任务变压器模型。 我们还发现,给模型访问程序属性在低数据环境中特别有效,而且往往提高变压器生成程序的质量并减少错误。