Elamur Research⌕
☰
home / papers / 2024 / Wikidata as a Source of Demographic Information

Wikidata as a Source of Demographic Information

Paper · 2024 · Samir Abdaljalil and Hamdy Mubarak

Summary

The paper asks how much a person's name alone reveals about their demographics. It predicts four attributes: country, region, gender and language. Names can be written in English or Arabic. The authors built the training data from Wikidata. They took entities marked as human from a 2021 dump and collected their English labels, plus Arabic labels in standard and Egyptian forms. Each name was paired with its citizenship, sex/gender and spoken-language statements. Raw country labels were very messy, with historical states, city-states and naming variants. The authors therefore mapped every attribute onto a small set of normalized classes and then balanced the data, leaving about 1.1 million entities.

They compared three approaches: a Linear SVM, a fine-tuned BERT and a Transformers pipeline. The SVM did best on every attribute and was also much faster at prediction time. Gender, language and region reached accuracy above 0.65, while country was harder. A check on Twitter users' names gave comparable scores. The dataset and a demo API are released, which makes it a reusable open resource for name-based demographic inference.

Key points

  • The raw extraction covered 9,284,039 Wikidata humans (P31 = Q5). Attributes came from P21 (gender), P27 (country of citizenship) and P1412 (language spoken), and missing values were marked as XX.
  • Country labels were highly fragmented, with 2558 distinct values in English and 1866 in Arabic. The top 15 countries covered 55.4% of the data, and this top list included Ming Dynasty and Qing Dynasty.
  • After normalization and balancing, the final resource holds 1,096,910 entities. It spans 100 countries (ISO 3166-1 alpha-2 codes), 48 languages, 2 genders and 17–18 regions; the paper gives both region counts.
  • The Linear SVM beat both BERT-based setups. On 1,500 Twitter names from 15 countries, collected via FollowerWonk, SVM_Country reached a weighted F-1 of 0.54.
  • LIME was used to show which parts of a name pushed a country prediction.

Interesting ideas

  • I1. Collapse historical or variant labels (Kingdom of Italy, Republic of Florence, Qing Dynasty) into one modern canonical class before using them, so that sparse labels do not split the statistics.
  • I2. Build a large labelled dataset almost for free by filtering a knowledge graph on a type property and reading a few specific properties as labels.
  • I3. Test on an out-of-domain set (ordinary Twitter users) that differs from the training population (famous Wikidata people) to check that scores are not an artefact of the source.
  • I4. A plain linear classifier beat transformer fine-tuning here and was a fraction of the cost to run, so cheap baselines deserve a real comparison.
  • I5. Pair predictions with LIME-style per-feature attributions so each decision comes with a reason.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (world): When compiling Wikidata into the ontology, map historical polities and alternate names to a canonical country node while keeping the original as a time-scoped alias, so that "where is X from" questions resolve consistently.
  • I2 (frames): A name-to-gender prior distilled from Wikidata P21 could be a soft, explainable feature for pronoun agreement in coreference, ranking "she" against candidate antecedents by their first names.
  • I3 (learn): Every silver-trained component should ship with an evaluation slice drawn from a deliberately different text population, reported next to the in-domain score.
  • I4 (tokens): Before reaching for gparse-style models in the tagger or for unknown proper nouns, benchmark a simple linear model; it may be enough and stays inspectable.
  • I5 (learn): Attach feature-contribution traces to model-based decisions during evaluation, so that repair rules can target the features that actually drive errors.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

Cite

Cite as Samir Abdaljalil and Hamdy Mubarak. 2024. Wikidata as a Source of Demographic Information. Proceedings of the Second Arabic Natural Language Processing Conference.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2024.arabicnlp-1.1

