Adding Instructions during Pretraining: Effective Way of Controlling Toxicity in Language Models

Authors: Shrimai Prabhumoye, Mostofa Patwary, Mohammad Shoeybi, Bryan Catanzaro

This paper will be presented at EACL 2023
License: CC BY 4.0

Results of the summarizing process for the arXiv paper: 2302.07388v1

  • Comprehensive Summary
  • Key points
  • Layman's Summary
  • Blog article
In this study, the researchers propose two innovative strategies to reduce the toxicity of pretrained large language models (LMs) without compromising their utility. The first strategy, called MEDA, involves adding raw toxicity scores as meta-data to the pretraining samples. The second strategy, called INST, adds instructions in natural language form to indicate the toxicity of the samples. To obtain toxicity scores for each sample, the researchers use the widely accepted Commercial PerspectiveAPI. Since LMs have a maximum sequence length that is smaller than the size limit of PerspectiveAPI, they process documents in their dataset into samples of 2000 tokens before obtaining PerspectiveAPI scores. The researchers use a total of 15 datasets for their experiments including Common Crawl, The Pile, Books3, OpenWebText2, Stack Exchange, PubMed Abstracts, Wikipedia Gutenberg (PG-19), BookCorpus2 NIH ExPorter ArXiv GitHub and Pile-CC datasets which contribute to a corpus consisting of 339 billion tokens. The results show that INST strategy performs best in reducing toxicity probability by up to 61% while maintaining accuracy on five benchmark NLP tasks and improving AUC scores on four bias detection tasks by 1.3%. Additionally they demonstrate generalizability of their techniques by scaling number of training samples and model parameters. Overall this study presents an effective approach for controlling toxicity in LMs during pretraining by providing them with explicit instructions and incorporating toxicity scores as meta-data.
AI-generated keywords: Toxicity Language Models MEDA INST Pretraining

AI-generated Key Points

  • Two innovative strategies proposed to reduce toxicity of pretrained large language models (LMs):
  • MEDA: Adding raw toxicity scores as meta-data to pretraining samples
  • INST: Adding instructions in natural language form to indicate toxicity of samples
  • PerspectiveAPI used to obtain toxicity scores for each sample
  • LMs process documents into samples of 2000 tokens before obtaining PerspectiveAPI scores
  • 15 datasets used for experiments, contributing to a corpus consisting of 339 billion tokens
  • Results show that INST strategy reduces toxicity probability by up to 61% while maintaining accuracy on five benchmark NLP tasks and improving AUC scores on four bias detection tasks by 1.3%
  • Techniques demonstrated generalizability by scaling number of training samples and model parameters
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Abstract: Pretrained large language models have become indispensable for solving various natural language processing (NLP) tasks. However, safely deploying them in real world applications is challenging because they generate toxic content. To address this challenge, we propose two novel pretraining data augmentation strategies that significantly reduce model toxicity without compromising its utility. Our two strategies are: (1) MEDA: adds raw toxicity score as meta-data to the pretraining samples, and (2) INST: adds instructions to those samples indicating their toxicity. Our results indicate that our best performing strategy (INST) substantially reduces the toxicity probability up to 61% while preserving the accuracy on five benchmark NLP tasks as well as improving AUC scores on four bias detection tasks by 1.3%. We also demonstrate the generalizability of our techniques by scaling the number of training samples and the number of model parameters.

Submitted to arXiv on 14 Feb. 2023

Tools for this paper

Explain it differently 3 free rewrites left today
Export BibTeX · RIS (Zotero, Mendeley, EndNote) · Markdown (Notion, Obsidian) · Premium
Citation alerts Premium
Journal club Slides to present it Premium
For journalists Press kit and hype check Premium

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

Figures and plots

Ask about a figure by number or use its question button to request visual analysis. Up to two figures and four image panels per question. Values read from plots are approximate; check the original data.

AI assistant instructions?

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.