Soil rare earth enrichment potential prediction method and system based on meta learning and computer readable storage medium
By proposing a soil rare earth enrichment potential prediction method based on meta-learning and spatial attention mechanisms, the problems of data sparsity, spatial modeling limitations, and insufficient model interpretability are solved. This method achieves efficient and accurate prediction of soil rare earth enrichment potential and quantification of uncertainty, supporting geological exploration decision-making.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- RES CENT FOR ECO ENVIRONMENTAL SCI THE CHINESE ACAD OF SCI
- Filing Date
- 2026-02-14
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies for predicting rare earth enrichment potential in soil suffer from problems such as data sparsity and small sample size, limitations in spatial dependence modeling, insufficient model interpretability, and inadequate expression of prediction uncertainty, making it difficult to provide efficient and accurate prediction and decision support in rare earth exploration.
A three-stage prediction method based on meta-learning and spatial attention mechanism is adopted. By acquiring multi-dimensional data and standardizing it with Z-score, learning tasks are randomly constructed. Geochemical processes are embedded in the encoder and multi-head attention decoder. The rare earth adsorption mechanism is explicitly modeled by combining the Freundlich isotherm adsorption equation, realizing small sample learning and dynamic spatial modeling, and quantifying uncertainty.
It achieves high-precision prediction of soil rare earth enrichment potential under small sample conditions, provides model interpretability and uncertainty quantification, and supports efficient exploration decision-making in geological exploration.
Smart Images

