mlsanityData to 14 Oct 2026

How Reasoning Shapes Social Bias in LLM-Generated Code?

arXiv 2608.06829 ↗First posted 7 Aug 2026cs.SEcited by 0

On the map: LLM reasoning → Reasoning benchmarks and evaluation

Abstract (arXiv)

Large language models (LLMs) are increasingly used for code generation, yet generated programs may exhibit social bias through unfair or differential treatment of sensitive demographic attributes. While prior work mainly studies direct code generation, bias in reasoning-based generation remains underexplored. We conduct the first systematic study of social bias in reasoning-based code generation, evaluating 9 standard LLMs and large reasoning models (LRMs) on realistic bias-sensitive tasks across three human-centered decision scenarios. We find that reasoning generally reduces bias, lowering the average bias rate from 0.64 to 0.40, but the effect varies substantially across models. Meanwhile, code quality is not consistently preserved, with the average quality dropping from 0.72 to 0.59. Biased reasoning strongly predicts biased code, and adjusting generation configurations alone is insufficient for robust mitigation. Based on these findings, we propose ProbeDebias, a reasoning-aware framework that detects and rewrites biased reasoning traces before code generation. ProbeDebias achieves 87.76% F1 for reasoning-bias detection and reduces code bias by 83.73% on average while largely preserving quality. Compared with SOTA baselines, it further reduces average bias by 52.70%-54.42% and improves quality by 9.79%-36.79%. These results highlight the value of reasoning-stage analysis for trustworthy code generation.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 20 of its 65 references that are in the map. First posted on arXiv 7 Aug 2026.

Builds on

20 of 65 references.

Closest ancestors · 3

Same direction, newest first

  1. 2025Qwen3 Technical Report14 May
  2. 2025Phi-4-reasoning Technical Report30 Apr
  3. 2023Code Llama: Open Foundation Models for Code24 Aug

Other references · 17

  1. 2024The Llama 3 Herd of Modelscited by 14,715
  2. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  3. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  5. 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,986
  6. 2024Qwen2.5-Coder Technical Reportcited by 1,203
  7. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  8. 2025Stop Overthinking: A Survey on Efficient Reasoning for Large Language Modelscited by 464
  9. 2023The Impact of AI on Developer Productivity: Evidence from GitHub Copilotcited by 274
  10. 2025Uncertainty-Guided Chain-of-Thought for Code Generation with LLMscited by 32
  11. 2025FairCoder: Probing LLM Bias in High-Stakes Decision Making via Coding Taskscited by 9
  12. 2022Mitigating Gender Bias in Machine Translation through Adversarial Learningcited by 8
5 more
  1. 2022A Simple, Yet Effective Approach to Finding Biases in Code Generationcited by 8
  2. 2025Reasoning with LLMs for Zero-Shot Vulnerability Detectioncited by 7
  3. 2025Vul-R2: A Reasoning LLM for Automated Vulnerability Repaircited by 5
  4. 2024Mitigating Gender Bias in Code Large Language Models via Model Editingcited by 3
  5. 2026NEAT: Neuron-Based Early Exit for Large Reasoning Modelscited by 3

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026Social Bias in LLM-Generated Code: Benchmark and Mitigation
  2. 2024Bias Unveiled: Investigating Social Bias in LLM-Generated Code
  3. 2025Does Reasoning Introduce Bias? A Study of Social Bias Evaluation and Mitigation in LLM Reasoning
  4. 2023Bias Testing and Mitigation in LLM-based Code Generation
  5. 2026BiasTrace: Linking Reasoning Behaviours to Biased Outputs in LLMs
  6. 2026Measuring and Mitigating Bias in Code Generated by Large Language Models
  7. 2025Evaluating Implicit Biases in LLM Reasoning through Logic Grid Puzzles
  8. 2024BiasAlert: A Plug-and-play Tool for Social Bias Detection in LLMs