Datasets:
Update dataset card with paper link, GitHub link, and evaluation usage
#2
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
license: cc-by-nc-4.0
|
| 3 |
task_categories:
|
| 4 |
- text-generation
|
| 5 |
-
|
| 6 |
-
- zh
|
| 7 |
tags:
|
| 8 |
- transportation
|
| 9 |
- route-planning
|
|
@@ -11,14 +12,19 @@ tags:
|
|
| 11 |
- mobility
|
| 12 |
- instruction-tuning
|
| 13 |
- benchmark
|
| 14 |
-
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# TransitLM: Dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
## Dataset Description
|
| 20 |
|
| 21 |
-
TransitLM is
|
| 22 |
|
| 23 |
### Released Files
|
| 24 |
|
|
@@ -31,7 +37,21 @@ TransitLM is a dataset for public transit route planning in Chinese urban enviro
|
|
| 31 |
| `transit-lm-station-ids.json` | Station ID list covering the released transit network | — |
|
| 32 |
| `transit-lm-cpt-corpus/transit-lm-cpt-corpus-part*.csv` | CPT corpus shards with unified three-digit sequential filenames (e.g. `part001`) | §2 |
|
| 33 |
|
| 34 |
-
All released data follows the anonymization principles described in
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
### File Format Examples
|
| 37 |
|
|
@@ -59,51 +79,6 @@ task_id,req_type,adcode,indexid,system_prompt,sft_prompt,sft_label
|
|
| 59 |
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米""}"
|
| 60 |
```
|
| 61 |
|
| 62 |
-
#### 3. Station reference (`transit-lm-station-info.csv`)
|
| 63 |
-
|
| 64 |
-
Columns:
|
| 65 |
-
`stop_id, ad_code, coord_x, coord_y, next_hop_stations`
|
| 66 |
-
|
| 67 |
-
Example:
|
| 68 |
-
|
| 69 |
-
```csv
|
| 70 |
-
stop_id,ad_code,coord_x,coord_y,next_hop_stations
|
| 71 |
-
bus-1000071,110117,117.090101,40.130034,"[""bus-1000202"", ""bus-1000089"", ""bus-1000087"", ""bus-1000071""]"
|
| 72 |
-
```
|
| 73 |
-
|
| 74 |
-
#### 4. Station ID list (`transit-lm-station-ids.json`)
|
| 75 |
-
|
| 76 |
-
Example:
|
| 77 |
-
|
| 78 |
-
```json
|
| 79 |
-
[
|
| 80 |
-
"bus-1000071",
|
| 81 |
-
"bus-1000074",
|
| 82 |
-
"bus-1000082"
|
| 83 |
-
]
|
| 84 |
-
```
|
| 85 |
-
|
| 86 |
-
#### 5. CPT corpus shard (`transit-lm-cpt-corpus/transit-lm-cpt-corpus-part*.csv`)
|
| 87 |
-
|
| 88 |
-
Columns:
|
| 89 |
-
`id, content, pt`
|
| 90 |
-
|
| 91 |
-
The `pt` field is used only as a partition marker inherited from the original sharding pipeline. It carries no semantic meaning for modeling or evaluation.
|
| 92 |
-
|
| 93 |
-
Example:
|
| 94 |
-
|
| 95 |
-
```csv
|
| 96 |
-
id,content,pt
|
| 97 |
-
session_65703461_0,"路线规划。规划城市:北京,起点坐标:116.402471,39.933658,终点坐标:116.068893,39.648444。有以下几种方案:方案1(纯打车)... 方案2(公交+地铁)... 经过bus-900579,bus-898547,...,bus-857245",p01
|
| 98 |
-
```
|
| 99 |
-
|
| 100 |
-
**Overview.** We release two parallel test sets that correspond one-to-one, serving different model categories:
|
| 101 |
-
|
| 102 |
-
- **Anonymized SFT test set** (30K samples). For models trained on our anonymized corpus. These models have only seen numeric station IDs and perturbed coordinates, so they must be evaluated in the same representation space.
|
| 103 |
-
- **Real-world benchmark** (30K samples). For general-purpose LLMs not trained on our data. These models operate with real station names and coordinates and cannot interpret anonymized IDs, so they require unperturbed evaluation data.
|
| 104 |
-
|
| 105 |
-
This parallel design ensures fair evaluation for both model types while keeping results directly comparable.
|
| 106 |
-
|
| 107 |
---
|
| 108 |
|
| 109 |
## 1. Benchmark Test Samples
|
|
@@ -115,9 +90,7 @@ This parallel design ensures fair evaluation for both model types while keeping
|
|
| 115 |
- Real station names in natural language
|
| 116 |
- Full route-structural metadata: station sequences, line sequences, transfer points, distances, travel times, and fares
|
| 117 |
|
| 118 |
-
**Purpose.** This subset is the ground-truth evaluation benchmark for the research community.
|
| 119 |
-
|
| 120 |
-
**Privacy.** These samples contain no user identifiers, no timestamps, and no cross-record linkage. Each is an isolated OD request. All station coordinates and names are already publicly accessible through mapping APIs, so releasing them in benchmark format introduces no additional privacy risk.
|
| 121 |
|
| 122 |
---
|
| 123 |
|
|
@@ -129,41 +102,17 @@ This parallel design ensures fair evaluation for both model types while keeping
|
|
| 129 |
|
| 130 |
| Transformation | Method | Training Impact |
|
| 131 |
|---|---|---|
|
| 132 |
-
| Coordinate perturbation | Deterministic hash-based offset, ±100m on a ~500m grid | Negligible. Grid-coherent offset preserves spatial structure.
|
| 133 |
| Station name removal | Names removed from station sequences, retaining only numeric IDs | None. Topological learning relies on IDs and connectivity |
|
| 134 |
|
| 135 |
-
**Rationale.** Bulk harvesting coordinate-ID mappings from a 13.9M-record corpus could enable unauthorized commercial use. OD coordinates reflect real user trip intentions. Perturbation combined with structural safeguards prevents re-identification.
|
| 136 |
-
|
| 137 |
-
### SFT Test Set
|
| 138 |
-
|
| 139 |
-
The 30K SFT test samples undergo identical anonymization. See the Overview above for how they relate to the real-world benchmark and which model category uses which test set.
|
| 140 |
-
|
| 141 |
-
### Usability
|
| 142 |
-
|
| 143 |
-
Despite anonymization, this corpus fully supports continual pre-training for transit topology and spatial reasoning, supervised fine-tuning for all three benchmark tasks, and reproducibility of all paper results.
|
| 144 |
-
|
| 145 |
---
|
| 146 |
|
| 147 |
## 3. Privacy Architecture
|
| 148 |
|
| 149 |
-
Unlike GPS trajectory datasets
|
| 150 |
-
|
| 151 |
-
Structural safeguards enforced at the data construction stage:
|
| 152 |
-
- Single calendar day sampling with no timestamps retained
|
| 153 |
-
- User identifiers removed prior to construction, with no linkage key across records
|
| 154 |
-
- Only route-structural metadata released. No demographic attributes, device fingerprints, or PII
|
| 155 |
-
|
| 156 |
-
These properties make it infeasible to associate records with the same individual or reconstruct mobility patterns, regardless of coordinate perturbation.
|
| 157 |
|
| 158 |
---
|
| 159 |
|
| 160 |
## 4. Why Both Perturbed and Real Data?
|
| 161 |
|
| 162 |
-
|
| 163 |
-
|---|---|---|
|
| 164 |
-
| Coordinate privacy | ✅ ±100m perturbation prevents bulk harvesting | Public data, no new risk |
|
| 165 |
-
| Fair evaluation | ❌ Perturbed coordinates disadvantage general LLMs | ✅ Real coordinates enable direct comparison |
|
| 166 |
-
| Reproducibility | ✅ Full training pipeline reproducible | ✅ Standardized community test set |
|
| 167 |
-
| Training utility | ✅ < 0.1% spatial error, topology preserved | Not used for training |
|
| 168 |
-
|
| 169 |
-
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.
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- zh
|
| 4 |
license: cc-by-nc-4.0
|
| 5 |
task_categories:
|
| 6 |
- text-generation
|
| 7 |
+
pretty_name: TransitLM
|
|
|
|
| 8 |
tags:
|
| 9 |
- transportation
|
| 10 |
- route-planning
|
|
|
|
| 12 |
- mobility
|
| 13 |
- instruction-tuning
|
| 14 |
- benchmark
|
| 15 |
+
size_categories:
|
| 16 |
+
- 10M<n<100M
|
| 17 |
---
|
| 18 |
|
| 19 |
+
# TransitLM: A Large-Scale Dataset and Benchmark for Map-Free Transit Route Generation
|
| 20 |
+
|
| 21 |
+
[**Paper**](https://huggingface.co/papers/2605.22355) | [**Code**](https://github.com/HotTricker/TransitLM)
|
| 22 |
+
|
| 23 |
+
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.
|
| 24 |
|
| 25 |
## Dataset Description
|
| 26 |
|
| 27 |
+
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.
|
| 28 |
|
| 29 |
### Released Files
|
| 30 |
|
|
|
|
| 37 |
| `transit-lm-station-ids.json` | Station ID list covering the released transit network | — |
|
| 38 |
| `transit-lm-cpt-corpus/transit-lm-cpt-corpus-part*.csv` | CPT corpus shards with unified three-digit sequential filenames (e.g. `part001`) | §2 |
|
| 39 |
|
| 40 |
+
All released data follows the anonymization principles described in the paper. The sections below explain the data treatment and evaluation protocol for each component.
|
| 41 |
+
|
| 42 |
+
## Quick Start (Evaluation)
|
| 43 |
+
|
| 44 |
+
You can use the evaluation code provided in the [official repository](https://github.com/HotTricker/TransitLM) to evaluate your models on the TransitLM benchmark.
|
| 45 |
+
|
| 46 |
+
Requirements: Python 3.8+
|
| 47 |
+
|
| 48 |
+
```bash
|
| 49 |
+
# Run the built-in examples:
|
| 50 |
+
python3 single_route/evaluate.py --input_field generate_results
|
| 51 |
+
python3 personalized/evaluate.py --input_field generate_results
|
| 52 |
+
python3 diversity/evaluate.py --input_field generate_results
|
| 53 |
+
python3 general_llm/evaluate.py
|
| 54 |
+
```
|
| 55 |
|
| 56 |
### File Format Examples
|
| 57 |
|
|
|
|
| 79 |
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米""}"
|
| 80 |
```
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
---
|
| 83 |
|
| 84 |
## 1. Benchmark Test Samples
|
|
|
|
| 90 |
- Real station names in natural language
|
| 91 |
- Full route-structural metadata: station sequences, line sequences, transfer points, distances, travel times, and fares
|
| 92 |
|
| 93 |
+
**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.
|
|
|
|
|
|
|
| 94 |
|
| 95 |
---
|
| 96 |
|
|
|
|
| 102 |
|
| 103 |
| Transformation | Method | Training Impact |
|
| 104 |
|---|---|---|
|
| 105 |
+
| Coordinate perturbation | Deterministic hash-based offset, ±100m on a ~500m grid | Negligible. Grid-coherent offset preserves spatial structure. |
|
| 106 |
| Station name removal | Names removed from station sequences, retaining only numeric IDs | None. Topological learning relies on IDs and connectivity |
|
| 107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
---
|
| 109 |
|
| 110 |
## 3. Privacy Architecture
|
| 111 |
|
| 112 |
+
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
---
|
| 115 |
|
| 116 |
## 4. Why Both Perturbed and Real Data?
|
| 117 |
|
| 118 |
+
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|