| Literature DB >> 35077484 |
Ari Z Klein1, Arjun Magge1, Graciela Gonzalez-Hernandez1.
Abstract
Advancing the utility of social media data for research applications requires methods for automatically detecting demographic information about social media study populations, including users' age. The objective of this study was to develop and evaluate a method that automatically identifies the exact age of users based on self-reports in their tweets. Our end-to-end automatic natural language processing (NLP) pipeline, ReportAGE, includes query patterns to retrieve tweets that potentially mention an age, a classifier to distinguish retrieved tweets that self-report the user's exact age ("age" tweets) and those that do not ("no age" tweets), and rule-based extraction to identify the age. To develop and evaluate ReportAGE, we manually annotated 11,000 tweets that matched the query patterns. Based on 1000 tweets that were annotated by all five annotators, inter-annotator agreement (Fleiss' kappa) was 0.80 for distinguishing "age" and "no age" tweets, and 0.95 for identifying the exact age among the "age" tweets on which the annotators agreed. A deep neural network classifier, based on a RoBERTa-Large pretrained transformer model, achieved the highest F1-score of 0.914 (precision = 0.905, recall = 0.942) for the "age" class. When the age extraction was evaluated using the classifier's predictions, it achieved an F1-score of 0.855 (precision = 0.805, recall = 0.914) for the "age" class. When it was evaluated directly on the held-out test set, it achieved an F1-score of 0.931 (precision = 0.873, recall = 0.998) for the "age" class. We deployed ReportAGE on a collection of more than 1.2 billion tweets, posted by 245,927 users, and predicted ages for 132,637 (54%) of them. Scaling the detection of exact age to this large number of users can advance the utility of social media data for research applications that do not align with the predefined age groupings of extant binary or multi-class classification approaches.Entities:
Mesh:
Year: 2022 PMID: 35077484 PMCID: PMC8789116 DOI: 10.1371/journal.pone.0262087
Source DB: PubMed Journal: PLoS One ISSN: 1932-6203 Impact factor: 3.240
Sample tweets manually annotated as “age” (+) or “no age” (-).
| Tweet | Class | Age | |
|---|---|---|---|
| 1 | It’s my 21st birthday today. But who cares.…. ITS FINALLY AUGUST!!!!! | + | 21 |
| 2 | It’s crazy, tomorrow I’ll be 20. I’m getting so OLD. | + | 19 |
| 3 | can’t believe im going to be 21.…. i want to be a teenager again | + | 20 |
| 4 | I graduate in May only focusing on me and my child‥ watch me at 21 | - | NA |
| 5 | Had just turned 18 then found out I was pregnant 2 weeks later | - | NA |
Sample matching patterns (bold) in “age” tweets and their age extraction rules.
| Tweet | Rule | Age | |
|---|---|---|---|
| 1 | 21–2 | 19 | |
| 2 | 18 | 18 | |
| 3 | excited for | 18–1 | 17 |
| 4 | I started having #depression | 20 + 19 | 39 |
| 5 | I started | 28 < 35 | 35 |
| 6 | i feel like i’m going through a midlife crisis | 21 | 21 |
| 7 | I’ve | 21 + (3–1) | 23 |
| 8 | I’m right there with you. Recently | 47 | 47 |
| 9 | I was just reminded that I’m | 18 –(3 / 52) | 17 |
| 10 | I’m going out for the first time tonight | 21 | 21 |
Fig 1Sample Python code for extracting age from patterns with a unit of time.
Fig 2ReportAGE: An automatic natural language processing (NLP) pipeline for extracting the exact age of Twitter users based on self-reports in their tweets.
Sample false positive and false negative tweets for the “age” class, with their actual class (AC), predicted class (PA), actual age (AA), and predicted age (PA).
| Tweet | AC | PC | AA | PA | |
|---|---|---|---|---|---|
| 1 | Blessed to see my 22nd birthday! I feel good to be alive. | + | + | 22 | 21 |
| 2 | The most exciting part of turning 25 is that my insurance is dropping 20 bucks per month. | + | + | 25 | 24 |
| 3 | Got to love Facebook for reminding me of my 21st bday cruise | - | + | NA | 20 |
| 4 | Who will be going to two 21st birthdays next week and doesn’t have anything nothing to wear?! ME | - | + | NA | 20 |
| 5 | Big 30 coming up on the 31st | + | - | 29 | NA |
Fig 3Distribution of exact ages, categorized into age groups, automatically identified by ReportAGE for 52,164 users from the 1% Twitter Sample API in 2018.