用Transformer和大模型融合语义信息,提升IP地址城市级定位精度。
IPGeoAI: Transformer-Based Geolocation with LLM Semantic Fusion

- 将IP地理定位建模为序列任务,利用Transformer捕捉子网层级依赖。
- 通过零样本大模型提取自治系统描述语义,提升城市级定位准确率6%。
- 适合需要高精度地理定位的广告投放、内容分发等场景使用。
精准的城市级IP地理定位是现代数字生态的关键支撑,广泛应用于本地内容分发、定向营销及数字版权保护。然而,传统基于规则或数据库的方法难以应对现代网络架构的复杂非线性分配模式,尤其在爆炸式增长的IPv6地址空间和瞬态移动网络中表现不佳。本文提出IPGeoAI,一种新型深度学习模型架构,将地理定位从静态查表问题转化为序列建模任务。模型采用Transformer Encoder捕捉IP子网结构中的层次依赖关系,并通过零样本大语言模型(LLM)特征提取管道,将原始噪声自治系统(AS)描述转换为结构化领域元数据(如‘大学’与‘ISP’,‘全球’与‘本地’)。通过多头交叉注意力模块融合这些语义信号,弥合网络拓扑与真实语义身份之间的差距。在覆盖20万城市的私有数据集上,离线评估显示,IPGeoAI显著优于领先外部供应商。通过分层推理策略优化粗粒度国家信号,模型实现城市级准确率提升6%,并覆盖100%流量。大规模在线生产测试中,该模型使一级下游指标平均提升0.35%,具有统计显著性。
原文摘要 · Abstract (English)
Accurate city-level IP Geolocation is an important enabler for the modern digital ecosystem, underpinning services ranging from local content delivery and targeting to digital rights enforcement. However, traditional heuristic and database-driven methods often struggle to resolve the complex, non-linear allocation patterns of modern network infrastructures, particularly within the exploding IPv6 address space and transient mobile networks. In this paper, we introduce IPGeoAI, a novel deep learning model architecture that reframes geolocation from a static lookup problem to a sequential modeling task. Our approach utilizes the Transformer Encoder to capture hierarchical dependencies inherent in IP subnet structures. We propose a method to resolve geographic ambiguity by integrating unstructured semantic context via a Zero-Shot LLM Feature Extraction pipeline. We utilize Large Language Models to transform raw, noisy Autonomous Systems (AS) descriptions into structured, domain-specific metadata (such as 'University' vs. 'ISP' or 'Global' vs. 'Local') via an offline pre-computation process. By fusing these semantic signals into the network via a Multi-Head Cross-Attention module, we bridge the gap between numerical network topology and real-world semantic identity. Extensive offline evaluation on a proprietary dataset spanning 200,000 cities demonstrates that IPGeoAI significantly outperforms a leading external vendor in city-level granularity. By adopting a hierarchical inference strategy that refines coarse-grained country signals, our model achieves a 6% improvement in city-level accuracy while extending coverage to 100% of the traffic. Furthermore, in large-scale online production tests, the model drove a statistically significant +0.35% improvement in our 1st-tier downstream use cases metric.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。