Elamur Research

Stereotypical contextual representations in French language models : better identifying them to avoid reproducing them

Original (French): Les représentations contextuelles stéréotypées dans les modèles de langue français : mieux les identifier pour ne pas les reproduire

Paper · 2024 · Léandre Adam-Cuvillier, Pierre-Jean Larpin and Antoine Simoulin

Summary

A system that predicts text can pick up expectations about people along with the patterns that make sentences intelligible. If it regularly favors a familiar generalization about an occupation or a social group, that preference can carry into applications that use its predictions. This study asks how to detect such tendencies in French. The authors adapt an English benchmark and keep its evaluation protocol so they can investigate whether patterns observed in English recur on French material. The resulting benchmark, StereoSet-fr, is an adaptation of StereoSet.

The test compares a description that follows a stereotype with one that runs against it. Both are meant to make sense in context. A third, unrelated option helps establish whether the system can distinguish either of them from a poor fit. The choices appear either inside a shared sentence frame or in alternative continuations of an opening sentence. Translation could undermine both comparisons. It sometimes changed words that should have stayed the same across candidates or turned an absurd option into a plausible one. The authors reviewed the translated items by hand to recover the intended contrasts.

Systems that were better at recognizing relevant material generally showed a greater imbalance between the social alternatives. The Spearman rank correlation between those measurements was 0,63 on StereoSet-fr, compared with 0,9 in the English study. Overall scores also concealed different patterns across domains. CamemBERT and Barthez were close on the measure that combines coherence and balance. Barthez performed better for ethnic origin and religion, while CamemBERT performed better for gender. The authors found no consistent correspondence between these patterns and the broad architecture of a system.

Within the CamemBERT family, the variants pretrained on OSCAR achieved higher global combined scores than the variants using CCNet or Wikipedia. The smaller setting scored better within each of OSCAR and CCNet, while the pooled analysis left the relationship between corpus size and stereotype preference unresolved. The mBART variant exposed to more languages improved on the combined measure in every domain. The authors suggest that pretraining in multiple languages could help reduce stereotypes. They also point out that a French translation can preserve a social contrast chosen in the United States without establishing how well it represents French-speaking communities. The results describe preferences on the benchmark, and their practical consequences depend on the setting in which those preferences are expressed.

Deep dive: Stereotypical contextual representations in French language models : better identifying them to avoid reproducing them

StereoSet-fr tests which social associations French text predictors favor and how those preferences vary with their pretraining data. · about 35 minutes to read

The problem and its context

Why a plausible sentence can be a difficult test

To understand the authors’ concern, consider what the task of predicting text rewards. A predictor learns to give more weight to combinations that fit patterns in its training material. Some of those patterns help it recognize what a sentence is saying or how a passage is likely to continue. Others reflect the traits that writers habitually assign to people. When the target of an association is a social group, the distribution of words in the training material can give a predictor a basis for favoring a generalization about that group. That is the connection the paper draws between stereotyping and language modeling.

In the authors’ account, a stereotype turns group membership into an expectation about an individual. The supposed common trait can involve behavior, character, or appearance. What makes it a stereotype is the simplifying assumption that the group shares the trait, with individual differences receiving little weight. The paper describes these expectations as learned and reinforced through social interaction and communication. Written material used in pretraining can therefore reflect expectations that are already circulating among the people who produced it. It is the system’s statistical preference for the associated wording that the authors set out to observe.

The practical concern arises when a preference learned this way influences what an application presents or does. A system may give more weight to one characterization of a person because similar characterizations occur in its training data. If that preference is repeatedly expressed, it can help circulate the generalization. The paper connects this possibility to earlier work on gender in coreference resolution and on bias in text generation. Those lines of work situate the concern in particular tasks. The French study asks an earlier question about the associations available to a pretrained system. Gender Bias in Coreference Resolution and The Woman Worked as a Babysitter

A compelling test of the association needs alternatives that a reader could recognize as sensible. If the description that follows a stereotype is coherent and the description that challenges it is awkward or off topic, a preference for the first gives little purchase on the social question. Conversely, if a system struggles to tell which expressions fit at all, its preference between the social candidates can be hard to interpret. The study therefore separates a system’s ability to identify relevant material from its inclination to favor a particular kind of relevant material. The design makes it possible to ask both questions using the same items.

There is a different question about what happens once the system is used. A statistical preference is visible in the ordering of candidate texts. Assessing prejudice or discrimination in an application would also involve the people affected, the decisions the system helps make, and the circumstances in which it operates. The paper takes up this distinction when discussing a critical survey that calls for researchers to specify what they mean by bias and identify the harm at issue. A measurement of contextual associations gives researchers something concrete to investigate within that broader account. Language (Technology) is Power

From relations among words to judgments about passages

The earlier approaches discussed in the paper start with word embeddings. These represent words as numerical vectors, which lets a researcher compare their positions or apply mathematical operations to them. An analogy test uses a pair to specify a relation and asks for a term that completes a corresponding pair. The example in the paper concerns a relation between a gender term and an occupation. If a method carries the relation over to another gender term, the occupation it supplies gives a way to inspect what it has learned about the relationship. Distributed Representations of Words and Phrases

Association tests pose a question about sets of words. In the example the authors give for WEAT, the targets can be names associated with different genders, while the attributes concern aspects of professional life. The researcher examines how similar the targets are to the attributes relative to one another. Working with sets makes the contrast a matter of the pattern across several words. A result can then show, for example, that one set of names lies closer to one set of attributes in the learned representation than the comparison set does.

