Datasets:
language:
- zh
license: cc-by-nc-4.0
task_categories:
- text-generation
pretty_name: TransitLM
tags:
- transportation
- route-planning
- public-transit
- mobility
- instruction-tuning
- benchmark
size_categories:
- 10M<n<100M
TransitLM: A Large-Scale Dataset and Benchmark for Map-Free Transit Route Generation
TransitLM is a large-scale dataset of over 13 million transit route planning records from four Chinese cities (Beijing, Shanghai, Shenzhen, and Chengdu) covering 120,845 stations and 13,666 lines. It is designed to enable training and evaluating language models for end-to-end, map-free transit route generation directly from origin-destination information.
Dataset Description
TransitLM is designed to support training and evaluation of models that generate structured transit routes. The dataset includes coordinates, station sequences, transfer structure, line information, and route annotations.
Released Files
| File Pattern | Content | Section |
|---|---|---|
transit-lm-benchmark*-train.csv |
Anonymized SFT training splits (benchmark-aligned) | §2 |
transit-lm-benchmark*-test.csv |
Anonymized SFT test splits for task evaluation | §2 |
transit-lm-general-benchmark*-test.csv |
Real-world benchmark test sets (real station names + coordinates) | §1 |
transit-lm-station-info.csv |
Static station-level reference information | — |
transit-lm-station-ids.json |
Station ID list covering the released transit network | — |
transit-lm-cpt-corpus/transit-lm-cpt-corpus-part*.csv |
CPT corpus shards with unified three-digit sequential filenames (e.g. part001) |
§2 |
All released data follows the anonymization principles described in the paper. The sections below explain the data treatment and evaluation protocol for each component.
Quick Start (Evaluation)
You can use the evaluation code provided in the official repository to evaluate your models on the TransitLM benchmark.
Requirements: Python 3.8+
# Run the built-in examples:
python3 single_route/evaluate.py --input_field generate_results
python3 personalized/evaluate.py --input_field generate_results
python3 diversity/evaluate.py --input_field generate_results
python3 general_llm/evaluate.py
File Format Examples
1. Anonymized SFT train/test (transit-lm-benchmark*-train.csv, transit-lm-benchmark*-test.csv)
Columns:
task_id, req_type, adcode, indexid, system_prompt, sft_prompt, sft_label
Example:
task_id,req_type,adcode,indexid,system_prompt,sft_prompt,sft_label
benchmark1-train,0,310110,a02385072c754b19067c70af8bb62de1,"你是公共交通路线规划专家,熟悉公共交通网络。...","{""query"":""我需要从上海北外滩亚朵酒店到上海市公安局治安总队一大队,请告诉我乘车方案"",""start"":""121.515027,31.260541"",""end"":""121.490488,31.209797"",""city"":""上海""}","{""line_sequence"":[""地铁4号线内圈(宜山路--宜山路)""],""station_sequence"":[""bus-1669599"",""bus-1670350"",""bus-1670805""],""total_distance"":""10.7公里"",""total_time"":""44分钟"",""total_fare"":""4"",""start_transfer_mode"":""步行"",""end_transfer_mode"":""步行"",""start_transfer_distance"":""523米"",""end_transfer_distance"":""1.1公里""}"
2. Real-world benchmark (transit-lm-general-benchmark*-test.csv)
Columns:
task_id, req_type, adcode, indexid, system_prompt, sft_prompt, sft_label
Example:
task_id,req_type,adcode,indexid,system_prompt,sft_prompt,sft_label
general_benchmark1-test,0,440307,04258df410d3ec5d53e64de9f49b26be,"你是公共交通路线规划专家,熟悉公共交通网络。...","{""query"":""我在佳兆业君汇公馆,想去石芽岭(地铁站),怎么坐车?"",""start"":""114.130533,22.692349"",""end"":""114.137989,22.628479"",""city"":""深圳""}","{""line_sequence"":[""977路(启英学校--田贝总站)""],""station_sequence"":[""平湖派出所"",""平湖中心小学"",""富伟厂""],""total_distance"":""10.3公里"",""total_time"":""46分钟"",""total_fare"":""2"",""start_transfer_mode"":""步行"",""end_transfer_mode"":""步行"",""start_transfer_distance"":""185米"",""end_transfer_distance"":""77米""}"
1. Benchmark Test Samples
30,000 test examples across three tasks: optimal route generation, preference-aware planning, and multi-route generation.
Data characteristics:
- Real GPS coordinates without perturbation
- Real station names in natural language
- Full route-structural metadata: station sequences, line sequences, transfer points, distances, travel times, and fares
Purpose. This subset is the ground-truth evaluation benchmark for the research community. Unperturbed samples enable fair comparison across models trained on our corpus, tool-augmented LLMs, and any future transit-domain model.
2. CPT + SFT Corpus (Anonymized)
13.9M CPT records, 90K SFT training examples, and 30K SFT test examples.
Anonymization
| Transformation | Method | Training Impact |
|---|---|---|
| Coordinate perturbation | Deterministic hash-based offset, ±100m on a ~500m grid | Negligible. Grid-coherent offset preserves spatial structure. |
| Station name removal | Names removed from station sequences, retaining only numeric IDs | None. Topological learning relies on IDs and connectivity |
3. Privacy Architecture
Unlike GPS trajectory datasets that record continuous traces, each record here is an isolated OD planning request with no temporal continuity. Structural safeguards include user identifier removal and coordinate perturbation combined with structural safeguards to prevent re-identification.
4. Why Both Perturbed and Real Data?
This dual-release design maximizes research utility through reproducible training and fair evaluation, while minimizing privacy exposure by applying perturbation only where data scale creates risk. For a detailed explanation of the privacy architecture, please refer to the paper.