Paths of A Million People: Extracting Life Trajectories from Wikipedia

Ying Zhang, Xiaofeng Li, Zhaoyang Liu, Haipeng Zhang · DOI

Introduction

Human history is a tapestry of individual movements, yet structured data on human mobility remains remarkably scarce. While birth and death records are often digitized, the "prime years" of a person's life—where they worked, studied, or traveled—often remain locked within unstructured text. Researchers from ShanghaiTech University have introduced COSMOS, a framework designed to extract million-level life trajectories from Wikipedia biography pages, mapping the paths of historical figures at an unprecedented scale.

The Challenge of Trajectory Extraction

Extracting (person, time, location) triplets is a "needle in a haystack" problem. Standard Named Entity Recognition (NER) tools can identify entities like "Bob Hayes," "1964," and "Tokyo," but understanding the specific relationship between them requires deep semantic parsing. Traditional models often struggle with the "long-tail" of linguistic patterns used to describe movement, such as exile, business trips, or academic appointments. For instance, a model might incorrectly assume a person was physically present in a country they merely represented in an international context.

The COSMOS Framework

COSMOS (COntrastive learning and Semi-supervised learning MOdel for Spatio-temporal life trajectory) addresses these challenges through a hybrid ensemble approach:

  1. Dual-Branch Architecture: A CNN branch focuses on local semantics to ensure high precision, while a BERT branch leverages global context to maximize recall. Fusing these allows the model to balance the "picky" nature of CNNs with the "greedy" nature of BERT.
  2. Supervised Contrastive Learning (SCL): The model is trained to "learn to compare," forcing it to cluster similar trajectory contexts together and push dissimilar ones away, which helps distinguish between physical presence and mere mentions.
  3. Semi-supervised Learning: By utilizing pseudo-labeling on 50,000 unlabeled triplets, the model learns to generalize across the diverse linguistic landscape of Wikipedia beyond the limited labeled set.

Dataset Construction and LLM Noise

A core contribution of this work is the WikiLifeTrajectory dataset, consisting of 8,852 ground-truth triplets. The researchers employed a sophisticated pipeline to ensure high-quality data, combining the scale of Large Language Models (LLMs) with the precision of human verification.

The data collection and annotation pipeline for the Representative subset, illustrating the integration of GPT-3.5 annotation with manual verification and correction.

The study revealed that while LLMs like GPT-3.5 are excellent for recall (95.12%), they suffer from low precision (56.53%). They frequently misinterpret mentions of locations—such as administrative roles or affiliations—as actual physical presence, highlighting the necessity of specialized models like COSMOS for high-quality data extraction.

Results and Analysis

COSMOS achieved a state-of-the-art F1 score of 85.95%, significantly outperforming baselines like RoBERTa (85.38%) and CeleTrip (80.90%). Beyond performance metrics, the model's ability to categorize the nature of these trajectories provides a rich dataset for historical and sociological analysis.

(a) Examples of correct (green) and incorrect (red) triplet extractions; (b) The distribution of event types identified across the dataset, highlighting the diversity of life trajectories captured.

As shown in the distribution of event types, the extracted trajectories cover a wide array of life events, from "Work" and "Speech" to "Competition" and "Exile." By mapping these paths for thousands of individuals, the researchers were able to construct "interaction networks," transforming static biographies into dynamic social graphs that show where historical figures' paths crossed at specific institutions or events.

Conclusion and Future Directions

COSMOS represents a significant step toward digitizing human history at scale, processing nearly 2 million biography pages. While the model currently faces challenges with geopolitical nuances (e.g., administrative actions vs. physical presence) and is limited to English Wikipedia, it provides a robust foundation for future multi-lingual and granular event extraction. Future work will focus on categorizing the specific purpose of stays, further enriching our understanding of historical social dynamics.

Summary updated

BibTeX
@inproceedings{zhang2025paths,
  author = {Ying Zhang and Xiaofeng Li and Zhaoyang Liu and Haipeng Zhang},
  title = {{Paths of A Million People: Extracting Life Trajectories from Wikipedia}},
  booktitle = {Icwsm},
  year = {2025},
  doi = {10.1609/icwsm.v19i1.35930},
}
Figure