Skip to main contentSkip to user menuSkip to navigation

Social Bias: CrowS-pairs, BBQ & BOLD

Master social bias measurement: CrowS-pairs stereotypes, BBQ question bias, BOLD dataset, and production bias mitigation strategies.

50 min readAdvanced
Not Started
Loading...

What is social bias measurement?

Social bias measurement checks whether a model or AI product creates systematically different language, assumptions, errors, or outcomes for social groups. It turns a broad concern such as "the assistant treats people unfairly" into declared harms, comparable test conditions, slice-level counts, uncertainty, and a release decision.

The core invariant is controlled comparison: compare groups under the same task, prompt meaning, sampling policy, scorer, and product policy. Every reported rate must retain its numerator, denominator, and uncertainty. An average without those details can hide the people most affected.

This lesson builds on advanced safety evaluation, where you can review evaluator validity, release gates, and production monitoring.

1,508

CrowS-Pairs pairs

Minimal pairs probe stereotypical likelihood preferences

58,492

BBQ examples

Ambiguous and disambiguated contexts expose unsupported assumptions

23,679

BOLD prompts

Repeated open-ended generations reveal regard distributions

n + CI

Required evidence

Keep the denominator and uncertainty beside every slice rate

Start with the harm, not the benchmark

A fairness metric is useful only when it represents a plausible product harm. The same model can look acceptable on one metric and fail badly on another because each metric asks a different question.

Likelihood

Stereotype preference

Does a minimal demographic substitution make a stereotypical sentence more likely than a matched alternative? This is the shape tested by CrowS-Pairs.

Question answering

Unsupported assumption

When evidence is ambiguous, does the model infer an answer from a social stereotype instead of selecting unknown? BBQ separates this behavior from ordinary accuracy.

Open generation

Negative regard

Across repeated continuations, does one group receive more demeaning, hostile, or dismissive language? BOLD examines distributions rather than one completion.

Deployment

Product outcome gap

Do ranking, refusal, recommendation, or task-success rates differ after retrieval, prompting, moderation, and business rules are applied?

Before collecting data, write a measurement contract:

  1. Name the user-visible harm and the population that could experience it.
  2. Declare the metric direction, comparison groups, intersectional slices, and minimum denominator.
  3. Freeze prompt construction, decoding, scorer versions, and human-review guidance.
  4. Predeclare the fairness threshold and what pass, hold, and block mean for deployment.

A score near a benchmark baseline is not proof that a system is unbiased. Opposing slice effects can cancel in the aggregate, a small denominator can create a wide interval, and the benchmark may not represent the deployed task.

Use CrowS-Pairs, BBQ, and BOLD as different lenses

CrowS-Pairs measures paired likelihood preference

Each item contains a stereotypical sentence and a minimally changed anti-stereotypical sentence. A common score is the percentage of valid pairs for which the model assigns greater likelihood to the stereotypical sentence.

  • Keep the pair intact so lexical and grammatical changes do not become confounders.
  • Report the number of valid pairs, preference rate, paired effect size, and interval by bias type.
  • Inspect items manually because a minimal text edit can still alter fluency or meaning.
  • Do not read 50% as a universal fairness target; it is a reference point for this paired task.

BBQ separates ambiguity from answerable context

BBQ presents related question-answering cases with either ambiguous or disambiguated evidence. In an ambiguous case, choosing a person based on stereotype is the failure; in a disambiguated case, the model must still use the stated facts correctly.

  • Ambiguous context: measure unsupported stereotype-aligned answers and appropriate unknown selections.
  • Disambiguated context: measure task accuracy and whether errors differ by group.
  • Joint interpretation: a model that always refuses may reduce assumptions while destroying useful accuracy.

BOLD measures a generation distribution

BOLD prompts models to continue text about professions and social groups. One completion is not enough because decoding is stochastic and rare harmful generations matter.

  • Generate multiple continuations with a frozen sampling policy.
  • Score regard, sentiment, toxicity, and representation, then audit scorer errors by group.
  • Compare full distributions and tail rates instead of only average sentiment.
  • Treat repeated generations from one prompt as a cluster, not as fully independent prompts.

Turn a concern into comparable evidence

  1. 1

    Contract

    Declare the harm

    Name the affected workflow, metric, direction of harm, and consequence of crossing the threshold.

  2. 2

    Design

    Construct matched cases

    Hold task meaning constant, include counterfactual substitutions, and declare intersectional slices before seeing results.

  3. 3

    Evidence

    Sample and score

    Version the model, prompt, decoding policy, automated scorers, and human-audit rubric.

  4. 4

    Decision

    Gate and monitor

    Use slice intervals for release, then watch product outcomes during a bounded canary with rollback thresholds.

Estimate evaluation volume before running it

Suppose a team declares 12 product-relevant slices, selects 250 prompts per slice, and draws 5 continuations per prompt:

  • Generations: 12 x 250 x 5 = 15,000.
  • At 180 output tokens per generation: about 2.7 million output tokens.
  • With two automated scorers: 30,000 scoring jobs, plus a stratified human audit.
  • The slice denominator is still the evidence used by that metric: valid pairs for CrowS-Pairs, ambiguous cases for a BBQ assumption rate, or scored prompt-completion samples for BOLD.

More samples narrow random uncertainty, but they do not repair biased prompts, a miscalibrated regard classifier, or missing populations. When several generations share one prompt, use a prompt-cluster bootstrap or hierarchical model rather than pretending every completion is independent.

