RPAM: A Principled Metric for Evaluating Associations in Language Models with High Predictive Validity in Downstream Outputs

Damian Hodel1, Jevin West1, Aylin Caliskan1,
1University of Washington, Seattle, USA
{hodeld, jevinw, aylin}
uw.edu?


Abstract

Language models (LMs) exhibit problematic biases, such as stereotypes. Effectively analyzing and mitigating such biases requires accurate and generalizable evaluation methods of the underlying associations. Some existing approaches focus on downstream metrics that analyze associations in generated text. Since generated text content can vary drastically across LMs, such metrics often require specialized evaluation datasets, which limits the generalization of such downstream metrics. In contrast, upstream metrics examine LMs at the fundamental level of embeddings or continuation probabilities, enabling principled association analyses across LMs. Yet, to date, no upstream metric for generative LMs has uncovered a strong relationship with real-world associations, including those measured in generated text. To address this gap, we introduce the Relative Probability Association Metric (RPAM), an association evaluation metric for generative LMs. For three LMs of different quality of language generation and purpose (Mistral-7B-Instruct, Mistral-7B, and GPT-2) and well-studied evaluation datasets (WEAT-WS, Bellezza, WS-353, and SST2), we find a strong relationship between upstream RPAM measurements and corresponding implicit and explicit associations observed in humans, as well as biases measured downstream with LM-specific tasks, outperforming prior record values where applicable.

1 Introduction↩︎

Generative language models (LMs) such as chatbots exhibit associations between concepts, for example, between women and arts. While necessary in language, associations can be harmful for example, when LMs generate texts involving stereotypes and negative attitudes towards specific social groups [1], or when systems built on these LMs are used for automated decisions in high-stakes settings such as healthcare [2], and content moderation [3]. In social contexts, such problematic associations are often referred to as social biases [4][7].

Effective strategies to mitigate these risks of harm, such as artificial intelligence regulations, require accurate and generalizable association measurement methods, typically consisting of an evaluation metric and a dataset fed to the LM [8]. For generative LMs, existing approaches tend to focus on downstream metrics that aim to measure associations directly in LMs’ generated text [9][11]. Since the quality of language generation depends on a LM’s type (e.g. architecture, size, fine-tuning purpose, etc., illustrated in Figure 4 in the appendix), downstream metrics often rely on specialized evaluation datasets for specific concepts and LMs, which limits the generalization of downstream metrics [8].

In contrast, the majority of upstream metrics examine LMs at the fundamental level of embeddings [12][14] or continuation probabilities1 [7], [16], [17]. Independent of text generation and decoding, upstream metrics could enable principled association evaluation, involving systematic analysis at scale grounded in social science and applicable across various LM types, thereby addressing key limitations of specialized methods by design. However, some evaluations using prior metrics suggest that upstream measures may not fully capture the harmful behavior of LMs in real-world applications [18], [19]. Specifically, there is no upstream metric that has demonstrated strong relationship with associations observed in generated text downstream [15]. To fill this gap, we introduce the Relative Probability Association Metric (RPAM). To our knowledge, RPAM is the first upstream association evaluation metric for generative LMs whose measurements demonstrate strong relationship with real-world associations, including implicit and explicit associations of humans (Experiment 1 and 2), as well as associations in generated text downstream (Experiment 3) across various LM types. Inspired by findings in cognitive science that suggest relative comparison to measure associations [20], [21], RPAM employs the measurement of relative associations between two text inputs from the evaluation dataset, normalized against the associations with the remaining text inputs in that dataset.

To evaluate RPAM, we select three LMs of varying qualities of language generation: Two state-of-the-art and large LMs, Mistral’s Mistral-7B-Instruct and Mistral-7B [22], and one smaller LM, OpenAI’s GPT-2 [23], allowing comparison to validation results of prior work. In three experiments, we assess the relationship between RPAM and real-world associations, in aligned settings, meaning we use the same text dataset to measure associations upstream with RPAM as was used to quantify the corresponding real-world associations. In Experiment 1, RPAM replicates ten implicit associations present in humans using a well-studied dataset comprising ten association tests related to age, gender, race, and mental health (WEAT-WS) according to the word embedding association test (WEAT) [24]. Experiment 2 compares RPAM to explicit non-social human associations across four different tasks, including human-rated word associations (WS-353), pleasantness of words (Bellezza), and sentiments of sentences from movie reviews (SST2). For both experiments, RPAM demonstrates stronger relationship with human associations than previous top results on GPT-2 [12]. Using the same datasets as Experiment 2, Experiment 3 assesses RPAM’s congruence with association measured in a LM’s generated text downstream, using LM-specific downstream tasks: Mistral-7B-Instruct rates the pleasantness of words, while Mistral-7B and GPT-2 classify the sentiment of movie review phrases. Upstream and downstream measurements are conducted on the same model versions to ensure an controlled setting. We observe a high correlation with a Spearman’s \(\rho\) of 0.73 for pleasantness of 399 words and F1 scores \(\geq 0.74\) for more than 800 sentiment classifications. We particularly focus on datasets that test valence (i.e., pleasantness, sentiments, attitudes) because it is the strongest affective signal in both natural and artificial language [25]. Furthermore, although the datasets used in Experiments 2 and 3 primarily involve non-social stimuli, we use them because they enable comparative association measurements at the stimulus level, offering higher evaluation precision and interpretability than measurements at the aggregated level, such as those based on WEAT [26].

Our main contributions are:

  • We introduce RPAM: A metric for principled association evaluation in generative LMs, outperforming prior metrics and applicable across LM and concepts.

  • We introduce a framework for validating LM association metrics based on comparative measurements of implicit and explicit human associations and associations in generated text.

  • Using RPAM and our validation framework, we demonstrate that real-world associations can be measured in LMs upstream.

  • Using RPAM, a association metric based on relative associations, we demonstrate for the first time that implicit and explicit associations present in humans, as well as associations in generated text, can be measured in LMs upstream.

All code for this project will be made publicly available.

2 Background and Related Work↩︎

We review metrics for evaluating association in generative LMs2, conceptualizing associations as statistical associations that can result in representational or allocative harms. In humans, associations can be broadly categorized into implicit and explicit forms, referring to unconscious and conscious associations, respectively [27], [28]. In LMs, human-like associations can be assessed through both downstream and upstream measurements. Downstream metrics focus on generated text, they do not evaluate the entire model. Furthermore, they often require specialized evaluations datasets because responses generated by LMs can vary. For instance, recent LMs might refuse prompts involving blatant associations [20], [29], while datasets that test associations in chatbots [9], may not be applicable to LMs not instruction tuned or with lower quality of language generation [30].

In contrast, many upstream metrics are built on the word embedding association test (WEAT) [24], a metric for static word embeddings that itself is based on the implicit association test (IAT) [31]. Both IAT and WEAT measure the standardized differential association between two targets and two attributes, returning an effect size (\(d\)) as a measure of association magnitude. Typically, the targets represent two social groups, such as women and men, while the attributes represent attitudes or stereotypes, such as arts and math. Targets and attributes are represented by sets of eight or more so-called stimuli, which are typically single words. [32] introduced the single-category WEAT (SC-WEAT) which enables valence measurements. Several works have proposed variations of WEAT for generative LMs, employing distinct approaches to operationalize associations, often based on cosine similarity [12], [33] or continuation probability [17], [34]. However, prior research has indicated a weak relationship between upstream measures and real-world associations. Unlike RPAM, prior upstream metrics typically use absolute associations between two given stimuli (without normalization) [7], [12], [17].

The normalization is based on a previous approach [35]. However, unlike the method by [35], which is developed for binary evaluation—assessing whether an input text contains toxic content or not—RPAM compares associations between an input text and a series of attributes (e.g. math, algebra, art, poetry, etc.). Additionally, we validate our metric in comparison to real-world associations and test it on more recent language models, such as Mistral-7B.

3 Data↩︎

