Bias Scores That Survive Negation: Separating Social Association from Lexical Overlap in Sentence-Encoder Bias Tests

Template-based bias tests for sentence encoders work by placing a group word ("This is Emily.") and an attribute word ("This is violent.") into short, nearly identical sentences. They then ask whether the group sentence lands closer to the attribute sentence in embedding space. The trouble is that sentence encoders are known to judge closeness mostly by shared words. Two sentences that differ by one token look similar whether or not they mean similar things. So a bias test built from nearly identical sentences may be measuring word overlap, word frequency, and template wording as much as social stereotype. That would explain a familiar embarrassment: changing one word in a "neutral" template can flip which model looks most biased.

We propose a simple fix and a way to check whether it works. A real stereotypical association between a group and "violent" should reverse when the attribute is negated ("is not violent"). It should also carry over to a logically equivalent rephrasing ("is not peaceful"). A pure word-overlap artifact does neither. We build a bias estimator that counts only the part of the association that reverses under negation and transfers to antonym rephrasings. Every sentence in the comparison shares the template, so the template's contribution cancels by construction. We test this estimator against an encoder fine-tuned to contain a known association, and against a control encoder that has seen only matching word co-occurrence. A valid ruler must tell these two apart.

Core Claim

Much of the inconsistency in template-based bias estimators comes from a confound with a known mechanism. In raw contextual encoders, cosine similarity tracks surface edit distance and token frequency. Bias tests compare sentences that differ by one or two tokens, so their scores inherit that geometry. We claim that a polarity-contrast estimator removes most of this confound. It is a difference-in-differences across group and attribute polarity, gated by an antonym-consistency check. We expect it to be more stable across templates, to detect injected associations while ignoring co-occurrence-only controls, and to track downstream fairness measures better than existing estimators. We also expect it to reveal something uncomfortable. For negation-blind encoders, almost no measurable social association survives, which means their existing bias scores are mostly lexical.

Where This Comes From

Two literatures motivate the claim, and they have not been put together.

On the bias-measurement side, several studies document that the rulers are unstable but do not explain why:

  • On Measuring Social Biases in Sentence Encoders introduced the Sentence Encoder Association Test (SEAT), which uses "semantically bleached" templates. It found that templating produces more significant bias than isolated words, and it attributed erratic contextual-model results to an unexplained failure of cosine similarity.
  • Measuring Fairness with Biased Rulers showed three things. Single-word template changes flip rankings. Correlations between templates are weak or negative. Intrinsic scores do not track extrinsic fairness on BiasInBios or WinoBias. It also found that target-token embeddings are more stable than the [CLS] vector.
  • Bad Seeds showed, for static embeddings only, that seed-word frequency and similarity drive bias-subspace estimates.
  • Measuring Biases of Word Embeddings: What Similarity Measures and Descriptive Statistics to Use? showed that the choice of distance and aggregation alone moves WEAT effect sizes. The mean effect size is 0.72 under cosine and 0.58 under Mahalanobis distance.

These papers document the instability. We use them as evidence of the gap, and we reuse their template sets and stability protocol.

On the lexical-overlap side, other papers supply the mechanism:

  • On the Sentence Embeddings from Pre-trained Language Models showed that raw BERT sentence embeddings sit in a narrow cone. Their cosine correlates with edit distance at −50.49. A normalizing flow, BERT-flow, reduces this to −28.01. It does not add information the encoder lacks.
  • It Is Not Easy To Detect Paraphrases built the SemAntoNeg benchmark. The task is to pick the true paraphrase from three candidates: an antonym sentence, a negated sentence, or a negated-antonym sentence. All-MiniLM-L6-v2 scores 1.9%, far below the 33.3% random baseline. Encoders fine-tuned on natural language inference (NLI, the task of judging whether one sentence follows from another) reach 93.6%.
  • ALIGN-SIM found an "antonym blind spot" across 13 encoders.

The SemAntoNeg contrast between affirmed, negated and antonym forms is exactly the probe we turn into a bias estimator.

