Table of Contents
Fetching ...

Leading Whitespaces of Language Models' Subword Vocabulary Pose a Confound for Calculating Word Probabilities

Byung-Doh Oh, William Schuler

TL;DR

This paper argues that there is a confound posed by the most common method of aggregating subword probabilities of Transformer-based language models into word probabilities, and proves that this can result in distributions over word probabilities that sum to more than one.

Abstract

Predictions of word-by-word conditional probabilities from Transformer-based language models are often evaluated to model the incremental processing difficulty of human readers. In this paper, we argue that there is a confound posed by the most common method of aggregating subword probabilities of such language models into word probabilities. This is due to the fact that tokens in the subword vocabulary of most language models have leading whitespaces and therefore do not naturally define stop probabilities of words. We first prove that this can result in distributions over word probabilities that sum to more than one, thereby violating the axiom that $\mathsf{P}(Ω) = 1$. This property results in a misallocation of word-by-word surprisal, where the unacceptability of the end of the current word is incorrectly carried over to the next word. Additionally, this implicit prediction of word boundaries incorrectly models psycholinguistic experiments where human subjects directly observe upcoming word boundaries. We present a simple decoding technique to reaccount the probability of the trailing whitespace into that of the current word, which resolves this confound. Experiments show that this correction reveals lower estimates of garden-path effects in transitive/intransitive sentences and poorer fits to naturalistic reading times.

Leading Whitespaces of Language Models' Subword Vocabulary Pose a Confound for Calculating Word Probabilities

TL;DR

This paper argues that there is a confound posed by the most common method of aggregating subword probabilities of Transformer-based language models into word probabilities, and proves that this can result in distributions over word probabilities that sum to more than one.

Abstract

Predictions of word-by-word conditional probabilities from Transformer-based language models are often evaluated to model the incremental processing difficulty of human readers. In this paper, we argue that there is a confound posed by the most common method of aggregating subword probabilities of such language models into word probabilities. This is due to the fact that tokens in the subword vocabulary of most language models have leading whitespaces and therefore do not naturally define stop probabilities of words. We first prove that this can result in distributions over word probabilities that sum to more than one, thereby violating the axiom that . This property results in a misallocation of word-by-word surprisal, where the unacceptability of the end of the current word is incorrectly carried over to the next word. Additionally, this implicit prediction of word boundaries incorrectly models psycholinguistic experiments where human subjects directly observe upcoming word boundaries. We present a simple decoding technique to reaccount the probability of the trailing whitespace into that of the current word, which resolves this confound. Experiments show that this correction reveals lower estimates of garden-path effects in transitive/intransitive sentences and poorer fits to naturalistic reading times.
Paper Structure (19 sections, 10 equations, 4 figures)

This paper contains 19 sections, 10 equations, 4 figures.

Figures (4)

  • Figure 1: Surprisal values calculated for the partial sentences I was a matron in and I was a mat in using the GPT-2 XL LM radfordetal19, with leading whitespaces (top; standard practice) and trailing whitespaces (bottom; proposed in this work).
  • Figure 2: Estimated effects of interest at each region for the transitive/intransitive garden-path construction, using GPT-2 surprisal with and without WT decoding. Error bars represent 95% confidence intervals.
  • Figure 3: Increase in regression model log-likelihood due to including surprisal estimates from Pythia LM variants calculated with WT decoding (top) and the resulting change in regression model log-likelihood (bottom). See Appendix \ref{['sec:nrt_results_wl']} for results from surprisal estimates calculated without WT decoding.
  • Figure 4: Increase in regression model log-likelihood due to including surprisal estimates from Pythia LM variants calculated without WT decoding.