论文标题
一种简单但有效的方法来寻找代码生成中的偏见
A Simple, Yet Effective Approach to Finding Biases in Code Generation
论文作者
论文摘要
最近,基于大语言模型的高性能代码生成系统浮出水面。他们接受了大规模语料库的培训,其自然文本比实际可执行的计算机代码更为自然。这项工作表明,当前的代码生成系统表现出从其大语言模型骨架上继承的不需要的偏见,这可以在特定情况下降低生成代码的质量。 为了研究效果,我们提出了“影响力块”概念,该概念可以对编码挑战进行模块化分解和分析。我们引入了一种自动化的干预机制,让人联想到对抗性测试,该机制通过正在测试的模型的失败模式中暴露了不想要的偏见。最后,我们演示了如何在微调过程中将我们的框架用作数据转换技术,并充当这些偏见的缓解策略。
Recently, high-performing code generation systems based on large language models have surfaced. They are trained on massive corpora containing much more natural text than actual executable computer code. This work shows that current code generation systems exhibit undesired biases inherited from their large language model backbones, which can reduce the quality of the generated code under specific circumstances. To investigate the effect, we propose the "block of influence" concept, which enables a modular decomposition and analysis of the coding challenges. We introduce an automated intervention mechanism reminiscent of adversarial testing that exposes undesired biases through the failure modes of the models under test. Finally, we demonstrate how our framework can be used as a data transformation technique during fine-tuning, acting as a mitigation strategy for these biases.