Abstract
Online Social Networks (OSNs) generate vast quantities of check-in data, offering a window into user behavior and urban dynamics. However, traditional feature engineering is labor-intensive, and existing network embedding methods are often task-agnostic, failing to capture specific demographic or categorical nuances. We present DeepCity, a deep learning framework that profiles users and locations by applying task-specific random walks to social media check-in data. By injecting domain-specific bias—calculated via KL divergence—into the network embedding process, DeepCity creates highly accurate features that outperform general-purpose models by over 10% across multiple prediction tasks, including gender, race, age, and location category.
Introduction
The proliferation of location-based social networks has provided researchers with unprecedented access to human mobility patterns. Extracting meaningful features from this sparse and noisy data is a primary challenge. While automated methods like DeepWalk have replaced manual feature engineering, they treat all network connections with equal weight. This task-agnostic approach ignores the fact that different social signals are relevant for different prediction goals. For instance, shared visits to a transit hub may not be as informative for demographic profiling as visits to specialized venues. DeepCity addresses this by making the feature learning process "aware" of the specific prediction task at hand.
Methodology
DeepCity moves beyond simple user-location graphs by introducing several key innovations in the embedding pipeline.
Temporal Modeling and Graph Construction
To capture the varying nature of locations over time (e.g., a bar's atmosphere at 11 PM versus 11 AM), the framework utilizes temporal-locations and temporal-users. Two primary bipartite graphs are constructed:
- $G_{U,Q}$: Connecting users to temporal-locations.
- $G_{L,Y}$: Connecting locations to temporal-users.
Task-Specific Random Walks
The core of DeepCity is the guided random walk. Before generating sequences for the Skip-gram (Word2Vec) model, the framework calculates a bias value using KL divergence. This value measures how much a specific temporal-location's visitor distribution (e.g., age or race) deviates from the general population.
If a location is visited disproportionately by a certain group, it receives a higher bias score for that specific task. Edge weights in the graph are adjusted accordingly, ensuring that the random walk algorithm traverses neighborhoods most relevant to the target prediction (gender, race, age, or category).
Embedding and Classification
The resulting biased walks are processed by a Skip-gram model to produce node vectors. These embeddings serve as features for standard classifiers, such as Logistic Regression, to perform the final profiling tasks.
Experimental Results
The framework was evaluated using a dataset of 42 million Instagram check-ins across New York, Los Angeles, and London. Ground truth for users was established via Face++ analysis of profile photos, while location categories were sourced from the Foursquare API.
Demographic Profiling
DeepCity consistently outperformed baselines such as STL (Tensor Decomposition), MF (Matrix Factorization), and DeepWalk. In gender prediction, the model achieved a near-perfect 0.95 AUC across all three cities, significantly higher than the best-performing baseline, STL.
For race prediction, the advantage of task-specific walks was even more pronounced. In New York, DeepCity achieved a 0.72 Macro-F1, nearly doubling the 0.38 score of the STL baseline. This suggests that the model effectively identifies and leverages locations that are highly informative for specific demographic traits.
Location Category Prediction
The framework also excelled at predicting location categories, outperforming specialized models like SAP. By utilizing the "temporal-user" approach, DeepCity captures the evolving "vibe" of a location more effectively than static user-based models.
Discussion and Conclusion
A key insight from this research is that network embedding is remarkably robust to data sparseness. By exploring multi-hop neighbors through random walks, DeepCity can infer properties even when direct check-in data is thin. Furthermore, the results prove that task-specificity is essential; DeepCity significantly outperformed DeepWalk, the task-agnostic version of the same algorithm.
While the reliance on profile picture analysis for ground truth presents potential biases, the framework's success across diverse cities and tasks demonstrates its generalizability. Future work will explore applying task-specific walks to other data modalities, such as text-based status updates and image content, to further refine social media-based profiling.
Summary updated