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

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.

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

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

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

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

AI assistant instructions?

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

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.
Created on 11 Jul. 2023

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

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

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.