A Plug-and-Play Method for Controlled Text Generation

被引:0
|
作者
Pascual, Damian [1 ]
Egressy, Beni [1 ]
Meister, Clara [1 ]
Cotterell, Ryan [1 ,2 ]
Wattenhofer, Roger [1 ]
机构
[1] Swiss Fed Inst Technol, Zurich, Switzerland
[2] Univ Cambridge, Cambridge, England
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Large pre-trained language models have repeatedly shown their ability to produce fluent text. Yet even when starting from a prompt, generation can continue in many plausible directions. Current decoding methods with the goal of controlling generation, e.g., to ensure specific words are included, either require additional models or fine-tuning, or work poorly when the task at hand is semantically unconstrained, e.g., story generation. In this work, we present a plug-and-play decoding method for controlled language generation that is so simple and intuitive, it can be described in a single sentence: given a topic or keyword, we add a shift to the probability distribution over our vocabulary towards semantically similar words. We show how annealing this distribution can be used to impose hard constraints on language generation, something no other plug-and-play method is currently able to do with SOTA language generators. Despite the simplicity of this approach, we see it works incredibly well in practice: decoding from GPT-2 leads to diverse and fluent sentences while guaranteeing the appearance of given guide words. We perform two user studies, revealing that (1) our method outperforms competing methods in human evaluations; and (2) forcing the guide words to appear in the generated text has no impact on the fluency of the generated text.
引用
收藏
页码:3973 / 3997
页数:25
相关论文
共 50 条
  • [1] An Extensible Plug-and-Play Method for Multi-Aspect Controllable Text Generation
    Huang, Xuancheng
    Liu, Zijun
    Li, Peng
    Li, Tao
    Sun, Maosong
    Liu, Yang
    [J]. PROCEEDINGS OF THE 61ST ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL 2023): LONG PAPERS, VOL 1, 2023, : 15233 - 15256
  • [2] PLUG-AND-PLAY
    STRASSBERG, D
    [J]. EDN, 1995, 40 (05) : 33 - &
  • [3] Counterfactual Sentence Generation with Plug-and-Play Perturbation
    Madaan, Nishtha
    Saha, Diptikalyan
    Bedathur, Srikanta
    [J]. 2023 IEEE CONFERENCE ON SECURE AND TRUSTWORTHY MACHINE LEARNING, SATML, 2023, : 306 - 315
  • [4] Plug-and-Play Regulators for Image-Text Matching
    Diao, Haiwen
    Zhang, Ying
    Liu, Wei
    Ruan, Xiang
    Lu, Huchuan
    [J]. IEEE TRANSACTIONS ON IMAGE PROCESSING, 2023, 32 : 2322 - 2334
  • [5] Plug-and-Play generation and manipulation of squeezing on chip
    Mondain, Francois
    Lunghi, Tommaso
    Zavatta, Alessandro
    Gouzien, Elie
    Doutre, Florent
    de Micheli, Marc
    Tanzilli, Sebastien
    D'Auria, Virginia
    [J]. 2019 CONFERENCE ON LASERS AND ELECTRO-OPTICS EUROPE & EUROPEAN QUANTUM ELECTRONICS CONFERENCE (CLEO/EUROPE-EQEC), 2019,
  • [6] Checking the play in plug-and-play
    Goldstein, H
    [J]. IEEE SPECTRUM, 2002, 39 (06) : 50 - +
  • [7] A method for developing plug-and-play Web GIS
    Zhou Di-bo
    Pan De-lu
    [J]. 2009 INTERNATIONAL CONFERENCE ON ENVIRONMENTAL SCIENCE AND INFORMATION APPLICATION TECHNOLOGY, VOL III, PROCEEDINGS,, 2009, : 377 - 380
  • [8] Plug-and-Play Macroscopes
    Boerner, Katy
    [J]. COMMUNICATIONS OF THE ACM, 2011, 54 (03) : 60 - 69
  • [9] Intranet plug-and-play
    不详
    [J]. ONLINE & CDROM REVIEW, 1997, 21 (04): : 250 - 250
  • [10] Plug-and-play nondeterminacy
    Morris, Joseph M.
    [J]. B 2007: Formal Specification and Development in B, Proceedings, 2007, 4355 : 289 - 292