Once a representation depends on the surrounding words, the investigator also has to choose the text that supplies that context. SEAT, the Sentence Encoder Association Test, adapts the association approach by placing the terms in short, partly automated sentence frames. The frame gives a sentence encoder something to represent while limiting variation in the surroundings. The method retains a comparison between sets of targets and attributes, and it computes that comparison from representations obtained using sentences. On Measuring Social Biases in Sentence Encoders

StereoSet uses contexts written in natural language and asks which candidate fares better in a particular context. An occupation can be mentioned in a sentence whose wording establishes the role of the candidate attribute. It can also be introduced in an opening sentence, with an entire subsequent statement conveying the association. The second format matters because a stereotype can be communicated through what a speaker brings up about someone after introducing them. The benchmark can treat that relationship between statements as the object of measurement.

CrowS-Pairs provides the closest precedent in the paper’s account. It uses minimal pairs, where a limited change in wording creates the contrast of interest. French CrowS-Pairs carries this form of evaluation into French. These benchmarks examine contrasts within individual sentences and, as the authors describe them, address masked encoders. A masked encoder can use the surroundings of a position in the text to score what belongs there. The StereoSet protocol gives the authors a larger set of examples, an additional task involving sentence pairs, and procedures for evaluating decoders and systems that combine an encoder with a decoder. CrowS-Pairs and French CrowS-Pairs

Why carry an English benchmark into French?

Prior English research gave the authors a set of questions they could ask again using the same definitions. They could examine how the ability to distinguish relevant candidates relates to the strength of a preference between the social alternatives. They could also examine variants of a system to see how measurements change with parameter count. Keeping the protocol gives these questions a common form across languages. It also makes the French adaptation a study of how an existing evaluation benchmark behaves when its items have to work in a different language.

There is a cost to that continuity. A grammatical distinction that supports a contrast in English may be expressed somewhere else in French, or it may disappear from the corresponding construction. Furthermore, groups can be associated with different traits in different social settings. The changes required to make sentences comparable in French address the grammatical and lexical problem. The original source of the associations remains relevant to interpreting the test. These are separate issues because a perfectly natural sentence can express a culturally unfamiliar stereotype.

The authors also go beyond asking whether a trend observed in English recurs. Their account of where the biases come from gives a reason to compare the collections of texts used for pretraining. Results from broadly different systems offer limited leverage on that question because architecture, capacity, and training can vary together. Comparisons among variants using the same architecture make it easier to focus on changes associated with the corpus. The French study consequently combines a cross-language comparison of a measurement procedure with a narrower investigation of which pretraining settings accompany different scores.

The method, step by step

How an item asks about both meaning and preference

Each item begins with a target word and surrounds it with language that makes an association possible. The paper introduces the idea with a word for a nursing role. The target gives the item its subject. The attribute is the characteristic or association that changes between the choices. One candidate reflects the stereotype identified by the benchmark, another goes against it, and an unrelated candidate provides a deliberately poor fit. The researcher knows these roles in advance. The system’s contribution is to score the candidates.

Within a sentence, the reviewer should be able to read the versions side by side and identify the candidate attribute as the part that changes. The fixed words set up the same context in each case. This matters because a word’s score depends on the sentence it is in. Suppose the wording around one candidate is translated into a different construction from the wording around its rival. Even if both sentences say roughly the same thing, the measurement now mixes a preference about the candidate with a preference about how the rest of the sentence is expressed. The shared frame is a practical way to keep the substitution identifiable.

The other format provides an opening sentence and asks how well each alternative continues it. Here the candidates can express different complete ideas. Their common point of comparison is the opening. The scorer sees each pair in turn and gives a value to the proposed continuation in relation to that first sentence. A relevant continuation develops the topic and can express either kind of social association. The unrelated continuation is meant to provide a clear contrast with both of those possibilities.

Neither task requires the system to write its own description of the target. The experiment observes which of the offered descriptions receives the stronger score. The authors use the candidate ordering to address two concerns. They can look at whether relevant text fares better than an unrelated alternative, and they can look at which relevant association receives the preference. The distinction matters because a predictor can be selective about what makes sense while also preferring one social association consistently.

Building and scoring the French association tests

The steps in order.

Building and scoring the French association testsStep 1: Inspect the source items1. Inspect the source itemsStep 2: Translate candidate texts independently2. Translate candidate texts independentlyStep 3: Repair sentence frames and candidate contrasts3. Repair sentence frames and candidate contrastsStep 4: Score attributes in their shared frames4. Score attributes in their shared framesStep 5: Train predictors to recognize consecutive French sentences5. Train predictors to recognize consecutive French sentencesStep 6: Score each complete continuation against its opening6. Score each complete continuation against its openingStep 7: Aggregate coherence and social preferences7. Aggregate coherence and social preferences

Audit the English material before translating

The first stage was to inspect the existing items. The authors removed 11 source examples because of visible problems with their form or because the contrast was difficult to express in French. An item containing several target words is one illustration of a structural problem. The authors also dealt with a small number of repeated tests by replacing attributes with synonyms. The audit established which material could be carried forward before they assessed the problems introduced by translation itself.

An English possessive illustrates why some source examples pose a difficulty even before there is a French sentence to review. The possessives his and her carry information about the possessor. In the French construction the authors discuss, the form instead agrees with the noun for the object possessed. With cahier, the French form can be son for either possessor. If the English item sets up its contrast through that possessive, both alternatives can lead to the same French expression. The score comparison depends on keeping a difference that the direct translation would erase.

