Gold mineralization data processing method based on metric learning enhanced variational auto-encoder

By introducing metric learning to enhance the variational autoencoder model, the sample discrimination capability in the latent space is optimized, which solves the problems of weak feature extraction capability and low anomaly discrimination accuracy in the existing technology, and realizes efficient identification and automated processing of geochemical anomalies.

CN121302218APending Publication Date: 2026-01-09JILIN UNIVERSITY

Patent Information

Application Number
CN202511871070.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing methods have weak feature extraction capabilities, low anomaly differentiation accuracy, and insufficient model generalization ability in geochemical anomaly detection, making it difficult to effectively identify anomalous features in complex nonlinear distributions.

Method used

A variational autoencoder model based on metric learning enhancement is adopted. By combining the encoder, decoder and metric constraint module with contrastive loss function and triplet loss function, the sample discrimination ability in the latent space is optimized to identify geochemical anomalies.

Benefits of technology

It improves the accuracy and sensitivity of anomaly identification in complex multi-element geochemical data, enhances robustness to noise, and enables automated processing of mineral resource prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121302218A_ABST
    Figure CN121302218A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of gold mineralization data processing, and particularly relates to a gold mineralization data processing method based on a metric learning enhanced variational auto-encoder, and the method comprises the steps: carrying out the standardization processing of geochemical multi-element original data, and screening out feature vectors of which the contribution degrees to anomaly recognition exceed a set threshold value, and forming a training set; training a metric learning enhanced variational auto-encoder model comprising an encoder, a decoder and a metric constraint module by using the training set; a trained metric learning enhanced variational auto-encoder model is applied to actual geochemical data, geochemical sample points with obvious abnormal features are identified by calculating reconstruction errors of samples in the actual geochemical data and category distances of potential spaces, complex geochemical element distribution can be described more accurately, and the accuracy of geochemical element distribution is improved. And the sensitivity and the recognition capability of the subtle anomaly are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of gold mineralization data processing technology, and specifically relates to a gold mineralization data processing method based on metric learning-enhanced variational autoencoders. Background Technology

[0002] Geochemical anomalies refer to elemental concentrations that are significantly higher or lower than the surrounding background values, often indicating the potential presence of mineral resources or unique geological processes underground. To effectively identify these anomalies in mineral exploration, geologists have long developed various methods. Traditional thresholding methods determine anomalies by setting a statistical threshold for a specific element's concentration (e.g., the mean plus or minus a certain multiple of the standard deviation, typically 1-3 times). When the element concentration exceeds this threshold, an anomaly is considered to have occurred. However, a single threshold is insufficient for handling multi-element anomalies and is highly sensitive to data noise. If background values ​​fluctuate significantly or the data contains anomalous noise, simple thresholding often results in low anomaly detection rates or high false alarm rates. Another commonly used method is cluster analysis and dimensionality reduction. For example, clustering algorithms (such as K-means, density clustering, etc.) are used to divide samples into several groups, aiming to classify geochemical anomalies into independent clusters different from the background; or dimensionality reduction techniques such as principal component analysis are used to extract the main variation directions and then identify outliers in the reduced-dimensional space. These methods alleviate the problems of multivariate analysis to some extent, but clustering methods often assume that samples form clusters according to some distance metric. However, the distribution of geochemical data is often highly nonlinear, multimodal, or long-tailed, making simple Euclidean or Manhattan distances difficult to effectively measure the similarity between samples. Furthermore, noise and mineral-bearing anomaly signals may intertwine, making clustering algorithms susceptible to noise disturbances and misclassifying true anomalies. Principal component analysis and other linear dimensionality reduction methods assume that the main changes in the data are linear, failing to fully capture the anomaly features in complex nonlinear distributions. They may also lose some weak anomaly signals during dimensionality reduction, leading to a decrease in anomaly detection rate.

