Do Code Models Suffer from the Dunning-Kruger Effect?

ACL ARR 2025 May Submission5370 Authors

20 May 2025 (modified: 03 Jul 2025)ACL ARR 2025 May SubmissionEveryoneRevisionsBibTeXCC BY 4.0
Abstract: The Dunning-Kruger effect (DKE) is the cognitive bias in which participants with limited competence in a domain tend to overestimate their perceived performance or expertise in that domain. AI models today can outperform humans in many cognitive tasks and humans rely on these models for decision making. It becomes important to understand the inherent biases carried by these models to make sure they are used in a controlled and responsible manner. In this paper, we examine the Dunning-Kruger effect on AI models for programming tasks. By comparing the model on question-answering over increasingly rare programming languages, it is found that the models show a similar competence-capability curve as humans. Upon closer examination of the confidence curves we also find that the strength of the bias is proportionate to the competence of the models, for example, a less competent model has a stronger bias. This aligns with human experiments for the bias. We open source all benchmarks and predictions to encourage research in biases for AI models.
Paper Type: Short
Research Area: Interpretability and Analysis of Models for NLP
Research Area Keywords: Cognitive Bias, Code generation
Contribution Types: Model analysis & interpretability
Languages Studied: English
Submission Number: 5370
Loading