arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.00782cs.SEcs.AI
收藏

GeoContra:从流畅的GIS代码到可验证的空间分析与地理基础修复

GeoContra: From Fluent GIS Code to Verifiable Spatial Analysis with Geography-Grounded Repair

School of Big Data and Artificial Intelligence, Guangdong University of Finance and Economics(大数据与人工智能学院,广东财经大学);School of Geography and Environment Economics, Guangdong University of Finance & Economics(地理与环境经济学院,广东财经大学);Guangdong Engineering Research Center of Low-Altitude Remote Sensing Intelligent Monitoring(低空遥感智能监测工程研究中心)

Yinhao Xiao, Rongbo Xiao, Yihan Zhang

AI总结:

GeoContra通过验证和修复框架提升LLM驱动的GIS工作流空间正确性,通过静态检查、运行时验证和语义验证提高空间分析准确性,实验显示在多个模型上空间正确性显著提升。

摘要:

在GIS科学中,可靠的空间分析需要保持坐标语义、拓扑、单位和地理合理性。当前基于LLM的GIS系统生成流畅的脚本但很少在大规模上强制执行这些地理规则。我们提出了GeoContra,一个用于LLM驱动Python GIS工作流的验证和修复框架。它将每个任务表示为可执行的地理空间合同,包括自然语言问题、模式、CRS元数据、预期输出、空间谓词、拓扑、指标、所需操作和禁止的快捷方式。生成的程序经过静态规则检查、运行时验证和语义验证,违反情况反馈到有界修复循环中。在15个波士顿区域、9个任务家族和11个开源模型(每个模型600次运行)上的7,079个真实地理空间任务评估中,GeoContra在闭合模型上将空间正确性从DeepSeek-V4的47.6%提升到77.5%,从Kimi-K2.5的57.7%提升到81.5%。在11个开源模型上,平均正确性提高26.6%。GeoContra将流畅代码生产转化为可验证的空间分析,捕捉到负旅行时间、CRS/字段模式违规、缺失谓词和脆弱输出转换,这些否则会产生可执行但地理无效的结果。

英文摘要:

Reliable spatial analysis in GIScience requires preserving coordinate semantics, topology, units, and geographic plausibility. Current LLM-based GIS systems generate fluent scripts but rarely enforce these geographic rules at scale. We present GeoContra, a verification and repair framework for LLM-driven Python GIS workflows. It represents each task as an executable geospatial contract-including natural-language questions, schemas, CRS metadata, expected outputs, spatial predicates, topology, metrics, required operations, and forbidden shortcuts. Generated programs undergo static rule inspection, runtime validation, and semantic verification, with violations fed back into a bounded repair loop. Evaluated on 7,079 real geospatial tasks across 15 Boston-area zones, 9 task families, and 11 open-source models (600 runs each), GeoContra improves spatial correctness on closed models from 47.6% to 77.5% for DeepSeek-V4 and from 57.7% to 81.5% for Kimi-K2.5. Across 11 open models, average correctness rises by 26.6%. GeoContra turns fluent code production into verifiable spatial analysis, catching negative travel times, CRS/field-schema violations, missing predicates, and brittle output casts that otherwise yield executable but geographically invalid results.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