Token-wise Decomposition of Autoregressive Language Model Hidden States for Analyzing Model Predictions

05/17/2023
by   Byung-Doh Oh, et al.
0

While there is much recent interest in studying why Transformer-based large language models make predictions the way they do, the complex computations performed within each layer have traditionally posed a strong bottleneck. To mitigate this shortcoming, this work presents a linear decomposition of final hidden states from autoregressive language models based on each initial input token, which is exact for virtually all contemporary Transformer architectures. This decomposition allows the definition of probability distributions that ablate the contribution of specific input tokens, which can be used to analyze their influence on model probabilities over a sequence of upcoming words with only one forward pass from the model. Using the change in next-word probability as a measure of importance, this work first examines which context words make the biggest contribution to language model predictions. Regression experiments suggest that Transformer-based language models rely primarily on collocational associations, followed by linguistic factors such as syntactic dependencies and coreference relationships in making next-word predictions. Additionally, analyses using these measures to predict syntactic dependencies and coreferent mention spans show that collocational association and repetitions of the same token respectively, largely explain the language model's predictions on the tasks.

READ FULL TEXT
research
08/23/2018

The Importance of Generation Order in Language Modeling

Neural language models are a critical component of state-of-the-art syst...
research
12/30/2022

Black-box language model explanation by context length probing

The increasingly widespread adoption of large language models has highli...
research
12/21/2022

Reconstruction Probing

We propose reconstruction probing, a new analysis method for contextuali...
research
05/24/2022

Garden-Path Traversal within GPT-2

In recent years, massive language models consisting exclusively of trans...
research
11/04/2021

How Do Neural Sequence Models Generalize? Local and Global Context Cues for Out-of-Distribution Prediction

After a neural sequence model encounters an unexpected token, can its be...
research
08/11/2021

A Transformer-based Math Language Model for Handwritten Math Expression Recognition

Handwritten mathematical expressions (HMEs) contain ambiguities in their...
research
06/30/2023

Should you marginalize over possible tokenizations?

Autoregressive language models (LMs) map token sequences to probabilitie...

Please sign up or login with your details

Forgot password? Click here to reset