Goodtriever: Adaptive Toxicity Mitigation with Retrieval-augmented Models

Luiza Pozzobon, Beyza Ermis, Patrick Lewis, Sara Hooker
10/11/2023
cs.AI

No official code found. Best implementation: Cohere-Labs-Community/goodtriever (25 stars, last commit 2024-05-30).

Abstract

Considerable effort has been dedicated to mitigating toxicity, but existing methods often require drastic modifications to model parameters or the use of computationally intensive auxiliary models. Furthermore, previous approaches have often neglected the crucial factor of language's evolving nature over time. In this work, we present a comprehensive perspective on toxicity mitigation that takes into account its changing nature. We introduce Goodtriever, a flexible methodology that matches the current state-of-the-art toxicity mitigation while achieving 43% relative latency reduction during inference and being more computationally efficient. By incorporating a retrieval-based approach at decoding time, Goodtriever enables toxicity-controlled text generation. Our research advocates for an increased focus on adaptable mitigation techniques, which better reflect the data drift models face when deployed in the wild. Code and data are available at https://github.com/for-ai/goodtriever.

View on arXivView PDF

Code Implementations(1)

Code for "Goodtriever: Toxicity Mitigation with Retrieval-augmented Language Models"

253Shell, PythonNov 10, 20232 years ago

Similar Papers

Cite this paper

@article{pozzobon2023goodtriever,
  title  = {Goodtriever: Adaptive Toxicity Mitigation with Retrieval-augmented Models},
  author = {Luiza Pozzobon and Beyza Ermis and Patrick Lewis and Sara Hooker},
  year   = {2023},
  eprint = {2310.07589},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.07589v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.07589.svg)](https://codeofpaper.com/paper/2310.07589)

Discussion