Dynamic Bias in Contextualized Word Representations

68 concepts54 papers1 proposal

In early representation learning, words had permanent homes. In static embedding spaces like Word2Vec or GloVe, the word "doctor" or "nurse" was mapped to a single, fixed vector. Because these spaces were rigid, societal bias was treated as a static geometric problem: a straight line cutting through the vector space representing a "gender axis." If you could project the word vectors onto a subspace orthogonal to this axis, the bias was thought to be solved.

Modern language models, however, do not use static homes. In transformer-based architectures, representations are contextualized—the embedding of a word shifts dynamically depending on every other token in the sentence. This architectural shift fundamentally changes how bias manifests, renders traditional static debiasing techniques ineffective, and forces us to view bias not as a fixed point, but as a moving target.

The Geometry of Moving Targets

When word representations are dynamic, identifying a stable bias direction becomes exceptionally difficult. As Dev et al. observe in On Measuring and Mitigating Biased Inferences of Word Embeddings, because contextualized models do not produce a single fixed vector for a concept, standard geometric evaluations designed for static vectors fail to capture the full picture.

Instead of a single point in space, a word in a contextualized model occupies a cloud or a distribution of points. The word "nurse" in "The nurse administered the medicine" sits in a different position than in "The hospital hired a new nurse."

This fluid geometry means that bias is deeply intertwined with syntax and context. As demonstrated by Zhao et al. in Gender Bias in Contextualized Word Embeddings, contextualized representations encode bias through a multidimensional structure. This structure separates the explicit gender of the surrounding context from the stereotypical gender associated with specific nouns. Bias is no longer a simple linear vector; it is a complex composite of multiple linguistic and social factors.

Why Superficial Debiasing Fails

If contextualized embeddings are biased, a tempting solution might be to simply scrub the bias from the model's initial lookup table—the embedding layer—before the text is processed by the transformer's attention blocks.

However, this superficial fix fails because of how transformers synthesize information across layers. In Towards a Comprehensive Understanding and Accurate Evaluation of Societal Biases in Pre-Trained Transformers, Silva et al. demonstrate that reducing bias within the initial embedding layer does not guarantee a reduction in biased behavior at the sequence or sentence level. Even when embedding-based bias metrics are minimized to near zero, downstream tasks continue to exhibit significant demographic disparities.

The reason for this disconnect is that societal biases are deeply integrated into the model's internal attention weights and contextual layers, not just its vocabulary representations. If a transformer has learned a correlation between certain non-demographic context words and a stereotype, it can bypass a "clean" input token entirely. The attention mechanism reconstructs the biased associations dynamically by drawing signals from the surrounding sentence structure.

Measuring Bias as a Distribution

Because a word's representation changes with every sentence, testing a model on a handful of isolated word pairs or rigid sentence templates provides an incomplete and potentially misleading assessment. To accurately quantify dynamic bias, researchers must evaluate models across a broad distribution of contexts.

In Detecting Emergent Intersectional Biases: Contextualized Word Embeddings Contain a Distribution of Human-like Biases, Wei Guo addresses this challenge by sampling a large corpus of diverse, real-world sentence contexts for each target word. Instead of relying on static templates, this approach measures how a model behaves across a wide distribution of linguistic scenarios, ensuring that the resulting bias measurement reflects real-world deployment.

Static Evaluation:
[Target Word] ---> Single Vector ---> Measure Bias Axis (Fails to capture context)

Distributional Evaluation:
Context A: "The physician walked..." ----\
Context B: "A premier physician..."  -----> [Transformer Layers] ---> Distribution of Vectors ---> Aggregate Bias
Context C: "Call the physician..."   ----/

Similarly, Tan et al. in Assessing Social and Intersectional Biases in Contextualized Word Representations adapt traditional word embedding association tests to the contextual paradigm. By measuring the cosine similarity between target word vectors and attribute vectors within specific sentence templates, the authors reveal that granular, context-dependent evaluations can uncover pronounced racial and intersectional biases that are often completely masked when looking only at aggregated sentence-level representations.

The Mutual Influence of Context and Stereotypes

The relationship between a word and its context is not a one-way street; it is a mutual feedback loop. While the context shapes the word's representation, the stereotypical associations of the word also warp how the model interprets the context.

This phenomenon is captured by An et al. in On the Mutual Influence of Gender and Occupation in LLM Representations. By isolating and tracking the internal "gender direction" within large language models, the authors found that the internal representation of a gender-neutral name is dynamically altered by the presence of a stereotyped occupation title in the same sentence.

When a model processes a phrase like "The accountant introduced themselves," the internal representation of the accountant shifts along the model's gender axis based on pre-existing data correlations. This mutual influence means that biases are actively constructed and reinforced in real-time as the model processes text, directly driving biased predictions in downstream tasks like hiring or coreference resolution.

Shifting Mitigation to Contextual Layers

Because bias is dynamically generated across the entire depth of a transformer network, effective mitigation strategies must operate across the model's contextual layers rather than just the input space.

Instead of performing a single geometric projection at the beginning of the network, modern approaches integrate debiasing constraints throughout the fine-tuning process. For example, in Debiasing Pre-trained Contextualised Embeddings, Kaneko et al. propose a method that forces the internal representations of neutral words to be mathematically orthogonal to demographic attributes across all layers of models like BERT and RoBERTa.

By recognizing that representations are dynamic and layer-dependent, these techniques successfully suppress the model's ability to reconstruct biased axes during inference. This shift from static token-level filtering to dynamic, layer-wise regularization represents the core paradigm shift in making modern, context-aware language models fair.

Key Foundational Work

Evaluating the Underlying Gender Bias in Contextualized Word Embeddings (2019) — contributed 3 concept elements to this direction.
Detecting Emergent Intersectional Biases: Contextualized Word Embeddings Contain a Distribution of Human-like Biases (2020) — contributed 3 concept elements to this direction.
Transfer Learning from Pre-trained BERT for Pronoun Resolution (2019) — contributed 2 concept elements to this direction.
History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 55 papers
  2. Version 1 · 2026-10-04 · 62 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_context_dependent_bias_contextualized_re_6bc90e0f,
  title = {context-dependent bias (contextualized representation bias)},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/context-dependent-bias-contextualized-representation-bias/rdr_6bc90e0feff34a2b85c62354495efa77},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-25},
}

This exact version (version 2, frozen text):

@misc{lacuna_context_dependent_bias_contextualized_re_6bc90e0f_v2,
  title = {context-dependent bias (contextualized representation bias)},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/context-dependent-bias-contextualized-representation-bias/rdr_6bc90e0feff34a2b85c62354495efa77/v/2},
  note = {Version 2, frozen 2026-10-04. Accessed 2026-11-25},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake