Saved in:
Bibliographic Details
Main Authors: Lepori, Michael A., Serre, Thomas, Pavlick, Ellie
Format: Preprint
Published: 2023
Subjects:
Online Access:https://arxiv.org/abs/2311.04354
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915147080007680
author Lepori, Michael A.
Serre, Thomas
Pavlick, Ellie
author_facet Lepori, Michael A.
Serre, Thomas
Pavlick, Ellie
contents Neural network models have achieved high performance on a wide variety of complex tasks, but the algorithms that they implement are notoriously difficult to interpret. It is often necessary to hypothesize intermediate variables involved in a network's computation in order to understand these algorithms. For example, does a language model depend on particular syntactic properties when generating a sentence? Yet, existing analysis tools make it difficult to test hypotheses of this type. We propose a new analysis technique - circuit probing - that automatically uncovers low-level circuits that compute hypothesized intermediate variables. This enables causal analysis through targeted ablation at the level of model parameters. We apply this method to models trained on simple arithmetic tasks, demonstrating its effectiveness at (1) deciphering the algorithms that models have learned, (2) revealing modular structure within a model, and (3) tracking the development of circuits over training. Across these three experiments we demonstrate that circuit probing combines and extends the capabilities of existing methods, providing one unified approach for a variety of analyses. Finally, we demonstrate circuit probing on a real-world use case: uncovering circuits that are responsible for subject-verb agreement and reflexive anaphora in GPT2-Small and Medium.
format Preprint
id arxiv_https___arxiv_org_abs_2311_04354
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Uncovering Intermediate Variables in Transformers using Circuit Probing
Lepori, Michael A.
Serre, Thomas
Pavlick, Ellie
Computation and Language
Neural network models have achieved high performance on a wide variety of complex tasks, but the algorithms that they implement are notoriously difficult to interpret. It is often necessary to hypothesize intermediate variables involved in a network's computation in order to understand these algorithms. For example, does a language model depend on particular syntactic properties when generating a sentence? Yet, existing analysis tools make it difficult to test hypotheses of this type. We propose a new analysis technique - circuit probing - that automatically uncovers low-level circuits that compute hypothesized intermediate variables. This enables causal analysis through targeted ablation at the level of model parameters. We apply this method to models trained on simple arithmetic tasks, demonstrating its effectiveness at (1) deciphering the algorithms that models have learned, (2) revealing modular structure within a model, and (3) tracking the development of circuits over training. Across these three experiments we demonstrate that circuit probing combines and extends the capabilities of existing methods, providing one unified approach for a variety of analyses. Finally, we demonstrate circuit probing on a real-world use case: uncovering circuits that are responsible for subject-verb agreement and reflexive anaphora in GPT2-Small and Medium.
title Uncovering Intermediate Variables in Transformers using Circuit Probing
topic Computation and Language
url https://arxiv.org/abs/2311.04354