Modern text classification systems have impressive capabilities but are infeasible to deploy and use reliably due to their dependence on prompting and billion-parameter language models. SetFit (Tunstall et al., 2022) is a recent, practical approach that fine-tunes a Sentence Transformer under a contrastive learning paradigm and achieves similar results to more unwieldy systems. Text classification is important for addressing the problem of domain drift in detecting harmful content, which plagues all social media platforms. Here, we propose Like a Good Nearest Neighbor (LaGoNN), an inexpensive modification to SetFit that requires no additional parameters or hyperparameters but modifies input with information about its nearest neighbor, for example, the label and text, in the training data, making novel data appear similar to an instance on which the model was optimized. LaGoNN is effective at the task of detecting harmful content and generally improves performance compared to SetFit. To demonstrate the value of our system, we conduct a thorough study of text classification systems in the context of content moderation under four label distributions.
翻译:现代文本分类系统具备令人瞩目的能力,但由于依赖提示工程和数十亿参数的语言模型,使其难以可靠地部署和使用。SetFit(Tunstall等人,2022)是一种近期提出的实用方法,该方法在对比学习范式下微调句子变换器,并取得了与更复杂系统相似的结果。文本分类对于解决检测有害内容时的领域漂移问题至关重要,这一难题困扰着所有社交媒体平台。本文提出"像一位好邻居"(LaGoNN),这是一种对SetFit的低成本改进方案,无需增加额外参数或超参数,但通过将训练数据中近邻的信息(例如标签和文本)融入输入,使新数据看起来类似于模型已优化的样本。LaGoNN在检测有害内容任务中表现优异,整体性能优于SetFit。为验证该系统的价值,我们在四种标签分布下的内容审核场景中,对文本分类系统开展了全面研究。