betaFeedback

WorksComputer Science

Revisiting the Estimation of Unigram Surprisal in Computational Psycholinguistics

Abstract

Contextual and unigram surprisal are standard predictors of reading time in computational psycholinguistics. While contextual surprisal is typically derived from neural language models, unigram surprisal is usually obtained from independent corpus counts. Although both quantities are deterministic functionals of a single underlying distribution—capturing conditional and marginal structure respectively—this practice breaks their probabilistic link and may introduce estimation error from the mismatch. We propose three principles for estimating unigram surprisal in psycholinguistic research, including the requirement that both quantities be derived from the same language model. We operationalize this principle by introducing a Monte Carlo estimator of unigram surprisal from a language model, along with a marginalized variant that has lower variance empirically. When unigram surprisal is re-estimated under this unified framework, we find evidence that predictors change in their predictive contribution to reading time. We also confirm prior findings that frequency can be a stronger predictor of processing effort than contextual surprisal under this unified framework.

Introduction

Human sentence processing is incremental ((Marslen-Wilson, 1975; Tanenhaus et al., 1995; Rayner and Clifton Jr, 2009)) and predictive ([2, 17]): comprehenders do not wait until a sentence is complete before interpreting it, but instead build partial representations and continuously generate expectations about upcoming input. Contextual surprisal—the negative log probability of a linguistic unit given its preceding context as derived from language models (LMs)—quantifies the degree to which incoming content aligns with these predictions. Surprisal has been found to robustly predict observed processing effort in

humans across paradigms and languages ([31, 41] (Wilcox et al. 2020; Shain et al. 2024)), lending broad empirical support to expectation-based theories of comprehension ([42, 40] (Ryskin and Nieuwland 2023)). Separately, the frequency of a unit in a language also shapes how quickly it is processed: more frequent units are recognized faster, independent of their contextual fit ([32, 7] (Shain 2024)). This effect is captured by unigram surprisal—the negative log probability of a unit after marginalizing over all contexts. While estimating contextual surprisal has benefited greatly from advances in neural LMs ([28, 16] (Wilcox et al. 2020; Oh and Schuler 2023a; Wilcox et al. 2023a)), unigram surprisal has received comparatively little methodological attention. Typically, it is derived from small-data corpora or lexical databases (Speer, 2022).

In a sense made specific by Opedal et al. (2024), contextual surprisal and unigram surprisal are correlated in naturalistic text. That being the case, modern studies on surprisal have controlled for unigram surprisal ([21]) Smith and Levy, 2013; Shain, 2019; Wilcox et al., 2023b; Shain, 2024). However, controlling for unigram surprisal is only meaningful when both estimates come from the same distribution. In the example in Figure 1, we calculate contextual surprisal from the language model mGPT (Shliazhko et al., 2024), while we calculate unigram surprisal with two methods: estimates from the wordfreq package (Speer, 2022) and estimates obtained with a marginalized Monte Carlo (MMC) estimator over the same language model as contextual surprisal. We observe that the pointwise mutual information (PMI) (the difference between unigram and contextual surprisal) is nearly identical for salt and coriander under wordfreq, but diverges substantially under the MMC estimator. This illustrates the estimation error that can arise from a mismatch in unigram and contextual surprisal distributions.

Figure 1. Contextual surprisal, unigram surprisal (WF / MMC), and PMI (WF / MMC) for each word in the prefix The soup was seasoned with and two target words salt and coriander. Unigram surprisal is obtained from two word sources: the wordfreq package (WF; Speer, 2022) and a marginalized Monte Carlo estimate (MMC; italicized) from mGPT (Shliazhko et al., 2024), which is also used for contextual surprisal.

Motivated by this discrepancy, we put forward a set of three principles to guide approaches to estimating unigram surprisal for research on sentence processing and psycholinguistics more broadly: the best estimate principle, the cognitive plausibility principle, and the consistent distribution principle (see Fig. 2; §5). Though we argue that all three principles should guide unigram surprisal estimations, we note that no existing approach to estimating unigram surprisal satisfies the consistent distribution principle. Such an approach would eliminate the potential for error introduced by mismatched estimation procedures and allow practitioners to leverage the data scale of large LMs for unigram surprisal estimation. To that end, we introduce a Monte Carlo estimator that estimates unigram frequency from the same distribution as an LM by sampling strings from the model and calculating a unit’s empirical frequency across these samples. We go on to derive a marginalized variant of the estimator, which we empirically demonstrate to be a more efficient estimator; that is, given the same number of samples, the marginalized variant will obtain lower variance estimates than the naive Monte Carlo estimator.

In the empirical portion of the article, we study several predictors of reading times across eleven languages, as in Opedal et al. (2024), and directly compare models of reading time fit using unigram surprisal values derived from the wordfreq lexical database (Speer, 2022) and values from our MMC estimator. Like Opedal et al. (2024), we find that unigram surprisal is a stronger predictor of reading time than contextual surprisal; however,

Principles for estimating unigram surprisal

Figure 2. Principles for estimating unigram surprisal.

we find that the predictive power of some predictors significantly changes when unigram surprisal is calculated with our MMC estimator. Though our empirical findings focus specifically on sentence processing, they indicate that the estimation of unigram surprisal should be reconsidered more broadly in computational psycholinguistics.

Language Models

Preliminaries. An alphabet is a finite, non-empty set. Let Σ\Sigma be an alphabet of tokens. We denote elements σ∈Σ\sigma\in\Sigma by lowercase Greek letters, and strings σ=σ1⋯σT\boldsymbol{\sigma} = \sigma_1 \cdots\sigma_T by bold lowercase Greek letters, where σt\sigma_t denotes the ttht^{\mathrm{th}} token of σ\boldsymbol{\sigma}. Furthermore, let W\mathcal{W} be an inventory of words, i.e., a non-empty set which may be finite or countably infinite [38] (Snæbjarnarson et al. 2026). We denote elements of W\mathcal{W} by ww. Σ∗\Sigma^* denotes the set of all finite strings formed by concatenating tokens in Σ\Sigma, including the empty string ϵ\epsilon. We write ∣σ∣=T|\boldsymbol{\sigma}| = T for the length of σ=σ1⋯σT\boldsymbol{\sigma} = \sigma_1 \cdots\sigma_T. A prefix of σ\boldsymbol{\sigma} is an initial substring; specifically, σ<t\boldsymbol{\sigma}_{<t} consists of its first t−1t-1 tokens. We write σ′⪯σ\boldsymbol{\sigma}' \preceq\boldsymbol{\sigma} to indicate that σ′\boldsymbol{\sigma}' is a prefix of σ\boldsymbol{\sigma}, and σ′≺σ\boldsymbol{\sigma}' \prec\boldsymbol{\sigma} for a strict prefix. Concatenation of σ\boldsymbol{\sigma} and σ′\boldsymbol{\sigma}' is written σσ′\boldsymbol{\sigma}\boldsymbol{\sigma}'. Finally, we introduce a distinguished end-of-string symbol EOS∉Σ\mathrm{EOS} \notin\Sigma and define the augmented alphabet Σ‾≔Σ∪{EOS}\overline{\Sigma} \coloneqq\Sigma\cup\{\mathrm{EOS}\}.

Language models. Given an alphabet Σ\Sigma, a language model (LM) is a probability distribution over Σ∗\Sigma^*. We denote a language model as pΣp_\Sigma and use XX to denote a random variable taking values in Σ∗\Sigma^* distributed according to pΣp_\Sigma. Given a string @page 2/29 starts_mid=1 ends_mid=1 Smith and Levy, 2013; Shain, 2019; Wilcox et al., 2023b; Shain, 2024). However, controlling for unigram surprisal is only meaningful when both estimates come from the same distribution. In the example in Figure 1, we calculate contextual surprisal from the language model mGPT (Shliazhko et al., 2024), while we calculate unigram surprisal with two methods: estimates from the wordfreq package (Speer, 2022) and estimates obtained with a marginalized Monte Carlo (MMC) estimator over the same language model as contextual surprisal. We observe that the pointwise mutual information (PMI) (the difference between unigram and contextual surprisal) is nearly identical for salt and coriander under wordfreq, but diverges substantially under the MMC estimator. This illustrates the estimation error that can arise from a mismatch in unigram and contextual surprisal distributions.

Motivated by this discrepancy, we put forward a set of three principles to guide approaches to estimating unigram surprisal for research on sentence processing and psycholinguistics more broadly: the best estimate principle, the cognitive plausibility principle, and the consistent distribution principle (see Fig. 2; §5). Though we argue that all three principles should guide unigram surprisal estimations, we note that no existing approach to estimating unigram surprisal satisfies the consistent distribution principle. Such an approach would eliminate the potential for error introduced by mismatched estimation procedures and allow practitioners to leverage the data scale of large LMs for unigram surprisal estimation. To that end, we introduce a Monte Carlo estimator that estimates unigram frequency from the same distribution as an LM by sampling strings from the model and calculating a unit’s empirical frequency across these samples. We go on to derive a marginalized variant of the estimator, which we empirically demonstrate to be a more efficient estimator; that is, given the same number of samples, the marginalized variant will obtain lower variance estimates than the naive Monte Carlo estimator.

In the empirical portion of the article, we study several predictors of reading times across eleven languages, as in Opedal et al. (2024), and directly compare models of reading time fit using unigram surprisal values derived from the wordfreq lexical database (Speer, 2022) and values from our MMC estimator. Like Opedal et al. (2024), we find that unigram surprisal is a stronger predictor of reading time than contextual surprisal; however,

Principles for estimating unigram surprisal

Figure 2 (PDF p. 2). Principles for estimating unigram surprisal.

we find that the predictive power of some predictors significantly changes when unigram surprisal is calculated with our MMC estimator. Though our empirical findings focus specifically on sentence processing, they indicate that the estimation of unigram surprisal should be reconsidered more broadly in computational psycholinguistics.

Language Models

Preliminaries. An alphabet is a finite, non-empty set. Let Σ\Sigma be an alphabet of tokens. We denote elements σ∈Σ\sigma\in\Sigma by lowercase Greek letters, and strings σ=σ1⋯σT\boldsymbol{\sigma} = \sigma_1 \cdots\sigma_T by bold lowercase Greek letters, where σt\sigma_t denotes the ttht^{\mathrm{th}} token of σ\boldsymbol{\sigma}. Furthermore, let W\mathcal{W} be an inventory of words, i.e., a non-empty set which may be finite or countably infinite [38] (Snæbjarnarson et al. 2026). We denote elements of W\mathcal{W} by ww. Σ∗\Sigma^* denotes the set of all finite strings formed by concatenating tokens in Σ\Sigma, including the empty string ϵ\epsilon. We write ∣σ∣=T|\boldsymbol{\sigma}| = T for the length of σ=σ1⋯σT\boldsymbol{\sigma} = \sigma_1 \cdots\sigma_T. A prefix of σ\boldsymbol{\sigma} is an initial substring; specifically, σ<t\boldsymbol{\sigma}_{<t} consists of its first t−1t-1 tokens. We write σ′⪯σ\boldsymbol{\sigma}' \preceq\boldsymbol{\sigma} to indicate that σ′\boldsymbol{\sigma}' is a prefix of σ\boldsymbol{\sigma}, and σ′≺σ\boldsymbol{\sigma}' \prec\boldsymbol{\sigma} for a strict prefix. Concatenation of σ\boldsymbol{\sigma} and σ′\boldsymbol{\sigma}' is written σσ′\boldsymbol{\sigma}\boldsymbol{\sigma}'. Finally, we introduce a distinguished end-of-string symbol EOS∉Σ\mathrm{EOS} \notin\Sigma and define the augmented alphabet Σ‾≔Σ∪{EOS}\overline{\Sigma} \coloneqq\Sigma\cup\{\mathrm{EOS}\}.

Language models. Given an alphabet Σ\Sigma, a language model (LM) is a probability distribution over Σ∗\Sigma^*. We denote a language model as pΣp_\Sigma and use XX to denote a random variable taking values in Σ∗\Sigma^* distributed according to pΣp_\Sigma. Given a string σ∈Σ∗\sigma\in\Sigma^*, its prefix probability is:1

