Abstract
Polestar is Baidu’s industrial-scale public transportation routing engine, serving over 330 cities and handling 100 million daily queries. By employing a multi-layered "Virtual Graph" approach and a two-pass machine learning ranking pipeline, Polestar provides context-aware route recommendations with sub-250ms latency. This paper details the architecture, graph construction, and ranking strategies that allow Polestar to balance efficiency with highly personalized user preferences.
1. Introduction
Public transportation routing is a complex challenge due to the massive scale of transit networks and the dynamic nature of user preferences. Unlike simple road network navigation, transit routing must account for overlapping lines, transfer costs, and situational factors such as weather and time of day. Polestar addresses these by decoupling graph search from preference ranking, ensuring both speed and relevance.
2. System Architecture
The Polestar system is built on a five-layer architecture designed for scalability and speed.
As shown in the architecture, the system progresses from a data warehouse (storing static and dynamic data) to graph construction, candidate generation, and finally a sophisticated ranking module before reaching the front-end applications.
3. Public Transportation Graph (PTG) Construction
A key innovation in Polestar is the use of "Virtual Graphs." While a Physical Graph maps actual stations and lines, Virtual Graphs represent different optimization objectives, such as minimizing travel time or walking distance.
This decoupled structure allows the search algorithm to efficiently query multiple cost layers simultaneously, avoiding the combinatorial explosion typical of unified transit graphs.
4. Route Candidate Generation and Ranking
Polestar uses a two-stage process to deliver results:
- Candidate Generation: Employs bidirectional Dijkstra search on virtual graphs and road-network-based station binding to find feasible routes in tens of milliseconds.
- Two-Pass Ranking:
- Primary Ranking: Groups and filters candidates to ensure transport mode diversity (e.g., balancing bus vs. metro options).
- Re-ranking: Utilizes a Gradient Boosting Decision Tree (GBDT) model. This model incorporates situational features like weather (rain, AQI), temporal context (rush hour), and spatial context (POI density at the destination).
5. Evaluation and Real-world Impact
Evaluated on massive datasets from Shanghai and Guangzhou, Polestar achieved an NDCG@1 of over 0.93. The system maintains an end-to-end response time of approximately 300ms, even for long-distance queries. Since its deployment on Baidu Maps, the engine has driven a 9.4% relative increase in user click ratios, demonstrating its effectiveness in matching real-world user intent.
6. Conclusion
Polestar demonstrates that combining efficient graph search with context-aware machine learning can solve the scale and personalization challenges of modern urban transit. Future work includes extending this unified approach to inter-city travel and further optimizing ranking latency to improve the user experience in smaller cities.
Summary updated