語言模型中的公平性與安全性:基於條件式自監督對比學習的偏差改善與擴散模型之毒性評估
Fairness and Safety in Language Models: Conditional Self-supervised Contrastive Learning for Bias Mitigation and Toxicity Assessment of Diffusion Models
摘要
這篇論文探討了文字 AI 中公平性與安全性的議題,聚焦在文字分類模型和文字生成模型。這個研究分為兩大主要貢獻:改善文字分類中的偏見,以及評估擴散語言模型的毒性。
在改善文字分類中的偏見方面,這篇論文提出了一種條件式自監督調整的對比損失函數,主要在改善文字分類中公平性與準確性之間的權衡。文字分類經常會放大從大量訓練數據集中擷取到的偏見,導致不公平的決策或在不同群體間出現不相等的錯誤率。條件式監督對比學習迫使文字編碼器學習較少與敏感特徵糾纏的表徵,透過負樣本進行以敏感特徵為條件來優化這些樣本,將具有相同敏感特徵的樣本彼此推開,除非它們是同一資料的擴增資料。
在擴散模型毒性評估方面,本論文開發了一個框架來評估生成模型的公平性與安全性 。建立RealToxicityPrompts with Attributes資料集,該資料集是透過結合大型語言模型和字典,標記現有毒性提示詞中特定的特徵群體(例如:種族_黑人, 性別_女性)。評估流程使用 HateBERT 模型來評分 LLaDA-8B 和其他基準自迴歸基準模型(LLaMA 3.1 8B, Mistral 7B v0.3, Qwen 2.5 7B)所生成的文字毒性。
在改善文字分類中的偏見方面,這篇論文提出了一種條件式自監督調整的對比損失函數,主要在改善文字分類中公平性與準確性之間的權衡。文字分類經常會放大從大量訓練數據集中擷取到的偏見,導致不公平的決策或在不同群體間出現不相等的錯誤率。條件式監督對比學習迫使文字編碼器學習較少與敏感特徵糾纏的表徵,透過負樣本進行以敏感特徵為條件來優化這些樣本,將具有相同敏感特徵的樣本彼此推開,除非它們是同一資料的擴增資料。
在擴散模型毒性評估方面,本論文開發了一個框架來評估生成模型的公平性與安全性 。建立RealToxicityPrompts with Attributes資料集,該資料集是透過結合大型語言模型和字典,標記現有毒性提示詞中特定的特徵群體(例如:種族_黑人, 性別_女性)。評估流程使用 HateBERT 模型來評分 LLaDA-8B 和其他基準自迴歸基準模型(LLaMA 3.1 8B, Mistral 7B v0.3, Qwen 2.5 7B)所生成的文字毒性。
This thesis addresses critical issues of fairness and safety in text-based AI, focusing on both classification and generative models. The work is divided into two main contributions: mitigating bias in text classification and assessing the toxicity of diffusion-based language models (DLMs).
For bias mitigation in text classification, this thesis introduces Conditional Self-Supervised Adjusted InfoNCE (CSS-ADNCE), a novel contrastive loss function designed to improve the fairness and performance trade-off. Text classifiers frequently amplify bias picked up from large training datasets, leading to unfair decisions or unequal error rates across different demographic groups. CSS-ADNCE is an extension of Conditional Supervised Contrastive Learning that forces the text encoder to learn representations less entangled with sensitive attributes. It refines negative samples by conditioning on the sensitive attribute, pushing samples with the same sensitive attribute apart unless they are augmentations of the same input.
For Toxicity Assessment of DLMs, the thesis developed a robust framework for assessing generation-level fairness and safety. The RealToxicityPrompts with Attributes dataset was created by automatically tagging existing toxicity prompts with specific social identity groups (e.g., RACE_BLACK, GENDER_WOMAN) using a combination of large language models (LLMs) and a comprehensive lexicon. The established evaluation pipeline uses the HateBERT classifier to score the toxicity of text generated by DLMs (specifically, LLaDA-8B) and autoregressive baselines (LLaMA 3.1 8B, Mistral 7B v0.3, Qwen 2.5 7B).
For bias mitigation in text classification, this thesis introduces Conditional Self-Supervised Adjusted InfoNCE (CSS-ADNCE), a novel contrastive loss function designed to improve the fairness and performance trade-off. Text classifiers frequently amplify bias picked up from large training datasets, leading to unfair decisions or unequal error rates across different demographic groups. CSS-ADNCE is an extension of Conditional Supervised Contrastive Learning that forces the text encoder to learn representations less entangled with sensitive attributes. It refines negative samples by conditioning on the sensitive attribute, pushing samples with the same sensitive attribute apart unless they are augmentations of the same input.
For Toxicity Assessment of DLMs, the thesis developed a robust framework for assessing generation-level fairness and safety. The RealToxicityPrompts with Attributes dataset was created by automatically tagging existing toxicity prompts with specific social identity groups (e.g., RACE_BLACK, GENDER_WOMAN) using a combination of large language models (LLMs) and a comprehensive lexicon. The established evaluation pipeline uses the HateBERT classifier to score the toxicity of text generated by DLMs (specifically, LLaDA-8B) and autoregressive baselines (LLaMA 3.1 8B, Mistral 7B v0.3, Qwen 2.5 7B).
所屬典藏
資訊管理研究所引用此條目
Wang, P.-H. (2025). Fairness and Safety in Language Models: Conditional Self-supervised Contrastive Learning for Bias Mitigation and Toxicity Assessment of Diffusion Models. https://thesis.lib.nycu.edu.tw/handle/20.500.14371/87785
引用文字依 APA 第 7 版格式自動產生,使用前請再核對。
分享
永久網址:https://thesis.lib.nycu.edu.tw/handle/20.500.14371/87785