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
相关论文
共 50 条
  • [1] How Robust Is a Large Pre -trained Language Model for Code Generation? A Case on Attacking GPT2
    Zhu, Rui
    Zhang, Cunming
    2023 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING, SANER, 2023, : 708 - 712
  • [2] VeriGen: A Large Language Model for Verilog Code Generation
    Thakur, Shailja
    Ahmad, Baleegh
    Pearce, Hammond
    Tan, Benjamin
    Dolan-Gavitt, Brendan
    Karri, Ramesh
    Garg, Siddharth
    ACM TRANSACTIONS ON DESIGN AUTOMATION OF ELECTRONIC SYSTEMS, 2024, 29 (03)
  • [3] Can large language models generate geospatial code?
    State Key Laboratory of Information Engineering in Surveying, Mapping and Remote Sensing, Wuhan University, Wuhan, China
    不详
    arXiv, 1600,
  • [4] Fine Tuning Large Language Model for Secure Code Generation
    Li, Junjie
    Sangalay, Aseem
    Cheng, Cheng
    Tian, Yuan
    Yang, Jinqiu
    PROCEEDINGS 2024 IEEE/ACM FIRST INTERNATIONAL CONFERENCE ON AI FOUNDATION MODELS AND SOFTWARE ENGINEERING, FORGE 2024, 2024, : 86 - 90
  • [5] GPT Prompt Engineering for a Large Language Model-Based Process Improvement Generation System
    Lee, Donghyeon
    Lee, Jaewook
    Shin, Dongil
    KOREAN JOURNAL OF CHEMICAL ENGINEERING, 2024, 41 (12) : 3263 - 3286
  • [6] The Emotional Intelligence of the GPT-4 Large Language Model
    Vzorin, Gleb D.
    Bukinich, Alexey M.
    Sedykh, Anna V.
    Vetrova, Irina I.
    Sergienko, Elena A.
    PSYCHOLOGY IN RUSSIA-STATE OF THE ART, 2024, 17 (02): : 85 - 99
  • [7] Evolving code with a large language model
    Hemberg, Erik
    Moskal, Stephen
    O'Reilly, Una-May
    GENETIC PROGRAMMING AND EVOLVABLE MACHINES, 2024, 25 (02)
  • [8] DB-GPT: Large Language Model Meets Database
    Xuanhe Zhou
    Zhaoyan Sun
    Guoliang Li
    Data Science and Engineering, 2024, 9 : 102 - 111
  • [9] DB-GPT: Large Language Model Meets Database
    Zhou, Xuanhe
    Sun, Zhaoyan
    Li, Guoliang
    DATA SCIENCE AND ENGINEERING, 2024, 9 (01) : 102 - 111
  • [10] Multi-Intent Inline Code Comment Generation via Large Language Model
    Zhang, Xiaowei
    Chen, Zhifei
    Cao, Yulu
    Chen, Lin
    Zhou, Yuming
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2024, 34 (06) : 845 - 868