TL;DR
This paper presents a machine learning approach for author profiling on Twitter, focusing on the joint prediction of an author's gender and their specific language variety or dialect. By deploying an ensemble of linear Support Vector Machines (SVMs) trained on character and word $n$-grams, the system achieved a high accuracy of nearly 98% in distinguishing between Portuguese varieties, alongside stable performance across Arabic, English, and Spanish.
What Problem Does This Paper Address?
Author profiling aims to determine demographic characteristics (like age, gender, or native language) from text. While gender and age prediction are well-studied, identifying regional dialects and language varieties on social media introduces a fresh layer of complexity.
Tweets are short, informal, and filled with non-standard language. Discriminating between closely related varieties—such as Canadian vs. Australian English, or Egyptian vs. Levantine Arabic—requires capturing subtle lexical and syntactic nuances. The authors tackle this joint challenge (gender + dialect identification) as part of the PAN 2017 shared task.
Methods
The authors employ a single-label, multi-class classification strategy utilizing SVM ensembles. Instead of relying on a single complex model, their architecture combines the strengths of eight distinct linear SVM classifiers.
The individual classifiers differ by their feature focus:
- Character $n$-grams: Six classifiers trained on character lengths from $n=1$ to $n=6$.
- Word $n$-grams: Two classifiers trained on word unigrams ($n=1$) and bigrams ($n=2$).
To combine these models, the system uses a probability-based fusion method. It sums the predicted class probabilities from all eight classifiers, selecting the class with the highest cumulative probability. Hyperparameter tuning ($C$ value optimization) was performed via 3-fold cross-validation using Scikit-learn.
Datasets
The system was trained and evaluated on the official PAN 2017 author profiling dataset, which contains approximately 1,140,000 Twitter posts. The dataset spans four major pluricentric languages and their respective regional variants:
- Arabic: Egypt, Gulf, Levantine, Maghrebi
- English: Australia, Canada, Great Britain, Ireland, New Zealand, United States
- Portuguese: Brazil, Portugal
- Spanish: Argentina, Chile, Colombia, Mexico, Peru, Spain, Venezuela
Key Insights and Ideas
- Language Complexity Dictates Feature Choice: For English, Spanish, and Portuguese, word unigrams provided the highest joint accuracy. However, for Arabic, character 4-grams performed best. This highlights how morphologically rich languages benefit more from sub-word features that capture roots and affixes rather than full words.
- The Power of Ensembles: The ensemble approach consistently outperformed individual classifiers. For instance, the ensemble boosted English joint prediction accuracy by up to 8% compared to single-feature models.
- Fewer Varieties, Higher Accuracy: Portuguese classification achieved remarkably high scores. The authors note this is unsurprising because the dataset only contained two Portuguese varieties (Brazil and Portugal), making it a binary choice compared to the 6-7 choices required for English and Spanish.
Key Results
During internal cross-validation, the system performed exceptionally well on Portuguese, hitting a language variety accuracy of 97%. English yielded the highest gender identification accuracy at 79%.
In the official PAN 2017 evaluation on the unseen test set, the system ranked 11th out of 22 teams for language variety identification, with an average accuracy of 85.24%. It comfortably outperformed the provided Bag-of-Words (BOW) and statistical baselines.
For gender identification on the test set, the system ranked 12th out of 22 teams, achieving an average accuracy of 75.04%.
Limitations and Future Work
While the system proved robust, the authors expected a higher placement in the final standings. They identified three main limitations:
- Short Text Constraints: Twitter's character limits restrict the amount of contextual linguistic data available per user.
- Scale and Deep Learning: The massive size of the dataset (~1.14M posts) likely allowed competing teams to successfully leverage data-hungry deep learning architectures, which outpaced traditional SVMs.
- Sub-optimal Classifier Tuning: The implementation details of the individual classifiers may still have room for optimization.
For future work, the team plans to conduct a thorough error analysis of misclassified instances and explore the use of a meta-classifier stacking approach, which has previously shown strong results in German dialect identification.
Summary updated