Research map / Large language models / Language, safety and interpretability
From If-Statements to ML Pipelines: Revisiting Bias in Code-Generation
Minh Duc Bui, Xenia Heilmann, Mattia Cerrato, Manuel Mager, Katharina von der Wense
Johannes Gutenberg University Mainz · Universidad Iberoamericana · University of Colorado Boulder
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
This paper tried a common change: Chain-of-thought prompting
add Specific+CoT prompt mitigation · 7 fairness datasets · Code Bias Score (% of generated functions using sensitive attribute): 85.7 (General) -> 45.6 (Specific+CoT) Improved
What 2,675 accepted papers report for this change
- 1,683 improved
- 270 no clear effect
- 109 mixed
- 613 hurt
- AudioChat: Unified Audio Storytelling, Editing, and Understanding with Transfusion Forcing ICML 2026 · add structured chain-of-thought reasoning to the diffusion LLM · StoryGen-Eval editing · delta multiFLAM: 27.8 -> 11.7Improved
- Vision Language Models Cannot Reason About Physical Transformation ICML 2026 · add CoT prompt instead of Direct prompt · Number & Length · accuracy: F(3, 333) = 18.28Hurt
- VideoSEG-O3: A Multi-turn Reinforcement Learning Framework for Reasoning Video Object Segmentation ICML 2026 · Add CoT cold-start stage on top of SFT · Long-RVOS · J&F: 47.12 -> 51.82Improved
See this change in detailMatched by the wording of each paper's own result, read by AI from the full text. Papers report gains more often than failures, so this shows what gets published, not the chance a change works.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| ask for ML pipeline instead of conditional statements | code generation by 9 LLMs · 7 fairness datasets | Code Bias Score (% of generated functions using sensitive attribute): 58.7% -> 88.3% sensitive attribute use | Hurt |
| generic instruction to avoid biased code (ablation) | ML pipeline generation · 7 fairness datasets | Code Bias Score (% of generated functions using sensitive attribute) | No clear effect |
| add Specific+CoT prompt mitigation (ablation) | ML pipeline generation, Llama 3.3 70B · 7 fairness datasets | Code Bias Score (% of generated functions using sensitive attribute): 85.7 (General) -> 45.6 (Specific+CoT) | Improved |
| add Specific+CoT prompt mitigation (ablation) | ML pipeline generation, DeepSeek Coder 33B · 7 fairness datasets | Code Bias Score (% of generated functions using sensitive attribute): 99.2 (General) -> 98.1 (Specific+CoT) | No clear effect |
| increase number of non-sensitive attributes from 5 to 90 (ablation) | conditional statements, Llama 3.3 70B · Crime | Code Bias Score (% of generated functions using sensitive attribute): 90% -> 20% sensitive attribute use | Improved |
| increase number of non-sensitive attributes from 5 to 90 (ablation) | ML pipeline, Llama 3.3 70B · Crime | Code Bias Score (% of generated functions using sensitive attribute): 95% -> 93% | No clear effect |
| move from Easy to Complex ML pipeline (ablation) | ML pipeline generation · 7 fairness datasets (Specific prompt) | Code Bias Score (% of generated functions using sensitive attribute): e.g. CodeGemma 7B 64.3 -> 94.9; Qwen2.5 72B 43.3 -> 38.5 | Mixed |
| add explicit instruction to avoid listed sensitive attributes (ablation) | ML pipeline, Qwen2.5 72B · 7 fairness datasets | Code Bias Score (% of generated functions using sensitive attribute): 78.7 -> 2.9 | Improved |
| add explicit instruction to avoid listed sensitive attributes (ablation) | ML pipeline, CodeGemma 7B · 7 fairness datasets | Code Bias Score (% of generated functions using sensitive attribute): 98.8 -> 76.2 | Improved |
| increase Qwen2.5 model size (ablation) | ML pipeline and conditionals, Qwen2.5 1.5B-72B · 7 fairness datasets | Code Bias Score (% of generated functions using sensitive attribute) | Mixed |
| vary decoding temperature 0 to 1.0 (ablation) | ML pipeline vs conditionals, 3 models · 7 fairness datasets | bias score | No clear effect |
| compare sensitive vs irrelevant attributes in ML pipelines | Llama 3.3 70B · 7 fairness datasets | Code Bias Score (% of generated functions using sensitive attribute): 89.1% sensitive vs 11.0% irrelevant | Mixed |
Open problems in statistical frameworks for LLM evaluation
Do uncertainty and evaluation methods for LLMs still hold for open-ended generation, closed models and larger models?
- Evaluation stays on closed-answer tasks, with open-ended generation untested. · 20 papers state it
- Experiments cover English only, leaving other languages untested. · 18 papers state it
- Sampling several answers or extra passes raises inference cost. · 16 papers state it
Closest papers by meaning
- A Simple, Yet Effective Approach to Finding Biases in Code Generation (ACL 2023 · similarity 0.89)
- Quantifying Contamination in Evaluating Code Generation Capabilities of Language Models (ACL 2024 · similarity 0.87)
- Primal Generation, Dual Judgment: Self-Training from Test-Time Scaling (NeurIPS 2026 · similarity 0.86)
- AutoCodeBench: Large Language Models are Automatic Code Benchmark Generators (ICLR 2026 · similarity 0.86)
- Neural Sketch Learning for Conditional Program Generation (ICLR 2018 · similarity 0.86)
- DyCodeEval: Dynamic Benchmarking of Reasoning Capabilities in Code Large Language Models Under Data Contamination (ICML 2025 · similarity 0.85)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.