xxupiano
BiasFreeBench
Python

[ICLR 2026] BiasFreeBench: a Benchmark for Mitigating Bias in Large Language Model Responses

Last updated Mar 30, 2026
11
Stars
1
Forks
0
Issues
0
Stars/day
Attention Score
15
Language breakdown
Python 94.9%
Shell 5.1%
โ–ธ Files click to expand
README

BiasFreeBench: a Benchmark for Mitigating Bias in Large Language Model Responses

๐Ÿ“ƒ Paper ๐Ÿ’ป Code

BiasFreeBench is an empirical benchmark that comprehensively compares eight mainstream bias mitigation techniques (covering four prompting-based and four training-based methods) on two test scenarios (multi-choice QA and open-ended multi-turn QA) by reorganizing existing datasets into a unified query-response setting. We hope that this benchmark can serve as a unified testbed for bias mitigation methods.


๐Ÿ“Œ Table of Contents


๐Ÿ› ๏ธ Setup

conda create -n biasfree python=3.12 -y && conda activate biasfree
pip install vllm==0.8.5 deepspeed==0.15.4 pandas wandb
  • Install LLaMA-Factory following https://github.com/hiyouga/LlamaFactory?tab=readme-ov-file#installation
  • BiasFreeBench-BBQ: https://huggingface.co/datasets/XinXuNLPer/BiasFreeBench-BBQ
  • BiasFreeBench-FairMT-Bench: https://huggingface.co/datasets/XinXuNLPer/BiasFreeBench-FairMT-Bench

๐Ÿ’ฌ Prompting-based Methods and Evaluation

  • Some example scripts, covering all debiasing methods explored in BiasFreeBench, for Llama-3.1-8B-Instruct is in BBQ/scripts/llama.sh and FairMT-Bench/scripts/llama.sh
  • When using a reasoning LLM, please set --maxoutputlen, --temperature, --topp, --topk, and --minp as the official suggestions of the corresponding models. For example, for Qwen3-8B, we set --maxoutputlen 32768 --temperature 0.6 --topp 0.95 --topk 20 --minp 0 based on the sampling parameters suggested in the Qwen-3B model card.

๐Ÿ’ป Training-based Methods

Following LLaMA-Factory, we provide the data and scripts.

cp Training/data/* LLaMA-Factory/data
cp -r Training/examples/debias LLaMA-Factory/examples
cp -r Training/scripts LLaMA-Factory/scripts
cd LLaMA-Factory

SFT and DPO

Configurations are in examples/debias. There are example scripts for Llama-3.1-8B-Instruct in scripts/llama.sh

Task Vector

  • Full SFT with LLaMA-Factory and the example script examples/debias/debiasfullsftllamatv.yaml
  • cd Task_Vector
  • git clone https://github.com/mlfoundations/task_vectors.git
  • cp * taskvectors/src, cd taskvectors/src
  • Modify the model paths in test.sh and then run bash test.sh

Safe Alignment

Follow Safe RLHF with the 2 training stages:

  • Value Models (reward model & cost model): --modelnameorpath is a path/model name from HuggingFace of the instruction-tuned models, such as meta-llama/Llama-3.1-8B-Instruct and Qwen/Qwen2.5-7B-Instruct.
  • Safe-RLHF: --actormodelnameorpath is a path/model name from HuggingFace of the instruction-tuned models.
An example of commands to run the whole pipeline with Llama-3.1-8B-Instruct is as follows:
git clone https://github.com/PKU-Alignment/safe-rlhf.git
cd safe-rlhf
conda env create --file conda-recipe.yaml
conda activate safe-rlhf
bash scripts/reward-model.sh --modelnameorpath meta-llama/Llama-3.1-8B-Instruct --outputdir output/rm
bash scripts/cost-model.sh --modelnameorpath meta-llama/Llama-3.1-8B-Instruct --outputdir output/cm
bash scripts/ppo-lag.sh \
    --actormodelnameorpath meta-llama/Llama-3.1-8B-Instruct \
    --rewardmodelnameorpath output/rm \
    --costmodelnameorpath output/cm \
    --output_dir output/ppo-lag


๐Ÿ“ Citation

@article{biasfreebench25,
    title={BiasFreeBench: a Benchmark for Mitigating Bias in Large Language Model Responses},
    author={Xin Xu, Xunzhi He, Churan Zhi, Ruizhe Chen, Julian McAuley, Zexue He},
    year={2025},
    url={https://arxiv.org/pdf/2510.00232}
}

โœจ Acknowledgements

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท xxupiano/BiasFreeBench ยท Updated daily from GitHub