arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.05532cs.CL
收藏

超越一刀切:基于上下文学习的个性化有害内容检测

Beyond One-Size-Fits-All: Personalized Harmful Content Detection with In-Context Learning

University of Science and Technology of China(科学技术大学)

Rufan Zhang, Lin Zhang, Xianghang Mi

AI总结:

本文提出基于基础模型上下文学习的个性化有害内容检测框架,统一处理毒性、垃圾信息和负面情绪检测,仅需少量示例或定义即可实现用户级个性化屏蔽,无需重新训练模型,并在多个基准上验证了其跨任务泛化能力和鲁棒性。

摘要:

有害在线内容——例如毒性、垃圾信息和负面情绪——的泛滥要求稳健且可适应的审核系统。然而,当前主流的审核系统是集中式且面向特定任务的,透明度有限,并忽视了多样化的用户偏好——这种方式不适合隐私敏感或去中心化环境。我们提出一种新颖框架,利用基础模型的上下文学习(ICL)来统一二分类、多分类和多标签场景下的毒性、垃圾信息和负面情绪检测。关键在于,我们的方法支持轻量级个性化,使用户能够通过简单的基于提示的干预轻松屏蔽新类别、解除屏蔽已有类别,或将检测扩展到语义变体——全程无需重新训练模型。在公开基准(TextDetox、UCI SMS、SST2)和一个新的带标注的Mastodon数据集上的大量实验表明:(i)基础模型实现了强大的跨任务泛化能力,通常能够匹敌或超越针对特定任务微调的模型;(ii)仅需一个用户提供的示例或定义即可实现有效的个性化;(iii)用标签定义或推理依据增强提示可显著提升对噪声真实世界数据的鲁棒性。我们的工作展示了超越一刀切审核模式的明确转变,确立了ICL作为下一代以用户为中心的内容安全系统的一条实用、保护隐私且高度可适应的路径。为促进可复现性并推动未来研究,我们在GitHub上公开发布代码,并在Hugging Face上发布带标注的Mastodon数据集。

英文摘要:

The proliferation of harmful online content--e.g., toxicity, spam, and negative sentiment--demands robust and adaptable moderation systems. However, prevailing moderation systems are centralized and task-specific, offering limited transparency and neglecting diverse user preferences--an approach ill-suited for privacy-sensitive or decentralized environments. We propose a novel framework that leverages in-context learning (ICL) with foundation models to unify the detection of toxicity, spam, and negative sentiment across binary, multi-class, and multi-label settings. Crucially, our approach enables lightweight personalization, allowing users to easily block new categories, unblock existing ones, or extend detection to semantic variations through simple prompt-based interventions--all without model retraining. Extensive experiments on public benchmarks (TextDetox, UCI SMS, SST2) and a new, annotated Mastodon dataset reveal that: (i) foundation models achieve strong cross-task generalization, often matching or surpassing task-specific fine-tuned models; (ii) effective personalization is achievable with as few as one user-provided example or definition; and (iii) augmenting prompts with label definitions or rationales significantly enhances robustness to noisy, real-world data. Our work demonstrates a definitive shift beyond one-size-fits-all moderation, establishing ICL as a practical, privacy-preserving, and highly adaptable pathway for the next generation of user-centric content safety systems. To foster reproducibility and facilitate future research, we publicly release our code on GitHub and the annotated Mastodon dataset on Hugging Face.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