Abstract
Understanding the demographics of hidden populations, such as men who have sex with men (MSM), sex workers, or injecting drug users, is of great importance for the adequate deployment of intervention strategies and public health decision-making. However, due to hard-to-access properties—including lack of a sampling frame, sensitivity issues, and reporting errors—traditional survey methods are largely limited. This study utilizes data from an active online MSM community in China to develop location inferring methods, achieving high-resolution mapping at a national level. We compare popular inference algorithms and propose a new hybrid model that achieves superior accuracy based solely on text content. This approach overcomes sparse location labeling in user profiles and can be extended to other hidden populations.
Introduction
Public health officials face significant challenges when studying "hidden populations." Groups like MSM often face social stigma or legal risks, leading them to avoid traditional surveys. The absence of a comprehensive sampling frame makes it difficult to deploy targeted interventions, such as HIV prevention programs, where they are needed most.
While social media provides a potential data source, privacy concerns lead many users to leave profile location fields blank or provide inaccurate information. However, within niche communities, users frequently disclose locations in the body of their posts to facilitate offline connections. The challenge lies in accurately extracting these locations from short, informal, and often "noisy" text containing internet slang.
Methodology
The research team evaluated three standard Natural Language Processing (NLP) approaches: Gazetteer-based matching, Part-of-Speech (POS) tagging, and Named Entity Recognition (NER).
To improve upon these baselines, the authors introduced the Hybrid Voting Algorithm for Location Inference (HVA-LI). This model addresses a key weakness of simple gazetteer matching: the tendency to flag locations mentioned casually (e.g., "I want to visit Shanghai") rather than as a residence. By implementing "Strong Constraints"—requiring location words to appear alongside specific context keywords (e.g., "dating," "from")—and using an ensemble "voting" system between Gazetteer and NER methods, the researchers significantly filtered out false positives.
Data and Validation
The study analyzed over 13 million records from the "gay-bar" sub-community on Baidu Tieba, representing 628,360 unique users. A "ground truth" set of 10,000 manually labeled posts was used for benchmarking, while GPS coordinates from a subset of 30,948 users validated the final geographic distribution.
Results
Standalone evaluations revealed that the Gazetteer-based method was the most robust baseline, outperforming more complex NER and POS models in the informal text environment of social media. This is largely because internet slang often breaks the grammatical rules that more sophisticated models rely on.
The proposed hybrid Gazetteer & NER model significantly improved performance. While the baseline Gazetteer method achieved an absolute accuracy (Success Rate) of 50.3%, the hybrid approach reached 71.3%. Furthermore, the "Targeting Ratio"—the precision of identified locations—reached 91.4%. This allowed the team to infer locations for over 156,000 users who had no location data in their public profiles, effectively mapping 91% of the previously "invisible" community.
Discussion and Conclusion
The study highlights a "dating disclosure paradox": users who hide locations in formal profiles for privacy often voluntarily share them in informal text to meet social goals. The success of the HVA-LI model demonstrates that ensemble filtering is essential for handling the linguistic noise of internet slang.
Geographic analysis revealed that MSM populations in China are heavily clustered in economically developed and culturally open "hub" cities like Chengdu, Wuhan, and Chongqing, rather than being strictly tied to total population density. While posting frequency remains a limitation for "lurkers," this text-based inference tool provides a vital new capability for public health resource allocation where traditional data is scarce.
Summary updated