CoolFace
Modelpublic

abullard1/germeval2025-dbo-moderngbert-cw

sourceHugging Faceopenrailupdated 3mo agoView on Hugging Face
0likes10downloads
Model Card

<br> <br> <div style="text-align: center;"> <img src="https://i.ibb.co/RkR4QLpL/Shared-Task-Logo-Final-11zon.png" style="max-width: 30%; display: block; margin: 0 auto;"> </div>

<br> <br> <br>

<div style="text-align: center;"> <h1>πŸ† GermEval 2025: Democratic Basic Order Attack Detection (Class-Weighted)</h1> <a href="https://github.com/abullard1/abullardUR-GermEval-Shared-Task-2025"> <p><strong>abullardUR@GermEval Shared Task 2025 Submission</strong></p> </div> <hr>

🎯 Model Summary

This model is a fine-tuned version of [LSX-UniWue/ModernGBERT_134M](https://huggingface.co/LSX-UniWue/ModernGBERT_134M), specifically designed for Attacks on Democratic Basic Order (DBO) Detection in German social media content. It was developed as part of the GermEval 2025 Shared Task on Harmful Content Detection.

πŸ… Competition Performance

  • β€”Final Ranking: 6th out of 7 teams
  • β€”Primary Metric (Macro-F1): 0.63 (+34% over official baseline (0.47 β†’ 0.63))
  • β€”Approach: Class-weighted cross-entropy loss for extreme multi-class imbalance (104.6:1 ratio)

πŸ“Š Task Details

  • β€”Task Type: Multi-class classification (4 classes)
  • β€”Classes:
  • β€”Nothing (84.2%): No attack on democratic order
  • β€”Criticism (10.8%): Legitimate criticism
  • β€”Agitation (4.2%): Harmful agitation
  • β€”Subversive (0.8%): Most severe attacks on democratic principles
  • β€”Domain: German social media (Twitter, 2014-2016)
  • β€”Data Source: Right-wing extremist network posts

⚠️ Limitations and Bias

Known Limitations

  • β€”Extreme Class Imbalance: Subversive class represents only 0.8% of data (60 samples)
  • β€”Domain Specificity: Trained on 2014-2016 German Twitter data from right-wing extremist networks
  • β€”Temporal Bias: Language patterns may not reflect contemporary usage
  • β€”Insufficient Examples: Subversive class may lack sufficient training examples

Ethical Considerations

  • β€”Model trained on potentially harmful content for research purposes only
  • β€”Should not be used to amplify or generate harmful content
  • β€”Requires careful handling due to sensitive training data
  • β€”May exhibit bias toward certain political contexts

πŸš€ How to Use

Quick Start

python
from transformers import AutoProcessor, AutoModelForSequenceClassification

# Load model and processor
model_id = "abullard1/germeval2025-dbo-moderngbert-cw"
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForSequenceClassification.from_pretrained(model_id, trust_remote_code=True).eval()

# Run inference
text = "Die aktuelle Regierung sollte ihre Politik ΓΌberdenken."
inputs = processor(text, return_tensors="pt", truncation=True)
probs = model(**inputs).logits.softmax(-1).detach().cpu().numpy()
print(f"Predictions: {probs}")

Class Labels

  • β€”Label 0: Nothing (no attack on democratic order)
  • β€”Label 1: Criticism (legitimate criticism)
  • β€”Label 2: Agitation (harmful agitation against democratic order)
  • β€”Label 3: Subversive (severe attacks on democratic principles)

πŸ“ˆ Training Details

Training Data

  • β€”Source: GermEval 2025 Shared Task DBO dataset
  • β€”Size: 7,454 samples
  • β€”Split: 80% training (5,963), 20% validation (1,491)
  • β€”Class Distribution:
  • β€”Nothing: 6,277 (84.2%)
  • β€”Criticism: 804 (10.8%)
  • β€”Agitation: 313 (4.2%)
  • β€”Subversive: 60 (0.8%)

Training Procedure

  • β€”Base Model: ModernGBERT-134M (8192 token context)
  • β€”Architecture: Mean-pooling classification head
  • β€”Loss Function: Class-weighted cross-entropy (inverse frequency weighting)
  • β€”Optimizer: AdamW with linear scheduling
  • β€”Early Stopping: Patience of 5 epochs on validation Macro-F1

Hyperparameters

  • β€”Learning Rate: 1e-4
  • β€”Weight Decay: 0.0417
  • β€”Batch Size: 8/16 (train/eval)
  • β€”Epochs: 5
  • β€”Warmup Steps: 500

πŸ“š Citation

bibtex
@inproceedings{bullard2025germeval,
  title   = {abullardUR@GermEval Shared Task 2025: Fine-tuning ModernGBERT on Highly Imbalanced German Social Media for Harmful Content Detection},
  author  = {Bullard, Samuel},
  year    = {2025},
  booktitle = {Proceedings of KONVENS 2025 Workshops}
}

πŸ™ Acknowledgments

  • β€”GermEval 2025 Organizers: University of Stuttgart and University of Mannheim
  • β€”Prof. Dr. Udo Kruschwitz (University of Regensburg) for supervision
  • β€”ModernGBERT Team: LSX-UniWue for the ModernGBERT-134M German language base-model

πŸ“„ License

This model inherits the Research-only RAIL-M license from ModernGBERT. See license details.