betaFeedback

WorksPhysics and Astronomy

Toward Self-Evolving Geospatial Algorithms: An LLM-Driven Framework with a Case Study on Spatial Regime Discovery

Abstract

Geospatial algorithms have been developed through expert-driven discovery: a researcher spots a limitation, proposes a structural fix, and checks it by hand. With LLM-driven multi-agent systems becoming practical, much of the candidate-generation, evaluation, and selection work can now be largely automated, while the researcher's role shifts upstream toward problem formulation, evaluation design, and interpretation. We refer to this paradigm as Self-Evolving Geospatial Algorithms (SEGA) and propose a framework with three required modules: a two-loop architecture with embedded geographic knowledge as the inner-loop engine; an automatic code formatter that converts any raw geospatial algorithm into the standardized triple required by the inner loop; and a simulation-driven training protocol, in which evolution runs only on synthetic data with known ground truth, and the discovered algorithm is applied unchanged to real data, keeping real-world results out-of-sample. We use spatial regime discovery as a case study, seeded with the Two-stage K-Models algorithm. Evolution uses the Rand Index against the ground-truth partition as fitness signal; the frozen algorithm is then evaluated on 150 simulated grids and 11 real-world datasets across climate, health, hydrology, and politics. The evolved algorithm outperforms its seed, knowledge-free baselines, and four classical regionalization methods. Ablations further indicate that the channel of geographic-knowledge injection, structured retrieval versus prompt-level hints, is itself load-bearing. In this case study, LLM-assisted search sped up the inner loop; whether it does so for other seeds and task families remains open. The geographer's role – asking the right questions, designing trustworthy evaluation – grows more central.

Email addresses: [email protected] (Xiayin Lou), [email protected] (Peng Luo), [email protected] (Liqiu Meng)

Accepted manuscript (in proof) — Annals of the American Association of Geographers

Introduction

Geospatial modeling sits at the core of geospatial research, supporting tasks such as spatial partitioning [5, 11, 6], prediction [7, 12, 14], spatial dependence modeling [3, 21, 4], and uncertainty quantification [27]. The development of these models has typically grown out of an expert-driven process that brings together theoretical insights, empirical observations, and domain knowledge, often accumulating over decades of methodological refinement [9, 16]. Such development can be characterized as expert-driven discovery: a researcher identifies a limitation, hypothesizes a structural improvement (e.g., adding spatial weights, restructuring a clustering objective, or proposing a new estimator), implements it, and validates it against established baselines. Each discovery step is conceptually rich but is also human-paced, costly in time, and naturally limited by the cognitive and institutional resources available to any single research group.

The rapid development of large language models (LLMs), including ChatGPT [42], Gemini [15], DeepSeek [26], and Qwen [44], together with the rise of LLM-based multi-agent architectures [38], suggests that much of the routine engineering work of algorithm development can now be largely automated. Working in this complementary mode, the researcher delegates the work of generating candidate programs, evaluating them, and keeping the better ones to an LLM-driven system, while retaining responsibility for deciding what to optimize, setting up the evaluation, and making sense of what comes out. Working in this mode, researchers spend less time writing and debugging small algorithmic variants by hand, and more time on the upstream questions: what is a good solution to this problem, what fitness signal captures it, and what do the resulting algorithms tell us. The two modes are best seen as complementary: expert-driven discovery continues to mark out the design space and the objectives that matter, while LLM-assisted search systematically explores parts of that space that would be tedious to cover manually [35, 39]. Within geospatial science, the convergence of GeoAI [20, 30] and LLM-based agents is opening up new directions for spatial analysis and knowledge discovery.

It is useful to distinguish at the outset between two complementary lines of LLM-based research now active in geospatial science. The first treats the LLM as an orchestrator of a fixed library of pre-existing geospatial tools and algorithms: the model interprets a user request, selects appropriate operations, and emits glue code that invokes them, while the underlying spatial algorithms remain entirely human-authored. We refer to this as the usage layer of the algorithm stack. The second treats the LLM as an author that proposes and mutates algorithm source code itself, generating new algorithmic logic rather than choosing among existing tools. We refer to this as the design layer. The present paper, together with the GeoEvolve framework it builds on [28], sits firmly at the design layer: the toolbox is the object that gets evolved, not the menu that gets chosen from. § 2 reviews both lines in detail and identifies the specific inner-loop engines we adopt; here we only flag the distinction so as to keep the technical premise of the rest of the paper visible.

The central message of the present paper is that the combination of these two modes describes a noticeable shift in how geospatial algorithms can be developed, and that this shift deserves to be named and characterized as such. We refer to this LLM-assisted paradigm as Self-Evolving Geospatial Algorithms (SEGA), denoting a structured, evaluation-driven search over the space of executable geospatial programs, in which candidate algorithms are continuously generated, evaluated, and selected by an LLM-powered multi-agent system. We propose a working hypothesis to guide its scope: if the optimization objective of a geospatial problem can be specified clearly enough for computational evaluation, the inner loop of algorithm development can be largely delegated to a multi-agent LLM system, while the outer loop of formulating the problem and interpreting the results remains the responsibility of the researcher. We do not claim that algorithm design has become trivial; rather, we observe that, given a well-defined objective, LLM-driven evolutionary systems can systematically explore parts of the design space that are difficult to traverse manually.

A natural starting point for realizing SEGA is the recently proposed GeoEvolve framework (Luo et al., [28]), which extends flat, single-loop, domain-agnostic evolutionary engines such as OpenEvolve (Sharma, [40]) by wrapping the inner LLM-driven code-evolution loop with an outer dialogue that retrieves geographic knowledge from a curated corpus and injects it into the next mutation. This two-loop architecture with embedded geographic knowledge is, in our view, the necessary substrate for any practical SEGA system, and we adopt it as the inner-loop engine of our framework without redesign. Two further extensions, however, are required before this engine can be used routinely on new geospatial problems. The first concerns the input side: raw geospatial algorithms are written in heterogeneous styles, and integrating each new seed by hand re-introduces a manual-engineering bottleneck that the inner loop is supposed to remove. An LLM-driven automatic code formatter that converts any raw geospatial algorithm into the standardized triple (evolvable program, evaluator module, configuration file) required by the inner loop is therefore needed to make the framework reusable across tasks. The second concerns the evaluation side: when evolution is driven directly by the algorithm’s performance on the very data on which its output will be reported, real-world metrics become both training target and evaluation target, and the resulting numbers tell us less than they appear to. A simulation-driven training protocol with a controlled data-generating process, in which evolution is run only on synthetic data with a known ground truth and the discovered algorithm is then applied unchanged to real data, is therefore needed to keep real-world results as out-of-sample evidence rather than direct optimization targets. The three pieces together, GeoEvolve’s two-loop architecture, an automatic code formatter, and a simulation-driven training protocol, constitute the conceptual framework developed in the remainder of this paper.

To make this paradigm shift concrete rather than abstract, the bulk of the paper develops a case study on spatial regime discovery, taking the Two-stage K-Models algorithm (Guo et al., [18]) as the seed algorithm A0A_0. We chose this case study for three reasons: it represents the current state of the art among non-LLM spatial regime methods, its two-stage structure of initial over-partitioning followed by region merging exposes a small number of clearly evolvable modules that an LLM-driven inner loop can target, and its piecewise-linear regime assumption admits a clean simulated ground truth required by the train-on-simulation / apply-on-real evaluation protocol. described below. As a single case study, it shows that the framework works on this task; applying it to further seeds and task families in future work is needed to establish that it generalizes. A more complete account of the spatial regime literature and Two-stage K-Models is given in § 2.4.

Within the case study, evolution happens exclusively on simulated grids using a single bounded fitness signal (Rand Index against the ground-truth partition); the resulting algorithm is then applied unchanged to 11 real-world datasets across climate, health, hydrology, and politics, where SSR, SSR Reduction, RMSE, and Variance Ratio are used as evaluation metrics disjoint from the fitness signal. On top of this, we conduct a structured ablation that varies both the level and the specificity of geographic-knowledge injection (details in § 4.4.1), so as to test how (not merely whether) domain knowledge should enter the inner loop of the two-loop architecture.

The remainder of the paper is organized as follows. § 2 reviews related work on LLM-based autonomous agents, distinguishes earlier LLM-based search over short programs and expressions (§ 2.2) from the more recent AlphaEvolve paradigm of LLM-driven algorithm discovery (§ 2.3) on which this paper builds, and closes with a background subsection on the spatial regime literature that motivates the case study (§ 2.4). § 3 develops the SEGA framework, with a conceptual subsection that frames the paradigm and formalizes it as a quintuple (§ 3.1) and a detailed subsection that implements the three required modules (§ 3.2). § 4 presents the spatial regime case study together with its experimental design, including the problem definition, the simulation experiment with its six knowledge-injection variants, and the real-world experiment with its four classical regionalization baselines. § 5 reports the empirical results on both simulated and real-world data. § 6 discusses what the discovered algorithm modified, the insights and complementarity with expert-driven design, and limitations, framed around the broader question of how autonomous geospatial algorithm discovery should proceed. § 7 concludes.

Related Works

LLM-based Autonomous Agents

LLM-based autonomous agents have begun to be explored in geographical information science (GIScience), where agents are designed to support spatial analysis and mapping workflows. Across this line of work the LLM operates at what we call the usage layer of the algorithm stack: it acts as a decision core that interprets user intent and orchestrates a fixed library of pre-existing geospatial tools, while the underlying spatial algorithms remain entirely human-authored. Early studies use LLMs to translate spatial problems into executable geoprocessing steps, ranging from spatial data retrieval to invoking spatial algorithms [46] (Li and Ning 2023). Multi-agent pipelines have also been used to decompose spatial tasks into planner-worker structures for operations such as shapefile processing and spatial analysis [25]. Other work investigates automated geospatial data discovery agents that generate and run programs to locate appropriate spatial datasets [34]. By emulating cartographic workflows, LLM agents can also be guided to design, add, or modify map elements as part of an interactive mapping process [45]. Related efforts include LLM-powered QGIS spatial-analysis copilots [2], harness-engineered research agents that span the broader GIScience research lifecycle ([47]), and the wider autonomous-GIS research agenda ((Li et al., 2025)). While these efforts demonstrate the value of LLM agents for assembling and orchestrating existing spatial operations, they typically rely on pre-defined tools rather than directly proposing new algorithmic structures. Recent work suggests that LLMs may also support more open-ended forms of geospatial scientific exploration, in which agents help propose hypotheses, identify candidate spatial patterns, and combine heterogeneous datasets to generate further insight.

LLM-Based Search over Short Programs and Expressions

The use of LLMs has prompted reconsideration of how new algorithms and mathematical expressions can be discovered. In contrast to the usage-layer agents reviewed above, the systems considered here operate at the design layer of the algorithm stack: the LLM is not selecting among existing algorithms but authoring them, generating and mutating the source code that implements the algorithmic logic itself.

An early line of work treats the LLM as a high-level variation operator embedded inside an evolutionary or search loop, applied to compact single-file programs. Eureka ((Ma et al., 2023)) used an LLM to evolve dense reward functions for reinforcement learning by editing short candidate programs. LMX ([31]) explored LLM-driven variation over linguistic genotypes as a generic operator. Fun-Search ([39]) applied the same idea to mathematical reasoning, using the LLM to mutate short Python functions and reporting novel constructions for problems such as the cap-set problem and online bin-packing. LLM-SR ([41]) adapted symbolic regression in the same spirit, treating the discovery of compact mathematical expressions as program search.

Common to these systems is that the unit being evolved is a single short function or expression rather than the broader algorithmic framework in which it is embedded: the LLM proposes local edits inside a few-line, single-file program. While these results demonstrate that LLM-driven search can produce novel solutions on well-scoped function-level problems, the mutation envelope is too narrow to express the structural moves required to evolve a full geospatial algorithm with multiple stages, parameters, and data pipelines, for example swapping an initialization strategy, restructuring a clustering objective, or adding a per-region penalty term. The next subsection introduces the more recent line of work that targets this larger unit of evolution.

LLM-Driven Algorithm Discovery: The AlphaEvolve Paradigm

A second, more recent line of work targets the discovery of full algorithms rather than short functions, by allowing the LLM to mutate program text spanning multiple files and many lines of logic. We refer to this as the AlphaEvolve paradigm. The three systems described below, AlphaEvolve as the original proposal, OpenEvolve as its open-source implementation, and GeoEvolve as its first geospatial specialization, jointly characterize this paradigm. Because this paper uses OpenEvolve and GeoEvolve directly as the inner-loop engine Φ\Phi of § 3 rather than proposing a new engine, this subsection describes what each system actually provides before the case study begins.

AlphaEvolve. AlphaEvolve ([35]) extends LLM-driven evolution from single short functions to entire multi-file codebases, reporting measurable improvements on long-standing algorithmic problems including matrix multiplication and other open mathematical questions. The methodological move is significant: instead of evolving a short single function of a few dozen lines, the system mutates and recomposes algorithmic structures of hundreds of lines, including initialization strategies, iteration schedules, and helper subroutines. This brings algorithm discovery, rather than merely function discovery, within reach of LLM-driven search.

OpenEvolve. OpenEvolve [40] is an open-source implementation in the spirit of AlphaEvolve, packaging the same inner loop as a domain-agnostic engine. Given a seed program with clearly marked evolvable blocks, a fitness function, and an iteration budget, OpenEvolve executes a flat loop of propose mutation →\to run →\to evaluate →\to select. It is intentionally domain-agnostic: it carries no notion of geographic space, no curated scientific corpus, and no mechanism for steering the search beyond whatever text happens to be in the prompt. Within this paper, OpenEvolve serves both as a standalone baseline, used directly with or without hand-written geographic-knowledge hints in the prompt, and as the underlying mutation engine that GeoEvolve wraps.

GeoEvolve. GeoEvolve [28] is the first geospatial specialization of the AlphaEvolve paradigm: it wraps the OpenEvolve loop in three agent-level modules so that geographic domain knowledge can enter each round of evolution through structured retrieval rather than only through static prompts. A Code Analyzer is a diagnostic LLM agent that reads the current evolved code together with its evaluation metrics and outputs (in strict JSON) which pieces of geographic knowledge appear missing or misapplied, along with search queries for the knowledge retriever and flags indicating whether code examples or theoretical background are needed. A Knowledge Retriever (GeoKnowRAG) maintains a curated corpus of geospatial documents and returns ranked passages relevant to the Analyzer’s queries through retrieval-augmented generation. The corpus, embedding model, vector store, and retrieval procedure are all configurable; the specific choices used in this paper are documented in Appendix § 11. Finally, a Geo-informed Prompt Generator assembles the retrieved knowledge passages, the analyzer’s diagnostic notes, and the current code into a structured prompt that is fed back into the next OpenEvolve mutation step. The result is a two-loop architecture in which geographic knowledge enters the search at the retrieval level, conditioned on the current state of the evolved code, rather than only as fixed prompt context.

Implication for this paper. The distinction between OpenEvolve (prompt-level knowledge only, if any) and GeoEvolve (prompt-level + retrieval-level geographic knowledge) defines a natural design space for ablation. § 4.4.1 uses this design space to construct six algorithm variants spanning no knowledge, a general prompt hint, a task-specific prompt hint, multi-agent dialogue without retrieval, and multi-agent dialogue with full GeoKnowRAG, in addition to the unevolved seed. We use these six variants across the case study to test the hypothesis that the channel of knowledge injection (prompt versus retrieval) is itself a load-bearing design choice.

Spatial Regime Discovery

