Recently, scores of high-performing code generation systems have surfaced. As has become a popular choice in many domains, code generation is often approached using large language models as a core, trained under the masked or causal language modeling schema. This work shows that current code generation systems exhibit biases inherited from large language model backbones, which might leak into generated code under specific circumstances. To investigate the effect, we propose a framework that automatically removes hints and exposes various biases that these code generation models use. We apply our framework to three coding challenges and test it across top-performing coding generation models. Our experiments reveal biases towards specific prompt structure and exploitation of keywords during code generation. Finally, we demonstrate how to use our framework as a data transformation technique, which we find a promising direction toward more robust code generation.
翻译:最近,出现了数十个高性能代码生成系统。正如在许多领域已经成为一个受欢迎的选择,人们往往使用大型语言模型作为核心,在蒙面或因果语言模型模式下加以培训。这项工作表明,目前的代码生成系统从大型语言模型主干中产生了偏差,在特定情况下可能会渗入生成的代码中。为了调查效果,我们提出了一个框架,自动去除提示,暴露这些代码生成模型所使用的各种偏差。我们应用了我们的框架来应对三种代码化挑战,并在最高性能编码生成模型中测试它。我们的实验揭示了在代码生成过程中对特定快速结构和关键词的利用的偏差。最后,我们展示了如何利用我们的框架作为数据转换技术,我们找到了更强有力的代码生成的有希望的方向。