Downloads · 30 days
16
4% of all-time downloads
alxdev/echocheck-political-stance
echocheck-political-stance is a text classification model from alxdev. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
A RoBERTa-based model fine-tuned for classifying political stance of text into three categories: left, center, and right.
Downloads · 30 days
16
4% of all-time downloads
All-time downloads
409
Public
Parameters
125M
499 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors499 MB · 99%
From the Hugging Face model README
A RoBERTa-based model fine-tuned for classifying political stance of text into three categories: left, center, and right.
EchoCheck is a fine-tuned RoBERTa-base model designed to classify the political leaning of news articles and political text. The model was trained on over 2.3 million news articles from the BIGNEWSBLN dataset and achieves 95.50% accuracy on the held-out test set.
This model can be used directly for:
The model can be integrated into:
This model should NOT be used for:
from transformers import RobertaForSequenceClassification, AutoTokenizer
import torch
# Load model and tokenizer
model = RobertaForSequenceClassification.from_pretrained("alxdev/echocheck-political-stance")
tokenizer = AutoTokenizer.from_pretrained("alxdev/echocheck-political-stance")
# Move to GPU if available
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model.to(device)
model.eval()
# Classify text
text = "The government should increase social spending to support working families."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512, padding=True)
inputs = {k: v.to(device) for k, v in inputs.items()}
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=-1)
prediction = probs.argmax().item()
labels = {0: "center", 1: "left", 2: "right"}
print(f"Prediction: {labels[prediction]}")
print(f"Confidence: {probs[0][prediction]:.2%}")
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="alxdev/echocheck-political-stance",
device=0 # Use GPU, or -1 for CPU
)
result = classifier("Lower taxes will stimulate economic growth and job creation.")
print(result)
# [{'label': 'LABEL_2', 'score': 0.85}] # LABEL_2 = right
| Label ID | Label Name | Description |
|---|---|---|
| 0 | center | Moderate/neutral political stance |
| 1 | left | Progressive political stance |
| 2 | right | Conservative political stance |
The model was trained on the BIGNEWSBLN dataset:
| Parameter | Value |
|---|---|
| Base Model | roberta-base |
| Optimizer | AdamW |
| Learning Rate | 2e-5 |
| Batch Size | 24 |
| Epochs | 3 |
| Warmup | 10% of total steps |
| Weight Decay | 0.01 |
| LR Schedule | Linear with warmup |
| Training Regime | FP32 |
| Loss Function | CrossEntropyLoss |
| Metric | Score |
|---|---|
| Accuracy | 95.50% |
| Macro F1 | 95.49% |
| Weighted F1 | 95.49% |
| Class | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| Center | 0.949 | 0.955 | 0.952 | 77,220 |
| Left | 0.953 | 0.964 | 0.959 | 77,951 |
| Right | 0.963 | 0.945 | 0.954 | 77,987 |
| Predicted Center | Predicted Left | Predicted Right | |
|---|---|---|---|
| Actual Center | 73,756 | 1,890 | 1,574 |
| Actual Left | 1,543 | 75,164 | 1,244 |
| Actual Right | 2,426 | 1,826 | 73,735 |
The model achieves strong performance across all three political stance categories with balanced precision and recall. The slight confusion between "center" and "right" categories is expected given the nuanced nature of political language.
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
If you use this model in your research, please cite:
BibTeX:
@misc{morariu2026echocheck,
author = {Morariu, Alexandru-Gabriel},
title = {EchoCheck: Political Stance and Ideology Classification using NLP Techniques},
year = {2026},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/alxdev/echocheck-political-stance}},
note = {Bachelor's Thesis, "Titu Maiorescu" University}
}
APA:
Morariu, A.-G. (2026). EchoCheck: Political Stance Classification using RoBERTa. HuggingFace. https://huggingface.co/alxdev/echocheck-political-stance
Alexandru-Gabriel Morariu