Skip to main content
QUICK REVIEW

[Paper Review] Adapting Large Language Models for Content Moderation: Pitfalls in Data Engineering and Supervised Fine-tuning

Huan Ma, Changqing Zhang|arXiv (Cornell University)|Oct 5, 2023
Hate Speech and Cyberbullying DetectionComputer Science6 citations
TL;DR

This paper proposes a supervised fine-tuning approach for privately deployed large language models (LLMs) in content moderation, integrating reasoning chains from powerful LLMs like GPT-4 to improve robustness and interpretability. The method significantly enhances model generalization, achieving performance comparable to GPT-3.5 while enabling domain-specific, compliant, and cost-effective moderation systems.

ABSTRACT

Nowadays, billions of people engage in communication and express their opinions on the internet daily. Unfortunately, not all of these expressions are friendly or compliant, making content moderation an indispensable task. A common approach is to use a discriminative model to classify the content, but this method often requires strict data engineering, otherwise it will face unacceptable overfitting. With the successful development of Large Language Models (LLMs) in recent years, LLM-based methods have become a feasible solution for handling tasks in various domains. Thanks to the knowledge of the foundation models, we can develop more robust privately deployed models with limited data via fine-tuning these foundation models. Moreover, as a generative model, it can provide detailed analysis of the review process, enhancing interpretability. In this paper, we introduce how to fine-tune a LLM model that can be privately deployed for content moderation. Specifically, we discuss the differences between discriminative and generative models using content moderation as an example. Additionally, we reveal that incorporating reasoning processes during the fine-tuning of LLMs can effectively alleviate overfitting, even if the model is not allowed to directly output reasoning processes during deployment. We present a complete process, from data collection and construction to model training and overfitting elimination, for fine-tuning LLMs in vertical domain deployments. We report the entire research process and the key findings in this paper, hoping to provide valuable experience for researchers who are fine-tuning privately deployed models in their domain-specific research.

Motivation & Objective

  • To develop a private, domain-specific content moderation system using fine-tuned LLMs that meet compliance and cost constraints.
  • To investigate whether incorporating reasoning chains during fine-tuning improves model robustness and interpretability compared to direct classification.
  • To evaluate the impact of weak supervision using LLM-generated reasoning on fine-tuning performance with minimal human annotation.
  • To analyze data engineering choices in SFT, including handling incorrect reasoning outputs from source LLMs.
  • To provide a systematic, reproducible framework for deploying fine-tuned LLMs in real-world content moderation scenarios.

Proposed method

  • Fine-tune a privately deployed LLM using supervised fine-tuning (SFT) with data that includes both moderation labels and reasoning chains (chain-of-thought) generated by a powerful LLM like GPT-4.
  • Use weak supervision by leveraging GPT-4 to generate reasoning processes for training data, reducing reliance on expensive human-annotated chains.
  • Design data engineering pipelines to handle incorrect or inconsistent reasoning outputs from GPT-4, evaluating multiple filtering and correction strategies.
  • Compare SFT with and without reasoning chains to assess their impact on model generalization and out-of-distribution robustness.
  • Implement a two-stage process: first, generate reasoning-augmented training data using GPT-4; second, fine-tune the target LLM on this data using standard SFT objectives.
  • Evaluate model performance on standard content moderation benchmarks, measuring accuracy, robustness, and interpretability of outputs.
Figure 1: Content Moderation with Auditing Processes. GPT-4 can provide complete auditing processes (left), but sometimes it presents limitations (right).
Figure 1: Content Moderation with Auditing Processes. GPT-4 can provide complete auditing processes (left), but sometimes it presents limitations (right).

Experimental results

Research questions

  • RQ1Does incorporating reasoning chains during fine-tuning improve the generalization and robustness of privately deployed LLMs in content moderation?
  • RQ2How does weak supervision using GPT-4-generated reasoning chains affect fine-tuning performance when human-annotated chains are scarce?
  • RQ3What is the impact of incorrect or hallucinated reasoning outputs from source LLMs on the final fine-tuned model’s performance?
  • RQ4How do different data engineering strategies for handling flawed reasoning chains influence model reliability and interpretability?
  • RQ5Can a privately deployed LLM achieve performance comparable to GPT-3.5 in content moderation when trained with reasoning-augmented data?

Key findings

  • Fine-tuning with reasoning chains significantly improves model generalization and out-of-distribution robustness compared to direct classification fine-tuning.
  • Using GPT-4-generated reasoning chains as weak supervision enables high performance with minimal human annotation, reducing data preparation costs.
  • Incorrect reasoning outputs from GPT-4 degrade model performance, but careful data filtering and correction strategies can mitigate this impact.
  • The model fine-tuned with reasoning chains achieves performance on par with GPT-3.5 on content moderation benchmarks, demonstrating strong competitive capability.
  • Incorporating reasoning processes enhances interpretability, enabling transparent auditing of moderation decisions.
  • The study demonstrates that reasoning-augmented SFT is a viable, scalable, and compliant alternative to relying on third-party LLMs for content moderation.
Figure 2: Framework of fine-tuing privately deployed content moderation model. Fine-tuning LLMs with the pattern $(x_{i},y_{i})$ can lead to severe overfitting. For instance, sentences that contain regional characteristics will be classified into Discrimination or Insult. Incorporating an auditing p
Figure 2: Framework of fine-tuing privately deployed content moderation model. Fine-tuning LLMs with the pattern $(x_{i},y_{i})$ can lead to severe overfitting. For instance, sentences that contain regional characteristics will be classified into Discrimination or Insult. Incorporating an auditing p

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.