Learn What NOT to Learn: Towards Generative Safety in Chatbots

Leila Khalatbari, Yejin Bang, Dan Su, Willy Chung, Saeed Ghadimi +2 more
4/21/2023
cs.CL

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Conversational models that are generative and open-domain are particularly susceptible to generating unsafe content since they are trained on web-based social data. Prior approaches to mitigating this issue have drawbacks, such as disrupting the flow of conversation, limited generalization to unseen toxic input contexts, and sacrificing the quality of the dialogue for the sake of safety. In this paper, we present a novel framework, named "LOT" (Learn NOT to), that employs a contrastive loss to enhance generalization by learning from both positive and negative training signals. Our approach differs from the standard contrastive learning framework in that it automatically obtains positive and negative signals from the safe and unsafe language distributions that have been learned beforehand. The LOT framework utilizes divergence to steer the generations away from the unsafe subspace and towards the safe subspace while sustaining the flow of conversation. Our approach is memory and time-efficient during decoding and effectively reduces toxicity while preserving engagingness and fluency. Empirical results indicate that LOT reduces toxicity by up to four-fold while achieving four to six-fold higher rates of engagingness and fluency compared to baseline models. Our findings are further corroborated by human evaluation.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{khalatbari2023learn,
  title  = {Learn What NOT to Learn: Towards Generative Safety in Chatbots},
  author = {Leila Khalatbari and Yejin Bang and Dan Su and Willy Chung and Saeed Ghadimi and Hossein Sameti and Pascale Fung},
  year   = {2023},
  eprint = {2304.11220},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.11220v2}
}

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/2304.11220.svg)](https://codeofpaper.com/paper/2304.11220)

Discussion