Title: FACE: Evaluating Natural Language Generation with Fourier Analysis of Cross-Entropy
Venue: NeurIPS 2023
Accepted: yes
Keywords: natural language generation; evaluation metrics; cross-entropy; language model
Abstract: Measuring the distance between machine-produced and human language is a critical open problem. Inspired by empirical findings from psycholinguistics on the periodicity of entropy in language, we propose FACE, a set of metrics based on Fourier Analysis of the estimated Cross-Entropy of language, for measuring the similarity between model-generated and human-written languages. Based on an open-ended generation task and the experimental data from previous studies, we find that FACE can effectively identify the human-model gap, scales with model size, reflects the outcomes of different sampling methods for decoding, correlates well with other evaluation metrics and with human judgment scores.

FACE: Evaluating Natural Language Generation with Fourier Analysis of Cross-Entropy

Abstract

Measuring the distance between machine-produced and human language is a critical open problem. Inspired by empirical findings from psycholinguistics on the periodicity of entropy in language, we propose FACE, a set of metrics based on F ourier A nalysis of the estimated C rossE ntropy of language, for measuring the similarity between model-generated and human-written languages. Based on an open-ended generation task and the experimental data from previous studies, we find that FACE can effectively identify the human-model gap, scales with model size, reflects the outcomes of different sampling methods for decoding, correlates well with other evaluation metrics and with human judgment scores.

1 Introduction

The concept of entropy from Information Theory is broadly applied in Natural Language Processing (NLP) technology and computational linguistic studies. The most notable example is the use of cross-entropy in training and evaluating language models, where the exponentiation of cross-entropy, perplexity, is adopted to measure models' performance in next-word (or masked-word) prediction task. However, low perplexity alone does not guarantee good performance in language generation tasks, which not only depend on model sizes but are also closely related to the sampling techniques used in decoding stage. The complexity of the generation task makes it especially important to have different metrics that can reflect the generation quality from multiple angles. One particular perspective is that the language generated from a good model should have a similar distribution of words/tokens as in the 'natural' human language.

Recent advances in psycholinguistics put forward new directions for developing more sophisticated metrics other than Zipf's coefficient. In particular, studies on temporal and spectral patterns in dialogue [7, 47] reveal that cross-entropy (or referred to as surprisal, information density in the psycholinguistics literature) changes periodically in natural language, which points out the potentials of using fine-grained transformation of cross-entropy to quantify the differences in language data (see Section 3 for a detailed review). It motivates the basic idea of this study: Can we effectively quantify the periodical pattern of the cross-entropy, and use it as an indicator to distinguish human and model-generated languages?

We summarize our contributions as follows: 1. We propose a set of metrics based on the frequency spectra obtained from the Fast Fourier Transform (FFT) of the cross-entropy sequences of language data, named FACE ( F ourier A nalysis of Cross-E ntropy). 2. We empirically show FACE's performance on identifying human-model gap and how it scales with model sizes in Section 4.1. 3. We explore

Human

language

Generated

language

Estimated by

a 3rd-party

pretrained

LM

Cross-entropy 1

Cross-entropy 2

Fast Fourier

Transform

（

FFT

）

Spectrum 1

Spectrum 2

Similarity metric

𝐹𝐴𝐶𝐸(ℱ

!

, ℱ

"

)

Other metrics

𝑡

𝑏𝑖𝑡

𝑡

𝑏𝑖𝑡

𝜔

𝜔

𝜔

𝑓

#$!%&

Compare with

𝐹𝐴𝐶𝐸~𝑓

#$!%&

ℱ

!

ℱ

"

𝔇

!

𝔇

"

ℇ

!

ℇ

"

FACE's correlations with sampling methods and human evaluation in Section 4.2 and Section 4.3, respectively. 4. We validate the statistical soundness of FACE in Section 4.4. 5. We discuss an intuitive interpretation of the metrics and how it reflects the characteristics of language use in Section 4.5. 6. Implementation and experiments code are available in this public repository: https://github.com/CLCS-SUSTech/FACE .

2 FACE

The basic idea of FACE is to obtain the spectra of cross-entropy from different data sources (human or models) and compute their similarities. The overall workflow is shown in Figure 1, which we describe in five steps:

Collect the datasets for human-written and model-generated texts, D h and D m .

Use a third pre-trained language model m est to estimate the cross-entropy of text in D h and D m , resulting in two sequences of cross-entropy output, E h and E m .

Obtain the frequency spectra for each cross-entropy sequences, E h ⇒F h and E m ⇒F m .

Develop FACE metrics that quantify the spectral similarity between F h and F m .

Evaluate FACE on different model types/sizes, sampling methods, and the correlations with other metrics for Natural Language Generation (NLG).

We describe the steps in detail from Section 2.1 to Section 2.3.

2.1 Estimate cross-entropy

We use a pre-trained language model m est as the estimator for cross-entropy, which runs in the evaluation model (no gradients produced). It takes as input a sequence of T tokens, [ t 1 , t 2 , . . . , t T ] ; for each position i = 1 , . . . , T , it predicts the probability of the next token P ( t i +1 | t 1 , . . . , t i ) ; the cross-entropy between this probability and the ground truth token t i +1 is then computed, resulting in the cross-entropy sequence that consists of T -1 real values E = [ c 1 , c 2 , . . . , c T -1 ] , as the first token is not predicted:

Note that ∑ c i = -∑ T i =2 log P ( t i | t 1 . . . t i -1 ) is exactly the definition of negative log-likelihood loss, i.e., cross-entropy loss, for training a language model, where c i is the negative logarithm of the predicted probability for each token t i +1 . In psycholinguistic studies, this c i quantity is usually referred to several different terms, including surprisal [16, 17], information density [25, 20, 48], and entropy [13, 14, 46, 47], each of which has a specific theoretical flavor. There have been debates over the justifiability of using 'entropy' to denote the negative log-likelihood, because it is not a weighted summation as originally defined in [37]. Albeit, we decide to use cross-entropy as it is the most broadly communicated term and we believe it will not cause confusion as its mathematical form is clearly defined. Apparently, the choice for m est will influence the next steps, because better

w

k

|

X

(

w

k

)

|

source

model

human

w

k

X

(

w

k

)

source

model

human

Spectra:

ℱ

!

∈ ℝ

"

!

,

ℱ

#

∈ ℝ

"

"

Interpolated & absolute:

ℱ′

!

,

ℱ′

#

∈ ℝ

"

#

𝑆𝑂 =

𝐴𝑈𝐶(|ℱ

$

!

| ∩ |ℱ

$

′

#

|)

𝐴𝑈𝐶(|ℱ

$

!

| ∪ |ℱ

$ #

|)

𝐶𝑂𝑅𝑅 =

𝑐𝑜𝑣(ℱ

$

!

, ℱ

$ #

)

𝜎 ℱ

$

!

𝜎(ℱ

$ #

)

𝑆𝐴𝑀 = 𝑎𝑟𝑐𝑐𝑜𝑠

ℱ

$

!

⋅ ℱ

$ #

𝜎 ℱ

$

!

𝜎 ℱ

$ #

𝑆𝑃𝐸𝐴𝑅 = 1 -

6∑ |𝑋

!

(𝜔

%

)| - |𝑋

#

(𝜔

%

)|

&

𝑁

'

(𝑁

'

&

-1)

Four

FACE

metrics

language models produce lower perplexity scores, that is, lower cross entropy. Therefore, we discuss how different choices for m est affect our metrics in Section 4.4.

2.2 Fast Fourier transform

We treat the estimated cross-entropy sequence [ c 1 , . . . , c T -1 ] as a finite discrete signal in the time domain, where the sampling interval is approximated with the average duration of one token. With this simplified assumption, we find that the discrete Fourier transform (DFT) is the most suitable spectral analysis tool [39] 3 . The formula for DFT is as follows:

in which x ( t n ) is the signal at time t n , corresponding to the n -th cross-entropy value c n ( n = 1 . . . , T -1 and N ≜ T -1 ). X ( ω k ) is a complex number that reflects the magnitude (strength) of the k -th frequency component ω k = 2 πk/N . In practice, DFT is implemented with an efficient algorithm known as Fast Fourier Transform [5] that runs in O ( n log n ) time.

