Alert button

A Simple, Yet Effective Approach to Finding Biases in Code Generation

Oct 31, 2022
Figure 1 for A Simple, Yet Effective Approach to Finding Biases in Code Generation
Figure 2 for A Simple, Yet Effective Approach to Finding Biases in Code Generation
Figure 3 for A Simple, Yet Effective Approach to Finding Biases in Code Generation
Figure 4 for A Simple, Yet Effective Approach to Finding Biases in Code Generation

Share this with someone who'll enjoy it:

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.

* Preprint  

Share this with someone who'll enjoy it: