Where Is This Tweet From? Inferring Home Locations of Twitter Users

Jalal Mahmud, Jeffrey Nichols, Clemens DrewsAAAI 2021

Abstract

We present a new algorithm for inferring the home locations of Twitter users at different granularities, such as city, state, or time zone, using the content of their tweets and their tweeting behavior. Unlike existing approaches, our algorithm uses an ensemble of statistical and heuristic classifiers to predict locations. We find that a hierarchical classification approach can improve prediction accuracy. Experimental evidence suggests that our algorithm works well in practice and outperforms the best existing algorithms for predicting the location of Twitter users.

Introduction

While Twitter is a goldmine for real-time data on events and news, it faces a significant "location sparseness" problem. At the time of this study, fewer than 1% of tweets were geo-tagged, and user profile location fields were notoriously unreliable or empty. This "dark matter" makes it difficult for researchers to map news propagation or provide localized services. This paper addresses the challenge by inferring a user's "home base" using digital breadcrumbs: vocabulary, hashtag usage, and temporal activity patterns.

Methodology

The researchers developed a dynamically weighted ensemble of several specialized classifiers, categorized into three main types:

  1. Content-based Statistical Classifiers: These analyze nouns to identify "local" terms (e.g., "Red Sox" for Boston), location-specific hashtags, and place names referenced against a geographical gazetteer.
  2. Content-based Heuristics: These include a "Local Place Heuristic," which counts mentions of specific cities, and "Visit History," which extracts location data from Foursquare check-in URLs.
  3. Behavior-based Time Zone Classifier: This model analyzes when a user tweets, using sleep/wake cycles to estimate time zones independently of tweet content.

A key innovation is the use of "Classification Strength," a metric that weights classifiers based on their prediction certainty. Furthermore, the researchers implemented a hierarchical approach, first narrowing the search to a time zone or state before predicting a specific city.

Experimental Results

The algorithm was tested on a dataset of 1.5 million tweets from 9,551 users. Ground truth was established using users with geo-tagging enabled to verify their true home locations.

Performance and Baseline Comparison

The ensemble approach significantly outperformed previous benchmarks. While individual features like "Place Name" achieved a recall of 0.54, the combined ensemble reached a recall of 0.58 for cities, 0.66 for states, and 0.78 for time zones. As shown in Figure 2, the proposed algorithm consistently maintains higher accuracy than the baseline established by Cheng et al. (2010) across various error distances.

Accuracy comparison against the baseline across increasing error distances.

The Impact of Hierarchy

The transition from a flat classification to a hierarchical one provided a substantial accuracy boost. By first identifying the time zone, the search space for the city is reduced, leading to higher precision.

Recall metrics for hierarchical classification approaches.

As indicated in the table above, the hierarchical "Time-zone first" approach improved city prediction recall to 0.64, a significant jump from the flat ensemble's 0.58. This suggests that narrowing the geographic scope early in the process is a highly effective strategy for location inference.

Conclusion

This research demonstrates that a user's home location can be inferred with high accuracy through an ensemble of content and behavioral signals. The findings highlight a notable privacy leak: even without explicit location sharing, a user's jargon and activity timing can reveal their "home base." Future work will focus on increasing granularity to the neighborhood level and exploring real-time inference from single messages.

Summary updated

BibTeX
@inproceedings{mahmud2021where,
  author = {Jalal Mahmud and Jeffrey Nichols and Clemens Drews},
  title = {{Where Is This Tweet From? Inferring Home Locations of Twitter Users}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/icwsm.v6i1.14299},
}
Figure