Intersectional fairness gate

Decide with the slice, denominator, and interval

Switch the harm metric and reporting slice, scale independent coverage, and move the declared fairness threshold. The deployment action uses the plausible gap, not only its point estimate.

Loading slice evidence...

Build a versioned evaluation and release path

Bias evidence from test case to release gate

Every artifact is versioned so a score can be reproduced and a deployment decision can be audited.

Harm, slices, thresholds

Evaluation contract

Own the definitions of a harmful event, comparison group, intersectional slice, and minimum evidence.

Prompts and decoding

Controlled sampler

Construct matched prompts, allocate slice coverage, and record seeds and decoding parameters.

Complete product path

Model plus policy

Evaluate the deployed prompt, retrieval, model, reranker, refusal, and moderation stack together.

Automated plus human

Scoring and audit

Run task-specific scorers, estimate scorer error by group, and adjudicate sampled disagreements.

Counts, intervals, action

Slice store and gate

Persist numerators and denominators, compare confidence bounds with thresholds, and emit pass, hold, or block.

Store raw evidence separately from derived summaries. A report row should be traceable to a suite version, model and policy version, scorer version, prompt ID, slice keys, event label, and review status. Recomputing a threshold must not require regenerating the model outputs.

Expect measurement failures before model failures

  • The aggregate passes while an intersection fails.
    • Single-axis or global averages can dilute a small but high-harm slice.
    • Keep declared intersections in the release table even when their denominator is small; mark them inconclusive and collect targeted evidence.
  • The evaluator behaves differently by group.
    • A sentiment or toxicity classifier can create the disparity it claims to measure.
    • Audit false positives and false negatives by slice, and use human adjudication for threshold-near cases.
  • Matched prompts are not actually matched.
    • A demographic substitution can change grammar, cultural meaning, or factual plausibility.
    • Validate semantic equivalence and report excluded pairs instead of silently shrinking the denominator.
  • More samples create false confidence.
    • Repeated completions from one prompt share context and are correlated.
    • Larger samples narrow random error but preserve prompt selection bias and systematic scorer error.
  • Many slice tests create chance discoveries.
    • Predeclare primary slices, publish all tested slices, and use multiplicity-aware intervals or a hierarchical model.
    • Confirm newly discovered failures on a held-out suite before changing policy.

Mitigation changes more than the bias metric

A mitigation is part of the product behavior, so evaluate its consequences on the same traffic contract. A targeted reranker may reduce harmful generations but add latency and false interventions. A broad refusal rule may close a measured gap while denying benign requests unevenly.

Compare at least these outcomes:

  • Harm rate and fairness gap, with denominators and uncertainty.
  • Task success or quality retention for the same slices.
  • False interventions on benign requests.
  • Added generations, scoring work, latency, and serving cost.
  • Residual failures that require human review, escalation, or rollback.

The next lab separates evaluation sampling from deployment mitigation. Increasing samples changes confidence and evaluation cost; selecting a mitigation changes user-visible behavior.

Sampling and mitigation consequences

Separate confidence from deployed behavior

Choose a product mitigation, then change evaluation samples per prompt. Sampling changes denominator, uncertainty, and evaluation cost; mitigation changes harm, latency, utility, and false interventions.

Loading mitigation evidence...

Implement a denominator-aware gate

The example below groups binary harm observations, computes Wilson intervals for each group, estimates the gap interval, and returns one of three actions. It keeps the threshold policy separate from data collection so a reviewer can reproduce both the evidence and the decision.

Intersectional slice evidence and fairness gate

Use the example as a reporting boundary, not as a complete fairness definition:

  • Replace the simple gap interval with a prompt-cluster bootstrap when prompts have repeated generations.
  • Add scorer-audit uncertainty when labels come from an automated evaluator.
  • Keep reference-group choice and metric direction explicit in configuration.
  • Require a minimum denominator even when a wide interval happens to fall below the threshold.

Operate fairness as a release and monitoring loop

  1. 1

    Before traffic

    Offline gate

    Block clear threshold violations, hold inconclusive slices, and preserve every tested result.

  2. 2

    Limited exposure

    Shadow and canary

    Run the candidate on representative traffic, then expose a bounded cohort only after task and fairness gates pass.

  3. 3

    Production

    Slice monitoring

    Track product outcomes, abstentions, complaints, and scorer drift with privacy-safe slice keys and minimum-count suppression.

  4. 4

    Incident response

    Rollback and learn

    Rollback on declared thresholds, preserve affected evidence, audit root cause, and add a regression slice before re-release.

Deployment decisions are asymmetric

Not global release

Pass earns a canary

Offline evidence supports limited exposure. It does not prove every production population or adversarial context is safe.

Collect evidence

Hold means uncertainty

When the plausible gap crosses the threshold, increase independent slice coverage or improve the measurement design before deciding.

Target remediation

Block names a harm

Do not optimize a global score. Fix the failing path, rerun unaffected quality gates, and verify the targeted slice on held-out cases.

After release

Monitoring protects the contract

Population mix, prompts, model versions, and scorers drift. Alert on both outcome gaps and evidence quality, including denominator collapse.

No quiz questions available
Could not load questions file
Spotted an issue or have a better explanation? This page is open source.Edit on GitHub·Suggest an improvement