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。为展示我们系统的价值,我们在四种标签分布下的内容审核场景中,对文本分类系统进行了全面研究。