One negative result constrains the design. Stubborn Lexical Bias in Data and Models found that removing unigram shortcuts pushes models onto bigram shortcuts. We therefore do not try to "regress out" a single overlap feature. We cancel template overlap through the structure of the comparison, and we evaluate against a control that matches co-occurrence statistics.

The Estimator

Notation:

  • $X$ and $Y$ are two target groups, each a set of group words.
  • $A$ is an attribute word, $\bar{A}$ is its WordNet antonym, and $\neg A$ is the negated attribute ("not violent").
  • $T$ is a template.
  • $s_T(x, a)$ is the cosine similarity between the template sentence for group word $x$ and the template sentence for attribute form $a$, both in template $T$.

The polarity-contrast bias for one attribute and one template is:

$$ B_T(A) = \mathbb{E}_{x \in X}\big[s_T(x, A) - s_T(x, \neg A)\big] - \mathbb{E}_{y \in Y}\big[s_T(y, A) - s_T(y, \neg A)\big]. $$

Template tokens, the group word, and the negation word each appear on both sides of a subtraction, so their overlap contributions cancel. What remains is the part of the group–attribute association that depends on polarity.

We pair this score with an antonym-consistency gate. For each encoder and attribute, we measure how often the encoder places "is not peaceful" closer to "is violent" than to "is not violent." This is a SemAntoNeg-style check run on the attribute vocabulary itself. When an encoder fails the gate for an attribute, we report $B_T(A)$ for that attribute as not identifiable, rather than reporting it as zero or nonzero. We consider an estimate trustworthy only when two conditions hold:

  • the encoder passes the gate, and
  • $B_T(A)$ computed with $\neg A$ agrees in sign and rough size with the version computed with $\bar{A}$ in place of $\neg A$.

Research Program

Corpus. We will build a polarity-expanded version of the SEAT target and attribute sets. Each attribute word gets an antonym from WordNet, chosen the same way SemAntoNeg chose its antonyms. Each item is rendered as affirmed, negated, antonym and negated-antonym sentences. The templates are the original SEAT bleached templates plus single-word variants of the kind that Measuring Fairness with Biased Rulers showed to flip rankings. Native speakers will check every sentence, and attributes without a clean antonym will be dropped.

Encoders. The encoder pool spans the range of negation sensitivity:

  • BERT, read out three ways: [CLS], mean-pooled, and target-token;
  • BERT with BERT-flow;
  • all-MiniLM-L6-v2;
  • several NLI-tuned encoders from the SemAntoNeg pool;
  • GPT and ELMo representations as used in SEAT.

Diagnosis. For each encoder we first measure how much of the standard SEAT effect size is predicted by surface statistics alone. These are edit distance between template pairs, Jensen–Shannon divergence between their token distributions as in Aiming beyond the Obvious, and target-word frequency. This produces a diagnostic number: the share of SEAT variance across templates explained by surface features.

Ground truth. The key validity test needs a ruler that can be checked against a known answer. We will fine-tune copies of one base encoder under three regimes:

  • Injection: on a small corpus that attributes an arbitrary property to an arbitrary name set ("Members of group Q are reckless").
  • Co-occurrence control: on a corpus with the same unigram and bigram co-occurrence between Q-names and "reckless" but with negated or non-attributive framing ("Members of group Q are never reckless").
  • Neutral: on shuffled data.

This mirrors the logic of Bias Silhouette Analysis in Bias Silhouette Analysis, which compares a presumed-biased and a presumed-debiased model. Here the bias is planted, so we know it exists, and the control isolates lexical co-occurrence. We will use both an NLI-tuned base and a negation-blind base. That lets us see whether the estimator correctly abstains on the latter.

Baselines

The naive reference point is SEAT exactly as specified in On Measuring Social Biases in Sentence Encoders: sentence-level cosine with standard effect sizes. All baselines and our estimator run on the same encoders, the same polarity-expanded sentences (baselines use only the affirmed sentences), and the same permutation-test significance procedure.