[0003] With the rise of machine learning, many shallow machine learning algorithms have been applied to the field of geochemical anomaly detection, such as a class of Support Vector Machines (OC-SVM), Isolation Forest, and Gaussian Mixture Models (GMM). These methods can characterize the nonlinear structure of data to a certain extent and perform anomaly mining on unlabeled data. However, shallow models usually have limited expressive power. When geochemical data has high dimensionality and complex elemental relationships, these models often struggle to fully learn the deep distribution patterns of the data. Furthermore, their robustness to noise is limited, potentially requiring manual feature engineering or parameter tuning to obtain stable results. Without sufficient prior knowledge and high-quality data support, the anomaly detection performance of shallow methods remains unsatisfactory. In recent years, deep learning technology has shown great potential in the field of anomaly detection. Among them, Variational Autoencoders (VAEs), as a generative deep learning model, have been attempted to be applied to geochemical anomaly identification. Variational Autoencoders learn the latent distribution of data through an encoder-decoder network, preserving the ability to reconstruct the original data while reducing dimensionality. In theory, a well-trained variational autoencoder (VAE) can reproduce most normal samples with a small reconstruction error, but produces a large reconstruction error for anomalous samples that do not conform to the training distribution. Therefore, traditional VAEs are used for unsupervised anomaly detection: any sample whose reconstruction error exceeds a threshold can be identified as anomaly. However, in practical applications, anomaly detection based on VAEs also has some problems. First, if the training data contains a certain proportion of anomalies that are not distinguished, the VAE may partially fit these anomalies, making the model's reconstruction error unable to effectively distinguish between normal and anomalous samples. Second, the standard VAE assumes that the latent variables follow a simple Gaussian distribution. When the distribution of global chemical data is very complex, this assumption may lead to insufficient fitting of the data distribution. In addition, relying solely on reconstruction error as a criterion may be insensitive to some subtle anomalies, especially when the features of anomalous samples can be partially reconstructed by the VAE; their reconstruction error may not be significantly higher than the normal background, leading to missed detections. Summary of the Invention

[0004] This application provides a gold mineralization data processing method based on metric learning-enhanced variational autoencoders, addressing the problems of weak feature extraction capability, low anomaly discrimination accuracy, and insufficient model generalization capability in existing methods.

[0005] A gold mineralization data processing method based on metric learning-enhanced variational autoencoders according to an embodiment of this application includes: The original geochemical multi-element data were standardized, and feature vectors that contributed more than a set threshold to anomaly identification were selected to form a training set. A metric learning-enhanced variational autoencoder model, comprising an encoder, a decoder, and a metric constraint module, is trained using a training set. The encoder maps the original high-dimensional features to a low-dimensional latent space through multiple nonlinear transformations and samples the latent vectors using a reparameterization module. The decoder reconstructs the original input from the latent space. The metric constraint module optimizes the distribution features of the latent vectors by combining a contrastive loss function and a triplet loss function. The trained metric learning-enhanced variational autoencoder model is applied to real geochemical data. By calculating the reconstruction error of samples in the real geochemical data and the class distance of the latent space, geochemical sample points with obvious anomalous features are identified.

[0006] Furthermore, the encoder employs a multi-layer fully connected neural network, with each fully connected neural network layer followed by batch normalization and ReLU activation function, and the mean vector and standard deviation vector of the latent space are calculated through independent fully connected layers; A reparameterization module is used to sample based on the mean vector and standard deviation vector to generate a latent vector.

[0007] Furthermore, the metric learning module includes a contrastive loss function and a triplet loss function. The contrastive loss function is used to distinguish class samples in the latent space by minimizing the Euclidean distance between samples of the same class and maximizing the latent distance between samples of different classes. The triplet loss function improves the ability to distinguish different class samples in the latent space by combining positive samples, negative samples, and anchor samples.

[0008] Furthermore, the contrastive loss function minimizes the Euclidean distance between similar samples and maximizes the latent distance between dissimilar samples, including: Samples belonging to the same potential category are considered positive sample pairs; The encoder obtains two latent vectors for a positive sample pair and calculates the Euclidean distance between the two latent vectors. Calculate the potential distance between negative sample pairs for other samples in the same batch; By comparing the loss function, the Euclidean distance of positive sample pairs is brought closer, while the potential distance of negative sample pairs is pushed further away to above the predetermined boundary.

[0009] Furthermore, the triplet loss function enhances the discriminative power of different classes of samples in the latent space by combining positive samples, negative samples, and anchor samples, including: Select an anchor sample and its corresponding latent vector, then select a positive sample with properties similar to the anchor sample and a negative sample with a difference exceeding a set threshold, and obtain the positive and negative samples in the latent space after encoding. The triplet loss function is used to force the distance between anchor points and positive samples in the latent space to be at least α smaller than the distance between anchor points and negative samples, thus clustering normal samples and dispersing abnormal samples. This is expressed as: , Indicates the distance between the anchor point and the positive sample. This represents the distance between the anchor point and the negative sample. Indicates the boundary, This represents the latent vector corresponding to the anchor sample. This represents positive samples in the latent space after encoding, which are similar in properties to the anchor samples. This represents a negative sample in the latent space after encoding a negative sample with properties similar to the anchor sample. Through continuous training, the distribution of latent vectors is adjusted so that positive samples form a normal sample cluster, abnormal samples are marked, and abnormal samples are kept away from the normal sample cluster.

[0010] Furthermore, the total loss function of the metric learning-enhanced variational autoencoder model is: ,in , , The weighting factor of the loss function. For reconstruction error, For the KL divergence regularization term and This is a loss function.

