Applying Prompt-Based Mitigation of Gender-Role Bias in Large Language Models for Security
As large language models (LLMs) become increasingly integrated into society, concerns over fairness and bias have emerged as critical areas of research. Prior research has demonstrated that LLMs often reflect stereotypes present in their training data, and while this is informative, systematic studies producing rigorous experiments and tangible measurements re-main limited. Furthermore, as LLMs are deployed in security-sensitive domains, such as industrial control systems (ICS), Internet-of- Things (loT) networks, and critical infrastructure, ex-ploring tangible, quantitative bias mitigation techniques becomes essential for real-time deployment. In this work, as a proof of concept, we apply our pipelines to 53 gender-neutral professional resume prompts to generally analyze how LLMs assign gender-specific attributes. Using these prompts, we implement four distinct mitigation pipelines: a Baseline with no intervention, In-Context Example prompting, Self-Evaluation and Regeneration, and Chain-of- Thought (CoT) reasoning. Furthermore, to quantify each pipeline, we introduce the Stereotype Alignment Rate (SAR) to quantify bias, defined as the percentage of outputs conforming to traditional gender stereotypes. Results across each experimental pipeline indicate an effective reduction in bias, lowering the SAR by up to 15% compared to the baseline. This work demonstrates that prompt engineering, particularly through the use of counter-stereotypical examples, can serve as an effective and lightweight method for mitigating bias in LLM outputs.
Authors
- Shari Watkins (ORCID: https://orcid.org/0000-0002-8139-3795)
- Lanier Watkins (ORCID: https://orcid.org/0000-0002-3322-1833)
- Matthew Dees
- K. Stein (ORCID: https://orcid.org/0009-0005-4706-5797)
- Brandon Blackwell
- Ernest Funue
Institutions
- Johns Hopkins University (US)
- American University (US)
Publication Details
- Published
- 2025-09-08
- DOI
- https://doi.org/10.1109/cns66487.2025.11194978
- Primary Topic
- Hate Speech and Cyberbullying Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00