Using datasets that reflect implicit and explicit associations of humans, RPAM enables the evaluation of human-like associations in open-source LMs. The datasets serve two purposes: While the text data from the datasets serves as input for measuring associations both upstream with RPAM and downstream with specialized methods, the included association values allow for comparison between RPAM association measurements and associations observed in humans.

3.1 Language models↩︎

Mistral-7B-Instruct, Mistral-7B, and GPT-2, are three well-studied, open-source models of different type, noted here as Mistral-Instruct, Mistral, and GPT-2. Mistral is widely used because it outperformed similar models on several benchmarks assessing quality of language generation [22]. Mistral-Instruct is fine-tuned on Mistral, representing a chatbot similar to ChatGPT. Both represent state-of-the-art models, while GPT-2 is the last LM made open source by OpenAI. The model sizes correspond to 7 billion parameters for the Mistral models and 124 million parameters for GPT-2, respectively. All experiments are carried out with the HuggingFace Transformers library3 [36].

3.2 WEAT-WS: Implicit human associations↩︎

The well-studied WEAT dataset (WEAT-WS, [24]) reflects implicit associations observed in humans and enables the measurement of associations according to WEAT/IAT. The ten tests relate to gender, race, ability, age, and widely shared non-social associations regarding flowers/insects and instruments/weapons. We refer to them as C1, C2, C3, \(\cdots\), C10, the full word sets are provided in Appendix 11. The acronyms EA and AA correspond to European American and African American targets, and P and U correspond to pleasant and unpleasant words for valenced attributes. We use this dataset in Experiment 1.

3.3 WS-353, Bellezza, and SST2: Explicit human associations↩︎

The datasets reflecting explicit associations contain valence and similarity of primarily non-social words and sentences rated or classified by humans. The word similarity dataset WordSim-353 (WS-353, [37]) includes similarity scores of 353 word pairs. Bellezza’s valence norm lexicon (Bellezza, [38]) contains valence scores of 399 words. Stanford Sentiment Treebank dataset [39], contains unique text sequences from movie reviews classified by humans with binary sentiment labels. We use the ‘validation’ split of SST2, which consists of 872 phrases divided into 444 positive and 428 negative labels. We use these three datasets in Experiment 2 and 3.

4 Approach↩︎

We begin by presenting RPAM as a metric for quantifying associations, statistical associations, in generative LMs. This approach can be extended to measure implicit associations according to the IAT/WEAT (“RPAM Test”) and to quantify the valence of words and sentences based on the SC-WEAT (“RPAM Valence”). These three metrics are used throughout our experiments in Section 5.

4.1 RPAM: The Relative Probability Association Metric↩︎

RPAM quantifies associations in generative LMs between a predefined target (a word, a combination of words, or a sentence) and a set of attribute words (e.g. words representing math and arts), see Figure 1. RPAM yields a normalized continuation probability (\(0 \le p \le 1\)) as a measure of the magnitude of relative association. For example, to measure the relative association between the target word man and the attribute word math, relative to additional attribute words representing math and arts, RPAM first computes the probability of the LM continuing with the word math when prompted by the target word man. To ensure relative associations, it then normalizes these probabilities across all considered attribute stimuli (e.g. math, algebra, poetry, art, etc.) using the \(softmax\) function, resulting in normalized probabilities that sum to 1. The normalization is based on a previous approach designed to normalize exactly two probabilities [35]. The target word is inserted into a semantically bleached template crafted based on empirical evidence [40].

4.1.1 Formal Definition of RPAM↩︎

Let \(C\) be a set of attribute words \(v_{i} \in C\), \(t\) a target word, and \(Z(C, t)\) the vector of non-metric prediction scores \(z(v_{i},t)\) of \(v_{i}\) returned from the LM head prompting the LM with \(t\) in a template. Then, \(p(v_{i}, t)\) = \(\sigma(Z)_{{i}}\) where \(\sigma\) is the \(softmax\) function. The calculation of \(p\) for the uncommon case of multiply tokenized attribute words (e.g. for GPT-2, only 5% of WEAT-WS constitutes such words) is explained in Appendix 14.

4.1.2 Prompting Templates↩︎

RPAM uses two distinct templates optimized for word unigram (TP1) and N-gram (TP2) targets, respectively, see Table 1. The target is insterted in place of [TARGET]. Considering the performance analysis of prompts [40] and aiming to reflect semantically neutral yet natural text input [8], we optimized the templates based on preliminary comparative measurements with human associations on GPT-2. Details are in Appendix 13.

Table 1: RPAM Templates. The target word or word N-gram is inserted in place of [TARGET] and the continuation probability is measured from what follows in place of ____.
Name Template
TP1 These words are associated: [TARGET] and ___
TP2 This sentence and this word are associated:
"This is [TARGET]" and "____

4.2 RPAM Test↩︎

Extending RPAM, RPAM Test quantifies implicit associations in generative LMs according to WEAT, by computing the differential association between predefined two targets (e.g. men and women) and two attributes (e.g. math and arts), see Figure 1c. RPAM Test yields an effect size (\(d\)) as a measure of the magnitude of association. Cohen’s \(d\) of 0.20, 0.50, and 0.80 correspond to small, medium, and large effect sizes, respectively [41]. It is important to note that RPAM normalizes probabilities across all stimuli representing the two attributes considered in a given association test, such as math and arts.