[0011] Furthermore, the reconstruction error is calculated using the mean square error formula: ,in, For the first One original sample, For the first The reconstructed samples corresponding to the original samples The total number of samples; The formula for calculating the KL divergence regularization term is: ,in, For the potential vector of the th A dimensional mean vector For the potential vector of the th A standard deviation vector of dimension 1 For the dimension of the potential space.

[0012] Furthermore, the metric loss function includes a contrastive loss function and a triplet loss function. The formula for calculating the contrastive loss function is as follows: ,in, is the Euclidean distance between positive sample pairs. For sample labels, similar samples outlier samples , The minimum interval between preset categories, i.e., the boundary. To compare loss functions; The formula for calculating the triplet loss function is as follows: ,in, For the first Anchor point sample, For the first One positive sample For the first One negative sample, The interval parameter ensures the discriminatory power between positive and negative samples in the latent space. The triplet loss function, This represents the encoder network.

[0013] Furthermore, by calculating the reconstruction error of samples in actual geochemical data and the class distance of the potential space, geochemical sample points with obvious anomalous characteristics were identified, including: The first judgment is used to determine whether the reconstruction error exceeds a preset first threshold. If it does, the sample is determined to be an abnormal sample. The first threshold is determined based on the statistical distribution of the reconstruction error of normal samples in the training set. The second judgment is used to calculate the mean of the latent vector of the sample and the distance between it and the mean of the latent vector of normal samples in the training set. It is then determined whether the distance exceeds the set second threshold. If it does, the sample is determined to be an abnormal sample. Take the OR operation between the first and second determinations.

[0014] Furthermore, the second determination includes: calculating the distance between the latent vector of the sample and its nearest neighbor in the training set, determining whether the distance exceeds a set third threshold, and if it does, determining the sample as an abnormal sample. Compared with the prior art, the advantages of this application are: The method described in this application can more effectively identify anomalous patterns from complex multi-element geochemical data, improve the anomaly detection rate, and enhance robustness to noise. It can more accurately characterize complex geochemical element distributions and improve the sensitivity and identification ability of subtle anomalies. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating a gold mineralization data processing method based on metric learning-enhanced variational autoencoders provided in an embodiment of this application. Figure 2 This is a schematic diagram of the latent space feature distribution after introducing metric learning constraints, provided in an embodiment of this application. Figure 3 This is a schematic diagram of calculating anomaly scores and determining anomalies based on reconstruction errors, provided in an embodiment of this application. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0017] This application proposes a gold mineralization data processing method based on metric learning-enhanced variational autoencoders. Addressing the weaknesses in existing geochemical anomaly identification methods, such as weak feature extraction, low anomaly discrimination accuracy, and insufficient model generalization, this application introduces metric learning-enhanced variational autoencoder models with metric constraints to improve sample discrimination in the latent space. Furthermore, it combines reconstruction error and latent feature distribution for joint optimization to enhance sensitivity to geochemical anomalies. First, the application standardizes and performs feature engineering on the raw geochemical multi-element data to reduce interference from different dimensions and scales on model training. By constructing a network architecture of a variational deep autoencoder model including an encoder, decoder, and metric constraint modules, the application effectively models the latent vectors using reparameterization techniques. It then combines contrastive loss functions and triplet loss functions from metric learning to optimize the distribution relationship between different categories of samples in the latent space, strengthening the ability to distinguish between anomalies and normal samples. During training, reconstruction error minimization and latent space regularization methods are employed. By jointly optimizing the variational lower bound and metric loss function, the discriminative performance is improved. The innovation of this application lies in introducing metric constraints to improve the limitations of traditional variational autoencoders in geochemical anomaly identification. This enables the method to automatically extract latent features highly correlated with anomaly distributions in high-dimensional complex data spaces, thereby improving the accuracy of anomaly region identification. It eliminates the need for manually setting anomaly thresholds, possesses end-to-end automated processing capabilities, and can be applied to the field of mineral resource prediction.

[0018] See Figure 1 The flowchart shown illustrates a gold mineralization data processing method based on metric learning-enhanced variational autoencoders. This application provides a gold mineralization data processing method based on metric learning-enhanced variational autoencoders, comprising: S1 standardizes the original geochemical multi-element data and selects feature vectors that contribute more than a set threshold to form a training set. S2 employs a training set to train a metric learning-enhanced variational autoencoder model containing an encoder, decoder, and metric constraint module. The encoder maps the original high-dimensional features to a low-dimensional latent space through multiple nonlinear transformations and uses a reparameterization module to effectively sample the latent vectors. The decoder reconstructs the original input from the latent space. The metric constraint module optimizes the distribution features of the latent vectors by combining a contrastive loss function and a triplet loss function. S3 applies a trained metric learning-enhanced variational autoencoder model to real geochemical data. By calculating the reconstruction error of samples in real geochemical data and the class distance of the latent space, it identifies geochemical sample points with obvious anomalous features.