The strongest existing method is SEAT computed on target-token embeddings rather than [CLS]. Measuring Fairness with Biased Rulers reports this as the most template-consistent choice. No reported result was found on Lacuna for its cross-template rank correlation or its correlation with BiasInBios and WinoBias; the file reports only that intrinsic–extrinsic correlation was absent. We will therefore reproduce it ourselves under our protocol. Beating it means two things:

  • a clearly higher mean pairwise Spearman correlation of model bias rankings across templates, with bootstrap confidence intervals that do not overlap;
  • correct separation of the injected encoder from the co-occurrence control where the baseline fails.

The third baseline is geometric repair: target-token SEAT computed after BERT-flow (On the Sentence Embeddings from Pre-trained Language Models) and, separately, after simple mean-centering plus whitening, with the flow tuned on the same unlabeled Wikipedia sentences for all encoders. The reported reference here is the drop in cosine–edit-distance correlation from −50.49 to −28.01. We will check whether that drop translates into stable bias rankings.

The final baseline is a regression residual. SEAT similarities are regressed on edit distance, Jensen–Shannon divergence and frequency, and bias is computed on the residuals.

Two ablations isolate the key ingredient:

  • the difference-in-differences without the antonym gate, which tests whether the gate matters;
  • the gate applied to plain SEAT without the polarity contrast, which tests whether the contrast matters.

Why not just…?

Why not just whiten the space or apply BERT-flow before running SEAT? This is the most serious competitor, and we expect it to recover part of the stability gain. Isotropy removes the shared cone that inflates all cosines. However, On the Sentence Embeddings from Pre-trained Language Models leaves an edit-distance correlation of −28.01 after the flow. A flow also cannot teach a negation-blind encoder to separate "violent" from "not violent." The injection-versus-co-occurrence experiment settles the question. If flowed SEAT separates those two encoders as well as our estimator does, the polarity contrast adds nothing, and we will report that.

Why not just average over many more templates and metrics? Averaging cancels noise only if the noise is independent of the signal. Measuring Fairness with Biased Rulers found template correlations that are weak or negative. Bias Silhouette Analysis found that longer word lists did not improve robustness or accuracy. A systematic overlap confound shared by all templates survives averaging. We will include a 50-template average as an extra arm of the naive baseline. It should still fail the co-occurrence control.

Why not just measure bias only in NLI-tuned encoders, which handle negation? NLI tuning addresses the negation blind spot (It Is Not Easy To Detect Paraphrases) but not lexical shortcuts in general. Stubborn Lexical Bias in Data and Models found significant shortcut reliance in SNLI-trained models even after reweighting. More practically, people need to audit the encoders they actually deploy, many of which are not NLI-tuned. Our gate makes this explicit: it says where a bias estimate is identifiable rather than silently returning a number.

Why not just regress out edit distance? It is cheap and is included as a baseline. The bigram whack-a-mole effect in Stubborn Lexical Bias in Data and Models suggests that removing named surface features leaves unnamed ones in place. The difference-in-differences cancels whatever template overlap exists without having to list it.

Decisive Checks

The proposal succeeds if three results hold together:

  1. The polarity-contrast estimator flags the injected encoder and stays near zero on the co-occurrence control, for both NLI-tuned and negation-blind bases, while plain and target-token SEAT flag both.
  2. Its cross-template ranking stability exceeds that of target-token SEAT and flowed SEAT.
  3. On gated attributes, its correlation with BiasInBios gender gaps and WinoBias accuracy gaps is positive and larger than that of the baselines, where Measuring Fairness with Biased Rulers reports none for existing metrics.

There is also a diagnostic result that matters regardless of which estimator wins. For all-MiniLM-L6-v2 we expect the gate to reject most attributes. Its 1.9% SemAntoNeg score predicts that it cannot represent the negation the test depends on. That would show that published bias scores for such encoders reflect word overlap, not stereotype. If instead the gate passes and the contrast reproduces plain SEAT rankings, the lexical-confound hypothesis is wrong for that encoder, and we will say so.