用大模型生成路径指引,让搜索算法更快找到网络图中最短路径。
LLM-Aided A* Search in Non-Geometric Network Graphs

- 用大模型预测中间节点,引导A*算法聚焦有希望的区域。
- 实验显示节点扩展量减少约50%,路径代价接近最优解。
- 结构化启发式信息比复杂提示工程更有效,适合网络优化场景。
在非几何网络图中寻找最短路径时,边权重代表延迟或成本等任意度量而非空间距离,使启发式搜索算法效率受限。本文提出一种基于大语言模型(LLM)的A*算法,通过LLM生成中间目标点,引导搜索向有前景的图区域扩展。核心是地标距离:它既是可接受的启发式(ALT),又作为紧凑的结构特征提供给LLM,恢复其在非几何图上缺失的距离-终点信号。在含最多2,000个节点的多种图拓扑上的实验证明,LLM生成的中间点使扩展节点数减少约50%,路径代价仅轻微增加。分析还表明,引入紧凑的启发式估计比高级提示工程更有效。结果表明,结合大模型引导与经典搜索算法在高效网络优化中具有潜力。
原文摘要 · Abstract (English)
Finding the shortest path in non-geometric network graphs, where edge weights encode arbitrary metrics such as latency or monetary cost rather than spatial distance, poses a challenge for informed search algorithms. Their efficiency depends on an informative heuristic, typically supplied in spatial domains by geometric distances that have no counterpart on non-geometric graphs. We propose a large language model (LLM)-aided A* algorithm in which an LLM generates intermediate waypoints that guide the A* expansion toward promising graph regions. At the core of the approach are landmark distances, which serve both as an admissible landmark-based (ALT) heuristic for the search and as a compact structural feature that, supplied to the LLM, restores the distance-to-destination signal it would otherwise lack on non-geometric graphs. Our comprehensive experiments on multiple graph topologies with up to 2,000 nodes demonstrate that LLM-generated waypoints reduce the number of expanded nodes by around 50% while incurring only a marginal path cost increase compared to the optimal solution. We further analyze the impact of prompt engineering and show that incorporating compact structural features, namely heuristic estimates, is more effective than advanced prompting techniques. These findings demonstrate the potential of combining LLM- based guidance with classical search algorithms for efficient network optimization.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。