[0019] Section S1 concerns data preprocessing: For multi-element geochemical measurement data collected from mining or exploration areas, including the content values ​​of several elements at various sampling points, there are often differences in scale and dimensions. Some element abundances are expressed as percentages, while others may be measured in ppm. Furthermore, the data may contain noise or extreme values, such as abnormally high values ​​caused by analytical errors. To improve the stability of subsequent models, the data is standardized, including handling missing and outlier values. For missing data, interpolation or deletion of corresponding records is used; for obviously erroneous or extremely abnormal data, correction or removal can be made based on geological experience. Subsequently, data transformation is performed, specifically logarithmic transformation (log) or Box-Cox transformation for highly skewed elements to reduce the long-tail effect and make the data distribution closer to normal. Normalization is also performed, subtracting the mean from the data for different elements and dividing by the standard deviation, or converting to [0,1] according to their percentiles. After preprocessing, a relatively clean sample feature matrix is ​​obtained. The rows represent sampling points, and the columns represent different elements or features.

[0020] To reduce computational complexity and highlight anomalies related to mineralization, further feature selection and construction were conducted to extract the most indicative feature subset. Statistical methods such as correlation analysis and principal component analysis were used to eliminate features with high redundancy and low information gain. For example, elements with minimal variation within a region or high correlation with other elements have limited contribution to the anomaly and can be considered for removal. Simultaneously, combining geological expert knowledge, "mineral-prospecting elements" closely related to mineralization anomalies were selected as core input features. For instance, in gold exploration, anomalies of elements such as As and Sb often indicate the presence of gold deposits and should be prioritized for retention. When necessary, combined features or anomaly indices were constructed, such as calculating element content ratios, element cumulative values, or multi-element comprehensive anomaly indices (e.g., concentration indices), to extract multi-dimensional information as more intuitive anomaly criteria. Through the above processing, the final feature vector dimension was determined to be [missing information]. The feature vector set contains information that best reflects potential geological anomalies.

[0021] In one embodiment, the encoder in the metric learning-enhanced variational autoencoder model employs a multi-layer fully connected neural network. Each fully connected neural network layer is followed by batch normalization and ReLU activation function, and the mean vector and standard deviation vector of the latent space are calculated through independent fully connected layers. A reparameterization module is used to sample based on the mean vector and standard deviation vector to generate a latent vector.

[0022] An encoder is a multi-layer neural network used to extract a low-dimensional representation of the input data. Specifically, the encoder receives data in a dimension of... The feature vectors are processed through several hidden layers of progressively nonlinear mapping to finally output the distribution parameters of the latent vectors, including the mean vector and standard deviation vector. In practical implementations, these parameters are typically output as follows: This ensures the standard deviation vector is positive. Assume the latent space dimension is set to... The last layer of the encoder produces a length of... The mean vector and standard deviation vector are used. The reparameterization module samples from the mean vector and standard deviation vector to generate specific latent vectors: the sampling process can be represented as... ,in, Follows a standard normal distribution , Let z represent element-wise product, and z represent the latent vector. Represents the mean vector. This represents the standard deviation vector. This "reparameterization technique" ensures the differentiability of the sampling process, allowing the encoder's network parameters to be updated through backpropagation. The subsequent decoder takes the latent vector as input and maps the low-dimensional representation back to the high-dimensional data space through a multi-layer neural network symmetric to the encoder, outputting the... As a reconstruction of the original input, the structure and activation function of the last layer of the decoder can be chosen according to the data type. For example, for continuous geochemical element content, a linear activation can be used to output a real-valued vector. Through the above encoding-to-decoding process, the metric learning-reinforced variational autoencoder model retains the information of the input data to the greatest extent, making the output... With the feature vector of the original input The encoder aims to approximate the distribution of latent vectors as closely as possible. Simultaneously, by imposing prior constraints on the distribution of latent vectors (such as making it approximate a standard normal distribution), it obtains a smoother and more continuous representation of the latent space. Thus, the metric learning-enhanced variational autoencoder model can learn the probability distribution of the training data and provide a foundation for subsequent anomaly identification.

[0023] In one embodiment, the metric learning module includes a contrastive loss function and a triplet loss function. The contrastive loss function is used to distinguish class samples in the latent space by minimizing the Euclidean distance between samples of the same class and maximizing the latent distance between samples of different classes. The triplet loss function improves the ability to distinguish different class samples in the latent space by combining positive samples, negative samples, and anchor samples.

[0024] Without metric constraints, metric learning-enhanced variational autoencoder (VAE) models adjust parameters solely based on reconstruction error and KL divergence, ensuring the latent space primarily reflects the generation distribution of the data itself. However, metric learning alone may not adequately distinguish between normal and abnormal patterns. Therefore, metric constraints are introduced during training to impose additional requirements on the clustering and divergence structure of the latent vectors output by the encoder. Specifically, contrastive learning or triplet metric learning strategies can be employed depending on the application scenario.

[0025] In one embodiment, the contrastive loss function minimizes the Euclidean distance between similar samples and maximizes the latent distance between dissimilar samples, including: Samples belonging to the same potential category are considered positive sample pairs; The encoder obtains two latent vectors for a positive sample pair and calculates the Euclidean distance between the two latent vectors. Calculate the latent distance between negative sample pairs for other samples in the same batch. The latent distance refers to the distance between samples in the latent space. By comparing the loss function, the Euclidean distance of positive sample pairs is brought closer, while the potential distance of negative sample pairs is pushed further away to above the predetermined boundary.

[0026] For contrastive learning in unsupervised scenarios, data augmentation techniques can be used to generate "positive sample pairs." For example, applying different random perturbations or noise to the same original sample yields two sample views and two sample views. These should belong to the same latent class and are considered positive sample pairs; any two different samples can be considered negative sample pairs. In each training iteration, the encoder obtains the latent vectors of the sample view and sample view respectively, and calculates their Euclidean distance. Simultaneously, the latent distances belonging to negative sample pairs are calculated for other samples in the batch. A contrastive loss function is constructed to bring the Euclidean distance of positive sample pairs closer and push the latent distance of negative sample pairs further away from predetermined boundaries. By maximizing the similarity of positive sample pairs of the same class in the latent space and minimizing the similarity of negative sample pairs of different samples (i.e., outlier samples), the metric learning-enhanced variational autoencoder model gradually learns to converge normal samples of the same class and exclude possible outlier samples in the latent space. These possible outlier samples are considered abnormal samples.

[0027] In one embodiment, the triplet loss function improves the discriminative power of different classes of samples in the latent space by combining positive samples, negative samples, and anchor samples, including: Select an anchor sample and its corresponding latent vector, then select a positive sample with properties similar to the anchor sample and a negative sample with a difference exceeding a set threshold, and obtain the positive and negative samples in the latent space after encoding. The triplet loss function is used to force the distance between anchor points and positive samples in the latent space to be at least α smaller than the distance between anchor points and negative samples, thus clustering normal samples and dispersing abnormal samples. This is expressed as: , Indicates the distance between the anchor point and the positive sample. This represents the distance between the anchor point and the negative sample. Indicates the boundary, This represents the latent vector corresponding to the anchor sample. This represents positive samples in the latent space after encoding, which are similar in properties to the anchor samples. This represents a negative sample in the latent space after encoding a negative sample with properties similar to the anchor sample. Through continuous training, the distribution of latent vectors is adjusted so that positive samples form a normal sample cluster, abnormal samples are marked, and abnormal samples are kept away from the normal sample cluster.

[0028] For triplet metric learning, if there is the opportunity to construct a small number of known outlier samples (e.g., outliers determined based on prior geological knowledge) or if it is desired to further enhance the discriminative ability of the latent space, a triplet loss strategy can be adopted. An anchor sample and its corresponding latent vector are selected, along with a positive sample similar in properties to the anchor sample and a negative sample significantly different from the anchor sample. This yields the encoded positive and negative samples in the latent space. The triplet loss function forces... and at least differ by a predetermined margin. Through continuous training, the metric learning-enhanced variational autoencoder model adjusts the distribution of latent vectors, making normal samples closer to each other and labelable anomalous samples further away from normal sample clusters, thus forming a clear clustering separation structure in the latent space. In practical applications, one of the above metric learning mechanisms can be selected according to the data conditions, or even a combination of both can be used. For example, unsupervised contrastive learning can be used to adaptively learn the data representation first, and then a small number of manually labeled anomalous samples can be introduced for fine-tuning of the triplet loss to achieve better anomaly discrimination.

[0029] The total loss function of the metric learning-enhanced variational autoencoder model is: ,in , , This refers to the weighting factors of the loss function, i.e., the hyperparameters that weigh the contributions of each loss term. For reconstruction error, For the KL divergence regularization term and This is a loss function.

[0030] Reconstruction error is used to measure the numerical difference between the decoder output and the original input. It can be measured by means of square error (MSE) or mean absolute error (MAE). The reconstruction error is calculated using the mean square error formula: ,in, For the first One original sample, For the first The reconstructed samples corresponding to the original samples The total number of samples.