We compared two methods, periodogram and vanilla FFT. The periodogram approach computes the Fourier transform after applying auto-correlation and time-averaging windows to the signal for de-noising purposes [43]. However, we think de-noising is inappropriate because our 'signal' is a time series of cross-entropy, whose value reflects the sampling result at each time step from a large. Auto-correlation or time averaging will remove the distinctiveness of rare tokens. Therefore, we use vanilla FFT and take the real part of X ( ω k ) to represent the magnitude spectrum for the frequency component ω k , which is written as X ( ω k ) for brevity.

For an input cross-entropy sequence E = [ c 1 , . . . , c T -1 ] obtained from Section 2.1, the resulting frequency spectrum can be represented as a list of tuples of the same length, F = [ ⟨ ω 1 , X ( ω 1 ) ⟩ , . . . , ⟨ ω T -1 , X ( ω T -1 ) ⟩ ] , where [ ω 1 , . . . , ω T -1 ] are the T -1 sample frequencies, and [ X ( ω 1 ) , . . . , X ( ω T -1 )] are the corresponding magnitudes.

2.3 Spectral similarity metrics

We develop four metrics to measure the similarity between spectra F h and F m : Spectral Overlap ( SO ), Spectrum Angle Mapper ( SAM ) [6], Pearson's correlation ( CORR ), and Spearman's correlation ( SPEAR ), as summarized in Figure 2. Before computing the metrics, two spectra F h and F m which are of different lengths N 1 and N 2 , are first interpolated to the same length: F h ∈ R N 1 ⇒F ′ h ∈ R N C , F m ∈ R N 2 ⇒F ′ m ∈ R N C . Here, N C is the maximum length of the spectrum in our data. Thereafter, the computation of the subsequent metrics can commence.

Spectral Overlap ( SO ) is inspired by the power spectrum overlap proposed in [28], which is used in [47] for measuring the spectral similarity between dialogue participants. The frequency magnitudes in F ′ h and F ′ m are converted to absolute values, i.e., X ( ω k ) ⇒ | X ( ω k ) | , and then compute the Area-Under-Curve (AUC) for the interaction F ′ h ∩ F ′ m and the union F ′ h ∪ F ′ m , respectively. SO is defined as the ratio of the two: SO = AUC ( F ′ h ∩F ′ m ) / AUC ( F ′ h ∪F ′ m ) . The procedure of converting

to absolute values is indispensable, since negative values in X ( ω k ) will result in negative AUCs. SO has the range [0 , 1] , and a higher value indicates a stronger resemblance between the two spectra.

Spectrum Angle Mapper ( SAM ) calculates the angles between F ′ h and F ′ m , treating them as two vectors in a space [22]. The angle is measured in radians, which is calculated by the inverse function arccos( F ′ h · F ′ m / ||F ′ h || · ||F ′ m || ) , producing a value within [0 , π ] . We understand SAM is equivalent to the cosine similarity score, which is more commonly-used in NLP, but here we just follow the conventions in [22, 2]. A smaller SAM value indicates a greater similarity between F ′ h and F ′ m .

Pearson's correlation ( CORR ) can also be leveraged to measure spectral similarities as discussed in [22]. CORR = cov ( F ′ h , F ′ m ) /σ ( F ′ h ) σ ( F ′ m ) , with a [ -1 , 1] range. A positive CORR value indicates high similarity (negative for dissimilarity), and 0 indicates weak correlation between F ′ h and F ′ m .

Spearman's correlation ( SPEAR ) [41] is commonly used to assess the monotonic relationship between the comparison and reference groups and to capture the presence of non-linear associations between the two. It has not been used for spectral similarity to the best of our knowledge, but we test it in our experiments. SPEAR also has the range [ -1 , 1] with meanings similar to CORR .

3 Related Work

Entropy as a metric in psycholinguistics. The entropy of human language has long been a research interest in computational linguistics and psycholinguistics. The entropy of written text is estimated with the average per-word negative log-probability in sentences, and then used to validate the principle of entropy rate constancy (ERC) in human language [13, 14]. Similar studies were conducted in dialogue [46, 32]. Entropy is also defined in probabilistic grammars to describe the capacity of a language [40], and is used to develop complexity metrics to measure the cognitive load of processing syntactic expressions [16, 24, 17]. In the line of work on language production, a different term information density with the same mathematical formulation is used instead of entropy. It is found that speakers reduce syntactic complexity when the information density (or entropy) is high [25, 20]. In parallel with the concept of ERC, this line of work summarizes the tendency of distributing information evenly in human language with the term uniform information density (UID), which is commonly used as a equivalent term as ERC, for example, in [48, 15]. In conclusion, entropy is commonly used as a metric for essential properties of human language.

Periodical change of cross-entropy in language. We draw inspiration from the following studies about the distribution of information in dialogue. Humans are sensitive to the peaks and troughs of entropy in speech, with evidence from human-system dialogues and crowd-sourced ratings from human judges [7]. The entropy of utterances from two speakers converge towards each other within the scope of topical segments in spontaneous dialogues [48]. They measure the entropy of utterances from two participants of a task-oriented dialogue, and have found that the frequency domain features - power spectrum overlap and phase delay - are useful predictors of task outcomes. Both works reviewed above suggest that the periodical up-and-downs of entropy are commonly observable in the human language. It naturally leads to the question of whether and to what extent model-generated language aligns with this empirical finding.

Automatic measures for text generation. Entropy and its related variants have already used as a metric for evaluating generated text, for instance, entropy provides good visualization for the difference between GPT2-generated text and human written ones [12]. Other than entropy, there is a rich body of existing metrics targeted on discriminating human-written text and modelgenerated text, which we summarize in three branches: (1) statistics-based; (2) language modeling; (3) reference-based. Table 1 gives a brief summary of these three categories, as well as our proposed frequency-based FACE.

Statistics-based measures compare the model-generated distribution M with respect to the humanwritten distribution H in terms of some statistic. The Zipf coefficient [30] is used in [19] to describe the distribution of word frequencies in text. Self-BLEU [52] is derived by calculating the BLEU [29] score for each generated text utilizing all other generations as references. Repetition measures the sequence-level degree of repetition on the basis of the percentage of duplicated n-grams in the generated continuations x cont ∼ M [44]. Meanwhile, we aggregate the 2-gram, 3-gram, and 4-gram repetition rates to evaluate the lexical diversity in an inverse manner.

Language modeling metrics measure how un(certain) human text x ∼ H follows the model distribution M , using the probability distribution M ( x ) . In our work, the perplexity is calculated upon the set of human texts to quantify how well the distribution M predicts a text continuation. Coherence is approximated by cosine similarity between the sentence embeddings of prompt x pre ∼ H and continuation x cont ∼ M as proposed in [42], where the embedding EMB( · ) is produced by the pre-trained SimCSE sentence embedding [11]. Metrics under this category never observe model-generated text samples, and hence, they cannot justify how likely x cont is under the human distribution H .

Reference-based measures assess the generated text with respect to a small set of reference text, rather than calculating over the full sequence distributions. Some recent reference-based approaches encompass: (1) [4, 36, 38, 50] aim to capture distributional semantic information in high-dimensional space; (2) [51] concerns Euclidean distance between vector representations of n -grams and their document frequencies; (3) [31] straightforwardly computes the similarity of one learned distribution from a text generation and the other distribution of human-written text using information divergence frontiers [9, 23, 34]. Reference-based metrics are well-suited for targeted generation tasks (e.g., machine translation). Nevertheless, they become unfavorable in the open-ended generation scenario where multiple reasonable and diverse continuations are preferred.

Non-automatic metrics. Recent works [12, 31, 19, 26] on evaluation metrics and decoding strategies for natural language generation rely on human judgments, assuming that human annotations are the gold standard. Considering the expense of Human Unified with Statistical Evaluation (HUSE) [18], we adopt a pairwise evaluation protocol based on human preferences, to serve as a non-automatic complement of FACE metrics. We leverage the Bradley-Terry model [3] to predict the outcome of a head-to-head comparison given n players with scores β 1 , · · · , β n .

4 Experiments

Task formulation. Given an input text passage as prefix, the open-ended generation aims to produce texts that form a fluent and coherent continuation. More formally, given a sequence of m tokens denoted [ x 1 . . . x m ] , as the prompt , the goal is to generate the next n continuation tokens to form a complete sequence [ x 1 . . . x m + n ] . The continuation probability at the decoding time by conditioning on the preceding context is defined as: P ( x m +1 . . . x m + n | x 1 . . . x m ) = ∏ m + n i = m +1 P ( x i | x 1 . . . x i -1 ) , where P ( x i | x 1 . . . x i -1 ) is the next-token distribution.

