This model is a fine-tuned version of dbmdz/bert-base-italian-xxl-uncased for the task of misogyny detection in Italian text. It identifies whether a given text contains misogynistic content (label 1) or not (label 0). The model has been trained and evaluated on the AMI (Automatic Misogyny Identification) dataset.
This model is specifically designed for detecting misogynistic content in Italian, making it useful for tasks in moderation, social media analysis, or sociolinguistic studies.
You can try this model interactively using the Misogyny Detection IT Space.
Simply enter a text prompt, and the model will classify it as 'Misogynistic' or 'Non-Misogynistic' along with a confidence score
Direct Use
This model can be used as-is for binary text classification to detect misogyny in Italian. For example:
python
1from transformers import pipeline
23classifier = pipeline("text-classification", model="maiurilorenzo/misogyny-detection-it")4output = classifier("Questo è un esempio di testo misogino.")5print(output)
Downstream Use
The model can be fine-tuned further on related datasets for similar tasks, such as hate speech detection, sentiment analysis, or offensive language detection.
Out-of-Scope Use
The model is not intended for use in tasks outside of text classification.
Avoid applying the model to non-Italian texts, as it may produce unreliable results.
Misuse for harmful, malicious, or discriminatory purposes is strictly prohibited.
Bias, Risks, and Limitations
The model inherits potential biases present in the AMI dataset. It may overfit to linguistic patterns commonly associated with misogyny in the training data and fail to generalize to less explicit forms of misogyny or more nuanced cultural contexts.
Recommendations
Use the model in conjunction with human moderation for critical tasks.
Regularly evaluate the model on updated or domain-specific datasets to ensure continued accuracy and fairness.
The model was fine-tuned using the AMI (Automatic Misogyny Identification) dataset, which contains labeled examples of misogynistic and non-misogynistic texts in Italian.
Dataset license: CC BY-NC-SA 4.0
The training set was balanced by splitting misogynistic and non-misogynistic examples into training and validation sets.
The text was tokenized using the BERT tokenizer, with a maximum sequence length of 128 tokens. Labels were mapped to the labels field as required by the Transformers library.
Training Hyperparameters
Learning Rate: 2e-5
Batch Size: 32
Epochs: 5
Evaluation Strategy: Per epoch
Metric for Best Model: F1-score
Optimizer: AdamW with weight decay 0.01
Speeds, Sizes, Times
Total Training Time: Approximately 15 minutes
Hardware Used: RTX 2060
Evaluation
Testing Data, Factors & Metrics
Testing Data
The model was evaluated on the test split of the AMI dataset, which is balanced and contains examples of both misogynistic and non-misogynistic content.
Factors
The evaluation considers factors such as:
Lexical variations
Explicit vs. implicit misogyny
Variations in Italian regional language
Metrics
The following metrics were computed for evaluation:
Accuracy
F1-score
Precision
Recall
Results
Accuracy: 0.9412
F1-score: 0.9420
Precision: 0.9291
Recall: 0.9553
Summary
The model achieves strong performance on explicit misogyny detection, with potential for improvement in detecting more subtle or implicit forms of misogyny.