超越二元审核:利用大型语言模型识别 GitHub 上细粒度的性别歧视和厌女行为
Beyond Binary Moderation: Identifying Fine-Grained Sexist and Misogynistic Behavior on GitHub with Large Language Models
AI总结:
本文提出基于指令微调 LLM 和迭代提示优化的十二类细粒度性别歧视评论识别框架,在1,440条 GitHub 评论上验证,GPT-4o 的 MCC 达0.501并显著优于基线。
摘要:
背景:性别歧视和厌女行为严重阻碍了 GitHub 等技术社区的包容性,导致开发者(尤其是少数群体)因隐蔽偏见和微冒犯而离开。当前审核工具主要依赖关键词过滤或二元分类器,限制了其有效检测细微伤害的能力。目标:本研究提出一种细粒度的多类别分类框架,利用指令微调的大型语言模型(LLM)识别 GitHub 上十二种不同类别的性别歧视和厌女评论。方法:我们采用基于指令微调 LLM 的框架,在20轮迭代中系统优化提示词,并在涵盖十二个性别歧视/厌女类别的1,440条已标注 GitHub 评论上进行评估。使用精确率、召回率、F1分数和 Matthews 相关系数(MCC)严格比较模型性能。结果:我们的优化方案(GPT-4o 搭配 Prompt 19)取得0.501的 MCC,显著优于基线方法。尽管该模型误报率较低,但在可靠解释细微、依赖语境的性别歧视和厌女内容方面仍存在困难。结论:具有清晰定义和结构化输出的精心设计提示词可显著提高性别歧视检测的准确性和可解释性,从而在 GitHub 等开发者平台上实现精确且实用的审核。
英文摘要:
Background: Sexist and misogynistic behavior significantly hinders inclusion in technical communities like GitHub, causing developers, especially minorities, to leave due to subtle biases and microaggressions. Current moderation tools primarily rely on keyword filtering or binary classifiers, limiting their ability to detect nuanced harm effectively. Aims: This study introduces a fine-grained, multi-class classification framework that leverages instruction-tuned Large Language Models (LLMs) to identify twelve distinct categories of sexist and misogynistic comments on GitHub. Method: We utilized an instruction-tuned LLM-based framework with systematic prompt refinement across 20 iterations, evaluated on 1,440 labeled GitHub comments across twelve sexism/misogyny categories. Model performances were rigorously compared using precision, recall, F1-score, and the Matthews Correlation Coefficient (MCC). Results: Our optimized approach (GPT-4o with Prompt 19) achieved an MCC of 0.501, significantly outperforming baseline approaches. While this model had low false positives, it struggled to interpret nuanced, context-dependent sexism and misogyny reliably. Conclusion: Well-designed prompts with clear definitions and structured outputs significantly improve the accuracy and interpretability of sexism detection, enabling precise and practical moderation on developer platforms like GitHub.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。