This problem concerns what a reader learns from a form. A translator can preserve the ordinary idea of someone’s notebook while losing the information that made the benchmark alternatives distinguishable. Conversely, preserving that information by adding language could change what else the sentence says. The audit and the later manual revisions work at this level of the item. The target, attribute and surrounding language have to support the same kind of comparison after the transfer to French.

Review the translated choices together

The authors used DeepL Pro to translate each candidate context and then examined the results manually. Translating the versions independently gave the translation system room to render the shared words differently from one version to the next. The authors found that the required common wording was lost in almost half of the intra-sentence translations. They reconciled the French versions of those items so that the attribute was again the part that varied.

Reconciliation could involve a change shared by all the candidates. One example involves vodka and whisky. The singular French forms call for different material before the name of the drink, so replacing the drink also changes words around it. The plural allows both alternatives to follow des. This gives the reviewer a way to hold the rest of the sentence fixed while preserving a distinction between the drinks. The authors report changing about 5 % of contexts to the plural to avoid agreement differences. Their example illustrates the broader reason for such interventions. French grammar can move a visible part of the contrast outside the position the benchmark intends to vary.

Words that lack an exact counterpart call for a different judgment. The paper uses the English word nurse, whose French equivalents infirmier and infirmière can make gender explicit. The authors mention soignants and sauveurs among the terms used in adapting this material. Substitution changes the vocabulary while allowing the reviewer to construct a usable distinction in French. The paper reports synonym replacements for about 1 % of contexts where an exact translation was unavailable.

The translations of unrelated candidates needed their own review. A translation system may find a sensible interpretation for strange input by choosing different wording or resolving an awkward expression into a coherent one. For an ordinary translation, coherence might be desirable. In this experiment, it can turn an item with a clear irrelevant alternative into an item with several defensible readings. The authors reworked about 40 % of the examples in the unrelated category so that their lack of fit remained apparent. That percentage refers to the unrelated examples. The frequency of inconsistent frames, by contrast, describes the translations of intra-sentence tests.

These decisions preserve different parts of the measurement. Restoring common wording narrows the source of a scoring difference within a sentence. Lexical and grammatical repairs maintain a workable social contrast. Making unrelated text clearly irrelevant protects the coherence check. A fluent French version has to satisfy all of these conditions at once to serve the experiment.

Convert an attribute into token scores

For comparisons within sentences, the authors use the language prediction machinery learned during pretraining. The system’s internal representation at its last layer is a vector, meaning an ordered set of numerical values. A learned projection maps such a vector to scores for entries in the system’s vocabulary. The vocabulary contains tokens, the units the predictor processes. A written word can consist of multiple tokens, so a candidate attribute sometimes has to be scored piece by piece. Subword tokenization

The token calculation in the paper can be written with an explicit selection of the vocabulary entry for the candidate.

P(u | C) = softmax(hWₗₘᵀ)[u]

P denotes probability. The expression P(u | C) gives the probability of token u given context C, with | read as “given.” The vector h is the hidden state obtained from the final layer at the relevant prediction position. Wₗₘ is the vocabulary projection matrix learned for the language modeling task, which the subscript lm identifies. ᵀ denotes the transpose, and placing h next to the matrix denotes matrix multiplication. softmax turns the resulting vocabulary scores into a probability distribution. [u] picks the entry for token u from that distribution, and = equates it with the requested probability.

A probability for a single token gives one input to the attribute comparison. The paper also writes a general expression that aggregates the probabilities for the tokens in the attribute on a logarithmic scale.

log Pᵢₙₜᵣₐ(attribute) = ∑ᵢ∈attribute log P(uᵢ | C)

Pᵢₙₜᵣₐ(attribute) denotes the score of the proposed attribute in the intra-sentence setting, as indicated by intra. log takes a logarithm. ∑ denotes a sum over indices i, and i ∈ attribute restricts those indices to positions in the attribute. uᵢ is the token at position i. P(uᵢ | C) gives its probability conditioned on context C. The equality expresses the log score for the attribute as the sum of the indicated log probabilities.

The paper’s implementation note distinguishes procedures by architecture. For a masked encoder, the evaluator initially replaces the attribute’s token positions with [MASK]. It then reveals the candidate’s sub-word pieces in order, from left to right. When the predictor scores a later piece, pieces already revealed can contribute to the available context. The note describes averaging the resulting sub-word probabilities for the final encoder score. This is the architecture-specific aggregation given alongside the more general log-sum formula.

For a decoder, the paper describes adding the log probabilities of the tokens throughout the context. In this procedure, the substituted attribute can affect how likely the decoder finds the wording that follows it. A shared continuation is therefore still important to a fair comparison. It gives the same later words to both candidates, while letting the scoring procedure detect how each candidate affects their fit.

The distinction between an attribute score and its component token scores helps explain why the translated frame matters even where the target word itself survives unchanged. If surrounding words change, the hidden representation from which the probability is obtained can change. If a decoder scores the whole context, the altered words also make direct contributions to the sum. Careful matching of wording removes a source of variation that would otherwise be included in the observed candidate preference.

Train an additional predictor for sentence pairs

The across-sentence task needs a score for a full continuation given its opening. The authors follow StereoSet in obtaining that score from next-sentence prediction. This training task asks whether a pair contains consecutive sentences from the training text. After learning to answer that question, the predictor can assign a score to each of the benchmark’s candidate pairs. The score used for comparison comes from the class corresponding to consecutive sentences. The paper traces the task to BERT.

