GeoCode-GPT: A large language model for geospatial code generation

被引:0
作者
Hou, Shuyang [1 ]
Shen, Zhangxiao [1 ]
Zhao, Anqi [1 ]
Liang, Jianyuan [1 ]
Gui, Zhipeng [2 ]
Guan, Xuefeng [1 ]
Li, Rui [1 ]
Wu, Huayi [1 ]
机构
[1] Wuhan Univ, State Key Lab Informat Engn Surveying Mapping & Re, Wuhan, Peoples R China
[2] Wuhan Univ, Sch Remote Sensing & Informat Engn, Wuhan, Peoples R China
关键词
Large language model (LLM); Geospatial code generation; Fine-tuning; Corpus; Self-supervision; Hallucination;
D O I
10.1016/j.jag.2025.104456
中图分类号
TP7 [遥感技术];
学科分类号
081102 ; 0816 ; 081602 ; 083002 ; 1404 ;
摘要
The increasing demand for spatiotemporal data and modeling tasks in geosciences has made geospatial code generation technology a critical factor in enhancing productivity. Although large language models (LLMs) have demonstrated potential in code generation tasks, they often encounter issues such as refusal to code or hallucination in geospatial code generation due to a lack of domain-specific knowledge and code corpora. To address these challenges, this paper presents and open-sources the GeoCode-PT and GeoCode-SFT corpora, along with the GeoCode-Eval evaluation dataset. Additionally, by leveraging QLoRA and LoRA for pretraining and fine-tuning, we introduce GeoCode-GPT-7B, the first LLM focused on geospatial code generation, fine-tuned from Code Llama-7B. Furthermore, we establish a comprehensive geospatial code evaluation framework, incorporating option matching, expert validation, and prompt engineering scoring for LLMs, and systematically evaluate GeoCode-GPT-7B using the GeoCode-Eval dataset. Experimental results reveal that GeoCode-GPT significantly outperforms existing models across multiple tasks. For multiple-choice tasks, its accuracy improves by 9.1% to 32.1%. In code summarization, it achieves superior scores in completeness, accuracy, and readability, with gains ranging from 1.7 to 25.4 points. For code generation, its performance in accuracy, readability, and executability surpasses benchmarks by 1.2 to 25.1 points. Grounded in the fine-tuning paradigm, this study introduces and validates an approach to enhance LLMs in geospatial code generation and associated tasks. These findings extend the application boundaries of such models in geospatial domains and offer a robust foundation for exploring their latent potential.
引用
收藏
页数:15
相关论文
共 39 条
  • [2] Chen LG, 2024, Arxiv, DOI [arXiv:2408.16498, 10.48550/arXiv.2408.16498, DOI 10.48550/ARXIV.2408.16498]
  • [3] Chen Mark, 2021, PREPRINT
  • [4] The Earth System Grid Federation: An open infrastructure for access to distributed geospatial data
    Cinquini, Luca
    Crichton, Daniel
    Mattmann, Chris
    Harney, John
    Shipman, Galen
    Wang, Feiyi
    Ananthakrishnan, Rachana
    Miller, Neill
    Denvil, Sebastian
    Morgan, Mark
    Pobre, Zed
    Bell, Gavin M.
    Doutriaux, Charles
    Drach, Robert
    Williams, Dean
    Kershaw, Philip
    Pascoe, Stephen
    Gonzalez, Estanislao
    Fiore, Sandro
    Schweitzer, Roland
    [J]. FUTURE GENERATION COMPUTER SYSTEMS-THE INTERNATIONAL JOURNAL OF GRID COMPUTING AND ESCIENCE, 2014, 36 : 400 - 417
  • [5] Open Geospatial Software and Data: A Review of the Current State and A Perspective into the Future
    Coetzee, Serena
    Ivanova, Ivana
    Mitasova, Helena
    Brovelli, Maria Antonia
    [J]. ISPRS INTERNATIONAL JOURNAL OF GEO-INFORMATION, 2020, 9 (02)
  • [6] Cui JX, 2024, Arxiv, DOI [arXiv:2306.16092, DOI 10.48550/ARXIV.2306.16092]
  • [7] Dubois Y, 2024, Arxiv, DOI [arXiv:2404.04475, 10.48550/arXiv.2404.04475, DOI 10.48550/ARXIV.2404.04475]
  • [8] Guo D., 2024, PREPRINT, DOI arXiv:2401.14196
  • [9] Hou SY, 2024, Arxiv, DOI [arXiv:2412.05587, 10.48550/arXiv.2412.05587, DOI 10.48550/ARXIV.2412.05587]
  • [10] Hou SY, 2024, Arxiv, DOI [arXiv:2411.10753, 10.48550/arXiv.2411.10753, DOI 10.48550/ARXIV.2411.10753]