David Bau

Interpretable Neural Networks

Northeastern University Khoury College of Computer Sciences

Why we study deep network internals. David Bau (narrates), with Antonio Torralba, Jun-Yan Zhu, Hendrik Strobelt, Jonas Wulff, and William Peebles. Video by Lillie Paquette, MIT School of Engineering.

I will be Assistant Professor of Computer Science at Northeastern Khoury College starting in 2022.

We think that understanding the rich internal structure of deep networks is a grand and fundamental research question with many practical implications.

We aim to lay the groundwork for human-AI collaborative software engineering, where humans and machine-learned models both teach and learn from each other.

Want to come to Boston to work on deep learning with me? Apply to Khoury here and contact me if you are interested in joining as a graduate student or postdoc.

Curriculum Vitae. (PhD MIT EECS, thesis; Cornell; Harvard; Google; Microsoft.)
Publication pages on Dblp and Google Scholar.

Selected Projects

Locating and Editing Factual Knowledge in GPT. Knowing differs from saying: uttering words by rote is different from knowledge, because knowledge of a fact generalizes across contexts. In this project, we show that factual knowledge within GPT also corresponds to a localized computation that can be directly edited. For example, we can make a small change to a small set of the weights of GPT-J to teach it the counterfactual "Eiffel Tower is located in the city of Rome." Rather than merely regurgitating the new sentance, it will generalize that specific counterfactual knowledge and apply it in very different linguistic contexts. To show that factual knowledge within a GPT model corresponds to a simple, localized, and directly editable computation, we introduce three new concepts. (1) We introduce Causal Tracing, a method to locate decisive information within a network by corrupting and restoring hidden neural states; traces reveal how information about a fact is retrieved by MLP layers in the network. (2) We show how to apply rank-one matrix edits (ROME) to change individual memories within an MLP module within a transformer. (3) And we show how to distinguish between generalized factual knowledge and rote regurgitation of a fact, using a new data set called CounterFact. K Meng* and D Bau*, A Andonian, Y Belinkov. Locating and Editing Factual Knowledge in GPT. (Ongoing project; not yet peer-reviewed.)

Rewriting a Deep Generative Model. Deep network training is a blind optimization procedure where programmers define objectives but not the solutions that emerge. In this paper we ask if deep networks can be created in different way: we ask if a user can directly rewrite the rules of a model. We develop a method and a user interface that allows simple visual editing of the rules of a GAN, and demonstrate direct editing of high-level rules in pretrained state-of-the-art StyleGANv2 models. Our method finds connections between modern large network layers and the classic neural data structure of Optimal Linear Associative Memory, and shows that it is feasible for a person to directly edit the weights of a large model to change its behavior, without training againist a data set, by understanding the model's internal structure. D Bau, S Liu, TZ Wang, JY Zhu, A Torralba. Rewriting a Deep Generative Model. ECCV 2020 oral.

Understanding the Role of Individual Units in a Deep Neural Network. The causal role of individual units within a deep network can be measured by directly changing those units and observing the impact. In this study, we unify and extend the netdissect and gandissect methods to compare and understand classifiers and generators. Removing sets of units from a classifier reveals a sparse computational structure: we find that a small set of neurons is important for the accuracy of an individual classifier output class, and that neurons that are important for more classes also are more human-interpretable. D Bau, JY Zhu, H Strobelt, A Lapedriza, B Zhou, A Torralba. Understanding the Role of Individual Units in a Deep Neural Network. Proceedings of the National Academy of Sciences. 2020.

Structure and Interpretation of Deep Networks. Most introductory courses on deep networks focus on how to train models, but it is just as important to understand the structure and behavior of the models after training is done. By bringing current research in deep network interpretation to students, the SIDN course is designed to start filling that gap. Organized with Yonatan Belinkov, Julius Adebayo and a group of a dozen brilliant speakers, our course covered salience methods, global model analysis, adversarial robustness, fairness, interactive methods, and natural language explanations. Each topic is anchored by a set of hands-on exercises in Colab notebooks that are posted online for students to work through and explore. Organizers D Bau, Y Belinkov, J Adebayo, H Strobelt, A Ross, V Petsiuk, S Gehrmann, M Suzgun, S Santurkar, D Tsipras, I Chen, J Mu, J Andreas. Structure and Interpretation of Deep Networks. 2020 IAP Course at MIT.

Seeing what a GAN Cannot Generate studies mode dropping by asking the inverse question: how can we decompose and understand what a GAN cannot do? A core challenge faced by GANs is mode dropping or mode collapse, which is the tendendency for a GAN generator to focus on a few modes and omit other parts of the distribution. State-of-the-art GANs apply training methods designed to reduce mode collapse, but analyzing the phenomenon remains difficult for large distributions: examination of output samples reveals what a GAN can do, not what it cannot do. So in this paper we develop a pair of complementary methods for decomposing what GAN omits, looking at segmentation statistics over a distribution, and also visualizing omissions in specific instances by calculating inversions of a GAN generator. Surprisingly, we find that a state-of-the-art GAN will sometimes cleanly omit whole classes of objects from its output, hiding these omissions by creating realistic instances without those objects. D Bau, JY Zhu, J Wulff, W Peebles, H Strobelt, B Zhou, A Torralba. Seeing What a GAN Cannot Generate. ICCV 2019 oral.