4.1 Model sizes

We consider such a text completion task in three domains: Wiki text, News, and Stories. Intuitively, the generated texts involving different domain knowledge may have different language usages and writing style, which may reflect on metrics. We generate completions from large-scale language models (LMs). In particular, we adopt three representatives of state-of-the-art pre-trained autoregressive LMs: Generative Pre-trained Transformer 2 (GPT2) [33], Open Pre-trained Transformer LMs (OPT) [49], and BigScience Large Open-science Open-access Multilingual LM (BLOOM) [35]. We explore two sizes for each model to illustrate that our FACE metrics generalize across multiple LMfamilies and sizes. Details regarding our task and input data are summarized in Table 2. Different

models may generate vastly different numbers of continuations in each length interval (see Appendix). To ensure the fairness of investigating the correlation between FACE and other widely-used metrics with respect to different models (with different sizes), we compute the weighted arithmetic mean for every metric across five length intervals.

The evaluation metrics we are interested in are based on various motivations and principles. Specifically, MAUVE and FACE emphasize the parallels between human and machine-produced texts, as stated in Section 3. Therefore, we group MAUVE together with four FACE metrics. To further obtain intuitive results, we utilize the voting approach to explore the correlations between these metrics on large/small models across three task domains. The results are shown in Table 3.

In our investigations, the GPT2-xl model consistently outperforms its small counterpart among statistics-based and language modeling metrics as all relevant ' vs. ' columns indicate, apart from the Coherence in the Stories domain. In the GPT2 experimental group, it is astonishing that the small model always performs better when referring to the voting results from MAUVE and FACE rows. Across three task domains, the performances of OPT and BLOOM models in two sizes differ. Large models have better overall performance, and small models only win four out of twelve comparisons by voting. Nonetheless, it is noteworthy that four FACE metrics we proposed maintain a relatively high level of consistency with MAUVE across all models. At least two FACE metrics yield the same results (in eight out of nine sets of human-model language comparisons) with MAUVE. Concretely

p

<

0.001

0.350

0.375

0.400

0.425

0.450

sm

bg

OPT

Score

SO

p

<

0.05

0.60

0.65

0.70

0.75

0.80

sm

bg

BLOOM

Score

SO

p

<

0.001

0.300

0.325

0.350

0.375

0.400

sm

xl

GPT2

Score

SO

SO w.r.t. different decoding methods (conditional generation)

CORR w.r.t. different decoding methods (conditional generation)

SAM w.r.t. different decoding methods (conditional generation)

SPEAR w.r.t. different decoding methods (conditional generation)

0.40

0.45 f

0.35

0.30

0.25

0.20

Greedy

Beam (b)

Sampling (t)

Top-k (k)

Top-k (k, t=0.7)

Nucleus (p)

Contrastive

Stochastic Beam (b)

CORR

0.7

0.6

0.5

0.4

0.3

Sampling (t)

Beam (b)

Stochastic Beam (b)

Top-k (k)

Rp-k (k, t=0.7)

Nucleus (p)

Contrastive

SAM

0.400

0.275

0.250

0.375

0.350

0.325

0.300

Greedy

Beam (b)

Stochastic Beam (b)

Sampling (t)

Top-k (k)

Nucleus (p)

Rop-k (k, t=0.7)

Contrastive

0.16

0.14

0.12

0.10

0.08

0.06

0.04

Greedy

Nucleus (p)

(Q) weag

Stochastic Beam (b)

Sampling (t)

Top-k (k)

Contrastive

Top-k (k, t=0.7)

101

10#

Parameter value (log scale)

101

102

103

10

10-1

10b

Parameter value (log scale)

101

102

103

10

10-1

10#

Parameter value (log scale)

101

102

103

10

10-1

10#

Parameter value (log scale)

101

102

103

104

speaking, SO and SAM show a higher positive correlation to MAUVE than CORR and SPEAR , given that seven out of nine voting results (marked with yellow in Table 3) are identical.

To further evaluate model sizes, we apply FACE to the original GPT2 output data (webtext) 4 generated from GPT2-sm and GPT2-xl. GPT2-xl has a higher SO score than GPT2-sm, which is confirmed with the t -test, but non-significant effects are found on the other three metrics. Combining our generation task with the original GPT2 data, we illustrate the results for SO in Figure 3.

To conclude, we discover three keypoints: (1) FACE is consistent with MAUVE in evaluating three different model types (two sizes for each); (2) the metrics estimating similarity between human-written and model-generated text generations (e.g., FACE, MAUVE) may produce opposite results to the text-centered metrics (e.g., Diversity, Coherence); (3) the four metrics of FACE show relatively homogeneous results, and using these metrics together helps to identify model-generated texts with a more comprehensive evaluation.

4.2 Sampling methods

Recent work [19, 26] has indicated three clear trends in open-ended text generation using autoregressive LMs: (1) maximization-based decoding algorithms (e.g., beam search, greedy decoding, etc.) lead to copious repetition, while sampling with temperature may result in incoherence; (2) truncation-based sampling methods like nucleus sampling produce text with higher quality; (3) contrastive decoding outperform nucleus sampling in terms of both fluency and coherence. Accordingly, to demonstrate the effectiveness of our approach, FACE should follow the inequality: maximization-based/temperature-based ≺ nucleus ≺ contrastive in terms of the quality relationship.

Figure 4 visualizes the correlation between FACE scores and various decoding algorithms. The contrastive decoding approach yields the best performance among the four FACE metrics. It can be clearly observed that the maximization-based sampling methods behave worse than other algorithms. Moreover, adding the temperature parameter to topk sampling results in incoherent text generations,

which explains the gap between the red curve (topk w/o temperature) and the gray curve (topk w/ temperature). We also plot the correlation graphs of unconditional generation (in the Appendix) with fewer sampling methods involved. The trends and patterns in the visualization of unconditional generation are basically consistent with its conditional counterpart.

In Table 4, FACE scores on different decoding algorithms are summarized. FACE metrics correctly match the expected quality relationship of the sampling methods examined by assigning the best SO ( . 44 ), CORR ( . 75 ), SAM ( . 23 ), and SPEAR ( . 17 ) scores to contrastive decoding. Other evaluation metrics fail to capture the correct relationship, for example, the perplexity rates nucleus-sampled text as better than contrastive-decoded text, which is irrational suggested by Li et al. [26].

4.3 Human judgments

We also explore the correlation between FACE and human judgement scores, using the crowd-source dataset collected in [31] when human evaluation is available. The dataset contains model-generated continuations (by GPT2-sm, -md, -lg, and -xl with ancestral and nucleus sampling), human-written continuations using the same prefix, and the crowd-source workers' answers on which completion is more human-like, interesting, and sensible. We follow the same experimental settings and protocol to verify whether the FACE scores of the text completions correlate well with the human quality judgements by computing the Spearman's rank correlation coefficient. The results are presented in Table 5.

We observe a high and positive correlation between FACESO and human judgments scores, which outperforms five out of the six evaluation metrics reported in [31] and achieves a comparative performance against MAUVE. The remaining three FACE metrics have insignificant correlations. However, we consider human judgments to be subjective and sometimes biased. Including more fine-grained questions to perform human judgments may lead to more accurate correlation statistics. Additionally, we recomputed the correlations with human judgement scores to keep those pairs in which there are exactly one item from human and the other item from model (i.e., a subset of data used for the analysis in Table 5). As shown in SO -S and MAUVE-S columns, FACESO has a stronger correlation than MAUVE among two of these three dimensions.

4.4 Sanity tests

Sanity test on validity. We evaluate the validity of FACE by examining whether its scores on humanhuman split is lower than human-model groups - an expected result based on our assumption that the spectral difference between human's 'natural' language and models' 'artificial' ones should be amplified by FACE. Therefore, the sanity tests are conducted as follows: first, we evenly and randomly split the human data into two folds (across three domains) to serve as control groups. The FACE scores between these control folds are then computed. As for the human-to-model experimental group, we create other two folds using human data and the best model-generated data (from contrastive decoding [26]) in terms of text quality. If FACE can effectively capture the fundamental difference

between human and model languages, then we expect to observe higher scores in control groups than in the experimental group. The results are shown in Table 6.

It can be seen from Table 6 that the control groups show significantly better FACE scores than the experimental group: FACESO and FACECORR are higher in human-to-human folds, while FACESAM scores are lower. The only exception is FACESPEAR , while we will show it is a good metric in later sections. Nonetheless, these tabulated results have proved the validity of FACE in effectively capturing human-to-model spectral differences.