[0031] The KL divergence regularization term of the latent distribution is used to constrain the latent distribution of the encoder output to approximate a preset prior distribution (usually a standard normal distribution). Its calculation formula can be expressed as: ,in and The first output of the encoder is respectively The mean and standard deviation of the dimensional latent vector; The loss functions include the contrastive loss function and the triplet loss function. The formula for calculating the contrastive loss function is as follows: ,in, is the Euclidean distance between positive sample pairs. For sample labels, similar samples outlier samples , The minimum interval between preset categories, i.e., the boundary. To compare loss functions; The formula for calculating the triplet loss function is as follows: ,in, For the first Anchor point sample, For the first One positive sample For the first One negative sample, The interval parameter ensures the discriminatory power between positive and negative samples in the latent space. The triplet loss function, This represents the encoder network.

[0032] With the optimization of joint loss, the model parameters are updated iteratively through gradient descent, enabling the encoder and decoder to not only minimize reconstruction error and KL divergence regularization term, thus accurately reproducing the main data features, but also simultaneously optimize the metric learning objective, expanding the discriminative power between normal and abnormal in the latent space.

[0033] The total loss function is as described above. , and The loss term is composed of a weighted sum and then optimized using stochastic gradient descent. In actual training, it is necessary to appropriately set the weight factors for each loss term. and Generally speaking, it is advisable to take (That is, using the KL divergence weights of a standard variational autoencoder), and The value of this parameter needs to be adjusted based on the rarity of the anomaly in the data and the desired potential separation. If the anomaly signal is very subtle, it can be appropriately increased. This strengthens the role of metric constraints; conversely, if the abnormal signal is strong, then... Choose a smaller value to avoid excessively widening the distance between normal samples. Compare the boundaries in the loss function or the margins in the triplet loss function. The threshold also needs to be selected based on the magnitude of the distance in the latent space, typically referencing the average distance between normal samples during initial training. This ensures the threshold effectively separates normal from abnormal samples without excessively penalizing normal samples. The training of the metric-learning-enhanced variational autoencoder model can employ stochastic gradient descent methods such as the Adam optimization algorithm, while hyperparameters like the learning rate are continuously adjusted and optimized based on performance on the validation set. During training, the trends in reconstruction error and metric loss should be monitored to ensure both gradually converge. After multiple rounds of iterative training, training can be stopped when the loss function value stabilizes. At this point, the latent space learned by the encoder can reconstruct normal samples well and exhibit good separation of abnormal samples.

[0034] It should be noted that in this application, outlier samples are a concept relative to similar samples, and abnormal samples are potential anomalous data identified from the data.

[0035] The trained metric learning-enhanced variational autoencoder model is applied to real geochemical data. By calculating the reconstruction error of samples in the real geochemical data and the class distance of the latent space, geochemical sample points with obvious anomalous features are identified.

[0036] In one embodiment, geochemical sample points with obvious anomalous characteristics are identified by calculating the reconstruction error of samples in actual geochemical data and the class distance of the potential space, including: The first judgment is used to determine whether the reconstruction error exceeds a preset first threshold. If it does, the sample is determined to be an abnormal sample. The first threshold is determined based on the statistical distribution of the reconstruction error of normal samples in the training set. The second judgment is used to calculate the mean of the latent vector of the sample and the distance between it and the mean of the latent vector of normal samples in the training set. It is then determined whether the distance exceeds the set second threshold. If it does, the sample is determined to be an abnormal sample. Take the OR operation between the first and second determinations.