Because the case study (§ 4) is grounded in spatial regime discovery, we briefly review the relevant methodological background here. Spatial regime modeling seeks to partition a study area into contiguous subregions within which the data-generating process relating covariates to a response variable is locally homogeneous but differs across regions [3, 5]. It is a central methodological tool for handling spatial heterogeneity [14] and sits at the intersection of three long-standing traditions: contiguity-preserving regionalization [36, 37, 6, 11], geographically weighted regression [7, 12, 14], and graph-based spatial clustering followed by regression [19]. Recent work has unified these threads by embedding regression objectives directly into the partitioning procedure: Anselin and Amaral [5] extend SKATER with a regression-SSR cut criterion (Skater-reg), while Guo et al. [18] propose Two-stage K-Models, Regional-K-Models, and a regression-aware variant of the Automatic Zoning Procedure. Among these, the Two-stage K-Models algorithm is reported by its authors to “largely outperform existing approaches on model fitting, region reconstruction and coefficient estimation” [18], making it the strongest non-LLM baseline currently available for spatial regime discovery. This is the algorithm we adopt as the seed A0A_0 throughout the case study; the rationale for this choice was previewed in the Introduction.

Methods: The SEGA Framework

This section develops the SEGA framework introduced in § 1. § 3.1 sets up the concept and the division of labor between researcher and agent, formalized as a quintuple. § 3.2 then specifies each of the three required modules in turn.

Conceptualizing SEGA: From Paradigm Shift to Quintuple

The basic idea of SEGA is to treat algorithm development not as a replacement for expert-driven design but as a complement to it: alongside the conceptual moves researchers make by hand, parts of algorithm refinement can be carried out as a structured, evaluation-driven search over executable programs. Two observations motivate this view. First, the historical record of geospatial algorithm development is dominated by what we call expert-driven discovery: discrete, conceptually rich modifications that come out of a researcher noticing a limitation and proposing a fix (for example, adding spatial weights into a regression model, replacing a Euclidean dissimilarity with a contiguity-aware one, or adding a penalty against spatially fragmented partitions). These discoveries are valuable but slow, and the design space between them is large. Second, LLMs and LLM-based multi-agent systems now provide the technical means to automate large parts of the candidate-generation, evaluation, and selection process. The resulting division of labor is straightforward: the agent system handles the generation, evaluation, and selection of variants on top of any given seed algorithm, while the researcher retains responsibility for formulating the problem, designing the objective, defining the evaluation, and interpreting the result. SEGA, in this sense, is an attempt to make use of the second observation without giving up the first.

Figure 1 contrasts the two paradigms in stylized form. In the expert-driven paradigm (right panel), progress relies on conceptual innovations from researchers; each contribution typically requires identifying a limitation, hypothesizing a structural modification, implementing and testing it, and iterating. This process is inherently human-paced and is naturally shaped by available time and disciplinary context. In the self-evolving paradigm (left panel), candidate algorithms are continuously refined through automated mutation, evaluation, and selection within a unified computational framework, but the researcher still owns the upstream decisions: what to optimize, what counts as a good answer, and what the resulting algorithms tell us. Both modes have value: the former provides conceptual depth, the latter offers breadth of exploration.

Schematic comparison of expert-driven discovery and self-evolving discovery

Figure 1. A schematic comparison of expert-driven discovery (green panel) and self-evolving discovery (blue panel). Expert-driven discovery typically advances through conceptual innovations contributed by individual researchers and groups, whereas self-evolving discovery follows a more centralized, metric-driven evolutionary trajectory. In SEGA, the inner loop of how to refine an algorithm is largely delegated to the agent, while the outer loop of what question to ask remains with the researcher. The two paradigms are complementary rather than mutually exclusive.

Formalization as a quintuple. We formalize SEGA as a quintuple (A0,D,E,K,Φ)(\mathcal{A}_0, \mathcal{D}, \mathcal{E}, \mathcal{K}, \Phi). Here A0\mathcal{A}_0 is the seed algorithm, an initial executable program implementing a baseline geospatial method; D={(si,Xi,Yi)}i=1n\mathcal{D} = \{(s_i, \mathbf{X}_i, Y_i)\}_{i=1}^{n} is the spatial dataset, with si∈R2s_i \in\mathbb{R}^{2} the spatial coordinates, Xi∈RK\mathbf{X}_i \in\mathbb{R}^{K} the explanatory variables, and YiY_i the response variable; E:A×D→Rm\mathcal{E} : \mathcal{A} \times\mathcal{D} \to\mathbb{R}^{m} is the evaluation protocol, a mapping from an algorithm–dataset pair to an mm-dimensional performance vector that provides a fitness signal for evolutionary selection; K\mathcal{K} is the geographic knowledge base, a curated corpus of spatial theories, statistical methods, and established geographic principles; and Φ\Phi is the evolution engine, an LLM-powered operator that proposes structural variants of candidate algorithms guided by performance feedback and domain knowledge. After TT rounds the system returns the discovered algorithm A⋆\mathcal{A}^{\star}, its performance profile E(A⋆,D)\mathcal{E}(\mathcal{A}^{\star}, \mathcal{D}), and (if logging is enabled) the evolution trace.

Humans define ‘what’, agents figure out ‘how’. The quintuple makes explicit which components remain a researcher’s responsibility and which can be delegated to the agent, and the division it draws is exactly the one shown in Figure 1: the researcher defines the what, the question and the metric that counts as a good answer, while the agent (in the self-evolving mode) figures out the how. Concretely, the researcher chooses A0\mathcal{A}_0 (which existing algorithm to use as the starting point), constructs D\mathcal{D} (which simulated and real-world data to use), designs E\mathcal{E} (what counts as a good solution and how to measure it), and curates K\mathcal{K} (what geographic knowledge the system can draw on); the agent, via Φ\Phi, handles the inner loop, generating candidate variants of A0\mathcal{A}_0, running them on D\mathcal{D}, scoring them with E\mathcal{E}, and selecting which to keep. Three modules are required to turn this abstract quintuple into a system that can actually be applied to a new geospatial problem, and they are exactly the three pieces flagged in the Introduction: the Evolution Engine 1 (§ 3.2.1), the Code Formatter 2 (§ 3.2.2), and the Simulation-Driven Training Protocol 3 (§ 3.2.3). Figure 2 provides the abstract block-level architecture of SEGA; Figure 3 expands each of the three modules to show, in an infographic form, the agent-level workings inside them.

Schematic of the SEGA framework showing the Evolution Engine, Code Formatter, and Simulation-Driven Training Protocol

Figure 2. Schematic of the SEGA framework, organized around the three required modules marked by the 1, 2, and 3 badges. 1 the Evolution Engine Φ\Phi (top dashed panel): a two-loop architecture in which four LLM agents collaborate within each round tt, the Code Analyzer reads the current evolved code and its evaluation metrics; the Knowledge Retriever queries the curated Knowledge Base K\mathcal{K} with the analyzer’s search queries and returns retrieved knowledge; the Prompt Generator assembles that knowledge into the next mutation prompt; the Code Evolver produces the next candidate program. The Evaluator and Knowledge Base sit outside the engine; the engine returns the evolution trace {Ai}i=1T\{A_i\}_{i=1}^{T}. 2 the Code Formatter (bottom-left panel): converts user-supplied raw code ArawA_{\mathrm{raw}} into the standardized triple (Ainit,Eeval,Cconfig)(A_{\mathrm{init}}, \mathcal{E}_{\mathrm{eval}}, \mathcal{C}_{\mathrm{config}}) consumed by the engine, and rewrites the discovered algorithm A⋆A^\star back to the user-facing format. 3 the Simulation-Driven Training Protocol (bottom-right panel): the engine sees only simulated data during evolution; real-world data is used only post-evolution as held-out evaluation. Pink arrows denote inputs, blue arrows denote outputs.

Agent-level details of each SEGA module

Figure 3. Agent-level details of each SEGA module, complementing the abstract block diagram of Figure 2. 1 Inside the Evolution Engine (left, purple dashed panel): the four agents collaborate in one round of evolution, the Code Evolver submits the current geospatial model (“This is my geospatial model, help improve its performance!”); the Code Analyzer inspects the produced program, diagnoses a missing geographic consideration (“The model does not consider the spatial dependence”), and emits search queries to the geospatial knowledge database; the Knowledge Retriever returns relevant passages (e.g., “Spatial dependence can be modeled by…”); the Prompt Generator wraps the retrieved knowledge into a knowledge-informed prompt; the Code Evolver revises the program, and the inner loop “Revise the program → Evaluate the program” iterates. 2 Inside the Code Formatter (bottom-right, blue panel): an LLM-driven formatting agent turns a raw code folder/file into the standardized triple of Initial model, Evaluator, and Configuration (together with the corresponding code folder/file), and re-emits the discovered algorithm as a user-facing evolved model and code folder. 3 Inside the Simulation-Driven Training Protocol (top-right, green panel): the algorithm being evolved sees only simulated data during training and is then applied unchanged to real-world data for held-out evaluation. Pink arrows denote inputs to the engine, blue arrows denote outputs.

Implementing SEGA: Three Required Modules

Module 1: Two-Loop Architecture with Embedded Geographic Knowledge

The first module specifies how the evolution engine Φ\Phi is organized so that geographic domain knowledge K\mathcal{K} can be brought to bear on each round of mutation. We require a two-loop architecture: an inner loop that performs LLM-driven code evolution (propose mutation →\rightarrow run →\rightarrow evaluate →\rightarrow select), wrapped by an outer loop that analyzes the current evolved code, retrieves relevant geographic knowledge from K\mathcal{K}, and feeds the retrieved knowledge back into the next inner-loop mutation as a structured prompt. The inner loop is responsible for exploring the space of algorithmic variants; the outer loop is responsible for steering that exploration with established geographic theory. Formally, the inner loop computes

A⋆=arg⁡min⁡A∈ΦT(P0)L(A,Dsim),(1)\mathcal{A}^{\star} = \arg\min_{\mathcal{A}\in\Phi^{T}(\mathcal{P}_{0})} \mathcal{L}(\mathcal{A},\mathcal{D}_{\mathrm{sim}}), \tag*{(1)}

where P0\mathcal{P}_{0} is the initial candidate set seeded from A0\mathcal{A}_{0}, ΦT(⋅)\Phi^{T}(\cdot) is the evolutionary process over TT iterations, L\mathcal{L} is the fitness function, and Dsim\mathcal{D}_{\mathrm{sim}} is the simulated dataset used during evolution (the use of Dsim\mathcal{D}_{\mathrm{sim}} rather than D\mathcal{D} is enforced by Module 3 below).

Adopted realization: GeoEvolve. The two-loop architecture is the central methodological innovation of GeoEvolve ([28]), distinguishing it from flat, single-loop, domain-agnostic engines such as OpenEvolve ([40]) in which geographic knowledge can enter only as static prompt text. We adopt GeoEvolve as our off-the-shelf inner-loop engine, with its default agent architecture, prompts, and hyperparameters from the original paper (background on the four agents is given in § 2.3); the top dashed panel (1) of Figure 2 shows how the four agents are wired together within the Evolution Engine Φ\Phi. In practice we use the open-source Python package geoevolve released alongside Luo et al. [28], which packages the entire two-loop architecture (Code Evolver, Code Analyzer, Knowledge Retriever, and Geo-informed Prompt Generator) behind a single configuration interface, so that adopting GeoEvolve as the inner-loop engine requires no re-implementation.

Design space of knowledge integration. A practical question remains open even after adopting GeoEvolve: how geographic knowledge enters Φ\Phi through the outer loop. We characterize the design space along two axes. The first axis is the level at which knowledge is injected: prompt-level injection encodes domain knowledge as natural-language instructions in a static prompt, whereas retrieval-level injection dynamically retrieves relevant knowledge from a curated corpus and conditions it on the current state of the evolved code. The second axis is the specificity of the injected knowledge: none, general (e.g., Tobler’s first law, spatial autocorrelation, scale effects), or task-specific (e.g., contiguity penalties, region-size balancing for spatial regimes). The combination of these two axes defines the six algorithm variants used in our case-study ablation (§ 4.4.1).

Module 2: Automatic Code Formatter

The second module operates on the seed algorithm A0\mathcal{A}_0: it specifies how a raw geospatial algorithm, written in whatever style its authors prefer, is turned into the standardized input that the inner-loop engine Φ\Phi requires. Without this step every new seed requires manual engineering before evolution can begin; with it, the same evolutionary infrastructure is designed to be reusable across different seeds and tasks with little or no manual adaptation. We state this as a property of the design rather than a demonstrated one: the formatter is exercised here on a single seed (§ 4), and whether it generalizes across algorithm families remains untested (§ 6.5).

We define the formatting problem as a transformation that takes a raw geospatial algorithm Araw\mathcal{A}_{\mathrm{raw}} as input and returns a standardized triple

Format⁡(Araw)→(Ainit,Eeval,Cconfig),(2)\operatorname{Format}(\mathcal{A}_{\mathrm{raw}}) \to(\mathcal{A}_{\mathrm{init}}, \mathcal{E}_{\mathrm{eval}}, \mathcal{C}_{\mathrm{config}}), \tag*{(2)}

in which Ainit\mathcal{A}_{\mathrm{init}} is an initial program with clearly marked evolvable blocks and a standardized entry function that returns predictions together with any auxiliary outputs (region labels, coefficients, etc.) needed by the evaluation step; Eeval\mathcal{E}_{\mathrm{eval}} is an evaluator module that implements the evaluation protocol E\mathcal{E} and computes the fitness signal and the held-out evaluation metrics from the algorithm’s outputs; and Cconfig\mathcal{C}_{\mathrm{config}} is a configuration specification that records the evolutionary hyperparameters (population size, number of iterations, mutation strategy) and any task-specific settings (target number of regions, convergence criteria, soft constraints). This standardized triple acts as a contract between the candidate algorithm and the inner-loop engine: regardless of how the underlying algorithm is written, each candidate exposes a uniform interface for execution, evaluation, and comparison.

In our implementation, the formatting step itself is performed automatically by an LLM-driven parser: given a raw script that solves a geospatial task in some style, the parser identifies the core algorithmic logic, marks the evolvable blocks, generates the standardized entry function, writes the evaluator module against the user-specified metrics, and emits a configuration file together with metadata for traceability. Researchers therefore only need to provide a working implementation of their geospatial algorithm; the engineering work of preparing it for evolutionary search is handled by the formatter. We use this formatter to prepare the Two-stage K-Models seed used throughout the case study. A worked example of the formatter operating on the Two-stage K-Models seed is provided in Appendix § 14, showing the raw input, the resulting evolvable program AinitA_{\mathrm{init}} with marked blocks, the generated evaluator module Eeval\mathcal{E}_{\mathrm{eval}}, and the configuration Cconfig\mathcal{C}_{\mathrm{config}}.

Module 3: Simulation-Driven Training Protocol with a Controlled DGP

The third module operates on the pair (D,E)(\mathcal{D},\mathcal{E}): it specifies what dataset the inner loop is allowed to see during evolution, and what metric the inner loop is asked to optimize. We argue that these two choices should be made together, and at the framework level, because they determine whether the resulting algorithm is being evolved against something geographically meaningful or simply against statistical convenience. Concretely, we propose three principles, all centered on the idea of training on a controlled simulator and evaluating on real data.

Principle 1: Run the inner loop only on synthetic data. The inner loop Φ\Phi is run only on a synthetic dataset Dsim\mathcal{D}_{\mathrm{sim}} whose ground-truth structure S∗S^{\ast} is known by construction (for example, a known partition, a known surface, or a known set of intervals). S∗S^{\ast} gives a clear, unambiguous fitness signal, and the real-world data is never seen by the mutation, selection, or knowledge-retrieval steps, so real-world results count as out-of-sample evidence rather than as a target the system has quietly been optimizing against.

Principle 2: Apply the discovered algorithm directly, without further tuning on real data. After TT rounds, the discovered algorithm A⋆A^{\star} is frozen and applied unchanged to each real-world dataset. No hyperparameters are retuned, no additional evolution rounds are run, and no knowledge retrieval is done on the real-world side. Any performance difference observed on real-world data can then be attributed to the structure of A⋆A^{\star} itself, rather than to per-dataset adjustments.

