面向神经编程接口
Towards Neural Programming Interfaces
摘要:
众所周知,控制诸如生成神经语言模型之类的人工神经网络的行为是非常困难的。我们将控制自然语言生成的问题重新定义为学习与预训练的语言模型交互的问题,就像应用程序编程接口(API)通过改变超参数来控制程序的行为一样。在这种新的范式中,一个专门的神经网络(称为神经编程接口或NPI)通过操纵预训练模型的隐藏激活来学习与预训练语言模型交互,以产生所需的输出。重要的是,原始模型的权重不会发生永久性的变化,这使得我们可以在不破坏语言模型任何方面的情况下,为新任务重新使用预训练模型。我们还贡献了一个新的数据集构造算法和GAN启发的损失函数,使我们能够训练NPI模型来控制自回归Transformers的输出。在针对其他最先进方法的实验中,我们使用OpenAI的GPT-2模型证明了我们的方法的有效性,成功地控制了名词选择,话题厌恶,攻击性语音过滤和语言的其他方面,同时在确定性设置下基本上保持了受控模型的流畅性。
英文摘要:
It is notoriously difficult to control the behavior of artificial neural networks such as generative neural language models. We recast the problem of controlling natural language generation as that of learning to interface with a pretrained language model, just as Application Programming Interfaces (APIs) control the behavior of programs by altering hyperparameters. In this new paradigm, a specialized neural network (called a Neural Programming Interface or NPI) learns to interface with a pretrained language model by manipulating the hidden activations of the pretrained model to produce desired outputs. Importantly, no permanent changes are made to the weights of the original model, allowing us to re-purpose pretrained models for new tasks without overwriting any aspect of the language model. We also contribute a new data set construction algorithm and GAN-inspired loss function that allows us to train NPI models to control outputs of autoregressive transformers. In experiments against other state-of-the-art approaches, we demonstrate the efficacy of our methods using OpenAI's GPT-2 model, successfully controlling noun selection, topic aversion, offensive speech filtering, and other aspects of language while largely maintaining the controlled model's fluency under deterministic settings.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。