This model is Stage 1 of the NCI (Narrative Control Index) two-stage propaganda detection pipeline. It performs binary classification to detect whether text contains ANY propaganda techniques.
Predicted
No Prop | Has Prop
Actual No Prop: 736 | 11
Actual Has Prop: 0 | 982
Threshold Analysis
Threshold
Accuracy
Precision
Recall
F1
0.3
99.2%
98.6%
100%
99.3%
0.4
99.2%
98.7%
100%
99.3%
0.5
99.4%
98.9%
100%
99.4%
0.6
99.7%
99.4%
100%
99.7%
0.7
99.7%
99.5%
100%
99.7%
Recommended threshold: 0.5 (default) or 0.6 for reduced false positives
Training Details
Loss Function: Focal Loss (gamma=2.0, alpha=0.25) for class imbalance
Optimizer: AdamW with weight decay 0.01
Learning Rate: 2e-5 with warmup ratio 0.1
Batch Size: 16 (effective 32 with gradient accumulation)
Epochs: 5 with early stopping (patience=3)
Best Model Selection: Based on F1 score on validation set
Usage
With Transformers Pipeline
python
1from transformers import pipeline
23detector = pipeline(4"text-classification",5 model="synapti/nci-binary-detector-v2"6)78result = detector("The radical left is DESTROYING our country!")9# [{"label": "has_propaganda", "score": 0.99}]1011result = detector("The Federal Reserve announced a 0.25% rate increase.")12# [{"label": "no_propaganda", "score": 0.98}]
With AutoModel
python
1from transformers import AutoModelForSequenceClassification, AutoTokenizer
2import torch
34model = AutoModelForSequenceClassification.from_pretrained("synapti/nci-binary-detector-v2")5tokenizer = AutoTokenizer.from_pretrained("synapti/nci-binary-detector-v2")67text ="Wake up, people! They are hiding the truth from you!"8inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)910with torch.no_grad():11 outputs = model(**inputs)12 probs = torch.softmax(outputs.logits, dim=1)13 propaganda_prob = probs[0,1].item()1415print(f"Propaganda probability: {propaganda_prob:.2%}")
Two-Stage Pipeline (Recommended)
For full propaganda analysis with technique identification:
python
1from transformers import pipeline
23# Stage 1: Binary detection4binary_detector = pipeline(5"text-classification",6 model="synapti/nci-binary-detector-v2"7)89# Stage 2: Technique classification10technique_classifier = pipeline(11"text-classification",12 model="synapti/nci-technique-classifier-v2",13 top_k=None14)1516text ="Some text to analyze..."1718# Run Stage 119binary_result = binary_detector(text)[0]20if binary_result["label"]=="has_propaganda"and binary_result["score"]>=0.5:21# Run Stage 2 only if propaganda detected22 techniques = technique_classifier(text)[0]23 detected =[t for t in techniques if t["score"]>=0.3]24print(f"Detected techniques: {[t['label']for t in detected]}")25else:26print("No propaganda detected")
Labels
Label ID
Label Name
Description
0
no_propaganda
Text does not contain propaganda techniques
1
has_propaganda
Text contains one or more propaganda techniques
Intended Use
Primary Use Cases
Media literacy tools and browser extensions
Content moderation assistance
Research on information manipulation
Educational platforms for critical thinking
Out of Scope
Censorship or automated content removal
Political targeting or surveillance
Single-source truth determination
Limitations
Optimized for English text
May have reduced performance on very short texts (<10 words)
Trained primarily on political/news content; domain shift may affect performance
Should be used as one signal among many, not as sole arbiter