Nationality and Region Prediction from Names: A Comparative Study of Neural Models and Large Language Models
This study addresses the challenge of generalization in name-based nationality prediction, particularly for low-frequency countries and geographically proximate regions. It presents the first systematic comparison of six neural network architectures against six large language model (LLM) prompting strategies across three granularity levels: nationality, region, and continent, employing frequency-stratified sampling and fine-grained error analysis. Results demonstrate that LLMs consistently outperform traditional neural models at all granularities, exhibiting exceptional robustness at the regional level. Notably, simpler machine learning approaches show greater resilience for low-frequency nationalities, while LLMs tend to make “neighborhood” errors—confusing geographically adjacent regions—rather than exhibiting cross-regional bias. The work underscores the importance of evaluating error types and quality beyond aggregate accuracy metrics.