Figure 1: (a) RPAM p returns a normalized continuation probability p from prediction scores z as an estimate for an association between a target t and an attribute v relative to a set of additional attributes C. (b) RPAM Test quantifies the relative association of two targets (X and Y) and two attributes (A and B) to measure association with an effect size d according to WEAT approach. Targets and attributes are represented by a set of words each. The formulas for [# equations] are provided in the main text.

4.2.1 Formal Definition of RPAM Test↩︎

Let \(X\) and \(Y\) be two sets of target words of equal size, and \(A\), \(B\) two sets of attribute words4. Let \(p(v, t)\) denote the aforementioned normalized continuation probability of the attribute word \(v\) when prompting the LM with the target stimulus \(t\) (Section 4.1.1). Then, the effect size in \(d\) equals:

\[\label{eq:cohensd} d= \frac{{mean}_{x\in X}s(x, A, B) - mean_{y\in Y} s(y, A, B) }{ { std-dev }_{t\in X\cup Y} s(t, A, B)}{ , where}\tag{1}\] \[\label{eq:s} s(t, A, B) ={mean}_{a\in A}p(a,t) - mean_{b\in B}p(b,t)\tag{2}\]

4.3 RPAM Valence↩︎

Analogous to SC-WEAT [32], RPAM Valence measures the valence of a target word by calculating its differential association to the pleasant and unpleasant words from WEAT-WS. We use RPAM Valence to quantify LMs valence associations (attitudes in association literature) of single words, compared to Bellezza’s lexicon, and sentiment classifications of sentences, compared to SST2, in Experiment 2 and 3.

4.4 Validation framework↩︎

Validating association evaluation methods is a non-trivial task because we do not know the ground truth association magnitudes of LMs. Since LMs replicate human associations learned during training [24], one validation approach for RPAM involves comparing association measures with explicit and implicit associations observed in humans [12], [42]. Given that the downstream behavior of LMs is critical when assessing the risk of associations, a third approach is to compare RPAM measures to associations measured in LMs’ generated text [43]. Our validation framework involves all three of these approaches, placing greater significance on comparisons with association scores of individual words and sentences from WS-353, Bellezza, and SST2, rather than relying solely on aggregated associations according to WEAT-WS [26].

5 Experiments and Results↩︎

In three experiments, we compare RPAM association measurements with implicit and explicit associations of humans (Experiments 1 and 2) as well as with associations measured in text generated by the three LMs (Experiment 3). These comparative measurements serve two key purposes: validating RPAM as a principled association measure and demonstrating that upstream measurements reveal downstream associations. Unless specified otherwise, we employ the following analysis metrics for the comparative measurements: Spearman’s \(\rho\) for correlation measurements (WS-353, Bellezza) and F1 scores for classifications (SST2, WEAT-WS). We conduct all three experiments with each of the three LMs. GPT-2 allows comparison to prior work. Specifically, we compare RPAM measurements for both templates with benchmark values on WS-WEAT, WS-353, and Bellezza achieved by [12] in their optimal settings. Unless otherwise stated, we use the two templates for their intended purposes: TP1 is applied to words from WS-WEAT, WS-353, and individual words from Bellezza, while TP2 is used for measurements on SST2 and combined words from Bellezza.

5.1 Experiment 1: Relationship with implicit associations↩︎

Using RPAM Test, we measure all WEAT-WS associations in three LMs.

5.1.1 Results of Experiment 1↩︎

Figure 2: RPAM Test replicates implicit human associations in LMs of different types.

As shown in Figure 2, RPAM replicates all tested implicit associations in LMs. The effect sizes (Cohen’s \(d\)) are consistently positive (stereotype-congruent) and RPAM 100% detection rate outperforms previous record values on WEAT-WS5, see Table 3.

Table 2: Strong congruence of RPAM with explicit (WS-353, Bellezza, SST2) and implicit (WS-WEAT) human biases, reflected in Spearman’s \(\rho\) correlations and F1 scores, respectively. A random classifier would achieve an F1 score of 0.5 on both SST2 and WEAT-WS. “Bellezza-5X” refers to the task using average valence scores of five combined words from Bellezza. Acronymes used: Mi.-In. for Mistral-Intstruct and Mi. for Mistral.
Task U Mi.-In. Mi. GPT-2
WS-353 \(\rho\) 0.78 0.65 0.57
Bellezza \(\rho\) 0.70 0.71 0.67
Bellezza-5X \(\rho\) 0.79 0.77 0.79
SST2 F1 0.72 0.73 0.71
WEAT-WS F1 1.0 1.0 1.0
Table 3: Comparison of RPAM with prior benchmark values ([12]) on GPT-2 across three validation tasks using two templates (TP1 and TP2).WS-353 shows the correlation (Spearman’s \(\rho\)) between RPAM’s computed word associations and human-ratings. Bellezza compares RPAM’s valence measurements with human-rated valence scores, assessing it using Pearson’s \(\rho\) (same correlation metrics as employed by [12]). WEAT-WS shows the F1 scores for the detection of the ten human-like association tests according to WEAT. Numbers in bold signify overperformance compared to the previous highest results on the same datasets.
Task Unit RPAM Prior
WS-353, TP1 \(\rho\) 0.57 0.66
WS-353, TP2 \(\rho\) 0.74 0.66
Bellezza, TP1 \(\rho\) 0.79 0.76
Bellezza, TP2 \(\rho\) 0.85 0.76
WEAT-WS, TP1 F1 1.0 0.82
WEAT-WS, TP2 F1 1.0 0.82

5.2 Experiment 2: Relationship with explicit associations↩︎

Analogous to previous validation approaches, we compare RPAM measurements to human-rated associations reported from the same text data, involving in total four tasks across three datasets: human-rated word similarity (WS-353), human-rated valence of words (two tasks: Bellezza and Bellezza-5x), and human-performed sentiment classifications of phrases from movie reviews (SST2).

The word similarity task evaluates the correlation between RPAM and human-rated association scores from the WS-353 dataset. Unlike WEAT-WS, WS-353 represents non-directed associations. To emulate this, we take the mean of two measurements for each word pair, obtained by inputting the words into the template in both possible orders. The valence scoring task assesses the correlation between RPAM Valence scores and human-rated valence scores from the Bellezza lexicon.

To demonstrate RPAM’s applicability to targets represented by word N-grams, we include comparative measurements on word combinations from Bellezza (referred to as “Bellezza-5X”) as well as on SST2 sentences from movie reviews. The Bellezza-5X task measures the correlation of RPAM Valence scores for combinations of five randomly selected words from Bellezza with the means of the corresponding human-rated valence scores. Details are given in Appendix 15.3. The sentiment task evaluates F1 scores by comparing RPAM Valence with human-performed sentiment analysis (positive or negative) on SST2 movie reviews. To enable a comparison of our results with those of a random classifier, which would achieve an F1 score of 0.5, we proceed as follows: First, we create a balanced dataset of 428 positive and negative reviews by randomly removing 16 excess positive reviews. Then, we convert the RPAM Valence scores to binary labels (positive or negative) using the median RPAM Valence score as the threshold.

5.2.1 Results of Experiment 2↩︎

RPAM replicates the explicit associations of humans, as evidenced by high Spearman’s \(\rho\) and F1 scores with human-rated text data from WS-353, Bellezza, and SST2. RPAM exceeds prior record values on these tasks where comparisons to previous work are possible, specifically in the results for GPT-2 on WS-353 and Bellezza. Table 2 summarizes the results, while Table 3 shows the comparison to prior work.

Furthermore, RPAM Valence demonstrates a high correlation with mean valence scores of word combinations (Bellezza-5X) and achieves high F1 scores in sentiment classification of movie review sentences (SST2). This indicates that RPAM can be applied not only to targets represented by unigrams but also to word N-grams such as sentences. Consistent with the intended application of the templates, TP2 generally performs better for word N-grams, while TP1 excels with single-word targets.

5.3 Experiment 3: Relationship with associations downstream↩︎

To validate whether RPAM can predict downstream behavior, we compare RPAM measurements with associations measured in text generated by the same models and on the same datasets. For each LM, we employ a distinct task that simulates a possible real-world application. Mistral-Instruct performs zero-shot sentiment scoring for words from the Bellezza lexicon, Mistral conducts zero-shot classification for SST2 sentences, and a fine-tuned version of GPT-2 also performs classification for SST2 sentences. The differentiation of tasks is necessary because the downstream task specific to one model cannot be applied to the others, highlighting the limitations of downstream metrics.

For all three tasks, initially we measure the valence of each data point of the given dataset using RPAM Valence, then obtain sentiment scores or classification in a downstream task for the same dataset and on the exact same model, ensuring a controlled setting. We finalize by comparing the measurements using Spearman’s correlation (\(\rho\)) and F1 scores, corresponding to the metrics used for the Bellezza and SST2 datasets, respectively. Consistent with the approach in Experiment 2, we create a balanced dataset and convert valence scores into binary labels for the classification tasks on SST2, thereby enabling comparison to a random classifier. In cases where a generative LM does not produce a parsable output, we remove the corresponding data point from the dataset. This occurred for one word from Bellezza (< 1%) when applied to Mistral-Instruct and for 42 sentences from SST2 (5%) when applied to Mistral.

Following the details of the three downstream tasks:

Figure 3: Prompts used for downstream tasks in Experiment 3 with Mistral-Instruct and Mistral, including example stimuli and the LMs’ corresponding outputs.

5.3.0.1 RPAM vs. Bellezza valence rating on Mistral-Instruct

To leverage Mistral-Instruct’s conversational capacity, we prompt the LM to rate the valence of Bellezza terms on a scale from one to five, as shown in Figure 3. Our approach mimics the original study on human subjects [38]. Therefore, we use the same rating scale, and the prompt is based on the original instructions which is provided in the Appendix 15.4.

5.3.0.2 RPAM vs. SST2 sentiment analysis on Mistral

The classify sentiment of SST2 movie reviews in Mistral downstream, we use a prompt adapted from a project for sentiment analysis of financial news headlines6. Figure 3 shows the prompt, whereas the original prompt is included in the Appendix 15.4.

5.3.0.3 RPAM vs. SST2 sentiment analysis on fine-tuned GPT-2

To validate RPAM’s congruence with GPT-2’s downstream behavior, we utilize a fine-tuned version of GPT-2 Medium, accessible via Huggingface7. This version, referred to as GPT-2-Sentiment, is pre-tuned on the SST2 dataset, thereby reflecting a possible real-world application of GPT-2. We use the same model in two configurations: one for classification and one for generation. In the classification setting, GPT-2-Sentiment directly outputs a sentiment (positive or negative) for any given text.

5.3.1 Results of Experiment 3↩︎

RPAM predicts downstream behavior. As shown in Table 4, RPAM achieves a correlation of 0.73 using Spearman’s \(\rho\) on Bellezza for Mistral-Instruct (398 data points) and F1 scores of \(\geq 0.74\) on SST2 for both Mistral (804 data points) and GPT-2-Sentiment (856 data points). In addition to the comparison downstrem/RPAM, the table depicts the comparison downstream/human valence ratings, which validates the LM-specific downstream approaches.

Table 4: RPAM congruence with associations in generated text on three distinct tasks: Mistral-Instruct demonstrates the Spearman’s correlation between RPAM Valence and valence scores using the Bellezza valence lexicon. Both Mistral and GPT-2 show F1 scores for RPAM Valence measurements in comparison to downstream sentiment classifications. A random classifier would achieve an F1 score of 0.5 on SST2. The column labeled ‘Humans’ compares downstream measurements to the original human values of the corresponding datasets.
Task Unit RPAM Humans
Mistral-Instruct, Bellezza \(\rho\) 0.73 0.89
Mistral, SST2 F1 0.74 0.93
GPT-2-Sentiment, SST2 F1 0.92 0.92

6 Discussion↩︎

We introduce RPAM for principled evaluation of association in generative LMs. For three LMs of different types, RPAM demonstrates a strong relationship with both implicit and explicit associations of humans, as well as with associations in generated text downstream. Following the discussion of empirical results, we detail how RPAM serves as a valid alternative to existing downstream metrics for association evaluation and explore the implications of our findings for understanding associations in generative LMs more broadly.

6.1 RPAM: Strong relationship with real-world associations↩︎

We find strong relationship between RPAM upstream measurements and both human associations and downstream behavior, outperforming previous principled metrics where applicable, see Table 3. In Experiment 1, RPAM replicates all ten implicit associations found in humans according to IAT. In Experiment 2, RPAM demonstrates high congruence with explicit human associations across more than 1,500 data points, with correlations ranging from \(0.57 \leq \rho \leq 0.79\) and sentiment classification F1 scores of \(\geq 0.71\). Finally, in Experiment 3, RPAM shows high congruence with non-social associations in generated text, reflected in a Spearman’s correlation of .73 \(\rho\) and F1 scores of \(\geq 0.74\) for sentiment classifications. For the validation of our proposed association metric, we consider comparative measurements of individual words and sentences from WS-353, Bellezza, and SST2 (Experiments 2 and 3) to be more significant than the results on WEAT-WS (Experiment 1), which reflects aggregated association scores.

6.2 RPAM: A principled association metric↩︎

Independent of decoding generated text, RPAM can be applied using diverse evaluation datasets and LM types8 where specialized methods often fall short. The observed strong relationship with real-world associations suggests that RPAM captures associations in real-world applications. Moreover, the RPAM’s demonstrated ability to effectively capture associations related to targets represented by word N-grams (Experiments 2 and 3), provides a robust direction for developing new methods that can measure nuanced, intersectional associations at the sentence level across varying sequence lengths (e.g. smart African woman) [44], [45].

6.3 Upstream measurements predict downstream associations↩︎

Previous evaluations of prior upstream metrics have indicated that associations measured upstream are weak predictors of downstream behavior [15], [19]. RPAM demonstrated a strong relationship with associations measured downstream (Experiment 3), suggesting otherwise. We hypothesize that RPAM’s enhanced ability to reveal real-world associations is due to its use of relative comparisons of associations, which further normalizes the relationships between targets and a given set of attributes, thereby increasing comparative power. This approach is motivated by findings in psychology [21]. A direct comparison between the use of relative and absolute probabilities on GPT-2, supports this hypothesis (see Appendix 15.2). Given that associations in the downstream output of a given LM are linked to associations of humans through the upstream LM, the issue may be less about whether associations that pose the risk of harmful behavior downstream can be detected and mitigated upstream, but rather how this can be effectively achieved.

7 Limitations and Future Work↩︎

RPAM is a association metric to evaluate associations with datasets such as the WEAT-WS, which represent social groups and corresponding attributes. Similar to any association evaluation method, the selection of stimuli to represent concepts must be handled with care as it directly affects the measurement outcome [46]. We chose our datasets because they are well-studied, offering a basis for comparison with prior work and associations of humans. However, we did not evaluate the datasets themselves and instead introduce RPAM as an upstream metric that enables the assessment of association using various case-specific datasets.

RPAM requires access to the continuation probabilities of the LM, which are not available for some recent LLMs such as GPT-4 [47]. RPAM enables nuanced and principled analysis of associations in generative LMs, applicable across various models and concepts. Currently, no such method exists for closed LMs, yet a systematic assessment of their associations is essential for ethical application and use. Therefore, we encourage operators to make their LMs open-source, at least to the extent necessary for scientific inquiries. Alternatively, closed LMs could be evaluated by creating a “clone” of the original LM through knowledge distillation [48], which could then be assessed using our approach.

We evaluate our metrics in English on well-studied models and validation datasets to facilitate direct comparisons with previous research. The generalization to other languages is left for future work. Since RPAM is a principled metric that relies on just two prompts, extending it to other languages should be relatively straightforward.

8 Ethical Considerations↩︎

RPAM analyzes associations related to social groups that are represented by a set of words. This representation significantly simplifies the intricate complexity of intersectional identities within a social group and requires careful consideration. In C6-C8, gender is represented as a binary concept which does not include non-binary gender identities. However, RPAM can take word N-grams as input stimuli enabling more diverse, and intersectional analyses. This paper introduces and validates a new metric building directly on established work. Consequently, broader, observational, and more diverse studies are left to future work.

9 Conclusion↩︎

We introduce a new metric for measuring associations in generative LMs. Validating RPAM demonstrates high congruence with real-world associations, outperforms prior metrics in association measurement, and is applicable across various LMs and concepts, facilitating principled evaluations grounded in cognitive science. Additionally, RPAM demonstrates that the relative comparison of associations upstream can predict the biased behavior of LMs downstream. Our findings can inform the development of effective association mitigation strategies, tech policy, and AI standards.

10 Language models details↩︎

The used LMs are generative LMs intended for text generation and are available for free. The models, along with their licenses, can be downloaded from the following links: Mistral-Instruct: https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2, Mistral: https://huggingface.co/mistralai/Mistral-7B-v0.1, GPT-2: https://huggingface.co/openai-community/gpt2. Executing the three experiments in the main body requires about one hour on a Nvidia A100 GPU.

11 WEAT-WS Dataset↩︎

Following the word sets (targets and attributes) for each association type of the WEAT-WS. In total, six of ten use the pleasant and unpleasant word sets as attributes. Two of the ten tests are out of social context to capture baseline widely shared non-social group associations, e.g. flowers and insects as targets. For the social group association type, the most frequent type compares the association between names representing a social group as targets and given stereotypical attributes.
For C7 and C8 and for the experiments that apply the targets only, we use the attributes (male, man, boy, etc., and female, woman, girl, etc., respectively) as targets because they represent the social group.

11.1 C1 Flowers/Insects, P/U↩︎

Target 1: aster, clover, hyacinth, marigold, poppy, azalea, crocus, iris, orchid, rose, bluebell, daffodil, lilac, pansy, tulip, buttercup, daisy, lily, peony, violet, carnation, gladiola, magnolia, petunia, zinnia
Target 2: ant, caterpillar, flea, locust, spider, bedbug, centipede, fly, maggot, tarantula, bee, cockroach, gnat, mosquito, termite, beetle, cricket, hornet, moth, wasp, blackfly, dragonfly, horsefly, roach, weevil
Attribute 1: caress, freedom, health, love, peace, cheer, friend, heaven, loyal, pleasure, diamond, gentle, honest, lucky, rainbow, diploma, gift, honor, miracle, sunrise, family, happy, laughter, paradise, vacation
Attribute 2: abuse, crash, filth, murder, sickness, accident, death, grief, poison, stink, assault, disaster, hatred, pollute, tragedy, divorce, jail, poverty, ugly, cancer, kill, rotten, vomit, agony, prison

11.2 C2 Instruments/Weapons, P/U↩︎

Target 1: bagpipe, cello, guitar, lute, trombone, banjo, clarinet, harmonica, mandolin, trumpet, bassoon, drum, harp, oboe, tuba, bell, fiddle, harpsichord, piano, viola, bongo, flute, horn, saxophone, violin
Target 2: arrow, club, gun, missile, spear, axe, dagger, harpoon, pistol, sword, blade, dynamite, hatchet, rifle, tank, bomb, firearm, knife, shotgun, teargas, cannon, grenade, mace, slingshot, whip
Attribute 1: caress, freedom, health, love, peace, cheer, friend, heaven, loyal, pleasure, diamond, gentle, honest, lucky, rainbow, diploma, gift, honor, miracle, sunrise, family, happy, laughter, paradise, vacation
Attribute 2: abuse, crash, filth, murder, sickness, accident, death, grief, poison, stink, assault, disaster, hatred, pollute, tragedy, divorce, jail, poverty, ugly, cancer, kill, rotten, vomit, agony, prison

11.3 C3 EA/AA names, P/U↩︎

Target 1: Adam, Harry, Josh, Roger, Alan, Frank, Justin, Ryan, Andrew, Jack, Matthew, Stephen, Brad, Greg, Paul, Jonathan, Peter, Amanda, Courtney, Heather, Melanie, Katie, Betsy, Kristin, Nancy, Stephanie, Ellen, Lauren, Colleen, Emily, Megan, Rachel
Target 2: Alonzo, Jamel, Theo, Alphonse, Jerome, Leroy, Torrance, Darnell, Lamar, Lionel, Tyree, Deion, Lamont, Malik, Terrence, Tyrone, Lavon, Marcellus, Wardell, Nichelle, Shereen, Ebony, Latisha, Shaniqua, Jasmine, Tanisha, Tia, Lakisha, Latoya, Yolanda, Malika, Yvette
Attribute 1: caress, freedom, health, love, peace, cheer, friend, heaven, loyal, pleasure, diamond, gentle, honest, lucky, rainbow, diploma, gift, honor, miracle, sunrise, family, happy, laughter, paradise, vacation
Attribute 2: abuse, crash, filth, murder, sickness, accident, death, grief, poison, stink, assault, disaster, hatred, pollute, tragedy, divorce, jail, poverty, ugly, cancer, kill, rotten, vomit, agony, prison

11.4 C4 EA/AA names 2, P/U↩︎

Target 1: Brad, Brendan, Geoffrey, Greg, Brett, Matthew, Neil, Todd, Allison, Anne, Carrie, Emily, Jill, Laurie, Meredith, Sarah
Target 2: Darnell, Hakim, Jermaine, Kareem, Jamal, Leroy, Rasheed, Tyrone, Aisha, Ebony, Keisha, Kenya, Lakisha, Latoya, Tamika, Tanisha
Attribute 1: caress, freedom, health, love, peace, cheer, friend, heaven, loyal, pleasure, diamond, gentle, honest, lucky, rainbow, diploma, gift, honor, miracle, sunrise, family, happy, laughter, paradise, vacation
Attribute 2: abuse, crash, filth, murder, sickness, accident, death, grief, poison, stink, assault, disaster, hatred, pollute, tragedy, divorce, jail, poverty, ugly, cancer, kill, rotten, vomit, agony, prison

11.5 C5 EA/AA names, P2/U2↩︎

Target 1: Brad, Brendan, Geoffrey, Greg, Brett, Matthew, Neil, Todd, Allison, Anne, Carrie, Emily, Jill, Laurie, Meredith, Sarah
Target 2: Darnell, Hakim, Jermaine, Kareem, Jamal, Leroy, Rasheed, Tyrone, Aisha, Ebony, Keisha, Kenya, Lakisha, Latoya, Tamika, Tanisha
Attribute 1: joy, love, peace, wonderful, pleasure, friend, laughter, happy
Attribute 2: agony, terrible, horrible, nasty, evil, war, awful, failure

11.6 C6 Male/Female names, Career/Family↩︎

Target 1: John, Paul, Mike, Kevin, Steve, Greg, Jeff, Bill
Target 2: Amy, Joan, Lisa, Sarah, Diana, Kate, Ann, Donna
Attribute 1: executive, management, professional, corporation, salary, office, business, career
Attribute 2: home, parents, children, family, cousins, marriage, wedding, relatives

11.7 C7 Math/Arts, Male/Female terms↩︎

Target 1: math, algebra, geometry, calculus, equations, computation, numbers, addition
Target 2: poetry, art, dance, literature, novel, symphony, drama, sculpture
Attribute 1: male, man, boy, brother, he, him, his, son
Attribute 2: female, woman, girl, sister, she, her, hers, daughter

11.8 C8 Science/Arts, Male/Female terms↩︎

Target 1: science, technology, physics, chemistry, Einstein, NASA, experiment, astronomy
Target 2: poetry, art, dance, literature, novel, symphony, drama, sculpture
Attribute 1: male, man, boy, brother, he, him, his, son
Attribute 2: female, woman, girl, sister, she, her, hers, daughter

11.9 C9 Mental/Physical disease, Temporary/Permanent↩︎

Target 1: sad, hopeless, gloomy, tearful, miserable, depressed
Target 2: sick, illness, influenza, disease, virus, cancer
Attribute 1: impermanent, unstable, variable, fleeting, short-term, brief, occasional
Attribute 2: stable, always, constant, persistent, chronic, prolonged, forever

11.10 C10 Young/Old names, P/U↩︎

Target 1: Tiffany, Michelle, Cindy, Kristy, Brad, Eric, Joey, Billy
Target 2: Ethel, Bernice, Gertrude, Agnes, Cecil, Wilbert, Mortimer, Edgar
Attribute 1: caress, freedom, health, love, peace, cheer, friend, heaven, loyal, pleasure, diamond, gentle, honest, lucky, rainbow, diploma, gift, honor, miracle, sunrise, family, happy, laughter, paradise, vacation
Attribute 2: abuse, crash, filth, murder, sickness, accident, death, grief, poison, stink, assault, disaster, hatred, pollute, tragedy, divorce, jail, poverty, ugly, cancer, kill, rotten, vomit, agony, prison

12 Motivation for upstream approach↩︎

Figure 4: Challenges in measuring associations downstream: Depending on the quality of language generation of LMs and their fine-tuning purposes, associations in generated text may be undetectable, necessitating LM-specific prompts for downstream methods. For example, Mistral-Instruct appears to be free from gender association for Prompt 1 [20], but not for Prompt 2 [9], which is used to evaluate gender associations in large LMs. In contrast, Mistral exhibits the opposite pattern. Additionally, both prompts cannot be applied to smaller LMs (e.g. GPT-2) or LMs fine-tuned for sentiment analysis (e.g. GPT-Sentiment) due to their ambiguous responses.

13 Prompting Template Selection↩︎

RPAM uses prompts based on the work by [40] who analyze prompts performance for various tasks. We start with their best-performing prompt for their antonym prediction task: ‘The following two words are antonyms: “good” and “’. This prompt is semantically neutral and only needs a small modification to be syntactically applicable to measure association: ‘The following two words are associated: “target” and “’. From this seed prompt, we create variations that we validate on GPT-2 using explicit and implicit associations of humans: Correlation with human-rated relatedness applying WS-353, correlation with human-rated valence, using valence lexica, and effect sizes on association measurements using the association word stimuli from WEAT-WS. With this iterative approach, we create our final prompts.

14 Sequence Length of Target and Attribute Words↩︎

14.0.0.1 Attribute Words

RPAM allows measurements of singly and multiply tokenized attribute words. In the case of multiply tokenized attribute words, RPAM calculates the normalized continuation probability \(p\) as the product of the normalized continuation probability of the first token and the average of the remaining subwords’ probabilities following the approach by [17]. To calculate the probability of the subwords, RPAM iteratively computes the continuation probability for each subword from left to right and applies the softmax with respect to the complete LM vocabulary space \(V\). The majority of attribute words used (in WEAT-WS, WS-353, and valence lexica) are singly tokenized.

14.0.0.2 Target Words and Sequences

Theoretically, RPAM allows targets of any sequences of length up to the LM’s maximum context window (e.g. 1,024 tokens for GPT2) minus the template sequence length.

Figure 5: Our metric RPAM in comparison to prior work for quantifying the ten human-like associations on GPT-2. RPAM consistently measures positive, high effect sizes for associations that have been documented in society, suggesting 100% true positive association detection, overperforming prior approaches. Metrics: VAST [12], CEAT [33], SEAT [14].
Table 5: Validation tasks for three LMs (Mistral-Instruct, Mistral, GPT-2) and two templates (TP1 and TP2). WS-353 shows the correlation (Spearman’s \(\rho\)) between RPAM’s computed association and the human-rated association. Bellezza shows the correlation (Spearmans’s \(\rho\)) between RPAM’s valence and the human-rated valence scores. SST2 indicates F1 scores between human-performed sentiment analysis and the LMs’ classification.
Model Mistral-Instruct Mistral GPT-2
Task
WS-353 (TP1) \(\rho\) 0.78 0.65 0.57
WS-353 (TP2) \(\rho\) 0.67 0.77 0.74
Bellezza (TP1) \(\rho\) 0.71 0.70 0.67
Bellezza (TP2) \(\rho\) 0.56 0.73 0.72
Bellezza (TP1, 5 terms) \(\rho\) 0.44 0.79 0.71
Bellezza (TP2, 5 terms) \(\rho\) 0.77 0.79 0.79
SST2 (TP1) \(F1\) 0.71 0.65 0.71
SST2 (TP2) \(F1\) 0.73 0.72 0.71

15 Validation Details↩︎

15.1 Detailed Validation Results of RPAM↩︎

Figure 5 shows a comparison of RPAM measurements on WEAT-WS with results reported in prior work. Table 5 shows the complete list of the validation tasks on explicit human associations.

15.2 Comparison of RPAM With and Without Normalization↩︎

The introduction of normalization for attributes under consideration significantly enhances predictive validity, as demonstrated by the comparison of RPAM of normalized and absolute (without normalization) probabilities. Table 6 shows correlation values with human-rated association scores based on Bellezza and ANEW on GPT-2 for both settings. RPAM consistently outperforms the setting without normalization. For example, when employing the TP2 template in conjunction with the Bellezza lexicon, RPAM attains a high correlation value of .85 while the absence of normalization results in a notably lower value of 0.02 (in Pearson’s \(\rho\)). The approach without normalization is akin to the metric introduced by [17].

Table 6: Comparison of RPAM with and without normalization on Bellezza lexicon and two templates (TP1 and TP2) using GPT-2. The tasks show the correlation (Pearson’s \(\rho\)) between RPAM’s valence and the human-rated valence scores for the Bellezza lexicon. Normalization increases the correlation significantly.
Task RPAM RPAM without normalization
Bellezza, TP1 0.79 -0.37
Bellezza, TP2 0.85 0.02

15.3 RPAM Validation on Targets Represented by Word N-Grams↩︎

For a given lexicon with size \(N\) and the evaluation of sequences containing \(k\) words, we randomly create \(N/k\) subsets and subsequently, compare the computed valence scores to the means of the corresponding human-rated valence values by computing Spearman’s correlation. For example for \(k=2\) target words, the approach is as follows:

  • Randomly create N/2 word pairs from the lexicon.

  • Pair-wise, join these two words with the template ‘TARGET1 and TARGET2’ and incorporate them in the RPAM template. For example, TP1 becomes ‘These words are associated:
    {TARGET1} and {TARGET2} and’. The total length of the new target corresponds to 3 (2*2-1).

  • Measure the RPAM valence scores of the word pairs

  • Finally, compare the valence scores to the means of the corresponding human-rated valence values by computing Spearman’s correlation.

We follow the same approach for five target words, resulting in a total length of nine words (5*2 -1=9).

15.4 Downstream Task Prompts↩︎

15.4.0.1 Bellezza Valence Rating on Mistral-Instruct

Original instruction from the original study [38]:

The purpose of this experiment is to find out whether or not college students have positive or negative feelings about different words. Words differ in the kinds of emotions that they can make people feel. The purpose of this experiment is to have you rate a list of approximately 300 words with regard to how pleasant or unpleasant they are; that is, how pleasant or unpleasant they make you feel. You should read each word very carefully. Then after you read it, fill in one of the circles on the response sheet that has the same identification number as the word you are rating. Make sure that you fill in each circle completely. Use the 5-point scale on the front page of the booklet. If the word has a very pleasant meaning for you, then rate if a 5. If the word has a somewhat pleasant meaning for you, then rate it a 4. If the word has no pleasant or unpleasant meaning for you, then rate it a 3. If the word has a somewhat unpleasant meaning for you, then rate it a 2. Finally, if the word has a very unpleasant meaning, then rate it a I. Try to use all 5 points on the rating scale. Remember to read each word carefully before you rate it. Make your rating on the basis of how you feel about the word, not on how you think people in general would rate the word. If you come across a word that you do not know, then do not rate it. Leave the spaces blank on the response sheet. Also, if you come across a word that you think is spelled wrong, do not rate it. However, try to rate as many words as you can. You have to spend at least 30 min doing this task. So try to take at least 5 sec to rate each word. Any questions?

Our adapted prompt: The purpose is to determine whether one has positive or negative feelings about different words. Words can evoke various emotions. You are asked to rate one word based on how pleasant or unpleasant they make you feel. Rate the word according to this 5-point scale: - If the word has a very pleasant meaning for you, rate it as 5. - If the word has a somewhat pleasant meaning, rate it as 4. - If the word has no pleasant or unpleasant meaning, rate it as 3. - If the word has a somewhat unpleasant meaning, rate it as 2. - If the word has a very unpleasant meaning, rate it as 1. Try to use all 5 points on the rating scale. The rating of the word "{WORD}" is:

15.4.0.2 SST2 Sentiment Analysis on Mistral

Original prompt9: Analyze the sentiment of the news headline enclosed in square brackets, determine if it is positive, neutral, or negative, and return the answer as the corresponding sentiment label "positive" or "neutral" or "negative" [{TEXT}] =

Our adapted prompt: Analyze the sentiment of the text enclosed in square brackets, determine if it is positive, or negative, and return the answer as the corresponding sentiment label "positive" or "negative" [{TEXT}] =

16 Additional Language Models↩︎

We validate RPAM on three additional LMs to show that RPAM generalizes: The largest, 774M parameters GPT-2 version (GPT-2-Large), GPT-Neo by EleutherAI [49], and Google’s bidirectional LM T5 [50].

The names according to the HuggingFace library correspond to gpt2, EleutherAI/gpt-neo-125M, google/t5-v1.1-small, and gpt2-large. These are all generative LMs intended for text generation and are available for free.

Figure 6 and 7 show the results of the additional LMs in comparison to GPT-2.

Figure 6: RPAM replicates human-like associations in LMs of different types and sizes.

16.1 Validation of RPAM on GPT-2-Large↩︎

We successfully validate RPAM on GPT-2-Large. RPAM achieves generally higher correlation scores on GPT-2-Large than on GPT-2 (the model analyzed in the main body of this paper) for both templates (TP1, TP2) and two lexica (WS-353 and Bellezza), see Table 7. For example, with the template TP1 on Bellezza RPAM achieves a correlation of 0.88 compared to 0.79 (in Pearson’s \(\rho\)) on the smaller model. The only two exceptions are the correlation scores calculated with template TP2 on Bellezza and WS-353 which are slightly lower than on the smaller model (0.84 vs. 0.85 in Pearson’s \(\rho\) and 0.68 vs. 0.72 in Spearman’s \(\rho\), respectively).

Further, RPAM measures associations with positive, effect sizes across all ten association tests on GPT-2-Large with an average large effect size of 0.95 (in Cohen’s 4), see Figure 6.

Table 7: Validation tasks for three additional LMs (GPT-2-Large, GPT-Neo, T5-small) in comparison to GPT-2 on two templates (TP1 and TP2). WS-353 shows the correlation (Spearman’s \(\rho\)) between RPAM’s computed association and the human-rated association. Bellezza and ANEW show the correlation (Pearson’s \(\rho\)) between RPAM’s valence and the human-rated valence scores, respectively, for the corresponding lexica. For GPT-2, GPT-Neo, TP2 shows a higher correlation, and for T5-small, TP1 shows a higher correlation.
Model GPT-2 GPT-2-Large GPT-Neo T5-small
Task
WS-353 (TP1) \(\rho\) 0.56 0.63 0.45 0.48
WS-353 (TP2) \(\rho\) 0.72 0.68 0.65 0.59
Bellezza (TP1) \(\rho\) 0.79 0.88 0.69 0.69
Bellezza (TP2) \(\rho\) 0.85 0.84 0.75 0.60
Bellezza (TP1, 5 terms) \(\rho\) 0.70 0.80 0.66 0.64
Bellezza (TP2, 5 terms) \(\rho\) 0.79 0.86 0.73 0.57

References↩︎

[1]
S. Ghosh and A. Caliskan, ChatGPT Perpetuates Gender Bias in Machine Translation and Ignores Non-Gendered Pronouns: Findings across Bengali and Five other Low-Resource Languages,” 2023.
[2]
P. Apell and H. Eriksson, “Artificial intelligence (AI) healthcare technology innovations: The current state and challenges from a life science industry perspective,” Technology Analysis & Strategic Management, vol. 35, no. 2, pp. 179–193, Feb. 2023, doi: 10.1080/09537325.2021.1971188.
[3]
A. Boicel, “Using LLMs to Moderate Content: Are They Ready for Commercial Use? TechPolicy.Press,” Tech Policy Press. Apr. 2024, Accessed: Apr. 17, 2024. [Online]. Available: https://techpolicy.press/using-llms-to-moderate-content-are-they-ready-for-commercial-use.
[4]
E. M. Bender, T. Gebru, A. McMillan-Major, and S. Shmitchell, “On the Dangers of Stochastic Parrots: Can Language Models Be Too Big?” in Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, Mar. 2021, pp. 610–623, doi: 10.1145/3442188.3445922.
[5]
H. An, Z. Li, J. Zhao, and R. Rudinger, arXiv:2210.07269 [cs]SODAPOP: Open-Ended Discovery of Social Biases in Social Commonsense Reasoning Models.” arXiv, Feb. 2023, Accessed: Jun. 24, 2023. [Online]. Available: http://arxiv.org/abs/2210.07269.
[6]
R. Rudinger, J. Naradowsky, B. Leonard, and B. Van Durme, arXiv:1804.09301 [cs]“Gender Bias in Coreference Resolution.” arXiv, Apr. 2018, Accessed: May 11, 2024. [Online]. Available: http://arxiv.org/abs/1804.09301.
[7]
V. Hofmann, P. R. Kalluri, D. Jurafsky, and S. King, Publisher: Nature Publishing GroupAI generates covertly racist decisions about people based on their dialect,” Nature, vol. 633, no. 8028, pp. 147–154, Sep. 2024, doi: 10.1038/s41586-024-07856-5.
[8]
I. O. Gallegos et al., “Bias and Fairness in Large Language Models: A Survey,” Computational Linguistics, pp. 1–83, Jul. 2024, doi: 10.1162/coli_a_00524.
[9]
H. Kotek, R. Dockum, and D. Sun, “Gender bias and stereotypes in Large Language Models,” in Proceedings of The ACM Collective Intelligence Conference, Nov. 2023, pp. 12–24, doi: 10.1145/3582269.3615599.
[10]
Y. Wan, W. Wang, P. He, J. Gu, H. Bai, and M. R. Lyu, BiasAsker: Measuring the Bias in Conversational AI System,” in Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, Nov. 2023, pp. 515–527, doi: 10.1145/3611643.3616310.
[11]
J. Dhamala et al., BOLD: Dataset and Metrics for Measuring Biases in Open-Ended Language Generation,” in Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, Mar. 2021, pp. 862–872, doi: 10.1145/3442188.3445924.
[12]
R. Wolfe and A. Caliskan, arXiv:2203.07504 [cs]VAST: The Valence-Assessing Semantics Test for Contextualizing Language Models.” arXiv, Mar. 2022, Accessed: Nov. 18, 2022. [Online]. Available: http://arxiv.org/abs/2203.07504.
[13]
C. May, A. Wang, S. Bordia, S. R. Bowman, and R. Rudinger, “On Measuring Social Biases in Sentence Encoders,” in Proceedings of the 2019 Conference of the North, 2019, pp. 622–628, doi: 10.18653/v1/N19-1063.
[14]
Y. C. Tan and L. E. Celis, “Assessing Social and Intersectional Biases in Contextualized Word Representations,” 2019.
[15]
S. Goldfarb-Tarrant, E. Ungless, E. Balkir, and S. L. Blodgett, arXiv:2305.12757 [cs]“This Prompt is Measuring <MASK>: Evaluating Bias Evaluation in Language Models.” arXiv, May 2023, Accessed: Nov. 02, 2023. [Online]. Available: http://arxiv.org/abs/2305.12757.
[16]
M. Nadeem, A. Bethke, and S. Reddy, StereoSet: Measuring stereotypical bias in pretrained language models,” in Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), 2021, pp. 5356–5371, doi: 10.18653/v1/2021.acl-long.416.
[17]
K. Kurita, N. Vyas, A. Pareek, A. W. Black, and Y. Tsvetkov, “Measuring Bias in Contextualized Word Representations,” in Proceedings of the First Workshop on Gender Bias in Natural Language Processing, 2019, pp. 166–172, doi: 10.18653/v1/W19-3823.
[18]
Y. T. Cao et al., arXiv:2203.13928 [cs]“On the Intrinsic and Extrinsic Fairness Evaluation Metrics for Contextualized Language Representations.” arXiv, Mar. 2022, Accessed: Mar. 11, 2023. [Online]. Available: http://arxiv.org/abs/2203.13928.
[19]
R. Steed, S. Panda, A. Kobren, and M. Wick, “Upstream Mitigation Is Not All You Need: Testing the Bias Transfer Hypothesis in Pre-Trained Language Models,” in Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2022, pp. 3524–3542, doi: 10.18653/v1/2022.acl-long.247.
[20]
X. Bai, A. Wang, I. Sucholutsky, and T. L. Griffiths, arXiv:2402.04105 [cs]“Measuring Implicit Bias in Explicitly Unbiased Large Language Models.” arXiv, Feb. 2024, Accessed: May 11, 2024. [Online]. Available: http://arxiv.org/abs/2402.04105.
[21]
F. Crosby, S. Bromley, and L. Saxe, “Recent Unobtrusive Studies of Black and White Discrimination and Prejudice: A Literature Review,” 1980.
[22]
A. Q. Jiang et al., arXiv:2310.06825 [cs]“Mistral 7B.” arXiv, Oct. 2023, Accessed: May 10, 2024. [Online]. Available: http://arxiv.org/abs/2310.06825.
[23]
A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, and I. Sutskever, “Language Models are Unsupervised Multitask Learners,” 2019.
[24]
A. Caliskan, J. J. Bryson, and A. Narayanan, “Semantics derived automatically from language corpora contain human-like biases,” Science, vol. 356, no. 6334, pp. 183–186, Apr. 2017, doi: 10.1126/science.aal4230.
[25]
C. E. Osgood, “Semantic Differential Technique in the Comparative Study of Cultures \(^{\textrm{1}}\),” American Anthropologist, vol. 66, no. 3, pp. 171–200, Jun. 1964, doi: 10.1525/aa.1964.66.3.02a00880.
[26]
R. Wolfe, A. Hiniker, and B. Howe, Number: 1ML-EAT: A Multilevel Embedding Association Test for Interpretable and Transparent Social Science,” Proceedings of the AAAI/ACM Conference on AI, Ethics, and Society, vol. 7, no. 1, pp. 1608–1620, Oct. 2024, doi: 10.1609/aies.v7i1.31751.
[27]
A. G. Greenwald and M. R. Banaji, “Implicit social cognition: Attitudes, self-esteem, and stereotypes.” Psychological Review, vol. 102, no. 1, pp. 4–27, 1995, doi: 10.1037/0033-295X.102.1.4.
[28]
J. A. Bargh, M. Chen, and L. Burrows, “Automaticity of Social Behavior: Direct Effects of Trait Construct and Stereotype Activation on Action,” 1996.
[29]
K. Kenthapadi, M. Sameki, and A. Taly, “Grounding and Evaluation for Large Language Models: Practical Challenges and Lessons Learned (Survey),” in Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Aug. 2024, pp. 6523–6533, doi: 10.1145/3637528.3671467.
[30]
D. Onorati, E. Ruzzetti, D. Venditti, L. Ranaldi, and F. Zanzotto, “Measuring bias in Instruction-Following models with P-AT,” in Findings of the Association for Computational Linguistics: EMNLP 2023, 2023, pp. 8006–8034, doi: 10.18653/v1/2023.findings-emnlp.539.
[31]
A. G. Greenwald, D. E. McGhee, and J. L. K. Schwartz, “Measuring Individual Differences in Implicit Cognition: The Implicit Association Test,” 1998.
[32]
A. Toney-Wails and A. Caliskan, arXiv:2006.03950 [cs]ValNorm Quantifies Semantics to Reveal Consistent Valence Biases Across Languages and Over Centuries.” arXiv, Nov. 2021, Accessed: Mar. 07, 2023. [Online]. Available: http://arxiv.org/abs/2006.03950.
[33]
W. Guo and A. Caliskan, “Detecting Emergent Intersectional Biases: Contextualized Word Embeddings Contain a Distribution of Human-like Biases,” in Proceedings of the 2021 AAAI/ACM Conference on AI, Ethics, and Society, Jul. 2021, pp. 122–133, doi: 10.1145/3461702.3462536.
[34]
N. Nangia, C. Vania, R. Bhalerao, and S. R. Bowman, CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language Models,” in Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020, pp. 1953–1967, doi: 10.18653/v1/2020.emnlp-main.154.
[35]
T. Schick, S. Udupa, and H. Schütze, arXiv:2103.00453 [cs]“Self-Diagnosis and Self-Debiasing: A Proposal for Reducing Corpus-Based Bias in NLP.” arXiv, Sep. 2021, Accessed: Nov. 23, 2022. [Online]. Available: http://arxiv.org/abs/2103.00453.
[36]
T. Wolf et al., “Huggingface’s transformers: State-of-the-art natural language processing,” arXiv preprint arXiv:1910.03771, 2019.
[37]
L. Finkelstein et al., “Placing search in context: The concept revisited,” in Proceedings of the 10th international conference on world wide web, 2001, pp. 406–414.
[38]
F. S. Bellezza, A. G. Greenwald, and M. R. Banaji, “Words high and low in pleasantness as rated by male and female college students,” Behavior Research Methods, Instruments, & Computers, vol. 18, no. 3, pp. 299–303, May 1986, doi: 10.3758/BF03204403.
[39]
R. Socher et al., “Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank,” 2013.
[40]
H. Gonen, S. Iyer, T. Blevins, N. A. Smith, and L. Zettlemoyer, arXiv:2212.04037 [cs]“Demystifying Prompts in Language Models via Perplexity Estimation.” arXiv, Dec. 2022, Accessed: Jan. 17, 2023. [Online]. Available: http://arxiv.org/abs/2212.04037.
[41]
J. Cohen, Statistical power analysis for the behavioral sciences. Routledge, 2013.
[42]
S. Husse and A. Spitz, arXiv:2211.08461 [cs]“Mind Your Bias: A Critical Review of Bias Detection Methods for Contextual Language Models.” arXiv, Nov. 2022, Accessed: Mar. 10, 2023. [Online]. Available: http://arxiv.org/abs/2211.08461.
[43]
S. Goldfarb-Tarrant, R. Marchant, R. M. Sanchez, M. Pandya, and A. Lopez, arXiv:2012.15859 [cs]“Intrinsic Bias Metrics Do Not Correlate with Application Bias.” arXiv, Jun. 2021, Accessed: Jun. 16, 2023. [Online]. Available: http://arxiv.org/abs/2012.15859.
[44]
K. Crenshaw, “Demarginalizing the intersection of race and sex: A black feminist critique of antidiscrimination doctrine, feminist theory and antiracist politics,” u. Chi. Legal f., p. 139, 1989.
[45]
P. H. Collins, E. C. G. da Silva, E. Ergun, I. Furseth, K. D. Bond, and J. Martínez-Palacios, “Intersectionality as Critical Social Theory: Intersectionality as Critical Social Theory, Patricia Hill Collins, Duke University Press, 2019,” Contemporary Political Theory, vol. 20, no. 3, pp. 690–725, Sep. 2021, doi: 10.1057/s41296-021-00490-0.
[46]
M. Antoniak and D. Mimno, “Bad Seeds: Evaluating Lexical Methods for Bias Measurement,” in Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), 2021, pp. 1889–1904, doi: 10.18653/v1/2021.acl-long.148.
[47]
OpenAI, arXiv:2303.08774 [cs]GPT-4 Technical Report.” arXiv, Mar. 2023, Accessed: Dec. 03, 2023. [Online]. Available: http://arxiv.org/abs/2303.08774.
[48]
X. Xu et al., arXiv:2402.13116 [cs]“A Survey on Knowledge Distillation of Large Language Models.” arXiv, Oct. 2024, doi: 10.48550/arXiv.2402.13116.
[49]
L. Gao et al., “The pile: An 800gb dataset of diverse text for language modeling,” arXiv preprint arXiv:2101.00027, 2020.
[50]
C. Raffel et al., “Exploring the limits of transfer learning with a unified text-to-text transformer,” The Journal of Machine Learning Research, vol. 21, no. 1, pp. 5485–5551, 2020.

  1. Referring to the probability of a LM continuing with a specific word when prompted by given text [15]↩︎

  2. For a comprehensive review, we refer to [8].↩︎

  3. Names according to the HuggingFace library: “mistralai/Mistral-7B-Instruct-v0.2.,” “mistralai/Mistral-7B-v0.1,” and “openai-community/gpt2”↩︎

  4. at least eight words each to have representative concepts↩︎

  5. We include comparison to additional principled metrics in the appendix, see Figure 5.↩︎

  6. https://github.com/samvardhan777/unsloth_Finanace_Sentimental_Analysis/↩︎

  7. https://huggingface.co/michelecafagna26/gpt2-medium-finetuned-sst2-sentiment↩︎

  8. Applications to three additional models from different developers are provided in the Appendix↩︎

  9. https://github.com/samvardhan777/unsloth_Finanace_Sentimental_Analysis/↩︎