[0037] A trained metric learning-enhanced variational autoencoder model is used to detect anomalies in new geochemical data. Anomaly detection is primarily based on reconstruction error and class distance in the latent space. Specifically, for any new sample, the same preprocessing and feature transformation as during training are first applied to convert it into a standardized feature vector; then, the vector is input into the encoder to obtain its latent vector, which is then used by the decoder to generate reconstructed data. The reconstruction error of this sample is calculated. (Sum of squares or other distance metrics can be used). Indicates a new sample. This represents reconstructed data. Generally, normal samples, because they conform to the training data distribution, have lower reconstruction errors; while abnormal samples, because their features deviate from the training distribution, are difficult for the metric learning-enhanced variational autoencoder model to accurately reconstruct, often resulting in higher reconstruction errors. Therefore, reconstruction error can be used as a basic indicator for anomaly scoring. When the reconstruction error exceeds a pre-set threshold, referred to here as the first threshold, the sample is determined to be an anomaly. This means that the reconstruction error is higher than the average error level of normal samples during training, indicating that the sample deviates from the normal data distribution learned by the metric learning-enhanced variational autoencoder model and is a potential anomaly. The first threshold can be determined based on the statistical distribution of reconstruction errors of normal samples in the training set, for example, by taking a certain high quantile (such as 95% or 99%) as the first threshold to control the false alarm rate. On the other hand, the latent spatial information shaped by metric learning can also be used to assist in anomaly detection. For example, the latent vector of a new sample can be calculated. Mean of latent vectors of normal samples in the training set Distance between Or calculate the latent vector of a new sample. The distance to its nearest neighbor in the training set, where distance refers to Euclidean distance. The latent vectors of normal samples are usually located near normal data clusters, thus the distance is small; while outliers may be far from the known distribution center, resulting in a larger distance. Significantly large. Based on this, distance-based anomaly criteria can be defined, and a threshold can be set for distance. The detection is performed, and this serves as the second threshold. When considering both the reconstruction error and the class distance in the latent space, an "OR" logic can be used to determine anomalies. That is, if either the reconstruction error or the class distance in the latent space exceeds the normal range, the sample can be judged as an anomaly. A second determination can also be made by calculating the distance between the sample's latent vector and its nearest neighbor in the training set, and determining whether the distance exceeds a set third threshold. If it does, the sample is judged as an anomaly.

[0038] By combining reconstruction-based and metric-based criteria, the method in this application can detect anomalies more reliably, avoiding the omission of potential anomalies due to limitations in reconstruction or inadequacy of a single criterion. Therefore, regardless of the form in which anomalous samples manifest (whether they cause increased reconstruction error or deviate from the normal sample cluster in the latent space), they can be effectively identified by the method in this application. See also Figure 2 The diagram shown is a schematic representation of the latent space feature distribution after introducing metric learning constraints, provided in an embodiment of this application. Figure 2 As can be seen, abnormal samples are far from the clusters of normal samples, and the distribution of abnormal samples is sparse.

[0039] See Figure 3 As shown in the illustration, this application provides a schematic diagram for calculating anomaly scores and determining anomalies based on reconstruction errors. Figure 3 As can be seen, samples exceeding the set threshold are abnormal samples, while samples below the reconstruction error are located in the normal sample concentration area.

[0040] It should be noted that the method described in this application is not dependent on any specific geological region or mineral type and is applicable to various types of geochemical exploration data. By simply adjusting the model parameters and threshold strategies appropriately according to the specific data characteristics, automatic identification of anomalous geochemical patterns can be achieved. Furthermore, by geospatializing the anomaly scores of all sampling points across the entire region, a geochemical anomaly distribution map can be created. Areas with high anomaly scores on the distribution map indicate potential mineral exploration targets, providing intuitive and reliable clues for geological prospecting, greatly improving the efficiency and accuracy of prospecting work, and is of great significance for mineral prediction and resource exploration.

[0041] This application addresses the problems of weak feature extraction capability, low anomaly discrimination accuracy, and insufficient model generalization ability in existing geochemical anomaly identification methods. By introducing metric constraints, metric learning enhances the sample discrimination capability of the variational autoencoder model in the latent space. By combining reconstruction error and class distance in the latent space, the sensitivity and identification accuracy of the metric learning-enhanced variational autoencoder model for geochemical anomalies are improved.

[0042] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for processing gold mineralization data based on metric learning-enhanced variational autoencoders, characterized in that, include: The original geochemical multi-element data were standardized, and feature vectors that contributed more than a set threshold to anomaly identification were selected to form a training set. A metric learning-enhanced variational autoencoder model containing an encoder, decoder, and metric constraint module is trained using a training set. The encoder maps the original high-dimensional features to a low-dimensional latent space through multiple nonlinear transformations and samples the latent vectors using a reparameterization module. The decoder reconstructs the original input from the latent space; the metric constraint module optimizes the distribution characteristics of the latent vector by comparing the loss function and the triplet loss function. The trained metric learning-enhanced variational autoencoder model is applied to real geochemical data. By calculating the reconstruction error of samples in the real geochemical data and the class distance of the latent space, geochemical sample points with obvious anomalous features are identified.

2. The gold mineralization data processing method based on metric learning-enhanced variational autoencoder according to claim 1, characterized in that, The encoder employs a multi-layer fully connected neural network. Each fully connected neural network layer is followed by batch normalization and ReLU activation function, and the mean vector and standard deviation vector of the latent space are calculated through independent fully connected layers. A reparameterization module is used to sample based on the mean vector and standard deviation vector to generate a latent vector.