Choice of estimator model. We examine how different choices of the estimator model m est affect the resulting spectra, using GPT2-sm, -md, -lg and -xl as m est, respectively. The spectra of webtext and the original GPT2 output data are computed. It is found that the spectra obtained from m est have different magnitudes, but their aggregated curves have the same shape (see Appendix). Therefore, the choice of m est will not affect FACE scores as long as the same m est is used for all data.

Stationarity tests. One of the assumptions of the Fourier transform is that the signal is stationary [21], i.e., the mean and variance do not change over time. We applied the Augmented Dickey-Fuller (ADF) test [8] to examine the stationarity of the cross-entropy sequences for all the human and model-generated data used in this study. The null hypothesis H 0 of the ADF test is non-stationarity, and thus a p < . 05 testing result rejects H 0 and accepts the alternative hypothesis of stationarity in the series. We calculate the proportions of cross-entropy sequences that pass the ADF test with p < . 05 for all model-generated and human data: 97.4% for GPT2, 92.1% for OPT, 74.5% for BLOOM, and 97.9% for human. Thus, the majority of data meets the stationarity requirement.

4.5 Interpretation of spectra

As the frequency spectrum reflects the key characteristics of a signal, we attempt to interpret the spectra to see if they tell how the 'signals' - entropy of human and machine languages - differ. Without aggregation, the raw spectra of single cross-entropy sequence look indistinguishable between GPT2-sm, GPT2-xl, and human (see the left plot in Figure 5). By aggregating 5,000 spectra from each group and smoothing the curves, it can be seen that GPT2-xl's curve is closer to human than the GPT2-sm curve (readers can find this by zooming in the middle plot in Figure 5). Here, the smoothing is done with generalized additive models (GAMs) [45]. Results from other models are included in the Appendix.

0

100

200

300

0.0

0.1

0.2

0.3

0.4

0.5

w

k

X

(

w

k

)

Smoothed spectra

1e

-

02

1e

-

01

1e+00

1e+01

1e+02

0.0

0.1

0.2

0.3

0.4

0.5

w

k

X

(

w

k

)

Smoothed spectra (log scale)

source

GPT2

-

xl

GPT2

-

sm

human

×5000

w

2

=

0.12

w

4

=

0.23

w

1

=

0.06

w

3

=

0.18

0

100

200

0.0

0.1

0.2

0.3

0.4

0.5

w

k

X

(

w

k

)

Human

0

100

200

0.0

0.1

0.2

0.3

0.4

0.5

w

k

X

(

w

k

)

GPT2

-

xl

-

50

0

50

100

150

200

0.0

0.1

0.2

0.3

0.4

0.5

w

k

X

(

w

k

)

BLOOM

0

50

100

150

200

0.0

0.1

0.2

0.3

0.4

0.5

w

k

X

(

w

k

)

OPT

|

|

|

|

human

GPT2

-

sm

GPT2

-

xl

0.0

0.1

0.2

0.3

0.4

0.5

-

300

-

200

-

100

0

100

200

300

-

300

-

200

-

100

0

100

200

300

-

300

-

200

-

100

0

100

200

300

w

k

X

(

w

k

)

Sample spectra

GPT2-xl

is closer to

human

than

GPT2-sm

When plotted separately, the aggregated spectra from human and different models have similar shapes: First, the majority of components exist in the low-frequency range ( ω < 0 . 05 ). In addition, the locations of peaks and troughs are almost the same between groups. For instance, ω 1 = 0 . 06 is the first trough, and ω 2 = 0 . 12 is the first peak (see the right plots in Figure 5). Thus, roughly speaking, the main difference between human and model spectra is not in the locations of peak and trough frequencies but in the relative magnitudes of those frequencies.

We propose a simple way to interpret the peaks in spectra: the reciprocal of a frequency component T k = 1 /ω k denotes the corresponding cycle in the time domain. Because the time interval (i.e., sampling interval) of an entropy sequence is not measured in seconds but fixed as one token , the measurement unit of T k is also in number of tokens. For example, the first frequency peak in Figure 5 (right plot) implies ω 2 = 0 . 12 ⇒ T 2 = 1 / 0 . 12 ≈ 8 . 3 (tokens), which approximately means that tokens of the same cross-entropy levels tend to recur every 8.3 tokens. This pattern is consistent in both human and model data. However, the degree of this recurrence can mark the difference between the human and model languages. We leave more detailed interpretations of spectra to future work.

5 Conclusion and Limitations

We propose FACE, a set of metrics based on the Fourier analysis of cross-entropy, which is able to distinguish human and model-generated language with satisfactory performance in the open-ended generation task. The metrics scale with model sizes; reflect the effect of various sampling methods; correlate well with other existing metrics and outperform most of them in alignment with human judgement scores. Among the four implementation methods of FACE experimented, Spectral Overlap ( SO ) has the best overall performance.

FACE is computationally efficient with easy-to-interpret output. As a method inspired by psycholinguistic studies on the predictability (entropy/surprisal/information density) of human language, we believe FACE is a good example of incorporating knowledge from different fields for better human-centered AIs. We can generally conclude that better language models can produce spectral representations of information that are more similar to human.

Our current work has several limitations: Firstly, for open-ended generation experiments (Section 4.1), a broader set of sampling methods other than topk can be used. Secondly, larger models (with more than 100 billion parameters) need to be included for more comprehensive comparisons. We will improve from these aspects in future work.

References

H. Ahmed, I. Traore, and S. Saad. Detection of online fake news using n-gram analysis and machine learning techniques. In Intelligent, Secure, and Dependable Systems in Distributed and Cloud Environments: First International Conference, ISDDC 2017, Vancouver, BC, Canada, October 26-28, 2017, Proceedings 1 , pages 127-138. Springer, 2017.

J. Boardman. Sips user's guide spectral image processing system, version 1.2. Center for the Study of Earth from Space: Boulder, CO, USA , 1992.

R. A. Bradley and M. E. Terry. Rank analysis of incomplete block designs: I. the method of paired comparisons. Biometrika , 39(3/4):324-345, 1952. ISSN 00063444. URL http: //www.jstor.org/stable/2334029 .

E. Clark, A. Celikyilmaz, and N. A. Smith. Sentence mover's similarity: Automatic evaluation for multi-sentence texts. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics , pages 2748-2760, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1264. URL https://aclanthology.org/ P19-1264 .

J. W. Cooley and J. W. Tukey. An algorithm for the machine calculation of complex fourier series. Mathematics of computation , 19(90):297-301, 1965.

O. A. De Carvalho and P. R. Meneses. Spectral correlation mapper (scm): an improvement on the spectral angle mapper (sam). In Summaries of the 9th JPL Airborne Earth Science Workshop, JPL Publication 00-18 , volume 9, page 2. JPL publication Pasadena, CA, USA, 2000.

N. Dethlefs, H. Hastie, H. Cuayáhuitl, Y. Yu, V. Rieser, and O. Lemon. Information density and overlap in spoken dialogue. Computer speech & language , 37:82-97, 2016.

D. A. Dickey and W. A. Fuller. Distribution of the estimators for autoregressive time series with a unit root. Journal of the American statistical association , 74(366a):427-431, 1979.

J. Djolonga, M. Lucic, M. Cuturi, O. Bachem, O. Bousquet, and S. Gelly. Precision-recall curves using information divergence frontiers. In International Conference on Artificial Intelligence and Statistics , 2019.

A. Fan, M. Lewis, and Y. Dauphin. Hierarchical neural story generation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) , pages 889-898, Melbourne, Australia, July 2018. Association for Computational Linguistics. doi: 10.18653/v1/P18-1082. URL https://aclanthology.org/P18-1082 .

T. Gao, X. Yao, and D. Chen. SimCSE: Simple contrastive learning of sentence embeddings. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing , pages 6894-6910, Online and Punta Cana, Dominican Republic, Nov. 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.emnlp-main.552. URL https:// aclanthology.org/2021.emnlp-main.552 .

S. Gehrmann, H. Strobelt, and A. Rush. GLTR: Statistical detection and visualization of generated text. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: System Demonstrations , pages 111-116, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-3019. URL https://aclanthology. org/P19-3019 .

D. Genzel and E. Charniak. Entropy rate constancy in text. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics , pages 199-206, 2002.

