Grid2Guide: A* Enabled Small Language Model for Indoor Navigation
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: Today's paper: "Grid2Guide: A* Enabled Small Language Model for Indoor Navigation".
Jane: The gist The research presents Grid2Guide, a hybrid navigation framework that combines the A search algorithm with a Small Language Model (SLM) to generate clear, human-readable route instructions.
Tom: First, who's behind it and why it matters.
Paper summary: Tom: The paper introduces this Grid2Guide system which first generates an obstacle-aware map from the floorplan image using thresholding and polygon masking to make that binary occupancy grid Jane Then, they use the A* algorithm to find the optimal path between your start point and destination on that grid Tom This search produces a sequence of grid-cell coordinates, but instead of just giving you those numbers, they compress them into concise movement commands through a three-stage pipeline: vectorization, run-length encoding, and diagonal collapse Jane
Lu: What's interesting here is the graph encoding where every free cell becomes a node connected to its eight neighbors because that lets them handle diagonal moves smoothly around sharp corners Tom The movement cost is set such that orthogonal moves are one and diagonal moves are the square root of two, which aligns with their heuristic estimate Jane
Meng: But they don't stop there; the crucial part for usability is the final step where they use a Small Language Model to take those terse commands from A* and transform them into natural language instructions Tom They've instruction-tuned this model and used a system prompt to keep it from hallucinating anything Jane
Lalam: I see what matters most here is that the A* search handles the complex spatial reasoning algorithmically, while the Small Language Model is only responsible for generating the conversational directions for you Tom This separation means they're leveraging A* for accurate path computation and reserving the machine learning model just for formatting Jane
Tom: So how does this compare to other approaches? They compared it against a baseline by Coffrini et al. which used a larger LLM like ChatGPT to generate instructions directly from the image Jane The baseline achieved about eighty-six percent accuracy on a single instruction level but took about four to five minutes per query Tom
Meng: That processing time is really something, and Grid2Guide achieves one hundred percent accuracy across all tested maps because it decouples the spatial structure reasoning from the language generation Jane The paper notes that this modular design ensures the reasoning over spatial structures is handled algorithmically rather than through probabilistic methods Tom
Lu: It’s a clever way to avoid putting a massive model inside the image processing part, which is computationally expensive, and only using it for what it's good at—generating human-readable text Jane This modular design allows them to achieve real-time performance on commodity hardware, which is pretty important for deployment Tom
Lalam: The main point from this Grid2Guide paper is that you get the deterministic path planning of A* combined with the clarity of an SLM's natural language generation Jane It’s a lightweight solution for real-time indoor navigation support, according to their results Tom
Tom: So, we've seen how they build this pipeline and what it does in terms of accuracy versus speed. Now we need to look at what the authors are saying about its overall significance Jane
Conclusion: Tom: Let's talk about the conclusions of "Grid2Guide: A* Enabled Small Language Model for Indoor Navigation" and who wrote it. The paper is by Md. Wasiul Haque, Sagar Dasgupta, and Mizanur Rahman from the University of Alabama Jane They’re focusing on how to make navigation possible without relying on external infrastructure like GPS Tom
Jane: It’s about taking standard architectural floorplan images and turning them into lightweight binary occupancy grids which simplifies the job for the AI part Tom The authors also mention that they are looking ahead to future work involving finding optimized navigation instructions dynamically, meaning maybe instructions change while you're moving Jane
Lu: What really stands out is how they managed to keep the path computation fast, achieving results in a few milliseconds because the A* search is very efficient for this type of graph structure Tom The authors point out that they are using this approach for personal navigation with handheld devices Jane
Meng: From an engineering standpoint, what I’m seeing is that by offloading the deterministic path planning to A*, they get fast performance on standard hardware, and the LLM only handles the final conversion step Tom That means it’s a scalable and cost-effective solution if you have decent mobile hardware Jane
Lalam: The core implication is that you can use existing floor plans to build a navigation system that is accurate because A* finds the true shortest path, and useful because the SLM makes it easy for people with visual impairments to follow Tom It’s a practical application of combining geometric algorithms with language models Jane
Tom: So, this paper shows that you don't need a massive model to get good navigation if you handle the heavy lifting of pathfinding yourself and only use the model for presentation Jane It’s about making complex spatial data usable in a real-time setting without needing expensive sensors or dedicated infrastructure Tom
Lu: The authors are also noting that they are using this framework to test ideas from previous work, like IndoorAtlas and Quuppa, which showed usability but required custom deployment Jane They’re trying to move toward generalized and scalable solutions by leveraging existing floor plans Tom
Meng: What the paper doesn't fully cover is how robust it would be if the map itself was inaccurate or if you had a completely unknown space that wasn't pre-mapped Jane That limitation is something they flag, meaning this system relies on a good initial map of the building Tom
Lalam: So, to wrap up, Grid2Guide is a deterministic path planner coupled with an SLM for user instructions that achieves one hundred percent accuracy on their tested maps while maintaining real-time performance Jane It’s about making navigation accessible using existing architectural data Tom
University of Alabama
cs.LG, cs.AI
Submitted: 2025-08-11
Updated: 2025-08-29
Comments: 17 pages, 9 figures, 6 tables
DOI: 10.1109/JISPIN.2026.3743846
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 80/100
The gist: The gist The research presents Grid2Guide, a hybrid navigation framework that combines the A search algorithm with a Small Language Model (SLM) to generate clear, human-readable route instructions.
Key concepts
- Binary Occupancy Matrix
- This is a map representation where every space in a building is labeled as either 'walkable' (1) or 'blocked' (0). It is created by analyzing an image of the floor plan, classifying pixels to determine which areas are traversable and which are obstacles. This matrix forms the fundamental structure for pathfinding.
- 8-Way Connectivity
- Instead of just moving up, down, left, or right on a grid (4 directions), this method allows movement in all eight surrounding directions. This includes diagonal moves. This is used to create smoother paths around sharp corners in the map, ensuring the A* search finds more efficient routes by allowing shortcuts.
- Path Compression
- After the A* algorithm calculates a long list of coordinates for the shortest path, this step simplifies that list into concise movement commands. It merges consecutive identical steps and replaces adjacent single steps with diagonal entries. This reduces the output to a much shorter, more readable sequence before it reaches the language model.
- SLM-Based Instruction Generation
- The Small Language Model takes the terse, compressed path data from A* and translates it into clear, numbered directions. The SLM is trained specifically for this task and uses a prompt to ensure it generates natural-sounding text instead of errors. This final step makes the navigation guidance understandable for everyday users.
Terminology
Summary
The gist The research presents Grid2Guide, a hybrid navigation framework that combines the A search algorithm with a Small Language Model (SLM) to generate clear, human-readable route instructions.
How it works
Grid2Guide is a five-stage pipeline that transforms a static floorplan image into fluent, human-readable directional instructions From the user’s perspective, the system requires only two inputs: the origin and the destination on the map The approach consists of (i) Map Preprocessing and Grid Generation, (ii) Graph Encoding, (iii) A search with Diagonal Moves, (iv) Path Compression, and (v) SLM-Based Instruction Generation.
- Map Preprocessing and Grid Generation
The initial objective is to generate an obstacle-aware map from the provided floorplan image This is achieved by converting the image into a binary occupancy grid, classifying each pixel as either walkable or blocked using standard image thresholding and polygon-masking techniques. The mask encodes walkable versus obstructed regions in the map. For locations comprising multiple floors, a separate occupancy matrix is constructed for each level To enable vertical traversal, portal nodes are manually defined at the locations of the connecting points (i.e., staircases, elevators, or escalators).
- Graph Encoding
In our implicit graph representation, every free cell Gi,j = 1 becomes a node It is connected to its eight neighboring cells (i + ∆i, j + ∆j) for ∆i, ∆j ∈ (−1, 0, 1)⋃(0, 0). This 8-way connectivity is proposed to ensure smooth, diagonal shortcuts around sharp corners in the grid map. The movement cost is assigned such that c(∆i, ∆j) = 1 for orthogonal moves and c(∆i, ∆j) = √2 for diagonal moves.
- A Search with Diagonal Moves
A search algorithm augmented with 8-way (diagonal) movement is employed to compute the shortest path between the specified start and goal coordinates. The A search maintains three quantities for each free cell (i, j): Cost-to-Come, g(i, j), Heuristic Estimate, h(i, j), and Total Score, f(i, j) = a(i, j) + h(i, j). The heuristic used is the Chebyshev distance h((i, j),(it, jt)) = max(i − it, j − jt), which perfectly aligns with our mixed-cost model.
- Path Compression
The raw output of the A search algorithm is a long sequence of grid-cell coordinates. This verbose list is transformed into concise movement commands via a three-stage compression pipeline:
** Stage 1 - Vectorization:**
The displacement between successive cells yields one of the eight possible unit vectors, mapped to a compass code.
** Stage 2 - Run-Length Encoding:**
Consecutive identical codes are merged into tuples (dir, n), where n is the count of repeated steps.
** Stage 3 - Diagonal Collapse:**
Adjacent single-step pairs are replaced with a single diagonal entry to avoid zig-zag walking patterns.
- SLM-Based Instruction Generation
The SLM is engaged in the last step to transform terse commands into natural, numbered directions. The SLM is instruction-tuned with a small dataset and uses a system prompt to reduce model hallucination. The prompt incorporates both the terse outputs from the A search and cost for navigation.
Evaluation Outcomes
The approach was evaluated against a baseline method introduced by Coffrini et al. (25): This framework relies on LLM, specifically ChatGPT, to generate instructions from preprocessed floor plan images. While this method demonstrated a single-instruction-level accuracy of around 86%, it suffers from significant computational overhead with an average processing time of approximately 4-5 minutes per query. In contrast, the Grid2Guide approach achieved 100% accuracy across all experimented maps because it integrates A search with an SLM, leveraging the A search algorithm for accurate path computation while reserving the machine learning model solely for the generation of natural language instructions. The modular design decouples image processing and path planning from language generation, ensuring reasoning over spatial structures is handled algorithmically rather than probabilistically.
Conclusion
This paper introduces a new A search enabled SLM indoor navigation approach for personal navigation using handheld devices. By converting standard architectural floor-plan images into lightweight binary occupancy grids, the need for heavy image processing inside the LLM is eliminated. The 8-way A search implementation computes optimal routes in a few milliseconds, ensuring real-time response on commodity hardware. A language model is only utilized for converting the terse texts into conversational, human-understandable output. Future work should involve finding optimized navigation instructions dynamically. The text outputs can be easily converted to speech instructions, providing directional guidance to people with visual impairments.
Authors Contribution
Md. Wasiul Haque, Sagar Dasgupta: conceptualization, methodology, coding, data collection, data analysis, and writing – original draft; Mizanur Rahman: conceptualization, methodology, writing – original draft.
Acknowledgements
This work is based upon the work supported by the National Science Foundation (NSF) (Award 2340456).
References
The paper cites various works including Bosch and Gharaveis (25), Guerreiro et al. (19), Belir and Onder (13), Jeong et al. (18), Iftikhar et al. (21), Coffrini et al. (25) etc., supporting the context of indoor navigation challenges and existing solutions. The specific references cited are numerous, including those for SLAM platforms like IndoorAtlas and Quuppa (19), as well as path planning algorithms like A search (13), Dijkstra algorithm (25), and various LLM advancements such as FLAN-T5 and TinyLlama (24). The paper's methodology draws on concepts from geometric algorithms, bionic algorithms, and instruction-tuned transformer models to achieve its goal. The evaluation compares the proposed system against the Coffrini et al. (25) baseline to demonstrate superior accuracy and performance in real-time scenarios. The paper's findings confirm that offloading deterministic path planning to A search and limiting the machine learning model’s role to lightweight text formatting delivers 100% route accuracy and true real-time performance. The combination of these techniques enables a scalable, cost-effective solution for indoor navigation support on mobile-class hardware. The work is supported by the National Science Foundation (NSF) under Award 2340456. The paper's structure follows a standard scientific format, including an introduction, literature review, method, evaluation, and conclusion. The authors acknowledge the use of ChatGPT for rephrasing parts of their writing for editorial purposes.
Improvements for AI systems
-
textbf Processing Bottleneck Mitigation via SLM Offloading: The system avoids
resource-intensive
LLM reasoning by utilizing an SLMsolely to generate human-readable instructions from terse navigation instructions,
which minimizes the risk of probabilistic navigation errors while maintaining natural, intuitive guidance. -
textbf Deterministic Path Planning for Real-Time Performance: By offloading geometric reasoning to the A∗ algorithm, the pipeline
eliminates the need for a machine learning model to directly process the image or infer spatial relationships,
ensuring thatA is fully deterministic
and produces routes injust a few milliseconds.
-
textbf Scalable Multi-Floor Navigation: The incorporation of portal nodes enables seamless traversal across multiple levels, addressing the limitation that
no prior indoor navigation framework has demonstrated lightweight multi-floor path planning combined with natural language instruction generation.
-
textbf Robust Map Interpretation via Majority Voting: The map preprocessing step uses a
majority-voting strategy
to classify cells as walkable or blocked based on pixel density (if more than half of its pixels are blocked by any obstacles in the actual map, we mark the cell blocked (0); otherwise, we mark it free (1)
), whichhandles noisy edges or slight misalignments in the hand-drawn mask.
-
textbf Optimized Path Generation via Diagonal Collapse: The path compression stage addresses unrealistic movement by replacing adjacent single-step pairs with a single diagonal entry (
Whenever found, we replaced those with a single diagonal entry such as (SE, 1)
), improving thehuman-understandable navigation instruction
quality compared to paths relying only on orthogonal moves.
Abstract
Reliable indoor navigation remains a significant challenge in complex environments, particularly where external positioning signals and dedicated infrastructures are unavailable. This research presents Grid2Guide, a hybrid navigation framework that combines the A* search algorithm with a Small Language Model (SLM) to generate clear, human-readable route instructions. The framework first conducts a binary occupancy matrix from a given indoor map. Using this matrix, the A* algorithm computes the optimal path between origin and destination, producing concise textual navigation steps. These steps are then transformed into natural language instructions by the SLM, enhancing interpretability for end users. Experimental evaluations across various indoor scenarios demonstrate the method's effectiveness in producing accurate and timely navigation guidance. The results validate the proposed approach as a lightweight, infrastructure-free solution for real-time indoor navigation support.
Sources
- Tiny Titans: Can Smaller Large Language Models Punch Above Their Weight in the Real World for Meeting Summarization?
- Indoor Navigation on Google Maps and Indoor Localization Using RSS Fingerprinting
- A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications
- Finetuned Language Models Are Zero-Shot Learners
- TinyLlama: An Open-Source Small Language Model
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks