Spaces:
Sleeping
A newer version of the Gradio SDK is available:
6.9.0
title: HiCoTraj
emoji: πΊοΈ
colorFrom: red
colorTo: indigo
sdk: gradio
app_file: app.py
pinned: false
HiCoTraj Demo
Zero-Shot Demographic Reasoning via Hierarchical Chain-of-Thought Prompting from Trajectory ACM SIGSPATIAL GeoGenAgent Workshop 2025
Overview
HiCoTraj is a demo that shows how a large language model can infer demographic attributes, specifically household income, from raw human mobility trajectories through a three-stage hierarchical chain-of-thought prompting strategy. It does not require training data or fine-tuning.
Interface Layout
| Component | Description |
|---|---|
| Agent Cards | Top panel β 6 showcase agents from the NUMOSIM dataset. Click any card to load that agent's data throughout the interface. |
| Trajectory Map | Interactive map of stay points, ordered chronologically (yellow β dark red). Click any dot for location, time, and activity details. |
| Summary Tab | Rule-based processed data: top locations, temporal distribution, activity breakdown, and observation period. |
| Raw Data Tab | Full daily activity log. Use Show All Days to expand beyond the preview. |
| CoT Panel | Right column β step-by-step LLM reasoning. Advance with the βΆ button; each click runs one stage. |
How to Run the Demo
- Select an agent by clicking one of the six cards at the top of the page.
- Explore the Trajectory Map β hover and click stay-point markers to inspect visit details.
- Switch to the Raw Data tab and click Show All Days to view the complete daily log.
- Click βΆ Stage 1: Feature Extraction to begin the reasoning chain.
- Click βΆ Stage 2: Behavioral Analysis β Stage 1 results are now visible.
- Click βΆ Stage 3: Demographic Inference β all three stages shown simultaneously.
- Click βΊ Reset to clear results and try a different agent.
π‘ Tip: Click βΌ prompt under each stage header to expand the full prompt specification used for that step.
Hierarchical Chain-of-Thought Stages
π΅ Stage 01 β Feature Extraction
The LLM receives raw trajectory data and extracts objective features without interpretation: location inventory (POI names, visit counts, price tier), temporal patterns (time-of-day and weekday/weekend split), spatial activity radius, and daily activity sequences.
Displayed as: location table with visit bars Β· time-of-day color segment bar Β· weekday/weekend split
π Stage 02 β Behavioral Analysis
Using Stage 1 features, the model performs behavioral abstraction across four dimensions: Routine & Schedule (work pattern type), Economic Behavior (spending tier from venue choices), Social & Lifestyle (leisure and community engagement), and Routine Stability (consistency of movement patterns).
Displayed as: 2Γ2 card grid β one card per behavioral dimension
π΄ Stage 03 β Demographic Inference
The model synthesizes Stages 1 and 2 to infer the agent's household income bracket, citing specific mobility evidence. The structured output (INCOME_PREDICTION / INCOME_REASONING) enables reliable extraction and display.
Displayed as: income prediction badge Β· evidence-grounded reasoning text
Dataset
NUMOSIM β NUMoSim: A Synthetic Mobility Dataset with Anomaly Detection Benchmarks. Stanford C., Adari S., Liao X., et al. ACM SIGSPATIAL Workshop on Geospatial Anomaly Detection, 2024.
Synthetic trajectories preserving real population demographics and mobility patterns.
- Demo subset: 6 agents
- Attribute inferred: household income bracket
- Method: zero-shot LLM, no fine-tuning