D. Genzel and E. Charniak. Variation of entropy and parse trees of sentences as a function of the sentence number. In Proceedings of the 2003 conference on empirical methods in natural language processing , pages 65-72, 2003.

M. Giulianelli, A. Sinclair, and R. Fernández. Is information density uniform in task-oriented dialogues? In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing , pages 8271-8283, 2021.

J. Hale. A probabilistic earley parser as a psycholinguistic model. In Second meeting of the north american chapter of the association for computational linguistics , 2001.

J. Hale. Information-theoretical complexity metrics. Language and Linguistics Compass , 10(9): 397-412, 2016.

T. B. Hashimoto, H. Zhang, and P. Liang. Unifying human and statistical evaluation for natural language generation. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) , pages 1689-1701, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1169. URL https://aclanthology. org/N19-1169 .

A. Holtzman, J. Buys, L. Du, M. Forbes, and Y. Choi. The curious case of neural text degeneration. In International Conference on Learning Representations , 2020. URL https: //openreview.net/forum?id=rygGQyrFvH .

T. F. Jaeger. Redundancy and reduction: Speakers manage syntactic information density. Cognitive psychology , 61(1):23-62, 2010.

I. Kaplan. Dft of a non-stationary time series, Sep 2001. URL http://bearcave.com/misl/ misl_tech/signal/nonstat/index.html .

F. A. Kruse, A. Lefkoff, J. Boardman, K. Heidebrecht, A. Shapiro, P. Barloon, and A. Goetz. The spectral image processing system (sips)-interactive visualization and analysis of imaging spectrometer data. Remote sensing of environment , 44(2-3):145-163, 1993.

T. Kynkäänniemi, T. Karras, S. Laine, J. Lehtinen, and T. Aila. Improved precision and recall metric for assessing generative models. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems , volume 32. Curran Associates, Inc., 2019. URL https://proceedings.neurips.cc/ paper_files/paper/2019/file/0234c510bc6d908b28c70ff313743079-Paper.pdf .

R. Levy. Expectation-based syntactic comprehension. Cognition , 106(3):1126-1177, 2008.

R. Levy and T. Jaeger. Speakers optimize information density through syntactic reduction. In B. Schölkopf, J. Platt, and T. Hofmann, editors, Advances in Neural Information Processing Systems , volume 19, pages 849-856, 2007.

X. L. Li, A. Holtzman, D. Fried, P. Liang, J. Eisner, T. Hashimoto, L. Zettlemoyer, and M. Lewis. Contrastive decoding: Open-ended text generation as optimization. arXiv preprint arXiv:2210.15097 , 2022.

S. Merity, C. Xiong, J. Bradbury, and R. Socher. Pointer sentinel mixture models. In International Conference on Learning Representations , 04 2017.

O. Oullier, G. C. De Guzman, K. J. Jantzen, J. Lagarde, and J. Scott Kelso. Social coordination dynamics: Measuring human bonding. Social neuroscience , 3(2):178-192, 2008.

K. Papineni, S. Roukos, T. Ward, and W.-J. Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics , pages 311-318, Philadelphia, Pennsylvania, USA, July 2002. Association for Computational Linguistics. doi: 10.3115/1073083.1073135. URL https://aclanthology.org/P02-1040 .

S. Piantadosi. Zipf's word frequency law in natural language: A critical review and future directions. Psychonomic bulletin & review , 21, 03 2014. doi: 10.3758/s13423-014-0585-6.

K. Pillutla, S. Swayamdipta, R. Zellers, J. Thickstun, S. Welleck, Y. Choi, and Z. Harchaoui. Mauve: Measuring the gap between neural text and human text using divergence frontiers. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P. Liang, and J. W. Vaughan, editors, Advances in Neural Information Processing Systems , volume 34, pages 4816-4828. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper_files/paper/2021/file/ 260c2432a0eecc28ce03c10dadc078a4-Paper.pdf .

T. Qian and T. F. Jaeger. Topic shift in efficient discourse production. In Proceedings of the Annual Meeting of the Cognitive Science Society , volume 33, 2011.

A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, and I. Sutskever. Language models are unsupervised multitask learners, 2019.

M. S. M. Sajjadi, O. Bachem, M. Lucic, O. Bousquet, and S. Gelly. Assessing generative models via precision and recall. In Advances in Neural Information Processing Systems , page 5234-5243, Red Hook, NY, USA, 2018. Curran Associates Inc.

T. L. Scao, A. Fan, C. Akiki, E. Pavlick, S. Ili´ c, D. Hesslow, R. Castagné, A. S. Luccioni, F. Yvon, M. Gallé, et al. Bloom: A 176b-parameter open-access multilingual language model. arXiv preprint arXiv:2211.05100 , 2022.

T. Sellam, D. Das, and A. Parikh. BLEURT: Learning robust metrics for text generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics , pages 7881-7892, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/ 2020.acl-main.704. URL https://aclanthology.org/2020.acl-main.704 .

C. E. Shannon. Communication theory of secrecy systems. The Bell System Technical Journal , 28(4):656-715, 1949.

H. Shimanaka, T. Kajiwara, and M. Komachi. RUSE: Regressor using sentence embeddings for automatic machine translation evaluation. In Proceedings of the Third Conference on Machine Translation: Shared Task Papers , pages 751-758, Belgium, Brussels, Oct. 2018. Association for Computational Linguistics. doi: 10.18653/v1/W18-6456. URL https://aclanthology. org/W18-6456 .

J. O. Smith. Spectral Audio Signal Processing . http://ccrma.stanford.edu/~jos/sasp/ , accessed 3/14/2023. Online book, 2011 edition.

S. Soule. Entropies of probabilistic grammars. Information and Control , 25(1):57-74, 1974.

C. Spearman. The proof and measurement of association between two things. The American Journal of Psychology , 1961.

Y. Su, T. Lan, Y. Wang, D. Yogatama, L. Kong, and N. Collier. A contrastive framework for neural text generation. In A. H. Oh, A. Agarwal, D. Belgrave, and K. Cho, editors, Advances in Neural Information Processing Systems , 2022. URL https://openreview.net/forum?id= V88BafmH9Pj .

P. Welch. The use of fast fourier transform for the estimation of power spectra: a method based on time averaging over short, modified periodograms. IEEE Transactions on audio and electroacoustics , 15(2):70-73, 1967.

S. Welleck, I. Kulikov, S. Roller, E. Dinan, K. Cho, and J. Weston. Neural text generation with unlikelihood training. In International Conference on Learning Representations , 2020. URL https://openreview.net/forum?id=SJeYe0NtvH .

S. N. Wood. Generalized additive models: an introduction with R . CRC press, 2017.

Y. Xu and D. Reitter. Entropy converges between dialogue participants: Explanations from an information-theoretic perspective. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) , pages 537-546, 2016.

Y. Xu and D. Reitter. Spectral analysis of information density in dialogue predicts collaborative task performance. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) , pages 623-633, 2017.

Y. Xu and D. Reitter. Information density converges in dialogue: Towards an informationtheoretic model. Cognition , 170:147-163, 2018.

S. Zhang, S. Roller, N. Goyal, M. Artetxe, M. Chen, S. Chen, C. Dewan, M. Diab, X. Li, X. V. Lin, T. Mihaylov, M. Ott, S. Shleifer, K. Shuster, D. Simig, P. S. Koura, A. Sridhar, T. Wang, and L. Zettlemoyer. Opt: Open pre-trained transformer language models, 2022.

T. Zhang*, V. Kishore*, F. Wu*, K. Q. Weinberger, and Y. Artzi. Bertscore: Evaluating text generation with bert. In International Conference on Learning Representations , 2020. URL https://openreview.net/forum?id=SkeHuCVFDr .

W. Zhao, M. Peyrard, F. Liu, Y. Gao, C. M. Meyer, and S. Eger. MoverScore: Text generation evaluating with contextualized embeddings and earth mover distance. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) , pages 563-578, Hong Kong, China, Nov. 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1053. URL https://aclanthology.org/D19-1053 .

Y. Zhu, S. Lu, L. Zheng, J. Guo, W. Zhang, J. Wang, and Y. Yu. Texygen: A benchmarking platform for text generation models. In The 41st international ACM SIGIR conference on research & development in information retrieval , pages 1097-1100, 06 2018. doi: 10.1145/ 3209978.3210080.

Appendix

1 Broader Impacts

