CoolFace
Modelpublic

francesco-zatto/twitter-roberta-base-hate-freeze-all-sexism-detector

sourceHugging Faceupdated 6mo agoView on Hugging Face
1likes10downloads
Model Card

RoBERTa Sexism Classifier (Linear Probing / Freeze All)

This model is a fine-tuned version of cardiffnlp/twitter-roberta-base-hate, trained for multi-class sexism detection on the EXIST 2023 Task 2 dataset.

Experiment Details: freeze_all

This repository contains the Linear Probing variant of our ablation study.

  • —All parameters in the base RoBERTa model (model.roberta.parameters()) were frozen during training.
  • —Only the final classification head was trained.
  • —This approach protects the pre-trained weights from catastrophic forgetting and speeds up training, though it relies entirely on the base model's existing feature representations.

Intended Use

Categorizes English tweets into one of four sexist intentions:

  1. 1.- (Non-sexist)
  2. 2.DIRECT (Directly sexist messages)
  3. 3.JUDGEMENTAL (Messages condemning sexist behaviors)
  4. 4.REPORTED (Messages reporting a sexist situation)

Preprocessing

Inputs must be preprocessed to match the CardiffNLP base model formatting:

  • —Replace user mentions (@user) with the token @user
  • —Replace URLs with the token http

Evaluation Results (Test Set)

  • —Macro F1: 0.3896
  • —Precision: 0.3981
  • —Recall 0.4010

How to Use

python
from transformers import AutoTokenizer, AutoModelForSequenceClassification

repo_id = "francesco-zatto/twitter-roberta-base-hate-freeze-all-sexism-detector"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSequenceClassification.from_pretrained(repo_id)

inputs = tokenizer("Your cleaned tweet text here", return_tensors="pt")
outputs = model(**inputs)