BeamR: Beam Reweighing with Attribute Discriminators for Controllable Text Generation

David Landsman, Jerry Zikun Chen, Hussain Zaidi


Abstract
Recent advances in natural language processing have led to the availability of large pre-trained language models (LMs), with rich generative capabilities. Although these models are able to produce fluent and coherent text, it remains a challenge to control various attributes of the generation, including sentiment, formality, topic and many others. We propose a Beam Reweighing (BeamR) method, building on top of standard beam search, in order to control different attributes. BeamR combines any generative LM with any attribute discriminator, offering full flexibility of generation style and attribute, while the beam search backbone maintains fluency across different domains. Notably, BeamR allows practitioners to leverage pre-trained models without the need to train generative LMs together with discriminators. We evaluate BeamR in two diverse tasks: sentiment steering, and machine translation formality. Our results show that BeamR performs on par with or better than existing state-of-the-art approaches (including fine-tuned methods), and highlight the flexiblity of BeamR in both causal and seq2seq language modeling tasks.
Anthology ID:
2022.findings-aacl.40
Volume:
Findings of the Association for Computational Linguistics: AACL-IJCNLP 2022
Month:
November
Year:
2022
Address:
Online only
Editors:
Yulan He, Heng Ji, Sujian Li, Yang Liu, Chua-Hui Chang
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
422–437
Language:
URL:
https://aclanthology.org/2022.findings-aacl.40
DOI:
Bibkey:
Cite (ACL):
David Landsman, Jerry Zikun Chen, and Hussain Zaidi. 2022. BeamR: Beam Reweighing with Attribute Discriminators for Controllable Text Generation. In Findings of the Association for Computational Linguistics: AACL-IJCNLP 2022, pages 422–437, Online only. Association for Computational Linguistics.
Cite (Informal):
BeamR: Beam Reweighing with Attribute Discriminators for Controllable Text Generation (Landsman et al., Findings 2022)
Copy Citation:
PDF:
https://aclanthology.org/2022.findings-aacl.40.pdf