Principle 3: Use different metrics for driving the search and for reporting results. The metrics in the system play two distinct roles. A fitness signal drives the inner loop Φ\Phi; its purpose is to steer the search toward better algorithms. Evaluation metrics describe the discovered algorithm after the search is over; their purpose is to tell the reader how well it actually performs. We recommend keeping these two sets separate, because using the same metric in both roles is uninformative: any algorithm produced by an evolutionary search that explicitly optimizes a metric MM will, by construction, score well on MM.

What makes a good fitness signal? Within these three principles, a useful fitness signal is a bounded, dimensionless metric that compares the algorithm’s output to the ground-truth structure S∗S^{\ast} directly. Examples include clustering-agreement indices such as the Rand Index for partitioning tasks, coverage–width scores for prediction-interval tasks, and bounded ranking measures for retrieval tasks. Such fitness signals are bounded (the search has a stable target), robust to trivial structural choices (they cannot be gamed by simply producing more, smaller regions, as SSR-family metrics can), and on a different scale from the usual evaluation metrics, which keeps the evaluation set genuinely held-out.

One intended consequence of these principles is that the same protocol should be reusable, with minor adjustments, across very different SEGA tasks: only DsimD_{\mathrm{sim}}, S∗S^{*}, the fitness signal, and the evaluation metrics need to be re-specified per task, while the surrounding inner-loop machinery is held fixed. This too is a consequence of the design rather than a result: the protocol is instantiated here for one task (§ 4.2.1), and whether the re-specification is as contained as the argument suggests is a question for the further demonstrations called for in § 6.5.

Case Study: Spatial Regime Algorithm Discovery

In this section we apply SEGA to spatial regime discovery. § 4.1 states the problem and the seed algorithm. § 4.2 describes the simulation experiment used to evolve the algorithm, including the simulator and the fitness signal. § 4.3 describes the real-world experiment used as held-out evaluation, including the eleven datasets across four domains. § 4.4 then specifies the ten algorithms compared throughout both experiments: six Two-stage K-Models variants (the unevolved seed and five evolved variants spanning a 2×32 \times3 knowledge-injection design) and four classical regionalization baselines. The same ten algorithms are evaluated under the same protocol in both the simulation experiment (§ 5.2) and the real-world experiment (§ 5.3).

Problem Definition and Seed Algorithm

Spatial regime modeling. Let S∈R2S \in\mathbb{R}^{2} be a geographical area partitioned into RR mutually exclusive and exhaustive subregions:

S=⋃r=1RSr,Sr∩Sr′=∅ for r≠r′.(3)S = \bigcup_{r=1}^{R} S_r, S_r \cap S_{r^{\prime}} = \varnothing\text{ for } r \ne r^{\prime}. \tag*{(3)}

For an observational unit ii located at si∈Ss_i \in S, a spatial regime exists when the data generation process differs across these spatial partitions:

Yi=Fr(i)(Xi)+ϵi,(4)Y_i = \mathcal{F}_{r(i)}(X_i) + \epsilon_i, \tag*{(4)}

where Fr:RK→R\mathcal{F}_r : \mathbb{R}^{K} \to\mathbb{R} is a regime-specific functional relationship, ϵi\epsilon_i is an error term, YiY_i is the dependent variable, and Xi={xi,1,…,xi,K}X_i = \{x_{i,1}, \ldots, x_{i,K}\} is the vector of KK independent variables for spatial unit ii. The objective of spatial regime modeling is to reduce within-region structural variability while increasing between-region structural differentiation in the data generation mechanism. Spatial regime discovery is thus a descriptive partitioning task, in the same family as clustering and regionalization: given the observed units of a study area, the algorithm assigns each unit to a regime and fits regime-specific relationships, and the recovered regime structure is itself the analytical result — a characterization of how the data-generating process varies across the study area.

Unlike predictive spatial models, a regime model makes no prediction at unobserved locations and assigns no regime to units outside the data it partitions; its outputs are evaluated by how well the partition accounts for structural heterogeneity within the given data, in the same way that a fitted regression is summarized by its goodness of fit. This distinction determines how the algorithms in this paper are evaluated (§ 4.3.1).

Seed algorithm: Two-stage K-Models. We use the Two-stage K-Models (2KModels) algorithm [18] as the seed algorithm A0\mathcal{A}_0. 2KModels is a two-stage method that first partitions a region into MM subregions {S1,…,SM}\{S_1,\ldots,S_M\} (with M>RM>R a hyperparameter controlling the number of initial clusters), and then iteratively merges these subregions into geographically connected regions until RR regions are reached. As discussed in § 2.4, 2KModels is the current state of the art among non-LLM spatial regime methods.

Simulation Experiment

Design

We instantiate the train-on-simulation / apply-on-real protocol of § 3.2.3 for spatial regime discovery as follows.

Simulated datasets. We generated a series of datasets to evaluate the performance of both the original and evolved versions of the spatial regime algorithm under known ground-truth spatial regimes. Given the response variable YY and explanatory variables X1X_1, X2X_2, the data generation process (DGP) is defined as:

Y=β0(u,v)+β1(u,v)X1+β2(u,v)X2+ϵ,(5)Y = \beta_0(u,v) + \beta_1(u,v)X_1 + \beta_2(u,v)X_2 + \epsilon, \tag*{(5)}
where X1,X2∼U[0,1), i.i.d.,(6)\text{where } X_1, X_2 \sim\mathcal{U}[0,1),\ i.i.d., \tag*{(6)}
ϵ∼N(0,σ2), i.i.d.(7)\epsilon\sim\mathcal{N}(0,\sigma^2),\ i.i.d. \tag*{(7)}

where (u,v)(u,v) is one of 625 georeferenced observations on a 25×2525 \times25 regular grid, U[0,1)\mathcal{U}[0,1) is the uniform distribution on [0,1)[0,1), N(0,σ2)\mathcal{N}(0,\sigma^2) is the normal distribution with mean 0 and variance σ2\sigma^2, and βi(u,v)\beta_i(u,v) are spatially varying coefficients that change across regions. The grid is divided into five spatially connected regions S⋆={S1⋆,…,S5⋆}S^\star= \{S^\star_1,\ldots,S^\star_5\} that constitute the ground-truth partition. The intercept term β0\beta_0 is set to 0, and the covariate coefficients β1\beta_1, β2\beta_2 take values in {−2,−1,0,1,2}\{-2,-1,0,1,2\} depending on the subregion of each cell. Three latent spatial regime patterns are used. In the Rectangular pattern, the grid is split into five rectangular regions, each sized 5×255 \times25 units. In the Voronoi pattern, five cells are randomly chosen as seeds and the resulting Voronoi diagram defines five spatially contiguous regions. In the Arbitrary pattern, five cells are randomly chosen as seeds and each seed expands at random to generate five connected regions. We produce 150 grids in total at the high-noise level, evenly split across the three patterns.

Fitness signal: Rand Index. Following Principle 3 of Module 3 (§ 3.2.3), the inner loop Φ\Phi optimizes a single bounded fitness signal that compares the algorithm’s output against the ground-truth partition S⋆S^\star. We use the Rand Index (RandI):

RandI⁡=TP+TNTP+FN+FP+TN(8)\operatorname{RandI} = \frac{TP + TN}{TP + FN + FP + TN} \tag*{(8)}

