NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Finding the needle in a haystack: Extraction of Informative COVID-19 Danish Tweets

Benjamin Olsen, Barbara Plank

Abstract

Social media platforms are vital for real-time health communication during crises, yet extracting relevant information from low-resource languages like Danish is complicated by extreme class imbalance. This paper presents the #covid19dk dataset, a collection of 5,000 Danish tweets where only 3% are labeled as informative. We evaluate the performance of class-weighted Convolutional Neural Networks (CNNs) using various embeddings, including multilingual BERT (mBERT) and Danish BERT (dBERT). Our results show that while models can achieve a high Max F1 score of 84.15 on a realistic test set, they exhibit significant performance instability ("jitter") due to the skewed data distribution. We conclude that class weighting and the use of multilingual context are essential for effective classification in such high-imbalance environments.

Introduction

During the COVID-19 pandemic, Twitter became a primary channel for government agencies and health experts to share updates. However, for "less-privileged" languages like Danish, the volume of informative content is often dwarfed by general chatter. Most existing research relies on balanced datasets, which do not reflect the real-world challenge of finding rare informative posts in a massive stream of uninformative data. This study addresses this gap by developing and evaluating models specifically for low-resource, high-imbalance scenarios.

Methodology

We compared a probabilistic baseline against deep learning architectures:

  • Naive Bayes: A classic baseline using word unigrams.
  • CNN (Convolutional Neural Network): Based on the Kim (2014) architecture, utilizing four filter sizes (1, 3, 5, and 7) to capture different n-gram lengths.
  • Embeddings: We tested three types of static inputs: domain-specific Danish Twitter word2vec, Multilingual BERT (mBERT), and Danish BERT (dBERT).
  • Class Weighting: To handle the 97% imbalance, we implemented a weighted loss function using the inverse square root of the number of samples per class, forcing the model to prioritize the rare "informative" classes.

The #covid19dk Dataset

The authors introduced a new benchmark consisting of 5,000 Danish tweets collected between March and October 2020. The labeling schema included three categories:

  • INFORMATIVE+: Standard informative updates.
  • INFORMATIVE-: Informative tweets that are difficult to categorize (e.g., written in English).
  • UNINFORMATIVE: General posts, opinions, or irrelevant content. Out of 5,000 tweets, only 144 (~3%) were labeled as informative, creating a realistic "needle in a haystack" scenario.

Key Results

Performance was measured using the Macro F1 score to ensure the minority classes were adequately represented.

Model Mean F1 (Small Test) Max F1 (Small Test)
Naive Bayes 74.78 77.28
CNN (no weights) 74.40 78.93
CNN mBERT 74.10 86.31
CNN dBERT 78.12 79.30

On a larger, more realistic test set of 1,000 tweets (3% informative), the CNN with mBERT embeddings achieved a Max F1 of 84.15.

Confusion matrix for the best-performing CNN-mBERT model (Max F1 84.15) on the realistic 1,000-tweet test set.
Confusion matrix for a high-recall but lower-precision model run, illustrating the performance instability or 'jitter' observed during training.

Discussion

A key finding was the "mBERT surprise": Multilingual BERT often outperformed the language-specific Danish BERT on development sets. This suggests that broader multilingual context helps identify universal patterns of informativeness. However, models were highly sensitive to random seeds and hyperparameters, leading to significant swings in F1 scores.

Qualitative analysis revealed an "intensive trap," where models misclassified tweets containing keywords like "intensive" or "death" as informative, even when they were merely political opinions. This underscores the difficulty of distinguishing content-based features from simple keyword matching in skewed datasets.

Conclusion

This research demonstrates that identifying rare informative tweets in a low-resource language is possible with appropriate class weighting and embedding strategies. Future work will focus on fine-tuning transformer models and exploring semi-supervised learning to leverage larger unannotated datasets.

Summary updated

BibTeX
@inproceedings{olsen2021finding,
  author = {Benjamin Olsen and Barbara Plank},
  title = {{Finding the needle in a haystack: Extraction of Informative COVID-19 Danish Tweets}},
  booktitle = {W-NUT},
  year = {2021},
  doi = {10.18653/v1/2021.wnut-1.2},
}
Figure