Abstract
While social biases in Large Language Models (LLMs) are well-documented, the process by which these biases are internalized during training remains under-explored. This paper presents a longitudinal "biography" of gender bias in an LSTM language model trained on English Wikipedia. We identify a three-phase lifecycle of bias—formation, consolidation, and specialization—and uncover a structural asymmetry: female gender information becomes highly localized in a specific "gender unit," while male information remains distributed. Our findings reveal that bias initially stems from simple word frequency before evolving to reflect complex real-world labor statistics, suggesting that mitigation strategies should be tailored to the model's developmental stage.
Introduction
Most research on algorithmic bias treats language models as "black boxes," evaluating them only after training is complete. This post-hoc approach limits our understanding of how bias moves from raw datasets into internal neural representations and, eventually, into model behavior. By pinpointing the "birth" of bias during training, we can move toward more surgical interventions rather than relying on blunt-force data filtering or post-training patches. This study tracks the emergence of gender bias in an LSTM model, providing a granular look at its developmental dynamics.
Methodology
The researchers trained a small-scale LSTM language model on a 90-million-word subset of English Wikipedia. The model's size allowed for frequent checkpoints to observe internal state evolution.
- Probing Classifiers: Linear classifiers were used to measure how well word embeddings distinguished gender.
- The "Gender Unit": A specific dimension in the embedding space was identified as a primary carrier of gender information.
- Evaluation Tasks: Bias was measured using an adapted Semantic Textual Similarity (STS-B) task with template sentences (e.g., "A [doctor] is playing the guitar") and compared against US Bureau of Labor Statistics data.
- Diagnostic Tools: Iterative Null-space Projection (INP) was employed to test the effect of removing gender information from embeddings.
The Three Phases of Bias Evolution
The study reveals that bias does not grow linearly but follows a predictable three-phase lifecycle:
- Formation Phase: The model identifies gender as a relevant feature for language modeling.
- Consolidation Phase: The embedding space is restructured around a newly defined "gender axis."
- Specialization Phase: Gender signals are amplified and localized, making them easier to decode and potentially easier to mitigate.
As the model progresses into the specialization phase, gender classification accuracy reaches approximately 93%. Interestingly, the model exhibits a "masculinity-as-default" pattern: female-gendered words drive the creation of a localized "gender unit," whereas male-gendered words remain distributed across multiple dimensions. This suggests the model learns "feminine" as a specific marked feature while treating "masculine" as the baseline state.
Drivers of Bias: Frequency vs. Statistics
The underlying drivers of bias shift as the model matures. In the early formation phase, internal representations are primarily correlated with simple word frequency. However, as training continues, the model begins to capture more complex Pointwise Mutual Information (PMI) patterns that align with real-world labor statistics.
By the end of the consolidation phase, the correlation between internal model bias and US labor statistics reaches roughly 40%. These internal biases are highly predictive of downstream behavior, showing a 0.60 correlation with bias scores in the STS-B task by the end of training.
Discussion and Limitations
The localization of gender information in the specialization phase makes debiasing techniques like Iterative Null-space Projection (INP) significantly more effective. Applying three iterations of debiasing at Epoch 40 reduced bias to near zero with minimal impact on language quality (perplexity), a result not achievable during the earlier formation phase.
However, several limitations remain. The study focuses on an LSTM architecture and a binary representation of gender in English. Future work should investigate whether these developmental patterns—particularly the localization of bias—generalize to Transformer-based architectures and more diverse social categories such as race or religion. Understanding the "birth" of these biases remains a critical step toward developing more robust and equitable AI systems.
Summary updated