Fast binary classifier that detects whether text contains propaganda techniques.
This model is Stage 1 of the NCI (Narrative Credibility Index) two-stage propaganda detection pipeline:
The binary detector serves as a fast filter with high recall, passing flagged content to the more detailed technique classifier.
| Label | Description |
|---|---|
no_propaganda |
Text does not contain propaganda techniques |
has_propaganda |
Text contains one or more propaganda techniques |
Test Set Results:
| Metric | Score |
|---|---|
| Accuracy | 99.5% |
| F1 Score | 99.6% |
| Precision | 99.2% |
| Recall | 100.0% |
| ROC AUC | 99.9% |
from transformers import pipeline
detector = pipeline(
"text-classification",
model="synapti/nci-binary-detector"
)
text = "The radical left is DESTROYING our country!"
result = detector(text)[0]
print(f"Label: {result['label']}") # 'has_propaganda' or 'no_propaganda'
print(f"Confidence: {result['score']:.2%}")
For best results, use with the technique classifier:
from transformers import pipeline
# Stage 1: Binary detection
detector = pipeline("text-classification", model="synapti/nci-binary-detector")
# Stage 2: Technique classification (only if propaganda detected)
classifier = pipeline("text-classification", model="synapti/nci-technique-classifier", top_k=None)
text = "Your text to analyze..."
# Quick check first
detection = detector(text)[0]
if detection["label"] == "has_propaganda" and detection["score"] > 0.5:
# Detailed technique analysis
techniques = classifier(text)[0]
detected = [t for t in techniques if t["score"] > 0.3]
for t in detected:
print(f"{t['label']}: {t['score']:.2%}")
else:
print("No propaganda detected")
Trained on synapti/nci-propaganda-production:
@inproceedings{da-san-martino-etal-2020-semeval,
title = "{S}em{E}val-2020 Task 11: Detection of Propaganda Techniques in News Articles",
author = "Da San Martino, Giovanni and others",
booktitle = "Proceedings of SemEval-2020",
year = "2020",
}
@misc{nci-binary-detector,
author = {NCI Protocol Team},
title = {NCI Binary Detector},
year = {2024},
publisher = {HuggingFace},
url = {https://huggingface.co/synapti/nci-binary-detector}
}
Apache 2.0
checkpoint-200/optimizer.pt 1.2 GBcheckpoint-400/optimizer.pt 1.2 GBcheckpoint-600/optimizer.pt 1.2 GBcheckpoint-200/model.safetensors 598 MBcheckpoint-400/model.safetensors 598 MBcheckpoint-600/model.safetensors 598 MBmodel.safetensors 598 MBcheckpoint-200/rng_state.pth 14.6 kBcheckpoint-400/rng_state.pth 14.6 kBcheckpoint-600/rng_state.pth 14.6 kBcheckpoint-200/training_args.bin 5.8 kBcheckpoint-400/training_args.bin 5.8 kBcheckpoint-600/training_args.bin 5.8 kBtraining_args.bin 5.8 kBcheckpoint-200/scheduler.pt 1.5 kBcheckpoint-400/scheduler.pt 1.5 kBcheckpoint-600/scheduler.pt 1.5 kBcheckpoint-200/scaler.pt 1.4 kBcheckpoint-400/scaler.pt 1.4 kBcheckpoint-600/scaler.pt 1.4 kB有文件?提交种子。
提交种子