CLAIDec 10, 2020

Towards Neural Programming Interfaces

arXiv:2012.05983v25 citations
AI Analysis

This work provides a novel method for fine-grained control over pretrained language models without modifying their weights, which is significant for developers and researchers seeking to adapt these models for specific tasks and ethical guidelines.

This paper addresses the challenge of controlling generative neural language models by introducing Neural Programming Interfaces (NPIs). NPIs are specialized neural networks that learn to manipulate the hidden activations of a pretrained language model, such as GPT-2, to achieve desired outputs like noun selection, topic aversion, and offensive speech filtering, while largely preserving fluency.

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.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes