PREADD: Prefix-Adaptive Decoding for Controlled Text Generation

Jonathan Pei, Kevin Yang, Dan Klein


Abstract
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.
Anthology ID:
2023.findings-acl.636
Volume:
Findings of the Association for Computational Linguistics: ACL 2023
Month:
July
Year:
2023
Address:
Toronto, Canada
Editors:
Anna Rogers, Jordan Boyd-Graber, Naoaki Okazaki
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
10018–10037
Language:
URL:
https://aclanthology.org/2023.findings-acl.636
DOI:
10.18653/v1/2023.findings-acl.636
Bibkey:
Cite (ACL):
Jonathan Pei, Kevin Yang, and Dan Klein. 2023. PREADD: Prefix-Adaptive Decoding for Controlled Text Generation. In Findings of the Association for Computational Linguistics: ACL 2023, pages 10018–10037, Toronto, Canada. Association for Computational Linguistics.
Cite (Informal):
PREADD: Prefix-Adaptive Decoding for Controlled Text Generation (Pei et al., Findings 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.findings-acl.636.pdf
Video:
 https://aclanthology.org/2023.findings-acl.636.mp4