Classification is a RAG problem: A case study on hate speech detection
- URL: http://arxiv.org/abs/2508.06204v1
- Date: Fri, 08 Aug 2025 10:35:41 GMT
- Title: Classification is a RAG problem: A case study on hate speech detection
- Abstract summary: We present classification using Retrieval-Augmented Generation (RAG)<n>RAG shifts traditional classification tasks to evaluate content in relation to contextual knowledge retrieved at inference.<n>In hate speech detection, this transforms the task from "is this hate speech?" to "does this violate the hate speech policy?"
- Score: 6.716186124523375
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Robust content moderation requires classification systems that can quickly adapt to evolving policies without costly retraining. We present classification using Retrieval-Augmented Generation (RAG), which shifts traditional classification tasks from determining the correct category in accordance with pre-trained parameters to evaluating content in relation to contextual knowledge retrieved at inference. In hate speech detection, this transforms the task from "is this hate speech?" to "does this violate the hate speech policy?" Our Contextual Policy Engine (CPE) - an agentic RAG system - demonstrates this approach and offers three key advantages: (1) robust classification accuracy comparable to leading commercial systems, (2) inherent explainability via retrieved policy segments, and (3) dynamic policy updates without model retraining. Through three experiments, we demonstrate strong baseline performance and show that the system can apply fine-grained policy control by correctly adjusting protection for specific identity groups without requiring retraining or compromising overall performance. These findings establish that RAG can transform classification into a more flexible, transparent, and adaptable process for content moderation and wider classification problems.
Related papers
- LLM-as-a-Tutor: Policy-Aware Prompt Adaptation for Non-Verifiable RL [64.4276583943816]
Reinforcement learning for non-verifiable instruction relies on judges with prompt-specific rubrics as reward signals.<n>While recent methods adapt these rubrics to the evolving policy during training, the training prompts themselves remain static.<n>This static approach often results in a critical misalignment between prompt difficulty and policy capability, leaving the judge unable to recover a discriminative reward signal.
arXiv Detail & Related papers (2026-07-05T17:05:13Z) - Group-Adaptive Adversarial Learning for Robust Fake News Detection Against Malicious Comments [27.972596335576345]
We present a group-adaptive adversarial training strategy to improve the robustness of fake news detectors.<n>Our method maintains strong detection accuracy while substantially increasing robustness to a wide range of adversarial comment perturbations.
arXiv Detail & Related papers (2025-10-10T04:39:57Z) - GLiClass: Generalist Lightweight Model for Sequence Classification Tasks [49.2639069781367]
We propose GLiClass, a novel method that adapts the GLiNER architecture for sequence classification tasks.<n>Our approach achieves strong accuracy and efficiency comparable to embedding-based methods, while maintaining the flexibility needed for zero-shot and few-shot learning scenarios.
arXiv Detail & Related papers (2025-08-11T06:22:25Z) - Towards Trustworthy Multimodal Moderation via Policy-Aligned Reasoning and Hierarchical Labeling [22.914127076888086]
Hi-Guard is a multimodal moderation framework that introduces a new policy-aligned decision paradigm.<n>To ensure alignment with evolving moderation policies, Hi-Guard directly incorporates rule definitions into the model prompt.<n>Experiments and real-world deployment demonstrate that Hi-Guard achieves superior classification accuracy, generalization, and interpretability.
arXiv Detail & Related papers (2025-08-05T10:16:04Z) - Decomposed Reasoning with Reinforcement Learning for Relevance Assessment in UGC Platforms [30.51899823655511]
Retrieval-augmented generation (RAG) plays a critical role in user-generated content platforms.<n> platforms present unique challenges: 1) ambiguous user intent due to sparse user feedback in RAG scenarios, and 2) substantial noise introduced by informal and unstructured language.
arXiv Detail & Related papers (2025-08-04T15:14:09Z) - Benchmarking Unified Face Attack Detection via Hierarchical Prompt Tuning [58.16354555208417]
PAD and FFD are proposed to protect face data from physical media-based Presentation Attacks and digital editing-based DeepFakes, respectively.<n>The lack of a Unified Face Attack Detection model to simultaneously handle attacks in these two categories is mainly attributed to two factors.<n>We present a novel Visual-Language Model-based Hierarchical Prompt Tuning Framework that adaptively explores multiple classification criteria from different semantic spaces.
arXiv Detail & Related papers (2025-05-19T16:35:45Z) - Know3-RAG: A Knowledge-aware RAG Framework with Adaptive Retrieval, Generation, and Filtering [9.814926166669366]
We propose Know3-RAG, a knowledge-aware RAG framework that leverages structured knowledge from knowledge graphs (KGs) to guide three core stages of the RAG process, including retrieval, generation, and filtering.<n> Experiments on multiple open-domain QA benchmarks demonstrate that Know3-RAG consistently outperforms strong baselines, significantly reducing hallucinations and enhancing answer reliability.
arXiv Detail & Related papers (2025-05-19T03:25:18Z) - Class-RAG: Real-Time Content Moderation with Retrieval Augmented Generation [15.298017013140385]
We propose a Classification approach employing Retrieval-Augmented Generation (Class-RAG)<n>Compared to model fine-tuning, Class-RAG demonstrates flexibility and transparency in decision-making, outperforms on classification and is more robust against adversarial attack.<n>Our findings also suggest that Class-RAG performance scales with retrieval library size, indicating that increasing the library size is a viable and low-cost approach to improve content moderation.
arXiv Detail & Related papers (2024-10-18T22:07:36Z) - Text generation for dataset augmentation in security classification
tasks [55.70844429868403]
This study evaluates the application of natural language text generators to fill this data gap in multiple security-related text classification tasks.
We find substantial benefits for GPT-3 data augmentation strategies in situations with severe limitations on known positive-class samples.
arXiv Detail & Related papers (2023-10-22T22:25:14Z) - Class-Specific Variational Auto-Encoder for Content-Based Image
Retrieval [95.42181254494287]
We propose a regularized loss for Variational Auto-Encoders (VAEs) forcing the model to focus on a given class of interest.
As a result, the model learns to discriminate the data belonging to the class of interest from any other possibility.
Experimental results show that the proposed method outperforms its competition in both in-domain and out-of-domain retrieval problems.
arXiv Detail & Related papers (2023-04-23T19:51:25Z) - Explainable Abuse Detection as Intent Classification and Slot Filling [66.80201541759409]
We introduce the concept of policy-aware abuse detection, abandoning the unrealistic expectation that systems can reliably learn which phenomena constitute abuse from inspecting the data alone.
We show how architectures for intent classification and slot filling can be used for abuse detection, while providing a rationale for model decisions.
arXiv Detail & Related papers (2022-10-06T03:33:30Z) - Classification with Rejection Based on Cost-sensitive Classification [83.50402803131412]
We propose a novel method of classification with rejection by ensemble of learning.
Experimental results demonstrate the usefulness of our proposed approach in clean, noisy, and positive-unlabeled classification.
arXiv Detail & Related papers (2020-10-22T14:05:05Z) - Policy Entropy for Out-of-Distribution Classification [8.747840760772268]
We propose PEOC, a new policy entropy based out-of-distribution classifier.
It reliably detects unencountered states in deep reinforcement learning.
It is highly competitive against state-of-the-art one-class classification algorithms.
arXiv Detail & Related papers (2020-05-25T12:18:20Z) - Fine-Grained Visual Classification with Efficient End-to-end
Localization [49.9887676289364]
We present an efficient localization module that can be fused with a classification network in an end-to-end setup.
We evaluate the new model on the three benchmark datasets CUB200-2011, Stanford Cars and FGVC-Aircraft.
arXiv Detail & Related papers (2020-05-11T14:07:06Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.