3. The gold mineralization data processing method based on metric learning-enhanced variational autoencoder according to claim 1, characterized in that, The metric learning module includes a contrastive loss function and a triplet loss function. The contrastive loss function is used to distinguish class samples in the latent space by minimizing the Euclidean distance between samples of the same class and maximizing the latent distance between samples of different classes. The triplet loss function improves the ability to distinguish different classes of samples in the latent space by combining positive samples, negative samples and anchor samples.

4. The gold mineralization data processing method based on metric learning-enhanced variational autoencoder according to claim 3, characterized in that, The contrastive loss function minimizes the Euclidean distance between similar samples and maximizes the latent distance between dissimilar samples, including: Samples belonging to the same potential category are considered positive sample pairs; The encoder obtains two latent vectors for a positive sample pair and calculates the Euclidean distance between the two latent vectors. Calculate the potential distance between negative sample pairs for other samples in the same batch; By comparing the loss function, the Euclidean distance of positive sample pairs is brought closer, while the potential distance of negative sample pairs is pushed further away to above the predetermined boundary.

5. The gold mineralization data processing method based on metric learning-enhanced variational autoencoder according to claim 3, characterized in that, The triplet loss function improves the ability to distinguish between different classes of samples in the latent space by combining positive samples, negative samples, and anchor samples, including: Select an anchor sample and its corresponding latent vector, then select a positive sample with properties similar to the anchor sample and a negative sample with a difference exceeding a set threshold, and obtain the positive and negative samples in the latent space after encoding. The triplet loss function is used to force the distance between anchor points and positive samples in the latent space to be at least α smaller than the distance between anchor points and negative samples, thus clustering normal samples and dispersing abnormal samples. This is expressed as: , Indicates the distance between the anchor point and the positive sample. This represents the distance between the anchor point and the negative sample. Indicates the boundary, This represents the latent vector corresponding to the anchor sample. This represents positive samples in the latent space after encoding, which are similar in properties to the anchor samples. This represents a negative sample in the latent space after encoding a negative sample with properties similar to the anchor sample. Through continuous training, the distribution of latent vectors is adjusted so that positive samples form a normal sample cluster, abnormal samples are marked, and abnormal samples are kept away from the normal sample cluster.

6. The gold mineralization data processing method based on metric learning-enhanced variational autoencoder according to claim 1, characterized in that, The total loss function of the metric learning-enhanced variational autoencoder model is: ,in , , The weighting factor of the loss function. For reconstruction error, For the KL divergence regularization term and This is a loss function.

7. The gold mineralization data processing method based on metric learning-enhanced variational autoencoder according to claim 6, characterized in that, The reconstruction error is calculated using the mean square error formula: ,in, For the first One original sample, For the first The reconstructed samples corresponding to the original samples The total number of samples; The formula for calculating the KL divergence regularization term is: ,in, For the potential vector of the th A dimensional mean vector For the potential vector of the th A standard deviation vector of dimension 1 For the dimension of the potential space.

8. The gold mineralization data processing method based on metric learning-enhanced variational autoencoder according to claim 6, characterized in that, The loss function includes a contrastive loss function and a triplet loss function. The formula for calculating the contrastive loss function is as follows: ,in, is the Euclidean distance between positive sample pairs. For sample labels, similar samples outlier samples , The minimum interval between preset categories, i.e., the boundary. To compare loss functions; The formula for calculating the triplet loss function is as follows: ,in, For the first Anchor point sample, For the first One positive sample For the first One negative sample, The interval parameter ensures the discriminatory power between positive and negative samples in the latent space. The triplet loss function, This represents the encoder network.

9. The gold mineralization data processing method based on metric learning-enhanced variational autoencoder according to claim 1, characterized in that, By calculating the reconstruction error and class distance of samples in actual geochemical data, geochemical sample points with obvious anomalous characteristics are identified, including: The first judgment is used to determine whether the reconstruction error exceeds a preset first threshold. If it does, the sample is determined to be an abnormal sample. The first threshold is determined based on the statistical distribution of the reconstruction error of normal samples in the training set. The second judgment is used to calculate the mean of the latent vector of the sample and the distance between it and the mean of the latent vector of normal samples in the training set. It is then determined whether the distance exceeds the set second threshold. If it does, the sample is determined to be an abnormal sample. Take the OR operation between the first and second determinations.

10. The gold mineralization data processing method based on metric learning-enhanced variational autoencoder according to claim 9, characterized in that, The second determination includes: calculating the distance between the latent vector of the sample and the nearest neighbor sample in the training set, determining whether the distance exceeds a set third threshold, and if it does, determining that the sample is an abnormal sample.

Citation Information

Patent Citations

  • Multi-dimensional data intelligent retrieval matching method and system for graphic and text features

    CN120407835A

Cited By

  • Gold mine geochemical exploration abnormal target region identification method based on variational auto-encoder

    CN121743810A