Source-linked AI summary
Empowering A* Search Algorithms with Neural Networks for Personalized Route Recommendation
Jingyuan Wang, Ning Wu, Wayne Xin Zhao, Fanzhang Peng, Xin Lin
TL;DR
Heuristic route-search methods require hand-set cost functions and have difficulty incorporating varying context, while sparse transition data can make their estimates unreliable. The method neuralizes A* with learned cost functions, decomposing total cost into observable source-to-evaluation-node cost and estimated evaluation-node-to-destination cost. NASR is consistently better than all baselines in the reported cases, including long queries, and the authors report effectiveness and robustness across three datasets.
Problem
Heuristic route-search methods require hand-set cost functions and have difficulty incorporating varying context, while sparse transition data can make their estimates unreliable.
Source: §4 · pp. 3–4Method
The method neuralizes A* with learned cost functions, decomposing total cost into observable source-to-evaluation-node cost and estimated evaluation-node-to-destination cost.
Source: §1 · p. 2Results
NASR is consistently better than all baselines in the reported cases, including long queries, and the authors report effectiveness and robustness across three datasets.
Source: §1 · p. 2, §6.2 · p. 7Takeaways & Limitations
The authors conclude that NASR combines the benefits of heuristic search and neural networks and performs best among the comparison methods.
Source: §6.2 · p. 7The approach assumes road-network information is available for pathfinding.
Source: §4 · p. 4
Abstract
from arXiv · showhide
Personalized Route Recommendation (PRR) aims to generate user-specific route suggestions in response to users' route queries. Early studies cast the PRR task as a pathfinding problem on graphs, and adopt adapted search algorithms by integrating heuristic strategies. Although these methods are effective to some extent, they require setting the cost functions with heuristics. In addition, it is difficult to utilize useful context information in the search procedure. To address these issues, we propose using neural networks to automatically learn the cost functions of a classic heuristic algorithm, namely A* algorithm, for the PRR task. Our model consists of two components. First, we employ attention-based Recurrent Neural Networks (RNN) to model the cost from the source to the candidate location by incorporating useful context information. Instead of learning a single cost value, the RNN component is able to learn a time-varying vectorized representation for the moving state of a user. Second, we propose to use a value network for estimating the cost from a candidate location to the destination. For capturing structural characteristics, the value network is built on top of improved graph attention networks by incorporating the moving state of a user and other context information. The two components are integrated in a principled way for deriving a more accurate cost of a candidate location. Extensive experiment results on three real-world datasets have shown the effectiveness and robustness of the proposed model.
1 INTRODUCTION
The paper addresses the difficulty of combining graph search with learned context-sensitive models for personalized route recommendation. It proposes neural networks to learn A* costs and reports effective, robust performance on three datasets.
1 INTRODUCTION
- Prior heuristic search methods require manually chosen costs and struggle to incorporate context, while short-term prediction models may not suit route recommendation.The task needs to account for user preferences, spatial-temporal influence, and road-network constraints.Source: §1 · p. 1
- The proposed model learns A* cost functions with neural networks, using an attention-based RNN for observable cost and a value network for estimated cost.The RNN also learns a time-varying user moving state, which is fed into the value network; the components are jointly integrated.Source: §1 · p. 2
- NASR is consistently better than the baselines across cases, including long queries, and the authors report effectiveness and robustness on three real-world datasets.The paper presents NASR as combining heuristic search with neural networks.Source: §1 · p. 2
- The paper frames its approach as combining A* search with neural networks to learn costs automatically and incorporate context.The authors describe this as the first use of neural networks to improve A* for PRR, to their knowledge.Source: §1 · p. 2
2 RELATED WORK
Related work spans route-recommendation methods, deep learning for trajectory data, and machine learning for heuristic search. The paper positions NASR within search-based route recommendation while distinguishing it from short-term prediction and prior search-learning work.
Route Recommendation
- Route-recommendation research includes graph search, time-sensitive algorithms, A* search, probabilistic transition or ranking models, and direction-based methods.The paper builds on search-based solutions and identifies automatic neural learning of cost functions as its novelty.Source: §2 · p. 2
Deep Learning for Trajectory Data Mining
- Deep-learning trajectory studies commonly use RNNs and variants, but the cited work mainly targets short-term behaviors such as one-step location recommendation.The authors argue these studies are not suited to the current task.Source: §2 · p. 2
Machine Learning for Heuristic Search
- Machine learning for heuristic search has used learned heuristics, while newer neural approaches address strategy-intensive tasks such as Go and Atari.The paper draws inspiration from these works but focuses on personalized route recommendation and its specific challenges.Source: §2 · pp. 2–3
3 PRELIMINARIES
The preliminaries model the road network as a directed graph and distinguish routes from timestamped user trajectories. PRR is defined as inferring the most probable route for a user’s source–destination query from historical trajectories.
3 PRELIMINARIES
- The study assumes road-network information is available and represents the network as a directed graph of locations and road segments.Locations represent road junctions or ends, and edges represent directed road segments.Source: §3 · p. 3
- A route is an ordered sequence of connected locations, whereas a trajectory is a time-ordered sequence of visited locations with timestamps.Trajectory points are map-matched to road-network locations before use.Source: §3 · p. 3
- A PRR query specifies a source, destination, and departure time; the task is to infer the user’s most probable route from historical trajectories.The route connects the specified source and destination.Source: §3 · p. 3
4 A HEURISTIC A∗SOLUTION FOR PRR
The section formulates PRR as A* search over a road-network graph, with costs reflecting conditional route likelihood. It identifies hand-set heuristics, sparse transition data, and limited context use as weaknesses of this approach.
4 A HEURISTIC A∗SOLUTION FOR PRR
- A* evaluates candidate nodes by combining observable cost from the source with estimated cost to the destination.The estimated cost concerns the unknown optimal continuation; the Figure 1 caption names the two terms and their roles.Source: §4 · p. 3, Figure 1 · p. 4
- The route objective can be expressed as minimizing negative log conditional probability, yielding a likelihood-based cost for candidate route extensions.The cost is motivated by factorizing the route probability using the chain rule.Source: §4 · p. 3
- A first-order Markov assumption can estimate transition probabilities from the current location, query, and user, but the remaining-route cost is harder because the optimal sub-route is unknown.Shortest spatial distance and historical likelihood are cited as possible heuristics for the estimated cost.Source: §4 · p. 3
- Heuristic A* costs are difficult to adapt to varying context, can be unreliable with sparse transition data, and may not reflect a user’s route choice.A shortest-distance route, for example, need not be the user’s final choice.Source: §4 · pp. 3–4
5 THE NASR MODEL
The section presents the proposed Neuralized A-Star based personalized route Recommendation (NASR) model for personalized route recommendation.
- The section presents the Neuralized A-Star based personalized route Recommendation (NASR) model.Source: §5 · p. 4
5.1 Model Overview
NASR retains A*’s search framework but replaces its observable and estimated cost functions with neural networks that share user-state information.
- NASR learns A*’s observable cost g(·) with an RNN and its estimated cost h(·) with a value network, rather than setting either heuristically.The RNN also learns a time-varying user moving state that feeds into the estimated-cost computation.Source: §5.1 · p. 4
5.2 Modeling the Observable Cost with RNN
The observable-cost component uses contextualized recurrent representations to model source-to-candidate movement, with attention augmenting the moving state and road-constrained transition probabilities defining cost.
5.2 Modeling the Observable Cost with RNN
- RNNs implement g(·) because frequency-based transition estimates can be unreliable in the large search space and a scalar cost may not capture user movement state.Source: §5.2 · p. 4
5.2.1 Embedding Rich Context Information.
- The context representation combines user, location, weekday, and hour embeddings to encode preference, current location, and time.Source: §5.2.1 · p. 4
5.2.2 Encoding the Observed Sub-Trajectory with RNN.
- A GRU encodes the observed sub-trajectory into a time-indexed hidden state, giving the model a user moving-state representation beyond a single cost value.Source: §5.2.2 · p. 4
5.2.3 Enhanced Moving States with Attention Mechanism.
- Two attention types improve moving-state learning: intra-trajectory attention considers the whole current trajectory, while inter-trajectory attention incorporates the user’s historical trajectories.The method is motivated by short, noisy observed sub-trajectories.Source: §5.2.3 · pp. 4–5
5.2.4 Observable Cost Computation with the Road Network Con-
- The observable cost sums negative log transition probabilities, normalizing each candidate location over its road-network neighbors rather than using simple distance.Source: §5.2.4 · p. 5
5.3 Modeling the Estimated Cost with Value Networks
The value network estimates candidate-to-destination cost using road-graph representations conditioned on the user’s moving state and context, and temporal-difference learning trains this future-cost estimate.
5.3 Modeling the Estimated Cost with Value Networks
- The value network estimates cost from a candidate location to the destination using graph representations and the moving state, since no explicit future trajectory is observed.Source: §5.3 · p. 5, §5.3.1 · p. 5
5.3.1 Improved Graph Attention Networks for Road Networks.
- Improved graph attention incorporates node representations, discretized distance, and the user’s moving state into attention weights, then combines multiple attention heads.The estimated-cost MLP takes the candidate and destination node representations, moving state, and a spatial-distance embedding as input.Source: §5.3.1 · p. 5
5.3.2 Temporal Difference Learning for the Estimated Cost.
- Because the optimal route to the destination is a multi-step decision process, the model uses temporal-difference learning to train its value estimate without explicitly learning a policy.Source: §5.3.2 · pp. 5–6
5.4 Model Analysis and Learning
NASR combines learned observable and destination costs to evaluate candidate locations in A* search. Its RNN also supplies a moving-state representation to the value network, and the model is learned through pretraining followed by joint alternative optimization.
5.4 Model Analysis and Learning
- NASR sums an RNN-derived observable cost and a value-network estimate of destination cost to evaluate each candidate location.The RNN characterizes the generated sub-trajectory; the value network predicts the estimated cost to reach the destination.Source: §5.4 · p. 6
- NASR automatically learns its cost functions and uses context to capture more complicated personalized trajectory characteristics.This avoids manually setting heuristic functions.Source: §5.4 · p. 6
- The RNN's moving-state representation is shared with the value network, coordinating the two components and providing information from the current sub-trajectory.The model also shares useful information or parameters between components in a principled way.Source: §5.4 · p. 6
- Learning pre-trains the RNN, then jointly trains both components by alternative optimization over training trajectories before A* search uses the learned evaluation cost.Source: §5.4 · p. 6
6 EXPERIMENTS
Across the three datasets, NASR outperforms the comparison methods, while the experiments examine its setup, component variants, and qualitative search behavior. Analyses report gains from attention, moving-state sharing, context-aware graph attention, and 5-step Temporal Difference learning.
6.1 Experimental Setup
- The evaluation uses three real-world trajectory datasets, with user trajectories split 7:1:2 into training, validation, and test sets and queries grouped by route length.The datasets are Beijing taxi, Beijing bicycle, and Porto taxi; the reported analysis distinguishes short, medium, and long queries.Source: §6.1 · p. 6
6.2 Results and Analysis
- NASR is consistently better than all baselines in all cases, and its improvement over them is significant at the 0.01 level.The table compares four metrics across three datasets; larger values are better except for EDT.Source: Table 1 · p. 7, §6.2 · p. 7
- RICK performs especially well among heuristic methods, DeepMove leads the deep-learning baselines, and NASR combines the benefits of heuristic search and neural networks.The paper attributes RICK's strength to road-network information and informed A*; it describes CTRR's recall as poor on medium and long queries.Source: §6.2 · p. 7
6.3 Detailed Analysis on Our Model NASR
- On Beijing taxi F1, performance ranks NA < IA < BA and BA¬S < BA, supporting both attention types and the moving state supplied to the value network.NA omits attention, IA uses intra-trajectory attention, and BA uses both intra- and inter-trajectory attention.Source: §6.3 · pp. 7–8, Figure 2 · p. 8
- For the value network, performance ranks ED < SP < o-GAT < i-GAT, with the context-incorporating improved GAT outperforming the original GAT.The comparison fixes the RNN at its optimal setting; ED uses Euclidean distance and SP uses a scalar product of location embeddings.Source: §6.3 · p. 8
- The 5-step Temporal Difference variant performs best among the compared learning methods, while supervised learning performs worst.The authors report that five steps produces optimal performance in their experiments.Source: §6.3 · p. 8
6.4 Qualitative Analysis
- The learned association scores favor locations on the actual route over the shortest route, and historical visit frequency is also considered in the visualization.The authors observe that the shortest route contains side-road segments possibly affected by traffic congestion at visit time.Source: §6.4 · p. 8, Figure 3 · p. 8
- In the illustrated search, NASR reduces the search space and assigns lower cost to a farther candidate on the main road, which may lead to better traffic conditions.Figure 4(c) marks explored points red and candidate locations green.Source: §6.4 · p. 8, Figure 4 · p. 9
7 CONCLUSIONS
The paper learns A* cost functions for personalized route recommendation using an RNN component and a value network, integrated to derive candidate-location costs. Experiments assess the model’s effectiveness and robustness, while the current work focuses on settings with road-network information.
- The proposed model uses neural networks to learn A* cost functions for personalized route recommendation.Source: §7 · p. 9
- An RNN component and a value network learn the two costs, then integrate to derive a more accurate candidate-location search cost.Source: §7 · p. 9
- Extensive experiments were conducted to verify the model’s effectiveness and robustness.Source: §7 · p. 9
- The current work focuses on PRR with road-network information; extending the model to settings without it is future work.Source: §7 · p. 9