Jadwal Sholat

Memuat jadwal sholat…

Computer Science editorial

Open AccessOA2026

LLM-Aided A* Search in Non-Geometric Network Graphs

Using large language models to generate waypoints and landmark-based heuristics for efficient shortest-path search on arbitrary network topologies
Nouf Alabbasi; Esraa Ghourab; Omar Alhussein· 2026· DOI 10.48550/arXiv.2606.23136

The core problem

Finding the shortest path in non-geometric network graphs is a fundamental problem in network optimization, where edge weights encode arbitrary metrics such as latency, monetary cost, or reliability rather than spatial distance. Classical informed search algorithms like A* rely on a heuristic function that estimates the cost from a node to the goal. In spatial domains, the Euclidean distance provides a natural, admissible heuristic. However, on non-geometric graphs—such as communication networks, social graphs, or abstract cost networks—no such geometric counterpart exists. This absence of an informative heuristic severely degrades the efficiency of A*, often causing it to expand nearly as many nodes as uninformed search.

The authors, Nouf Alabbasi, Esraa Ghourab, and Omar Alhussein, address this gap by proposing a large language model (LLM)-aided A* algorithm. Their key insight is to leverage an LLM to generate intermediate waypoints that guide the search toward promising regions of the graph. To enable the LLM to reason about distances without geometric coordinates, they introduce landmark distances as a compact structural feature. These landmark distances serve a dua

Innovation

The experimental results demonstrate that LLM-generated waypoints significantly improve the efficiency of A* search on non-geometric graphs. Across all tested topologies, the number of expanded nodes is reduced by approximately 50% compared to standard A* with the ALT heuristic alone. This reduction is consistent across different graph sizes and structures.

**Path cost.** Despite the substantial reduction in expanded nodes, the path cost increase is marginal. On average, the path found by the LLM-aided A* is within 1-2% of the optimal path cost. This indicates that the waypoints effectively guide the search toward near-optimal routes without sacrificing solution quality.

**Impact of prompt engineering.** The authors analyze the effect of different prompting strategies. They find that incorporating compact structural features (landmark distances) into the prompt yields greater improvements than advanced prompting techniques such as chain-of-thought or few-shot learning. Specifically, when the LLM is provided with heuristic estimates for a subset of nodes, the reduction in expanded nodes is more pronounced and consistent.

**Ablation studies.** Ablations show that the number of lan

Finding the shortest path in non-geometric network graphs is a fundamental problem in network optimization, where edge weights encode arbitrary metrics such as latency, monetary cost, or reliability rather than spatial distance. Classical informed search algorithms like A* rely on a heuristic function that estimates the cost from a node to the goal. In spatial domains, the Euclidean distance provides a natural, admissible heuristic. However, on non-geometric graphs—such as communication networks, social graphs, or abstract cost networks—no such geometric counterpart exists. This absence of an informative heuristic severely degrades the efficiency of A*, often causing it to expand nearly as many nodes as uninformed search.
The authors, Nouf Alabbasi, Esraa Ghourab, and Omar Alhussein, address this gap by proposing a large language model (LLM)-aided A* algorithm. Their key insight is to leverage an LLM to generate intermediate waypoints that guide the search toward promising regions of the graph. To enable the LLM to reason about distances without geometric coordinates, they introduce landmark distances as a compact structural feature. These landmark distances serve a dual purpose: they provide an admissible landmark-based (ALT) heuristic for the A* search, and they are supplied to the LLM to restore the distance-to-destination signal that is otherwise missing on non-geometric graphs.

Why it matters

The findings highlight the potential of combining LLM-based guidance with classical search algorithms for efficient network optimization. The dual role of landmark distances—as both an admissible heuristic and a compact structural feature for the LLM—is a key enabler. By providing the LLM with a distance-to-destination signal, the method overcomes the fundamental limitation of non-geometric graphs where no geometric heuristic exists.

The authors note that the LLM does not need to be fine-tuned; off-the-shelf models can generate useful waypoints when prompted appropriately. This makes the approach accessible and adaptable. However, the reliance on an LLM introduces computational overhead for prompt processing and inference, which may offset some of the search-time savings. The authors argue that this overhead is acceptable given the significant reduction in expanded nodes, especially in large graphs where search dominates runtime.

**Limitations and future work.** The current study is limited to graphs with up to 2,000 nodes. Scaling to larger graphs may require more efficient landmark selection and prompt compression. The quality of waypoints depends on the LLM's understanding of graph structure, which may degrade for very large or dynamic graphs. Future work could explore fine-tuning LLMs on graph-specific tasks, integrating the approach with other search algorithms (e.g., D* Lite for dynamic graphs), and applying it to real-world network optimization problems such as routing in communication networks or logistics.

**Broader impact.** The method contributes to the growing field of AI-augmented algorithms, where machine learning models enhance classical combinatorial optimization. It also opens avenues for using LLMs in domains where geometric information is unavailable, such as cybersecurity (e.g., attack graph analysis) and cryptography (e.g., key distribution networks). The taxonomy candidates—Architecture, Cybersecurity, Network, Cryptography—reflect these potential application areas.

Who should read this

CS practitioners and researchers

Opening member content…