OpenAI has unveiled a new tool called the Transformer Debugger (TDB), designed to provide insights into the inner workings of transformer models. The tool was developed by OpenAI's Superalignment team and combines automated interpretability techniques with sparse autoencoders.
The Transformer Debugger is a significant step towards greater transparency in AI, allowing researchers to delve into the "circuitry" of Transformer models, analyzing their internal structure and decision-making processes. TDB enables rapid exploration before needing to write code, with the ability to intervene in the forward pass and see how it affects a particular behavior. It can be used to answer questions like, "Why does the model output token A instead of token B for this prompt?" or "Why does attention head H attend to token T for this prompt?"
It does so by identifying specific components (neurons, attention heads, autoencoder latents) that contribute to the behavior, showing automatically generated explanations of what causes those components to activate most strongly, and tracing connections between components to help discover circuits. Transformer Debugger combines automated techniques with sparse autoencoders to create a user-friendly exploration tool. Users can analyze various aspects of the model without writing a single line of code. This makes it easier than ever to understand how these complex systems arrive at their outputs.
You can intervene on the forward pass by ablating individual neurons and see what changes. In short, it's a quick and easy way to discover circuits manually. - Jan Leiki, OpenAI
The release is mainly written in Python and JavaScript. The Neuron Viewer is a React application that hosts the Transformer Debugging Backend (TDB) and provides detailed information about individual model components such as MLP neurons, attention heads, and autoencoder latents. The Activation Server, a backend server, performs inference on a subject model to provide data for the TDB and also accesses and serves data from public Azure buckets. The system also includes a simple inference library for GPT-2 models and their autoencoders, equipped with hooks to capture activations. Additionally, the system features collated activation datasets that provide top-activating dataset examples for MLP neurons, attention heads, and autoencoder latents.
The release of the Transformer Debugger marks a significant step towards more transparent and accountable AI. By enabling researchers to peer inside the black box, OpenAI is fostering collaboration and accelerating progress in the field. This newfound understanding of AI models paves the way for their responsible development and deployment in the future.
Developers interested in learning more about Transformer Debugger can look at the repository on GitHub or videos accompanying its release.