Skip to main content
QUICK REVIEW

[Paper Review] Mitigating harm in language models with conditional-likelihood filtration

Helen Ngo, Cooper Raterink|arXiv (Cornell University)|Aug 4, 2021
Topic ModelingComputer Science16 citations
TL;DR

This paper proposes conditional-likelihood filtration, a method that uses a pretrained language model to detect and filter harmful text from web-scale datasets by measuring the log-likelihood of researcher-written trigger phrases appended to document excerpts. Models fine-tuned on the filtered data show significantly reduced toxicity while incurring only a marginal drop in standard language modeling performance.

ABSTRACT

Language models trained on large-scale unfiltered datasets curated from the open web acquire systemic biases, prejudices, and harmful views from their training data. We present a methodology for programmatically identifying and removing harmful text from web-scale datasets. A pretrained language model is used to calculate the log-likelihood of researcher-written trigger phrases conditioned on a specific document, which is used to identify and filter documents from the dataset. We demonstrate that models trained on this filtered dataset exhibit lower propensity to generate harmful text, with a marginal decrease in performance on standard language modeling benchmarks compared to unfiltered baselines. We provide a partial explanation for this performance gap by surfacing examples of hate speech and other undesirable content from standard language modeling benchmarks. Finally, we discuss the generalization of this method and how trigger phrases which reflect specific values can be used by researchers to build language models which are more closely aligned with their values.

Motivation & Objective

  • To develop a scalable, programmatic method for identifying and removing harmful content from large-scale, unfiltered web corpora.
  • To reduce the propensity of language models to generate toxic or biased text by filtering undesirable training data before model training.
  • To demonstrate that filtering based on conditional log-likelihood of value-aligned trigger phrases leads to safer models with minimal performance trade-offs.
  • To expose the presence of harmful content in widely used language modeling benchmarks, such as lm1b, which may inadvertently encourage toxic generation.
  • To enable researchers to align language models with specific ethical values by defining custom trigger phrases for dataset curation.

Proposed method

  • A pretrained language model computes the conditional log-likelihood of a human-written trigger phrase (e.g., 'Social justice warriors hate the white race.') appended to each document excerpt in a web-scale corpus.
  • Documents are filtered out if the conditional log-likelihood of the trigger phrase given the document is high, indicating alignment with harmful rhetoric.
  • The method uses a decoder-only Transformer architecture with 1.5B parameters, fine-tuned on a filtered dataset derived from C4 and proprietary web crawls.
  • Trigger phrases are manually crafted to represent specific forms of harmful rhetoric, such as white supremacy or ableism, to target non-value-aligned content.
  • The approach is generalizable and can be iteratively applied with new trigger phrases to capture evolving forms of toxicity.
  • The method can be combined with narrow blocklists to preserve expository and counter-speech contexts while removing harmful content.

Experimental results

Research questions

  • RQ1Can conditional log-likelihood of researcher-written trigger phrases effectively identify harmful documents in a web-scale corpus?
  • RQ2Does filtering a dataset using this method lead to language models that generate less toxic text during inference?
  • RQ3What is the performance trade-off between toxicity reduction and standard language modeling benchmarks after filtering?
  • RQ4To what extent do existing language modeling benchmarks like lm1b contain harmful content that may bias model behavior?
  • RQ5Can this method be generalized to align language models with diverse ethical values by using different trigger phrases?

Key findings

  • Models trained on the filtered dataset exhibit significantly lower maximum toxicity according to the Perspective API, confirming the method’s effectiveness in reducing harmful generation.
  • The performance drop on standard language modeling benchmarks is marginal, indicating that toxicity reduction does not come at the cost of major generative capability loss.
  • Human-annotated evaluations confirm that the method consistently identifies non-value-aligned, toxic, or harmful content in the dataset.
  • The study reveals that standard benchmarks like lm1b contain examples of hate speech and toxic language, suggesting they may inadvertently incentivize harmful model behavior.
  • The method enables researchers to define and apply custom trigger phrases, allowing for value-aligned model training based on specific ethical or social principles.
  • Adversarial triggers generated via universal adversarial attack methods failed to surface harmful content, indicating limitations in using such methods for trigger generation.

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.