@inproceedings{abdaljalil2024wikidata,
  title = {{Wikidata as a Source of Demographic Information}},
  author = {Samir Abdaljalil and Hamdy Mubarak},
  booktitle = {Proceedings of the Second Arabic Natural Language Processing Conference},
  year = {2024},
  doi = {10.18653/v1/2024.arabicnlp-1.1},
  url = {https://doi.org/10.18653/v1/2024.arabicnlp-1.1}
}

References

20 references, 2 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. 2016. "why should i trust you?": Explaining the predictions of any classifier. New York, NY, USA. Association for Computing Machinery.
  2. Olatunji Abdulganiy, Moshood Issah, Noah Yusuf, A Muhammed, and Abdul-Rasheed Sulaiman. 2015. Personal name as a reality of everyday life: Naming dynamics in select african societies. find
  3. Cong Tang, Keith Ross, Nitesh Saxena, and Ruichuan Chen. 2011. What’s in a name: A study of names, gender inference, and gender behavior in facebook. In Database Systems for Adanced Applications, pages 344–356, Berlin, Heidelberg. Springer Berlin Heidelberg. find
  4. Rochana Chaturvedi and Sugat Chaturvedi. 2022. It’s all in the name: A character based approach to infer religion. ArXiv, abs/2010.14479. ↗
  5. Konstantinos Tzioumis. 2018. Demographic aspects of first names. Scientific Data, 5:180025. find
  6. Eva Derous and Roland Pepermans. 2019. Gender discrimination in hiring: Intersectional effects with ethnicity and cognitive job demands. Archives of Scientific Psychology, 7:40–49. find
  7. Giorgio Visani, Enrico Bagli, and Federico Chesani. 2020. Optilime: Optimized lime explanations for diagnostic computer algorithms. ArXiv, abs/2006.05714. ↗
  8. Jerome Friedman. 2002. Stochastic gradient boosting. Computational Statistics Data Analysis, 38:367–378. find
  9. Denny Vrandečić and Markus Krötzsch. 2014. Wikidata: A free collaborative knowledgebase. Commun. ACM, 57(10):78–85.
  10. Saman Goudarzi. 2020. ‘what’s in a name? using first names as features for gender inference in twitter’ by wendy liu derek ruths (2013). In Identifying Gender and Sexuality of Data Subjects. Https://cis.pubpub.org/pub/whats-in-a-name-using-first-names-as-features-for-gender-inference-in-twitter. find
  11. Stephen Wilson. 2003. The means of naming: A social and cultural history of personal naming in western europe. The Means Of Naming: A Social And Cultural History Of Personal Naming In Western Europe, pages 1–402. find
  12. Bas Hofstra and Niek C de Schipper. 2018. Predicting ethnicity with first names in online social media networks. Big Data & Society, 5(1):2053951718761141. find
  13. Junting Ye, Shuchu Han, Yifan Hu, Baris Coskun, Meizhu Liu, Hong Qin, and Steven Skiena. 2017. Nationality classification using name embeddings. In Proceedings of the 2017 ACM on Conference on Information and Knowledge Management, CIKM ’17, page 1897–1906, New York, NY, USA. Association for Computing Machinery. find
  14. Wenyi Huang, Ingmar Weber, and Sarah Vieweg. 2014. Inferring nationalities of twitter users and studying inter-national linking. In Proceedings of the 25th ACM Conference on Hypertext and Social Media, HT ’14, page 237–242, New York, NY, USA. Association for Computing Machinery. find
  15. Junting Ye and Steven Skiena. 2019. The secret lives of names? name embeddings from social media. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery amp; Data Mining, KDD ’19, page 3000–3008, New York, NY, USA. Association for Computing Machinery. find
  16. Soon-Gyo Jung, Joni Salminen, and Jim Jansen. 2021. All about the name: Assigning demographically appropriate names to data-driven entities. find
  17. A Md Kowsher, Md Sanjid, Avishek Das, Mahid Ahmed, and Md Sarker. 2020. Machine learning and deep learning based information extraction from bangla names. Procedia Computer Science, 178:224–233. Demo of Functionality Demo Link (feature: NameInfo) https://asad.qcri.org/demo ↗
  18. Jinhyuk Lee, Hyunjae Kim, Miyoung Ko, Donghee Choi, Jaehoon Choi, and Jaewoo Kang. 2017. Name nationality classification with recurrent neural networks. In Proceedings of the 26th International Joint Conference on Artificial Intelligence, IJCAI’17, page 2081–2087. AAAI Press. find
  19. Shervin Malmasi. 2014. A data-driven approach to studying given names and their gender and ethnicity associations. In ALTA. find
  20. Chibuike Mbarachi and Esther Igwenyi. 2018. Language, identity and the cultural context of names in selected nigerian novels. International Journal of Language and Literature, 6. - Country Afghanistan Algeria Angola Argentina find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/abdaljalil-2024-wikidata-as-source-demographic-information/