mlsanityData to 14 Oct 2026

From If-Statements to ML Pipelines: Revisiting Bias in Code-Generation

arXiv 2604.21716 ↗First posted 23 Apr 2026cs.CL cs.SEcited by 0

Not on the map. Why?

Abstract (arXiv)

Prior work evaluates code generation bias primarily through simple conditional statements, which represent only a narrow slice of real-world programming and reveal solely overt, explicitly encoded bias. We demonstrate that this approach dramatically underestimates bias in practice by examining a more realistic task: generating machine learning (ML) pipelines. Testing both code-specialized and general-instruction large language models, we find that generated pipelines exhibit significant bias during feature selection. Sensitive attributes appear in 87.7% of cases on average, despite models demonstrably excluding irrelevant features (e.g., including "race" while dropping "favorite color" for credit scoring). This bias is substantially more prevalent than that captured by conditional statements, where sensitive attributes appear in only 59.2% of cases. These findings are robust across prompt mitigation strategies, varying numbers of attributes, and different pipeline difficulty levels. Our results challenge simple conditionals as valid proxies for bias evaluation and suggest current benchmarks underestimate bias risk in practical deployments.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 14 of its 34 references that are in the map. First posted on arXiv 23 Apr 2026.

Builds on

14 of 34 references.

References · 14

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2019A Survey on Bias and Fairness in Machine Learningcited by 1,917
  3. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  4. 2017Counterfactual Fairnesscited by 804
  5. 2024A Survey on Large Language Models for Code Generationcited by 658
  6. 2023MLAgentBench: Evaluating Language Agents on Machine Learning Experimentationcited by 366
  7. 2024CodeGemma: Open Code Models Based on Gemmacited by 150
  8. 2023Bias Testing and Mitigation in LLM-based Code Generationcited by 53
  9. 2023Uncovering and Quantifying Social Biases in Code Generationcited by 25
  10. 2024Bias Unveiled: Investigating Social Bias in LLM-Generated Codecited by 25
  11. 2025A Study of LLMs' Preferences for Libraries and Programming Languagescited by 20
  12. 2024Exploring Multi-Lingual Bias of Large Code Models in Code Generationcited by 17
2 more
  1. 2025FairCoder: Probing LLM Bias in High-Stakes Decision Making via Coding Taskscited by 9
  2. 2024Mitigating Gender Bias in Code Large Language Models via Model Editingcited by 3

Built on by

Not cited yet.