Skip to main navigation Skip to search Skip to main content

Enhancing RLHF in LLMs: Comparing BERT, XGBoost, and Deep Models for Bias Detection

  • University of Sharjah

Research output: Chapter in Book/Report/Conference proceeding › Conference contribution › peer-review

Abstract

This study explores bias detection in large language models (LLMs) to support Reinforcement Learning from Human Feedback (RLHF) pipelines aimed at reducing social bias. We compare three classifiers-a frozen BERT-based model with a classification head, a custom deep learning model, and an XGBoost model-on the StereoSet dataset. This dataset includes five bias categories: gender, profession, race, religion, and no bias. To address class imbalance, we generated synthetic samples using Google's gemma-2-9b-it model. Results show that the BERT-based model achieved the highest overall accuracy 0.92 and outperformed others across all categories, particularly in detecting subtle biases. The deep learning model was ranked second with 0.85 accuracy, while XGBoost lagged at 0.75, struggling with no-bias detection. These findings confirm that architecture choice and training strategy significantly impact bias classification and reinforce the importance of integrating reliable detection models into RLHF workflows.

Original languageEnglish
Title of host publicationProceedings - 18th International Conference on Developments in eSystems Engineering, DeSE 2025
EditorsDhiya Al-Jumeily Obe, Sulaf Assi, Jamila Mustafina, Abir Hussain, Manoj Jayabalan, Roxana Radvan, Bogdan Bita, Hissam Tawfik, Neil Rowe
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages226-231
Number of pages6
ISBN (Electronic)9798331587659
DOIs
StatePublished - 2025
Event18th International Conference on Developments in eSystems Engineering, DeSE 2025 - Bucharest, Romania
Duration: 10 Nov 2025 → 12 Nov 2025

Publication series

NameProceedings - 18th International Conference on Developments in eSystems Engineering, DeSE 2025

Conference

Conference18th International Conference on Developments in eSystems Engineering, DeSE 2025
Country/TerritoryRomania
CityBucharest
Period10/11/25 → 12/11/25

Keywords

  • Deep Learning
  • LLMs
  • Natural Language Processing
  • Transformers
  • XGBoost

Fingerprint

Dive into the research topics of 'Enhancing RLHF in LLMs: Comparing BERT, XGBoost, and Deep Models for Bias Detection'. Together they form a unique fingerprint.

Cite this