Figure CN122091010A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of geological exploration technology, and more specifically to a method, system, and computer-readable storage medium for predicting the rare earth enrichment potential of soil based on meta-learning. Background Technology
[0002] Rare earth elements (REEs) are critical strategic resources supporting the development of modern high-tech industries (such as new energy and defense), and their stable supply is essential for national economic and defense security. Ion-adsorption type rare earth deposits are the world's most important sources of medium and heavy rare earth elements, mainly found in weathering crusts and soil profiles. my country's weathering crust type (also known as "ion-adsorption type") rare earth deposits hold an important position. During weathering and leaching, rare earth elements are adsorbed and enriched by clay minerals, iron and manganese (hydrogen) oxides, etc., in the form of ion exchange. Their migration and enrichment process is closely related to factors such as weathering environment, pH, and organic matter. Therefore, efficiently and accurately delineating rare earth enrichment areas in soil is the primary task of rare earth resource exploration.
[0003] In current exploration practices, traditional methods such as geological mapping, geophysical and geochemical profiling, field verification, and drilling are still commonly used to obtain geochemical anomalies and mineralization clues. For complex scenarios such as covered / hidden areas, domestic and international researchers have also developed methods and technologies such as geoelectrochemistry, elemental activity state analysis, geo-atmosphere analysis, soil fine particle separation, soil thermomagnetic composition analysis, and comprehensive gas measurement to interpret weak anomalies and element migration mechanisms and support mineral exploration. These technical approaches primarily rely on field sampling and experimental analysis, emphasizing the formation mechanism and verification of anomalies. Regarding rare earth target area delineation, existing patents disclose methods for rapidly delineating weathered crust-type medium- and heavy rare earth exploration target areas by collecting and analyzing information such as the rare earth element content and distribution patterns of geological bodies and the characteristics of rare earth carrier accessory minerals.
[0004] In recent years, numerous patents and publications have disclosed the use of existing multi-source geoscientific data (including geology, remote sensing, geochemistry, geophysics, etc.) to construct predictive models for quantitative and probabilistic target area prediction. For example, Chinese patent CN107038505B discloses a machine learning-based mineral exploration model prediction method. Based on exploration data of the study area, it combines a mineral exploration concept model library and ore-controlling elements to construct a mineral exploration prediction model through machine learning and achieve quantitative / locational / probabilistic evaluation. Chinese patent CN110264016A discloses a mineral exploration method that inputs geological, remote sensing, and geochemical information into a mineralization model to obtain feature information. It then forms an evidence layer through interpolation and factor analysis, and uses pre-trained support vector machines and other models for classification prediction, outputting a mineralization exploration map. Chinese patent CN109711597A discloses a hierarchical random forest-based mineralization prediction method that constructs training samples and trains the model to alleviate misclassification and accuracy degradation caused by sample imbalance. Chinese patent CN115511214A... A mineral prediction method based on multi-scale sample heterogeneity has been disclosed, which converts geological / geochemical data into geochemical maps of different scales and grids them, combining data augmentation, generative adversarial networks, and deep models to predict mineralization probabilities in geochemical data. Chinese patent CN115879648B discloses a deep mineralization prediction method and system based on machine learning, utilizing regional metallogenic pattern recognition and deep prediction models to predict mineralization information in target areas. Recently, other patents have also proposed introducing multi-source data fusion, Transformer networks, and Bayesian frameworks into the mineral prediction process to improve fusion and interpretation capabilities.
[0005] Furthermore, general studies on spatial prediction have shown that spatial prediction tasks are challenging when "observational samples are sparse while the samples to be predicted are abundant"; while Gaussian processes can measure interpolation uncertainty, their computational cost increases significantly with the sample size; standard neural networks, although scalable, are prone to overfitting on small samples; therefore, frameworks such as conditional neural processes have emerged that combine the advantages of both and support uncertainty output. In Earth science / geochemistry big data mining, reviews have summarized the applications of methods such as RF, SVM, ANN, CNN, Transformer, and GNN in tasks such as mineralization prediction, pointing out that limited sample size, uneven geographical distribution, insufficient generalization ability, and limited interpretability are common challenges.
[0006] Based on the above existing technical approaches, in the application scenario of "prediction of rare earth enrichment potential in soil", the existing technologies have at least the following shortcomings:
[0007] (1) Data sparsity and the small sample dilemma remain prominent. In geological exploration, especially in the early general survey stage, sampling points are often sparse and unevenly distributed. Traditional supervised learning models (such as random forests, support vector machines, standard neural networks, etc.) usually rely on sufficient labeled data to learn stable patterns; in the case of small samples, they are prone to overfitting, which leads to a decline in prediction performance in unsampled areas. Existing technologies have also clearly pointed out that mineralization prediction has real characteristics such as sample scarcity, and have proposed ways to alleviate this through sample imbalance processing, data augmentation, etc., but overall they still belong to the supervised learning paradigm of "retraining for specific regions / tasks", which has limited ability to quickly adapt to small samples across regions.
[0008] (2) Spatial dependency modeling suffers from the limitation of "interpolation / structure assumptions". The distribution of rare earth elements in soil has a strong spatial structure. In existing technologies, one type of method often needs to convert discrete sample information into regular grids / images or evidence layers, such as forming evidence layers through interpolation and then performing classification / probability prediction. This kind of process will introduce interpolation uncertainty into the data and affect the model learning accuracy. Another type of method attempts to use graph neural networks to process irregularly distributed sample points, but usually still needs to pre-construct adjacency relationships (such as graph structures based on neighborhood / distance). Its neighborhood scale and spatial anisotropy / non-stationarity are difficult to set uniformly, and the problem of spatial influence being limited by "rigid structure" is easy to occur. The adaptive expression of "dynamic changes in the spatial dependency strength between any two points" is still insufficient.
[0009] (3) There is a disconnect between model interpretability and geochemical mechanisms. Most machine learning / deep learning methods are still driven by statistical correlation, which are "black box" models. That is, why a high anomaly is predicted in a certain place, what the basis for the prediction is, which known points or which physicochemical processes dominate the prediction, etc., are difficult to provide verifiable explanations to domain experts. Even if posterior interpretation methods such as LIME / SHAP / Grad-CAM are introduced, they often remain at the feature contribution level of the result, and it is difficult to reflect the internal mechanism of the model and the spatial data generation process in depth. A closer connection needs to be established between data-driven and mechanism-driven approaches. At the same time, from the perspective of geochemical processes, the complexation-migration and adsorption enrichment of rare earth elements during weathering and leaching are affected by pH, secondary mineral formation and complexation environment, etc. Organic matter can also act as organic ligands to complex / chelate with rare earth ions and promote migration. If only pH, organic matter and other features are used as ordinary input features without showing the expression of key mechanism processes such as "adsorption-desorption", the model may learn pseudo-correlation that is inconsistent with common geochemical knowledge, resulting in insufficient scientific connotation and limited cross-regional generalization.
[0010] (4) Insufficient expression of prediction uncertainty makes it difficult to directly support exploration decisions. In existing technologies, the main output of many methods is the classification results of mineralization / anomalies or probability evaluation maps (such as mineralization exploration maps, mineralization probability maps, etc.), but they usually cannot simultaneously provide the "spatiotemporal distribution of prediction variance / confidence" that matches the point prediction, thus making it difficult to answer the question of "which areas have insufficient prediction confidence and should be prioritized for denser sampling". For high-risk exploration decision-making scenarios, the lack of uncertainty quantification will limit the availability of model results in sampling deployment and cost optimization. Summary of the Invention
[0011] The purpose of this invention is to overcome the aforementioned deficiencies of existing technologies by providing a method, system, and computer-readable storage medium for predicting soil rare earth enrichment potential based on meta-learning and spatial attention mechanisms, and deeply integrating geochemical mechanisms. Through an innovative three-stage (encoding-aggregation-decoding) meta-learning architecture, it systematically solves four major challenges: small sample size, spatial modeling, interpretability, and uncertainty quantification.
[0012] To achieve the above objectives, this invention provides a method for predicting the enrichment potential of rare earth elements in soil based on meta-learning, comprising:
[0013] Step S1: Obtain multidimensional data from multiple sampling points within the study area and perform Z-score standardization preprocessing on all numerical data to form the total sample set of the data;
[0014] Step S2: Construct the preprocessed data into tasks. Reconstruct multiple learning tasks from the total sample set of the data by random sampling. Each learning task includes a context point set and a target point set.
[0015] Step S3: Input the context point set and the target point set into a geochemical process embedding encoder respectively, and convert the features of each sampling point into a high-dimensional representation vector;
[0016] Step S4: Aggregate the representation vectors of the context point set after the transformation in step S3, and summarize them into a random representation describing the overall geochemical background of the corresponding task area through a probabilistic method.
[0017] Step S5: Map the latitude and longitude coordinates in the representation vector of each sampling point output in Step S3 to a location code. Combine the representation vector set of the context point set, the target point set, and the random representation output in Step S4. After decoding and prediction based on a multi-head attention mechanism, output a prediction distribution.
[0018] Step S6: Treat the process of steps S2 to S3 as a model for iterative training. Calculate the loss function each time the model is trained, and update the model's parameters based on the loss function.
[0019] In one embodiment of the present invention, the multidimensional data obtained in step S1 includes: geospatial information, soil physicochemical properties, geochemical information and auxiliary geographic information. The soil physicochemical properties include pH, organic matter, effective soil layer thickness and / or soil texture. The geochemical information includes a complete set of rare earth element concentrations and the concentrations of other associated elements. The auxiliary geographic information includes topographic factors derived from digital elevation models and vegetation indices and surface temperature extracted from remote sensing images.
[0020] In one embodiment of the present invention, step S2 specifically includes:
[0021] Step S201: From the total sample set A small batch of samples is randomly selected from the dataset, where D represents the total sample set, N represents the total number of sampling points in the total sample set, i represents the index of the sample, and x represents the index of the sample. i Let y represent the feature of the i-th sampling point. i Indicates the label of the i-th sampling point;
[0022] Step S202: Let the number of sampling points in this small batch be B. Randomly divide this small batch of samples into two parts, where:
[0023] The first part serves as the context point set D. C , ,in x represents the number of sample points in the context point set, j represents the index of a sample in the context point set, and x represents the number of sample points in the context point set. j Let y represent the feature of the j-th sampling point in the context point set. j This represents the label of the j-th sampling point in the context point set;
[0024] The second part serves as the target point set D. T , ,in The number of sampling points in the target point set and k represents the index of the sample in the target point set, x k y represents the feature of the k-th sampling point in the target point set. k This represents the label of the k-th sampling point in the target point set.
[0025] In one embodiment of the present invention, the geochemical process embedded encoder in step S3 is composed of two parallel sub-networks, namely:
[0026] A standard feature coding network It is a standard multilayer sensor used to receive all other features except pH and organic matter, and output a general feature. ;
[0027] One microgeochemical process module This is used to explicitly model the core mechanisms of rare earth adsorption, which include:
[0028] One-parameter prediction network This is a small multilayer sensor whose inputs are the standardized pretreated pH and organic matter values, and whose outputs are the parameters of the Freundlich isotherm adsorption equation. ,in In the formula, pH i and Om i They are respectively Characteristics of pH and organic matter, Indicates parameter prediction network All trainable parameters; and
[0029] A microgeochemical model was used, employing the Freundlich isotherm adsorption equation to calculate the theoretical adsorption capacity based on a pre-defined standard liquid phase concentration, and combining this with parameters. Output mechanism characteristics The Freundlich isotherm adsorption equation is in the form of: ,in This represents the amount of solid-phase adsorption at equilibrium. The concentration in the liquid phase. and These are empirical constants characterizing adsorption capacity and adsorption strength, respectively;
[0030] The geochemical process embedded encoder also includes a feature fusion layer, which integrates general features. and mechanism characteristics After concatenation, the feature fusion layer is used to obtain the final encoded representation. That is, as a representation vector.
[0031] In one embodiment of the present invention, the mechanism features are described. The calculation specifically involves: pre-setting a standardized liquid phase concentration. Then calculate the theoretical adsorption capacity under one of the pH and organic matter conditions. As a mechanistic feature, namely .
[0032] In one embodiment of the present invention, step S4 specifically involves: setting the context point set in any task from step S2. After step S3, the encoded representation of each point is obtained as follows: Then, the statistics represented by the codes are calculated through aggregation operations. and In the formula μ C The mean of the vector representing the context point set. The variance of the vector representing the context point set is... The encoded representation of the j-th context point set, the sampled random variable z follows the parameter... and If the distribution is Gaussian, then the random variable z is defined as a random representation of the overall geochemical background of the corresponding task area.
[0033] In one embodiment of the present invention, step S5 specifically includes:
[0034] Step S501: Input the set of representation vectors of the context point set The target point set and its representation vector set, and the random representation z output in step S4;
[0035] Step S502: Map the latitude and longitude coordinates in the representation vector of each sampling point output in step S3 to the location code P. i ;
[0036] Step S503: Generate a query vector Q from the representation of each target point in the target point set. k , In the formula P i This represents the position code of the k-th sampling point in the target point set. This indicates that encoder Enc represents the target point feature x. k The resulting depth feature representation after processing. This represents the first trainable weight matrix;
[0037] The key vector is generated from the set of representation vectors of the context point set. , In the formula, P j This represents the position code of the j-th sampling point in the context point set. This represents the second trainable weight matrix;
[0038] The value vector is generated from the set of representation vectors of the context point set. , , This represents the first trainable weight matrix;
[0039] Step S504: Calculate the multi-head attention weight using the following formula:
[0040] ,
[0041] In the formula, This indicates the calculation of dot product similarity. The scaling factor is softmax(.), which represents the normalization function.
[0042] Step S505: Input the calculation result of step S504 into the fusion layer to obtain the parameters of the predicted distribution of the k-th sampling point in the target point set, i.e., the mean. and variance .
[0043] In one embodiment of the present invention, the formula for calculating the loss function in step S6 is as follows:
[0044] ,
[0045] In the formula, Let θ represent the loss function, and let θ represent the set of all trainable parameters of the model. k , y k () is the target point set D T The sample at the k-th sampling point, μ k The model labels y for the k-th sampling point in the target point set. k The predicted mean, The model labels y for the k-th sampling point in the target point set. k The prediction variance To predict the mean μ k With real label y k The squared error between them This is the variance regularization term.
[0046] This invention also provides a soil rare earth enrichment potential prediction system based on meta-learning for performing the aforementioned method, comprising:
[0047] A data task-oriented module is used to construct data in a task-oriented manner;
[0048] An encoder module, comprising a standard feature encoding network and a differentiable geochemical process module, is used to convert the features of each sampling point into a high-dimensional representation vector;
[0049] A probabilistic aggregation module is used to generate a stochastic characterization of the overall geochemical background of the corresponding task area; and
[0050] A geographic attention decoder module is used for decoding and prediction based on a multi-head attention mechanism.
[0051] The present invention also provides a computer-readable storage medium for storing computer programs and data for performing the aforementioned methods. The computer-readable storage medium is disposed in an electronic device, which further includes a processor, a communication interface, and a bus. The computer-readable storage medium is data-connected to the processor and the communication interface through the bus, and executes computer program instructions through the processor to complete the prediction of soil rare earth enrichment potential based on meta-learning.
[0052] This invention provides a method, system, and computer-readable storage medium for predicting rare earth enrichment potential in soil based on meta-learning. Compared with existing technologies, it successfully integrates four key characteristics—few-sample learning, dynamic spatial modeling, interpretable mechanism fusion, and uncertainty quantification—through a meta-learning architecture, providing an innovative tool for solving practical challenges in the field of geological exploration. This invention represents a deep and organic fusion of geoscience knowledge and cutting-edge deep learning technologies (such as meta-learning and attention mechanisms), offering a complete, innovative, and practical solution to address practical pain points in rare earth exploration. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 This is a schematic diagram of the overall architecture and process of a prediction method according to an embodiment of the present invention;
[0055] Figure 2 This is a schematic diagram of the architecture and process of an embedded encoder in a geochemical process according to an embodiment of the present invention;
[0056] Figure 3 This is a schematic diagram of the architecture and process of a geographic attention decoder according to an embodiment of the present invention;
[0057] Figure 4 This is a schematic diagram of a prediction system according to an embodiment of the present invention;
[0058] Figure 5 This is a schematic diagram of an electronic device and a computer-readable storage medium architecture according to an embodiment of the present invention.
[0059] Figure reference numerals: 100 - Data taskization module; 200 - Encoder module; 300 - Probabilistic aggregation module; 400 - Geographic attention decoder module; 510 - Processor; 520 - Communication interface; 530 - Computer-readable storage medium; 540 - Bus; S1~S6 - Steps. Detailed Implementation
[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0061] Figure 1 This is a schematic diagram of the overall architecture and process of a prediction method according to an embodiment of the present invention, as shown below. Figure 1 As shown, this embodiment provides a method for predicting soil rare earth enrichment potential based on meta-learning. Specifically, it is a method for predicting soil rare earth enrichment risk by integrating pH-organic matter adsorption prior constraints. Its framework can be understood as a meta-learning framework based on Conditional Neural Process (CNP), which is specifically customized for geospatial data. It includes the following steps:
[0062] Step S1: Obtain multidimensional data from multiple sampling points within the study area and perform Z-score standardization preprocessing on all numerical data to form the total sample set of the data; since Z-score standardization is a known processing method, it will not be described in detail here;
[0063] In this embodiment, the multidimensional data obtained in step S1 is multidimensional data from a series of sampling points within the study area, acquired through field surveys and indoor analysis, to prepare training data conforming to the meta-learning paradigm. This mainly includes:
[0064] Geospatial information: such as longitude (lon) and latitude (lat);
[0065] Soil physicochemical properties: including pH (hydrogen ion concentration index), organic matter (OM), effective soil layer thickness, soil texture, etc.
[0066] Geochemical information: including the concentrations of all rare earth elements (La-Lu, Y) and the concentrations of other elements that may be present (V, Cr, Co, Th, U, etc.);
[0067] Auxiliary geographic information includes topographic factors derived from digital elevation models (DEMs) such as elevation, slope, and aspect, as well as vegetation index (NDVI) and surface temperature extracted from remote sensing images.
[0068] Step S2: Construct the preprocessed data into tasks. Reconstruct multiple learning tasks from the total sample set of the data by random sampling. Each learning task includes a context point set and a target point set.
[0069] In this embodiment, step S2 specifically includes the following process:
[0070] Step S201: From the total sample set A small batch of samples is randomly selected from the dataset, where D represents the total sample set, N represents the total number of sampling points in the total sample set, i represents the index of the sample, and x represents the index of the sample. i Let y represent the feature of the i-th sampling point. i Indicates the label of the i-th sampling point;
[0071] Step S202: Let the number of sampling points in this small batch be B. Randomly divide this small batch of samples into two parts, where:
[0072] The first part serves as the context point set D. C , ,in The number of sampling points in the context point set, which is a random number, for example, in Between, j represents the index of the sample in the context point set, x j Let y represent the feature of the j-th sampling point in the context point set. j The label represents the j-th sampling point in the context point set; the context point set is used to provide the system model of the present invention with "known information" about the current task, from which the model needs to learn the local patterns of the region;
[0073] The second part serves as the target point set D. T , ,in The number of sampling points in the target point set and k represents the index of the sample in the target point set, x k y represents the feature of the k-th sampling point in the target point set. k This represents the label of the k-th sampling point in the target point set.
[0074] Since the data for the target point set comes from the total sample set, the features of the target point set... It is a known multidimensional feature, but its label (For example, rare earth concentration) needs to be predicted using the system model of this invention. This invention will be based on... Predicting based on learned patterns and with the real The loss is calculated through comparison. By continuously generating such tasks during training, the system model of this invention is essentially forced to learn an ability to "quickly generalize and reason from a few examples," which is the meta-learning capability proposed in this invention.
[0075] The task-based construction proposed in this invention differs significantly from traditional supervised learning. This invention does not encompass all... Instead of training on a large, flat dataset of individual sampling points, this approach uses an iterative process, dynamically generating a batch of "learning tasks (episodes)" in each training iteration (or epoch). This involves reconstructing the globally sparse sampling point data into a series of independent "learning tasks (episodes)" through random sampling. Each task includes a small "context set" (for on-the-fly model learning) and a "target set" (for evaluating learning performance and calculating loss). This training paradigm simulates the scenario of "predicting unknown points using known points" in real-world exploration, directly optimizing for small-sample learning and teaching the model "how to learn," rather than simply learning a fixed global mapping.
[0076] Step S3: Input the context point set and the target point set into a geochemical process embedding encoder respectively, and convert the features of each sampling point into a high-dimensional representation vector;
[0077] As mentioned earlier, the features of each sampling point For multidimensional features, the features Input and transform into an information-rich high-dimensional representation vector That is, the target of the encoder. Figure 2 This is a schematic diagram of the architecture and process of an encoder embedded in a geochemical process according to an embodiment of the present invention, as shown below. Figure 2 As shown, in this embodiment, the geochemical process embedding encoder in step S3 consists of two parallel sub-networks, namely:
[0078] A standard feature coding network It is a standard multilayer perceptron (MLP) used to receive all other features except pH and organic matter (OM) (such as topography, remote sensing, associated elements, etc.) and output general features. ,in In the formula for Characteristics other than pH and organic matter (OM);
[0079] One microgeochemical process module This is used to explicitly model the core mechanisms of rare earth adsorption, which include:
[0080] One-parameter prediction network This is a small multilayer perceptron (MLP), named Its inputs are the standardized pretreated pH and organic matter (OM) values, and its output is the parameters of the Freundlich isotherm adsorption equation. ,in In the formula, pH i and Om i They are respectively Characteristics of pH and organic matter (OM), Indicates parameter prediction network All trainable parameters of this small neural network model itself; and
[0081] A microgeochemical model was used, employing the Freundlich isotherm adsorption equation, to calculate the theoretical adsorption capacity based on a pre-defined standard liquid phase concentration, and in conjunction with parameters. Output mechanism characteristics The Freundlich isotherm adsorption equation is in the form of: ,in This represents the amount of solid adsorption at equilibrium (positively correlated with the measured soil concentration). The concentration in the liquid phase. and These are empirical constants characterizing adsorption capacity and adsorption strength, respectively. In this field, these two parameters are usually strongly dependent on the soil environment, especially pH and OM. Therefore, this invention chooses the classic Freundlich isotherm adsorption equation to describe the distribution equilibrium of rare earth ions between the solid and liquid phases of the soil.
[0082] Among them, the dynamically generated parameters are obtained Then, one or more mechanistic features characterizing the adsorption process can be calculated. In one embodiment of the present invention, the mechanism features The calculation specifically involves: pre-setting a standardized liquid phase concentration. (For example, set to 1), then calculate the theoretical adsorption capacity under one of the pH and organic matter (OM) conditions. As a mechanistic feature, namely In another embodiment of the invention, the parameters can also be directly... As a mechanistic feature.
[0083] because The training is supervised by a global loss function. Through this end-to-end training, the network learns pH, OM, and The complex nonlinear relationship between them. More importantly, this invention can, after training, plot the... and The response surface of pH and OM changes is used to test whether the relationship learned by the model conforms to geochemical common sense (e.g., in acidic soils). (This usually increases with increasing pH), thus opening an "interpretive window" for the model. Therefore, the differentiable geochemical process of this invention has constraints and interpretability, which is one of the key innovations of this invention.
[0084] The geochemical process embedded encoder also includes a feature fusion layer, which can also be a multilayer perceptron (MLP), to integrate common features. and mechanism characteristics The features are concatenated together and then passed through this feature fusion layer to obtain the final encoded representation. That is, as a representation vector, where In the formula This represents the Feature Fusion Layer (MLP).
[0085] The geochemical process embedding encoding proposed in this invention employs a dual-path encoder. For each input point, its multi-source features (topography, remote sensing, other elements, etc.) are encoded and output as general features using a standard neural network. Simultaneously, the core physicochemical parameters (pH, organic matter) of this point are fed into a "differentiable geochemical process module." This module contains an auxiliary neural network for dynamically predicting key parameters (such as pH, organic matter) of a classical isothermal adsorption equation. This process allows for the calculation of the mechanistic characteristics that characterize the adsorption capacity at that point. These mechanistic characteristics are then integrated with the aforementioned general characteristics to form a final coded representation that incorporates the geoscientific mechanism. This design explicitly and parametrically embeds abstract mechanistic knowledge into the system model, thereby significantly enhancing interpretability and generalization ability.
[0086] Step S4: Aggregate the representation vectors of the context point set after the transformation in step S3, and summarize them into a random representation describing the overall geochemical background of the corresponding task area through a probabilistic method.
[0087] The purpose of this step is to convert the discrete context point set D C The information represented is aggregated into a single, global representation that can represent the overall characteristics of the study area. To quantify uncertainty, this embodiment employs a probabilistic approach. In this embodiment, for any set of context points in step S2... First, execute step S3, which involves identifying the features. and tags The input is fed into the encoder (or a dedicated encoder variant) to obtain the encoded representation of each point. Then, an aggregation operation, Agg, is used to calculate the statistics representing these codes. Typically, the aggregation operation Agg uses the mean and variance, which are respectively... and In the formula μC The mean of the vector representing the context point set. The variance of the vector representing the context point set is... The encoded representation of the j-th context point set, these two statistics and We parameterize a Gaussian distribution and sample a random latent variable from it. That is, the sampled random variable z follows a parameter of and The Gaussian distribution of is expressed as This random variable z is a probabilistic description of the background of the current task area, that is, a stochastic representation of the overall geochemical background of the corresponding task area. It captures the average level and range of variation of soil properties in the area. This invention introduces a sampling process during training and prediction, enabling the system model to learn robustness to changes in input information and reflect these changes in the variance of the prediction.
[0088] The regional background stochastic representation employed in this invention involves encoding the points in all context point sets within a task and summing them through an aggregation function (such as taking the mean and variance) into a probabilistic latent variable z (typically a parameter of a Gaussian distribution) describing the overall geochemical background of the local region. This random variable z captures the common characteristics of the region and introduces randomness into the system model, forming the basis for subsequent uncertainty quantification.
[0089] Step S5: Map the latitude and longitude coordinates in the representation vector of each sampling point output in Step S3 to a location code. Combine the representation vector set of the context point set, the target point set, and the random representation output in Step S4. After decoding and prediction based on a multi-head attention mechanism, output a prediction distribution.
[0090] Since the original attention mechanism is permutation-invariant, it cannot perceive the order or location of the input. In order to enable it to understand geospatial relationships, this embodiment introduces location information. As mentioned earlier, step S3 has encoded each sampling point of the context point set and the target point set, converting it into a high-dimensional representation vector. The data information of each sampling point includes geospatial information (longitude and latitude). Therefore, this embodiment maps the longitude and latitude coordinates of the sampling point through spatial location encoding.
[0091] Figure 3 This is a schematic diagram of the architecture and process of a geographic attention decoder according to an embodiment of the present invention, as shown below. Figure 3 As shown in this embodiment, the latitude and longitude coordinates of each sampling point are... Mapped using a pre-defined fixed function, such as a sine / cosine function. In another embodiment, each sampling point has latitude and longitude coordinates. The position code P is obtained by mapping using a pre-defined learnable function φ. i , can be represented as The mapping method for the latitude and longitude coordinates of the sampling points can be flexibly selected to realize the spatial location encoding process, and this invention does not limit this.
[0092] The main task of decoding in this invention is to utilize the knowledge learned from the context point set (specifically embodied in the random representation z and the encoded representation set of the context points). (in the middle), to target any one of the target points in the target point set. tags Make predictions. For each target point... The main inputs to the decoder include: 1) the features of the target point itself. ;2) A stochastic representation of the overall geochemical background of the corresponding task area z;3) The set of encoded representations of all context points in the context point set. .
[0093] like Figure 3 As shown, in one embodiment of the present invention, step S5 specifically includes:
[0094] Step S501: Input the set of representation vectors of the context point set The target point set and its representation vector set, and the random representation z output in step S4;
[0095] Step S502: Map the latitude and longitude coordinates in the representation vector of each sampling point output in step S3 to a location code. This is used to subsequently encode the position P. i The feature x added to the corresponding sampling point (the i-th sampling point) i superior;
[0096] Step S503: Generate a query vector Q from the representation of each target point in the target point set. k , In the formula x k P represents the feature of the k-th sampling point in the target point set. i This represents the position code of the k-th sampling point in the target point set. This indicates that encoder Enc represents the target point feature x. k The resulting depth feature representation after processing. This represents the sum of the depth features and spatial location features of the sampling point. This represents the first trainable weight matrix;
[0097] The key vector is generated from the set of representation vectors of the context point set. , In the formula, The encoded representation of the j-th context point set, P j This represents the position code of the j-th sampling point in the context point set. This represents the second trainable weight matrix;
[0098] The value vector is generated from the set of representation vectors of the context point set. , , This represents the first trainable weight matrix;
[0099] Step S504: Calculate the multi-head attention weight using the following formula :
[0100] ,
[0101] In the formula, This indicates the calculation of dot product similarity. The scaling factor is softmax(.), which represents the normalization function.
[0102] The above process intuitively simulates the idea of "interpolation": in order to predict the value of sampling point k, we first "look at" all context points j, and then calculate... and The "speech weight" of each point j is determined by the similarity (dot product). This similarity takes into account both the similarity of features and the proximity of spatial locations (by...). (Introduction) Points with high weights are considered to be the most valuable reference for predicting sampling point k. The multi-head attention mechanism allows for the parallel learning of different types of dependencies in different representation subspaces. This invention dynamically models spatial dependencies, which is another key innovation of this invention.
[0103] Step S505: Input the calculation result of step S504 into the fusion layer (MLP) to obtain the parameters of the predicted distribution of the k-th sampling point in the target point set, i.e., the mean. and variance , can be represented as It combines the information of the target point itself and the output of the global background z, and can be used as the predicted distribution (mean and variance) of the rare earth enrichment potential of the kth sampling point in the target point set. The mean is used as the best estimate, and the variance quantifies the uncertainty of the prediction.
[0104] Step S6: Treat the process of steps S2 to S3 as a model and train iteratively. Calculate the loss function each time you train the model and update the model parameters based on the loss function.
[0105] In this embodiment, the formula for calculating the loss function in step S6 is as follows: In the formula, Let D represent the loss function, which is a function of all the model's parameters θ, where θ represents the set of all trainable parameters of the model. T For the target point set, (x k , y k () is the target point set D T The sample at the k-th sampling point, μ k The model labels y for the k-th sampling point in the target point set. k The predicted mean, The model labels y for the k-th sampling point in the target point set. k The prediction variance To predict the mean μ k With real label y k The squared error between them This is the variance regularization term.
[0106] This invention optimizes the model using a loss function to maximize the predicted log-likelihood on the target point set. In this embodiment, the loss function is calculated using a Gaussian prediction function. Other calculation formulas can be used in other embodiments, and this invention is not limited to these. Updating model parameters can be achieved by calculating the average of the loss function across multiple learning tasks in each batch, and all model parameters θ, including encoder parameters and parameter prediction network parameters, can be updated using gradient descent (e.g., the Adam optimizer). Decoder parameters, etc. By training the model on thousands of such small tasks, it can learn a general meta-ability to reason from sparse spatial data, which is the meta-learning process that this invention aims to achieve.
[0107] To clearly understand the aforementioned prediction method, the following examples will illustrate its specific application. In practical applications, all known sampling points (for the sampled area) can first be used as the context point set. The region to be predicted is divided into a dense grid, with each grid point serving as a target point, characterized by: This forms a target point set. Then, the features corresponding to each grid point are... The data is input into the model trained using the aforementioned method. The model can then utilize all known sampling point information to calculate and output the predicted mean value for that point through the geographic attention mechanism described in step S5. and variance The output prediction results can be displayed using the following visualization methods, but are not limited to these:
[0108] 1) Enrichment potential prediction map: The predicted mean of all grid points Visualize the data to create a continuous map showing the distribution of rare earth enrichment potential.
[0109] 2) Prediction uncertainty map: Calculates the prediction variance for all grid points. (or standard deviation) Visualization is performed. Areas of high uncertainty usually appear far from any known sampling points, or in areas with complex geological conditions and conflicting information from neighboring sampling points. Therefore, this map can serve as a direct basis for guiding the next step of exploration and sampling densification.
[0110] 3) Interpretable Analysis Map: Any high-potential prediction point can be selected (such as a target point with a high mean prediction output), and its attention weights for all context points obtained in the geographic attention mechanism calculation can be applied. Visualization. This generates a "spatial impact map" that clearly shows which known high background value points or points with similar geological features play a decisive role in the prediction of that point.
[0111] Figure 4 This is a schematic diagram of a prediction system according to an embodiment of the present invention, as shown below. Figure 4 As shown, this embodiment provides a soil rare earth enrichment potential prediction system based on meta-learning to perform the aforementioned method, which includes:
[0112] A data task-oriented module 100 is used to construct data in a task-oriented manner;
[0113] An encoder module 200, including a standard feature coding network and a differentiable geochemical process module, is used to convert the features of each sampling point into a high-dimensional representation vector;
[0114] A probabilistic aggregation module 300 is used to generate a stochastic characterization of the overall geochemical background of the corresponding task area; and
[0115] A geographic attention decoder module 400 is used for decoding and prediction based on a multi-head attention mechanism.
[0116] The geographic attention decoder module 400 in this embodiment receives three main inputs when predicting target points: the target point's own features, the global regional background z, and the encoded representation set of all context points. Its core is a geographic attention module. This module first encodes the geographic coordinates of all points (target point and context points) into spatial locations. Then, using the target point as the "query" and the context point set as the "key" and "value," it calculates attention weights through a multi-head self-attention mechanism. These weights intuitively reflect the contribution of each context point to the current target point prediction, achieving dynamic and adaptive modeling of spatial relationships. Points with higher weights mean that the model considers them more geologically relevant to the target point. The final output is the predicted distribution (mean and variance) of the rare earth enrichment potential of the target point. The mean serves as the best estimate, while the variance quantifies the uncertainty of the prediction. This embodiment, through the collaborative work of several modules, executes the aforementioned prediction method, achieving a complete process from raw data to the final potential map and uncertainty map.
[0117] Figure 5 This is a schematic diagram of an electronic device and a computer-readable storage medium architecture according to an embodiment of the present invention, such as... Figure 5 As shown, this embodiment provides a computer-readable storage medium 530 for storing computer programs and data for executing the aforementioned method. The computer-readable storage medium 530 is disposed in an electronic device, which also includes a processor 510, a communication interface 520, and a bus 540. The computer-readable storage medium 530 is connected to the processor 510 and the communication interface 520 via the bus 540, and executes computer program instructions through the processor 510 to complete the meta-learning-based method for predicting the enrichment potential of rare earth elements in soil.
[0118] The method, system, and computer-readable storage medium for predicting soil rare earth enrichment potential based on meta-learning provided by this invention have at least the following beneficial effects:
[0119] 1) Solved the problem of small sample learning: The meta-learning framework, through training on a large number of simulated sparse data tasks, enables the model to learn to quickly extract patterns from a small amount of "contextual" information and make accurate inferences, which perfectly matches the reality of sparse geological exploration samples.
[0120] 2) It achieves flexible and interpretable spatial modeling: The geographic attention mechanism breaks free from the constraints of fixed graph structure and can adaptively learn the spatial dependency strength between any two points according to the characteristics of the data itself. In practical applications, the output attention weight map can be visualized, clearly showing which known points the model mainly relies on when making a certain prediction, providing a direct source basis for the prediction results.
[0121] 3) Deep integration of scientific mechanisms: Through differentiable geochemical process modules, the core geoscientific principle of the influence of pH and organic matter on rare earth adsorption is embedded into the model in a structured and parameterizable way. This not only constrains the model's learning behavior, making it more in line with scientific laws, but also makes the model's response mechanism to key variables such as pH and organic matter analyzable and interpretable.
[0122] 4) Provides key decision support information: The model not only provides "where is rich", but also provides a visual result such as "where my prediction is uncertain" by outputting the prediction variance. As an uncertainty map, it provides valuable data to guide the next exploration work. It can be used to optimize the layout of sampling points, allocate limited exploration resources to the areas that need the most verification, and realize intelligent exploration.
[0123] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of one embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing the present invention.
[0124] Those skilled in the art will understand that the modules in the apparatus of the embodiments can be distributed in the apparatus of the embodiments as described in the embodiments, or they can be located in one or more devices different from this embodiment with corresponding changes. The modules of the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting the enrichment potential of rare earth elements in soil based on meta-learning, characterized in that, include: Step S1: Obtain multidimensional data from multiple sampling points within the study area and perform Z-score standardization preprocessing on all numerical data to form the total sample set of the data; Step S2: Construct the preprocessed data into tasks. Reconstruct multiple learning tasks from the total sample set of the data by random sampling. Each learning task includes a context point set and a target point set. Step S3: Input the context point set and the target point set into a geochemical process embedding encoder respectively, and convert the features of each sampling point into a high-dimensional representation vector; Step S4: Aggregate the representation vectors of the context point set after the transformation in step S3, and summarize them into a random representation describing the overall geochemical background of the corresponding task area through a probabilistic method. Step S5: Map the latitude and longitude coordinates in the representation vector of each sampling point output in Step S3 to a location code. Combine the representation vector set of the context point set, the target point set, and the random representation output in Step S4. After decoding and prediction based on a multi-head attention mechanism, output a prediction distribution. Step S6: Treat the process of steps S2 to S3 as a model for iterative training. Calculate the loss function each time the model is trained, and update the model's parameters based on the loss function.
2. The method for predicting soil rare earth enrichment potential based on meta-learning according to claim 1, characterized in that, Step S2 specifically includes the following processes: Step S201: From the total sample set A small batch of samples is randomly selected from the dataset, where D represents the total sample set, N represents the total number of sampling points in the total sample set, i represents the index of the sample, and x represents the index of the sample. i Let y represent the feature of the i-th sampling point. i Indicates the label of the i-th sampling point; Step S202: Let the number of sampling points in this small batch be B. Randomly divide this small batch of samples into two parts, where: The first part serves as the context point set D. C , ,in x represents the number of sample points in the context point set, j represents the index of a sample in the context point set, and x represents the number of sample points in the context point set. j Let y represent the feature of the j-th sampling point in the context point set. j This represents the label of the j-th sampling point in the context point set; The second part serves as the target point set D. T , ,in The number of sampling points in the target point set and k represents the index of the sample in the target point set, x k y represents the feature of the k-th sampling point in the target point set. k This represents the label of the k-th sampling point in the target point set.
3. The method for predicting soil rare earth enrichment potential based on meta-learning according to claim 2, characterized in that, The geochemical process embedded encoder in step S3 consists of two parallel sub-networks, namely: A standard feature coding network It is a standard multilayer sensor used to receive all other features except pH and organic matter, and output a general feature. ; One microgeochemical process module This is used to explicitly model the core mechanisms of rare earth adsorption, which include: One-parameter prediction network This is a small multilayer sensor whose inputs are the standardized pretreated pH and organic matter values, and whose outputs are the parameters of the Freundlich isotherm adsorption equation. ,in In the formula, pH i and Om i They are respectively Characteristics of pH and organic matter, Indicates parameter prediction network All trainable parameters; and A microgeochemical model was used, employing the Freundlich isotherm adsorption equation to calculate the theoretical adsorption capacity based on a pre-defined standard liquid phase concentration, and combining this with parameters. Output mechanism characteristics The Freundlich isotherm adsorption equation is in the form of: ,in This represents the amount of solid-phase adsorption at equilibrium. The concentration in the liquid phase. and These are empirical constants characterizing adsorption capacity and adsorption strength, respectively; The geochemical process embedded encoder also includes a feature fusion layer, which integrates general features. and mechanism characteristics After concatenation, the feature fusion layer is used to obtain the final encoded representation. That is, as a representation vector.
4. The method for predicting soil rare earth enrichment potential based on meta-learning according to claim 3, characterized in that, Mechanism characteristics The calculation specifically involves: pre-setting a standardized liquid phase concentration. Then calculate the theoretical adsorption capacity under one of the pH and organic matter conditions. As a mechanistic feature, namely .
5. The method for predicting soil rare earth enrichment potential based on meta-learning according to claim 3, characterized in that, Step S4 specifically involves: taking the context point set from any task in step S2. After step S3, the encoded representation of each point is obtained as follows: ; Then, the statistics represented by the encoding are calculated through aggregation operations. and In the formula μ C The mean of the vector representing the context point set. The variance of the vector representing the context point set is... The encoded representation of the j-th context point set, the sampled random variable z follows the parameter... and If the distribution is Gaussian, then the random variable z is defined as a random representation of the overall geochemical background of the corresponding task area.
6. The method for predicting soil rare earth enrichment potential based on meta-learning according to claim 5, characterized in that, Step S5 specifically includes: Step S501: Input the set of representation vectors of the context point set The target point set and its representation vector set, and the random representation z output in step S4; Step S502: Map the latitude and longitude coordinates in the representation vector of each sampling point output in step S3 to the location code P. i ; Step S503: Generate a query vector Q from the representation of each target point in the target point set. k , In the formula P i This represents the position code of the k-th sampling point in the target point set. This indicates that encoder Enc represents the target point feature x. k The resulting depth feature representation after processing. This represents the first trainable weight matrix; The key vector is generated from the set of representation vectors of the context point set. , In the formula, P j This represents the position code of the j-th sampling point in the context point set. This represents the second trainable weight matrix; The value vector is generated from the set of representation vectors of the context point set. , , This represents the first trainable weight matrix; Step S504: Calculate the multi-head attention weight using the following formula: , In the formula, This indicates the calculation of dot product similarity. The scaling factor is softmax(.), which represents the normalization function. Step S505: Input the calculation result of step S504 into the fusion layer to obtain the parameters of the predicted distribution of the k-th sampling point in the target point set, i.e., the mean. and variance .
7. The method for predicting soil rare earth enrichment potential based on meta-learning according to claim 6, characterized in that, The formula for calculating the loss function in step S6 is as follows: , In the formula, Let θ represent the loss function, and let θ represent the set of all trainable parameters of the model. k , y k () is the target point set D T The sample at the k-th sampling point, μ k The model labels y for the k-th sampling point in the target point set. k The predicted mean, The model labels y for the k-th sampling point in the target point set. k The prediction variance To predict the mean μ k With real label y k The squared error between them This is the variance regularization term.
8. A meta-learning-based soil rare earth enrichment potential prediction system, used to execute the meta-learning-based soil rare earth enrichment potential prediction method according to any one of claims 1 to 7, characterized in that, include: A data task-oriented module is used to construct data in a task-oriented manner; An encoder module, comprising a standard feature encoding network and a differentiable geochemical process module, is used to convert the features of each sampling point into a high-dimensional representation vector; A probabilistic aggregation module is used to generate a stochastic characterization of the overall geochemical background of the corresponding task area; and A geographic attention decoder module is used for decoding and prediction based on a multi-head attention mechanism.
9. A computer-readable storage medium storing a computer program and data for executing the meta-learning-based soil rare earth enrichment potential prediction method according to any one of claims 1 to 7, characterized in that, The computer-readable storage medium is disposed in an electronic device, which also includes a processor, a communication interface, and a bus. The computer-readable storage medium is connected to the processor and the communication interface via the bus, and executes computer program instructions through the processor to complete the prediction of soil rare earth enrichment potential based on meta-learning.