FACE measures the distance between human and model-generated languages, therefore it is technically possible to be used for designing or augmenting systems that mimic humans. We acknowledge the risks of FACE (and other metrics) being utilized in applications that deliberately confuse humanauthored and model-produced text. We call for the collective efforts from the community to come up with a systematic framework that unifies different metrics, for developing more reliable and natural language generation systems.

2 Implementation Details

Preprocessing. We utilize three raw datasets: WritingPrompts, WikiText-103, and RealNews. For WritingPrompts, the prompt set has already been well-curated, so we just extracted the first 5,000 prompts (the length may vary) for our generation task. WikiText-103 and RealNews contain many complete texts. For each complete text, we further truncate it corresponding to the first 35 tokens as a prompt. To fairly evaluate the performance of metrics, we also divide text generations according to five predefined length (from 0 up to 1024) intervals for each dataset. Thereby, the human-written texts and model-produced texts used to evaluate the performance of metrics may be generated by different prompts (i.e., unpaired comparison).

Hyper-parameters. We have several hyper-parameters during the text generation and evaluation phases. For both conditional and unconditional generation, we preset a random seed integer (32 by default). Furthermore, the maximum length of each text (1024 by default) as well as the batch size (which varies according to GPUs capacity) for perplexity computation have to be determined before automatic evaluation.

3 Miscellaneous Details

Software. Our experiments were performed on Ubuntu 20.04.1 system with Python 3.9.16. The versions of key Python libraries include: Transformers 4.27.4, PyTorch-CUDA 11.6, PyTorch 1.13.1, Scipy 1.5.4.

Hardware. For the text generation task, we use the remote workstation that has two NVIDIA RTX A6000 graphics cards. It should be noted that all models were run in parallel when available.

Computation time for text generation. We spent 10 and 25 hours or so obtaining 5,000 text continuations by GPT2-sm, -xl, respectively. OPT-125m, -6.7b cost our GPU resources roughly 11 and 44 hours to output the same number of text continuations, respectively. When it comes to BLOOM-560m, -7b, they took approximately 18 and 48 hours, respectively, to generate 5,000 continuations per task domain.

Evaluation time for FACE. Computation time of four FACE metrics for a single pair of references are: 5 . 96 × 10 -8 seconds for SO , 5 . 01 × 10 -8 seconds for CORR , 4 . 53 × 10 -8 seconds for SAM , and 4 . 29 × 10 -8 seconds for SPEAR , respectively. The cross-entropy, which should be calculated beforehand, takes 5 . 65 × 10 -2 seconds. All of the above measurements take place on an AMD Ryzen Threadripper PRO 3995WX 64-Cores CPU (frequency range ∈ [2200.00MHz, 4308.40MHz]). Users can leverage more advanced GPU resources to perform the whole computation process with a faster speed.

4 Additional Experimental Results

4.1 Model sizes (generation length)

It should be emphasized that LMs have diverse designs and were pre-trained using different strategies on different datasets, giving them distinct preferences on the generation length. The numbers of text generations in each length interval are summarized in Table 7.

news

story

wiki

CORR

SAM

SO

SPEAR

0.0

0.2

0.4

0.6

0.8

0.00

0.05

0.10

0.15

0.20

0.25

0.0

0.2

0.4

0.6

0.000

0.005

0.010

0.015

0.020

Model: GPT2

Score

news

story

wiki

CORR

SAM

SO

SPEAR

0.0

0.2

0.4

0.6

0.8

0.00

0.05

0.10

0.15

0.20

0.25

0.0

0.1

0.2

0.3

0.4

0.00

0.01

0.02

0.03

0.04

Model: OPT

Score

news

story

wiki

CORR

SAM

SO

SPEAR

0.0

0.2

0.4

0.6

0.8

0.0

0.1

0.2

0.3

0.0

0.2

0.4

0.6

0.00

0.02

0.04

0.06

Model: BLOOM

Score

Size

bg

sm

To ensure the consistency of our experiments, we run six LMs separately (using their own tokenizers) with the same prompt sets and settings as described in Table 2 to generate 5,000 pieces of continuations in each domain. Besides, we utilize the GPT2Tokenizer to calculate the numbers of continuations for each interval, which allows us to compare FACE scores with other metrics more objectively, as we believe it is unfair to explicitly compare texts of varying lengths. Then, we compute weighted arithmetic mean to evaluate a model in each domain, by s ′ = ∑ n i =1 m i M s i , where s ′ denotes the weighted mean; n denotes the number of length intervals; m i is the number of generated continuations in the length interval i ; M = ∑ n i =1 m i , and s i means a certain metric value in the interval i .

Figure 6 conveys a more intuitive representation (via bar plots) of Table 3.

4.2 Sampling methods (unconditional generation)

We also carried out experiments on unconditional text generation. Here, the prompt is not required as we generate continuations from a random seed (set to 32 empirically). Four sampling methods, which are greedy decoding, beam search, stochastic beam search, and contrastive decoding, are not involved in this set of experiments.

The results are displayed in Figure 7. The overall trends are same as its conditional counterpart, where the previous quality relationship (maximization-based/temperature-based ≺ nucleus ≺ contrastive) is satisfied. Yet, it is crucial to note that the advantages of topk sampling w/o temperature become more obvious compared to the conditional case.

0.40

0.45

SO w.r.t. different decoding methods (unconditional generation)

0.69

0.70

0.68

CORR w.r.t. different decoding methods (unconditional generation)

Sampling (t)

Top-k (k)

Nucleus (p)

Top-k (k, t=0.7)

0.270

0.275

SAM w.r.t. different decoding methods (unconditional generation)

Sampling (t)

Top-k (k)

Nucleus (p)

Top-k (k, t=0.7)

0.060

0.055

SPEAR w.r.t. different decoding methods (unconditional generation)

Sampling (t)

Top-k (k, t=0.7)

Nucleus (p)

0.30

0.35

0.66

0.67

0.65

WVS

0.265

0.260

0.045

0.050

0.25

Sampling (t)

Top-k (k)

0.64

0.255

0.040

Nucleus (p)

Top-k (k, t=0.7)

0.63

0.250

0.035

10-1

106

Parameter value (log scale)

101

10²

101

10

101

10b

Parameter value (log scale)

101

10²

103

10

10-1

10#

Parameter value (log scale)

10t

102

103

104

10-1

10#

Parameter value (log scale)

101

102

103

10*

4.3 Human judgments

Table 8 shows the FACE scores based on the output texts from MAUVE. Each column of FACE scores is used to compute the Spearman's rank correlation coefficient between a specific FACE metric and Bradley-Terry scores ( 4 model sizes × 2 sampling methods = 8 scores in total) from one criterion (three criteria correspond to three questions in total).

4.4 Choice of estimator model

Weexamine how different choices of estimator model m est affect the resulting spectra of cross-entropy. Five input data sources are examined (webtext plus four GPT2 original output datasets), on which four different estimator models are applied: m est ∈ { GPT2-sm , GPT2-md , GPT2-lg , GPT2-xl } , resulting in 5 × 4 = 20 aggregated spectra curves in Figure 8. It can be found that on the same input data, the spectra from four estimators largely overlap. It indirectly suggests that FACE should be stable across different m ests. We leave the full inspection for future work.

4.5 Intuitive interpretation of spectra

As pointed out in Section 4.5, the aggregated spectral shapes from human and different models are nearly identical. A set of higher resolution plots from GPT-xl, OPT, BLOOM and human (webtext) are shown in Figure 9. It can be seen that although the X ( ω k ) has different ranges on y -axis, the x coordinates of the peaks and troughs are the same.

4.6 Corner Cases

Two examples highlight the difference between our proposed FACESO and MAUVE in their ability to recognize human-generated and model-generated texts. In the filtered datasets for human judgments, the average values for FACESO and MAUVE are 0.4738 and 0.9549, respectively. In Case 1, human evaluators noted a high level of similarity between the model-generated text and human text, resulting

2.0

2.5

3.0

3.5

0.0

0.1

0.2

0.3

0.4

0.5

Frequency

Power

Spectra of webtext from 4 estimators

2

3

4

5

0.0

0.1

0.2

0.3

0.4

0.5

Frequency

Power

Spectra of GPT2-small from 4 estimators

2

4

6

8

0.0

0.1

0.2

0.3

0.4

0.5

Frequency

Power

Spectra of GPT2-medium from 4 estimators

2

3

4

5

0.0

0.1

0.2

0.3

0.4

0.5

Frequency

Power

Spectra of GPT2-large from 4 estimators

2

3

4

5

0.0

0.1

0.2

0.3

0.4