where TP, FN, FP, and TN denote true positive, false negative, false positive, and true negative pairs of cells, respectively. RandI is bounded in [0,1][0,1], robust to inflated kk (it penalizes both over- and under-segmentation), and disjoint in scale from the SSR-family metrics reserved for post-hoc evaluation. It is the only metric the inner loop Φ\Phi sees: the LLM-driven mutation, selection, and knowledge-retrieval steps do not access SSR, RMSE, or any other downstream metric. For computational tractability, the inner loop does not evaluate every candidate program on all 150 grids; instead, evolution operates on a fixed subset of three representative grids, one per spatial pattern (Rectangular #5, Voronoi #75, Arbitrary #149), and the per-round fitness reported during evolution is the mean RandI across these three grids. The discovered algorithm A⋆A^\star is then evaluated, frozen, on the full 150-grid pool in § 5.2; the per-round fitness during evolution (mean RandI over the three training grids) and the per-pattern metrics in Table 3 (means over the full 150-grid pool, which contains those three grids) are therefore aggregated over different grid sets and are not directly comparable; excluding the three training grids from the 150-grid evaluation changes the reported means by less than 0.2 SSR and 0.001 ARI.

AlgorithmSSR ↓\downarrowARI ↑\uparrowTime (s)
Rect.VoronoiArb.Avg.Rect.VoronoiArb.Avg.
Skater-reg476.82342.18390.66403.220.2530.3910.3470.3305.46
Region-K-Models388.13295.68355.04346.280.3480.4570.4290.4110.02
GWR-Skater215.31204.66288.54236.170.6130.6910.5670.6246.83
AZP237.92171.73208.32205.990.4350.5310.5110.4920.59
OpenEvolve (No GeoKnow.)80.92±11.0880.92 \pm11.0879.42±10.6179.42 \pm10.6199.57±16.7699.57 \pm16.7686.64±12.7986.64 \pm12.790.804±0.0060.804 \pm0.0060.860±0.0150.860 \pm0.0150.754±0.0150.754 \pm0.0150.806±0.0100.806 \pm0.0102.99±1.852.99 \pm1.85
2KModels (seed)75.4672.2990.3879.380.8040.8630.7700.8120.67
OpenEvolve (Specific GeoKnow.)73.38±4.6373.38 \pm4.6371.60±5.1571.60 \pm5.1589.91±6.5889.91 \pm6.5878.30±5.3278.30 \pm5.320.820±0.0160.820 \pm0.0160.876±0.0150.876 \pm0.0150.769±0.0190.769 \pm0.0190.821±0.0160.821 \pm0.0167.42±8.537.42 \pm8.53
OpenEvolve (General GeoKnow.)66.69±9.1666.69 \pm9.1666.96±9.3466.96 \pm9.3485.20±14.4185.20 \pm14.4172.95±10.6672.95 \pm10.660.843±0.0380.843 \pm0.0380.891±0.0280.891 \pm0.0280.799±0.0330.799 \pm0.0330.844±0.0300.844 \pm0.0300.91±0.450.91 \pm0.45
GeoEvolve (No GeoKnowRAG)67.43±10.5667.43 \pm10.5663.17±9.0663.17 \pm9.0675.16±15.4975.16 \pm15.4968.58±11.6468.58 \pm11.640.806±0.0150.806 \pm0.0150.883±0.0170.883 \pm0.0170.780±0.0210.780 \pm0.0210.823±0.0170.823 \pm0.0171.68±1.601.68 \pm1.60
GeoEvolve (GeoKnowRAG)55.60±1.6055.60 \pm1.6063.64±15.4163.64 \pm15.4183.35±39.7783.35 \pm39.7767.53±18.2467.53 \pm18.240.909±0.0830.909 \pm0.0830.898±0.0310.898 \pm0.0310.799±0.0490.799 \pm0.0490.869±0.0270.869 \pm0.02769.95±103.0569.95 \pm103.05

Table 3. Simulation comparison of four classical regionalization baselines, the unevolved Two-stage K-Models seed, and the five evolved variants on the 150 high-noise grids (50 per pattern). All metrics are computed externally by the evaluation harness (§ 4.2.1); each evolved row is the mean ±\pm SD over three independent evolution runs, while the seed and the baselines are deterministic given the data. ARI is the chance-corrected agreement metric; RandI serves only as the inner-loop fitness signal (Figure 4). Time is the mean runtime per 625-cell grid (Appendix § 12); for GeoEvolve (GeoKnowRAG), the value in parentheses is the trimmed mean3 excluding one run whose refinement step lacks early stopping. Rows sorted from worst to best by average SSR; bold = best within column.

Evaluation-harness isolation. The harness prevents a generated candidate from ever seeing the ground-truth partition. A candidate receives only (X,Y,w,p,min_size)(X,Y,w,p,\mathrm{min\_size}) through a fixed entry point and returns a label vector; RandI is computed by the harness outside the candidate’s process, and a static scan rejects, with fitness zero, any program that references ground-truth labels, computes label-agreement metrics internally, or performs file or network I/O. Every program generated in the reported runs was additionally audited for ground-truth references; none were found. The discovered algorithm’s own internal objective is likewise label-free — it selects among candidate partitions by post-merge SSR under a connectivity constraint — so the frozen algorithm runs on real data, where no ground truth exists, exactly as it does on simulation.

Inner-loop budget and LLM backbone. Each of the five evolved variants runs for the same total budget of 100 inner-loop iterations. The framework is LLM-agnostic in principle; in this case study we use a weighted pair of OpenAI models accessed through OpenRouter: openai/gpt-4o as the primary model (sampling weight 0.8) and openai/gpt-4.1 as the secondary model (weight 0.2), with sampling parameters temperature = 0.7, top_p = 0.95, and max_tokens = 8192. The same backbone is shared by all four GeoEvolve agents. Full hyperparameter settings, including the MAP-Elites population and GeoKnowRAG configuration, are reported in Appendix § 11.

Real-world Experiment

Design

Following Principle 2 of Module 3 (§ 3.2.3), the algorithm discovered on simulation is frozen and applied unchanged to each real-world dataset, with no further evolution, no hyperparameter retuning, and no knowledge retrieval on the real-world side. All algorithms in the real-world comparison are run with the same target number of regions pp (inferred from administrative units) and the same six-nearest-neighbor spatial weights matrix. Because each variant was evolved three times (§ 5.2), one program per variant must be carried forward to the real-world study. We select, for each variant, the run with the best simulation performance, and freeze that program; the selection uses simulation results only and no real-world data, so the real-world evaluation remains out-of-sample with respect to both evolution and selection. This is the best-of-NN protocol a practitioner would follow — run the search a few times, keep the best algorithm — and we report it explicitly because it means the real-world numbers reflect the best attainable program per variant rather than the average one. The corresponding distributions across all three runs are the ones given in Table 3.

Evaluation metrics. Following Principle 3 of Module 3, the metrics used to report real-world performance are disjoint from the RandI fitness signal that drives the inner loop. Because regime discovery is a descriptive partitioning task (§ 4.1), the quantities below are model-fit statistics — how much structural heterogeneity a partition accounts for — computed by the evaluation harness identically for every algorithm, with the same target number of regions pp, the same spatial weights, and the same data. Whether an algorithm recovers the correct regime structure is established on the simulated data, where ground truth exists and agreement is measured by ARI (§ 5.2); the real-world study then asks whether the algorithm discovered there — the best simulation run per variant, frozen with no further evolution or tuning — transfers unchanged to data it has never seen. Let {(Xi,Yi)}\{(X_i,Y_i)\} denote the dataset and Y^i=F(Xi)\hat{Y}_i=\mathcal{F}(X_i) the predictions of a candidate algorithm. We use four evaluation metrics. The Sum of Squared Residuals (SSR) measures absolute prediction error,

SSR=∑r=1R∑i∈Sr(Yi−Fr(Xi))2,(9)\mathrm{SSR}=\sum_{r=1}^{R}\sum_{i\in S_r}\left(Y_i-\mathcal{F}_r(X_i)\right)^2, \tag*{(9)}

where Fr\mathcal{F}_r is the regime-specific fit on region SrS_r. The SSR Reduction ratio summarizes the proportional improvement of a multi-regime spatial model over a single global OLS fit:

SSR Reduction=1−∑r=1RSSRlocal,rSSRglobal.(10)\mathrm{SSR\ Reduction}=1-\frac{\sum_{r=1}^{R}\mathrm{SSR}_{local,r}}{\mathrm{SSR}_{global}}. \tag*{(10)}

The Variance Ratio reports the proportion of total variance in the target variable associated with between-region differences:

Variance Ratio=σbetween2σwithin2+σbetween2.(11)\mathrm{Variance\ Ratio}=\frac{\sigma^2_{between}}{\sigma^2_{within}+\sigma^2_{between}}. \tag*{(11)}

The Root Mean Squared Error (RMSE) reports cross-dataset prediction accuracy as the root mean squared deviation between predicted and observed YY. These four metrics are computed post-hoc and are never fed back into the evolution loop, so the LLM cannot game them.

Datasets

To evaluate the original and evolved versions of the spatial regime algorithm in a more realistic setting, we collected a set of empirical datasets covering both natural and socioeconomic topics. Table 1 provides a summary of each dataset, including topic, source, target variable, and number of samples. The datasets vary in size (from hundreds to tens of thousands of samples) and span several domains, including climate, hydrology, politics, and health. Detailed descriptions, including the explanatory variables, are provided in Appendix § 10.

TopicDatasetTarget Variable#Samples
ClimateERA5-Land hourly data ([33])Temperature of air at 2m above the surface83731
HydrologyCatchment Attributes and Meteorology for Large-sample Studies ([1])Mean daily discharge671
PoliticsUS Presidential Election 2020 ([13])The percentage of votes for Democratic Party3108
HealthPLACES: Local Data for Better Health ([17])Prevalence of a type of disease2350

Table 1. An overview of real-world datasets, covering climate, hydrology, politics, and health.

Comparison Methods

Both the simulation experiment (§ 4.2) and the real-world experiment (§ 4.3) compare the same ten algorithms under a unified protocol. The ten algorithms fall into two groups: six Two-stage K-Models variants, which share an algorithmic ancestry with the seed and isolate the effect of LLM-driven evolution along a structured knowledge-injection design; and four classical regionalization baselines, drawn from the broader spatial regime / regionalization literature, which examine whether any observed gains generalize beyond the K-Models family.

Six Two-stage K-Models variants

The six variants in this group share the Two-stage K-Models seed as their common starting point. The unevolved seed acts as the no-evolution lower bound. The remaining five variants span a 2×3 design that crosses the level at which geographic knowledge enters the search (prompt-level vs. retrieval-level) with the specificity of that knowledge (none / general / task-specific). Table 2 summarizes the design; the corresponding runtime configuration is given in Appendix § 11.

VariantMulti-agent dialoguePrompt-level knowledgeRetrieval-level knowledgeEngine
2KModels (seed)–––seed only
OpenEvolve (No GeoKnow.)nononenoneOpenEvolve
OpenEvolve (General GeoKnow.)nogeneral hintnoneOpenEvolve
OpenEvolve (Specific GeoKnow.)notask-specific hintnoneOpenEvolve
GeoEvolve (No GeoKnowRAG)yesanalyzer-generateddisabledGeoEvolve
GeoEvolveyesanalyzer-generatedGeoKnowRAGGeoEvolve

Table 2. Six Two-stage K-Models variants placed along the two-axis knowledge-injection design. “Multi-agent dialogue” indicates whether the Code Analyzer / Knowledge Retriever / Prompt Generator loop is active. “Analyzer-generated” indicates that the prompt content is produced at runtime by the Code Analyzer rather than written by hand. All five evolved variants run for the same total budget of 100 inner-loop iterations.

This design allows us to decompose what would otherwise be a single “GeoEvolve vs. seed” comparison into two more informative sub-questions. The first asks whether multi-agent control is needed, or whether a static knowledgeable prompt already suffices. Comparing OpenEvolve (Specific GeoKnow.), which encodes task-specific geographic hints in a fixed prompt, against GeoEvolve (No GeoKnowRAG), which has the same agent dialogue but no curated knowledge corpus, isolates the contribution of the outer analyzer / prompt-generator loop. The second asks whether retrieval-level knowledge dominates prompt-level knowledge. Comparing all three OpenEvolve variants (no, general, or task-specific prompt) against the full GeoEvolve pipeline isolates the contribution of structured retrieval through GeoKnowRAG over static prompt-encoded hints. We hold the total evolutionary budget constant at 100 inner-loop iterations across all five evolved variants, so any performance difference reflects the structure of the inner loop rather than search-budget disparities.

Four classical regionalization baselines

A natural concern is that all six K-Models variants share the same algorithmic ancestry: the evolved variants are obtained by applying LLM-driven evolutionary search to the Two-stage K-Models seed. To examine whether the observed gains generalize beyond this seed family, we additionally compare against four representative algorithms drawn from the broader spatial regime / regionalization literature. The four baselines span distinct algorithmic paradigms developed over the past decades.

AZP is the regression-aware variant [18] of the classical Automatic Zoning Procedure [36, 37] that performs local moves of border units between regions while preserving spatial contiguity and minimum-size constraints, accepting moves that reduce the total within-region SSR. Region-K-Models [18] is a partitioning method that iteratively reassigns each unit to the region whose local OLS fit best explains its observation, subject to spatial-neighbor and connectivity constraints. GWR-Skater [19] is a two-stage approach that first estimates location-specific regression coefficients via Geographically Weighted Regression and then clusters the resulting coefficient surface using SKATER, a minimum-spanning-tree-based regionalization algorithm. Skater-reg [5] is an extension of SKATER that uses regression-fit residuals as the dissimilarity measure when cutting edges of the minimum spanning tree, directly aligning the partitioning objective with regression-fit quality.

The four classical baselines are matched to the K-Models variants on protocol (same target number of regions pp, same six-nearest-neighbor spatial weights, same evaluation metrics) but differ in algorithmic family, so any performance gap reflects modeling-philosophy differences rather than implementation disparities.

Empirical Results: Simulated and Real-world Studies

This section reports the empirical results of running the ten algorithms (six Two-stage K-Models variants from § 4.4.1, and four classical regionalization baselines from § 4.4.2) under the unified evaluation protocol of § 4. We begin in § 5.1 by introducing the algorithm discovered by SEGA as a new spatial regime model in its own right, comparing it with the Two-stage K-Models seed and tracing how the inner loop arrived at it over ten evolutionary rounds. § 5.2 then reports simulation performance on the full 150-grid evaluation set, and § 5.3 reports the real-world results, focusing on GeoEvolve versus the four classical baselines; the detailed cross-variant comparison within the K-Models family on real-world data is provided in Appendix § 15.

The Evolved Algorithm: GeoEvolve-2KModels

We refer to the algorithm produced by SEGA on the Two-stage K-Models seed as GeoEvolve-2KModels. This subsection introduces it as a new spatial regime model in its own right: how it differs structurally from the original 2KModels, how the inner loop arrived at those differences over ten evolutionary rounds, and what geographic-knowledge themes are embodied in the result.

Structural differences from the 2KModels seed. Compared with the original 2KModels, the discovered algorithm introduces two structural refinements, both visible in the round-by-round trace of Figure 4. First, the number of first-stage clusters is no longer a fixed hyperparameter: where the seed always over-partitions into 20 clusters, the discovered algorithm evaluates a small candidate set (2.5p2.5p, 4p4p, n\sqrt{n}, and pp to p+2p+2), runs each candidate through the merge stage, and keeps the partition with the lowest post-merge SSR — turning a hand-set constant into an internal model-selection step. Second, it appends a connectivity-preserving batch border-refinement stage: after merging, border units are reassigned between adjacent regimes whenever the move lowers a spatially penalized SSR, subject to two connectivity checks that guarantee both the donor and the acceptor region remain contiguous, with early stopping under a patience rule bounding the added cost. Both refinements select internally by label-free SSR; neither involves any agreement-with-ground-truth quantity (§ 4.2.1).

Figure 4. Round-by-round trajectory of the SEGA inner-loop search starting from the Two-stage K-Models seed, for the GeoEvolve (GeoKnowRAG) run reported in this paper. Annotated rounds add new ideas (+, green), code modifications (↻, orange), or parameter changes ({#}, blue), with per-round scores marked in the figure. The plotted score is the inner-loop fitness: the mean Rand Index across the three grids used during evolution (Rectangular #5, Voronoi #75, Arbitrary #149; § 4.2.1), rising from 0.9482 at the seed to 0.9852 at round 10. The vertical axis is truncated because RandI is inflated by chance agreement on this task; the round-by-round changes, and the chance-corrected held-out results, are described in the text.

How the evolution unfolded over ten rounds. Figure 4 traces the inner-loop trajectory of the GeoEvolve (GeoKnowRAG) run across ten rounds, during which the mean Rand Index on the three training grids rises from 0.9482 at the seed to 0.9852. The gain is concentrated in the first three rounds, which contribute +0.0334 of the total +0.0370; the remaining seven rounds add +0.0036 between them, and three of those rounds (5, 6 and 8) accept no new variant at all. Round 1 adds a border-unit reassignment step guarded by two connectivity checks, so that a unit only moves to a neighbouring region when both the donor and the acceptor remain spatially connected, and raises the number of restarts from 4 to 10; this operationalizes the geographic principle that adjacent units are more likely to share a regime than distant ones ([43]) as a local, topology-preserving move rather than a global re-partition. Round 2 converts that step from per-unit to batch reassignment, evaluating all candidate moves and applying the best-gain set in one pass, and lifts the score to 0.9645 — the single largest jump before round 3. Round 3 makes the one change that alters the algorithm’s search space: the number of first-stage clusters, fixed at 20 in the seed, becomes a small search over 2.5p2.5p, 4p4p and n\sqrt{n}, each run through the merge stage and selected by SSR; the same round adds a spatial penalty on border moves and early stopping with patience, and the score reaches 0.9816. Rounds 4–10 tune this machinery rather than extend it: the candidate set is widened to include pp, p+1p+1 and p+2p+2, the spatial penalty is annealed from 0.35 to 0.29 with a small deterministic jitter for diversity across restarts, and the refinement budget is adjusted between 30 and 36 iterations with patience 3–4, ending at 0.9852. The end-of-trajectory algorithm is the GeoEvolve-2KModels reported in the remainder of this paper. Two cautions apply to this figure. First, the trajectory score is the mean RandI over the three training grids #5, #75 and #149 and is therefore not comparable with the per-pattern values in Table 3, which are computed on the 150-grid pool; the same algorithm scores 0.9634 RandI there. Second, RandI is the optimization signal rather than an independent measure of quality, and it is inflated by chance agreement on this task, which is why Table 3 reports the chance-corrected ARI as the agreement metric. A complete round-by-round trace of this evolutionary process, including the full source code at each round, the LLM-generated edits, and the per-round fitness, is provided as an interactive web page, linked from the project page (https://peng-luo.com/sega/), as a supplement to Figure 4.

Geographic-knowledge themes embodied in the evolved algorithm. Across these refinements, three geographic-knowledge themes are repeatedly invoked. On spatial contiguity, every border-unit move is guarded by two connectivity checks that guarantee both the donor and the acceptor region remain spatially connected — the algorithm treats contiguity as a hard constraint to be preserved through every local improvement, not repaired afterwards. On local spatial dependence, the border-refinement stage operationalizes Tobler’s first law ([43]): reassignments are confined to units on regime boundaries, where a unit’s regime membership is most uncertain and most informed by its neighbours, and a spatial penalty on border moves discourages jagged, noise-driven boundaries. On scale as a modelling choice, the search over the number of first-stage clusters (2.5p2.5p, 4p4p, n\sqrt{n}) treats the initial partition scale not as a fixed hyperparameter but as a quantity to be selected against the data by post-merge SSR, echoing the sensitivity of regionalization outcomes to the chosen unit scale. The broader interpretation of these themes for autonomous geospatial algorithm discovery is taken up in § 6.1.

Simulation Results

Performance on the simulated grids. The K-Models family outperforms the four classical regionalization baselines by a wide margin under the same protocol (Table 3): the baselines’ average SSR ranges from ≈206\approx206 (AZP) to ≈403\approx403 (Skater-reg) against ≈68\approx68–8787 for the family, and their ARI from 0.330 to 0.624 against 0.806–0.869 — a separation an order of magnitude larger than any run-to-run spread, and consistent with the fact that the simulated data follow a piecewise-linear regime model whose assumption 2KModels and its descendants share but methods clustering GWR coefficient surfaces or attribute distances do not directly optimize. Within the evolved family, averaged over three independent runs, GeoEvolve with GeoKnowRAG attains the best three-pattern averages — SSR 67.53 ± 18.24, ARI 0.869 ± 0.027, a 14.9% SSR reduction and a +0.057 ARI gain over the seed — but it does not dominate every pattern (GeoEvolve without GeoKnowRAG has the lower SSR on Voronoi and Arbitrary), and the effect of geographic knowledge is non-monotone: OpenEvolve without geographic knowledge is worse than the seed it started from (SSR 86.64 versus 79.38; ARI 0.806 versus 0.812), a general knowledge prompt improves SSR to 72.95, a task-specific one only to 78.30. Because the run-to-run standard deviations (5.32–18.24 on average SSR) are of the same order as the gaps between variants (67.53–86.64), we report the ordering among evolved variants as descriptive rather than as evidence that one is reliably better than another. Complementing this run-to-run view, the discovered algorithm itself is reliably better than the seed on the evaluation pool: a paired Wilcoxon signed-rank test over the 150 grids gives a median SSR improvement of 15.0 (p<10−23p < 10^{-23}) and a median ARI gain of 0.080 (p<10−17p < 10^{-17}). Finally, the runtime column shows that the cost of the accuracy gain is not intrinsic: the evolved algorithms range from 0.91 to 10.45 seconds per grid, excluding one run without early stopping that averages 188.9 s, an ordering that follows how much search each performs at inference time rather than how accurate it is; full token, elapsed-time and inference-time accounting is given in Appendix § 12. A matched-budget control confirms that these gains are not an artifact of additional search effort. Giving the unmodified seed the same cluster-count search with random restarts, under the evolved algorithm’s own per-grid time budget, does narrow the SSR gap — SSR being the quantity any such search optimizes directly — but still leaves it short on recovery of the true regime structure, which is what the task is defined on and which the comparison should therefore be read on (ARI 0.854 versus 0.894, p=2.3×10−10p = 2.3 \times10^{-10}); one-component ablations locate the advantage in the border-refinement stage and its spatial penalty rather than in the cluster-count search — the penalty being a component whose value is negative in the algorithm’s own selection objective, which no tuning of the seed’s parameters against that objective could have reached (Appendix § 13).

Figure 5 illustrates the reconstructed spatial regimes on the three grids used during SEGA evolution (Rectangular #5, Voronoi #75, Arbitrary #149), comparing the seed, the two best evolved variants, and the four classical regionalization baselines on the same grids. Within the K-Models family, both evolved versions of 2KModels produce regions that resemble the ground truth, while the original 2KModels exhibits some misidentified boundaries and less coherent regions; the GeoEvolve-evolved version is the closest to the ground truth across all three patterns. The four classical baselines reveal a sharper qualitative gap: AZP and Region-K-Models produce visibly fragmented partitions, particularly on the Rectangular grid where the ground-truth structure is the most regular; GWR-Skater preserves the main horizontal structure on Rectangular but loses coherence on Voronoi and Arbitrary; Skater-reg merges the central regions and reduces the partition to two or three dominant regions on all three patterns. These visual differences are consistent with the SSR gap reported in Table 3, which the K-Models family closes by directly optimizing within-region regression fit.

Figure 5. Region delineation results on the three grids used during SEGA evolution, Rectangular #5 (top row), Voronoi #75 (middle row), Arbitrary #149 (bottom row). The first column shows the ground-truth spatial regime. The next three columns show reconstructions from the seed (Two-stage K-Models, “Seed”) and two representative evolved variants (OpenEvolve with general geographic-knowledge prompt and GeoEvolve with full GeoKnowRAG; see Table 3). The last four columns show reconstructions from the four classical regionalization baselines (AZP, Region-K-Models, GWR-Skater, Skater-reg). All algorithms are evaluated on the same grid under the unified protocol of § 4; colors are aligned across columns using Hungarian assignment so that the same region in different columns shares a color where possible.

Real-world Results

We now turn from simulated data, where the ground-truth partition is known and the fitness signal can be evaluated directly, to real-world data, where neither is available and the discovered algorithm is asked to generalize out of sample. We apply the frozen GeoEvolve algorithm to the 11 real-world datasets and compare it against the unevolved Two-stage K-Models seed and the four classical regionalization baselines under the unified evaluation protocol of § 4.3.1. Figure 6 reports a compact ten-algorithm SSR-Reduction summary by domain (which also includes the three OpenEvolve variants and GeoEvolve without GeoKnowRAG), and Table 4 reports cross-dataset means on the four quality metrics for the six-algorithm main comparison (seed, four classical baselines, GeoEvolve). The detailed within-family comparison of all six K-Models variants on real-world data (per-dataset, four-metric breakdown, with corresponding regime maps and dominant-covariate maps) is provided in Appendix § 15. Compared with the simulation, the real-world picture is more nuanced.

Figure 6. Ten-algorithm SSR-Reduction comparison across the four real-world domains, with one column per domain (Climate, Health, Hydro., Politics) on tinted backgrounds. The Health column reports the mean over the eight Health datasets (Arthritis, BPHigh, Cancer, Asthma, Depression, Diabetes, Obesity, Stroke); the other three domains each contain one dataset (ERA5, CAMELS, Voting). The ten algorithms are the unevolved Two-stage K-Models seed (grey), the four classical regionalization baselines (AZP, Region-K-Models, GWR-Skater, Skater-reg), the three OpenEvolve variants (no / general / task-specific GeoKnow. prompt), GeoEvolve without GeoKnowRAG, and the full GeoEvolve with GeoKnowRAG (red, highlighted with a darker outline). Gold stars mark the best algorithm per column. The corresponding cross-dataset means on the four real-world metrics are reported in Table 4; the per-dataset breakdown on all 11 real-world datasets and the corresponding regime maps are provided in Appendix § 15.

AlgorithmAvg. R2R^2 ↑Avg. RMSE ↓SSR Red. ↑Var. Ratio ↑
2KModels (seed)0.8161.2730.6250.465
Classical regionalization baselines
AZP0.8301.2280.5860.373
Region-K-Models0.7891.4400.4890.344
GWR-Skater0.8001.3030.4880.358
Skater-reg0.8121.3350.5820.395
GeoEvolve0.8251.2200.6580.482

Table 4. Real-world summary: cross-dataset means on the four quality metrics. Bold = best within column. The detailed within-family breakdown of all six K-Models variants (the seed, three OpenEvolve variants, and GeoEvolve with and without GeoKnowRAG), with per-dataset and per-metric values, is given in Figure S2 (Appendix § 15).

GeoEvolve attains the lowest cross-dataset average RMSE (1.220) and the highest SSR Reduction (0.658), with nine first-place wins on SSR Reduction out of 11 datasets, six wins on average R2R^2, and five wins on RMSE, more than any other algorithm on all three metrics; on Variance Ratio it has the highest mean (0.482) and four wins (second to Skater-reg’s five). AZP reaches the highest mean R2R^2 (0.830) and is the most competitive classical baseline on per-dataset R2R^2 and RMSE wins (4 each out of 11), illustrating that older regionalization methods remain competitive on individual datasets when the underlying regimes are nearly piecewise constant in the response variable. The unevolved 2KModels seed (mean R2R^2 0.816, mean SSR Reduction 0.625) holds its own as a strong baseline, ahead of all four classical baselines on SSR Reduction. Among the four classical regionalization baselines, three (Region-K-Models, GWR-Skater, Skater-reg) fall noticeably behind on SSR Reduction (0.488–0.582 vs. 0.658 for GeoEvolve and 0.625 for the seed).

Two qualitative conclusions follow. First, an algorithm discovered entirely on simulated grids transfers to real data without modification: GeoEvolve is competitive with, or better than, every classical regionalization baseline on real-world data, despite the simulator being matched to the K-Models modeling assumption. The claim here is about transfer of the algorithm, not about predictive generalization to unobserved locations: these are fit statistics on the datasets being partitioned (§ 4.3.1), and what they show is that a procedure developed against a synthetic regime model remains well behaved on empirical data whose generating process it was never shown. Second, no single algorithm dominates across all metrics and all datasets: AZP is unexpectedly strong on R2R^2, Skater-reg wins the most datasets on Variance Ratio despite a lower mean, and GeoEvolve provides the tightest regression fit, the largest SSR Reduction, and the highest mean Variance Ratio. This suggests that performance is metric-dependent and that practitioners should consider their downstream use case when selecting an algorithm.

The spatial structure underlying these metric differences is visible in the regime-partitioning maps. Figure 7 shows the partitions produced by the four classical baselines on four representative datasets (Climate / Health / Hydrology / Politics). The four classical baselines tend to produce more spatially fragmented partitions, particularly in the politics and health domains. The corresponding regime maps for the six K-Models family variants (and a fine-grained cross-variant breakdown) are provided in Appendix § 15 (Figure S4); they generate more spatially coherent regimes with clearer boundaries, with GeoEvolve being the most coherent.

Figure 7. Regime-partitioning maps produced by the four classical baselines on four representative real-world datasets (Climate / Health / Hydrology / Politics). Classical regionalization baselines tend to produce more spatially fragmented partitions, particularly in the politics and health domains. The corresponding K-Models family regime maps are provided in Appendix § 15 (Figure S4).

Figure S4. Regime-partitioning maps produced by the six Two-stage K-Models variants on the same four representative real-world datasets, all under the unified evaluation protocol of § 4.3.1. Column-header abbreviations are as in Figure 6: 2kmodels (unevolved seed), OE-NoGeo / OE-SimpGeo / OE-SpecGeo (OpenEvolve variants with no, general, and specific geographic-knowledge prompts), GE-NoRAG (GeoEvolve without GeoKnowRAG), and GeoEvolve (full GeoEvolve with GeoKnowRAG).

Discussion: Toward Autonomous Geospatial Algorithm Discovery

In this section we step back and interpret what the case study suggests about the SEGA framework introduced in § 3. Building on the structural description of the discovered algorithm given in § 5.1, § 6.1 asks what general lessons can be drawn from those refinements and how SEGA complements expert-driven design. § 6.5 outlines limitations and risks.

Insights and Complementarity with Expert-driven Design

Taken together, the case study supports a more general suggestion: when the optimization objective for a geospatial problem can be specified in a computable form, SEGA can be a useful complement to traditional, expert-driven algorithm development. In the spatial regime case, the objective of reducing within-region structural variability while increasing between-region differentiation was encoded as the bounded, ground-truth-anchored Rand Index. Within this setting, the multi-agent system surfaced algorithmic refinements (an internal search over the initial partition scale, connectivity-preserving border refinement, spatially penalized reassignment) that align with established geographic intuitions and are useful starting points for further analysis. Table 5 outlines several other geospatial problems for which optimization objectives can plausibly be formalized and which may therefore benefit from a similar treatment.

Geospatial ProblemFormalizable ObjectivePossible Direction for LLM-Assisted Exploration
Spatial interpolationMinimize prediction error at unobserved locations (e.g., cross-validated RMSE)Search over interpolation strategies, kernel functions, neighborhood structures
Spatial clusteringIncrease spatial coherence and attribute homogeneity (e.g., silhouette score + contiguity)Evolve partitioning strategies, distance metrics, merge criteria
Spatial prediction with uncertaintyReduce prediction interval width while maintaining coverage (e.g., interval score)Explore variants of conformal prediction and calibration methods
Change detectionImprove detection accuracy under spatial and temporal constraints (e.g., F1-score)Evolve feature extraction, thresholding, and post-processing pipelines

Table 5. Examples of geospatial problems with formalizable objectives that may be amenable to SEGA-style algorithm discovery. In each case, the most demanding intellectual work remains the formulation step.

SEGA is best understood as complementary to expert-driven design rather than a replacement. Conceptual innovations from researchers, adding spatial weights to a regression model, embedding contiguity constraints, introducing new estimators, continue to mark out the design space and define what counts as a good answer; LLM-assisted search then fills in parts of that space that are tedious to explore manually. The practical value of SEGA comes less from any single “intelligent” move and more from two properties LLMs supply at low marginal cost: diversity (many candidate structural modifications generated and tried within a short time window) and iteration speed (each round of variation, evaluation, and selection completing in minutes rather than weeks). The combination of an internal model-selection step over the initial partition scale with a connectivity-guarded batch border refinement assembled in our evolved 2KModels is one such combination that no individual researcher would have necessarily prioritized in advance, but that the search procedure surfaced by trying many alternatives. The implication for GIScience is that the bottleneck in geospatial algorithm development is shifting from implementation effort toward specification effort: the geographer’s role takes on additional dimensions as a problem architect who defines the objective landscape in which the LLM-driven search operates, while classical spatial algorithms remain valuable both as seeds for evolution and as baselines that anchor the comparison.

Shared Infrastructure: Benchmarks, Traces, and Validation

Making algorithm discovery a normal mode of geospatial research, rather than a series of one-off demonstrations, requires shared infrastructure for evaluating what the searches produce. The central object is a common benchmark: a fixed interface (input/output signature), a fixed evaluation protocol in which metrics are computed by the harness rather than by the candidate, and an explicit split between the instances a search may optimize against and those reserved for reporting. Validation then happens on that benchmark: evolved algorithms should be compared against human-designed algorithms of the same class — not only against their own seed — reported as distributions over independent evolution runs rather than single trajectories, and finally evaluated on data the search never touched. Seed algorithms and injected domain knowledge, by contrast, should not be standardized: they are the researcher’s contribution, the analogue of a hypothesis, and different seeds and knowledge bases exploring the same benchmark is precisely the diversity that makes shared evaluation informative. The remaining piece is a standard evolution-trace format, recording per round the candidate program, its fitness, and the prompt or knowledge that produced it. Beyond reproducibility, traces make credit assignable — a discovery is jointly produced by whoever contributed the seed, the knowledge corpus, and the objective and search design — and they are research material in their own right: with a common format, questions such as which prompting regimes produce structural innovation rather than parameter tuning become empirical questions answerable across laboratories.

Beyond Single-Objective, Simulation-Friendly Tasks

Extending SEGA past single-objective tasks requires distinguishing two situations. When several objectives must all be respected but no trade-off curve is needed (e.g., accuracy alongside runtime), lightweight randomized scalarization suffices: recent LLM-driven evolution systems define several fitness metrics and randomly select one per generation (Li et al., 2026). When the trade-off curve itself is the object of interest — within-region homogeneity against region-size balance, or accuracy against uncertainty-interval width — the search must instead maintain a set of non-dominated alternatives, via explicit non-dominated sorting [10] or a quality-diversity archive indexed by the competing objectives [32]; the MAP-Elites feature map already used here for (score,complexity)(score, complexity) is a natural place for that substitution. Characterizing which geospatial problems need a frontier rather than a compromise is, to us, the most concrete piece of future work.

Toward Trustworthy and Responsible Self-Evolving GeoAI

Self-evolution sharpens a known ethical problem of spatial analysis. Chen et al. [8] show that endogenous bias arises whenever a global optimization goal diverges from the local needs of particular regions or communities: the aggregate looks sound while some places or groups are systematically disadvantaged. An evolutionary search is an aggregate optimizer by construction, keeping any variant that raises mean fitness, even one that concentrates errors in a few regions, and since no one designed the evolved mechanism, such trade-offs are easily missed. Three checkpoints follow. Before the search, the problem should be deliberately delimited, and where distributional consequences matter, the objective should register them (e.g., worst-region terms alongside the mean, § 6.3) rather than average them away; our restriction of regime discovery to descriptive partitioning (§ 4.1) is a modest instance. Before deployment, the evolved algorithm should be diagnosed, not only scored: visual analytics [8] can map its errors and uncertainty, which are rarely uniform over space and so translate into spatially uneven risk, and check the spatial continuity of the parameters it estimates. At deployment, performance established in one study region cannot be assumed to transfer, so local diagnostics, recalibration where needed, and disaggregation of results by spatial unit and population group should precede any decision. However much of the search is delegated, the judgement of whom its results serve remains the geographer’s.

Limitations and Risks

While the present results are encouraging, several limitations and risks deserve attention. Dependence on objective-function quality. The hypothesis that problems with well-defined objectives can be partly addressed by autonomous search places a heavy burden on the objective itself. Poorly specified loss functions may lead the evolutionary system to favor algorithms that optimize the metric while drifting away from the intended geographic phenomenon; the choice of RandI as the fitness signal in our case study is a concrete instance of how carefully this choice must be made. Problems with ill-defined objectives. Not all geospatial problems admit clean, easily formalizable objectives. Tasks such as cartographic generalization, place characterization, or qualitative spatial reasoning involve aesthetic, cognitive, or contextual judgements that are difficult to reduce to a single scalar metric; for such problems, hybrid approaches combining human judgement with autonomous search are likely to be needed. Interpretability and trust. Evolved algorithms can be more difficult to interpret than manually designed ones; the evolved 2KModels’ interacting heuristics — a candidate-set search over initial cluster counts nested inside the two-stage procedure, and a border-refinement stage whose penalty magnitude, iteration budget and patience were tuned by the search rather than derived from theory — lack the conceptual transparency of methods derived from first principles, which raises legitimate concerns for scientific reproducibility. Knowledge-base bias. The geographic knowledge base K\mathcal{K} inevitably reflects the choices, blind spots, and disciplinary tendencies of its source materials; over-representing certain methodological traditions (e.g., spatial econometrics) while under-representing others (e.g., qualitative geography) can steer the evolutionary search toward a narrow region of the solution space. Single seed and task family. All empirical evidence comes from one seed algorithm in one task family: the case study demonstrates feasibility, not generality. Establishing SEGA as a general paradigm requires demonstrations across algorithm families under the same evaluation discipline; until then, framework-level statements should be read as scoped to problems resembling the one studied here. Computational cost and reproducibility. LLM-driven evolution requires substantial computational resources and depends on language models whose behavior may change across versions, making bit-for-bit reproducibility difficult.

Conclusion

This paper presented Self-Evolving Geospatial Algorithms (SEGA), a framework for developing geospatial algorithms through a structured, evaluation-driven LLM-assisted inner loop alongside the traditional expert-driven discovery carried out by researchers. SEGA rests on three required modules: a two-loop architecture with embedded geographic knowledge (adopted from GeoEvolve), an automatic code formatter that turns any raw seed algorithm into the standardized input the inner loop requires, and a simulation-driven training protocol that disciplines the use of data and metrics so that real-world performance counts as out-of-sample evidence. The spatial regime case study validates the full stack: the knowledge-guided evolved Two-stage K-Models outperforms both its seed and knowledge-free baselines on 150 simulated grids, transfers without retuning to 11 real-world datasets across climate, health, hydrology, and politics, and remains competitive with four classical regionalization baselines on real data. We close with a hypothesis that this case study supports but cannot yet establish: when a geospatial problem admits a computable optimization objective, much of the inner-loop work of algorithm refinement may be delegable to LLM-driven systems; demonstrating this beyond a single seed and task family is the necessary next step. What the study does show is the geographer’s contribution shifting upstream, toward articulating new questions, designing meaningful loss functions, and building trustworthy evaluation protocols.

Data and Code Availability

The complete code and data accompanying this paper, together with an interactive trace of the evolution it reports, are available from the project page: https://peng-luo.com/sega/.

Disclosure Statement

No conflict of interest exists in this manuscript, and the manuscript was approved by all authors for publication.

The authors used Claude (Anthropic, Claude Opus 5) to polish the language of the manuscript. The tool was used only for wording and readability; all research design, analysis, results and conclusions are the authors’ own, and the authors take full responsibility for the content of the manuscript. The use of large language models as the object of study is described in § 4.2.1 and Appendix § 11.

Details of Real-world Datasets

In this section, we present details on the real-world datasets, including geographical locations, regional divisions, target variables, and associated explanatory variables. In the health dataset, we use eight conditions as target variables: cancer, arthritis, high blood pressure, asthma, depression, diabetes, obesity, and stroke.

Column NameReal NameDescription
latgauge_latLatitude
longauge_lonLongitude
regionstateUSA state name
Yt2mTemperature of air at 2m above the surface
X1tpTotal precipitation
X2spSurface pressure
X3u1010m u-component of wind
X4v1010m v-component of wind
X5pevPotential evaporation
X6strdSurface thermal radiation downwards
X7ssrdSurface solar radiation downwards
X8lai_hvLeaf area index, high vegetation
X9lai_lvLeaf area index, low vegetation

Table A.1. Details of the climate dataset

Column NameReal NameDescription
latgauge_latLatitude
longauge_lonLongitude
regionregion2-digit USGS hydrologic unit code
Yq_meanMean daily discharge
X1p_meanMean daily precipitation
X2pet_meanMean daily potential evapotranspiration
X3aridityAridity index (PET/P), the ratio of mean PET to mean precipitation
X4elev_meancatchment mean elevation
X5slope_meancatchment mean slope
X6frac_forestforest fraction
X7lai_maxmaximum monthly mean of the leaf area index
X8soil_depth_statsgosoil depth (maximum 1.5m, layers marked as water and bedrock were excluded)
X9sand_fracsand fraction
X10soil_porosityvolumetric porosity

Table A.2. Details of the hydrology dataset

Column NameReal NameDescription
proj_Xproj_XX on the projected coordinate system
proj_Yproj_YY on the projected coordinate system
regionstateUS States 2-letter code
Ynew_pct_demThe percentage of people who voted for the Democratic Party
X1sex_ratiosex ratio
X2pct_blackThe percentage of African Americans,
X3pct_hispThe percentage of Hispanics
X4pct_bachThe percentage of the population with a bachelor’s degree
X5median_incomeMedian household income
X6pct_65_overThe percentage of the population aged sixty-five and over
X7pct_age_18_29The percentage of the population aged eighteen to twenty-nine
X8giniGini index
X9pct_manufThe percentage of the population employed in the manufacturing industry
X10ln_pop_denNatural logarithm of population density
X11pct_3rd_partyThe percentage of third-party vote
X12turn_outThe voter turnout
X13pct_fbThe percentage of foreign-born
X14pct_uninsuredThe percentage of the health-insured population

Table A.3. Details of the politics dataset

Column NameReal NameDescription
latlatLatitude
lonlonLongitude
regionStateAbbrUSA State abbreviation
YCANCER_AdjPrevPrevalence of cancer (non-skin) or melanoma among adults, 2022
YARTHRITIS_AdjPrevPrevalence of arthritis among adults, 2022
YBPHIGH_AdjPrevPrevalence of high blood pressure among adults, 2022
YCASTHMA_AdjPrevPrevalence of current asthma among adults, 2022
YDEPRESSION_AdjPrevPrevalence of depression among adults, 2022
YDIABETES_AdjPrevPrevalence of diagnosed diabetes among adults, 2022
YOBESITY_AdjPrevPrevalence of obesity among adults, 2022
YSTROKE_AdjPrevPrevalence of stroke among adults, 2022
X1ACCESS2_AdjPrevPrevalence of lack of health insurance among adults aged 18-64 years, 2022
X2CHECKUP_AdjPrevPrevalence of routine checkup within the past year among adults, 2022
X3DENTAL_AdjPrevPrevalence of visited dentist or dental clinic in the past year among adults, 2022
X4BINGE_AdjPrevPrevalence of binge drinking among adults, 2022
X5CSMOKING_AdjPrevPrevalence of current cigarette smoking among adults, 2022
X6LPA_AdjPrevPrevalence of no leisure-time physical activity among adults, 2022
X7SLEEP_AdjPrevPrevalence of short sleep duration among adults, 2022
X8EMOTIONALSPT_AdjPrevPrevalence of lack of social and emotional support among adults, 2022

Table A.4. Details of the health dataset

Configuration of GeoEvolve Used in the Case Study

This appendix records the runtime configuration used to evolve the spatial regime algorithms reported in this paper, so that the case study can be reproduced without consulting Luo et al. [28]. Settings not listed here are inherited from that system paper without modification.

LLM backbone and evolutionary search

The framework is LLM-agnostic in principle; any chat-completions backbone may be substituted via a single configuration entry. In this case study we used a weighted pair of OpenAI models accessed through OpenRouter: openai/gpt-4o as the primary model (weight 0.8) and openai/gpt-4.1 as the secondary model (weight 0.2), with sampling parameters temperature = 0.7, top_p = 0.95, and max_tokens = 8192. The same backbone is used by all agents (Code Evolver, Code Analyzer, Knowledge Retriever, and Geo-informed Prompt Generator). The code evolver is OpenEvolve (Sharma, [40]), which serves as the inner loop. Concretely, all GeoEvolve-based variants are run through the open-source Python package geoevolve, distributed alongside Luo et al. [28]; the package handles the orchestration of the four agents and exposes the configuration entries described below. The total evolutionary budget is held constant at 100 iterations across all variants: for OpenEvolve-based variants this is a single flat loop of 100 iterations; for GeoEvolve-based variants it is 10 outer-loop cycles, each invoking the analyzer, retriever (when enabled), and prompt generator once, with 10 inner-loop iterations per cycle. The search uses a MAP-Elites population of 50 programs with archive size 20, organized into 5 islands, with elite/exploration/exploitation selection ratios of (0.1, 0.2, 0.7) and a 10×1010 \times10 (scorescore, complexitycomplexity) feature map. Each evaluation is allowed up to 100 seconds and at most three retries.

Algorithm variants

Five variants are compared in addition to the unevolved seed: (i) OpenEvolve (No GeoKnow.), the vanilla code-evolution loop with no domain-knowledge injection; (ii) OpenEvolve (General GeoKnow.), a fixed natural-language hint about general spatial-modeling concerns (Tobler’s first law, spatial autocorrelation, scale effects); (iii) OpenEvolve (Specific GeoKnow.), a fixed hint additionally listing spatial-regime-specific modifications such as contiguity penalties and region-size balancing; (iv) GeoEvolve (No GeoKnowRAG), the full multi-agent dialogue with the retrieval module disabled; and (v) GeoEvolve, the complete pipeline with GeoKnowRAG enabled. The prompt templates for (ii) and (iii) match those in Luo et al. [28], Section 4.

GeoKnowRAG and code analyzer

The geospatial knowledge database is reused unchanged from Luo et al. [28]: 124 documents (75,228 chunks in the vector store, verified against the archived database used for the reported runs) drawn from peer-reviewed publications, Wikipedia entries, and open-source GitHub repositories, organized into five categories (geostatistics, spatial theory, GIScience, spatial statistics, and spatial modeling). Representative keywords span kriging theory, Tobler’s first law, spatial autocorrelation, the modifiable areal unit problem, and spatial-interaction models. Chunks of 300 tokens (50-token overlap) are embedded with text-embedding-3-large, stored in a Chroma vector database, and retrieved with RAG-Fusion (reciprocal rank fusion over multi-angle sub-queries). The Code Analyzer is prompted to (i) identify missing or problematic geographic knowledge, (ii) suggest up to three search queries for the retriever, and (iii) flag whether code examples or theoretical background are needed; it returns strict JSON with keys missing_or_problematic_knowledge, search_queries, need_code_examples, and need_geographical_theory.

Task-specific settings for spatial regime discovery

The settings below differ from Luo et al. [28] only because the case study addresses a different task. The seed algorithm A0A_0 is Two-stage K-Models (Guo et al. [18], § 4.1). The simulator produces 150 grids of size 25×2525 \times25 (§ 4.2.1), evenly split across three latent regime patterns (Rectangular, Voronoi, Arbitrary) at the high-noise level. The fitness signal is the Rand Index against the ground-truth partition (§ 4.2.1); no SSR-family metric is used as a fitness signal. The target number of regions is p=5p = 5 on simulated data, and on real-world data pp is inferred from the dataset’s administrative-unit structure (§ 4.3.1). The spatial weights matrix is a rook-contiguity matrix from libpysal.weights.lat2W on the 25×2525 \times25 grid for simulated data, and a row-standardized kk-nearest-neighbor matrix with k=6k = 6 for real-world data. The minimum region size is 10 cells (simulated) and 10 observations (real-world). The evaluation metrics (SSR, SSR Reduction, RMSE, Variance Ratio) are computed post-hoc by the evaluation harness and are never observed by Φ\Phi during evolution; on real-world data they are model-fit statistics rather than predictive scores, for the reasons set out in § 4.3.1.

Computational Cost of the Case Study

This appendix reports what it cost to run the case study, separating two quantities that are easily conflated: the cost of discovering an algorithm (the evolution loop) and the cost of running the discovered algorithm (inference). Both are measured, not estimated.

Token counts are recorded per API call by instrumenting the client SDK, so they cover the inner evolution loop, the four GeoEvolve agents, and GeoKnowRAG retrieval and embedding calls alike. We report token counts rather than monetary cost because tokens are a property of the run, whereas prices depend on the provider and change over time; a reader can convert to their own provider’s rates. (At the provider list prices in effect in August 2026, the measured usage corresponds to roughly US$6–11 per 100-iteration run: US$5.5–6.4 for the GeoEvolve variants and US$10.3–11.3 for the OpenEvolve variants.)

Elapsed time is measured from the start of an evolution run to the completion of its final iteration, and inference time is the mean runtime of a discovered algorithm per grid over the 150 grids. All timings were measured on one machine (Apple M5); inference used six worker processes.

Three observations follow from Table C.5. First, a complete 100-iteration evolution is inexpensive in absolute terms: under 4M tokens and roughly an hour of elapsed time at most for every variant. Discovery cost is therefore not the binding constraint on this kind of work; run-to-run variance is (§ 5.2).

VariantAPI callsTokens (millions) InputTokens (millions) OutputElapsed time (min)Seconds per grid
GeoEvolve (GeoKnowRAG)2131.660.173269.95±103.0569.95 \pm103.05 (10.45†10.45^{\dagger})
GeoEvolve (No GeoKnowRAG)1001.880.19521.68
OpenEvolve (General GeoKnow.)1003.820.18200.91
OpenEvolve (Specific GeoKnow.)1003.970.18117.42
OpenEvolve (No GeoKnow.)1003.690.17102.99

Table C.5. Average measured computational cost per variant. Evolution columns refer to one 100-iteration evolution run; Inference is the runtime of the discovered algorithm on one 625-cell grid. For GeoEvolve (GeoKnowRAG) the inference column reports the mean ±\pm SD over all three evolution runs, followed in parentheses by the trimmed mean†^{\dagger} that excludes the one run whose refinement step lacks early stopping (tail behaviour described in the text); no other variant has any run excluded from any column. Measurement conditions are described in the text.

Second, the GeoEvolve variants consume roughly half the input tokens of the OpenEvolve variants (1.7–1.9M versus 3.7–4.0M) despite issuing about twice as many API calls. The reason is structural rather than a property of retrieval: GeoEvolve restarts the inner loop every ten iterations, so the program database — from which the prompt draws its top-performing and diverse exemplars — is rebuilt each round and supplies fewer exemplars in the early iterations of every round. A flat 100-iteration loop instead accumulates a full archive and quickly saturates the prompt. Measured per-call prompt length shows this directly: GeoEvolve prompts follow a sawtooth from ∼\sim7k tokens at the start of each round to ∼\sim40k by its end (median ∼\sim22k), whereas OpenEvolve prompts sit near ∼\sim42k throughout. Disabling GeoKnowRAG leaves this profile essentially unchanged (median 21.7k versus 21.8k with retrieval enabled), confirming that the saving comes from the two-loop schedule and not from retrieval compression.

Third, inference cost varies far more across variants than discovery cost does, and the ordering does not follow accuracy. The overhead of the GeoEvolve algorithm relative to the seed comes from two explicit and adjustable choices — the number of candidate cluster counts searched in stage one, and the iteration budget and patience of the border-refinement step — rather than from any fixed property of the framework. One evolved program illustrates the risk of leaving those choices unconstrained: its refinement step has no early stopping, so although its median grid takes 4.8 s, it exceeds ten minutes on 19 of the 150 grids, for a per-grid mean of 188.9 s. The missing early stopping makes it slow, not unreliable: like every other frozen program, it completes all 150 grids. This slow behaviour is itself an outcome of the discovery process, so Table C.5 reports the inference cost of GeoEvolve (GeoKnowRAG) over all three runs, with the clearly marked trimmed mean that excludes this run summarizing typical behaviour rather than the tail. Evolution optimizes the fitness signal it is given, and runtime was not part of that signal; a multi-objective fitness that prices runtime would be a natural extension (§ 6).

Evolved Algorithm versus Seed under a Matched Budget, and Component Ablations

Compared with its seed, the evolved algorithm spends more computation at inference: it searches six initial cluster counts and adds a border-refinement stage. This appendix asks whether its advantage in Table 3 comes from that extra computation or from its algorithmic content. Two analyses answer the question: a comparison with the seed given the same search under a matched budget, and one-component ablations of the evolved algorithm.

ARI, not SSR, is the comparison of record in this appendix. The reason is structural. Because no ground-truth information may enter a candidate program (Principle 4, § 3.2.3), every selection rule available in this study — inside the evolved algorithm and inside the matched-budget wrapper alike — must rank candidate partitions by post-merge SSR. SSR is therefore the one quantity that additional search can buy directly, and a search-based baseline will narrow the SSR gap whether or not it has recovered any more of the regime structure. ARI, agreement with the ground-truth partition, is reachable by no selection rule here, and it is the quantity spatial regime discovery is defined on. Closeness on SSR between a search-based baseline and the evolved algorithm is accordingly weak evidence of equivalence, and the two columns are read separately below.

All variants are evaluated by the harness of § 4.2.1 on the same 150 grids, in a single batch on one machine. The reference row is the single frozen algorithm A⋆A^\star that is carried forward to the real-world study, scored grid by grid; its figures are therefore not the three-run means of Table 3, where the spread is across evolution runs rather than across grids. Table D.6 reports the results; the programs, the runner, and the per-grid results are in the project repository.

Evolved algorithm versus seed under a matched budget. This analysis tests whether extra search alone reproduces the evolved algorithm’s advantage. The baseline is the seed program, left unmodified, called by an external wrapper. The wrapper repeats the seed’s partition-and-merge procedure over the same six initial cluster counts that the evolved algorithm searches, {⌊2.5p⌋,4p,⌊n⌋,p,p+1,p+2}\{\lfloor2.5p\rfloor, 4p, \lfloor\sqrt{n}\rfloor, p, p+1, p+2\}, draws a fresh random restart on each pass, and returns the run with the lowest post-merge SSR, which is the label-free selection rule the evolved algorithm itself uses. It stops once it has used the evolved algorithm’s mean per-grid runtime in the same batch (7.5 s). The remaining asymmetries favour the baseline: it always completes at least one full pass over the six counts, and it checks the budget only between runs, so it actually takes 1.11 times as long as the evolved algorithm. The outcome divides along exactly the line drawn above. On ARI, which no selection rule in this study can target, the gap persists in all three spatial patterns: the evolved algorithm recovers the true regimes better (0.894 versus 0.854; median ΔARI+0.043\Delta\mathrm{ARI} +0.043, p=2.3×10−10p = 2.3 \times10^{-10}), and the budgeted search recovers only a little over half of the seed’s deficit (0.801 → 0.854, against 0.801 → 0.894 for the evolved algorithm). On SSR, the quantity the wrapper selects on directly, additional search closes most of the gap (seed 80.5, baseline 60.6, evolved 59.0), leaving a small but significant margin (median ΔSSR−1.90\Delta\mathrm{SSR} -1.90, p=2.1×10−5p = 2.1 \times10^{-5}). Additional computation therefore accounts for most of the SSR advantage but not for the recovery of the regime structure itself, and the asymmetry between the two columns is what a baseline that optimizes one of them and not the other should be expected to produce.

Component ablations. The ablations locate the advantage that remains, and they do so in the direction opposite to what a parameter-search account of the gains would predict. Each removes one component from the frozen evolved algorithm with a single commented change: the initial-cluster-count search (replaced by the seed’s fixed count of 20); border refinement (the stage that reassigns boundary units after merging); the spatial penalty inside that stage (which discourages moving a unit into a region where it has fewer neighbours); or KMeans++ initialization (replaced by the seed’s random assignment).

The one component that is purely a matter of search effort, the initial-cluster-count search, contributes the least of the three that contribute at all (median ΔSSR\Delta\mathrm{SSR} −0.33-0.33, ΔARI\Delta\mathrm{ARI} +0.004+0.004), while the structural addition contributes an order of magnitude more (border refinement: median ΔSSR\Delta\mathrm{SSR} −7.09-7.09, ΔARI\Delta\mathrm{ARI} +0.063+0.063, p<10−24p < 10^{-24} on both). KMeans++ initialization contributes nothing detectable (p=0.68p = 0.68) while accounting for 43% of the runtime — a component the search had no reason to prune, because runtime was not part of the fitness signal (Appendix § 12). The spatial penalty is the clearest case of all: it contributes +0.039+0.039 ARI even though removing it lowers SSR (median ΔSSR\Delta\mathrm{SSR} +1.80+1.80, p=3.9×10−19p = 3.9 \times10^{-19}), trading fit for agreement with the true structure. Because its value is negative in the algorithm’s own selection objective, no tuning of the seed’s parameters against that objective could have found it; it is a structural contribution of the discovery process rather than a setting a grid search would have reached.

VariantSSR ↓\downarrowARI ↑\uparrowRel. timeΔ\DeltaSSR medianΔ\DeltaSSR ppΔ\DeltaARI medianΔ\DeltaARI pp
Evolved algorithm (reference)58.96±9.4658.96 \pm9.460.894±0.0960.894 \pm0.0961.00
(a) Seed under a matched budget
Seed, single run80.52±20.1180.52 \pm20.110.801±0.1050.801 \pm0.1050.10−17.87-17.871.1×10−241.1 \times10^{-24}+0.084+0.0846.0×10−216.0 \times10^{-21}
Seed + matched-budget search60.60±8.6460.60 \pm8.640.854±0.0910.854 \pm0.0911.11−1.90-1.902.1×10−52.1 \times10^{-5}+0.043+0.0432.3×10−102.3 \times10^{-10}
(b) Evolved algorithm with one component removed
w/o initial-kk search62.35±12.0862.35 \pm12.080.873±0.1140.873 \pm0.1140.56−0.33-0.334.3×10−54.3 \times10^{-5}+0.004+0.0046.3×10−36.3 \times10^{-3}
w/o border refinement68.72±13.6868.72 \pm13.680.830±0.0940.830 \pm0.0940.98−7.09-7.092.1×10−252.1 \times10^{-25}+0.063+0.0632.4×10−262.4 \times10^{-26}
w/o spatial penalty56.54±8.5356.54 \pm8.530.852±0.0920.852 \pm0.0920.99+1.80+1.803.9×10−193.9 \times10^{-19}+0.039+0.0391.1×10−241.1 \times10^{-24}
w/o KMeans++ initialization57.90±7.0957.90 \pm7.090.902±0.0920.902 \pm0.0920.570.000.680.0000.68

Table D.6. Matched-budget comparison and one-component ablations on the 150 high-noise grids. ARI is the comparison of record: SSR is the quantity every selection rule in this study optimizes directly (Principle 4), so closeness on SSR does not indicate equivalence. SSR and ARI are mean ±\pm SD over grids, computed externally by the harness. Δ\DeltaSSR and Δ\DeltaARI are per-grid medians of (evolved − variant), each with the pp-value of a paired Wilcoxon signed-rank test; negative Δ\DeltaSSR and positive Δ\DeltaARI favour the evolved algorithm. Paired medians are reported because the per-grid SSR distribution is right-skewed, so they need not match the difference of the means in the first column. Rel. time is each program’s mean per-grid runtime relative to the evolved algorithm (= 1.00), all measured in the same batch. The two identical pp-values in the last row arise from the signed-rank statistic taking mirror-image values on the two metrics; they are a coincidence, not a transcription error.

Worked Example of the Automatic Code Formatter on Two-stage K-Models

This appendix traces what the automatic code formatter (Module 2, § 3.2.2) did when applied to the Two-stage K-Models seed. The formatter’s job is to turn the raw source into the standardized triple (Ainit,Eval,Cconfig\mathcal{A}_{\mathrm{init}}, \mathcal{E}_{\mathrm{val}}, \mathcal{C}_{\mathrm{config}}) introduced in § 3.2.2, plus a small metadata file. Figure S1 summarizes the end-to-end run; Sections Appendix E.1–Appendix E.3 below show the raw input, the three produced artifacts, and a short narrative of the case-study-specific elements.

Figure S1. Trace of the automatic code formatter on the Two-stage K-Models seed. Three LLM chains transform the raw .py input into the standardized triple plus a metadata file: initial_program.py (Ainit\mathcal{A}_{\mathrm{init}}), evaluator.py (Eeval\mathcal{E}_{\mathrm{eval}}), config.yaml (Cconfig\mathcal{C}_{\mathrm{config}}), and _format_metadata.json. Chain #1 is followed by a deterministic syntactic check that parses the generated program with Python’s ast module, locates the standardized run_algorithm entry function, and verifies that its body contains at least one return statement returning a non-None value; when the check fails, an LLM-driven repair step is invoked at most twice before the formatter falls back to the user. For this seed the check passed on the first attempt.

Input: the raw Two-stage K-Models implementation

The raw input Araw\mathcal{A}_{\mathrm{raw}} was a single .py file containing our implementation of the Two-stage K-Models algorithm of Guo et al. [18]. The core of the file is the two-stage entry point, reproduced in abbreviated form in Listing 1: a first-stage run_kmodels call that partitions the units into 20 sub-regions, followed by a second-stage merge_stage that enforces spatial contiguity, removes regions below min_size, and merges until exactly pp regions remain. The file also contains the underlying helper functions (init_zones, fit_equations, closest_equation, merge_small_regions, greedy_merge_until_p, …) and the data-loading / metric-computation utilities. Crucially, the raw file does not declare which parts of the code should be considered mutable by an evolutionary loop and does not expose a uniform entry point for an external evaluator, those are the two responsibilities the formatter takes on.

Listing 1: Excerpt from the raw Two-stage K-Models source Araw\mathcal{A}_{\mathrm{raw}} given to the formatter (helper functions and data-loading utilities elided).

import numpy as np
import libpysal

def run_two_stage_kmeans(
    X, Y, p, w,
    min_size=None, max_iter=1000,
    init_stoc_step=True, verbose=False):
    """A two-step kmeans-like regionalization algorithm."""
    if min_size is None:
        min_size = X.shape[1]
    # Stage 1: partition into 20 sub-regions
    labels_partition = run_kmodels(
X, Y, n_regions=20, w=w,
min_size=min_size, max_iter=max_iter,
init_stoc_step=init_stoc_step, verbose=verbose)
# Stage 2: merge into p connected regions
labels_merged = merge_stage(
X, Y, labels_partition, w,
p=p, min_size=min_size, verbose=verbose)
return labels_merged

Output: the standardized triple

Initial program Ainit

The formatter wrapped the algorithmic core of ArawA_{\mathrm{raw}} in a single # EVOLVE-BLOCK-START / # EVOLVE-BLOCK-END pair and appended a standardized entry function named run_algorithm below the block. The function name is fixed by the formatter (it is the same name the formatter uses for every seed, and the same name the AST-based validation step checks for), so that the evaluator can always import the program and call run_algorithm() without seed-specific code. The block contains the entire two-stage algorithm together with all helper routines that depend on the regionalization logic; the entry function lives outside the block so that the inner loop cannot mutate the interface that the evaluator relies on. Listing 2 shows the boundaries of the resulting initial_program.py.

Listing 2: Boundaries of the formatter-produced initial_program.py (AinitA_{\mathrm{init}}). The evolvable block contains the partitioning loop, the merge stage, and all helper functions; the standardized run_algorithm() entry function below the block is what the evaluator calls.

# EVOLVE-BLOCK-START
import time
import numpy as np
import libpysal

def run_two_stage_kmeans(X, Y, p, w, min_size=None,
                         max_iter=1000, init_stoc_step=True,
                         verbose=False):
    ... # algorithmic core
    return labels_merged

def run_kmodels(...): ... # Stage 1 (partition)
def merge_stage(...): ... # Stage 2 (merge)
def init_zones(...): ... # initialization
def fit_equations(...): ... # per-region OLS
# ... other helpers ...
# EVOLVE-BLOCK-END

# --- standardized entry function (not mutated by the inner loop) ---
def run_algorithm():
    """Run Two-stage K-Models on every simulated grid and return
    the mean of the five evaluator-facing metrics."""
    base_path = ’.../synthetic’
    data_ids = (5, 75, 149)
    ssr_list, randi_list, nmi_list, mae_list, time_list = [],[],[],[],[]
    for id_ in data_ids:
        data_path = f’{base_path}/grid_{id_}h.txt’
        ssr, randi, nmi, mae, used_time = run_georegime_once(data_path)
        ssr_list.append(ssr); randi_list.append(randi)
        nmi_list.append(nmi); mae_list.append(mae)
time_list.append(used_time)
return (np.mean(ssr_list), np.mean(randi_list),
np.mean(nmi_list), np.mean(mae_list),
np.mean(time_list))

Evaluator module Eeval\mathcal{E}_{\mathrm{eval}}

The formatter wrote a evaluator.py module whose evaluate(program_path) entry point dynamically loads Ainit\mathcal{A}_{\mathrm{init}} with importlib, calls program.run_algorithm() on the simulator under a 100-second wall-clock timeout, and returns a dictionary of five metrics together with a combined_score field that is the single scalar actually consumed by the inner loop. Listing 3 shows the body of evaluate(). The key design choice visible in the listing is that combined_score is set to randi: the Rand Index is what drives evolutionary selection, while SSR, NMI, MAE, and used_time are returned and logged but never fed back as fitness. This is the code-level enforcement of the fitness/evaluation separation prescribed by the training protocol of § 3.2.3.

Listing 3: Body of the formatter-produced evaluator.py (Eeval\mathcal{E}_{\mathrm{eval}}). The combined_score field (last line of the returned dict) is what the inner-loop engine uses for selection; all other metrics are logged but do not influence the search.

def evaluate(program_path):
    spec = importlib.util.spec_from_file_location("program", program_path)
    program = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(program)
    if not hasattr(program, "run_algorithm"):
        print("Error: program lacks the expected entry function")
    ssr, randi, nmi, mae, used_time = run_with_timeout(
        program.run_algorithm,
        timeout_seconds=100)
    return {"ssr": ssr,
            "randi": randi, # fitness signal (RandI vs ground truth)
            "nmi": nmi,
            "mae": mae,
            "used_time": used_time,
            "combined_score": randi} # drives evolutionary selection

Configuration file Cconfig\mathcal{C}_{\mathrm{config}}

The formatter emitted a YAML configuration file with five blocks: general evolution settings, LLM settings, prompt configuration, population/archive parameters for OpenEvolve’s MAP-Elites database, and evaluator settings. The most case-study-specific block is the prompt configuration, where the formatter inserted a domain-specific system message instructing the LLM that the task is to improve a spatial regime algorithm and that the optimization target is the Rand Index. Listing 4 shows the relevant blocks (full file: 100 lines). The LLM-generated YAML initially contains the literal placeholder "YOUR_API_KEY" for llm.api_key; the formatter then post-processes the file to replace the placeholder with whichever of OPENROUTER_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, GROQ_API_KEY, or ANTHROPIC_API_KEY is present in the environment (resolved in that priority order), and to rewrite llm.api_base so it matches the backend implied by the model name (e.g. OpenRouter, Gemini’s OpenAI-compatible endpoint, or Groq). The injection happens at write time so that no secret ever lives in the source tree or in version control.

Listing 4: Key blocks of the formatter-produced config.yaml (CconfigC_{\mathrm{config}}). API keys are written to the file at run time from an environment variable so that no secret enters version control.

# --- General evolution settings ---
max_iterations: 10 # inner-loop iterations per outer cycle; GeoEvolve runs 10
    cycles for 100 total (Appendix B.1); for OpenEvolve-only variants this is
    overridden to 100 to run a single flat loop
diff_based_evolution: true
max_code_length: 25000

# --- LLM configuration ---
llm:
  primary_model: "openai/gpt-4o"
  primary_model_weight: 0.8
  secondary_model: "openai/gpt-4.1"
  secondary_model_weight: 0.2
  temperature: 0.7
  top_p: 0.95
  max_tokens: 8192

# --- Prompt configuration (task-specific) ---
prompt:
  system_message: "You are an expert in GIS and an experienced
  coder. Your task is to improve the Spatial Regime algorithm
  in Python ... The target is to maximize Rand index (RandI)."

# --- Database (MAP-Elites + island model) ---
database:
  population_size: 50
  archive_size: 20
  num_islands: 5
  elite_selection_ratio: 0.1
  exploration_ratio: 0.2
  exploitation_ratio: 0.7
  feature_dimensions: ["score", "complexity"]
  feature_bins: 10

# --- Evaluator ---
evaluator:
  timeout: 100
  max_retries: 3
  parallel_evaluations: 4

Run metadata _format_metadata.json

Alongside the standardized triple, the formatter writes a small JSON file with the information needed to audit and reverse the formatting run after the fact. For the Two-stage K-Models seed it contains six fields: original_path (the absolute path of the raw input), original_type ("file" or "directory"; "file" for this seed), original_files (a map from each input filename to the SHA-256 hash of its content), run_function_name (always "run_algorithm" in the current formatter), description (the natural-language algorithm description the user supplied when invoking the formatter), and created_at (an ISO 8601 timestamp). This file is not consumed by the inner-loop engine; it is read by the companion function restore_from_geoevolve(), which uses original_path / original_type to decide whether to write a single file or a folder and uses original_files to verify, via hash comparison, that the raw source has not been modified since the formatter was run.

Narrative

Evolvable-block identification. The formatter identified a single evolvable region in ArawA_{\mathrm{raw}} and placed one # EVOLVE-BLOCK-START / # EVOLVE-BLOCK-END pair around it. The region it chose corresponds to the partitioning loop, the merge stage, and all of their helper routines, exactly the algorithmic locus that subsequent evolved variants ended up modifying. The data-loading utility (input_data), the metric-computation class (RegionMetrics), and the per-dataset driver (run_georegime_once) were correctly kept outside the block, which is what made it safe for the evolved variants to mutate the algorithm without breaking the evaluator-facing interface.

First-pass correctness of the evaluator. The evaluator generated by the second chain ran successfully on the first attempt: it imported AinitA_{\mathrm{init}}, found the standardized run_algorithm entry function, called it under the 100-second timeout, and reported the five-metric dictionary together with combined_score set to randi. The deterministic AST-based validation step on run_algorithm (Figure S1) was therefore not triggered, and the LLM-driven repair step was not invoked. The reverse operation, restore_from_geoevolve(), was not used at this stage of the case study but is available for splicing an evolved initial_program.py back into the user’s original file structure using the hashes and paths recorded in _format_metadata.json.

Configuration choices. The configuration file was produced in one pass and reflects the OpenEvolve defaults with one task-specific override: the system message embeds the domain ("Spatial Regime algorithm") and the optimization target ("Rand index"). The MAP-Elites feature dimensions score and complexity were left at their defaults; the LLM choice (GPT-4o as primary with GPT-4.1 as a secondary fallback) and the temperature 0.7 were inherited from the formatter’s prompt template and not modified per task.

Detailed K-Models Variant Comparison

This appendix provides the detailed within-family breakdown of the six Two-stage K-Models variants on real-world data, complementing the main-text comparison of GeoEvolve against the four classical regionalization baselines (§ 5.3) and the per-pattern simulation breakdown already reported in Table 3. The real-world breakdown spans all 11 datasets in four application domains: climate, health, hydrology, and politics, and includes a fine-grained six-variant regime-map breakdown (Figure S4).

Real-world cross-domain bar chart: full ten-algorithm comparison. Figure S2 expands the compact ten-algorithm SSR-Reduction summary in main-text Figure 6 and the six-algorithm Table 4 into a per-dataset, four-metric breakdown across all 11 datasets, additionally displaying the three OpenEvolve variants and GeoEvolve without Geo-KnowRAG (which are absent from Table 4) so that readers can see the full within-family detail of the K-Models seed and all its evolved variants alongside the four classical baselines. The patterns visible in this fuller chart are consistent with the main-text summary: GeoEvolve is the most consistent winner on RMSE and SSR Reduction across both the K-Models family and the classical baselines; AZP is the most competitive classical baseline on R2R^2; and the OpenEvolve variant with a general geographic-knowledge prompt attains a high Variance Ratio (mean 0.487, five first-place wins out of 11 datasets), although it does not match GeoEvolve on RMSE or SSR Reduction.

Figure S2. Full ten-algorithm performance comparison across the 11 real-world datasets, grouped by domain. Algorithms are split into four classical regionalization baselines (cool palette) and six Two-stage K-Models variants (warm palette). The legend abbreviations for the K-Models family are: 2kmodels = unevolved Two-stage K-Models seed; OE-NoGeo = OpenEvolve without geographic knowledge; OE-SimpGeo = OpenEvolve with general (simple) geographic knowledge prompt; OE-SpecGeo = OpenEvolve with task-specific geographic knowledge prompt; GE-NoRAG = GeoEvolve without the GeoKnowRAG retrieval module; GeoEvolve = the full GeoEvolve pipeline with GeoKnowRAG. Red stars indicate the best algorithm on each dataset and metric.

Sensitivity to the number of spatial regimes. Figure S3 examines the sensitivity of algorithm performance to the prescribed number of spatial regimes (RR), ranging from 3 to 12. SSR reduction and the variance ratio increase monotonically across all three algorithms, while average RMSE decreases correspondingly, consistent with the greater flexibility of finer spatial partitions. Across the considered range of RR, GeoEvolve tends to attain higher SSR reduction and variance ratio, and lower average RMSE. Notably,

Figure S3. Sensitivity of algorithm performance to the number of spatial regimes. Each panel reports the mean value (solid line) ±\pm one standard deviation (shaded band) across 11 datasets for SSR Reduction ↑\uparrow (left), Variance Ratio ↑\uparrow (center), and Average RMSE ↓\downarrow (right).

GeoEvolve at R=6R = 6 already matches the SSR reduction achieved by the seed 2KModels at R=8R = 8.

Spatial regime assignments across the six K-Models variants. Figure S4 reports the regime maps for all six Two-stage K-Models variants on four representative datasets (Climate / Health / Hydrology / Politics), complementing the classical-baseline maps in main-text Figure 7. The figure isolates the visual effect of each step along the knowledge-injection design axis (no prompt →\rightarrow general prompt →\rightarrow specific prompt →\rightarrow multi-agent dialogue without retrieval →\rightarrow full GeoKnowRAG). Several qualitative patterns stand out across the four domains. In the climate domain, all variants produce a similar macro-structure that separates the western arid/semi-arid zone from the more humid east, and GeoEvolve tends to draw sharper boundaries along the Rocky Mountain front. In the health domain (Cancer dataset as an example), the seed algorithm tends to produce a single dominant region spanning the eastern United States, whereas GeoEvolve yields a more balanced partition that distinguishes the Appalachian corridor from the southeastern coastal plain. The hydrology domain shows the greatest agreement across methods, reflecting the strong hydroclimatic zonation of the contiguous United States. For politics, GeoEvolve delineates a sharper urban-corridor versus rural-interior contrast, particularly along the Northeast–Mid-Atlantic megalopolis and the Pacific coast.

Dominant covariate maps. Figure S5 maps the dominant covariate, defined as the predictor with the largest absolute standardized coefficient (arg max⁡∣β∣\operatorname{arg\,max} |\beta|) excluding the intercept, for each observation. The seed algorithm produces relatively fragmented, locally heterogeneous patterns; OpenEvolve introduces more spatial continuity with partially consolidated regions; GeoEvolve produces more spatially coherent and regionally structured regimes, with clearer clustering and smoother transitions between dominant covariates. For health, hydrology, and politics, the leading drivers across the three algorithms are similar (no exercise, precipitation, and the percentage of Black residents, respectively); in the climate domain, the dominant covariate differs across algorithms, with thermal radiation most prominent for the GeoEvolve-evolved version.

Figure S5. Dominant covariates by spatial regime across datasets and algorithm variants.

Spatially varying regression coefficients. Figure S6 illustrates the spatial variation of one scientifically relevant regression coefficient per domain: solar radiation (β7\beta_{7}) for climate, smoking rate (β5\beta_{5}) for health, precipitation (β1\beta_{1}) for hydrology, and the percentage of bachelor’s degrees (β4\beta_{4}) for politics. In the climate domain, the solar radiation coefficient is strongly positive in the western US, where solar insolation drives surface temperature, and decreases eastward under the influence of cloud cover and humidity. GeoEvolve produces sharper transitions near the 100th meridian, consistent with the well-documented aridity boundary. The precipitation coefficient in the hydrology domain is strongly positive in high-runoff regimes (Pacific Northwest, Appalachian highlands) and weakly positive in arid regimes; this pattern is preserved across algorithms but is more sharply drawn by GeoEvolve.

Figure S6. Spatial heterogeneity of one selected regression coefficient across regimes and algorithm variants.

References

  1. [1]Addor, N., Newman, A.J., Mizukami, N., Clark, M.P., 2017. The camels data set: catchment attributes and meteorology for large-sample studies. Hydrology and Earth System Sciences 21, 5293–5313.DOI
  2. [2]Akinboyewa, T., Li, Z., Ning, H., Lessani, M.N., 2025. GIS Copilot: towards an autonomous GIS agent for spatial analysis. International Journal of Digital Earth 18, 2497489.
  3. [3]Anselin, L., 1988. Spatial econometrics: methods and models. Springer Science & Business Media.
  4. [4]Anselin, L., 1995. Local indicators of spatial association—LISA. Geographical Analysis 27, 93–115.DOI
  5. [5]Anselin, L., Amaral, P., 2024. Endogenous spatial regimes. Journal of Geographical Systems 26, 209–234.
  6. [6]Assunção, R.M., Neves, M.C., Câmara, G., da Costa Freitas, C., 2006. Efficient regionalization techniques for socio-economic geographical units using minimum spanning trees. International Journal of Geographical Information Science 20, 797–811.DOI
  7. [7]Brunsdon, C., Fotheringham, S., Charlton, M., 1998. Geographically weighted regression. Journal of the Royal Statistical Society: Series D (The Statistician) 47, 431–443.DOI
  8. [8]Chen, C., Luo, P., Zhao, B., Wang, S., Feng, Y., Meng, L., 2026. Ethical spatial analysis: Addressing endogenous bias through visual analytics. Journal of Geovisualization and Spatial Analysis 10, 4. doi:10.1007/s41651-025-00243-2.DOI
  9. [9]Cressie, N., 1993. Statistics for spatial data. John Wiley & Sons.
  10. [10]Deb, K., Agrawal, S., Pratap, A., Meyarivan, T., 2000. A fast elitist non-dominated sorting genetic algorithm for multi-objective optimization: NSGA-II, in: International Conference on Parallel Problem Solving from Nature, Springer. pp. 849–858.DOI
  11. [11]Duque, J.C., Ramos, R., Suriñach, J., 2007. Supervised regionalization methods: A survey. International Regional Science Review 30, 195–220.
  12. [12]Fotheringham, A.S., Brunsdon, C., Charlton, M., 2002. Geographically weighted regression: the analysis of spatially varying relationships. John Wiley & Sons.DOI
  13. [13]Fotheringham, A.S., Li, Z., 2023. Measuring the unmeasurable: models of geographical context. Annals of the American Association of Geographers 113, 2269–2286.DOI
  14. [14]Fotheringham, A.S., Yang, W., Kang, W., 2017. Multiscale geographically weighted regression (MGWR). Annals of the American Association of Geographers 107, 1247–1265.DOI
  15. [15]Gemini Team, Anil, R., Borgeaud, S., Alayrac, J.B., Yu, J., Soricut, R., Schalkwyk, J., Dai, A.M., Hauth, A., Millican, K., et al., 2023. Gemini: A family of highly capable multimodal models. arXiv preprint arXiv:2312.11805.
  16. [16]Goodchild, M.F., 2004. The validity and usefulness of laws in geographic information science and geography. Annals of the Association of American Geographers 94, 300–303.DOI
  17. [17]Greenlund, K.J., Lu, H., Wang, Y., Matthews, K.A., LeClercq, J.M., Lee, B., Carlson, S.A., 2022. PLACES: local data for better health. Preventing Chronic Disease 19, E31.DOI
  18. [18]Guo, H., Python, A., Liu, Y., 2023. Extending regionalization algorithms to explore spatial process heterogeneity. International Journal of Geographical Information Science 37, 2319–2334.DOI
  19. [19]Helbich, M., Brunauer, W., Hagenauer, J., Leitner, M., 2013. Data-driven regionalization of housing markets. Annals of the Association of American Geographers 103, 871–889.DOI
  20. [20]Janowicz, K., Gao, S., McKenzie, G., Hu, Y., Bhaduri, B., 2020. GeoAI: spatially explicit artificial intelligence techniques for geographic knowledge discovery and beyond. International Journal of Geographical Information Science 34, 625–636.DOI
  21. [21]LeSage, J., Pace, R.K., 2009. Introduction to spatial econometrics. Chapman and Hall/CRC.DOI
  22. [25]Lin, Q., Hu, R., Li, H., Wu, S., Li, Y., Fang, K., Feng, H., Du, Z., Xu, L., 2025. Shape-fileGPT: A multi-agent large language model framework for automated shapefile processing. International Journal of Digital Earth 18, 2577884.
  23. [26]Liu, A., Feng, B., Xue, B., Wang, B., Wu, B., Lu, C., Zhao, C., Deng, C., Zhang, C., Ruan, C., et al., 2024. DeepSeek-V3 technical report. arXiv preprint arXiv:2412.19437 .arxiv.org/abs/2412.19437
  24. [27]Lou, X., Luo, P., Meng, L., 2025. GeoConformal prediction: a model-agnostic framework for measuring the uncertainty of spatial prediction. Annals of the American Association of Geographers 115, 1971–1998.
  25. [28]Luo, P., Lou, X., Zheng, Y., Zheng, Z., Ermon, S., 2025. GeoEvolve: Automating geospatial model discovery via multi-agent large language models. arXiv preprint arXiv:2509.21593 .arxiv.org/abs/2509.21593
  26. [30]Mai, G., Huang, W., Sun, J., Song, S., Mishra, D., Liu, N., Gao, S., Liu, T., Cong, G., Hu, Y., et al., 2023. On the opportunities and challenges of foundation models for geospatial artificial intelligence. arXiv preprint arXiv:2304.06798 .arxiv.org/abs/2304.06798
  27. [31]Meyerson, E., Nelson, M.J., Bradley, H., Gaier, A., Moradi, A., Hoover, A.K., Lehman, J., 2024. Language model crossover: Variation through few-shot prompting. ACM Transactions on Evolutionary Learning 4, 1–40.DOI
  28. [32]Mouret, J.B., Clune, J., 2015. Illuminating search spaces by mapping elites. arXiv preprint arXiv:1504.04909 .DOI
  29. [33]Muñoz-Sabater, J., Dutra, E., Agustí-Panareda, A., Albergel, C., Ardhuini, G., Balsamo, G., Boussetta, S., Choulga, M., Harrigan, S., Hersbach, H., et al., 2021. ERA5-Land: A state-of-the-art global reanalysis dataset for land applications. Earth System Science Data 13, 4349–4383.
  30. [34]Ning, H., Li, Z., Akinboyewa, T., Lessani, M.N., 2025. An autonomous GIS agent framework for geospatial data retrieval. International Journal of Digital Earth 18, 2458688.arxiv.org/abs/2407.21024
  31. [35]Novikov, A., Vũ, N., Eisenberger, M., Dupont, E., Huang, P.S., Wagner, A.Z., Shirobokov, S., Kozlovskii, B., Ruiz, F.J., Mehrabian, A., et al., 2025. AlphaEvolve: A coding agent for scientific and algorithmic discovery. arXiv preprint arXiv:2506.13131 .arxiv.org/abs/2506.13131
  32. [36]Openshaw, S., 1977. A geographical solution to scale and aggregation problems in region-building, partitioning and spatial modelling. Transactions of the Institute of British Geographers 2, 459–472.DOI
  33. [37]Openshaw, S., Rao, L., 1995. Algorithms for reengineering 1991 Census geography. Environment and Planning A 27, 425–446.pubmed.ncbi.nlm.nih.gov/12346252
  34. [38]Park, J.S., O’Brien, J.C., Cai, C.J., Morris, M.R., Liang, P., Bernstein, M.S., 2023. Generative agents: Interactive simulacra of human behavior. Proceedings of the 36th Annual ACM Symposium on User Interface Software and Technology , 1–22.arxiv.org/abs/2304.03442
  35. [39]Romera-Paredes, B., Barekatain, M., Novikov, A., Balog, M., Kumar, M.P., Dupont, E., Ruiz, F.J., Ellenberg, J.S., Wang, P., Fawzi, O., et al., 2024. Mathematical discoveries from program search with large language models. Nature 625, 468–475.
  36. [40]Sharma, A., 2025. OpenEvolve: an open-source evolutionary coding agent. GitHub repository. URL: https://github.com/algorithmicsuperintelligence/openevolve.
  37. [41]Shojaee, P., Meidani, K., Gupta, S., Farimani, A.B., Reddy, C.K., 2024. LLM-SR: Scientific equation discovery via programming with large language models. arXiv preprint arXiv:2404.18400.arxiv.org/abs/2404.18400
  38. [42]Singh, A., Fry, A., Perelman, A., Tart, A., Ganesh, A., El-Kishky, A., McLaughlin, A., Low, A., Ostrow, A., Ananthram, A., et al., 2025. OpenAI GPT-5 system card. arXiv preprint arXiv:2601.03267.arxiv.org/abs/2601.03267
  39. [43]Tobler, W.R., 1970. A computer movie simulating urban growth in the Detroit region. Economic Geography 46, 234–240.DOI
  40. [44]Yang, A., Li, A., Yang, B., Zhang, B., Hui, B., Zheng, B., Yu, B., Gao, C., Huang, C., Lv, C., et al., 2025. Qwen3 technical report. arXiv preprint arXiv:2505.09388.arxiv.org/abs/2505.09388
  41. [45]Zhang, Y., He, Z., Li, J., Lin, J., Guan, Q., Yu, W., 2024. MapGPT: an autonomous framework for mapping by integrating large language model and cartographic tools. Cartography and Geographic Information Science 51, 717–743.DOI
  42. [46]Zhang, Y., Wei, C., Wu, S., He, Z., Yu, W., 2023. GeoGPT: Understanding and processing geospatial tasks through autonomous GPT. arXiv preprint arXiv:2307.07930.arxiv.org/abs/2307.07930
  43. [47]Zhou, B., Huang, X., Ning, H., Wu, Q., Li, D., Zhang, Z., 2026. NORA: A harness-engineered autonomous research agent for end-to-end spatial data science. arXiv preprint arXiv:2605.02092.arxiv.org/abs/2605.02092

Paper details

vlnc:W_tyrn3g5v
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents