Team Ai
Modelpublic

erikbranmarino/DeepSeek-PRCT

sourceHugging Facemitupdated 11mo agoView on Hugging Face
0likes24downloads
Model Card

πŸ” DeepSeek-PRCT

A LoRA fine-tuned DeepSeek-R1-14B model for detecting Population Replacement Conspiracy Theory (PRCT) content, optimized for formal news discourse with good cross-domain performance.

![License: MIT](https://opensource.org/licenses/MIT) ![Base Model](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-14B)

Overview

DeepSeek-PRCT is a LoRA adapter fine-tuned on Portuguese Telegram messages for detecting Population Replacement Conspiracy Theories. Despite training on informal social media, the model achieves exceptional performance on formal Italian news (0.892 F1-macro), demonstrating remarkable cross-domain transfer from informal to formal discourse.

Key Metrics

DatasetF1-MacroF1-BinaryAccuracy
News ITA (cross-domain)0.8920.8500.908
Telegram PT (in-domain)0.6550.3930.853

⚠️ Important: This model exhibits unusual behavior - it performs better on cross-domain (formal news) than on its training domain (informal Telegram), suggesting architectural sensitivity to reasoning-intensive formal text.

Model Description

DeepSeek-PRCT is a LoRA fine-tuned version of DeepSeek-R1-Distill-Qwen-14B, a reasoning-optimized language model. Trained on Portuguese Telegram messages, it demonstrates exceptional cross-domain transfer to Italian news headlines, achieving the highest F1-macro (0.892) among all evaluated configurations.

What are PRCTs?

Population Replacement Conspiracy Theories are false narratives claiming deliberate orchestration of demographic substitution through immigration. Main variants include:

  • β€”The Great Replacement Theory
  • β€”White Genocide
  • β€”Kalergi Plan
  • β€”Eurabia

These narratives are linked to extremist violence (Christchurch 2019, UtΓΈya 2011) and pose serious threats to democratic discourse.

Model Configuration

Architecture

  • β€”Base Model: DeepSeek-R1-Distill-Qwen-14B (14B parameters)
  • β€”Adapter Type: LoRA (Low-Rank Adaptation)
  • β€”LoRA Rank: 16
  • β€”LoRA Alpha: 32
  • β€”Target Modules: qproj, vproj, kproj, oproj
  • β€”Special Feature: Reasoning chains with <think> tags

Label Mapping

  • β€”0: Non-PRCT content
  • β€”1: PRCT content (supports/mentions replacement narratives)

Input Requirements

  • β€”Maximum sequence length: 4096 tokens
  • β€”Input type: Text (Portuguese, Italian, Spanish)
  • β€”Preprocessing: DeepSeek tokenization

Intended Uses & Limitations

βœ… Intended Uses

  • β€”Formal news analysis: Optimized for detecting PRCT in journalistic content
  • β€”Cross-domain deployment: Training on informal data, deployment on formal text
  • β€”Research: Understanding domain transfer in conspiracy detection
  • β€”High-accuracy applications: Where F1-macro >0.85 is required

⚠️ Limitations

  • β€”Inverse domain performance: Worse on training domain (Telegram) than test domain (News)
  • β€”Catastrophic forgetting: Fine-tuning degrades informal discourse understanding
  • β€”Inference cost: 16.3s per sample (slowest among evaluated models)
  • β€”Memory requirements: 14B parameters require substantial GPU memory
  • β€”Reasoning overhead: <think> tags increase token usage

Critical Note: This model's unusual performance profile (cross-domain > in-domain) makes it ideal for formal text analysis but not recommended for social media monitoring.

Training Data

  • β€”Primary training: Portuguese Telegram messages (n=919)
  • β€”Domain: Informal social media discourse, conspiracy-oriented channels
  • β€”PRCT prevalence: 15.7%
  • β€”Annotation: Expert annotators (Krippendorff's Ξ±=0.58)
  • β€”Time period: 2020-2024

Training Procedure

Hyperparameters

  • β€”Learning rate: 2e-5
  • β€”Batch size: 2 (with gradient accumulation)
  • β€”Training steps: 600
  • β€”Optimizer: AdamW 8-bit
  • β€”LoRA dropout: 0.05
  • β€”Weight decay: 0.01

Hardware

  • β€”GPU: NVIDIA A100 40GB
  • β€”Training time: ~4 hours
  • β€”Framework: PyTorch + PEFT

Results

Cross-Domain Performance (News ITA) ⭐

MetricScore
Accuracy0.908
Precision (Macro)0.892
Recall (Macro)0.892
F1-Macro0.892
F1-Binary0.850
Inference Time16.67s/sample

Best-in-class performance: Highest F1-macro among all evaluated models on formal news text.

In-Domain Performance (Telegram PT)

MetricScore
Accuracy0.853
Precision (Macro)0.716
Recall (Macro)0.630
F1-Macro0.655
F1-Binary0.393
Inference Time15.94s/sample

Performance degradation: 23.7pp drop from cross-domain to in-domain, indicating architectural sensitivity to text formality.

Usage

Installation

bash
pip install transformers peft torch

Basic Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import re

# Load base model and tokenizer
base_model_name = "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B"
model = AutoModelForCausalLM.from_pretrained(
    base_model_name,
    torch_dtype=torch.float16,
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(base_model_name)

# Load LoRA adapter
model = PeftModel.from_pretrained(model, "erikbranmarino/DeepSeek-PRCT")

# Prepare prompt
text = "Your Italian or Portuguese text here"
prompt = f"""Classify if the following text contains Population Replacement Conspiracy Theory (PRCT) content.

Text: {text}

Classification (YES/NO):"""

# Generate prediction
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
    **inputs,
    max_new_tokens=100,
    temperature=0.0,
    do_sample=False
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)

# Parse response (remove <think> tags if present)
response = re.sub(r'<think>.*?</think>', '', response, flags=re.DOTALL)
print(response)

Processing with Reasoning Chains

DeepSeek-R1 outputs reasoning chains in <think> tags. You can preserve or remove them:

python
def extract_classification(response):
    """Extract classification from DeepSeek response"""
    # Remove thinking process
    cleaned = re.sub(r'<think>.*?</think>', '', response, flags=re.DOTALL)
    
    # Extract YES/NO
    if "YES" in cleaned.upper():
        return "PRCT"
    elif "NO" in cleaned.upper():
        return "Non-PRCT"
    else:
        return "Uncertain"

# With reasoning visible
full_response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print("Reasoning:", full_response)
print("Classification:", extract_classification(full_response))

Architectural Insights

Why Cross-Domain > In-Domain?

DeepSeek-R1's reasoning architecture benefits from formal text structure:

  1. 1.Explicit logic: News headlines state claims directly
  2. 2.Reasoning alignment: Formal text matches model's reasoning chains
  3. 3.Catastrophic forgetting: Fine-tuning on informal text disrupts implicit pattern recognition

Recommendation: Use this model for formal news analysis, not social media monitoring.

Bias and Ethical Considerations

Known Biases

  • β€”Formality bias: Optimized for formal journalistic discourse
  • β€”Domain paradox: Underperforms on training domain
  • β€”Language bias: Best on Italian, weaker on Portuguese
  • β€”Reasoning bias: May over-analyze simple informal text

Ethical Use

  • β€”βš οΈ Not for automated censorship: Requires human review
  • β€”βœ… News monitoring: Ideal for tracking PRCTs in media
  • β€”βœ… Research purposes: Understanding cross-domain transfer
  • β€”βŒ Social media: Better alternatives exist (Mistral-PRCT)

We advocate for freedom of speech and constitutional rights.

Comparison with Mistral-PRCT

FeatureDeepSeek-PRCTMistral-PRCT
Best forFormal newsInformal social media
News F1-Macro0.892 βœ…0.753
Telegram F1-Macro0.6550.819 βœ…
Inference Speed16.3s ⚠️4.6s βœ…
Memory14B params7B params βœ…

Choose DeepSeek-PRCT if: High accuracy on news, can afford slow inference Choose Mistral-PRCT if: Social media focus, need faster processing

Citation (to appear)

bibtex
@inproceedings{marino2025prct,
  title={Population Replacement Conspiracy Theories Detection on Telegram and News Headlines: 
         benchmarking LLMs and BERT models in Portuguese and Italian},
  author={Marino, Erik Bran and Vieira, Renata},
  booktitle={Proceedings of PROPOR 2026},
  year={2026}
}

Model Card Authors

Erik Bran Marino (Universidade de Γ‰vora, HYBRIDS Project)

Contact

  • β€”Email: erik.marino@uevora.pt
  • β€”Project: MSCA HYBRIDS (Grant Agreement No. 101073351)
  • β€”Institution: Universidade de Γ‰vora, Portugal

License

MIT License - Free for research and educational purposes.


Developed as part of the HYBRIDS Marie SkΕ‚odowska-Curie Actions project