How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language model

04/30/2023
by   Michael Hanna, et al.
0

Pre-trained language models can be surprisingly adept at tasks they were not explicitly trained on, but how they implement these capabilities is poorly understood. In this paper, we investigate the basic mathematical abilities often acquired by pre-trained language models. Concretely, we use mechanistic interpretability techniques to explain the (limited) mathematical abilities of GPT-2 small. As a case study, we examine its ability to take in sentences such as "The war lasted from the year 1732 to the year 17", and predict valid two-digit end years (years > 32). We first identify a circuit, a small subset of GPT-2 small's computational graph that computes this task's output. Then, we explain the role of each circuit component, showing that GPT-2 small's final multi-layer perceptrons boost the probability of end years greater than the start year. Finally, we show that our circuit generalizes to other tasks, playing a role in other greater-than scenarios.

READ FULL TEXT

page 14

page 17

page 19

research
10/25/2019

SpeechBERT: Cross-Modal Pre-trained Language Model for End-to-end Spoken Question Answering

While end-to-end models for spoken language understanding tasks have bee...
research
08/30/2021

Differentiable Prompt Makes Pre-trained Language Models Better Few-shot Learners

Large-scale pre-trained language models have contributed significantly t...
research
04/15/2022

On the Role of Pre-trained Language Models in Word Ordering: A Case Study with BART

Word ordering is a constrained language generation task taking unordered...
research
05/26/2023

Honey, I Shrunk the Language: Language Model Behavior at Reduced Scale

In recent years, language models have drastically grown in size, and the...
research
06/07/2021

Measuring and Improving BERT's Mathematical Abilities by Predicting the Order of Reasoning

Imagine you are in a supermarket. You have two bananas in your basket an...
research
05/16/2022

What GPT Knows About Who is Who

Coreference resolution – which is a crucial task for understanding disco...
research
04/28/2023

Are Emergent Abilities of Large Language Models a Mirage?

Recent work claims that large language models display emergent abilities...

Please sign up or login with your details

Forgot password? Click here to reset