Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

PREADD: Prefix-Adaptive Decoding for Controlled Text Generation

About

We propose Prefix-Adaptive Decoding (PREADD), a flexible method for controlled text generation. Unlike existing methods that use auxiliary expert models to control for attributes, PREADD does not require an external model, instead relying on linearly combining output logits from multiple prompts. Specifically, PREADD contrasts the output logits generated using a raw prompt against those generated using a prefix-prepended prompt, enabling both positive and negative control with respect to any attribute encapsulated by the prefix. We evaluate PREADD on three tasks -- toxic output mitigation, gender bias reduction, and sentiment control -- and find that PREADD outperforms not only prompting baselines, but also an auxiliary-expert control method, by 12% or more in relative gain on our main metrics for each task.

Jonathan Pei, Kevin Yang, Dan Klein• 2023

Related benchmarks

TaskDatasetResultRank
Sentiment transformationSentiment Transformation Task
Generation Speed (s/item)2.84
30
Toxicity MitigationToxicity Mitigation Task
Generation Speed (s/item)2.81
30
Sentiment transformationIMDB NegToPos 1.0 (test)
Relevance0.492
30
Sentiment transformationIMDB PosToNeg 1.0 (test)
Relevance0.48
30
Toxicity MitigationToxicTop
Relevance0.424
30
Toxicity MitigationToxicRandom
Relevance41.5
30
Toxicity MitigationRealToxicityPrompts (test)
Full Toxicity72.4
14
Sentiment transformationNegToPos average
Perplexity61.45
6
Sentiment transformationPosToNeg (average)
Perplexity62.6
6
Toxicity MitigationToxicRandom (test)
Perplexity47.39
6
Showing 10 of 18 rows

Other info

Code

Follow for update