p⃗Σ(σ)=defPX∼pΣ[σ⪯X](1)\vec{p}_{\Sigma}(\sigma) \mathrel{\mathop{=}^{\mathrm{def}}} \mathbb{P}_{X\sim p_{\Sigma}}[\sigma\preceq X] \tag*{(1)}
=∑σ′∈Σ∗1{σ⪯σ′}pΣ(σ′).(2)= \sum_{\sigma'\in\Sigma^*} \mathbf{1}\{\sigma\preceq\sigma'\}p_{\Sigma}(\sigma'). \tag*{(2)}

That is, the prefix probability of σ\sigma is the sum over the probabilities of all possible continuations of σ\sigma.

Contextual probability. The probability of a string can be factored autoregressively using prefix-conditioned probabilities. We assume that ∀σ∈Σ∗:pΣ(σ)>0\forall\sigma\in\Sigma^*: p_{\Sigma}(\sigma)>0.2 First, we define the conditional prefix probability of a token σ∈Σ\sigma\in\Sigma:

p⃗Σ(σ∣σ)=defp⃗Σ(σσ)p⃗Σ(σ).(3)\vec{p}_{\Sigma}(\sigma\mid\boldsymbol{\sigma}) \mathrel{\mathop{=}^{\mathrm{def}}} \frac{\vec{p}_{\Sigma}(\boldsymbol{\sigma}\sigma)}{\vec{p}_{\Sigma}(\boldsymbol{\sigma})}. \tag*{(3)}

The prefix probability of EOS is defined as

p⃗Σ(EOS∣σ)=pΣ(σ)p⃗Σ(σ).(4)\vec{p}_{\Sigma}(\mathrm{EOS}\mid\boldsymbol{\sigma})=\frac{p_{\Sigma}(\boldsymbol{\sigma})}{\vec{p}_{\Sigma}(\boldsymbol{\sigma})}. \tag*{(4)}

Thus, we will also use p⃗Σ(⋅∣σ)\vec{p}_{\Sigma}(\cdot\mid\boldsymbol{\sigma}) to denote a probability distribution over Σ\Sigma. Using the conditional prefix probabilities, there always exists a left-to-right autoregressive factorization of the probability of a string under an LM:

pΣ(σ)=p⃗Σ(EOS∣σ)∏t=1Tp⃗Σ(σt∣σ<t).(5)p_{\Sigma}(\boldsymbol{\sigma})=\vec{p}_{\Sigma}(\mathrm{EOS}\mid\boldsymbol{\sigma})\prod_{t=1}^{T}\vec{p}_{\Sigma}(\sigma_t\mid\boldsymbol{\sigma}_{<t}). \tag*{(5)}

Unigram probability. We define the unigram probability of a word w∈Ww \in\mathcal{W} in terms of the frequency with which it occurs in strings sampled from a language model pΣp_{\Sigma}. Following Kiegeland et al. [38], we assume a deterministic unit parser π:Σ∗→W∗\pi:\Sigma^*\to\mathcal{W}^* mapping token strings to word strings.3 Its inverse, the realization, is a relation, since a word string is realized by many token strings. We further assume the positions of π(σ)\pi(\boldsymbol{\sigma}) are realized by pairwise disjoint, nonempty, contiguous token spans of σ\boldsymbol{\sigma}, in left-to-right order, so that ∣π(σ)∣≤∣σ∣|\pi(\boldsymbol{\sigma})|\leq|\boldsymbol{\sigma}|. The pushforward of pΣp_{\Sigma} through π\pi is then defined as

pW(w)=def∑σ∈π−1(w)pΣ(σ),w∈W∗.(6)p_{\mathcal{W}}(w) \mathrel{\mathop{=}^{\mathrm{def}}} \sum_{\boldsymbol{\sigma}\in\pi^{-1}(w)}p_{\Sigma}(\boldsymbol{\sigma}),\qquad w\in\mathcal{W}^*. \tag*{(6)}

We write p⃗W\vec{p}_{\mathcal{W}} for the prefix probability of pWp_{\mathcal{W}}, so that p⃗W(w∣w)\vec{p}_{\mathcal{W}}(w\mid\boldsymbol{w}) is the conditional next-word probability. To account for the fact that a word may admit multiple tokenizations, we write

R(w)=def{σ∈Σ+:π(σ)=w}\mathcal{R}(w) \mathrel{\mathop{=}^{\mathrm{def}}} \{\boldsymbol{\sigma}\in\Sigma^+:\pi(\boldsymbol{\sigma})=w\}

for the set of token strings realizing ww alone (identifying ww with the length-one word string), where Σ+=Σ∗∖{ε}\Sigma^+=\Sigma^*\setminus\{\varepsilon\}. For a token string σ\boldsymbol{\sigma}, the number of occurrences of ww is read off its parse:4

#(σ,w)=def∑t=1∣π(σ)∣1{π(σ)t=w}.(7)\#(\boldsymbol{\sigma},w) \mathrel{\mathop{=}^{\mathrm{def}}} \sum_{t=1}^{|\pi(\boldsymbol{\sigma})|}\mathbf{1}\{\pi(\boldsymbol{\sigma})_t=w\}. \tag*{(7)}

§C describes how we implement π\pi, and hence #\#, for the tokenizer used in our experiments. The expected count of a word w∈Ww\in\mathcal{W} under pΣp_{\Sigma} is then

μ(w)=defEX∼pΣ[#(X,w)]=∑σ∈Σ∗pΣ(σ)#(σ,w).(8)\mu(w) \mathrel{\mathop{=}^{\mathrm{def}}} \mathbb{E}_{X\sim p_{\Sigma}}[\#(X,w)]=\sum_{\boldsymbol{\sigma}\in\Sigma^*}p_{\Sigma}(\boldsymbol{\sigma})\#(\boldsymbol{\sigma},w). \tag*{(8)}

We can then derive a notion of a word’s unigram probability by normalizing this expectation to a proper probability distribution over W\mathcal{W}:

u(w)=μ(w)∑w′∈Wμ(w′).(9)u(w)=\frac{\mu(w)}{\sum_{w'\in\mathcal{W}}\mu(w')}. \tag*{(9)}

Note that—like the contextual prefix probability p⃗Σ(⋅∣σ)\vec{p}_{\Sigma}(\cdot\mid\boldsymbol{\sigma})—u(w)u(w) is a distribution over W\mathcal{W}, and is only defined for a single word w∈Ww\in\mathcal{W}.

Remark. Let NW(σ)N_{\mathcal{W}}(\boldsymbol{\sigma}) denote the number of occurrences in σ\boldsymbol{\sigma} of words in W\mathcal{W}. By linearity of expectation, ∑w∈Wμ(w)=EX∼pΣ[∑w∈W#(X,w)]=EX∼pΣ[NW(X)]\sum_{w\in\mathcal{W}}\mu(w)=\mathbb{E}_{X\sim p_{\Sigma}}[\sum_{w\in\mathcal{W}}\#(X,w)]=\mathbb{E}_{X\sim p_{\Sigma}}[N_{\mathcal{W}}(X)], where the last equality is immediate, since each position of π(σ)\pi(\boldsymbol{\sigma}) is occupied by exactly one word of W\mathcal{W}. Thus Eq. (9) normalizes by the expected word count.

Which Language Model

Formal theories of language, most notably the generative tradition (Chomsky, [12, 13]), have historically separated a speaker’s idealized knowledge of grammatical rules (competence) from the actual, often imperfect, use of language in real-time processing (performance). Probability has found a central role in explaining the latter [5, 35, 11, 42]: under a probabilistic, performance-oriented view a model of language is then evaluated not by whether it generates the correct set of grammatical strings, but by how well it mirrors the behavior of human speakers. The question is thus not whether probability is relevant for modeling linguistic performance, but what distribution it should approximate. We contrast two viewpoints on this question, which we refer to as the frequentist and the cognitive views.

The frequentist view. One approach to estimating an LM is to optimize it to place high probability on a large, heterogeneous corpus—comprising, e.g., collaborative text on Wikipedia, conversational text on Reddit, and the structured, iteratively revised prose of digitized books [29] (Radford et al. 2019).5 Under the frequentist view, this LM approximates the probability distribution that generated the corpus text, which we denote pCp_{\mathrm{C}}. The cognitive relevance of pCp_{\mathrm{C}} has been widely studied—corpus frequency has been shown to play a central role in language use and change [7, 9], accounting for phonological reduction [10, 8] and grammaticalization [33]. On the other hand, the generative process underlying such heterogeneous corpora is complex: it involves millions of individuals writing diverse texts in an iterative fashion over extended periods of time, and the resulting corpora are several orders of magnitude larger than the linguistic input any single human observes over a lifetime (Warstadt and Bowman, 2022).

The cognitive view. In contrast, the cognitive view interprets the LM as a proxy for pHp_{\mathrm{H}}—a theoretical construct representing the internalized probability distribution over linguistic strings that a human carries in their mind. Because we lack direct access to such a theoretical construct, a corpus-estimated LM often serves as a practical approximation, an assumption underlying much of psycholinguistic modeling (Wilcox et al., 2020; Oh and Schuler, 2023b; Shain et al., 2024, inter alia). However, as LMs have grown larger—in terms of both training data and parameter count—they have become less predictive of human behavior. This phenomenon is known as the inverse-scaling law (Oh and Schuler, 2023b): predictive accuracy of human data improves with scale only up to a point, after which it degrades. This motivates an alternative approach in which the LM is directly aligned with human psychometric data to obtain more cognitively plausible probability estimates [39]. The construct pHp_{\mathrm{H}} need not be an unconstrained distribution over arbitrarily long contexts, either. The cognitive model may be lossy [24], reflecting constraints such as limited working memory [25, 26] that restrict how much prior context is effectively encoded; in the limit, pHp_{\mathrm{H}} reduces to unigram probabilities.

Surprisal Theory

Eye tracking and reading data. To study sentence processing during reading, several corpora have been developed in which many participants read the same texts and eye-tracking data are collected while reading [36] (Siegelman et al. 2022). Eye-tracking studies record participants’ gaze continuously, allowing fixations of varying duration to be mapped directly onto the text (Rayner, 1998). Although some work has sought to model these fine-grained fixations (Re et al., 2025), the fixations are generally aggregated to yield a measure of reading time for some unit of interest. The choice of aggregation reflects assumptions about which stage of processing is being targeted [22, 4] (Rayner 1998): first fixation duration (the duration of the reader’s first fixation on a unit) is thought to reflect early lexical processing [15], while gaze duration (cumulative fixation time before first leaving a unit) and total fixation duration (cumulative fixation time including regressions back to the unit) capture progressively later integration processes (Liversedge et al., 1998).

Contextual surprisal. Surprisal theory states that processing difficulty is related to a unit’s negative log probability in a given context [31, 42] (Shain et al. 2024). Psycholinguistic studies test this theory by relating surprisal to behavioral or neural measures of processing effort such as fixation duration from eye-tracking data (Wilcox et al., 2023b) and event-related potentials (ERPs) from electroencephalography [23]. LMs play a central role in these studies because they provide estimates of contextual probabilities. Given pWp_{\mathcal{W}}, the contextual surprisal of a unit wtw_t in context w<t\mathbf{w}_{<t} is defined as

scontext(wt,w<t)=−log⁡p⃗W(wt∣w<t).(10)s_{\mathrm{context}}(w_t,\mathbf{w}_{<t})=-\log\vec{p}_{\mathcal{W}}(w_t\mid\mathbf{w}_{<t}). \tag*{(10)}

Unigram surprisal. Psycholinguistic studies indicate that units with high unigram frequency are more easily accessible in the mental lexicon [32, 7]. This is typically measured in log scale, using unigram surprisal

sunigram(w)=−log⁡u(w),(11)s_{\mathrm{unigram}}(w)=-\log u(w), \tag*{(11)}

where w∈Ww \in\mathcal{W} is the unit of interest. Both surprisal quantities are thus functionals of the single distribution pΣp_{\Sigma} (given the unit parser): contextual surprisal of the conditional structure it induces through p⃗W\vec{p}_{\mathcal{W}}, and unigram surprisal of the marginal it induces through uu. The consistent distribution principle (§5) demands that both be estimated from the same pΣp_{\Sigma}, so that this relationship also holds for the estimates. Given that it has been shown to affect ease of processing, unigram surprisal is regularly included as a baseline predictor of reading times; however, some studies have focused specifically on its effect on reading (Shain, 2019, 2024; Opedal et al., 2024).

Principles of Frequency Estimation

Having discussed which distributions can be modeled to study language and having defined unigram and contextual surprisal, we can now formalize three guiding principles for estimating unigram surprisal and discuss relevant literature around them. The principles are summarized in Fig. 2.

Best estimate principle. The first principle adopts an empirical conception of unigram frequency. Under this conception, unigram frequency is treated as a real population quantity: the relative prevalence of a unit in the underlying distribution that generated the corpus. The observed strings are then viewed as samples from that distribution, and estimation amounts to recovering this empirical truth from data. This perspective has two advantages. First, it ties the target quantity to observable language use rather than to an unobserved latent construct. Second, it admits a simple and interpretable estimator: under independent and identically distributed (i.i.d.) samples, unigram probabilities are estimated by normalized token counts, which is equivalent to the maximum-likelihood estimator for a multinomial model; see §B. As we show in Proposition 2, because −log⁡-\log is strictly convex, an unbiased estimator of unigram probability does not yield an unbiased estimator of unigram surprisal. Plug-in estimators of related information-theoretic quantities (i.e., entropy) are known to be biased for the same reason [3] (Miller 1955). Even for an unbiased unigram probability estimator, the estimated unigram surprisal is biased upward. The bias in surprisal disappears only for a zero-variance unigram probability estimator, motivating lower variance frequency estimators.

Cognitive plausibility principle. The second principle adopts a cognitive conception of unigram frequency. Under this conception, the target is not an empirical population quantity directly given by attested token counts, but a latent property of the expectations in the human mind, as discussed with respect to the cognitive view of the LM (§3). The goal is not to simply recover the unigram distribution of the corpus-generating process, but to approximate the distribution that best reflects human baseline expectations over units. In the past, this has been operationalized as the extent to which frequency values are predictive of human reaction times in lexical decision tasks. This criterion has been studied as an alternative way to validate frequency resources, rather than factors like corpus size [37, 6]. This has led to findings that texts from the Internet [1] or movie and TV subtitles (New et al., 2007) seem to yield more cognitively plausible frequency values than those from edited publications. Importantly, this principle may be at odds with the best estimate principle. Larger LMs, despite achieving lower perplexity, have been found to yield contextual surprisal estimates that are less predictive of processing effort than those of smaller models (Oh et al., 2022; Oh and Schuler, 2023b). One explanation for this is that larger models assign probabilities to very low-frequency units more accurately, but in ways that are less cognitively plausible (Oh et al., 2024). Similarly, Opedal et al. (2024) argue that medium-sized models may yield contextual surprisal estimates closer to unigram frequency because they are less effective at predicting rare units in context, better matching the balance of contextual and frequency-based information in human processing. The same issue arises for unigram frequency itself: the statistically best estimate need not be the cognitively most plausible one.

Although this question has been studied extensively for contextual surprisal, comparatively little is known about how modeling choices affect the cognitive plausibility of unigram frequency estimates.

Consistent distribution principle. The third principle is that contextual and unigram surprisal should be derived from the same distribution. Although the literature often estimates them from different sources, the two quantities are not independent: both are functionals of a single distribution over linguistic sequences. Contextual surprisal reflects its conditional structure, while unigram surprisal reflects the marginal distribution it induces over units. Under a shared distribution, this relationship holds by construction. Under heterogeneous estimation, it does not: the two predictors then summarize different probabilistic models rather than a single generative system. Our unified estimation framework restores this coherence by deriving both quantities from the same LM. The consistent distribution principle has been observed before, though it has primarily been addressed by changing the corpora used to calculate unigram frequency. For example, Shain (2024) calculate contextual surprisal with GPT-2. To calculate unigram surprisal, Shain use a corpus that was specifically chosen to approximate the model’s training distribution in an effort to minimize effects from this mismatch. Likewise, in their assessment of surprisal as a measure of metaphor novelty, Momen and Zarrieß (2026) compare unigram surprisals from wordfreq (Speer, 2022) to those calculated over the training data of the LMs they use to obtain contextual surprisal.

From Autoregressive Language Models to Unigram Probabilities

We now consider how to operationalize the consistent distribution principle, taking an autoregressive language model as the shared distribution and studying the problem of estimating the unigram probabilities it induces. Since exact computation of Eq. (9) is infeasible, we instead consider two different estimators of this quantity. Specifically, we define estimators for words w∈Ww \in\mathcal{W}, which may have several valid tokenizations under a language model’s token alphabet Σ\Sigma.6

A Naive Monte Carlo Estimator

A straightforward way to estimate Eq. (9) is by naive Monte Carlo (NMC) sampling. Here, we independently sample NN strings from pΣp_{\Sigma}, i.e.,

X(1),…,X(N)∼i.i.d.pΣ,X^{(1)}, \ldots, X^{(N)} \mathrel{\overset{\mathrm{i.i.d.}}{\sim}} p_{\Sigma},

and estimate u(w)u(w) by the empirical frequency of ww across all word occurrences in the samples:

u^(w)=∑n=1N#(X(n),w)∑n=1N∑w′∈W#(X(n),w′).(12)\hat{u}(w) = \frac{\sum_{n=1}^{N} \#\left(X^{(n)}, w\right)}{\sum_{n=1}^{N}\sum_{w' \in\mathcal{W}} \#\left(X^{(n)}, w'\right)}. \tag*{(12)}

Proposition 1. Assume that EX∼pΣ[∣X∣]<∞\mathbb{E}_{X \sim p_{\Sigma}}[|X|] < \infty and that ∑w′∈Wμ(w′)>0\sum_{w' \in\mathcal{W}} \mu(w') > 0. Then, for every fixed w∈Ww \in\mathcal{W}, the Monte Carlo estimator u^N(w)\hat{u}_{N}(w) is strongly consistent and asymptotically unbiased for u(w)u(w). That is,

u^N(w)→a.s.u(w)as N→∞,(13)\hat{u}_{N}(w) \xrightarrow{\mathrm{a.s.}} u(w) \qquad\text{as } N \to\infty, \tag*{(13)}

and

lim⁡N→∞E[u^N(w)]=u(w).(14)\lim_{N \to\infty} \mathbb{E}[\hat{u}_{N}(w)] = u(w). \tag*{(14)}

A Marginalized Monte Carlo Estimator

The naive MC estimator in Eq. (12) can have high variance, since XX ranges over a very large (infinite) sample space.7 This has negative implications for the efficiency of the frequency estimator, as well as the unigram surprisal values which we derive from it. As we show in Proposition 2, unigram surprisal values are positively biased in expectation unless the estimator has zero variance, further motivating a lower-variance frequency estimator.

To reduce this variance, we propose a marginalized Monte Carlo (MMC) estimator. The key idea is to retain the sampled prefixes of the NMC estimator, while marginalizing over the next token at each prefix. Rather than treating a word as present or absent in the sampled next token, we compute the conditional expected contribution of that next token to the word count. Suppose a sampled sequence has reached a prefix σ\sigma. NMC observes a single sampled continuation and therefore records either an occurrence of ww at that position or no occurrence. The LM, however, assigns a probability to every next token, as well as to the further tokens needed to complete an occurrence of ww; MMC uses all of this information.

Canonical and residual occurrences. An occurrence of ww may be realized by different token strings: its realizing span (§A), read as a standalone string, is an element of R(w)R(w) under the parser of §C. We split the count into the part realized by the canonical tokenization of ww, and the part realized in any other way:

#(σ,w)=#can(σ,w)+#res(σ,w).(15)\#(\sigma,w)=\#^{\mathrm{can}}(\sigma,w)+\#^{\mathrm{res}}(\sigma,w). \tag*{(15)}

The canonical part can be marginalized with the LM’s next-token distributions, whereas the residual part is only read off a sampled string once that string is complete.

Marginalizing at each prefix. We use Zw,tcanZ^{\mathrm{can}}_{w,t} to refer to a canonical occurrence of ww beginning at position tt (formally, §A), and define

hw(σ∣σ)≔E[Zw,tcan∣X<t=σ,Xt=σ],(16)h_w(\sigma\mid\sigma)\coloneqq\mathbb{E}\left[Z^{\mathrm{can}}_{w,t}\mid X_{<t}=\sigma,X_t=\sigma\right], \tag*{(16)}

the probability that a canonical occurrence begun at position tt is completed—including its right-boundary condition (§C)—given that the next token is σ\sigma. Averaging over the next-token distribution, ∑σ∈Σp⃗Σ(σ∣σ)hw(σ∣σ)\sum_{\sigma\in\Sigma}\vec{p}_{\Sigma}(\sigma\mid\sigma)h_w(\sigma\mid\sigma) is the expected canonical contribution of the position following σ\sigma.

Marginalizing the canonical part alone would discard residual occurrences. Writing Hw(σ)≔∑s=1∣σ∣hw(σs∣σ<s)H_w(\sigma)\coloneqq\sum_{s=1}^{|\sigma|}h_w(\sigma_s\mid\sigma_{<s}) for the marginalized canonical contribution accumulated along σ\sigma, we define a per-step contribution that charges whatever is left over to the terminal EOS position:

dw(σ∣σ)≔{hw(σ∣σ),σ∈Σ,#(σ,w)−Hw(σ),σ=EOS.(17)d_w(\sigma\mid\sigma)\coloneqq \begin{cases} h_w(\sigma\mid\sigma), & \sigma\in\Sigma,\\ \#(\sigma,w)-H_w(\sigma), & \sigma=\mathrm{EOS}. \end{cases} \tag*{(17)}

By construction, this decomposition is exact pathwise: for every completed string σ\sigma,

#(σ,w)=∑t=1∣σ∣dw(σt∣σ<t)+dw(EOS∣σ).(18)\#(\sigma,w)=\sum_{t=1}^{|\sigma|}d_w(\sigma_t\mid\sigma_{<t})+d_w(\mathrm{EOS}\mid\sigma). \tag*{(18)}

The EOS term therefore absorbs both the residual, non-canonical occurrences and the gap between the marginalized and the realized canonical counts.

The MMC estimator. Taking the conditional expectation of dwd_w at every prefix visited by a sampled string XX gives the per-string count estimate

#^MMC(X,w)≔∑t=1∣X∣+1EA∼p⃗Σ(⋅∣X<t)[dw(A∣X<t)],(19)\widehat{\#}^{\mathrm{MMC}}(X,w)\coloneqq\sum_{t=1}^{|X|+1}\mathbb{E}_{A\sim\vec{p}_{\Sigma}(\cdot\mid X_{<t})}\left[d_w(A\mid X_{<t})\right], \tag*{(19)}

which we show to be unbiased for the expected count of Eq. (8) in §A. Normalizing exactly as in Eq. (12) yields our estimator of Eq. (9):

u^∗(w)=∑n=1N#^MMC(X(n),w)∑n=1N∑w′∈W#(X(n),w′),(20)\widehat{u}^{*}(w)=\frac{\sum_{n=1}^{N}\widehat{\#}^{\mathrm{MMC}}(X^{(n)},w)}{\sum_{n=1}^{N}\sum_{w'\in\mathcal{W}}\#(X^{(n)},w')}, \tag*{(20)}

where X(1),…,X(N)∼i.i.d.pΣX^{(1)},\ldots,X^{(N)}\mathrel{\overset{\mathrm{i.i.d.}}{\sim}}p_{\Sigma}. The denominator is the same expected-word-count estimate used by NMC in Eq. (12).

Approximate variant. Given the computational cost of the MMC estimator (§A) and the relatively small probability mass that LMs assign to non-canonical tokenizations ((Vieira et al., 2025)), we also experiment with an approximation that counts only canonical occurrences, i.e., replaces #\# in Eq. (15) by #can\#^{\mathrm{can}}, so that #res(σ,w)=0\#^{\mathrm{res}}(\sigma,w)=0. The EOS term of the expectation-equivalent contribution d~w\widetilde{d}_w of §A then vanishes, and the corresponding estimator reduces to the canonical-only count estimate

#^canMMC(X,w)≔∑t=1∣X∣+1EA∼p⃗Σ(⋅∣X<t)[hw(A∣X<t)]\widehat{\#}^{\mathrm{MMC}}_{\mathrm{can}}(X,w)\coloneqq\sum_{t=1}^{|X|+1}\mathbb{E}_{A\sim\vec{p}_{\Sigma}(\cdot\mid X_{<t})}\left[h_w(A\mid X_{<t})\right]

(with hw(EOS∣⋅)≔0h_w(\mathrm{EOS}\mid\cdot)\coloneqq0), which is unbiased for the canonical share EX∼pΣ[#can(X,w)]\mathbb{E}_{X\sim p_{\Sigma}}[\#^{\mathrm{can}}(X,w)] of Eq. (8), and so agrees with Eq. (19) in expectation exactly when the residual mass vanishes. Normalizing as before gives

u^can∗(w)=∑n=1N#^canMMC(X(n),w)∑n=1N∑w′∈W#(X(n),w′).(21)\widehat{u}^{*}_{\mathrm{can}}(w)=\frac{\sum_{n=1}^{N}\widehat{\#}^{\mathrm{MMC}}_{\mathrm{can}}(X^{(n)},w)}{\sum_{n=1}^{N}\sum_{w'\in\mathcal{W}}\#(X^{(n)},w')}. \tag*{(21)}

The approximation above does not require taking non-canonical tokenizations in the sampled strings into account, meaning that its numerator underestimates the expected count μ(w)\mu(w) whenever residual mass is nonzero. We study the downstream impact of this in § 8.

Experiments

Opedal et al. (2024) model reading times of orthographic words in eleven languages using contextual surprisal from mGPT (Shliazhko et al. (2024)) and unigram surprisal from the wordfreq package (Speer, 2022), with data from the Multilingual Eye-movement Corpus (MECO; Siegemund et al. (2022)). We extend their analyses, retaining their contextual surprisal values but replacing unigram surprisal estimates obtained from wordfreq with those estimated from the same distribution as the contextual surprisal using our NMC and MMC estimators. Strings for estimation are obtained by sampling from mGPT with a maximum length of 50 for computational considerations, and estimates are converted to unigram surprisals by taking the negative log of the estimated unigram probabilities.

Opedal et al. (2024) compare the predictive power of unigram surprisal, contextual surprisal, and pointwise mutual information (PMI). PMI [20] measures the association between a word wtw_t and its context w<tw_{<t}, and is defined as:

PMI⁡(wt,w<t)=sunigram(wt)−scontext(wt,w<t).(22)\operatorname{PMI}(w_t, w_{<t}) = s_{\mathrm{unigram}}(w_t) - s_{\mathrm{context}}(w_t, w_{<t}). \tag*{(22)}

Wherever PMI or unigram surprisal appear in our models, we report results using both the original wordfreq estimates (Speer, 2022) and each of our approaches to estimating unigram surprisal from mGPT. We model reading times using generalized additive mixed models (GAMMs), which differ from linear models by allowing predictors to enter through smooth, nonparametric functions rather than fixed linear coefficients. Our dependent variable is gaze duration. We fit five GAMMs with smooth terms for (i) unigram surprisal, (ii) contextual surprisal, (iii) PMI, (iv) contextual surprisal and unigram surprisal, and (v) PMI and unigram surprisal, each with a single spillover term per predictor and random effect smooths for participant and trial. Model fit is assessed via delta log-likelihood (ΔLL\Delta_{\mathrm{LL}}), defined as the difference in per-unit log-likelihood between a candidate model and a baseline with only random effects. Predictions are obtained via 10-fold cross-validation; positive values indicate that the candidate model assigns higher likelihood to the observed reading times than this baseline. To assess whether the MMC estimators yield a different quality of fit than corpus-based unigram surprisals, we compare ΔLL\Delta_{\mathrm{LL}} values between the two frequency conditions at the unit level using paired permutation tests, with pp-values corrected for multiple comparisons using the Holm–Bonferroni procedure. We discuss MECO and the covered languages, preprocessing, model specification, and evaluation details in §F.

Results

Marginalizing Reduces Variance

To study empirically whether the variance of the MMC estimator is lower than that of the naive Monte Carlo estimator in Eq. (12), we use both

to compute estimates of unigram frequency for each unigram appearing in the English portion of MECO (Siegelman et al., 2022). Given N=500N = 500 samples, we assess the variance of an estimator μ^\hat{\mu} via bootstrapping at subsample sizes J∈{100,200,300,400,500}J \in\{100, 200, 300, 400, 500\}, drawing K=1000K = 1000 resamples with replacement and computing the estimator on each resample. The variance is then estimated as follows:

V(μ^)=E[(μ^−E[μ^])2]=1K−1∑k=1K(μ^k−μ^)2,(23)\mathop{\mathrm{V}}(\hat{\mu}) = \mathbb{E}\left[(\hat{\mu} - \mathbb{E}[\hat{\mu}])^2\right] = \frac{1}{K-1}\sum_{k=1}^{K}(\hat{\mu}_k-\hat{\mu})^2, \tag*{(23)}

where μ^≔1K∑k=1Kμ^k\hat{\mu} \coloneqq\frac{1}{K}\sum_{k=1}^{K}\hat{\mu}_k. Results are in Table 1 (see Figure 4 for visualizations). The marginalized estimator (Eq. (20)) exhibits consistently lower variance than the naive estimator (Eq. (12)) across all subsample sizes and unigrams. Indeed, the ratio of the two variances generally grows with larger subsamples. This confirms that marginalization is an empirically efficient method to estimate unigram probabilities.

JJMMC varianceNMC varianceRatio
1001.685e-081.736e-0710.30
2008.508e-099.689e-0811.39
3005.648e-096.769e-0811.98
4004.044e-095.448e-0813.47
5003.307e-094.281e-0812.94

Table 1. Mean bootstrap variance of the Marginalized (MMC) and Naive (NMC) Monte Carlo unigram frequency estimators across subsample sizes JJ. Ratio = NMC/MMC.

Figure 4. Visualization of the bootstrapped variance estimates of our marginalized and naive Monte Carlo estimators of unigram frequency. Each line represents a single unigram from the English MECO data. The “Mean” lines refer to the average variance across all unigrams.

We also investigate the coverage of the naive Monte Carlo estimate, i.e., for how many unigrams in MECO it successfully obtains estimates. Obtaining an estimate with the Naive Monte Carlo estimator requires the unigram to occur in the sample pool, which is not guaranteed. Across a range of mGPT sample sizes from N=102N = 10^2 to N=107N = 10^7, we find that NMC never successfully obtains estimates for 100% of the types in the MECO corpus for any of the 11 languages tested here, and even obtains less than 50% coverage for Finnish types in sample pools of 10710^7 strings (see §E).

Importantly, our coverage experiment indicates that sampled text from mGPT is skewed toward Hebrew, Greek, and Russian. Thus, while the MMC estimator does not have the same coverage problems as the NMC estimator, the sampled contexts used for estimates may not be informative (i.e., because they are from different languages). To better adapt our estimator for use with multilingual language models, we introduce priority-MMC, which draws samples from a large pool with language-specific strata (see §I for details). Though the MMC and priority MMC estimators properly account for non-canonical tokenizations, our findings indicate that approximations over only canonical samples yield similar results with higher coverage and less computational cost. The results highlight that principled approaches to estimating unigram surprisal have a downstream impact.

Downstream Impact of Marginalizing

We now focus on models of gaze duration fit with various unigram estimates: corpus-based estimates from wordfreq ((Speer, 2022)), NMC estimates, MMC estimates and their canonical-only approximations (MMC and MMC Approx.), and priority-MMC estimates and their canonical-only approximations (Priority MMC and Priority MMC Approx.). We present bootstrapped distributions of item-level ΔLL\Delta_{\mathrm{LL}} for GAMMs modeling gaze duration in Figure 3. Across all MMC variants, we consistently observe a significant increase in ΔLL\Delta_{\mathrm{LL}} for GAMMs fit with PMI calculated with MMC unigram surprisals, relative to GAMMs fit with PMI calculated with wordfreq unigram surprisals. As in prior work ([34] (Opedal et al. 2024)), we find that unigram surprisal is a stronger predictor of reading times than contextual surprisal; our results confirm this finding in an environment where both values come from the same underlying distribution. We note that because of relatively poor coverage (even at high sample sizes) for rarer words, more samples are excluded from the NMC models, meaning the results are likely less robust than those from the various MMC estimators.

Figure 3. Comparison of ΔLL\Delta_{\mathrm{LL}} for various GAMMs of orthographic word gaze duration fit with unigram surprisals obtained with the wordfreq package ((Speer, 2022)) or with one of our estimators using samples from mGPT. Values are averaged across languages. Dashed lines represent the ΔLL\Delta_{\mathrm{LL}} of adding contextual surprisal relative to each facet’s baseline for reference. Significance tests compare estimated unigram surprisal against the corpus-estimated values via paired permutation test on item-level ΔLL\Delta_{\mathrm{LL}} differences, with stars marking corrected significance at an α\alpha level of 0.05. Error bars represent 95% confidence intervals.

Conclusion

This paper highlights an understudied matter in surprisal theory literature—while much attention has been given to how we estimate contextual surprisal, little research has focused on how we estimate unigram surprisal. We propose three principles to guide this estimation and introduce a Monte Carlo estimator of unigram surprisal from a language model, along with several marginalized variants. By deriving both surprisal quantities from the same model, differences in predictive power can be attributed to modeling decisions rather than mismatched estimation procedures. Our experiments show that the choice of unigram surprisal estimator has empirical consequences, and we provide further support that contextual surprisal is a weaker predictor of reading times than unigram surprisal in modeling reading time. We hope this encourages future work on what modeling decisions result in cognitively plausible unigram surprisal estimations and a more careful consideration of the role of frequency in computational psycholinguistics.

Limitations

Though we argue that our principles for estimating unigram surprisal are applicable to computational psycholinguistics as a whole, we limit our analyses to sentence processing. We find that the procedure for estimating unigram surprisal has an empirical impact when it comes to modeling reading times, but the claim warrants further investigation in other lines of computational psycholinguistics research, e.g., in modeling speech segmentation during language acquisition or acceptability judgment experiments.

In general, estimating unigram surprisal from a language model is computationally expensive compared to using lexical databases or corpus counts, particularly for the marginalized estimators we present. Because of their lower variance, the marginalized variants of our estimator also address this limitation of our method to some extent: relatively few samples are required to obtain stable estimates compared to the Naive Monte Carlo estimator. Still, computational resources limited our sample size and the maximum string length of the strings sampled from mGPT.

We also study a limited scope of units. Our implementation of the unit parser matches whitespace-initial token spans (§C), which is adequate for the whitespace-delimited orthographies studied here but not in general. Whether the impact of the specific estimator used varies with units of interest (for example, characters or the contextually defined words studied in Kiegeland et al. [38]) remains an open question.

Ethical Concerns

This study uses eye-tracking data from human participants. Because the dataset has already been published (Siegelman et al., 2022), we foresee no new ethical concerns from the contributions made in this paper.

Acknowledgments

ZH was supported by the Swiss National Science Foundation (Grant No. 10003607).

Estimator description

  • Word occurrences. Occurrences of a word ww and the split of #\# into canonical and residual realizations are as in Eq. (15), writing Cw(X)≔#(X,w)C_w(X) \coloneqq\#(X,w) and likewise for the canonical and residual parts: an occurrence at unit position ss of π(X)\pi(X) is canonical when the token span realizing it equals the canonical tokenization of ww, and residual otherwise. We write Zw,tcanZ^{\mathrm{can}}_{w,t} for the indicator that a canonical occurrence begins at token position tt.

  • Marginalize the canonical realization. A canonical occurrence of ww starting at position tt requires the next kk tokens to match its canonical tokenization, followed by a valid right boundary. We therefore define

hw(a∣x)≔E[Zw,tcan∣X<t=x,Xt=a].h_w(a \mid x) \coloneqq\mathbb{E}\left[Z^{\mathrm{can}}_{w,t} \mid X_{<t}=x, X_t=a\right].

We can then define the probability that the canonical realization of ww begins at prefix xx and is completed with a valid right boundary as

∑a∈Σp⃗Σ(a∣x)hw(a∣x).\sum_{a \in\Sigma} \vec{p}_{\Sigma}(a \mid x) h_w(a \mid x).

Specifically, computing this quantity at a prefix xx requires O((k+1)C)O((k+1)C) computation, where kk is the number of tokens in the canonical realization of ww and CC is the cost of a single LM forward pass.

  • Recover the exact count at EOS. Define the per-step contribution

dw(a∣x)={hw(a∣x),a∈Σ,Cwcan(x)+Cwres(x)−∑s=1∣x∣hw(xs∣x<s),a=EOS.d_w(a \mid x) = \begin{cases} h_w(a \mid x), & a \in\Sigma,\\ C_w^{\mathrm{can}}(x) + C_w^{\mathrm{res}}(x) - \sum_{s=1}^{|x|} h_w(x_s \mid x_{<s}), & a=\mathrm{EOS}. \end{cases}

Then, for every completed string XX,

Cw(X)=Cwcan(X)+Cwres(X)=∑t=1∣X∣hw(Xt∣X<t)+[Cwcan(X)+Cwres(X)−∑t=1∣X∣hw(Xt∣X<t)]=∑t=1∣X∣dw(Xt∣X<t)+dw(EOS∣X).\begin{aligned} C_w(X) = C_w^{\mathrm{can}}(X) + C_w^{\mathrm{res}}(X) \\ &= \sum_{t=1}^{|X|} h_w(X_t \mid X_{<t}) + \left[C_w^{\mathrm{can}}(X) + C_w^{\mathrm{res}}(X) - \sum_{t=1}^{|X|} h_w(X_t \mid X_{<t})\right] \\ &= \sum_{t=1}^{|X|} d_w(X_t \mid X_{<t}) + d_w(\mathrm{EOS} \mid X). \end{aligned}
  • Marginalize the per-step contribution dwd_w. At each prefix xx, take the conditional expectation of the next-step contribution:

EA∼p⃗Σ(⋅∣x)[dw(A∣x)]=∑a∈Σp⃗Σ(a∣x)hw(a∣x)+p⃗Σ(EOS∣x)[Cwcan(x)+Cwres(x)−∑s=1∣x∣hw(xs∣x<s)].\mathbb{E}_{A \sim\vec{p}_{\Sigma}(\cdot\mid x)}[d_w(A \mid x)] = \sum_{a \in\Sigma} \vec{p}_{\Sigma}(a \mid x)h_w(a \mid x) + \vec{p}_{\Sigma}(\mathrm{EOS} \mid x)\left[C_w^{\mathrm{can}}(x) + C_w^{\mathrm{res}}(x) - \sum_{s=1}^{|x|} h_w(x_s \mid x_{<s})\right].
  • Define the marginalized estimator. For a sampled string XX, sum the conditional expected contributions over all visited prefixes:

C^wMMC(X)=∑t=1∣X∣+1EA∼p⃗Σ(⋅∣X<t)[dw(A∣X<t)].\widehat{C}^{\mathrm{MMC}}_w(X) = \sum_{t=1}^{|X|+1} \mathbb{E}_{A \sim\vec{p}_{\Sigma}(\cdot\mid X_{<t})}\left[d_w(A \mid X_{<t})\right].
  • Show unbiasedness. Let τ(X)≔∣X∣+1\tau(X) \coloneqq|X|+1. Then

EX∼p[C^wMMC(X)]=EX∼p[∑t=1τ(X)EA∼p⃗Σ(⋅∣X<t)[dw(A∣X<t)]]\mathbb{E}_{X\sim p}\left[\widehat{C}^{\mathrm{MMC}}_w(X)\right] = \mathbb{E}_{X\sim p}\left[\sum_{t=1}^{\tau(X)}\mathbb{E}_{A\sim\vec{p}_{\Sigma}(\cdot\mid X_{<t})}\left[d_w(A\mid X_{<t})\right]\right]
=(extend sum via indicator)EX∼p[∑t=1∞1{∣X∣≥t−1}EA∼p⃗Σ(⋅∣X<t)[dw(A∣X<t)]]\underset{\text{(extend sum via indicator)}}{=} \mathbb{E}_{X\sim p}\left[\sum_{t=1}^{\infty}\mathbf{1}\{|X|\ge t-1\}\mathbb{E}_{A\sim\vec{p}_{\Sigma}(\cdot\mid X_{<t})}\left[d_w(A\mid X_{<t})\right]\right]
=(expectation as sum)∑x∈Σ∗p(x)∑t=1∞1{∣x∣≥t−1}EA∼p⃗Σ(⋅∣x<t)[dw(A∣x<t)]\underset{\text{(expectation as sum)}}{=} \sum_{x\in\Sigma^*}p(x)\sum_{t=1}^{\infty}\mathbf{1}\{|x|\ge t-1\}\mathbb{E}_{A\sim\vec{p}_{\Sigma}(\cdot\mid x_{<t})}\left[d_w(A\mid x_{<t})\right]
=(swap sums (Fubini))∑t=1∞∑x∈Σ∗p(x)1{∣x∣≥t−1}EA∼p⃗Σ(⋅∣x<t)[dw(A∣x<t)]\underset{\text{(swap sums (Fubini))}}{=} \sum_{t=1}^{\infty}\sum_{x\in\Sigma^*}p(x)\mathbf{1}\{|x|\ge t-1\}\mathbb{E}_{A\sim\vec{p}_{\Sigma}(\cdot\mid x_{<t})}\left[d_w(A\mid x_{<t})\right]
=(rewrite as expectation)∑t=1∞EX∼p[1{∣X∣≥t−1}EA∼p⃗Σ(⋅∣X<t)[dw(A∣X<t)]]\underset{\text{(rewrite as expectation)}}{=} \sum_{t=1}^{\infty}\mathbb{E}_{X\sim p}\left[\mathbf{1}\{|X|\ge t-1\}\mathbb{E}_{A\sim\vec{p}_{\Sigma}(\cdot\mid X_{<t})}\left[d_w(A\mid X_{<t})\right]\right]
=(expectation as sum)∑t=1∞∑x∈Σ∗p(x)1{∣x∣≥t−1}EAt∼p⃗Σ(⋅∣x<t)[dw(At∣x<t)]\underset{\text{(expectation as sum)}}{=} \sum_{t=1}^{\infty}\sum_{x\in\Sigma^*}p(x)\mathbf{1}\{|x|\ge t-1\}\mathbb{E}_{A_t\sim\vec{p}_{\Sigma}(\cdot\mid x_{<t})}\left[d_w(A_t\mid x_{<t})\right]
=(split x=x<tz)∑t=1∞∑x<t∈Σt−1∑z∈Σ∗[∏s=1t−1p⃗Σ(xs∣x<s)][∏r=1∣z∣p⃗Σ(zr∣x<tz<r)]p⃗Σ(EOS∣x<tz)1{∣x<tz∣≥t−1}EAt∼p⃗Σ(⋅∣x<t)[dw(At∣x<t)]\underset{\text{(split }x=x_{<t}z\text{)}}{=} \sum_{t=1}^{\infty}\sum_{x_{<t}\in\Sigma^{t-1}}\sum_{z\in\Sigma^*} \left[\prod_{s=1}^{t-1}\vec{p}_{\Sigma}(x_s\mid x_{<s})\right] \left[\prod_{r=1}^{|z|}\vec{p}_{\Sigma}(z_r\mid x_{<t}z_{<r})\right] \vec{p}_{\Sigma}(\mathrm{EOS}\mid x_{<t}z)\mathbf{1}\{|x_{<t}z|\ge t-1\} \mathbb{E}_{A_t\sim\vec{p}_{\Sigma}(\cdot\mid x_{<t})}\left[d_w(A_t\mid x_{<t})\right]
\underset{\text{(}z\text{-sum equals 1)}}{=}\n\sum_{t=1}^{\infty}\sum_{x_{<t}\in\Sigma^{t-1}}\n\underbrace{\left[\prod_{s=1}^{t-1}\vec{p}_{\Sigma}(x_s\mid x_{<s})\right]}_{=\vec{p}_{\Sigma}(x_{<t})}\n\sum_{z\in\Sigma^*}\n\underbrace{\left[\prod_{r=1}^{|z|}\vec{p}_{\Sigma}(z_r\mid x_{<t}z_{<r})\right]\vec{p}_{\Sigma}(\mathrm{EOS}\mid x_{<t}z)}_{=1}\n\mathbf{1}\{|x_{<t}z|\ge t-1\}\n\mathbb{E}_{A_t\sim\vec{p}_{\Sigma}(\cdot\mid x_{<t})}\left[d_w(A_t\mid x_{<t})\right]
=(indicator equals 1)∑t=1∞∑x<t∈Σt−1p⃗Σ(x<t)1{∣x<t∣≥t−1}⏟=1 since x<t∈Σt−1EAt∼p⃗Σ(⋅∣x<t)[dw(At∣x<t)]\underset{\text{(indicator equals 1)}}{=} \sum_{t=1}^{\infty}\sum_{x_{<t}\in\Sigma^{t-1}} \vec{p}_{\Sigma}(x_{<t}) \underbrace{\mathbf{1}\{|x_{<t}|\ge t-1\}}_{=1\ \text{since }x_{<t}\in\Sigma^{t-1}} \mathbb{E}_{A_t\sim\vec{p}_{\Sigma}(\cdot\mid x_{<t})}\left[d_w(A_t\mid x_{<t})\right]
=(expand inner expectation)∑t=1∞∑x<t∈Σt−1p⃗Σ(x<t)∑a∈Σ∪{EOS}p⃗Σ(a∣x<t)dw(a∣x<t)\underset{\text{(expand inner expectation)}}{=} \sum_{t=1}^{\infty}\sum_{x_{<t}\in\Sigma^{t-1}} \vec{p}_{\Sigma}(x_{<t}) \sum_{a\in\Sigma\cup\{\mathrm{EOS}\}} \vec{p}_{\Sigma}(a\mid x_{<t})d_w(a\mid x_{<t})
=(split off EOS term)∑t=1∞∑x<t∈Σt−1p⃗Σ(x<t)[∑a∈Σp⃗Σ(a∣x<t)dw(a∣x<t)+p⃗Σ(EOS∣x<t)dw(EOS∣x<t)]\underset{\text{(split off EOS term)}}{=} \sum_{t=1}^{\infty}\sum_{x_{<t}\in\Sigma^{t-1}} \vec{p}_{\Sigma}(x_{<t}) \left[ \sum_{a\in\Sigma}\vec{p}_{\Sigma}(a\mid x_{<t})d_w(a\mid x_{<t}) +\vec{p}_{\Sigma}(\mathrm{EOS}\mid x_{<t})d_w(\mathrm{EOS}\mid x_{<t}) \right]
=(chain rule of p⃗Σ)∑t=1∞∑x≤t∈Σtp⃗Σ(x≤t)dw(xt∣x<t)\underset{\text{(chain rule of }\vec{p}_{\Sigma}\text{)}}{=} \sum_{t=1}^{\infty}\sum_{x_{\le t}\in\Sigma^t} \vec{p}_{\Sigma}(x_{\le t})d_w(x_t\mid x_{<t})
+∑t=1∞∑x<t∈Σt−1p⃗Σ(x<t)p⃗Σ(EOS∣x<t)dw(EOS∣x<t)=(EOS term over full strings)∑t=1∞∑x≤t∈Σtp⃗Σ(x≤t)dw(xt∣x<t)+∑x∈Σ∗p(x)dw(EOS∣x)=∑t=1∞∑x≤t∈Σt∑z∈Σ∗p(x≤tz)dw(xt∣x<t)+∑x∈Σ∗p(x)dw(EOS∣x)=(regroup by x)∑x∈Σ∗p(x)∑t=1∣x∣dw(xt∣x<t)+∑x∈Σ∗p(x)dw(EOS∣x)=(definition of Cw)EX∼p[∑t=1∣X∣dw(Xt∣X<t)+dw(EOS∣X)]=EX∼p[Cw(X)].\begin{aligned} &+\sum_{t=1}^{\infty}\sum_{\mathbf{x}_{<t}\in\Sigma^{t-1}}\vec{p}_{\Sigma}(\mathbf{x}_{<t})\vec{p}_{\Sigma}(\mathrm{EOS}\mid\mathbf{x}_{<t})d_w(\mathrm{EOS}\mid\mathbf{x}_{<t})\\ &\underset{\text{(EOS term over full strings)}}{=}\sum_{t=1}^{\infty}\sum_{\mathbf{x}_{\leq t}\in\Sigma^t}\vec{p}_{\Sigma}(\mathbf{x}_{\leq t})d_w(x_t\mid\mathbf{x}_{<t})+\sum_{\mathbf{x}\in\Sigma^*}p(\mathbf{x})d_w(\mathrm{EOS}\mid\mathbf{x})\\ &=\sum_{t=1}^{\infty}\sum_{\mathbf{x}_{\leq t}\in\Sigma^t}\sum_{\mathbf{z}\in\Sigma^*}p(\mathbf{x}_{\leq t}\mathbf{z})d_w(x_t\mid\mathbf{x}_{<t})+\sum_{\mathbf{x}\in\Sigma^*}p(\mathbf{x})d_w(\mathrm{EOS}\mid\mathbf{x})\\ &\underset{\text{(regroup by }\mathbf{x}\text{)}}{=}\sum_{\mathbf{x}\in\Sigma^*}p(\mathbf{x})\sum_{t=1}^{|\mathbf{x}|}d_w(x_t\mid\mathbf{x}_{<t})+\sum_{\mathbf{x}\in\Sigma^*}p(\mathbf{x})d_w(\mathrm{EOS}\mid\mathbf{x})\\ &\underset{\text{(definition of }C_w\text{)}}{=}\mathbb{E}_{X\sim p}\left[\sum_{t=1}^{|X|}d_w(X_t\mid X_{<t})+d_w(\mathrm{EOS}\mid X)\right]=\mathbb{E}_{X\sim p}[C_w(X)]. \end{aligned}
  • Define an expectation-equivalent contribution. Because the canonical correction term has zero expectation,

EX∼p[Cwcan(X)−∑t=1∣X∣hw(Xt∣X<t)]=0,\mathbb{E}_{X\sim p}\left[C_w^{\mathrm{can}}(X)-\sum_{t=1}^{|X|}h_w(X_t\mid X_{<t})\right]=0,

we can remove it from the EOS contribution without changing the expected count. We therefore define

d~w(a∣x)=def{hw(a∣x),a∈Σ,Cwres(x),a=EOS.\widetilde{d}_w(a\mid x)\overset{\mathrm{def}}{=} \begin{cases} h_w(a\mid x), & a\in\Sigma,\\ C_w^{\mathrm{res}}(x), & a=\mathrm{EOS}. \end{cases}

The corresponding cumulative quantity is

C~w(X)=def∑t=1∣X∣d~w(Xt∣X<t)+d~w(EOS∣X)=∑t=1∣X∣hw(Xt∣X<t)+Cwres(X).\widetilde{C}_w(X)\overset{\mathrm{def}}{=}\sum_{t=1}^{|X|}\widetilde{d}_w(X_t\mid X_{<t})+\widetilde{d}_w(\mathrm{EOS}\mid X)=\sum_{t=1}^{|X|}h_w(X_t\mid X_{<t})+C_w^{\mathrm{res}}(X).

Unlike dwd_w, the contribution d~w\widetilde{d}_w does not recover the exact count pathwise. However,

EX∼p[C~w(X)]=EX∼p[∑t=1∣X∣hw(Xt∣X<t)+Cwres(X)]=EX∼p[Cwcan(X)+Cwres(X)]=EX∼p[Cw(X)].\begin{aligned} \mathbb{E}_{X\sim p}\left[\widetilde{C}_w(X)\right] &=\mathbb{E}_{X\sim p}\left[\sum_{t=1}^{|X|}h_w(X_t\mid X_{<t})+C_w^{\mathrm{res}}(X)\right]\\ &=\mathbb{E}_{X\sim p}\left[C_w^{\mathrm{can}}(X)+C_w^{\mathrm{res}}(X)\right]\\ &=\mathbb{E}_{X\sim p}[C_w(X)]. \end{aligned}

Thus, d~w\widetilde{d}_w yields an expectation-equivalent decomposition of the count, whereas dwd_w yields a pathwise-exact decomposition.

  • Define the expectation-equivalent marginalized estimator.

Using d~w\widetilde{d}_w, we define the corresponding marginalized estimator as

C^wMMC−d~(X)=def∑t=1∣X∣+1EA∼p⃗Σ(⋅∣X<t)[d~w(A∣X<t)].\widehat{C}_w^{\mathrm{MMC}-\widetilde{d}}(X)\overset{\mathrm{def}}{=}\sum_{t=1}^{|X|+1}\mathbb{E}_{A\sim\vec{p}_{\Sigma}(\cdot\mid X_{<t})}\left[\widetilde{d}_w(A\mid X_{<t})\right].

MLE of Unigram Frequency

Suppose we observe strings X(1),…,X(N)∈Σ∗X^{(1)},\ldots,X^{(N)} \in\Sigma^* sampled from some distribution over strings. A direct estimator of unigram probability is obtained by replacing the expectations in Eqs. (8) and (9) with empirical averages.

First, define the empirical expected count

μ^N(w)=def1N∑n=1N#(X(n),w).(24)\widehat{\mu}_N(w) \mathrel{\mathop{=}^{\mathrm{def}}} \frac{1}{N}\sum_{n=1}^{N} \#\left(X^{(n)},w\right). \tag*{(24)}

Plugging this and its sum over W\mathcal{W} into Eq. (9) yields the estimator

p^N(w)=defμ^N(w)∑w′∈Wμ^N(w′).(25)\widehat{p}_N(w) \mathrel{\mathop{=}^{\mathrm{def}}} \frac{\widehat{\mu}_N(w)}{\sum_{w'\in\mathcal{W}}\widehat{\mu}_N(w')}. \tag*{(25)}

Equivalently, p^N(w)\widehat{p}_N(w) is just the relative frequency of ww among all word occurrences in the sample. The corresponding plug-in estimator of unigram surprisal is

s^uni,N(w)=def−log⁡p^N(w).(26)\widehat{s}_{\mathrm{uni},N}(w) \mathrel{\mathop{=}^{\mathrm{def}}} -\log\widehat{p}_N(w). \tag*{(26)}

This is the standard corpus-based approach to unigram estimation. It is a plug-in estimator because it estimates the population moments appearing in the definition of unigram probability and then substitutes those estimates into the target functional. Lexical resources such as frequency tables or unigram databases can be viewed as implementations of this same basic strategy, possibly with additional preprocessing or smoothing.

Proposition 2. For an unbiased estimator of unigram probability, the expected surprisal of the frequency estimator overestimates the true unigram surprisal:

E[−log⁡p^(w)]≥−log⁡u(w)=sunigram(w).(27)\mathbb{E}\left[-\log\widehat{p}(w)\right] \ge-\log u(w) = s_{\mathrm{unigram}}(w). \tag*{(27)}

Equality holds if and only if p^(w)\widehat{p}(w) has zero variance, i.e., is almost surely constant.

Proof. The expected surprisal of the frequency estimator is E[−log⁡p^(w)]\mathbb{E}\left[-\log\widehat{p}(w)\right]. Since −log⁡-\log is strictly convex,

E[−log⁡p^(w)]≥Jensen−log⁡E[p^(w)]=unbiased−log⁡u(w)=sunigram(w),(28)\mathbb{E}\left[-\log\widehat{p}(w)\right] \underset{\mathrm{Jensen}}{\ge} -\log\mathbb{E}\left[\widehat{p}(w)\right] \mathrel{\mathop{=}^{\mathrm{unbiased}}} -\log u(w) = s_{\mathrm{unigram}}(w), \tag*{(28)}

where the last equality uses E[p^(w)]=u(w)\mathbb{E}\left[\widehat{p}(w)\right] = u(w). Since −log⁡-\log is strictly convex, the Jensen step is strict unless p^(w)\widehat{p}(w) equals E[p^(w)]\mathbb{E}\left[\widehat{p}(w)\right] almost surely. That is, unless it has zero variance, in which case the bias disappears.

Implementing the Unit Parser

In practice, we do not compute π\pi exactly, but approximate it, and hence the count #\#, by matching whitespace-initial token spans. Kiegeland et al. [38] argue that whitespace heuristics of this kind are not linguistically adequate in general. We adopt the heuristic as an implementation of π\pi for the whitespace-delimited words studied here and note this as a limitation.

In the following example, we illustrate our boundary-sensitive matching for the target word good. ␣ marks the leading whitespace carried by a token, and green ␣ symbols indicate the word boundaries relevant to the match.

In both cases the scan starts at token position tt on ␣go, whose whitespace provides the left boundary. In (a), the span ␣good forms good and the whitespace of the next token ␣movie provides a valid right boundary, so the occurrence is counted. In (b), the same span is followed by ness, which carries no whitespace, so the right boundary condition fails and the occurrence is not counted.

Below we enumerate the left and right boundaries the matching requires:

Candidate matches for “good very movie” and “goodness her shows”

Figure 6.

BoundaryLocationCondition (satisfied when)
Leftfirst token of wwit carries a leading _ (word-initial marker Ġ), or it begins the sequence
Righttoken following the last token of wwit carries a leading _ (marker Ġ), or it is EOS

Table 14.

Properties of the Naive Monte Carlo Estimator

Proposition 1. Assume that EX∼pΣ[∣X∣]<∞\mathbb{E}_{X\sim p_{\Sigma}}[|X|] < \infty and that ∑w′∈Wμ(w′)>0\sum_{w'\in\mathcal{W}}\mu(w') > 0. Then, for every fixed w∈Ww \in\mathcal{W}, the Monte Carlo estimator u^N(w)\hat{u}_N(w) is strongly consistent and asymptotically unbiased for u(w)u(w). That is,

u^N(w)→a.s.u(w)as N→∞,(29)\hat{u}_N(w) \xrightarrow{\mathrm{a.s.}} u(w) \qquad\text{as } N \to\infty, \tag*{(29)}

and

lim⁡N→∞E[u^N(w)]=u(w).(30)\lim_{N\to\infty}\mathbb{E}[\hat{u}_N(w)] = u(w). \tag*{(30)}

Proof. Recall that NW(σ)=∑w′∈W#(σ,w′)N_{\mathcal{W}}(\sigma)=\sum_{w'\in\mathcal{W}}\#(\sigma,w') denotes the number of occurrences in σ\sigma of words in W\mathcal{W}, so that the estimator in Eq. (12) can be written as

u^N(w)=∑n=1N#(X(n),w)∑n=1NNW(X(n)),\hat{u}_N(w)=\frac{\sum_{n=1}^{N}\#\left(X^{(n)},w\right)}{\sum_{n=1}^{N}N_{\mathcal{W}}\left(X^{(n)}\right)},

with the convention u^N(w)≔0\hat{u}_N(w)\coloneqq0 when the denominator is zero. For any N>0N>0, define the random vector

ZN=(1N∑n=1N#(X(n),w),1N∑n=1NNW(X(n))).Z_N=\left(\frac{1}{N}\sum_{n=1}^{N}\#\left(X^{(n)},w\right),\frac{1}{N}\sum_{n=1}^{N}N_{\mathcal{W}}\left(X^{(n)}\right)\right).

Further define

ℓ=EX∼pΣ[NW(X)]=∑w′∈Wμ(w′).\ell=\mathbb{E}_{X\sim p_{\Sigma}}[N_{\mathcal{W}}(X)]=\sum_{w'\in\mathcal{W}}\mu(w').

Since every occurrence of a word occupies at least one token position,

0≤#(X,w)≤NW(X)≤∣X∣,0\leq\#(X,w)\leq N_{\mathcal{W}}(X)\leq|X|,

the assumption EX∼pΣ[∣X∣]<∞\mathbb{E}_{X\sim p_{\Sigma}}[|X|]<\infty implies that

EX∼pΣ[#(X,w)]<∞andEX∼pΣ[NW(X)]<∞.\mathbb{E}_{X\sim p_{\Sigma}}[\#(X,w)]<\infty \qquad\text{and}\qquad \mathbb{E}_{X\sim p_{\Sigma}}[N_{\mathcal{W}}(X)]<\infty.

Hence the strong law of large numbers applies to both coordinates of ZNZ_N, and

ZN→a.s.(μ(w),ℓ).(31)Z_N\xrightarrow{\mathrm{a.s.}}(\mu(w),\ell). \tag*{(31)}

Now define g:R×(R∖{0})→Rg:\mathbb{R}\times(\mathbb{R}\setminus\{0\})\to\mathbb{R}, g(x,y)=xyg(x,y)=\frac{x}{y}. Since gg is continuous at every point (x,y)(x,y) with y≠0y\neq0, and since ℓ>0\ell>0 by assumption (so that, almost surely, the denominator is nonzero for all sufficiently large NN), we can apply the continuous mapping theorem ((Van der Vaart, 2000, Theorem 2.3)

u^N(w)=g(1N∑n=1N#(X(n),w),1N∑n=1NNW(X(n)))→a.s.g(μ(w),ℓ)=μ(w)ℓ=u(w).\hat{u}_N(w)=g\left(\frac{1}{N}\sum_{n=1}^{N}\#\left(X^{(n)},w\right),\frac{1}{N}\sum_{n=1}^{N}N_{\mathcal{W}}\left(X^{(n)}\right)\right)\xrightarrow{\mathrm{a.s.}}g(\mu(w),\ell)=\frac{\mu(w)}{\ell}=u(w).

This proves strong consistency. It remains to show asymptotic unbiasedness. Since u^N(w)→u(w)\hat{u}_N(w) \to u(w) almost surely and, because #(X,w)≤Nw(X)\#(X,w) \leq Nw(X), we have 0≤u^N(w)≤10 \leq\hat{u}_N(w) \leq1 for every N>0N > 0, by the bounded convergence theorem [19 Theorem 1.6.7]

lim⁡N→∞E[u^N(w)]=E[lim⁡N→∞u^N(w)]=u(w).(32)\lim_{N \to\infty} \mathbb{E}[\hat{u}_N(w)] = \mathbb{E}\left[\lim_{N \to\infty} \hat{u}_N(w)\right] = u(w). \tag*{(32)}

Thus

lim⁡N→∞(E[u^N(w)]−u(w))=0,(33)\lim_{N \to\infty}\left(\mathbb{E}[\hat{u}_N(w)] - u(w)\right) = 0, \tag*{(33)}

and the estimator is asymptotically unbiased.

Supplementary Estimator Results

Variance Analysis

Naive Monte Carlo Coverage

Figure 5. Proportion of types and tokens in the MECO corpus for which estimates can be obtained from our Naive Monte Carlo estimator at a range of sample sizes. Samples are obtained from mGPT with the maximum length hyperparameter set to 50 tokens. Estimates cannot be obtained when the target type/token never appears in the NN sampled strings.

Runtime Analysis

We choose five unigrams each of lengths 1–4 tokens from the English MECO dataset and estimate their unigram probability five times each with the naive MC algorithm in Eq. (12) and the marginalized variant in Eq. (20). Experiments are run on an NVIDIA H100 NVL GPU.

Our results demonstrate that for unigrams of token length T=1T = 1, both estimators incur similar costs, which are mainly from the generation of N=500N = 500 strings. For multi-token unigrams, however, the MMC estimator scales with token count while times for the NMC estimator are stable. This is a consequence of our estimation of the joint probability of all the tokens in multi-token unigrams, which requires T−1T - 1 additional rounds of batched forward passes over all positions in the sampled contexts. Still, this cost is paid only once per unit in the dataset, and the faster NMC estimates for multi-token words come at the cost of higher variance estimates relative to the MMC estimator (see Table 1 and Figure 4).

Experiment Details

Reading Time Data

LanguageParticipantsWord TypesObservationsTrain SizeTest Size
Dutch4566231680285123168
English4693055120496085512
Finnish4930614853133681485
German4575343942395484394
Greek4594539972359753997
Hebrew47130349430444874943
Italian5479148097432874810
Korean3291615364138281536
Spanish4883148448436034845
Turkish2952812083108751208
Russian46115846641419774664

Table 3. Per-language counts for the NMC estimator: observations entering the gaze-duration model are per participant. Train/test split refer to the size of the folds used to fit and test each of the GAMMs.

LanguageParticipantsWord TypesObservationsTrain SizeTest Size
Dutch4599644816403344482
English4694555792502135579
Finnish49104249783448054978
German45103758171523545817
Greek4584535558320023556
Hebrew4795436248326233625
Italian54105161687555186169
Korean32120821057189512106
Spanish48103658185523675818
Turkish29103222935206412294
Russian46113345621410594562

Table 4. Per-language counts for the MMC estimator: observations entering the gaze-duration model are per participant. Train/test split refer to the size of the folds used to fit and test each of the GAMMs.

All reading time data used in our models is obtained from the L1 portion of the MECO corpus (Siegelman et al., 2022). Our selection of the eleven languages used here represents the overlap between languages in MECO and those supported by the LM used in our experiments, mGPT. In preprocessing, we remove words skipped by participants and obtain first fixation duration (i.e., the length of the participant’s first fixation on a word), gaze duration (the total time a participant fixates on a word before leaving it the first time) and the total fixation duration (the total time a participant fixates on a word regardless of whether they left the word and came back to it later). In their description of MECO, Siegelman et al. (2022) report on their procedure for aligning fixations to words and filtering data due to poor eye-tracker calibration. Tables throughout the section give the fold sizes in the 10-fold cross-validation used for GAMM evaluation (see § 8), which differ between estimators due to differences in coverage.

LanguageParticipantsWord TypesObservationsTrain SizeTest Size
Dutch45100945314407834531
English4698057883520955788
Finnish49107651962467665196
German45104758861529755886
Greek4597541229371064123
Hebrew47131950126451135013
Italian54107162485562376248
Korean32125121739195652174
Spanish48104558554526995855
Turkish29105623440210962344
Russian46119448066432594807

Table 5. Per-language counts for the MMC (Approx.) estimator: observations entering the gaze-duration model are per participant. Train/test split refer to the size of the folds used to fit and test each of the GAMMs.

LanguageParticipantsWord TypesObservationsTrain SizeTest Size
Dutch4590741247371224125
English4696556924512325692
Finnish4982339298353683930
German4595053534481815353
Greek4595740455364094046
Hebrew47130349454445094945
Italian5499558600527405860
Korean32111819156172401916
Spanish4899456012504115601
Turkish2989420149181342015
Russian46117647253425284725

Table 6. Per-language counts for the Priority MMC estimator: observations entering the gaze-duration model are per participant. Train/test split refer to the size of the folds used to fit and test each of the GAMMs.

mGPT is a 1.3B parameter decoder-only language model pretrained on data from 61 languages. Shliazhko et al. (2024) report using Wikipedia documents and the C4 dataset to pretrain mGPT. wordfreq estimates are fit with data from Wikipedia, subtitle and news corpora, books, web crawls, and social media. While there it is feasible that there is some overlap in the domain and content of the two resources’ data sources, they are not fit on identical data.

Model Specification and Evaluation

As an example of how our GAMMs of reading times are structured, the formula for our surprisal-only model is as follows:

RTi=β0+f1(scontext,i)+f2(scontext,i−1)+bparticipant(i)+btrial(i)+ϵi.(34)\mathrm{RT}_{i} = \beta_{0} + f_{1}(s_{\mathrm{context},i}) + f_{2}(s_{\mathrm{context},i-1}) \\ + b_{\mathrm{participant}(i)} + b_{\mathrm{trial}(i)} + \epsilon_{i}. \tag*{(34)}

Above, f1f_{1} and f2f_{2} are main-effect smooths of the surprisal of the current and previous unit, respectively. bparticipant(i)b_{\mathrm{participant}(i)} and btrial(i)b_{\mathrm{trial}(i)} represent random effects that account for participant and trial variation. We specifically implement main-effect smooths as cubic regression splines limited to six basis functions to avoid overfitting, as in Opedal et al. (2024). ϵi\epsilon_{i} represents a Gaussian noise term. Predictors are standardized prior to model fitting, and we fit all GAMMs using the bam() function of the mgcv package (Wood, 2006).

Delta log-likelihood is calculated over held out data as follows:

ΔLL=1N∑n=1N[log⁡pmodel(RTn)−log⁡pbaseline(RTn)].(35)\Delta_{\mathrm{LL}} = \frac{1}{N} \sum_{n=1}^{N} \left[ \log p_{\mathrm{model}}(\mathrm{RT}_{n}) - \log p_{\mathrm{baseline}}(\mathrm{RT}_{n}) \right]. \tag*{(35)}
LanguageParticipantsWord TypesObservationsTrain SizeTest Size
Dutch45100945314407834531
English4698057883520955788
Finnish49107651962467665196
German45104458707528365871
Greek4597541229371064123
Hebrew47131950126451135013
Italian54107162485562376248
Korean32124921702195322170
Spanish48104558554526995855
Turkish29105623440210962344
Russian46119448066432594807

Table 7. Per-language counts for the Priority MMC (Approx.) estimator: observations entering the gaze-duration model are per participant. Train/test split refer to the size of the folds used to fit and test each of the GAMMs.

Estimator Configurations

Here we provide implementation details on the six sets of unigram surprisals compared in § 9. The wordfreq values (Speer, 2022) are the corpus-based estimates used by Opedal et al. (2024). The NMC estimates (Eq. (12)) are computed from a large pool of N=4×107N = 4 \times10^{7} samples, in order to circumvent the issue of poor coverage documented in §E. The MMC estimates (Eq. (20)) and their canonical-only approximations (Eq. (21); MMC and MMC Approx.) are fit over N=500N = 500 samples. The priority-MMC estimates and their canonical-only approximations (Priority MMC and Priority MMC Approx.) use language-specific strata drawn from a pool of N=4×107N = 4 \times10^{7} samples to balance language coverage; see §I.

Variation across Languages

Where we report ΔLL\Delta_{\mathrm{LL}} averaged across languages (e.g., Figure 3), we specifically report micro-averaged ΔLL\Delta_{\mathrm{LL}} over all of the word-level observations, pooled across the 11 languages. This means that languages with more data (see §F) contribute more to the means. Throughout this section, we present the macro-averaged ΔLL\Delta_{\mathrm{LL}} and their standard deviations for the models of gaze duration. Values are presented separately for each estimator, corresponding to each of the facets in Figure 3.

Unigram Surprisal MetricModelMacro AveragesSD Across Languages
NMC EstimateUni. Surp.0.02650.0114
NMC EstimatePMI0.00710.0062
NMC EstimatePMI & Uni. Surp.0.02860.0121
NMC EstimateCon. Surp.0.01180.0049
NMC EstimateCon. Surp. & Uni. Surp.0.02830.0119
Corpus EstimateUni. Surp.0.02820.0126
Corpus EstimatePMI0.00760.0057
Corpus EstimatePMI & Uni. Surp.0.03040.0132
Corpus EstimateCon. Surp.0.01180.0049
Corpus EstimateCon. Surp. & Uni. Surp.0.02990.0128

Table 8. Word-level Δ\DeltaLL for GAMMs of gaze duration, macro-averaged across languages. Values correspond to the NMC estimator versus the Corpus baseline (fit on NMC’s support).

Unigram Surprisal MetricModelMacro AveragesSD Across Languages
MMC EstimateUni. Surp.0.03830.0195
MMC EstimatePMI0.01220.0085
MMC EstimatePMI & Uni. Surp.0.04150.0205
MMC EstimateCon. Surp.0.02110.0100
MMC EstimateCon. Surp. & Uni. Surp.0.04130.0204
Corpus EstimateUni. Surp.0.03960.0211
Corpus EstimatePMI0.01030.0070
Corpus EstimatePMI & Uni. Surp.0.04300.0216
Corpus EstimateCon. Surp.0.02110.0100
Corpus EstimateCon. Surp. & Uni. Surp.0.04260.0214

Table 9. Word-level Δ\DeltaLL for GAMMs of gaze duration, macro-averaged across languages. Values correspond to the MMC estimator versus the Corpus baseline (fit on MMC’s support).

Unigram Surprisal MetricModelMacro AveragesSD Across Languages
MMC (Approx.) EstimateUni. Surp.0.03910.0178
MMC (Approx.) EstimatePMI0.01300.0085
MMC (Approx.) EstimatePMI & Uni. Surp.0.04240.0191
MMC (Approx.) EstimateCon. Surp.0.02140.0105
MMC (Approx.) EstimateCon. Surp. & Uni. Surp.0.04210.0191
Corpus EstimateUni. Surp.0.03960.0211
Corpus EstimatePMI0.01010.0069
Corpus EstimatePMI & Uni. Surp.0.04330.0217
Corpus EstimateCon. Surp.0.02140.0105
Corpus EstimateCon. Surp. & Uni. Surp.0.04290.0215

Table 10. Word-level Δ\DeltaLL for GAMMs of gaze duration, macro-averaged across languages. Values correspond to the MMC (Approx.) estimator versus the Corpus baseline (fit on MMC (Approx.)’s support).

Unigram Surprisal MetricModelMacro AveragesSD Across Languages
Priority MMC EstimateUni. Surp.0.03920.0175
Priority MMC EstimatePMI0.01110.0078
Priority MMC EstimatePMI & Uni. Surp.0.04210.0184
Priority MMC EstimateCon. Surp.0.02110.0104
Priority MMC EstimateCon. Surp. & Uni. Surp.0.04160.0184
Corpus EstimateUni. Surp.0.03870.0198
Corpus EstimatePMI0.01040.0069
Corpus EstimatePMI & Uni. Surp.0.04260.0204
Corpus EstimateCon. Surp.0.02110.0104
Corpus EstimateCon. Surp. & Uni. Surp.0.04220.0202

Table 11. Word-level Δ\DeltaLL for GAMMs of gaze duration, macro-averaged across languages. Values correspond to the Priority MMC estimator versus the Corpus baseline (fit on Priority MMC’s support).

Unigram Surprisal MetricModelMacro AveragesSD Across Languages
Priority MMC (Approx.) EstimateUni. Surp.0.04120.0201
Priority MMC (Approx.) EstimatePMI0.01100.0087
Priority MMC (Approx.) EstimatePMI & Uni. Surp.0.04360.0208
Priority MMC (Approx.) EstimateCon. Surp.0.02140.0105
Priority MMC (Approx.) EstimateCon. Surp. & Uni. Surp.0.04330.0207
Corpus EstimateUni. Surp.0.03970.0211
Corpus EstimatePMI0.01010.0069
Corpus EstimatePMI & Uni. Surp.0.04330.0217
Corpus EstimateCon. Surp.0.02140.0105
Corpus EstimateCon. Surp. & Uni. Surp.0.04290.0216

Table 12. Word-level Δ\DeltaLL for GAMMs of gaze duration, macro-averaged across languages: Values correspond to the Priority MMC (Approx.) estimator versus the Corpus baseline (fit on Priority MMC (Approx.)’s support).

Estimator Pseudocode

Algorithm 1 Naive Monte Carlo Unigram Probability Estimator

Require: Word ww, samples X1,…,XNX_1,\ldots,X_N where each Xn=(x1,…,xLn)X_n=(x_1,\ldots,x_{L_n}) is a token string

  1. total Count ←0\leftarrow0

  2. total Words ←0\leftarrow0

  3. for each nn in range N do

  4. total Count ←\leftarrow total Count +#(Xn,w)+\#(X_n,w)

  5. total Words ←\leftarrow total Words +∣π(Xn)∣+\lvert\pi(X_n)\rvert

  6. end for

  7. return total Counttotal Words\dfrac{\text{total Count}}{\text{total Words}}

Algorithm 2 Marginalized Monte Carlo Unigram Probability Estimator (Canonical-Only Variant)

Require: Word ww, samples X1,…,XNX_1,\ldots,X_N where each Xn=(x1,…,xLn)X_n=(x_1,\ldots,x_{L_n}) is a token string

  1. [t1,…,tT]←tokenize⁡(w)[t_1,\ldots,t_T]\leftarrow\operatorname{tokenize}(w)

  2. total Prob ←0\leftarrow0

  3. total Words ←0\leftarrow0

  4. for each nn in range NN do

  5. Bn←{0}∪{b:xb+1 is unit-initial}∪{Ln}B_n\leftarrow\{0\}\cup\{b:x_{b+1}\text{ is unit-initial}\}\cup\{L_n\}

  6. total Words ←\leftarrow total Words +∣π(Xn)∣+\lvert\pi(X_n)\rvert

  7. for each boundary position b∈Bnb\in B_n do

  8. prefix ←(x1,…,xb)\leftarrow(x_1,\ldots,x_b)

  9. prob ←p⃗Σ(t1∣prefix)\leftarrow\vec{p}_{\Sigma}(t_1\mid\text{prefix})

  10. for i=2,…,Ti=2,\ldots,T do

  11. prob ←\leftarrow prob ⋅p⃗Σ(ti∣prefix∘[t1,…,ti−1])\cdot\vec{p}_{\Sigma}(t_i\mid\text{prefix}\mathbin{\circ}[t_1,\ldots,t_{i-1}])

  12. end for

  13. total Prob ←\leftarrow total Prob ++ prob

  14. end for

  15. end for

  16. return total Probtotal Words\dfrac{\text{total Prob}}{\text{total Words}}

Priority-Sampled Evaluation at Large Sample Sizes

Alg. 2 evaluates p⃗Σ\vec{p}_{\Sigma} at every boundary of every sample. A unit whose probability mass lies in contexts that are rare under pΣp_{\Sigma} requires a large sample size NN before any such context is drawn. Sampling and the sweep that returns every unit’s first-token probability are paid once, no matter how many units are estimated. However, a unit of TT tokens requires T−1T-1 forward passes at each boundary, computed separately for each unit and linear in the pool size (Table 2). We therefore keep the sweep exhaustive and evaluate the continuation only at a bounded set of boundaries, chosen via priority sampling [18]. We present two variants: a canonical-only variant (Alg. 3; Priority MMC Approx. in § 9), and a full estimator (Priority MMC), which restores the exact-count EOS correction of Eq. (17).

TokensNMC (s)MMC (s)
13.788 (0.003)86.269 (0.101)
23.788 (0.003)166.344 (0.161)
33.787 (0.002)247.479 (0.105)
43.783 (0.008)329.654 (0.153)

Table 2. Mean (SD) wall-clock time per estimate for the Naive (NMC) and Marginalized (MMC) Monte Carlo estimators, broken down by the number of subword tokens in the target unigram (NN = 500 samples, batch size 128).

Let F\mathcal{F} collect every boundary position of every sample. For a word ww with tokenization [t1,…,tT][t_1,\ldots,t_T] we write

sb=p⃗Σ(t1∣prefix⁡b),cb=∏i=2Tp⃗Σ(ti∣prefix⁡b∘[t1,…,ti−1]),(36)s_b=\vec{p}_{\Sigma}(t_1\mid\operatorname{prefix}_b),\qquad c_b=\prod_{i=2}^{T}\vec{p}_{\Sigma}(t_i\mid\operatorname{prefix}_b\mathbin{\circ}[t_1,\ldots,t_{i-1}]), \tag*{(36)}

with cb=1c_b=1 when T=1T=1. Summing these terms and normalizing, ∑b∈Fsbcb/ℓpool\sum_{b\in\mathcal{F}}s_bc_b/\ell_{\mathrm{pool}}, gives the canonical-only variant, writing ℓpool\ell_{\mathrm{pool}} for the realized word count of the pool, which approximates Eq. (20): (i) the summands are evaluated only at positions whose sampled successor is unit-initial, (ii) cbc_b omits the right-boundary mass of §C, and (iii) residual occurrences are dropped (Eq. (21)). The full estimator below removes these three approximations.

Proposition 3. Fix a stratum gg and condition on the pool. Then

E[∑b∈Sgmax⁡(sb,τg)cb]=∑b∈Fgsbcb(37)\mathbb{E}\left[\sum_{b\in S_g}\max(s_b,\tau_g)c_b\right]=\sum_{b\in F_g}s_bc_b \tag*{(37)}

Proof. If ∣Fg∣≤kg\lvert F_g\rvert\leq k_g then Sg=FgS_g=F_g and τg=0\tau_g=0, so the two sides agree term by term. Otherwise fix bb and let τ−b\tau_{-b} be the kgk_g-th largest priority among Fg∖{b}F_g\setminus\{b\}, a function of {ub′}b′≠b\{u_{b'}\}_{b'\ne b} and so independent of ubu_b. Boundary bb is retained exactly when qb>τ−bq_b>\tau_{-b}, and then the (kg+1)(k_g+1)-th largest priority overall is τ−b\tau_{-b}, so

E[max⁡(sb,τg)cb1{b∈Sg}∣τ−b]=max⁡(sb,τ−b)min⁡(1,sbτ−b)cb=sbcb,(38)\mathbb{E}\left[\max(s_b,\tau_g)c_b\mathbf{1}\{b\in S_g\}\mid\tau_{-b}\right]=\max(s_b,\tau_{-b})\min\left(1,\frac{s_b}{\tau_{-b}}\right)c_b=s_bc_b, \tag*{(38)}
Equation not extracted
Algorithm 3 Priority-Sampled Marginalized Monte Carlo Estimator (canonical-only variant)
Require: Word $w$, frame $\mathcal{F}$ partitioned into strata $\{\mathcal{F}_g\}$, budgets $\{k_g\}$, pool word count $\ell_{\mathrm{pool}}$, first-token probabilities $s_b$ from the sweep
1: $[t_1,\ldots,t_T] \leftarrow \operatorname{tokenize}(w)$
2: if $T = 1$ then
3: return $\sum_{b\in\mathcal{F}} s_b/\ell_{\mathrm{pool}}$
4: end if
5: total $\leftarrow 0$
6: for each stratum $g$ do
7: $q_b \leftarrow s_b/u_b$ for $b \in \mathcal{F}_g$, with $u_b \sim \operatorname{Uniform}(0,1]$
8: $S_g \leftarrow$ the $k_g$ boundaries of $\mathcal{F}_g$ with largest $q_b$
9: $\tau_g \leftarrow$ the $(k_g+1)$-th largest $q_b$, or $0$ if $|\mathcal{F}_g| \le k_g$
10: for each $b \in S_g$ do
11: $c_b \leftarrow 1$
12: for $i = 2,\ldots,T$ do
13: $c_b \leftarrow c_b \cdot \vec{p}_{\Sigma}(t_i \mid \operatorname{prefix}_b \circ [t_1,\ldots,t_{i-1}])$
14: end for
15: total $\leftarrow \operatorname{total}+\max(s_b,\tau_g)\cdot c_b$
16: end for
17: end for
18: return total $/\ell_{\mathrm{pool}}$

by P[ub<sb/τ−b∣τ−b]=min⁡(1,sb/τ−b)\mathbb{P}[u_b < s_b/\tau_{-b} \mid\tau_{-b}] = \min(1,s_b/\tau_{-b}) and max⁡(w,τ)min⁡(1,w/τ)=w\max(w,\tau)\min(1,w/\tau)=w. The right-hand side does not involve τ−b\tau_{-b}, so averaging over it leaves E[max⁡(sb,τg)cb1{b∈Sg}]=sbcb\mathbb{E}[\max(s_b,\tau_g)c_b\mathbf{1}\{b\in S_g\}]=s_bc_b. Since

∑b∈Sgmax⁡(sb,τg)cb=∑b∈Fgmax⁡(sb,τg)cb1{b∈Sg},(39)\sum_{b\in S_g}\max(s_b,\tau_g)c_b=\sum_{b\in\mathcal{F}_g}\max(s_b,\tau_g)c_b\mathbf{1}\{b\in S_g\}, \tag*{(39)}

summing this expectation over b∈Fgb\in\mathcal{F}_g gives the claim by linearity of expectation.

Stratification. We form strata from each boundary’s own prefix and refine the Latin script class with language detection. Proposition 3 holds within each stratum, so the sum is unbiased for any allocation (kg)g(k_g)_g and the allocation may be chosen to reduce variance. Two conditions are needed: every stratum carrying mass must receive kg≥1k_g\ge1, since an unfunded stratum contributes nothing while its mass stays in the estimand, and the allocation must not depend on the draws, which holds because it comes from the column sums. Labels therefore enter the allocation and never a weight, so a mislabeled boundary costs precision but cannot bias the estimate.

Full estimator. The full estimator removes the three approximations in Alg. 3:

(i) An interior position enters F\mathcal{F} only when its sampled successor is unit-initial, an event of probability WbW_b, the unit-initial mass of p⃗Σ(⋅∣prefix⁡b)\vec{p}_{\Sigma}(\cdot\mid\operatorname{prefix}_b), so sb=p⃗Σ(t1∣prefix⁡b)/Wbs_b=\vec{p}_{\Sigma}(t_1\mid\operatorname{prefix}_b)/W_b.

(ii) The continuation cbc_b adds the right-boundary factor of §C, i.e., the mass on unit-initial tokens and EOS after tTt_T.

(iii) Residual occurrences are recovered through CC, which is the exact count of the unit over the pool, taken on the decoded strings so that every tokenization contributes.

Writing T:={b∈F:the sampled successor at b is t1}\mathcal{T}\mathrel{\mathop:}=\{b\in\mathcal{F}: \text{the sampled successor at }b\text{ is }t_1\}, the full estimator is N^(w):=S^(w)+C−H^(w)\widehat{N}(w)\mathrel{\mathop:}=\widehat{S}(w)+C-\widehat{H}(w), where S^\widehat{S} priority-samples ∑bsbcb\sum_b s_bc_b over the interior boundaries and adds the exact empty-prefix term, common to all NN samples, and H^\widehat{H} estimates ∑b∈Tcb\sum_{b\in\mathcal{T}}c_b from at most ktakek_{\mathrm{take}} positions of T\mathcal{T} drawn uniformly per first token, each weighted by the ratio of available to drawn positions. Since the two share the summand cbc_b, the tower property gives E[S^]=E[H^]\mathbb{E}\left[\widehat{S}\right]=\mathbb{E}\left[\widehat{H}\right], so N^\widehat{N} is unbiased for NN times the expected count of Eq. (8) under the length-truncated sampling process of § 8, and the reported estimate is N^/ℓpool\widehat{N}/\ell_{\mathrm{pool}}. A negative realized numerator, which occurs for units far below the pool’s resolution, leaves the estimate undefined and the unit excluded. Unbiasedness refers to N^\widehat{N} before this exclusion.

Settings. Tab. 13 shows the sampling parameters of both variants. We allocated the per-unit budget kk in three steps: we divide a fixed share among the strata of the languages in which the unit occurs, half of it going to a generic Latin stratum for languages written in Latin script. Every stratum that carries mass receives a floor of 64 boundaries, the rest is divided in proportion to each stratum’s share of the unit’s first-token mass, capped at the stratum’s total from the first two steps. Any residue is divided by mass alone, such that the full budget is spent whenever the stored cells can serve it.

Approx.Full
Samples NN4×1074 \times10^{7}
Maximum length50
Strata21
Per-unit budget kk8192
Stratum floor64
Home share40962048
Draw seed100000900000
Frame size ∣F∣\lvert\mathcal{F}\rvert8.9×1088.9 \times10^{8}9.2×1089.2 \times10^{8}
Pool word count ℓpool\ell_{\mathrm{pool}}8.8×1088.8 \times10^{8}8.8×1088.8 \times10^{8}
Take draws ktakek_{\mathrm{take}}n/a2048
Single-token unitsexactsampled

Table 13. Settings of the priority-sampled variants (Priority MMC Approx. and Priority MMC). Each variant draws its own pool of samples. The full variant’s pool additionally stores the model’s own sampled tokenizations for H^\widehat{H}. Approximate-variant single-token units need no sampling, since their numerator is the exact column sum plus the exact empty-prefix term. The full estimator’s closing mass depends on the unit, so its single-token units are sampled like any other.

References

  1. [1]David A Balota, Michael J Cortese, Susan D Sergent-Marshall, Daniel H Spieler, and Melvin J Yap. 2004. Visual word recognition of single-syllable words. Journal of Experimental Psychology: General, 133(2).
  2. [2]Gerry T.M Altmann and Yuki Kamide. 1999. Incremental interpretation at verbs: restricting the domain of subsequent reference. Cognition, 73(3).pubmed.ncbi.nlm.nih.gov/10585516
  3. [3]Aryaman Arora, Clara Meister, and Ryan Cotterell. 2022. Estimating the entropy of linguistic distributions. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers).
  4. [4]Yevgeni Berzak and Roger Levy. 2023. Eye movement traces of linguistic knowledge in native and non-native reading. Open Mind, 7.DOI
  5. [5]Rens Bod, Jennifer Hay, and Stefanie Jannedy, editors. 2003. Probabilistic Linguistics. The MIT Press.
  6. [6]Marc Brysbaert, Matthias Buchmeier, Markus Conrad, Arthur M Jacobs, Jens Bölte, and Andrea Böhl. 2011. The word frequency effect: A review of recent developments and implications for the choice of frequency estimates in German. Experimental Psychology, 58(5).DOI
  7. [7]Joan Bybee. 1998. The emergent lexicon. In Chicago Linguistic Society, volume 34.
  8. [8]Joan Bybee. 2002. Word frequency and context of use in the lexical diffusion of phonetically conditioned sound change. Language Variation and Change, 14(3).
  9. [9]Joan Bybee and Paul J. Hopper. 2001. Introduction to frequency and the emergence of linguistic structure. In Joan Bybee and Paul J. Hopper, editors, Typological Studies in Language, volume 45. John Benjamins Publishing Company.DOI
  10. [10]Joan Bybee and Joanne Scheibman. 1999. The effect of usage on degrees of constituency: The reduction of don’t in English. Linguistics: An Interdisciplinary Journal of the Language Sciences, 37(4).
  11. [11]Nick Chater and Christopher D. Manning. 2006. Probabilistic models of language processing and acquisition. Trends in Cognitive Sciences, 10(7).pubmed.ncbi.nlm.nih.gov/16784883
  12. [12]Noam Chomsky. 1957. Syntactic Structures. Mouton and Co.
  13. [13]Noam Chomsky. 1965. Aspects of the Theory of Syntax. The MIT Press.
  14. [14]Christian Clark, Byung-Doh Oh, and William Schuler. 2025. How well does first-token entropy approximate word entropy as a psycholinguistic predictor? In Proceedings of the 14th International Joint Conference on Natural Language Processing and the 4th Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics.
  15. [15]Charles Clifton, Adrian Staub, and Keith Rayner. 2007. Eye movements in reading words and sentences. In Roger P.G. Van Gompel, Martin H. Fischer, Wayne S. Murray, and Robin L. Hill, editors, Eye Movements, chapter 15. Elsevier.DOI
  16. [16]Andrea de Varda and Marco Marelli. 2023. Scaling in cognitive modelling: a multilingual approach to human reading times. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers).
  17. [17]Katherine A. DeLong, Thomas P. Urbach, and Marta Kutas. 2005. Probabilistic word pre-activation during language comprehension inferred from electrical brain activity. Nature Neuroscience, 8(8).pubmed.ncbi.nlm.nih.gov/16007080
  18. [18]Nick Duffield, Carsten Lund, and Mikkel Thorup. 2007. Priority sampling for estimation of arbitrary subset sums. J. ACM, 54(6).DOI
  19. [19]Rick Durrett. 2019. Probability: Theory and Examples, 5 edition. Cambridge university press.
  20. [20]Robert M. Fano. 1961. Transmission of Information: A Statistical Theory of Communication. MIT Press Classics. MIT Press.
  21. [21]Irene Fernandez Monsalve, Stefan L. Frank, and Gabriella Vigliocco. 2012. Lexical surprisal as a general predictor of reading time. In Proceedings of the 13th Conference of the European Chapter of the Association for Computational Linguistics.
  22. [22]Stefan L. Frank, Irene Fernandez Monsalve, Robin L. Thompson, and Gabriella Vigliocco. 2013a. Reading time data for evaluating broad-coverage models of English sentence processing. Behavior Research Methods, 45(4).DOI
  23. [23]Stefan L. Frank, Leun J. Otten, Giulia Galli, and Gabriella Vigliocco. 2013b. Word surprisal predicts N400 amplitude during reading. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers).
  24. [24]Richard Futrell, Edward Gibson, and Roger P. Levy. 2020. Lossy-context surprisal: An information-theoretic model of memory effects in sentence processing. Cognitive Science, 44(3).DOI
  25. [25]Edward Gibson. 1998. Linguistic complexity: Locality of syntactic dependencies. Cognition, 68(1).pubmed.ncbi.nlm.nih.gov/9775516
  26. [26]Edward Gibson. 2000. The dependency locality theory: A distance-based theory of linguistic complexity. Image, Language, Brain.DOI
  27. [27]Mario Giulianelli, Andreas Opedal, and Ryan Cotterell. 2024. Generalized measures of anticipation and responsivity in online language processing. In Findings of the Association for Computational Linguistics: EMNLP 2024.
  28. [28]Adam Goodkind and Klinton Bicknell. 2018. Predictive power of word surprisal for reading times is a linear function of language model quality. In Proceedings of the 8th Workshop on Cognitive Modeling and Computational Linguistics (CMCL 2018).DOI
  29. [29]Dirk Groeneveld, Iz Beltagy, Evan Walsh, Akshita Bhagia, Rodney Kinney, Ovvind Tajford, Ananya Jha, Hamish Ivison, Ian Magnusson, Yizhong Wang, Shane Arora, David Atkinson, Russell Authur, Khyathi Chandu, Arman Cohan, Jennifer Dumas, Yanai Elazar, Yuling Gu, Jack Hessel, and 24 others. 2024. OLMo: Accelerating the science of language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).arxiv.org/abs/2402.00838
  30. [30]Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Qihao Zhu, Runxin Xu, Ruoyu Zhang, Shirong Ma, Xiao Bi, Xiaokang Zhang, Xingkai Yu, Yu Wu, Z. F. Wu, Zhibin Gou, Zhihong Shao, Zhuoshu Li, Ziyi Gao, Aixin Liu, and 175 others. 2025. DeepSeek-R1: Incentivizing reasoning capability in LLMs via reinforcement learning. arXiv preprint arXiv:2501.12948.DOI
  31. [31]John Hale. 2001. A probabilistic Earley parser as a psycholinguistic model. In Second meeting of the north american chapter of the association for computational linguistics.DOI
  32. [32]Mary Hare, Lianne Older, Michael Ford, and William Marslen-Wilson. 1995. Frequency, competition and lexical representation. In Proceedings of the Annual Meeting of the Cognitive Science Society, volume 17.
  33. [33]Martin Haspelmath. 1999. Why is grammaticalization irreversible? Linguistics, 37(6).DOI
  34. [34]Micha Heilbron, Jorie van Haren, Peter Haggoort, and Floris P. de Lange. 2023. Lexical processing strongly affects reading times but not skipping during natural reading. Open Mind, 7.DOI
  35. [35]Dan Jurafsky. 2003. Probabilistic modeling in psycholinguistics: Linguistic comprehension and production. In Probabilistic Linguistics. The MIT Press.
  36. [36]Alan Kennedy, Robin Hill, and Joël Pynte. 2003. The Dundee corpus. In Proceedings of the European Conference on Eye Movement.
  37. [37]Emmanuel Keuleers, Marc Brysbaert, and Boris New. 2010. SUBTLEX-NL: A new measure for Dutch word frequency based on film subtitles. Behavior Research Methods, 42(3).DOI
  38. [38]Samuel Kiegeland, V é stein Snæbjarnarson, Tim Vieira, and Ryan Cotterell. 2026. On the proper treatment of units in surprisal theory. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).
  39. [39]Samuel Kiegeland, Ethan Wilcox, Afra Amini, David Robert Reich, and Ryan Cotterell. 2024. Reverse-engineering the reader. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing.
  40. [40]Gina R. Kuperberg and T. Florian Jaeger. 2016. What do we mean by prediction in language comprehension? Language, Cognition and Neuroscience, 31(1).pubmed.ncbi.nlm.nih.gov/27135040
  41. [41]Tatsuki Kuribayashi, Yohei Oseki, Ana Brassard, and Kentaro Inui. 2022. Context limitations make neural language models more human-like. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing.arxiv.org/abs/2205.11463
  42. [42]Roger Levy. 2008. Expectation-based syntactic comprehension. Cognition, 106(3).pubmed.ncbi.nlm.nih.gov/17662975

Paper details

vlnc:W_utsxuup7
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 3

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents