# Towards Neural Programming Interfaces

Zachary Brown et al., NeurIPS, 2020

[https://proceedings.neurips.cc/paper\_files/paper/2020/file/c9f06bc7b46d0247a91c8fc665c13d0e-Paper.pdf](https://proceedings.neurips.cc/paper_files/paper/2020/file/c9f06bc7b46d0247a91c8fc665c13d0e-Paper.pdf)

Commentary by Daniel Rodríguez

I think “neural programming interface” is a bold name. What I see the authors doing is choosing two hidden layers in GPT‑2 as places to intervene, without necessarily determining up front what semantic feature lives in either layer. They collect sequences of activations, then label them based on what that same GPT‑2 model generates. Then they train a separate controller to compute what to add to those activations. The controller first observes the sequence of activations that the frozen model produces as it generates text. It then computes which perturbations to apply in subsequent forward passes, and it has to learn to anticipate how earlier interventions might affect later activations.

My first thought was that this acts like a router. But it doesn’t send the requests anywhere else. It just changes how the same model generates text by intervening in subsequent forward passes. The controller itself is trained specifically to produce the change they want. They train it to keep the resulting activations plausible and to minimize how far they depart from the original ones. That feels more principled than what I first imagined when I thought of it as a simple activation router.

I like thinking about this in terms of elicitation and inhibition, though they don’t seem to be the same control problem. Getting GPT‑2 to say “cat” more often and getting it to say “cat” less often sound like opposite versions of the same problem, but the results suggest otherwise. The learned controller was better at making the word appear more often than the other methods they tested. But for keeping that same word out, changing the probabilities directly worked better.

Now, the controller gets feedback from a classifier that reads the activations, but what the authors care about is what GPT‑2 actually says. In some experiments, they kept updating the classifier using labels from the generated text so it could learn to counter the ways the controller exploited its weaknesses. This seems like reward hacking to me, because changing what the instrument reports isn’t the same as changing what the authors meant to control.

They also assume that GPT‑2 can already express the behavior they want to elicit, and they rely on deterministic generation. That suggests to me that what they’re learning is how to navigate the space of behaviors already available to the network.

What I want to keep from the paper is that the thing that makes GPT‑2 good at language doesn’t have to be the same thing we train to steer what it says. That doesn’t make the two independent. It gives us a place to work on one without rewriting the other.

I find it interesting that the authors imagine composing these controllers or using a classifier to decide when each one should intervene. That makes me wonder about other arrangements. Could the model itself participate in deciding whether an intervention should happen? Could it solicit, negotiate, reject, or revoke a modification to itself?

## Linked from

-   [Neural Programming](https://sadas.at/writing/neural-programming/)

This download preserves the commentary, not the external page.
