TL;DR
This paper introduces GeoIndia, a novel Seq2Seq geocoding system specifically designed for the complex and diverse Indian address system. By leveraging hierarchical H3-cell prediction and state-specific fine-tuning of large language models like Flan-T5 and Llama-3, GeoIndia significantly outperforms Google Maps in accuracy and reduces delivery errors for e-commerce logistics.
What Problem Does This Paper Address?
Geocoding, the process of converting textual addresses into precise geographic coordinates, is crucial for many applications, especially in e-commerce logistics. However, Indian addresses present a unique and formidable challenge due to their extreme diversity in language, script, and formatting. Unlike standardized Western addresses, Indian addresses often rely on informal landmarks, lack consistent structure, and can be incomplete or contain errors. Existing geocoding methods, often designed for more uniform address systems, struggle to accurately pinpoint locations at a fine-grained level in India, leading to increased delivery failures, higher operational costs (like Return to Origin - RTO), and reduced customer satisfaction.
Methods
The core of GeoIndia is a Seq2Seq framework that treats geocoding as a task of predicting hierarchical H3-cell indices from raw addresses. The authors developed a custom SentencePiece tokenizer trained on a large corpus of Indian addresses to better handle regional variations. They experimented with two powerful language models: Flan-T5-base and Llama-3-8b. A key innovation is the development of state-specific models, addressing data imbalance and diverse address formats across India, rather than a single pan-India model. For Llama-3, they employed QLoRA for efficient fine-tuning. The methodology also includes a robust data preprocessing pipeline for coordinate validation and extensive address cleaning to handle inconsistencies.
Datasets
The authors extracted data from a large e-commerce platform, containing delivered latitudes and longitudes paired with addresses. This dataset, covering all 29 Indian states, was used for training and evaluation. No new benchmark datasets were explicitly introduced, but the paper provides extensive performance comparisons against Google Maps on this real-world Indian address data.
Key Insights and Ideas
- State-specific models are crucial: A single model for all of India is inefficient and leads to bias towards states with more data. Fine-tuning models for each state significantly improves accuracy.
- Hierarchical H3 cells are effective: Using H3's hexagonal grid system provides a robust spatial representation and hierarchical indexing, aiding the model in understanding relationships between neighboring addresses.
- Custom tokenization matters: Training a SentencePiece tokenizer specifically on Indian addresses, rather than using a generic one, leads to better understanding of address components and improved accuracy.
- Transfer learning accelerates convergence: Initializing models with weights from a previously trained city or state model (e.g., Nagpur) significantly speeds up convergence and improves performance, especially in data-scarce regions.
- Address cleaning is paramount: A thorough preprocessing pipeline to validate coordinates and clean address lines is essential for accurate geocoding.
Key Results
GeoIndia demonstrated superior performance compared to Google Maps across multiple Indian states. In several states, the system achieved:
- More than a 50% reduction in mean distance error.
- More than an 85% reduction in 99th percentile distance error. For example, in Bihar, GeoIndia achieved a 62.5% reduction in mean distance error for seen data and 47.3% for unseen data. The system also achieved significantly lower latency (<80ms) in production, making it suitable for real-time e-commerce applications.
Limitations and Future Work
The authors acknowledge that while QLoRA fine-tuning for Llama-3 showed promise, it was not as effective as full fine-tuning or ReLoRA for capturing geospatial relationships. Future work includes studying the impact of noise (like incorrect pincodes) on geocoding errors and exploring complete fine-tuning of different LLMs. They also plan to further optimize model serving infrastructure for even lower latency.
Summary updated