DADIT: A Dataset for Demographic Classification of Italian Twitter Users and a Comparison of Prediction Methods

Lorenzo Lupo, Paul Bose, Mahyar Habibi, Dirk Hovy, Carlo Schwarz

Introduction

Computational social science relies heavily on the ability to stratify social media users by demographic traits such as age and gender. However, platforms like Twitter do not explicitly provide this information. Consequently, researchers often turn to automated classifiers, with the M3 model being the current industry standard. M3 primarily utilizes user bios, usernames, and profile pictures to infer demographics.

Despite its popularity, M3 faces significant limitations. It struggles when users have empty bios or non-representative profile pictures (e.g., landscapes or avatars). Crucially, such tools often overlook the most abundant data source: the actual content of a user's tweets. This paper introduces the DADIT dataset and explores whether leveraging tweet text can significantly improve demographic classification.

The DADIT Dataset

The researchers developed DADIT, a comprehensive dataset comprising approximately 30 million tweets from 20,000 Italian Twitter users. The dataset was constructed by seeding from followers of Italian politicians to ensure a broad, representative sample.

Labels were generated using a multi-step process: gender was initially assigned via name-matching dictionaries, and age was extracted using specific regex patterns (e.g., "I am X years old"). To ensure the highest possible data integrity, a subset of these labels was manually verified to create a gold-standard test set. Additionally, a smaller German test set of 388 users was collected to evaluate the cross-lingual capabilities of the proposed models.

Methodology

To evaluate the predictive power of tweet text, the authors compared several modeling approaches:

  1. Baselines (M3 & CV): Standard multimodal and computer vision models relying on profile pictures and bios.
  2. XLM-RoBERTa: A multilingual model (twitter-xlm-roberta-base) fine-tuned on concatenated user bios and tweets.
  3. Large Language Models (LLMs): Flan-T5 and GPT-3.5, evaluated in zero-shot and few-shot settings using bios and tweets.

The experiments were designed to reflect "hard" classification scenarios by masking explicit age mentions and removing full names from the input text.

Results and Discussion

The experimental results demonstrate that tweet text is a "demographic goldmine." Models incorporating tweet content consistently outperformed those relying solely on profile metadata.

Main performance comparison across models and languages.

Key Findings

  • Text-Based Superiority: For age prediction—a notoriously difficult task—the fine-tuned XLM model (using bio + tweets) achieved an F1-score of 60.2, significantly outperforming the M3 baseline's 41.4. In gender prediction, XLM reached an 86.8 F1-score compared to M3's 79.3.
  • Fine-tuning vs. Prompting: Interestingly, the smaller, task-specific XLM model outperformed massive general-purpose LLMs like GPT-3.5. This suggests that domain-specific fine-tuning remains superior to few-shot prompting for specialized classification tasks.
  • Cross-lingual Generalization: The XLM model, despite being trained only on Italian data, achieved the highest F1-score for age prediction on the German test set (45.8), demonstrating the robust transfer learning capabilities of multilingual encoders.
  • Ensembling and Scaling: Combining XLM's text predictions with M3's image-based predictions pushed gender F1-scores to 90.8. Further scaling to XLM-large and including user metadata (e.g., follower counts) resulted in peak F1-scores of 63.5 for age and 93.0 for gender.

Quality-Coverage Tradeoff

A critical insight for practitioners is the relationship between model confidence and accuracy. By adjusting the decision threshold, researchers can prioritize high-precision labels at the cost of lower coverage (i.e., leaving some users unclassified).

The trade-off between prediction coverage and F1-score for gender and age classification.

Conclusion

The DADIT dataset and the accompanying analysis confirm that tweet text is an essential component for accurate demographic inference. While profile-based tools like M3 provide a useful baseline, incorporating the linguistic nuances of user posts leads to substantial performance gains, particularly for age classification. Future work will focus on deeper multimodal integration, moving beyond simple ensembling to joint training on combined text and image embeddings.

Summary updated

BibTeX
@inproceedings{lupo2024dadit,
  author = {Lorenzo Lupo and Paul Bose and Mahyar Habibi and Dirk Hovy and Carlo Schwarz},
  title = {{DADIT: A Dataset for Demographic Classification of Italian Twitter Users and a Comparison of Prediction Methods}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
}
Figure