Detecting toxic content using language models is crucial yet challenging. While substantial progress has been made in English, toxicity detection in French remains underdeveloped, primarily due to the lack of culturally relevant, human-annotated, large-scale datasets. In this work, we release ToxiFrench, a dataset of 53,622 French online comments together with a balanced benchmark split for systematic evaluation. The dataset is constructed via a semi-automated annotation pipeline that reduces manual labeling to only 10% through high-confidence LLM-based pre-annotation and human verification, while ensuring statistical alignment with human-only annotation. We then benchmark a broad range of models and uncover a counterintuitive finding: Small Language Models (SLMs) often surpass larger models in robustness and generalization on this task. Motivated by this finding, we propose a novel Chain-of-Thought (CoT) fine-tuning strategy using a Dynamic Weighted Loss (DWL) that progressively emphasizes the model's final decision and significantly improves faithfulness. Our fine-tuned 4B model (Qwen3-4B) achieves state-of-the-art performance on the benchmark. It improves its balanced accuracy by 10% over its baseline and achieves better performance than GPT-4o and DeepSeek-R1 on our benchmark, while successfully retaining cross-lingual capabilities.


翻译:利用语言模型检测有害内容至关重要且具有挑战性。尽管英语毒性检测已取得显著进展,但法语毒性检测仍处于欠发达状态,主要原因是缺乏与文化相关、人工标注的大规模数据集。本研究中,我们发布了ToxiFrench数据集,包含53,622条法语在线评论及用于系统评估的平衡基准划分。该数据集通过半自动化标注流程构建,借助基于大语言模型的高置信度预标注和人工验证,将人工标注工作量降至仅10%,同时确保与纯人工标注的统计对齐。随后我们对广泛模型进行基准测试,发现了一个反直觉的现象:小型语言模型(SLMs)在此任务上的鲁棒性和泛化能力常优于更大规模模型。基于此发现,我们提出一种新颖的思维链(CoT)微调策略,采用动态加权损失(DWL)逐步强化模型的最终决策,显著提升了忠实度。我们微调的40亿参数模型(Qwen3-4B)在基准测试中取得了最先进的性能:其平衡准确率较基线提升10%,在基准测试中表现优于GPT-4o和DeepSeek-R1,同时成功保持了跨语言能力。

0
下载
关闭预览

相关内容

大语言模型评估技术研究进展
专知会员服务
48+阅读 · 2024年7月9日
深入理解BERT Transformer ,不仅仅是注意力机制
大数据文摘
22+阅读 · 2019年3月19日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关VIP内容
大语言模型评估技术研究进展
专知会员服务
48+阅读 · 2024年7月9日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员