Twitter Demographic Classification Using Deep Multi-modal Multi-task Learning

Prashanth Vijayaraghavan, Soroush Vosoughi, Deb Roy

Abstract

Twitter serves as a massive repository of real-time public discourse, yet its utility for social sensing is limited by the lack of demographic representativeness. This paper introduces the Deep Multi-modal Multi-task (DMT) framework to classify users across four key dimensions: gender, age, political orientation, and location. By integrating textual, visual, and social network data through a hierarchical attention mechanism, the model achieves state-of-the-art performance. This approach not only improves classification accuracy but also provides a scalable method for correcting sampling bias in social media research.

Introduction

While social media platforms like Twitter offer a "vibrant 24/7 snapshot" of public opinion, they are notoriously unrepresentative of the general population. Traditional polling methods struggle to match the velocity of digital data, but researchers cannot treat Twitter as a representative digital town square without knowing the demographic identity of the participants. Existing demographic classifiers often suffer from narrow focus, relying on a single data source (e.g., tweets only) or predicting a single attribute (e.g., gender only). This research addresses the need for a robust, multi-dimensional system capable of simultaneous categorization across multiple demographic axes.

Methodology

The proposed DMT-Demographic Models utilize a Deep Multi-modal Multi-task Learning architecture. The system processes four distinct modalities:

  1. Textual: Profile descriptions (via Gated Recurrent Units) and historical tweets (via positional encoding).
  2. Visual: Profile pictures processed through the Inception image recognition architecture.
  3. Social: A "Following Network" represented as a binary vector of "anchor" accounts.
  4. Metadata: Usernames cross-referenced with census and frequency datasets for gender association.

The "multi-task" nature of the model allows it to share latent information across all four demographic predictions simultaneously. The researchers evaluated three architectural variants: a simple concatenation model, a single-level attention model, and a hierarchical attention-based model.

The Hierarchical Attention-based DMT emerged as the top performer. It employs a two-tier attention mechanism: the first tier weighs individual features (e.g., specific words) based on their relevance to a specific task, while the second tier weighs the importance of the different modalities (text vs. image vs. network) for that task.

Data and Experimental Setup

The model was trained and validated using a curated dataset of 50,859 Twitter users. Training labels were derived from high-confidence self-identification phrases (e.g., "I am a democrat"). Test sets were further refined using human-verified labels from Amazon Mechanical Turk and geo-tagged data for location. Additionally, US and European census data were utilized to build name-to-gender association features.

Results

The Hierarchical Attention-based DMT model significantly outperformed standard baselines, including Random Forest and SVM.

Demographic Macro F1-Score
Gender 0.890
Political Orientation 0.859
Age 0.819
Location 0.680

The results demonstrate that gender and political orientation are highly predictable using multi-modal data. Location remains the most challenging category, likely due to the high cardinality of classes (US states) and the sparsity of location-specific signals in general user profiles.

Discussion and Insights

A key finding is that attention is task-specific. For instance, the word "husband" provides a strong signal for gender but is irrelevant for location. The hierarchical attention mechanism allows the model to dynamically focus on relevant signals per task. Furthermore, multi-task synergy allows the model to leverage correlations between demographics—such as the relationship between age and political leaning—to improve overall predictive power. Finally, the use of "anchor" accounts successfully mitigated the "curse of dimensionality" inherent in massive social networks, providing a dense and informative social signal.

Conclusion

The DMT framework provides a powerful tool for demographic classification on social media. While location prediction remains an area for future improvement—potentially through regional slang or landmark detection—the current model offers a vital means of making social media data more representative and useful for social sensing. Future work will focus on using this tool to study demographic shifts across various public discourse topics.

Summary updated

BibTeX
@inproceedings{vijayaraghavan2017twitter,
  author = {Prashanth Vijayaraghavan and Soroush Vosoughi and Deb Roy},
  title = {{Twitter Demographic Classification Using Deep Multi-modal Multi-task Learning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2017},
  doi = {10.18653/v1/p17-2076},
}
Figure