Updated
Browse files
README.md
CHANGED
|
@@ -1,199 +1,128 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
| 7 |
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
| 9 |
|
|
|
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
## Model Details
|
| 13 |
|
| 14 |
### Model Description
|
| 15 |
|
| 16 |
-
|
|
|
|
| 17 |
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
-
- **Model type:** [More Information Needed]
|
| 24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
-
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 27 |
|
| 28 |
-
|
| 29 |
|
| 30 |
-
|
|
|
|
|
|
|
| 31 |
|
| 32 |
-
- **Repository:** [More Information Needed]
|
| 33 |
-
- **Paper [optional]:** [More Information Needed]
|
| 34 |
-
- **Demo [optional]:** [More Information Needed]
|
| 35 |
|
| 36 |
## Uses
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
-
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
###
|
|
|
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
-
###
|
|
|
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
|
| 57 |
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 61 |
-
|
| 62 |
-
[More Information Needed]
|
| 63 |
-
|
| 64 |
-
### Recommendations
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 69 |
|
| 70 |
-
|
|
|
|
|
|
|
| 71 |
|
| 72 |
-
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
-
|
| 77 |
|
| 78 |
-
|
|
|
|
| 79 |
|
| 80 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 87 |
|
| 88 |
-
|
| 89 |
|
| 90 |
-
|
| 91 |
|
|
|
|
| 92 |
|
| 93 |
-
#### Training Hyperparameters
|
| 94 |
|
| 95 |
-
|
| 96 |
|
| 97 |
-
|
| 98 |
|
| 99 |
-
|
| 100 |
|
| 101 |
-
[More Information Needed]
|
| 102 |
|
| 103 |
## Evaluation
|
| 104 |
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 112 |
-
|
| 113 |
-
[More Information Needed]
|
| 114 |
-
|
| 115 |
-
#### Factors
|
| 116 |
-
|
| 117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 118 |
-
|
| 119 |
-
[More Information Needed]
|
| 120 |
-
|
| 121 |
-
#### Metrics
|
| 122 |
-
|
| 123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 124 |
-
|
| 125 |
-
[More Information Needed]
|
| 126 |
-
|
| 127 |
-
### Results
|
| 128 |
-
|
| 129 |
-
[More Information Needed]
|
| 130 |
|
| 131 |
#### Summary
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
## Model Examination [optional]
|
| 136 |
-
|
| 137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 138 |
-
|
| 139 |
-
[More Information Needed]
|
| 140 |
-
|
| 141 |
-
## Environmental Impact
|
| 142 |
-
|
| 143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 144 |
-
|
| 145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 146 |
-
|
| 147 |
-
- **Hardware Type:** [More Information Needed]
|
| 148 |
-
- **Hours used:** [More Information Needed]
|
| 149 |
-
- **Cloud Provider:** [More Information Needed]
|
| 150 |
-
- **Compute Region:** [More Information Needed]
|
| 151 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 152 |
-
|
| 153 |
-
## Technical Specifications [optional]
|
| 154 |
-
|
| 155 |
-
### Model Architecture and Objective
|
| 156 |
-
|
| 157 |
-
[More Information Needed]
|
| 158 |
-
|
| 159 |
-
### Compute Infrastructure
|
| 160 |
-
|
| 161 |
-
[More Information Needed]
|
| 162 |
-
|
| 163 |
-
#### Hardware
|
| 164 |
-
|
| 165 |
-
[More Information Needed]
|
| 166 |
-
|
| 167 |
-
#### Software
|
| 168 |
-
|
| 169 |
-
[More Information Needed]
|
| 170 |
-
|
| 171 |
-
## Citation [optional]
|
| 172 |
-
|
| 173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 174 |
-
|
| 175 |
-
**BibTeX:**
|
| 176 |
-
|
| 177 |
-
[More Information Needed]
|
| 178 |
-
|
| 179 |
-
**APA:**
|
| 180 |
-
|
| 181 |
-
[More Information Needed]
|
| 182 |
-
|
| 183 |
-
## Glossary [optional]
|
| 184 |
-
|
| 185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 186 |
-
|
| 187 |
-
[More Information Needed]
|
| 188 |
-
|
| 189 |
-
## More Information [optional]
|
| 190 |
-
|
| 191 |
-
[More Information Needed]
|
| 192 |
-
|
| 193 |
-
## Model Card Authors [optional]
|
| 194 |
-
|
| 195 |
-
[More Information Needed]
|
| 196 |
-
|
| 197 |
-
## Model Card Contact
|
| 198 |
-
|
| 199 |
-
[More Information Needed]
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- Bias Detection
|
| 5 |
+
- Text Classification
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
Author:
|
| 9 |
+
- Himel Ghosh
|
| 10 |
---
|
| 11 |
|
| 12 |
# Model Card for Model ID
|
| 13 |
|
| 14 |
+
This is a RoBERTa-based binary classification model fine-tuned on the BABE (URL: https://huggingface.co/datasets/mediabiasgroup/BABE)
|
| 15 |
+
dataset for bias detection in English news statements.
|
| 16 |
+
The model predicts whether a given sentence contains biased language (LABEL_1) or is unbiased (LABEL_0).
|
| 17 |
+
It is intended for applications in media bias analysis, content moderation, and social computing research.
|
| 18 |
|
| 19 |
+
## Citation
|
| 20 |
|
| 21 |
+
Please cite this Hugging Face model page:
|
| 22 |
+
|
| 23 |
+
@misc{himel7robertaBabe2025,
|
| 24 |
+
title={RoBERTa Bias Detector (fine-tuned on BABE)},
|
| 25 |
+
author={Himel Ghosh},
|
| 26 |
+
howpublished={\url{https://huggingface.co/himel7/roberta-babe}},
|
| 27 |
+
year={2025}
|
| 28 |
+
}
|
| 29 |
|
| 30 |
## Model Details
|
| 31 |
|
| 32 |
### Model Description
|
| 33 |
|
| 34 |
+
This model is a fine-tuned version of roberta-base trained to detect linguistic bias in English-language news statements.
|
| 35 |
+
The task is framed as binary classification: the model outputs LABEL_1 for biased statements and LABEL_0 for non-biased statements.
|
| 36 |
|
| 37 |
+
Fine-tuning was performed on the BABE dataset, which contains annotated news snippets across various topics and political leanings.
|
| 38 |
+
The annotations focus on whether the language used expresses subjective bias rather than factual reporting.
|
| 39 |
|
| 40 |
+
The goal of this model is to assist in detecting subtle forms of bias in media content, such as emotionally loaded language, stereotypical
|
| 41 |
+
phrasing, or exaggerated claims, and can be useful in journalistic analysis, media monitoring, or NLP research into framing and stance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 44 |
|
| 45 |
+
- **Developed by:** Himel Ghosh
|
| 46 |
+
- **Language(s) (NLP):** Python
|
| 47 |
+
- **Finetuned from model:** roberta-base
|
| 48 |
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
## Uses
|
| 51 |
|
| 52 |
+
This model is intended to support the detection and analysis of biased language in English news content. It can be used as a tool by:
|
| 53 |
|
| 54 |
+
- **Media researchers** and **social scientists** studying framing, bias, or political discourse.
|
| 55 |
|
| 56 |
+
- **Journalists and editors** aiming to assess the neutrality of their writing or compare outlets.
|
| 57 |
|
| 58 |
+
- **Developers** integrating bias detection into NLP pipelines for content moderation, misinformation detection, or AI-assisted writing tools.
|
| 59 |
|
| 60 |
+
### Foreseeable Uses:
|
| 61 |
+
- Annotating datasets for bias.
|
| 62 |
|
| 63 |
+
- Measuring bias across different news outlets or topics.
|
| 64 |
|
| 65 |
+
- Serving as an assistive tool in editorial decision-making or media monitoring.
|
| 66 |
|
| 67 |
+
### Users Affected:
|
| 68 |
+
- **Content creators** whose work may be labeled as biased or unbiased.
|
| 69 |
|
| 70 |
+
- **End-users** of applications powered by this model (e.g., fact-checking platforms, moderation systems).
|
| 71 |
|
| 72 |
+
- **Marginalized communities**, depending on how bias is defined, interpreted, and acted upon.
|
| 73 |
|
| 74 |
+
The model should be used with care in high-stakes contexts, as bias is inherently subjective and culturally contextual.
|
| 75 |
+
It is not intended to replace human judgment but to assist in surfacing potentially biased expressions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
+
### Direct Use
|
|
|
|
|
|
|
| 78 |
|
| 79 |
+
This model can be used directly for binary classification of English-language news statements to determine whether they exhibit biased language.
|
| 80 |
+
It returns one of two labels:
|
| 81 |
+
- **LABEL_0** –> Non-biased
|
| 82 |
|
| 83 |
+
- **LABEL_1** –> Biased
|
| 84 |
|
| 85 |
+
- Example usage with Hugging Face’s pipeline:
|
| 86 |
|
| 87 |
+
from transformers import pipeline
|
| 88 |
|
| 89 |
+
classifier = pipeline("text-classification", model="your-username/roberta-babe")
|
| 90 |
+
result = classifier("Immigrants are criminals.")
|
| 91 |
|
|
|
|
| 92 |
|
| 93 |
+
## Bias, Risks, and Limitations
|
| 94 |
|
| 95 |
+
While this model is designed to detect linguistic bias, it carries several limitations and risks, both technical and sociotechnical:
|
| 96 |
+
- The model was fine-tuned on the BABE dataset, which includes annotations based on human judgments that may reflect specific cultural or political perspectives.
|
| 97 |
+
- It may not generalize well to non-news text or out-of-domain content (e.g., social media, informal writing).
|
| 98 |
+
- Subtle forms of bias, sarcasm, irony, or coded language may not be reliably detected.
|
| 99 |
+
- Bias is inherently subjective: What one annotator considers biased may be seen as neutral by another. The model reflects those subjective judgments.
|
| 100 |
+
- The model does not detect factual correctness or misinformation — only linguistic bias cues.
|
| 101 |
+
- Labeling a text as “biased” may have reputational or ethical implications, especially if used in moderation, censorship, or journalistic evaluations.
|
| 102 |
|
|
|
|
| 103 |
|
| 104 |
+
### Recommendations
|
| 105 |
|
| 106 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 107 |
|
| 108 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 109 |
|
|
|
|
| 110 |
|
| 111 |
+
## Training Details
|
| 112 |
|
| 113 |
+
### Training Data
|
| 114 |
|
| 115 |
+
Training was done on the BABE Dataset: https://huggingface.co/datasets/mediabiasgroup/BABE
|
| 116 |
|
|
|
|
| 117 |
|
| 118 |
## Evaluation
|
| 119 |
|
| 120 |
+
The model was evaluated on the Test split of the BABE dataset and yielded the following metrics:
|
| 121 |
+
- **Accuracy: 0.8520**
|
| 122 |
+
- **Precision: 0.9237**
|
| 123 |
+
- **Recall: 0.8014**
|
| 124 |
+
- **F1 Score: 0.8582**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
#### Summary
|
| 127 |
+
The model achieved 85.2% Accuracy on the BABE test split, with very high Precision of 92.37% and 80.14% Recall.
|
| 128 |
+
This means the model predicts very few false positives and detects the biases that are actually biases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|