Model Card for framing-bert-model

This model is a fine-tuned BERT-based classifier designed to detect media framing, following Entman's framing theory. The model classifies news texts based on predefined framing categories, enabling researchers to conduct computational framing analysis.

Model Details

Model Description

  • Developed by: Nurdyansa
  • Model type: BERT-based text classification model
  • Language(s): English
  • License: MIT
  • Finetuned from model: bert-base-uncased

Framing-BERT: Multi-label Classification for Framing Elements Detection

This repository provides a fine-tuned BERT-based model for detecting framing elements in text, particularly based on the four key elements identified by Entman (1993). The model is designed to classify multiple framing elements simultaneously using multi-label classification.

Framing Elements

The model predicts the presence of the following framing elements, derived from Entman's framing theory:

  • define_problem – Indicates whether the text defines a social or political problem.
  • diagnose_cause – Detects if the text attributes causes or sources for the issue.
  • moral_judgment – Identifies normative or value-laden evaluations.
  • suggest_remedy – Indicates whether the text proposes solutions, actions, or remedies.

These categories correspond to Entman’s (1993) core functions of framing: defining problems, diagnosing causes, making moral judgments, and suggesting remedies.

Model Information

  • Base model: bert-base-uncased
  • Fine-tuned task: Multi-label text classification
  • Number of labels: 4
  • Best performance (F1 Macro): 0.6386

Training Details

  • Optimizer: AdamW
  • Scheduler: Linear with warmup
  • Hyperparameter search: Optuna
  • Best hyperparameters:
    • learning_rate: 4.24e-05
    • weight_decay: 0.222
    • num_train_epochs: 3

Metrics per Epoch (Best Run)

Epoch Train Loss Val Loss Accuracy F1 Macro Precision Macro Recall Macro
1 0.6594 0.6530 0.220 0.6758 0.5775 0.8178
2 0.6027 0.6355 0.2317 0.6329 0.6204 0.6490
3 0.5577 0.6404 0.2283 0.6386 0.6280 0.6566

Example Prediction

Predicted Labels:
{
  "define_problem": True,
  "diagnose_cause": True,
  "moral_judgment": True,
  "suggest_remedy": True
}

How to Use

from transformers import BertTokenizerFast, BertForSequenceClassification
import torch

tokenizer = BertTokenizerFast.from_pretrained("nurdyansa/framing-bert-model")
model = BertForSequenceClassification.from_pretrained("nurdyansa/framing-bert-model")

text = "Government policies have led to an increase in unemployment, which is unacceptable and must be addressed through immediate reform."

inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
with torch.no_grad():
    logits = model(**inputs).logits
predictions = torch.sigmoid(logits).squeeze().tolist()

labels = ["define_problem", "diagnose_cause", "moral_judgment", "suggest_remedy"]
predicted_labels = {label: pred > 0.5 for label, pred in zip(labels, predictions)}
print(predicted_labels)

Citation

If you use this model in your research or application, please cite it as:

@misc{nurdyansa_2025,
    author       = { Nurdyansa },
    title        = { framing-bert-model (Revision f03db73) },
    year         = 2025,
    url          = { https://huggingface.co/nurdyansa/framing-bert-model },
    doi          = { 10.57967/hf/5387 },
    publisher    = { Hugging Face }
}

Contributing

I'm very welcome to invite researchers and practitioners to collaborate in enhancing this model’s precision. Please contribute by:

  • Providing more annotated data.
  • Improving label consistency or adding nuance.
  • Suggesting improvements to model architecture or training methods.

If you are interested in collaborating, sharing insights, or further developing this model, feel free to reach out:

📧 Email: nurdyansa@gmail.com

Downloads last month
22
Safetensors
Model size
109M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for nurdyansa/framing-bert-model

Finetuned
(5458)
this model