Abstract
In this work we explore the effect of incorporating demographic metadata in a text classifier trained on top of a pre-trained transformer language model. More specifically, we add information about the gender of critics and book authors when classifying the polarity of book reviews, and the polarity of the reviews when classifying the genders of authors and critics. We use an existing data set of Norwegian book reviews with ratings by professional critics, which has also been augmented with gender information, and train a document-level sentiment classifier on top of a recently released Norwegian BERT-model. We show that gender-informed models obtain substantially higher accuracy, and that polarity-informed models obtain higher accuracy when classifying the genders of book authors. For this particular data set, we take this result as a confirmation of the gender bias in the underlying label distribution, but in other settings we believe a similar approach can be used for mitigating bias in the model.
Introduction
Machine learning models are notorious for inheriting the biases of their training data. While standard practice often involves hiding demographic information to prevent biased decision-making, this research investigates the inverse: explicitly providing demographic metadata to a model to probe and confirm existing cultural biases.
The study focuses on Norwegian professional book reviews, where previous sociological research suggested that female critics tend to give lower ratings to female authors compared to other gender pairings. By providing a state-of-the-art transformer model (BERT) with explicit gender information, the authors sought to determine if the model would exploit these patterns to improve its predictive accuracy, thereby serving as a diagnostic tool for data bias.
Methodology
The researchers developed a metadata-enriched architecture built upon NorBERT, a BERT-based language model pre-trained on Norwegian text. The pipeline consists of four primary stages:
- Text Encoding: Review text is processed through NorBERT to generate a document-level representation.
- Metadata Injection: Demographic variables (critic gender, author gender) or sentiment polarity are one-hot encoded.
- Concatenation: The text representation and metadata vector are fused into a single feature vector.
- Classification: The combined vector is passed through a two-layer Multilayer Perceptron (MLP) with a Softmax output to predict sentiment or gender.
By comparing this informed model against a text-only baseline, the study quantifies the extent to which demographic signals influence predictive performance.
Dataset and Bias Analysis
The study utilizes NoReC_gender, a subset of the Norwegian Review Corpus containing 4,313 professional reviews. Numerical ratings (1–6) were converted into binary sentiment (Positive: 5–6, Negative: 1–3). The dataset includes manual gender annotations for both critics and authors.
Analysis of the label distribution reveals a distinct "FF" (Female critic reviewing Female author) signal. In this category, negative ratings significantly outweigh positive ones, a pattern less pronounced in other pairings such as "MM" (Male-Male).
Key Results
The inclusion of metadata led to consistent performance gains, confirming that the model uses gender as a shortcut for sentiment prediction:
- Sentiment Analysis: The baseline NorBERT (text only) achieved an F1 score of 80.66. Adding both author and critic gender metadata (NorBERT-gac) increased this to 82.92.
- Author Gender Prediction: When predicting the author's gender from the text, adding the review's polarity as metadata boosted the F1 score from 90.12 to 94.60.
- Critic Gender Prediction: Conversely, adding polarity metadata reduced the model's ability to predict critic gender (dropping from 63.84 to 57.76), suggesting that critic gender is less directly correlated with simple sentiment than author gender is in this corpus.
Discussion and Conclusion
The primary insight of this work is that metadata can serve as a powerful diagnostic tool. If a model's accuracy improves significantly upon receiving demographic data, it confirms that the "ground truth" labels are statistically correlated with those demographics.
Furthermore, the baseline model could predict an author's gender with ~90% F1 accuracy using text alone, indicating that the language used by critics is itself deeply gendered. While this study uses metadata to expose bias, the authors suggest future applications could use similar techniques to mitigate bias, helping models distinguish between harmful stereotypes and the nuanced language of specific demographic groups. Ultimately, higher performance metrics in this context do not indicate a "better" model, but rather one that has successfully learned to navigate a biased data distribution.
Summary updated