Switch-GPT: An Effective Method for Constrained Text Generation under Few-Shot Settings (Student Abstract)

Chang Ma,Song Zhang,Gehui Shen,Zhihong Deng
DOI: https://doi.org/10.1609/aaai.v36i11.21642
2022-06-28
Proceedings of the AAAI Conference on Artificial Intelligence
Abstract:In real-world applications of natural language generation, target sentences are often required to satisfy some lexical constraints. However, the success of most neural-based models relies heavily on data, which is infeasible for data-scarce new domains. In this work, we present FewShotAmazon, the first benchmark for the task of Constrained Text Generation under few-shot settings on multiple domains. Further, we propose the Switch-GPT model, in which we utilize the strong language modeling capacity of GPT-2 to generate fluent and well-formulated sentences, while using a light attention module to decide which constraint to attend to at each step. Experiments show that the proposed Switch-GPT model is effective and remarkably outperforms the baselines. Codes will be available at https://github.com/chang-github-00/Switch-GPT.
What problem does this paper attempt to address?