0.5

Frequency

Power

Spectra of GPT2-xl from 4 estimators

estimator

gpt2-lg

gpt2-md

gpt2-sm

gpt2-xl

0

50

100

150

0.0

0.1

0.2

0.3

0.4

0.5

w

k

X

( w

k

)

GPT2-XL

0

50

100

150

200

0.0

0.1

0.2

0.3

0.4

0.5

w

k

X

( w

k

)

OPT

-50

0

50

100

150

200

0.0

0.1

0.2

0.3

0.4

0.5

w

k

X

( w

k

)

BLOOM

0

100

200

0.0

0.1

0.2

0.3

0.4

0.5

w

k

X

( w

k

)

Human

in ties for human-like, interesting, and sensible aspects. However, the MAUVE score in Case 1 is lower than the average value, while the FACESO score surpasses its mean. This discrepancy suggests that SO aligns more consistently with human opinions. Conversely, in Case 2, human judgement indicates a significant dissimilarity between the model-generated text and human text, making them easily distinguishable. However, the MAUVE score exceeds its mean, suggesting the two texts are similar to each other. Our FACESO score is lower than its mean, indicating better alignment with human opinion.

Case ID

Prompt

Model-generated

Human

MAUVE

HumanJudgement

<p>arding allgeneticmaterial from within the world's Arctic

<p>arding seeds for thousands of crop varieties.If anything dramatic

Ocean in massive metal containers.

should happen elsewhere around the world, we want these seeds to

The seeds on the vault are extracted in any time zone in the

be there.

world’s North Pole and are safe from theft or re-use at

</p><p>The vault consists of a giant freezer room bored into a

home.</p><p>Here are some of the goals of the Global Seed

mountain, protected by the bedrock around it and the permafrost

Vault:</p><ul><li><p>To provide the seeds for the Seed Vault

above it. But according to a report in The Guardian, the vault

experienced an unhappy surprise recently,Aimelting permafrost in

<p><strong>ln Arctic Svalbard, there is a vault that

Kaleidoscope.</p></li><li><p>To provide the seeds for the

winter.</p><p>The Arctic just experienced its second-warmest winter

Ties in Human-like,

might sound like a sci-fi plot device. Completed in

Seed Vault of the [Fracked Island from]

on record (surpassed only by 2016), and Svalbard saw remarkable

0.9441

0.4995

Interesting, and

2008

Israel.</p></li><li><p>To build a mountain pass (with

temperatures and even rain. In fact, Svalbard averaged more than 4

Sensible

gateway) in southern Greenland</p></li><li><p>To bring

~ooC above even the 2004-2013 average.</p><p>As a result,

purified material to the Arctic.</p></li><li><p>To assemble a

meltwater trickled into the seed vault's entrance tunnel before

home base (with gateway) for our cargo-

refreezing. The freezer room itself was safe, but the ice in the tunnel

transport.</p></li></ul><p>ln case of rescue need, Alaska

had to be chipped out. Hege Njaa Aschim, a spokesperson for the

government and Navy have the ability to maintain his

Norwegian government, told The Guardian, &quot;It was supposed to

vessel.</p>, the Global Seed Vault is a remote archive for

[operate] without the help of humans, but now we are watching the

safegu</strong></p>

seed vault 24 hours a</p>

<p><strong>During the Sundance Film Festival, Park

to get a table at their favorite restaurant,Ai or any

are often treated like second-class citizens, unable

restaurant ,Ai because directors</strong></p>

City locals

has not playedacompetitive game since this seasoninSpain's

captain Isco feel sorry for his teammate.</p><p>Waving in the

restof theteammatesscored the goalthatled totheBarca's

La Liga -- he is likely to come off the bench once again for the

last round of knockout games but Pique played big part in the

<p>night.</p><p>The Barcelona man, who was his side's hero

sixth game this season as his side beat Estudiantes 3-0 in the

victory for the La Liga side.</p><p>Barcelona Athletic Club's

Copa del Rey fixture on March 6.</p><p>He was in only his

colours of his team, Pique, together with the support of the

player of the season, Fv*bio CoentrVfo and Real Madrid’s

of the season until Real Madrid got into the game,

the defeatat theSantiagoBernabeu./p><p>&quot;We'renot having

the pitch.</p><p>&quot;n the nine years I've been [at Barca], it's the

Thursday, subsequently conceded that Barca are struggling on and off

other as possible and move forward.</p><p>Gerard Pique could only

<ul><li></li></ul><p>First-half goals from Marco Asensio and Karim

first time Ifeel inferior to Madrid,&quot; Pique told reporters after

taken off in the second half with an injury and willundergo tests on

our best time as a team or a club. We should all be as close to each

seventh trophy since Zidane took charge.</p><p>Pique, who was

saw Madrid canter to a 5-1 aggregate win, securing the club's

watch as an impressive Real Madrid cruised to the Super Cup

Benzema, coupled with Sunday's 3-1 victory at Camp Nou,

0.984

0.445

Human texts are

Interesting, and

strongly more

Human-like,

Sensible

Liga.</p><p>&quot;l feel very sorry for him,&quot; said Isco,

who was out injured to start the match but returned to the

5-3 aggregate lead in the last four rounds of the

squad. &quot;l think that's the</p>

crown.</p><p>&quot;We must live with this defeat and accept that

Madrid are better than us [at the moment], but the season’s very