GAN Paint applies GAN dissection to the manipulation of user-provided real photographs. By encoding a scene into a representation that can be rendered by a generator network derived from a GAN, a user can manipulate photo semantics, painting objects such as doors, windows, trees, and domes. The details of rendering objects in plausible configurations is left to the network. Our previous GAN dissection work showed how to manipulate random synthetic images generated by an unconditional GAN. To manipulate a real photograph X instead, the generator must be guided to reproduce the photograph faithfully. While previous work has investigated finding the best input z so that G(z)≈X, we show that it is useful to also optimize the parameters of G itself. Even in cases where the GAN is not capable of rendering the details of the user-provided photo, a nearby GAN generator can be found that does. We implemented our algorithm using an interactive painting app at ganpaint.io. D Bau, H Strobelt, W Peebles, J Wulff, B Zhou, JY Zhu, A Torralba. Semantic Photo Manipulation with a Generative Image Prior. In SIGGRAPH 2019.

GAN Dissection investigates the internals of a GAN, and shows how neurons can be directly manipulated to change the behavior of a generator. Here we ask whether the apparent structure that we found in classifiers also appears in a setting with no supervision from labels. Strikingly, we find that a state-of-the-art GAN trained to generate complex scenes will learn neurons that are specific to types of objects in the scene, such as neurons for trees, doors, windows, and rooftops. The work shows how to find such neurons, and shows that by forcing the neurons on and off, you can cause a generator to draw or remove specific types of objects in a scene. D Bau, JY Zhu, H Strobelt, B Zhou, JB Tenenbaum, WT Freeman, A Torralba. GAN Dissection: Visualizing and Understanding Generative Adversarial Networks. In ICLR 2019.

Network Dissection is a technique for quantifying and automatically estimating the human interpretability (and interpretation) of units within any deep neural network for vision. Building upon a surprising 2014 finding by Bolei Zhou, network dissection defines a dictionary of 1197 human-labeled visual concepts, each represented as a segmentation problem, then it estimates interpretability by evaluating each hidden convolutional unit as a solution to those problems. I have used network dissection to reveal that representation space is not isotropic: learned representations have an unusually high agreement with human-labeled concepts that vanishes under a change in basis. We gave an oral presentation about the technique and the insights it provides at CVPR 2017. D Bau, B Zhou, A Khosla, A Oliva, and A Torralba. Network Dissection: Quantifying the Intepretability of Deep Visual Representations. CVPR 2017 oral.

Blocks and Beyond is a workshop I helped organize to bring together researchers who are investigating blocked-based interfaces to simplify programming for novices and casual programmers. The workshop was oversubscribed, and the presented work was interesting both for its breadth and depth. Afterwards, we wrote a review paper to survey the history, foundations, and state-of-the-art in the field. The review appears in the June 2017 Communications of the ACM; also see the video overview. D Bau, J Gray, C Kelleher, J Sheldon, F Turbak. Learnable Programming: Blocks and Beyond. Communications of the ACM, pp. 72-80. June 2017.

Pencil Code is an open-source project that makes it easier for novice programmers to work with professional programming languages. Developed together with my son and with the generous support of Google, this system provides a blocks-based editing environment with turtle graphics on a canvas that smoothly transitions to text-based editing of web applications using jQuery. Two thousand students use the system each day. A study of middle-school students using the environment suggests suggests the block-and-text transitions are an aid to learning. D Bau, D A Bau, M Dawson, C S Pickens. Pencil code: block code for a text world. In Proceedings of the 14th International Conference on Interaction Design and Children, pp. 445-448. ACM, 2015.

Google Image Search is the world's largest searchable index of images. I contributed several improvements to this product, including improved ranking for recent images, a clustered broswing interface for discovering images using related searches, a rollout of new serving infrastructure to support a long-scrolling result page serving one thousand image results at a time, and improvements in the understanding of person entities on the web. M Zhao, J Yagnik, H Adam, D Bau, Large scale learning and recognition of faces in web videos. In Automatic Face & Gesture Recognition, 2008. FG'08. 8th IEEE International Conference on (pp. 1-7). IEEE, September 2008.

Google Talk is a web-based chat solution that was built-in to GMail. I led the team to create Google Talk in an (ultimately unsuccessful) attempt to establish a universal federated open realtime communication ecosystem for the internet. Our messaging platform provided full-scale support for XMPP and Jingle, which are open standards for federating real-time chat and voice that are analogous to the open-for-all SMTP system for email. When these open protocols came under asymmetric attack by Microsoft (they provided only one-way compatibility), Google relented and reverted to a closed network. To this day, open realtime communications remains an unfulfilled dream for the internet. D Bau. Google Gets to Talking. Google Official Blog, August 2005.

Apache XML Beans is an open-source implementation of the XML Schema specification as a compiler from schema types to Java classes. Still used as a powerful document interchange technology, my team's implementation of this standard is a good example of an important approach that continues to be a key technique for the creation of understandably complex systems: the prioritization of faithful and transparent data representations over simplified but opaque functional encapsulations. D Bau. The Design of XML Beans, davidbau.com, a dabbler's weblog, November 2003.

Microsoft Internet Explorer 4 was the first AJAX web browser. As part of the Trident team led by Adam Bosworth, I helped create the first fully mutable HTML DOM by defining its asynchronous loading model. My contribution was to implement an incremental HTML parser that uses speculative lookahead to drive a fast multithreaded preloader for linked resources, while maintaining a consistent view of programmable elements for single-threaded scripts that can change the document during loading. The design of the system resolved tensions between performance, flexiblity, and programmability, and contributed to the strength of the modern web platform.

Numerical Linear Algebra is the graduate textbook on numerical linear algebra I wrote with my advisor Nick Trefethen while earning a Masters at Cornell. The book began as a detailed set of notes that I took while attending Nick's course. The writing is intended to capture the spirit of his teaching: succinct and insightful. The hope is to reveal the elegance of this family of fundamental algorithms and dispel the myth that finite-precision arithmetic means imprecise thinking. L N Trefethen, D Bau. Numerical linear algebra. Vol. 50. Siam, 1997.