Online hate detection suffers from biases incurred in data sampling, annotation, and model pre-training. Therefore, measuring the averaged performance over all examples in held-out test data is inadequate. Instead, we must identify specific model weaknesses and be informed when it is more likely to fail. A recent proposal in this direction is HateCheck, a suite for testing fine-grained model functionalities on synthesized data generated using templates of the kind "You are just a [slur] to me." However, despite enabling more detailed diagnostic insights, the HateCheck test cases are often generic and have simplistic sentence structures that do not match the real-world data. To address this limitation, we propose GPT-HateCheck, a framework to generate more diverse and realistic functional tests from scratch by instructing large language models (LLMs). We employ an additional natural language inference (NLI) model to verify the generations. Crowd-sourced annotation demonstrates that the generated test cases are of high quality. Using the new functional tests, we can uncover model weaknesses that would be overlooked using the original HateCheck dataset.
翻译:在线仇恨检测在数据采样、标注和模型预训练过程中存在偏差问题。因此,仅通过计算保留测试集上所有样本的平均性能来评估存在不足。我们需要识别模型的具体缺陷,并了解其更可能失效的情形。最近提出的HateCheck方案通过使用"你对我来说只是个[贬称]"这类模板生成的合成数据,实现了对模型细粒度功能的测试。然而,尽管该方案能提供更详细的诊断结果,其测试用例通常较为通用且句式结构简单,与实际数据存在差异。针对这一局限,我们提出GPT-HateCheck框架,通过指导大语言模型(LLM)从零生成更丰富且逼真的功能测试用例。此外,我们采用额外的自然语言推理(NLI)模型对生成内容进行验证。众包标注结果表明,生成的测试用例具有高质量。借助这些新型功能测试,我们能够发现原始HateCheck数据集所忽略的模型缺陷。