long and there's room for improvement.&quot;</p>

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nIn order to distinguish between human-generated text and machine-generated text, the authors propose the use of the periodicity of cross entropy for discrimination. More specifically, they suggest analyzing cross entropy through the Fourier transform.\n\nSTRENGTHS:\n1. This paper is well-written and easy to follow.\n2. The experimental section of this paper is fairly comprehensive.  The authors' experimental objects have broadly encompassed the latest open-source large models. Although it lacks large language models like GPT-3.5 (the cross entropy can still be obtained through APIs).\n\nWEAKNESSES:\n1. Motivation. The motivation of the paper is not clear, as the authors do not clearly explain why the CE of human language would exhibit periodicity. In the related work section, they briefly mention previous works, but in my view, dialogue tasks are just a specific case of text generation. Overall, skipping the motivation part significantly reduces the soundness of this paper.\n\n2. Method. The authors' method simply involves applying a FFT to the CE sequences, which I believe lacks substantial novelty. Why haven't the authors considered using the information in the frequency domain as input to a deep neural network to incorporate a powerful NN? Why only analyze information in the frequency domain using spectral similarity metrics? Additionally, most of these metrics have already been presented in [1]. Which method would better utilize this information for discrimination? In conclusion, the proposed method by the authors lacks both sufficient contribution and profound insight.\n\n3. Experiments.  In the experimental section, the authors did not compare against sufficient baselines. For instance, could we achieve good results by only training a contrastive model using human-generated text and LLM-generated text? How helpful is the frequency domain information in discriminating texts?\n\n[1] Y. Xu and D. Reitter. Spectral analysis of information density in dialogue predicts collaborative task performance. ACL\n\nQUESTIONS:\nsee weakness\n\nLIMITATIONS:\nthe authors adequately addressed the limitations", "TITLE": "Official Review", "RECOMMENDATION": 3, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2023-07-06"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes a new measure of natural language generation (NLG) quality based on similarity between the spectrum of cross-entropy in natural vs. generated text. Fourier Analysis of the Cross-Entropy of language (FACE) is inspired by NLP and psycholinguistic studies suggesting that surprisal is not uniformly distributed in natural text (e.g., content words tend to be more surprising than function words), occurring periodically. For a given generated text, FACE computes a discrete Fourier transform of the token-level cross-entropy sequence (under a separate FACE evaluation LM). Similarity between the vector of frequency magnitudes and that from a randomly selected, natural text corpus are then computed. The paper considers several definitions of FACE metrics, including spectral overlap, cosine similarity, and Pearson/Spearman’s rank correlation coefficients.\n\nLMs from 125 million to over 7 billion parameters are evaluated on NLG of Wikipedia articles, news articles, and stories (with a short prompt of 35 subword tokens provided). Ultimately, FACE is found to be correlated with human judgments of how “human-like”, “sensible”, and “interesting” the generations are. The relationship is not as strong as an existing intrinsic measure, MAUVE. The relative ranking of decoding methods according to FACE agrees with prior works (e.g., greedy decoding < nucleus), as do model size (smaller models produce lower quality generations than larger models).\n\nSTRENGTHS:\nThe metric is well-motivated, evaluating whether generated text matches the surprisal statistics of natural text. The algorithm is simple and described sufficiently clearly. FACE is an automatic measure of NLG quality that is, on the face of it, complementary to existing measures. This paper would be of interest to many who work on (large) language models.\n\nWEAKNESSES:\nWhile FACE is motivated by the desire to match surprisal statistics of natural text, it was not clear how different FACE is from existing metrics. Computing correlation between FACE and existing metrics would help alleviate this, as would providing anecdotes of cases with high/low FACE score vs. high/low MAUVE score, for instance.\n\nQUESTIONS:\nHave you also considered the spectrum of hidden LM embeddings rather than cross-entropy, and considered how such a metric might differ from FACE?\n\nLIMITATIONS:\nYes", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-08"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes a set of metrics based on Fourier Analysis of the estimated Cross-Entropy (FACE) of language. The main idea is to compute the similarity between the spectra of cross-entropy in model-generated texts and human-written texts. Experimental results show that FACE as a computationally efficient metric can scale with model size and reflect the outcomes of different sampling methods for decoding.\n\nSTRENGTHS:\n1. The idea to introduce the spectra of cross-entropy into the evaluation task of open-ended text generation is interesting since it may include some patterns (e.g. periodical patterns) to identify the difference between model-generated texts and human-written texts.\n\n2. This paper is overall well-written and easy to follow.\n\nWEAKNESSES:\n1. The proposed method lacks deeper analysis on the spectrum of cross entropy in the evaluation task. The authors only use the spectrum of cross entropy as a feature vector of texts to compute similarities without clearly describing the characteristics of texts it can reflect. This seems like an empirical try without definite intuitions or theoretical supports. In comparison, the features which are commonly used in the existing metrics such as n-gram statistics (in BLEU) and contextual hidden vectors (in BERTScore) intuitively indicate the surface-level and semantic-level representation of texts, respectively.\n\n2. From Table 5, the performance of SO is still worse than that of MAUVE proposed in 2021. I understand that pursuing SOTA is not necessary for each paper. But the authors should provide more insights into the advantages of SO over MAUVE in other aspects.\n\n3. In Section 4.4, the authors mention that they use GPT-2 of different scales to compute the spectra of GPT-2 output data. I wonder whether this setting can introduce potential bias because the cross entropy may be exceptionally low when using GPT-2 to evaluate its own output data from my experience.\n\nQUESTIONS:\nI have included my questions in the weaknesses part.\n\nLIMITATIONS:\nThe authors have adequately addressed the limitations.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-12"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes a new language generation evaluation metric.\nPrior work in psycholinguistics has shown that surprisal changes periodically in natural language, with natural utterances displaying moments of high and low surprisal.\nThis paper thus proposes to evaluate natural language generation models by quantifying how similar its surprisal frequency patterns are to natural language's.\nMore specifically, this paper proposes to: (1) estimate the surprisal of natural and model-generated text using a separate pretrained language model; (2) get frequency spectra for this surprisals using discrete fourier transforms; (3) compute 4 different metrics of similarity between the frequency spectra of model- and human-generated surprisals.\nThey then experiment with this metric, showing how it evaluates models of different sizes, and with different decoding strategies.\nIn a final experiment, they present the correlation between their metric and human judgment scores for 8 gpt2-based language generation systems (small, medium, large, xl with either ancestral or nucleus sampling); this experiment shows that while the proposed method does better then some prior metrics (e.g. self-bleu) it produces worse correlations than mauve.\n\nSTRENGTHS:\nI found this paper quite interesting.\nThe motivation was relatively clear and the proposed metric is well-motivated.\nIn particular, operationalising a psycholinguistic hypothesis of what consists human-like text, and then using it to evaluate language generation systems seems like a promising approach.\nFurther, I appreciate the idea of using Fourier transforms to analyse the frequency spectra of information/surprisal in text.\n\nWEAKNESSES:\nI believe that the evaluation part of the paper could be improved:\n* First, section 4.1 discusses how the proposed metric evaluates models of different sizes. (They generate text while prompting models with a few initial tokens from sentences of three datasets.) These results, however, seemed confusing to me; sometimes smaller or larger models are better with no clear explanation, and the main comparison point used is whether or not the proposed metric agrees with mauve. If mauve was to be considered a gold standard, however, we would not need a new metric.\n* Second, section 4.2 evaluates the impact of decoding strategy on the evaluated scores. In these experiments, the authors (coherently) find that their proposed metric always evaluates contrastive decoding as the best strategy. How their evaluation metric fares when comparing other decoding strategies (e.g. nucleus vs ancestral sampling), however, is less clear. Further the table does not show any scores for human text, which I believe could work as an interesting sanity test. These could be computed by evaluating the proposed metric using half of this dataset against its other half.\n* Third, the correlations with human judgement scores in section 4.3 are worse than mauve's. While I do not believe a paper needs to have state-of-the-art scores to be published, the paper does not put forward other reasons why it should be accepted besides these correlations, and treats these negative results as positive in its discussion.\n\nIn summary, this paper focuses on how its proposed evaluation metric produces good scores of what is human-like text, but does not demonstrate to be better than mauve at this. Further, it does not offer any other justifications (besides being a good metric of human-like text) for why one should use it. Together, this makes me think the impact of this paper might be quite limited.\n\nAdding a longer and more detailed comparison between this proposed metric and previously proposed ones could help improve this paper's impact.\n\nQUESTIONS:\nQuestions:\n* Which model was used to compute $m_{\\text{est}}$ in the experiments?\n* Line 21 cites Piantadosi (2014) for the claim that \"For example, Zipf’s law can be used to distinguish between human and model distributions.\" I don't think this is a conclusion of Piantadosi (2014), however. Could you clarify where in the paper he reaches that conclusion? If this is about their comparison with \"random typing models\", those are qualitatively different from language models. When examining proper language models, Meister et al. (2021) reach the opposite conclusion (that language models follow a similar rank-frequency relationship to natural language).\n\nLarger Suggestions: \n* From the paper's text in section 2.2, I interpret that the discrete Fourier transform operates in a single sentence at a time, and thus the proposed metric was developed to compare the spectra of two sentences; not of two corpora. Figure 1, however, implies the Fourier transform takes as input all sentences in a dataset at once. Explaining section 2.2 in more detail could be helpful.\n* Although the authors do discuss this in their paper, I believe the word cross-entropy is not accurate to describe what is being measured here. The word surprisal is the correct one. The authors themselves note this in line 62, but decide to use the term \"cross-entropy\" anyway because it was used this way before, as in, e.g. Genzel and Charniak (2002). Personally, I do not believe this to be a good reason—it's not because prior work used the wrong terminology that you should propagate it.\n\nSmaller Suggestions:\n* Line 156 states that Mauve \"straightforwardly computes\" the similarity of the model- and human-text distributions. However, computing this divergence is actually intractable (starting from the fact that human-text distributions are unknown), and so this is not actually straightforward. They just approximate this using clusters of word embeddings. I’d rewrite this as “attempt to compute” or “estimate”.\n* Line 158 states that reference-based metrics are suited for close-ended generation settings, putting Mauve in that group. Mauve, however, was actually developed to analyse open-ended generation settings. \n* Figure 4 is too small. At the current scale this figure is unreadable.\n\nMeister et al. (2021). Language Model Evaluation Beyond Perplexity.\n\nLIMITATIONS:\nI believe the paper doesn't mention at any point which language their data is in (i.e., English) and that most of the cited psycholinguistics research is English-centric (or at least Indo-European-centric). Addressing that as a potential source of limitation is important.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-24"}

comments: SUMMARY:
This paper proposes a set of metrics to measure the distance between model-generated and human-written languages. Specifically, this paper uses FFT to analyze the cross-entropy sequences of the language data.

STRENGTHS:
1. This new metric is efficient. Given the fact that our models are getting exponentially bigger, it is essential that we do not waste energy during evaluation.
2. This new metric correlates well with human judgment, and is statistically sound.

I personally really like the authors' attempt to interpret the metric. Understanding the why is sometimes much more important than understanding the how.

WEAKNESSES:
1. The related work on psycholinguistic motivation is limited. Entropy is also a popular metric in computational linguistics, which is probably worth citing.
2. The model size categorization seems to be very coarse.

QUESTIONS:
1. Could the authors be more specific about their motivations for using spectral similarity as a metric?

LIMITATIONS:
This paper is a good step towards addressing some of the problems brought by generative AI.
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2023-07-25