GeoDecider: A Coarse-to-Fine Agentic Workflow for Explainable Lithology Classification DOI: XXXXXXX.XXXXXXX Conference: Make sure to enter the correct conference title from your rights confirmation email; June 03–05, 2018; Woodstock, NY ISBN: 978-1-4503-XXXX-X/2018/06 Jiahao Wang, Mingyue Cheng, Yitong Zhou, Qingyang Mao, Xiaoyu Tao, Qi Liu, Enhong Chen Abstract . Lithology classification aims to infer subsurface rock types from well-logging signals, supporting downstream applications like reservoir characterization. Despite substantial progress, most existing methods still treat lithology classification as a single-pass classification task. In contrast, practical experts incorporate geological principles, external knowledge, and tool-use capabilities to perform accurate classification. In this work, we propose GeoDecider, a coarse-to-fine agentic workflow that enables accurate and explainable lithology classification through training-free use of large language models (LLMs). GeoDecider reformulates lithology classification as an expert-like structured process and organizes it into a multi-stage workflow involving coarse-to-fine reasoning. Specifically, GeoDecider includes the following stages: (1) base classifier-guided coarse classification, which uses a pre-trained classifier to provide a rough reference for downstream tasks, thus reducing the overall cost of downstream reasoning, (2) tool-augmented reasoning, which utilizes several tools such as contextual analysis and neighbor retrieval to achieve finer and more precise classifications, (3) geological refinement, which post-processes the final results to enforce geological consistency. Experiments on four benchmarks show that GeoDecider outperforms representative baselines. Further analysis demonstrates that the proposed framework produces geologically interpretable predictions while achieving a better trade-off between classification performance and inference efficiency 1 1 1 https://github.com/realwangjiahao/GeoDecider . 1. Introduction Lithology classification, which infers subsurface rock types from well-logging data, plays a key role in subsurface analysis and petroleum exploration ( 7 ; 3 ) . It supports applications like reservoir characterization and geological modeling ( 15 ; 61 ; 11 ) . As large-scale well-log datasets become increasingly available, automated lithology classification is becoming crucial for efficient well-log interpretation. Over the years, numerous methods have been developed to solve this problem. Existing approaches can be broadly categorized into the following paradigms ( 49 ; 16 ; 52 ) . Traditional manual interpretation by domain experts yields lithology classifications that align well with geological laws and stratigraphic patterns, but it is labor-intensive and difficult to scale ( 5 ) . Data-driven methods, including machine learning and deep learning, provide efficient inference and strong overall performance ( 65 ; 2 ) . However, they often struggle with ambiguous lithological intervals and fail to integrate geological principles, such as stratigraphic continuity, leading to geologically implausible predictions ( 4 ; 1 ) . Large language models (LLMs) have shown promise in integrating domain knowledge and contextual reasoning for geological interpretation, but the computational cost makes large-scale application impractical ( 62 ; 50 ; 38 ) . Despite these advances, most existing methods still treat lithology classification as a single-pass task. In contrast, human experts incorporate external knowledge, tool-use capabilities, and geological principles to achieve accurate and geologically reasonable results. Most existing approaches, while efficient, often struggle with complex cases, such as facies transitions or noisy data, where deeper contextual reasoning is required. Treating all samples equally leads to inefficient resource allocation, either compromising geological consistency or incurring unnecessary computational overhead. To achieve accurate and interpretable lithology classification, it is crucial to utilize reasoning capabilities while managing the computational costs of LLMs. Relying solely on complex models can lead to increased resource consumption, making large-scale application inefficient. To address this, we propose a hybrid approach that integrates additional tools to support the classification process. By incorporating these tools, we can enhance the model’s reasoning without overwhelming the system, improving both precision and efficiency. Furthermore, we introduce a coarse-grained classification step to reduce the computational load early in the process. This multi-stage approach strikes a balance between performance and computational efficiency, optimizing the trade-off between accuracy and computational cost. In this work, we propose GeoDecider, a coarse-to-fine agentic reasoning framework that enables efficient and accurate lithology classification using training-free large language models. GeoDecider reformulates lithology classification as an expert-like process, organizing it into a multi-stage workflow involving coarse-to-fine reasoning and geological refinement. Specifically, GeoDecider introduces the following components: (1) Base classifier-guided coarse classification, which employs a pre-trained classifier for coarse-grained classification, effectively reducing the cost of downstream reasoning. (2) Tool-augmented LLM reasoning module, which utilizes various tools, such as contextual analysis and neighbor retrieval, to refine the classification and achieve more precise results. (3) Geological refinement, which post-processes the final predictions to ensure geological consistency, aligning them with geological principles and correcting any inconsistencies. By explicitly reasoning over geological context and constraints, GeoDecider enables more accurate and interpretable lithology classification, going beyond simple point-wise classification. We evaluate GeoDecider on multiple lithology classification benchmarks. Experimental results show that GeoDecider consistently outperforms other baseline models. Further analysis demonstrates that the adaptive decision mechanism suppresses geologically implausible isolated predictions and achieves a clear trade-off improvement between performance and efficiency, highlighting its practicality for real-world subsurface modeling systems ( 66 ; 53 ) . Our contributions are summarized as follows: • We propose a coarse-to-fine agentic reasoning framework for accurate and explainable lithology classification that aligns with geological principles. • We instantiate GeoDecider with three key components: a lightweight base classifier for coarse prediction, a tool-augmented LLM module for ambiguous cases, and a geological refinement module for enforcing stratigraphic consistency. • We demonstrate the effectiveness of GeoDecider through large-scale experiments, showing competitive performance. We also report the practical challenges in similar industrial settings. 2. Related Work 2.1. Lithology Classification Lithology classification is a key sequence-labeling task in subsurface characterization, crucial for reservoir evaluation, stratigraphic interpretation, and geological modeling ( 33 ; 46 ) . The task involves modeling long-range stratigraphic dependencies and accurately delineating formation boundaries, which is challenging due to its depth-wise sequential structure and lithology-specific semantics ( 43 ; 36 ) . Research has progressed from heuristic rule-based methods to supervised learning frameworks using models like GBDT and XGBoost ( 45 ; 44 ) . Recently, deep learning models, including CNN/RNN variants and attention-based encoders, have been employed to capture complex patterns and dependencies ( 40 ; 35 ) . Some methods enhance geological plausibility by incorporating stratigraphic priors, such as Markov-style consistency checks ( 30 ; 48 ) . However, many approaches still struggle with achieving global stratigraphic consistency and integrating multi-source evidence systematically ( 7 ; 25 ) , compromising interpretability and robustness, especially in complex geological settings ( 18 ; 42 ) . Figure 1. Example of multivariate well logs from various sensors for lithology classification. 123 2.2. Time Series Classification Time series classification has gained significant attention in both academia and industry ( 23 ; 37 ) . Early approaches, such as Dynamic Time Warping (DTW) and K-Nearest Neighbors (KNN) ( 27 ) , effectively handled temporal distortions. To improve classification accuracy, ensemble techniques like HIVE-COTE ( 32 ) were introduced, combining multiple feature transformations and classifiers through hierarchical voting for a more robust representation. With the rise of deep learning, models such as fully convolutional networks ( 58 ) and recurrent neural networks ( 22 ) began to surpass traditional methods by learning hierarchical features from raw data. More recent models like InceptionTime ( 24 ) have used deeper networks with multi-scale convolutions, enhancing their ability to capture complex patterns. Transformer-based models ( 69 ; 10 ) have further pushed the field by excelling at capturing long-range dependencies and global context. 2.3. LLM-based Reasoning Recent advancements in LLMs have demonstrated remarkable generalization in reasoning and decision-making ( 21 ) . A foundational capability is in-context learning (ICL), which enables models to adapt to unseen tasks via prompts without parameter updates ( 6 ; 63 ) . To elicit multi-step inference, prompting strategies like chain-of-thought (CoT) ( 60 ) decompose complex problems into intermediate steps, and subsequent work enhances robustness through aggregation (self-consistency ( 57 ) ) and decomposition (least-to-most prompting ( 68 ) ). Moving beyond static reasoning, a key paradigm shift views LLMs as autonomous agents operating in multi-step, goal-directed settings: unlike passive inference, such agentic systems maintain intermediate states, interleave reasoning with actions, and invoke tools to ground their outputs, as exemplified by ReAct ( 64 ) , Toolformer ( 47 ) , and WebGPT ( 39 ) . To handle increasingly complex tasks, these agents have evolved into broader cognitive architectures that extend tool use with structured planning ( 59 ; 17 ) , long-term memory ( 41 ) , and self-correction mechanisms such as Reflexion ( 51 ) , whose modular design enables refinement and adaptive execution and forms the basis for our framework ( 12 ; 13 ) . Figure 2. The illustration of GeoDecider, a coarse-to-fine framework for lithology classification. Overall framework. 3. Preliminaries 3.1. Well Log Data for Lithology Analysis A well log is a depth-indexed multivariate sequence that records continuous petrophysical measurements along a borehole, providing indirect evidence of subsurface lithology. In this study, we use the logging curves shown in Figure 1, including correlation logs (GR, SP, CAL), a resistivity log (RT), and porosity-related logs (AC, CNL, DEN), which capture complementary geological properties such as shale content, permeability, fluid saturation, and pore structure. These logs are sampled at fine depth intervals to form a multichannel input sequence. As illustrated in Figure 1 , depth is shown on the vertical axis, with logging curves on the left and expert-annotated lithology labels (e.g., Shale, Tight Sand, Porous Sand) on the right. 3.2. Problem Definition Given a well log sequence \mathbf{X}=[\mathbf{x}_{1},\mathbf{x}_{2},\cdots,\mathbf{x}_{L}] of length L , where each \mathbf{x}_{t}\in\mathbb{R}^{M} denotes the multi-channel logging measurements at depth t . We assume access to a pre-trained lightweight classifier \mathcal{M}_{base} , which provides an initial sequence of probability distributions \mathbf{P}=[\mathbf{p}_{1},\mathbf{p}_{2},\cdots,\mathbf{p}_{L}] , where \mathbf{p}_{t}=\mathcal{M}_{base}(\mathbf{x}_{t}) denotes the confidence scores over the candidate lithology classes \mathcal{C} . Building upon these initial predictions, our problem is defined as constructing a reasoning-based inference framework \mathcal{F} . This framework leverages both the raw contextual series \mathbf{X} and the base model’s suggestions \mathbf{P} as joint inputs to generate the optimal lithology sequence \mathbf{Y}=[y_{1},y_{2},\cdots,y_{L}] . The objective is to maximize the consistency between the statistical evidence provided by \mathbf{P} and the physical trends implied by \mathbf{X} . 4. The Proposed GeoDecider In this section, we introduce GeoDecider, a confidence-aware framework for context-aware lithology classification. GeoDecider integrates lightweight prediction with selective reasoning and geology-inspired refinement to enable efficient and robust inference. We first provide an overview of the framework and then describe each component in detail. 4.1. Framework Overview As illustrated in Figure 2 , the proposed framework follows a confidence-aware inference pipeline that integrates lightweight prediction, selective reasoning, and geology-inspired refinement. A base classifier first produces point-wise lithology predictions with confidence estimates, based on which high-confidence samples are directly accepted while low-confidence samples are routed to a reasoning module. For routed samples, raw numerical logs are augmented into a structured Evidence Profile via a tool-enhanced perception module, incorporating domain knowledge, contextual trend representations, and empirical exemplars. Multiple reasoning paths with complementary inductive biases then infer candidate labels, whose outputs are aggregated through collaborative decision-making, followed by a geological refinement step that enforces stratigraphic consistency along the depth dimension. 4.2. Base Classifier-Guided Coarse Classification Lithology identification in real-world well logging exhibits strong class imbalance and heterogeneous semantic complexity. While many lithologies show distinctive logging patterns and can be reliably recognized by lightweight classifiers, a small subset presents ambiguous or overlapping signatures that require broader contextual reasoning. Motivated by this observation, we adopt a confidence-aware two-stage inference pipeline, where high-confidence predictions are directly accepted and low-confidence samples are adaptively routed to a high-cost reasoning module. This design achieves efficient inference on easy cases while preserving accuracy on semantically challenging lithologies. 4.2.1. Inference Routing Mechanism We first train a lightweight base classifier on the training dataset, and then select the best checkpoint based on the classification performance on the validation dataset. This base model is designed to efficiently handle lithology classes with distinctive logging patterns, while providing calibrated confidence estimates on unseen samples. Given an input interval \mathbf{x} , the base classifier outputs a class probability vector \mathbf{P}_{\text{base}}(\mathbf{x})\in[0,1]^{K} . We quantify the prediction confidence using the maximum class probability. Then we define the routing decision function as follows based on a confidence threshold \tau\in[0,1] : (1) Q_{\text{conf}}(\mathbf{x})=\max_{k}\mathbf{P}_{\text{base}}(\mathbf{x})_{k}, (2) D(\mathbf{x})=\begin{cases}\text{Base},&Q_{\text{conf}}(\mathbf{x})\geq\tau,\\ \text{Reason},&Q_{\text{conf}}(\mathbf{x})<\tau.\end{cases} where D() denotes the decision-making routing function, if D(\mathbf{x})=\text{Base} , the prediction of the base model is directly accepted; otherwise, \mathbf{x} is routed to the reasoning module for further inference. This mechanism enables fine-grained, sample-level allocation of computational resources based on model confidence. 4.2.2. Threshold Calibration via Validation Trade-offs The routing threshold \tau governs a trade-off between computational efficiency and predictive reliability. Rather than fixing \tau heuristically, we determine it in a data-driven manner using a held-out validation set \mathcal{D}_{\text{val}} . For each candidate threshold \tau , we estimate the proportion of samples whose predictions are accepted by the base model, (3) Cov(\tau)=\Pr_{\mathbf{x}\sim\mathcal{D}_{\text{val}}}\left[Q_{\text{conf}}(\mathbf{x})\geq\tau\right], We also compute the corresponding prediction accuracy on this subset, denoted by Acc_{\text{base}}(\tau) . As \tau varies, these quantities jointly characterize the efficiency–reliability trade-off of the routing mechanism. We select the operating threshold \tau^{*} at a regime where coverage is maximized while the base-model accuracy remains stable, thereby avoiding aggressive reliance on low-confidence predictions. The calibrated threshold \tau^{*} is fixed and used during inference. 4.3. Tool-Augmented Reasoning with LLMs To enable effective LLM-based reasoning over numerical well-log data, we augment the input with structured evidence derived from multiple specialized tools. Given raw logging signals and base model predictions, these tools extract complementary evidence capturing local contextual patterns, geological trends, and representative historical exemplars. The resulting evidence profile is provided to the LLM as structured input, allowing it to reason over both statistical cues and geology-informed context, and to produce refined lithology decisions in ambiguous cases. 4.3.1. Knowledge Base Tool The knowledge base provides structured domain priors that are difficult to infer from raw numerical signals alone. It contains three types of expert-curated information: (1) feature descriptions explaining the physical meaning of logging measurements, (2) label descriptions characterizing lithology classes and their typical patterns, and (3) expert-level guidelines summarizing common decision heuristics and boundary cues. By grounding numerical observations in explicit geological semantics, the knowledge base acts as a semantic anchor for downstream reasoning. When incorporated into the evidence profile, it helps interpret numerical variations in a geology-aware manner, reducing ambiguity in complex cases and improving the robustness and interpretability of the final predictions. 4.3.2. Contextual Trend Analysis Tool Lithology identification relies on the continuity and evolution of logging signals across depth, rather than isolated point-wise measurements. To capture such stratigraphic context, we analyze each target segment together with its surrounding intervals. Formally, given a well-log sequence \mathbf{X}=[\mathbf{x}_{1},\mathbf{x}_{2},\cdots,\mathbf{x}_{L}] , we consider a target window \mathbf{X}_{[s:e]}=[\mathbf{x}_{s},\cdots,\mathbf{x}_{e}] and construct an extended contextual segment: (4) \mathbf{X}^{\mathrm{ctx}}_{[s:e]}=\mathbf{X}_{[s-\Delta:s-1]}\;\cup\;\mathbf{X}_{[s:e]}\;\cup\;\mathbf{X}_{[e+1:e+\Delta]}, where \Delta controls the contextual depth range. A trend analysis operator \mathcal{T}(\cdot) is applied to extract a structured representation \mathbf{z}_{\mathrm{trend}}^{[s:e]}=\mathcal{T}(\mathbf{X}^{\mathrm{ctx}}_{[s:e]}) , which summarizes the evolution of logging signals across the target window and its context. The resulting representation encodes window-level trend patterns such as stable regimes, gradual transitions, and boundary-induced variations, providing stratigraphic evidence for downstream reasoning-based lithology inference. 4.3.3. Neighbor Retrieval Tool To complement domain knowledge and contextual trend cues, we incorporate a Neighbor Retrieval tool that provides empirical evidence from historical observations. In lithology identification, logging signatures of different classes may partially overlap, making rule-based or trend-based reasoning alone insufficient. Retrieving similar past instances offers concrete reference cases for resolving such ambiguities. Formally, for each depth point t with logging measurement \mathbf{x}_{t} , we retrieve a set of k nearest neighbors from a reference dataset, (5) \mathcal{N}_{t}=\{(\mathbf{x}_{t_{1}},y_{t_{1}}),\dots,(\mathbf{x}_{t_{k}},y_{t_{k}})\}, where similarity is computed in the feature space and y_{t_{i}} denotes the corresponding lithology labels. These retrieved neighbors are incorporated into the evidence profile as empirical exemplars and supplied to the reasoning module, enabling case-based comparison. 4.3.4. Historical Classification Tool Lithological interpretations along a well log exhibit strong sequential coherence, and predictions from nearby depth intervals provide useful contextual cues. To exploit this property, we introduce a historical classification tool incorporating predicted lithology labels from adjacent upper intervals. Given a target depth window \mathbf{X}_{[s:e]} , we retrieve the predicted labels from the immediately preceding window: (6) \mathcal{H}_{[s:e]}=\{\hat{y}_{s-1},\hat{y}_{s-2},\dots,\hat{y}_{s-h}\}, where h controls the historical depth range. These predicted labels are treated as soft contextual signals and incorporated into the evidence profile, providing continuity-aware guidance for reasoning. By referencing prior predictions from neighboring upper intervals, this tool helps stabilize classifications within the target window and reduces spurious label fluctuations without introducing hard stratigraphic constraints. 4.3.5. Multi-Perspective Reasoning To mitigate the bias and potential hallucination of a single reasoning trajectory, we adopt a multi-persona reasoning ensemble that decomposes the reasoning process into multiple complementary perspectives. Inspired by modular expert systems in complex industrial workflows, we instantiate three specialized reasoning personas, each emphasizing a distinct dimension of the constructed Evidence Profile. • Data-Centric Analyst : focuses on statistical evidence, primarily the base model confidence scores \mathbf{P} and empirical exemplars retrieved by the Neighbor Retrieval module. • Context-Aware Stratigrapher : prioritizes contextual consistency by reasoning over window-level trend representations derived from the trend analysis module, ensuring alignment with stratigraphic continuity. • Rule-Based Physicist : enforces domain constraints by adhering to expert feature descriptions and petrophysical rules encoded in the knowledge base, guaranteeing physical plausibility. Each persona performs independent reasoning conditioned on the same Evidence Profile but guided by its designated inductive bias, resulting in a candidate lithology prediction. 4.4. Geological Refinement The upstream stage produces multiple candidate predictions for each target depth window based on complementary evidence sources. These intermediate results capture local statistical cues, contextual trends, and empirical references, but may still lead to inconsistent interpretations when considered along the depth dimension. We introduce a Geological Refinement Module that leverages an LLM to jointly reason over these candidate results under geological constraints. Specifically, for a target depth window \mathbf{X}_{[s:e]} , the LLM receives the raw logging measurements, the upstream prediction results \{\mathbf{q}^{(m)}_{[s:e]}\}_{m=1}^{M} , and explicit geology-inspired guidelines as input, and produces the refined lithology prediction (7) \hat{y}_{[s:e]}=\mathcal{R}_{\mathrm{LLM}}\!\left(\mathbf{X}_{[s:e]},\ \{\mathbf{q}^{(m)}_{[s:e]}\}_{m=1}^{M},\ \mathcal{G}\right). where \mathcal{R}_{\mathrm{LLM}}(\cdot) denotes the reasoning process of the LLM and \mathcal{G} represents geological principles such as stratigraphic continuity and plausible transition behavior. By reasoning over multi-source predictions in conjunction with geological constraints, the refinement module resolves conflicting local evidence and produces lithology assignments that are consistent with stratigraphic structure and geological expectations. 5. Experiments In this section, we evaluate GeoDecider on a variety of datasets, comparing it with several baseline methods. We then conduct further investigations to assess the effectiveness of each module. Finally, we analyze the practical challenges in real-world industrial settings and lessons learned under privacy and compliance constraints. 5.1. Experimental Settings 5.1.1. Datasets We evaluate our method on four public well-log datasets from established repositories: (1) SEAM : the SEG wiki open data catalog for reproducible geoscience benchmarking, (2) Facies : the Kaggle dataset containing facies logs from nine wells in the Council Grove gas reservoir (Kansas), (3) Force : the Kaggle well-log dataset for lithology prediction, associated with the FORCE 2020 lithology prediction context, (4) Geolink : the GEOLINK-S2 well-log dataset with analysis notebooks and preprocessing code. Details can be found in Table 1 and appendix A and B . 5.1.2. Baselines To conduct a comprehensive and fair comparison, we compare against several baselines grouped into four categories: Machine learning-based methods: XGBoost ( 8 ) , nn-DTW ( 27 ) , GBDT ( 28 ) . Deep learning-based methods: LSTMFCN ( 26 ) , MLP ( 54 ) , MiniRocket ( 14 ) , InceptionTime ( 24 ) . LLM-based approaches: InstructTime ( 9 ) , TableTime ( 56 ) , GPT4TS ( 70 ) . Time-series foundation models : UniTS ( 19 ) and MOMENT ( 20 ) . For a detailed introduction to these baselines, please see appendix C . 5.1.3. Evaluation Metrics To evaluate the lithology classification performance, here we select three widely used metrics ( 67 ; 55 ) , i.e., Precision, Recall, and F1 measure ( 34 ; 31 ) . Considering our task is a multi-class classification problem, we use the weighted average scores to evaluate the performances of our proposed methods and all baselines. Specifically, we weight the metrics of each class by the number of samples from that class. 5.1.4. Implementation Details In this work, we adopt DeepSeek-R1-0528 as the base LLM for its open-source availability and ability to expose complete reasoning traces. Under default settings, all experiments are conducted three times, and the final results are reported using majority voting to ensure stability, with inference performed via the official API platform using temperature=0.6, top-p=0.7, and max-tokens=8,192. The deep learning baselines and the base classifiers are trained using the Adam optimizer ( 29 ) in PyTorch on a single NVIDIA GeForce RTX 4090D GPU. Table 1. Statistics of each dataset in the experiments. Statistics SEAM Facies Force Geolink #of total wells 5 7 11 128 #of total samples 7,092 3,164 52,766 580,205 #of total well logs 18 7 11 8 #of total labels 7 9 5 11 #of sampling interval (m) 10 0.5 0.15 0.125 5.2. Classification Results Analysis Table 2. Classification performance comparison of GeoDecider and other baseline models across four datasets. The best results are highlighted in bold, while the underlined results indicate the second-best performance. Method SEAM Facies Force Geolink Precision Recall F1 Precision Recall F1 Precision Recall F1 Precision Recall F1 XGBoost 0.7579 0.7707 0.7355 0.4657 0.4229 0.4357 0.4691 0.4183 0.4573 0.4106 0.4115 0.4347 nn-DTW 0.7656 0.3694 0.4396 0.3649 0.3407 0.3589 0.3845 0.3412 0.3616 0.3789 0.3567 0.3675 GBDT 0.7468 0.7268 0.7626 0.4744 0.4233 0.4440 0.4204 0.4126 0.4445 0.4116 0.4072 0.4149 LSTMFCN 0.7658 0.7353 0.7694 0.3897 0.3579 0.3869 0.4155 0.3466 0.4046 0.4056 0.3912 0.3983 MLP 0.7776 0.7313 0.7647 0.4460 0.3891 0.4201 0.4454 0.4592 0.5068 0.4512 0.4489 0.4501 MiniRocket 0.7501 0.7302 0.7667 0.4489 0.3859 0.4129 0.4856 0.4712 0.4783 0.4289 0.4215 0.4252 InceptionTime 0.7747 0.7359 0.7667 0.3684 0.3447 0.3817 0.4512 0.4389 0.4450 0.4156 0.4012 0.4083 InstructTime 0.7752 0.7348 0.7659 0.4952 0.3455 0.3821 0.5125 0.4376 0.4448 0.4145 0.4021 0.4082 TableTime 0.6521 0.5844 0.6288 0.3588 0.3421 0.3655 0.3956 0.3688 0.3912 0.3822 0.3715 0.3768 GPT4TS 0.7412 0.7612 0.7489 0.4356 0.3789 0.4412 0.4688 0.4615 0.4651 0.4188 0.4156 0.4172 UniTS 0.7388 0.7156 0.7745 0.4125 0.3688 0.3956 0.4412 0.4255 0.4332 0.4122 0.4056 0.4492 MOMENT 0.7256 0.7092 0.7315 0.4055 0.3612 0.3887 0.4356 0.4988 0.4270 0.4011 0.4588 0.3961 GeoDecider 0.7765 0.7820 0.7803 0.5012 0.4052 0.4481 0.5312 0.5198 0.5254 0.4425 0.4750 0.4582 Table 2 summarizes the classification performance of GeoDecider against a broad set of baseline methods across four datasets. Although GeoDecider is explicitly designed to refine classification results from strong base classifiers selected among the best-performing baselines, it consistently delivers improvements in Recall and F1-score. In particular, on datasets with higher lithological ambiguity, GeoDecider achieves gains of up to 3–5% in F1-score and 2–6% in Recall compared to its corresponding base models. These results indicate that the proposed agentic workflow is effective at identifying and correcting hard failure cases of discriminative models, rather than simply reinforcing their original predictions. Moreover, GeoDecider consistently outperforms recent LLM-based time-series and foundation models, including TableTime, InstructTime, GPT4TS, MOMENT, and UniTS. While these methods rely on end-to-end large-model inference for all samples, GeoDecider achieves several-percent improvements in both Recall and F1-score by selectively invoking LLM-based reasoning only for ambiguous cases. This advantage is more evident in datasets characterized by subtle lithological transitions and inter-class similarity, suggesting that confidence-aware agentic collaboration provides a more effective and robust alternative to naively applying LLMs to geological lithology classification. 5.3. Ablation Studies Table 3. Comprehensive ablation on the impact of the toolkit and geological refinement module, evaluated by F1 score. Variant SEAM Facies Force Geolink Full Model 0.7833 0.4481 0.5254 0.4582 w/o Knowledge Base 0.7745 0.4405 0.5132 0.4534 w/o Contextual Trend Analysis 0.7702 0.4362 0.5075 0.4505 w/o Neighbor Retrieval 0.7791 0.4452 0.5198 0.4561 w/o Historical Auxiliary 0.7765 0.4427 0.5201 0.4545 w/o Geological Refinement 0.7742 0.4402 0.5135 0.4536 5.3.1. Effectiveness of Knowledge Base As shown in Table 3 , the knowledge base tool provides essential domain-specific prior geological information for the reasoning process. When the knowledge base tool is removed, the F1-score on the SEAM dataset drops from 0.7833 to 0.7745, and on the Force dataset, it decreases from 0.5254 to 0.5132. This performance degradation indicates that the LLM-based agent relies on structured domain knowledge to resolve ambiguities in well-log responses, especially when the signal-to-noise ratio is low in complex reservoir regions. 5.3.2. Necessity of Contextual Trend Analysis The contextual trend analysis module is the most critical component in our toolkit, as its removal leads to the largest performance drop among all ablations. On the Facies dataset, the F1-score decreases to 0.4362, only slightly above the baseline, indicating that point-wise predictions alone fail to capture complex lithological variations. From a geological perspective, lithology interpretation is inherently context-dependent, relying on depth-wise trends and stratigraphic continuity. By modeling vertical continuity in well-log sequences, contextual trend analysis aligns the agent’s reasoning with geological principles and plays a central role in accurate facies classification. 5.3.3. Analysis of Neighbor Retrieval The neighbor retrieval module complements the system by providing reference geological samples with similar semantics. While its impact is smaller than other modules, it consistently improves performance across datasets. For example, on Geolink, removing this module decreases the F1-score from 0.4582 to 0.4561. This suggests that while general geological knowledge is effective, neighboring cases provide valuable fine-grained cues for refining lithology interpretation. 5.3.4. Analysis of Historical Prediction Auxiliary To enhance temporal consistency, we incorporate historical predictions during inference, introducing dependencies across adjacent depth intervals. Unlike the base model, which uses a 16-depth sliding window, the history-aware refinement uses a shorter window of 4 and autoregressive inference based on previous outputs. While this reduces parallelism, the overhead is minimal due to the smaller window and adaptive routing, resulting in consistent predictions. 5.3.5. Ablation of Geological Refinement The geological refinement module ensures physical plausibility and geological consistency, with its impact comparable to the knowledge base. Removing it causes a 0.0119 drop in F1-score on the Force dataset. By validating predictions against geological constraints, the refinement step suppresses implausible outcomes. Ablation results show that geological refinement effectively mitigates catastrophic errors, improving reliability and interpretability in lithology classification. Figure 3. Performance comparison between lightweight base models and their refined counterparts, evaluated by F1 score. 123 5.4. Generalization Across Base Classifiers We evaluate the effectiveness of the proposed agent-based framework by examining its ability to refine predictions produced by several lightweight base models. In this setting, a collection of representative lightweight classifiers is first applied to perform point-wise lithology classification, serving as the initial predictors. The proposed framework is then applied on top of these base models to selectively refine their predictions through confidence-aware routing, tool-enhanced perception, multi-perspective reasoning, and geological refinement. Figure 3 reports the average F1 scores on three well-log datasets. Across all datasets, incorporating the agent-based framework consistently improves the performance of base classifiers, yielding relative gains of up to 15% on Force and 8–9% on Facies and Geolink. These demonstrate that the proposed framework effectively corrects low-confidence and ambiguous predictions produced by lightweight classifiers, while preserving their efficiency on easy samples, validating the practical value of agent-based refinement for real-world lithology identification. 5.5. Effectiveness of Inference Routing We evaluate adaptive routing by comparing the full model with an ablated variant without routing. As shown in Figure 4 , enabling adaptive routing consistently improves F1 across all datasets while reducing the number of test samples processed during inference. The full model achieves higher F1 scores on SEAM, Facies, Force, and Geolink despite operating on a smaller subset of samples, indicating that routing selectively retains informative cases for further processing. Moreover, adaptive routing improves both performance and efficiency. While F1 gains range from moderate to substantial, the number of processed samples is substantially reduced on SEAM, Facies, and Force, and remains lower even on the large-scale Geolink dataset. These results show that adaptive routing effectively allocates computation to challenging samples while handling simpler cases with lightweight inference, enhancing both predictive performance and inference efficiency. Figure 4. The improvement of F1 and the number of processing test samples after adaptive routing. 123 5.6. In-Depth Analysis of Geological Refinement To further assess geological refinement, we analyze the Flying Point Ratio, which measures the proportion of isolated and geologically implausible lithology predictions along depth. Flying points violate geological continuity and lead to fragmented stratigraphic patterns. As shown in Table 4 , introducing geological refinement consistently reduces the flying point ratio across all benchmarks, achieving substantial relative reductions over the base classifier. This indicates that refinement effectively suppresses spurious point-wise predictions and produces smoother, more geologically coherent lithology sequences. We further compare the full model with an ablated variant without geological refinement. Removing refinement results in a clear increase in the flying point ratio, demonstrating that the improvement cannot be attributed solely to stronger base representations. Instead, geological refinement corrects locally inconsistent predictions by leveraging contextual and structural constraints of subsurface formations, thereby enhancing the geological plausibility and interpretability of the outputs. Figure 5. Performance comparison of single- and multi-perspective reasoning 123 Table 4. The ratio of flying point of base classifier, GeoDecider(w/ and w/o refinement). Variant SEAM Facies Force Geolink Base Classifier 0.0148 0.1760 0.0873 0.1240 GeoDecider(w/o Ref) 0.0141 0.1596 0.0792 0.1196 GeoDecider(w/ Ref) 0.0135 0.1541 0.0746 0.1137 5.7. Analysis of Multi-Perspective Reasoning This experiment evaluates the effectiveness of multi-perspective reasoning by comparing GeoDecider with three representative single-perspective variants, including context-based, data-based, and rule-based reasoning. As shown in Figure 5, GeoDecider consistently achieves the best F1 performance across all evaluated datasets. The performance gains are particularly pronounced on the Force dataset, where integrating multiple reasoning perspectives yields a clear advantage over any individual strategy. This indicates that different perspectives capture complementary information: context-based reasoning emphasizes stratigraphic continuity, data-based reasoning focuses on local measurement patterns, while rule-based reasoning enforces domain constraints. By jointly leveraging these heterogeneous signals, GeoDecider produces more robust and accurate lithology predictions than models relying on a single reasoning perspective. The results demonstrate that multi-perspective reasoning is essential for effectively handling the complexity and variability of real-world geological formations. Figure 6. A case of how GeoDecider performs lithology classification via pre-classified and tool-augmented reasoning. 123 5.8. Hyperparameter Sensitivity Analysis 5.8.1. Base LLM Comparison We evaluate three LLM backbones: DeepSeek-R1, GPT-5, and Gemini 3 Pro within our framework. As shown in Table 5 , all backbones achieve comparable precision, recall, and F1 on SEAM and Facies, with only minor differences. This indicates that performance gains mainly arise from the system-level design rather than the specific LLM backbone, demonstrating that the proposed framework is largely backbone-agnostic and flexible for deployment under different constraints. 5.8.2. Effect of Temperature on Model Performance Figure 7 shows the sensitivity of GeoDecider to the temperature parameter. As the temperature increases, the F1 score improves on all datasets, peaking at a moderate temperature. This indicates that an appropriate temperature balances exploration and determinism, enhancing multi-perspective evidence integration. However, further increases lead to performance degradation, suggesting that overly stochastic reasoning reduces stability and harms prediction quality. Overall, GeoDecider exhibits sensitivity to temperature, with an optimal range for robust performance. Table 5. Performance comparison with different base LLMs. Base LLM SEAM Facies Precision Recall F1 Precision Recall F1 DeepSeek-R1 0.7950 0.7720 0.7833 0.5012 0.4052 0.4481 GPT-5 0.7825 0.7610 0.7716 0.4885 0.3895 0.4334 Gemini 3 Pro 0.7941 0.7745 0.7841 0.5025 0.4035 0.4476 5.9. Case Study Figure 6 presents a case study illustrating GeoDecider’s end-to-end decision process for lithology classification. The base classifier provides point-wise pre-classification based on log features. For uncertain samples, the agent activates tool-augmented reasoning to incorporate feature descriptions, trend analysis, and neighboring reference cases. These signals are examined from multiple perspectives, which may lead to conflicting conclusions. The refinement module then integrates geological patterns and stratigraphic continuity to resolve inconsistencies and produce a geologically plausible final prediction. This case demonstrates how GeoDecider combines diverse evidence to generate coherent lithology interpretations. 5.10. Challenges and Lessons From Deployment GeoDecider was developed in close collaboration with a large national oil company in China using proprietary well-log data. However, strict internal data governance and confidentiality policies prevented the disclosure of raw logs or detailed performance metrics outside the company. As a result, our experiments were conducted on publicly available benchmark datasets, and we are unable to report production-level performance indicators. This experience highlights key lessons for deploying complex, data-driven systems in highly regulated environments. The deployment faced challenges due to privacy and compliance requirements. The multi-stage approval process for data access and model evaluation, involving legal and security teams, impacted the project timeline. Practitioners must plan for long approval cycles and integrate privacy and compliance into the deployment process. Additionally, evaluation protocols required de-identified, aggregated data, with external reporting needing further anonymization. Robust offline evaluation on public datasets and internal validation were crucial for ensuring progress within regulatory constraints. Another challenge was designing the system under infrastructure and privacy constraints. Given data locality requirements, we prioritized lightweight models and tool-augmented reasoning to ensure deployability within secure infrastructures. Additionally, prompt design required significant domain expert involvement to align with geological principles and industry standards. This experience emphasizes the importance of domain expertise and privacy-aware practices in real-world system deployment. Figure 7. Sensitivity analysis of GeoDecider to the temperature parameter of LLMs, evaluated by F1 score. 123 6. Conclusion In this work, we propose GeoDecider, an agentic reasoning workflow for explainable and geologically reasonable lithology classification that involves coarse-to-fine reasoning and geological refinement. By combining data-driven classification with contextual trend analysis, rule-based geological constraints, and neighbor retrieval, GeoDecider produces more geologically coherent lithology sequences while reducing unnecessary computation through selective reasoning. Experiments across multiple well-log benchmarks demonstrate the effectiveness of GeoDecider. Case studies further show that it consistently improves classification performance, enhances stratigraphic continuity, and produces stable, interpretable predictions. These results highlight the value of integrating domain knowledge and adaptive reasoning for reliable geoscience analysis. Table 6. Detailed specification of input features and target classes for the four benchmark datasets. The input features represent the exact channels used by the GeoDecider. Dataset # Cls Input Features (Curves) Target SEAM 7 9 Channels: Depth, Bed Dip ( X,Y ), Total Porosity, Horizontal Resistivity, TTI Dip ( X,Y ), P-wave Velocity ( V_{p} ), S-wave Velocity ( V_{s} ) Layers Facies 9 7 Channels: Depth, Gamma Ray (GR), Deep Induction Resistivity ( \log_{10} ), Neutron-Density Porosity Diff ( \Delta\phi ), Neutron-Density Porosity (PHIND), Photoelectric Effect (PE), Nonmarine-Marine Indicator Lithofacies FORCE 5 9 Channels: Depth, Caliper (CALI), Sonic Slowness (DTC), Gamma Ray (GR), Neutron Porosity (NPHI), Bulk Density (RHOB), Coordinates ( X,Y,Z ) Lithology GeoLink 11 9 Channels: Depth, Caliper (CALI), Neutron Porosity (NPHI), Bulk Density (RHOB), Gamma Ray (GR), Sonic Slowness (DTC), Resistivity (Deep, Shallow, Medium) Lithology Appendix A Dataset Specifications and Input Features To facilitate reproducibility and clarify the inputs used by the GeoDecider framework, we provide the detailed configuration for each benchmark dataset. Table 6 summarizes the specific geophysical logs and features selected as inputs for the model, along with the target lithological classes. For the Facies dataset, the 9 classes correspond to specific depositional environments ranging from Nonmarine sandstone to Phylloid-algal bafflestone . The FORCE dataset targets 5 primary lithologies: Shale, Sandstone, Limestone, Marl, and Sandstone/Shale . GeoLink includes 11 granular classes, distinguishing between variations such as Silty Sand , Cross Bedded Sand , and Argillaceous Limestone . Finally, SEAM classifies geological ages and salt bodies, including Mother Salt , Cretaceous , and Lower Miocene layers. Appendix B Datasets Description • SEAM 2 2 2 https://wiki.seg.org/wiki/Open_data#Well_logs : the SEG Wiki Open Data "Well logs" catalog as an entry point to publicly released well-log resources for reproducible geoscience benchmarking; • Facies 3 3 3 https://www.kaggle.com/datasets/imeintanis/well-log-facies-dataset : the Kaggle Well Log Facies Dataset, which contains facies logs from nine wells in the Council Grove gas reservoir (Kansas) with facies labels derived from core observations; • Force 4 4 4 https://www.kaggle.com/datasets/faresazzam/well-logs-dataset-for-machine-learning : the Kaggle Well logs dataset for machine learning, released for lithology (rock-type) prediction from multiple geophysical well-log measurements and associated with the FORCE 2020 lithology prediction context; • Geolink 5 5 5 https://github.com/LukasMosser/geolink_dataset?tab=readme-ov-file : the GEOLINK-S2 well-log dataset accessed via the geolink_dataset repository, which provides analysis notebooks and preprocessing code for the GEOLINK-S2 data. Appendix C Baselines • XGBoost : XGBoost is a tree-based gradient boosting method that builds an ensemble of decision trees to optimize a differentiable loss function. It is widely used as a strong traditional machine learning baseline due to its robustness and efficiency on tabular and time-series features. • nn-DTW : nn-DTW combines nearest-neighbor classification with Dynamic Time Warping distance to handle temporal misalignments between time series. It serves as a classical non-parametric baseline that focuses on shape similarity rather than learned representations. • GBDT : Gradient Boosting Decision Trees (GBDT) iteratively fits shallow decision trees to the residuals of previous trees to minimize prediction error. Compared with XGBoost, it provides a simpler yet competitive boosting baseline for sequence-level classification on hand-crafted features. • LSTMFCN : LSTMFCN integrates a Long Short-Term Memory (LSTM) branch with a Fully Convolutional Network (FCN) branch to jointly capture temporal dependencies and local patterns in time series. This architecture has become a common deep learning baseline for multivariate time-series classification tasks. • MLP : The Multilayer Perceptron (MLP) treats each input segment as a fixed-length feature vector and performs classification through stacked fully-connected layers with nonlinear activations. Despite its simplicity and lack of explicit temporal modeling, it offers a strong baseline when features are informative. • MiniRocket : MiniRocket applies a fixed set of convolutional kernels to time series and uses simple summary statistics as features, followed by a linear classifier. It is designed to provide very fast and competitive time-series classification with minimal training overhead. • InceptionTime : InceptionTime is a deep convolutional architecture for time-series classification that uses Inception-style multi-scale convolutional blocks. By capturing patterns at different temporal resolutions, it achieves strong accuracy on a wide range of benchmark datasets. • InstructTime : InstructTime reformulates time-series classification as an instruction-following task for multimodal language models. It leverages natural-language descriptions of tasks and features to enable flexible, training-free or lightly fine-tuned time-series understanding. • TableTime : TableTime converts time-series segments into tabular formats and uses large language models’ table-understanding capabilities for classification. This approach treats time series as structured tables, enabling training-free inference with generic LLMs. • GPT4TS : GPT4TS is a time-series analysis framework that adapts pretrained language-model-style architectures to forecasting and classification. It views time series as token sequences and leverages generative pretraining for downstream time-series tasks. • UniTS : UniTS is a unified multi-task time-series model designed to support various tasks such as classification, forecasting, and imputation within a single backbone. It serves as a strong foundation model baseline for evaluating specialized methods. • MOMENT : MOMENT is an open family of time-series foundation models pretrained on large-scale heterogeneous time-series corpora. It provides general-purpose representations that can be adapted to downstream classification tasks with minimal task-specific tuning.