A prediction head is the part of the system that maps an internal representation to the outcomes of a particular task. The evaluated systems did not all start with a head trained for next-sentence prediction. The authors trained the corresponding layer for each system on an extract of French Wikipedia, reproducing the procedure and hyper-parameters of StereoSet. The paper reports using two Nvidia T4 16Gb cards for the runs below 360 million parameters and an Nvidia V100 32Gb card for the larger runs. The tests across sentences use the systems after adaptation to the next-sentence task.

The representation fed to the head also varies by architecture. For an encoder, the authors take the last-layer hidden state of the initial token, identified in the paper as [CLS]. This supplies a vector from a designated position in the pair. For decoders and encoder-decoders, they obtain a vector by averaging the final-layer states across positions. Both routes give the head a vector summarizing the input it has to classify.

Pᵢₙₜₑᵣ(attribute) = softmax(hWₙₛₚᵀ)[next]

Pᵢₙₜₑᵣ(attribute) is the score associated with the sentence containing the candidate attribute, and inter identifies the task across sentences. h denotes the vector obtained from the final layer by selecting or averaging states. Wₙₛₚ is the learned projection for next-sentence prediction, abbreviated nsp. ᵀ denotes a transpose, and adjacency of h and the transposed matrix denotes multiplication. softmax converts the projected class scores to probabilities. [next] selects the probability for consecutive sentences, which = assigns to the candidate score.

The French Wikipedia training at this stage serves a specific experimental purpose. It equips all the evaluated systems with a way to score a pair. That adaptation takes place after the pretraining whose corpus the study later compares. This distinction is especially relevant to a CamemBERT variant whose original corpus is also Wikipedia. The later task gives that variant a means to participate in the sentence-pair evaluation, just as it does for variants that started out with OSCAR or CCNet.

Summarize the candidate rankings

The highest-scoring candidate supplies the preference in a comparison. The language modeling score, denoted LMs, measures success at favoring relevant material over the off-topic alternative. Its ideal value is 100. In the context of this experiment, a high value means the system is good at judging whether the supplied text belongs in its setting. The procedure measures that kind of coherence through specific contrasts, so the quality of the unrelated examples matters directly to its interpretation.

The stereotype score, Ss, gives the percentage of tests in which the candidate that follows the stereotype is favored over its counter-stereotypical counterpart. Its balance point is 50. Above that value, the stereotype wins more often. Below it, the counter-stereotype wins more often. The raw score thus retains the direction of the preference. A comparison that asks only how uneven the choice is uses distance from 50, which can increase on either side of the reference.

Reading LMs and Ss together helps distinguish different reasons for a result. A system may give the stereotype little advantage because it often gives sensible weight to both social alternatives. Another system may appear similarly balanced while struggling to distinguish either choice from irrelevant material. The coherence score gives evidence that helps a reader tell these situations apart. The contextual association score, ACs, is the paper’s main measure because it incorporates both properties.

ACs = LMs × min(Ss, 100 − Ss) / 50

ACs is the contextual association score, LMs is the coherence component, and Ss is the stereotype preference component. In 100 − Ss, the minus sign subtracts the stereotype percentage from the top of its scale, giving the complementary percentage. min takes the smaller of Ss and that complement. The slash divides that value by 50, the balanced reference, and × multiplies LMs by the resulting factor. The equality defines the combined score.

At the point of balance, the factor preserves the coherence score. As the stereotype percentage moves towards either extreme, it reduces that score. The paper gives 100 as the ideal combined result, 0 as the value at complete preference for one side, and 50 as the random reference. These reference values describe the metric. In an empirical comparison, a strong combined result can reflect especially good coherence, especially even preference, or some combination of the two. The component measurements are needed to say which of those accounts applies.

The procedure yields the same metrics from both tasks even though their raw candidate scores come from different sources. Within a sentence, the result reflects a substitution assessed by the language prediction machinery. Between sentences, it reflects a judgment from a head trained on consecutive text. The common metrics summarize the outcomes of the comparisons. The headline experiment then averages the results across the formats, while some of the follow-up analyses use only the intra-sentence task.

Experiments and results

The size and coverage of the French test

StereoSet-fr contains 2,096 intra-sentence tests and 2,123 tests across sentences. These are item counts. Each item supplies its candidates and tests a contrast associated with its target. The authors report both the number of items and the number of target words by domain. The distinction is useful because a target can be tested in many contexts, increasing the number of comparisons while leaving the number of social targets fixed.

Within sentences, gender accounts for 256 tests using 11 target words, and profession for 806 tests using 32 targets. Ethnic origin accounts for 958 tests across 43 targets. Religion has 76 tests and 3 targets in this format. Across sentences, gender has 242 tests and 10 targets, while profession has 827 tests and 30 targets. The ethnic-origin subset contains 976 tests and 36 targets, and the religion subset has 78 tests and 3 targets. Religion therefore represents a narrow inventory within both formats, even though its combined score is reported on the same scale as the other domains.

The principal comparison includes starting systems pretrained on predominantly French or multilingual material. The encoders are m-BERT-base, CamemBERT-large, and FlauBERT-large. The authors also assess the decoders PAGnol-large, GPT-fr-base, XGLM-564M, and BLOOM-560m. Barthez and mBART-50 represent the encoder-decoder design. The results refer to these variants. Related entries with names such as base and large come into the separate analysis of parameter count. CamemBERT and FlauBERT

The principal table averages scores over the two tasks. It gives an overall LMs and Ss for each entry, plus ACs within each domain and globally. The ideal and random results provide theoretical points of reference. For empirical comparisons, the authors look at the other entries in the table, at the trends from English StereoSet, and at shared systems in French CrowS-Pairs. The latter is a comparison of relative positions on different benchmarks. It gives a check that a similar pattern can emerge in spite of differences in how the candidate pairs are constructed and scored.

Coherence and balance give different rankings

XGLM-564M has the highest global combined score in the main experiment. Its LMs is 87,0 and its Ss is 56,3, with both components reported as averages across the tasks. PAGnol-large scores 87,6 on LMs, the strongest coherence result in the main comparison. Its Ss is 59,1, farther from balance than XGLM’s. CamemBERT-large has a similarly strong coherence score of 87,4, together with an Ss of 58,9. The ordering by the combined measure reflects the different costs of their departures from balance. XGLM

Global StereoSet-fr contextual association scores averaged across both tasks

XGLM has the highest combined score in the main comparison.

Global StereoSet-fr contextual association scores averaged across both tasksXGLM-564M (this paper): 76,0XGLM-564M (this paper)76,0mBART-50: 73,9mBART-5073,9Barthez: 72,6Barthez72,6CamemBERT-large: 71,9CamemBERT-large71,9PAGnol-large: 71,8PAGnol-large71,8GPT-fr-base: 68,7GPT-fr-base68,7FlauBERT-large: 67,2FlauBERT-large67,2m-BERT-base: 66,7m-BERT-base66,7BLOOM-560m: 56,9BLOOM-560m56,9
The numbers
System or settingACs
XGLM-564M (this paper)76,0
mBART-5073,9
Barthez72,6
CamemBERT-large71,9
PAGnol-large71,8
GPT-fr-base68,7
FlauBERT-large67,2
m-BERT-base66,7
BLOOM-560m56,9

The entries near the balanced reference also illustrate the contribution of coherence. FlauBERT-large has a two-task Ss of 49,7, close to the ideal of 50. Its LMs is 78,9, which keeps its combined result below those of the strongest systems at separating relevant and irrelevant material. m-BERT-base has LMs of 73,5, the lowest headline coherence score, and Ss of 54,3. Their social preferences are fairly close to balance on this aggregate, and their limited success on the coherence comparison is still visible in the combined results.

BLOOM-560m shows why a low raw stereotype percentage has to be interpreted relative to the reference. Its headline Ss of 40,6 indicates that the counter-stereotypical candidates are preferred more often. Since the penalty in ACs responds to imbalance in either direction, this result reduces the contribution of its LMs of 81,9. Its low global combined placement therefore has a different explanation from m-BERT’s. BLOOM

Among the encoder-decoders, Barthez has higher headline coherence at 83,8, compared with mBART-50 at 80,3. Barthez also has the larger departure from balance, with Ss of 56,7 against 54,0 for mBART-50. Their overall ordering on ACs reflects those opposing contributions. The entries offer an example of why the combined measure is useful for ranking systems under the benchmark’s joint criterion, and why the table still reports the components needed to explain a rank.

Different domains produce different profiles

CamemBERT and Barthez illustrate what a global value can conceal. In the gender subset, the two-task ACs of CamemBERT is 76.6, compared with 69,3 for Barthez. For ethnic origin, CamemBERT has 72,2 and Barthez has 75,4. The comparison for religion also favors Barthez, with 74,7 against 66,4 for CamemBERT. A reader interested in gender-related choices would therefore see a different ordering from one interested in religious associations. The overall values are close because they summarize performance extending across those contrasts.

The leading entries differ by domain as well. PAGnol-large has the highest ACs for gender at 79,2 and for profession at 73,9 in the main table. XGLM-564M leads for ethnic origin at 76,5 and for religion at 89,8. The religion subset also produces some of the sharpest contrasts among entries. m-BERT-base scores 76,4 there, alongside a profession score of 62,5. BLOOM-560m has a religion score of 43,6 and a profession score of 62,2. A strong result in one domain gives limited guidance about where the same system will stand in another.

Broad architecture labels yield no clear grouping of the observed profiles. CamemBERT and PAGnol fare relatively well on gender despite belonging to different architecture classes. m-BERT and XGLM likewise represent an encoder and a decoder and have stronger religion results than several other entries. Barthez, with both components, performs comparatively well on ethnic origin. The authors treat these comparisons as evidence that the benchmark results have to be read by association type. The architecture categories in the main experiment give little basis for predicting which domain will pose the greatest difficulty.

The domain values describe performance on the particular inventory of each subset. A religion score, for example, reflects an evaluation concentrated on few target words. Ethnic origin encompasses a larger range of targets and contexts in this collection. The ACs scale gives the results a common interpretation in terms of coherence and balance. The target counts tell the reader how widely that interpretation applies within the material that was actually tested.

The French results recover a trend from English

The English study found that systems with stronger coherence tended to show a greater departure from a balanced stereotype score. To examine the same relationship in French, the authors compare the ranks of the systems by LMs with their ranks by distance from an Ss of 50. Spearman’s rank correlation describes how closely those orderings follow each other. The use of distance matters. A system can rank high on imbalance by strongly favoring either the stereotype or its counterpart.

The reported Spearman coefficient is 0,63 for the StereoSet-fr comparison. The coefficient from English StereoSet is 0,9. The French paper reports a p-value of 0,04 from a permutation test and treats the association as statistically significant. In this test, the observed correspondence between rankings is judged against what would arise when the pairing between the measurements is rearranged. The positive relationship found in English recurs in French, with a smaller reported coefficient.

This comparison supports a specific account of the French results. Systems that are better at choosing relevant text for these examples also tend to favor one social alternative more strongly across the benchmark. The result links the measured coherence and preference imbalance of the systems examined. The authors’ proposed explanation is that better capture of the training distribution can extend to its stereotypes. The later comparisons by capacity and pretraining corpus provide more focused evidence about settings that could contribute to that relationship.

A check using French CrowS-Pairs

The authors compare the relative standings of CamemBERT, FlauBERT, and m-BERT with the standings of those systems in French CrowS-Pairs. They use the intra-sentence results of StereoSet-fr for this check, since the items in French CrowS-Pairs also express the contrast within an individual sentence. The comparison examines each system’s departure from the ideal in the test concerned. A system with a larger departure displays a greater aggregate imbalance under that test’s rules.

French CrowS-Pairs uses a pseudo-likelihood procedure which the paper describes as avoiding a penalty for less frequent terms. StereoSet-fr scores its alternatives using the procedures described above. The authors therefore compare the ordering instead of treating the two scales as numerically interchangeable. This is a limited cross-check. The two evaluations can agree about which system shows the most uneven social preference even when their measurements use different probabilities and contrasts.

The paper reports a broadly similar ordering, with CamemBERT showing the greatest departure among the systems compared. It qualifies the result for m-BERT in light of weak coherence on StereoSet-fr. This qualification shows what the extra candidate contributes to the French adaptation. Alongside the result about stereotype preference, the benchmark offers a measure of how reliably the system distinguishes material that fits the context. A similar relative position on two benchmarks leaves room for that further distinction within StereoSet-fr.

What the ablations show

The paper has no component-removal ablation. Its focused comparisons use variants that differ in capacity, pretraining corpus, or the coverage of multilingual pretraining. Each comparison gives the authors a different way to narrow the broad contrast among unrelated systems. The parameter experiment concentrates on the judgment within sentences. The corpus comparisons report the combined metric averaged across both judgment tasks.

Parameter count behaves differently within and across families

A parameter is a numerical value adjusted during training. Systems with more such values may have greater capacity to capture patterns in their data. The authors ask whether groups of related variants reproduce the association between increased parameter count and stereotype preference that the English study described. They note that variants from a family may also have been trained on different corpora, so they specifically choose the CCNet version of CamemBERT-base to compare with CamemBERT-large trained on the same corpus.

The CamemBERT comparison provides the clearest exception to the reported tendency. The base system has 110 million parameters, and the large system has 335 million. On the intra-sentence task, LMs goes from 83.5 in the base setting to 84.0 in the large setting. Ss goes from 61.0 to 57.5. This movement is toward the ideal value of 50, so the larger system improves on both components relevant to ACs. The combined score rises from 65.1 to 71.4 in that intra-sentence comparison.

In the FlauBERT family, most of the coherence gain is visible in the move from the small variant to the base variant. Their intra-sentence LMs values are 58.3 and 80.8. The large variant has LMs of 80.3. In the same order, the Ss values are 52.1, 52.8, and 57.1. The base variant has the highest intra-sentence ACs of the family at 76.2. The small variant’s coherence limits its combined score, while the large variant gives up ground on both coherence and balance compared with the base setting.

PAGnol illustrates a different pattern. The intra-sentence coherence scores of its small, medium, and large variants are 87.3, 87.6, and 87.3. Those variants’ Ss values increase through 60.3, 60.9, and 61.5. The combined scores are 69.4, 68.5, and 67.3, respectively. With coherence similar across the variants, the greater preference for stereotypes is visible in the weaker combined results. GPT-fr shows how the combination can move differently. Its small and base versions obtain intra-sentence LMs of 87.4 and 89.2, and Ss of 61.5 and 62.2. Their ACs values of 67.2 and 67.4 give the base variant a slight lead despite its greater preference imbalance.

The BLOOM size comparison also shows a rise in Ss within a decoder family. The smaller and larger settings have intra-sentence Ss of 56.5 and 60.6, with LMs of 86.9 and 87.2. The combined scores are 75.7 and 68.7. The smaller variant’s relatively strong combined result here concerns the intra-sentence task only. The main global comparison includes the separate next-sentence judgment. This difference in scope matters when reading scores for the same family across experiments.

Apart from CamemBERT, the Ss values rise with parameter count within the families in the size comparison. They are above 50 in this comparison, so the rise corresponds to more frequently favoring the stereotype. The coherence component also tends to improve as capacity increases, though the FlauBERT and PAGnol results show departures from a steady increase. The authors interpret the general pattern as consistent with greater capacity to learn the distribution of the training material, including regularities that express stereotypes.

Across all the French variants in the parameter experiment, the rank correlation between parameter count and distance from ideal Ss is 0,31, with a p-value of 0,16. The authors report an analogous coefficient of 0,32 and p-value of 0,21 from the English StereoSet results. The French grouping by family gives examples of how a change in size accompanies changes in behavior. When all the variants are ranked together, parameter count gives a weak and statistically inconclusive account of their ordering by imbalance. Capacity sits alongside the other properties that distinguish the families, including differences in their pretraining histories.

Corpus source matters even at a shared reported size

The CamemBERT comparisons use the same architecture with alternative pretraining corpora. OSCAR, CCNet, and Wikipedia each have a setting at 4 GB. That shared volume lets the authors compare the sources with size nominally held constant. The global combined results are strongest for the OSCAR variants. Looking across domains reveals which comparisons contribute to that result and where another source fares better.

Global StereoSet-fr contextual association scores for CamemBERT corpus variants

OSCAR has the strongest overall results, and each size comparison favors the smaller setting.

Global StereoSet-fr contextual association scores for CamemBERT corpus variantsOSCAR (4 GB) (this paper): 76,8OSCAR (4 GB) (this paper)76,8OSCAR (138 GB): 73,8OSCAR (138 GB)73,8CCNet (4 GB): 73,6CCNet (4 GB)73,6CCNet (135 GB): 69,5CCNet (135 GB)69,5Wikipedia (4 GB): 68,8Wikipedia (4 GB)68,8
The numbers
System or settingACs
OSCAR (4 GB) (this paper)76,8
OSCAR (138 GB)73,8
CCNet (4 GB)73,6
CCNet (135 GB)69,5
Wikipedia (4 GB)68,8

In ethnic origin, the 4 GB OSCAR variant has ACs of 81,5 across the tasks. CCNet at 4 GB has 75,9 and Wikipedia at 4 GB has 70,4. For religion, the corresponding values are 71,4 for OSCAR, 63,1 for CCNet, and 68,9 for Wikipedia. The authors call attention to weak religion results with CCNet and to the relative strength of OSCAR on ethnic origin and religion. The comparison at a common volume grounds that observation in a change of source while keeping the reported size fixed.

Gender offers an instance in which the global ordering is reversed at the common volume. For that domain, CCNet at 4 GB has an ACs of 82,8 and OSCAR at 4 GB has 80,6. The profession comparison again favors OSCAR, with 70,1 against CCNet’s 68,6. The composition of a corpus can therefore be important to a comparison even when an investigator is interested in one kind of association. Its standing in a global comparison gives a less specific answer about a given domain.

There is also a within-source comparison for each of the two corpora with smaller and larger settings in the table. The smaller setting has the higher global ACs for OSCAR and for CCNet. The result concerns the benchmark’s combined measure. The paper asks a separate statistical question about corpus volume and stereotype preference by ranking the configurations by size and by distance of Ss from 50. Across the configurations in that analysis, the Spearman coefficient is 0,29 and the permutation-test p-value is 0,35. This pooled result gives no statistically significant association between size and preference imbalance.

The two comparisons can coexist because they ask about different endpoints and group the observations differently. The within-source results refer to a score that blends coherence with balance. The pooled correlation isolates imbalance and can be affected by the order of variants drawn from different sources. An improvement on the combined score within a source provides limited evidence about how volume alone relates to the aggregate stereotype percentage over all the settings.

The French paper contrasts its within-architecture corpus comparison with the original StereoSet analysis, which included different systems and architectures and yielded no significant association between corpus volume and LMs or Ss. The authors interpret their French results as favoring attention to what the corpus contains. They cite Phi-1 as an earlier example of using a deliberately selected collection of training material. In their own experiment, the matched CamemBERT comparisons establish that the choice among the named corpora accompanies changes in evaluation results. Textbooks Are All You Need

Broader multilingual training improves the combined result

The mBART experiment compares variants associated with an expansion of multilingual pretraining. mBART-25 uses training material covering 25 languages. The expanded version adds 25 languages. The paper estimates the volumes from the corpus descriptions in the original studies, giving 1,100 GB for CC25 and 1,160 GB for CC25 + 25. Thus the comparison brings together broader language coverage and a change in the volume and composition of the material. The starting multilingual pretraining approach is described in Multilingual Denoising Pre-training.

Global StereoSet-fr contextual association scores for mBART corpus settings

The expanded multilingual setting leads on the combined measure.

Global StereoSet-fr contextual association scores for mBART corpus settingsmBART with CC25: 70,6mBART with CC2570,6mBART with CC25 + 25 (this paper): 73,9mBART with CC25 + 25 (this paper)73,9
The numbers
System or settingACs
mBART with CC2570,6
mBART with CC25 + 25 (this paper)73,9

The overall improvement is reflected in all the domains tested. The gender ACs rises from 67,1 to 75,8 and the profession score from 67,5 to 71,3. Ethnic origin goes from 73,2 to 74,1, and religion from 70,0 to 75,4. In all cases these figures average the two task formats. The table therefore gives evidence of a broader gain than a result concentrated in a single subset, while leaving open how much coherence and preference balance respectively contribute to it.

The authors’ proposed mechanism concerns culturally specific associations. If writers in a particular linguistic setting often express the same expectation about a group, a corpus drawn from that setting can emphasize the association. Material written in other settings may expose the system to a different range of expectations. As a consequence, the authors see the multilingual comparison as a reason to investigate whether linguistic diversity reduces the reinforcement of culture-specific stereotypes. The result is a gain on a joint measure in a particular comparison. A test of the proposed mechanism would need to distinguish the effect of greater language coverage from the other changes in the training material.

Limitations

Limits identified by the authors

The social associations chosen for the original StereoSet reflect the circumstances in which it was assembled. Its annotators lived in the United States, and that choice enabled the English benchmark to capture stereotypes familiar there. A French adaptation can carry those associations forward even when every sentence has been made idiomatic. The authors regard this inheritance as especially important for stereotypes involving ethnic origin and religion. They discuss earlier work suggesting that some expectations associated with gender and age are more widely shared across cultural settings. Age serves as a point of comparison in that discussion and is outside the four domains tested here.

The authors use this distinction to interpret the generally stronger combined results for ethnic origin and religion than for gender and profession. If a tested association is specific to the source benchmark’s social setting, a system pretrained on different material might exhibit less of it. A strong result on such examples could therefore reflect the selection of associations as much as the system’s tendency to avoid stereotypes. The paper treats cultural specificity as a likely explanation for the domain pattern. The benchmark’s translation and scoring procedure do not independently establish how familiar each original association is in the settings represented by the French training data.

