Abstract: Text-based document geolocation is commonly rooted in language-based information retrieval techniques over geodesic grids. These methods ignore the natural hierarchy of cells in such grids and fall afoul of independence assumptions. We demonstrate the effectiveness of using logistic regression models on a hierarchy of nodes in the grid, which improves upon the state of the art accuracy by several percent and reduces mean error distances by hundreds of kilometers on data from Twitter, Wikipedia, and Flickr. We also show that logistic regression performs feature selection effectively, assigning high weights to geocentric terms.
The Problem: Flat Grids and Independence Assumptions
Document geolocation—identifying the specific latitude and longitude associated with a text—is a critical task for organizing digital archives and understanding regional social media trends. Historically, this has been approached by dividing the Earth into a "geodesic grid" and treating each cell as a discrete category for classification, typically using Naive Bayes models.
However, this traditional approach suffers from two major flaws. First, Naive Bayes assumes word independence, ignoring the contextual relationships between terms. Second, a "flat" grid structure treats all cells as independent categories, failing to capture the natural geographic hierarchy (e.g., City -> State -> Country). While discriminative models like Logistic Regression (LR) are more powerful, they struggle to scale when forced to choose between tens of thousands of flat grid cells simultaneously.
Methodology: Hierarchical Discriminative Classification
To overcome these scaling issues, we introduce Hierarchical Discriminative Classification (HierLR). Instead of a single massive classifier, we construct a tree of smaller, efficient Logistic Regression models.
- The Hierarchy: The system starts with a root node representing the entire Earth and recursively subdivides it into coarser and then finer regions until reaching the leaf nodes (the final grid cells).
- Local Classifiers: Each parent node in the tree contains an independent classifier trained to distinguish only between its immediate children.
- Beam Search: During testing, the system employs a beam search to maintain computational efficiency, keeping only the top N most likely regions at each level of the hierarchy as it "zooms in" on the target location.
This hierarchical approach allows the model to utilize the power of Logistic Regression on fine-grained grids that would be computationally prohibitive for a flat model. Furthermore, by using k-d trees to subdivide the Earth based on document density rather than uniform degrees, we ensure that every cell has sufficient data for training, effectively mitigating rural bias.
Key Results and Performance
We evaluated HierLR across six large-scale datasets, including Twitter (US and World), Wikipedia (English, German, and Portuguese), and Flickr. The hierarchical model consistently outperformed state-of-the-art text-only methods.
- Accuracy: On the US Twitter dataset (TwUS), HierLR achieved 49.2% accuracy within a 161km (100-mile) radius.
- Error Reduction: On English Wikipedia, the method reduced the mean error distance to 168.7 km, a significant improvement over the Naive Bayes baseline of 326.8 km.
- Feature Selection: Unlike generative models, Logistic Regression naturally assigns high weights to geocentric terms. The model automatically identifies regional slang (e.g., "hella" in San Francisco) and local landmarks without requiring external gazetteers.
Conclusion
By replacing flat generative models with a hierarchy of discriminative classifiers, we significantly improve the precision of text-based geolocation. This method is language-agnostic and scales effectively across different platforms and document types. Future work may involve integrating non-textual metadata or clustering documents by topic to further refine regional linguistic signals.
Summary updated