There is a further issue of coverage even within a domain. A collection of examples can give repeated opportunities to test a particular association without representing the full range of prejudices people experience. High performance on a finite set gives evidence about the situations and descriptions in that set. The authors expressly limit their claims to the stereotypes sampled by the benchmark. The number of religion targets, for example, helps explain why a strong score there supplies evidence with a narrow scope in spite of sharing a scale with the other domains.

The paper also leaves the question of harm tied to situations beyond the benchmark. Its immediate subject is the preference exposed by comparing candidates in controlled contexts. In an application, a consequence depends on whose descriptions are involved, where an output goes, and what process uses it. The authors say that studying such a consequence calls for a definition of the harm and an assessment adapted to the social setting. This is particularly important where a tool is intended to optimize or automate a process. A benchmark preference can give a starting point for investigating that process, and the evidence about effects on people must come from the context in which it operates.

Further limits of the design

The stereotype percentage summarizes the direction of wins across a collection. That leaves room for imbalances to cancel out. A system could often prefer the stereotype for a particular target and often prefer the counter-stereotype for another. Both tendencies could be pronounced, yet the combined tally could be close to the balanced point. The paper’s domain breakdown recovers some of the detail that a global score hides. A domain can still contain target-level patterns that go in different directions.

There is also a difference between the size of the aggregate imbalance and the size of any preference on a particular item. In the stereotype percentage, a candidate that barely wins and a candidate with a wide scoring advantage both count as preferred. Distance from 50 measures how uneven those outcomes are across the collection. It leaves out the margins between candidates. This is useful for comparing outcome counts produced by different scoring procedures, while placing a limit on claims about the sharpness of the scores within individual examples.

The same issue of interpretability arises from reporting only ACs for the corpus configurations. A higher joint result can be produced by changes in coherence, in preference balance, or in both. The expanded mBART variant fares better by the joint criterion in every reported domain. From those combined numbers alone, the reader has no basis for attributing each gain to a movement in Ss toward its ideal. A mitigation claim about preference specifically would need the separate component measurements. This distinction also applies to the finding that the smaller CamemBERT corpus settings lead the larger settings on the global combined score.

Task averaging adds another level at which a result can have multiple explanations. The intra-sentence procedure scores a candidate using the pretrained language prediction machinery, and the inter-sentence procedure uses the additional training for next-sentence prediction. An increase in the average could be driven mainly by one of those tasks. For the continuation task, differences could arise from the representations supplied to the added head or from how the adapted system responds to the training text. The average captures performance over both tasks. An account of how the change arose would require knowing which of the judgments improved.

The paper accordingly offers a comparison among architecture classes as evaluated under the specified procedures. It uses different methods of aggregating token scores for encoders and decoders, and different ways of obtaining the input to the next-sentence head. Architecture, original training, and aspects of measurement can vary together in the table. The lack of a consistent architecture pattern describes the observed systems and profiles. More closely matched comparisons would be required to determine whether an individual architectural choice contributes to a particular association.

Manual adaptation gives another reason to read the results at the level of the items actually tested. The reported rates of intervention document the problems reviewers encountered. They give no separate estimate of how scores changed because of each repair. A plural frame can preserve a substitution and a synonym can restore a contrast while each still gives the system a particular wording to judge. When there are several suitable French formulations, the experiment evaluates the one that entered the benchmark. The sensitivity of the measured preferences to other valid formulations is left open.

Finally, matching a corpus by reported volume can establish a concrete comparison without identifying what property of the text produced the result. The CamemBERT scores vary by source at 4 GB, and the paper interprets this as a reason to attend to corpus quality. The experiment compares the corpora as collections, leaving the contribution of particular kinds of text or associations unresolved. Likewise, the multilingual settings differ both in languages represented and in the amount and composition of their material. The parameter variants can also have different training corpora. These comparisons locate differences worth explaining. The available measurements give more direct evidence about which settings performed better on StereoSet-fr than about the mechanism through which a given training change influenced a specific preference.

What came after

No follow-up study building on StereoSet-fr is documented here. The paper leaves open whether the multilingual result can be reproduced under a comparison that isolates language coverage. Its proposed explanation concerns exposure to associations from different cultural settings. Evaluating that explanation would involve tracing which kinds of associations change and examining coherence and stereotype preference separately.

The authors also call for assessments situated in specific uses of French language technology. Such work would start from the social associations and possible harms relevant to a particular process, then adapt the evaluation examples to the people and decisions involved. StereoSet-fr supplies a procedure for observing contextual preferences under controlled comparisons. Connecting those preferences to a defined use and to the communities affected remains a separate research task.

Cite

Cite as Léandre Adam-Cuvillier, Pierre-Jean Larpin and Antoine Simoulin. 2024. Les représentations contextuelles stéréotypées dans les modèles de langue français : mieux les identifier pour ne pas les reproduire. Actes de la 31ème Conférence sur le Traitement Automatique des Langues Naturelles, volume 1 : articles longs et prises de position.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{adamcuvillier2024les,
  title = {{Les représentations contextuelles stéréotypées dans les modèles de langue français : mieux les identifier pour ne pas les reproduire}},
  author = {Léandre Adam-Cuvillier, Pierre-Jean Larpin and Antoine Simoulin},
  booktitle = {Actes de la 31ème Conférence sur le Traitement Automatique des Langues Naturelles, volume 1 : articles longs et prises de position},
  year = {2024},
  url = {https://aclanthology.org/2024.jeptalnrecital-taln.9/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/cuvillier-2024-les-representations-contextuelles-stereotypees-dans/