A self-supervised prediction method and system for soil organic carbon based on a dual-branch attention mechanism
By employing a self-supervised prediction method based on a dual-branch attention mechanism, the problem of insufficient modeling of the dependence and coupling relationship of measured samples in SOC prediction is solved. This method achieves high-precision SOC prediction and uncertainty assessment under the condition of lack of labels, and improves the model's ability to be applied across regions and time periods.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-03-13
AI Technical Summary
Existing SOC prediction methods rely too heavily on measured samples, have limited generalization ability, and lack structured modeling and feature interaction mechanisms for the coupling relationship between environment, vegetation, and soil. This leads to decreased prediction accuracy in areas with scarce or missing samples, making it difficult to achieve effective cross-regional/cross-time applications.
A self-supervised prediction method based on a dual-branch attention mechanism is adopted. By fusing cross-branch attention between vegetation and environment branches, combined with self-supervised agent tasks and pseudo-label training, the model is trained under the condition of lacking SOC labels. The generalization ability and interpretability of the model are improved by entropy regularization and uncertainty evaluation.
Achieve stable and accurate spatial predictions in situations where SOC labels are scarce, reduce dependence on measured SOCs, improve the model's cross-regional and cross-time-period generalization ability, and provide uncertainty assessment to optimize sampling and monitoring decisions.
Smart Images

Figure CN121188720B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of soil carbon cycle and ecological monitoring technology, and in particular to a self-supervised prediction method and system for soil organic carbon based on a bi-branch attention mechanism. Background Technology
[0002] Soil organic carbon (SOC) is a crucial carbon reservoir in terrestrial ecosystems, playing a vital role in regulating the global carbon cycle, supporting ecosystem functions, and maintaining soil fertility. SOC exhibits high spatial heterogeneity and is significantly influenced by climate and human activities over time, posing a significant challenge to accurately predicting its spatiotemporal distribution. Accurately obtaining SOC distribution information has significant scientific and applied value for carbon budget assessment, land use management, and climate change response.
[0003] Currently, SOC prediction mainly relies on two technical approaches: one is traditional models based on empirical statistics and regression analysis, such as linear regression, multinomial regression, and geostatistical interpolation; the other is data-driven machine learning and deep learning methods, such as random forests, support vector machines, gradient boosting trees, and deep neural networks. The latter has significant advantages in nonlinear feature mining and has been widely used for regional and global SOC mapping, such as the SoilGrids global soil gridding dataset, high-resolution soil property mapping in China, and SOC prediction research at other national and regional scales, demonstrating the growing popularity of nonlinear data-driven methods in SOC prediction.
[0004] However, existing SOC prediction methods generally suffer from the following problems:
[0005] 1) Over-reliance on SOC test samples limits the model's generalization ability.
[0006] Existing SOC prediction models typically rely on extensive ground-based sampling data for supervised training. However, the high cost, uneven spatial distribution, and limited time span of SOC measured samples make it difficult to train models effectively in areas with scarce or missing samples, resulting in a significant drop in prediction accuracy. Traditional supervised learning methods cannot achieve effective learning and generalization in the absence of SOC labels, limiting the application of these models across large areas or long-term sequences.
[0007] 2) Lack of structured modeling and feature interaction mechanisms for the coupling relationship between environment, vegetation, and soil.
[0008] The spatial distribution of soil organic matter (SOC) is directly influenced by environmental factors such as climate, topography, and hydrology, and indirectly regulated by vegetation growth. Vegetation reflects the comprehensive effects of environmental conditions and is also an important input source for SOC (such as litter and root exudates). However, existing methods typically input environmental, vegetation, and soil variables directly into the model, lacking branch extraction and interaction modeling of multi-source features. This makes it difficult to characterize the bridging role of vegetation in the environment-soil process, thus limiting the expressive power and predictive interpretability of complex ecological processes related to SOC. Summary of the Invention
[0009] The technical objective of this invention is to construct a self-supervised attention network for vegetation and environment branches when SOC measured samples are scarce. By achieving explicit coupling and dynamic fusion of multi-source features through cross-branch attention, high-precision SOC spatial prediction is achieved and uncertainty assessment is output simultaneously. This improves the model's cross-regional / cross-time generalization and interpretability, serving sampling optimization and land management decision-making.
[0010] To achieve the above objectives, the present invention adopts the following technical solution:
[0011] A self-supervised prediction method for soil organic carbon (SOC) based on a bibranch attention mechanism, comprising the following steps:
[0012] S1 dual-branch representation: inputting multi-temporal remote sensing vegetation indices into the vegetation branch to obtain a potential vegetation representation, and inputting environmental factors into the environment branch to obtain a potential environmental representation;
[0013] S2 bidirectional cross-branch attention fusion: The vegetation representation is updated with weights using the environment representation as the query, and the environment representation is updated with weights using the vegetation representation as the query, resulting in a fused vegetation representation and environment representation;
[0014] S3 Structure Self-Supervised and Pseudo-Label Training: Under the condition of lack of SOC labels, pre-training is performed using at least one of the following self-supervised surrogate tasks: (i) vegetation index reconstruction, (ii) time series prediction, and (iii) surrogate variable regression; and SOC pseudo-labels are generated on unlabeled samples, filtered according to confidence thresholds, and then jointly iteratively trained with a small number of ground truth samples.
[0015] S4 Fusion and Prediction: Construct a fusion feature that includes environmental representation, vegetation representation, and the element-wise product of the two, inputting a regression head and outputting the SOC prediction value;
[0016] S5 Constraints and Uncertainties: Entropy regularization is applied to cross-branch attention to enhance sparsity and interpretability; and uncertainty indices are inferred through heteroscedasticity regression and / or randomization for result evaluation and sampling optimization.
[0017] Preferably, the method further includes step S0, data preparation, which includes: processing the environmental feature matrix. With vegetation feature matrix Spatial alignment, temporal registration, missing value imputation, and standardization are performed; among them It must contain at least one or more of NDVI, EVI, and NDWI. It should include at least two or more of the following: DEM, tidal range, distance from the sea, soil physicochemical properties, and climate variables.
[0018] As a preferred approach, the environment branch employs a Transformer encoder that incorporates feature embedding and learnable positional encoding. It utilizes multi-head self-attention, residual connections, and feedforward networks to model the environmental feature sequence and obtains a fixed-length environmental latent vector through pooling.
[0019] As a preferred approach, the vegetation branch first applies attention-weighted aggregation with learnable projection to each vegetation feature to obtain a vegetation aggregation vector, and then extracts the vegetation latent vector through a Transformer encoder.
[0020] Preferably, the bidirectional cross-branch attention fusion includes:
[0021] (i) Calculate a weighted sum using the environment representation as the query and the vegetation representation as the key and value to update the vegetation representation;
[0022] (ii) Calculate a weighted sum using vegetation as the query and environment as the key and value to update the environment representation;
[0023] The two are executed sequentially or in parallel to output a fused representation, which is then trained through layer normalization and residual structure stabilization.
[0024] Preferably, the structure self-supervised mapping includes: mapping the latent representation of the environment to the latent vegetation space using a nonlinear mapping network, and using the distance between the mapping result and the real latent vegetation representation as the structure self-supervised loss for pre-training of unlabeled samples.
[0025] As a preferred approach, the fusion representation consists of three parts: a latent environmental representation, a latent vegetation representation, and the element-wise product of the two, which are then input into the regression network to output the SOC. During training, a joint loss is used, which includes at least a weighted sum of supervised loss, structural self-supervised loss, and attention entropy regularization term.
[0026] As a preferred approach, the pseudo-label strategy employs a confidence screening and iterative update mechanism based on a threshold τ: when the prediction confidence of an unlabeled sample is greater than τ, it is added to the training set, and the parameters of the regression head and attention module are updated in each round, with τ adaptively adjusted with each round.
[0027] As a preferred approach, uncertainty estimation employs heteroscedastic regression and / or Monte Carlo random inactivation inference to output variance or confidence interval, and uses uncertainty for priority ranking in active sampling or monitoring site optimization.
[0028] Furthermore, this invention also provides a SOC prediction system based on a dual-branch self-supervised attention mechanism, which is used to implement the method, including:
[0029] Vegetation branch module: used for attention weighting and Transformer encoding of multi-temporal vegetation indices;
[0030] Environment branch module: used for embedding, positional encoding, and Transformer encoding of environmental factor sequences;
[0031] Cross-branch attention module: used to implement bidirectional attention fusion between environment and vegetation and output fused representation;
[0032] Self-supervised mapping and pseudo-label training module: used to perform iterative training of structured self-supervised agent tasks and confidence-selected pseudo-labels;
[0033] SOC Regression and Uncertainty Module: Used to output SOC prediction values and uncertainty indicators based on fusion representation.
[0034] Furthermore, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method.
[0035] Furthermore, the present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the method.
[0036] This invention, by employing the aforementioned technical solutions, achieves explicit modeling and dynamic fusion of the environment-vegetation-soil coupling relationship, enabling stable and reproducible spatial predictions even under conditions of scarce SOC labels. Specifically, the self-supervised proxy task and structural mapping loss jointly provide prior representations, significantly reducing dependence on measured SOCs and suppressing overfitting. Cross-branch attention generates visualized contribution and importance ranking during the fusion stage, forming sparse and interpretable feature selection in conjunction with attention entropy regularization. The iterative training strategy of pseudo-label-confidence screening improves convergence stability and cross-regional transferability in weakly labeled scenarios. The fusion representation introduces multiplicative interaction terms to capture nonlinear coupling, improving robustness to boundary samples and out-of-distribution samples. The uncertainty branch simultaneously provides quantitative indicators such as confidence intervals / variance, providing a basis for active sampling and monitoring point optimization. Thus, under complex conditions such as multi-source heterogeneous data, spatiotemporal scale differences, and local missing data, it balances prediction accuracy, generalization ability, and ecological interpretability. Attached Figure Description
[0037] Figure 1 Method flowchart.
[0038] Figure 2 Schematic diagram of the vegetation-environment dual-branch network and attention interaction module structure. Detailed Implementation
[0039] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0040] like Figure 1 As shown, this invention proposes a soil organic carbon (SOC) prediction method based on the interaction between vegetation and the environment using a two-branch self-supervised attention neural network. By introducing an environment-vegetation self-supervised mapping mechanism, model training and high-precision prediction can be achieved in regions where SOC samples are scarce.
[0041] I. Data Preparation:
[0042] Assume there are a total of For each pixel sample, construct the following features:
[0043] Environmental Feature Matrix each line It includes variables such as climate, hydrology, topography, and soil properties;
[0044] Vegetation feature matrix each line Includes remote sensing vegetation indices (such as NDVI, EVI, biomass, structure index, etc.).
[0045] Available SOC observation vectors Observations only occur in the set Available (i.e., partially missing).
[0046] Spatial alignment, temporal registration, missing value imputation, and standardization are performed on all inputs to form the training dataset. .
[0047] II. Environmental Branch Feature Encoding (Transformer)
[0048] The environment branch maps environmental variables (such as climate, hydrology, topography, and soil properties) to a latent feature space to capture the complex nonlinear relationships between environmental factors. At the heart of this branch is the Transformer encoder, which models the dependencies between features through a self-attention mechanism, providing high-quality latent representations for subsequent SOC prediction and cross-branch interactions.
[0049] Step 1: Environmental Feature Embedding and Location Encoding
[0050] First, the standardized environmental characteristics Mapping to a high-dimensional vector space:
[0051] ,
[0052] in, Indicates the first The first sample One environmental characteristic; and These are trainable parameters; This is the embedding vector.
[0053] Then, all feature vectors are sequentially combined and positional encoding is added. :
[0054] ,
[0055] in, Indicates sample Environmental feature sequence; It is a learnable positional encoding used to preserve feature order information.
[0056] Step 2: Multi-head Self-Attention Encoding. The feature sequence is encoded using a multi-head self-attention (MHSA) mechanism.
[0057] ,
[0058] ,
[0059] in, These are the query, key, and value matrices, respectively. For the first Trainable parameters for each attention head; Indicates the first The output of each attention head.
[0060] Multi-head outputs are achieved through residual connections and a feed-forward network (FFN):
[0061] ,
[0062] ,
[0063] in, For splicing the outputs of all attention heads; This indicates a position-by-position feedforward fully connected layer; Perform layer normalization on each token to improve training stability.
[0064] Step 3: Latent Vector Pooling. The Transformer output sequence is pooled to generate a latent environment vector for each pixel.
[0065] ,
[0066] in, For the sample The potential environment representation; the pooling method can be average pooling or max pooling, compressing sequence information to a fixed dimension.
[0067] Through the above process, the environment branch can extract high-dimensional latent representations of environmental variables, capture nonlinear interactions and global dependencies, and provide basic features for the cross-branch attention mechanism and SOC prediction of the vegetation branch.
[0068] III. Vegetation Branch Feature Encoding Module
[0069] The vegetation branch in this invention uses a self-attention mechanism to weight and aggregate input features, and further extracts latent representations through a Transformer encoder to enhance the model's ability to model vegetation-environment interactions.
[0070] Step 1: Attention-weighted aggregation mechanism
[0071] Let the input feature set of the vegetation branch be... ,in Indicates the first A vegetation feature vector This represents the total number of vegetation features. The dimension of each feature.
[0072] Introducing learnable projection vectors This is used to calculate the importance weight of each feature. Attention weights for each feature Defined by the following formula:
[0073] ,
[0074] The above formula normalizes all features using the softmax function, making... This allows for dynamic weighting of different vegetation characteristics.
[0075] Aggregated vegetation representation vector The calculation is as follows:
[0076] ,
[0077] This vector integrates weighted information from all vegetation features, giving it a stronger expressive power.
[0078] Step 2: Transformer Encoding Module
[0079] The weighted vegetation vector The input is fed into a Transformer encoder to extract high-order semantic features and non-linear interaction relationships. The encoding result is represented as follows:
[0080] ,
[0081] in, Let represent the latent representation of the i-th sample under the vegetation branch. This specifies the dimension of the Transformer output. This module can include multi-head self-attention layers, feedforward networks, and normalization operations to enhance the diversity and stability of feature representations.
[0082] IV. Cross-Branch Attention
[0083] To effectively model the bidirectional coupling relationship between vegetation and environmental features, this invention proposes a cross-branch attention mechanism, comprising two complementary steps: environmental attention modeling of vegetation, and vegetation attention feedback to the environment. This mechanism allows the two feature branches to interact and merge in the latent space, thereby improving the ecological interpretability and generalization ability of soil organic carbon (SOC) prediction.
[0084] Step 1: Modeling the environment’s attention to vegetation.
[0085] In this stage, the vegetation feature vector will "reference" the environmental feature sequence to capture the environmental factors that have the greatest influence on it. The specific calculation process is as follows:
[0086] Let the potential representation sequence of the environment branches be ,in Indicates the quantity of environmental features. The potential spatial dimension is ; the potential representation sequence of vegetation branches is . ,in The quantity of vegetation features;
[0087] Three learnable linear transformation matrices are introduced:
[0088] Query matrix: ,
[0089] Key matrix: ,
[0090] Value matrix: ,
[0091] The calculation process is as follows:
[0092] ,
[0093] Subsequently, the weighted fusion result of the environment on the vegetation is calculated using a scaled dot product attention mechanism:
[0094] ,
[0095] in: This represents the attention score matrix of the environment to vegetation; The operation ensures that each row is normalized; Use a scaling factor to avoid gradient explosion; This represents the merged vegetation, including environmental information.
[0096] Step 2: Vegetation's Attention Response to the Environment
[0097] In this stage, the environmental feature vector will "reference" the vegetation feature sequence to capture the feedback effect of vegetation on the environment. The calculation process is as follows:
[0098] Use a linear transformation matrix similar to that in step one:
[0099] Query matrix: ,
[0100] Key matrix: ,
[0101] Value matrix: ,
[0102] The calculation formula is as follows:
[0103] ,
[0104] Then, the environment representation is updated through an attention mechanism:
[0105] ,
[0106] in: This represents the fused environmental representation, including vegetation feedback information; the attention matrix has a dimension of [missing value]. This enables cross-branch interaction.
[0107] Step 3: Integrated and Ecological Coupling Modeling
[0108] final, and These elements, respectively serving as the fused potential representations of vegetation and the environment, are jointly input into the subsequent prediction module. This bidirectional attention mechanism not only enables information exchange but also enhances the model's understanding of the coupling relationship between the environment, vegetation, and soil, significantly improving prediction accuracy and ecological interpretability.
[0109] V. Environment-Vegetation Self-Supervised Mapping: To improve the model's generalization ability in unlabeled regions, this invention introduces a structural self-supervised mechanism to establish a mapping relationship between environmental features and vegetation features. This module can be trained on samples lacking SOC observations, thereby enhancing the model's understanding of the environment-vegetation coupling structure.
[0110] Let the environmental latent representation of the i-th sample be... It is output by the environment branch of the Transformer encoder. A trainable nonlinear mapping network is introduced. This is used to map the environment representation to the vegetation representation space:
[0111] ,
[0112] in, This represents the potential vegetation representation obtained through environmental reasoning.
[0113] The structural self-supervised loss function is defined as follows:
[0114] ,
[0115] This loss term is used to minimize the Euclidean distance between the inferred vegetation representation and the actual vegetation representation, thereby optimizing the environment-vegetation structure mapping relationship.
[0116] VI. SOC Prediction Branch
[0117] Step 1: Fusion of Latent Vectors for Environment and Vegetation After obtaining the latent representations of the environment and vegetation, the model fuses the two and introduces interaction terms to enhance coupled modeling capabilities. The fused representation is defined as follows:
[0118] ,
[0119] in, For element-wise product, This represents vector concatenation. This is the input term after fusing the potential vectors of environment and vegetation.
[0120] The fusion vector is input into the prediction network. The SOC prediction value is obtained as follows:
[0121] ,
[0122] in Let be the predicted SOC value for the i-th sample; This is the set of parameters for the prediction network.
[0123] Calculate the supervised loss for samples with SOC labels.
[0124] ,
[0125] in, This represents the number of sample points with SOC observations. Let be the SOC observation value of the i-th sample;
[0126] Step 2: Design of Attention Regularization Terms
[0127] To improve the sparsity and interpretability of the attention mechanism, an attention regularization term is introduced to the attention matrix. Apply entropy constraints and attention regularization terms. for:
[0128] ,
[0129] Step 3: Joint Loss Function and Parameter Optimization
[0130] The three types of loss terms are weighted and combined to form the final joint optimization objective:
[0131] ,
[0132] in, This is a weighting coefficient, and the weights can be adjusted according to task requirements to balance the goals of supervision and self-supervision.
[0133] During training, all parameters are optimized using a weighted joint backpropagation algorithm:
[0134] ,
[0135] in, and These are the Transformer parameters for the environment and vegetation branches, respectively; For self-supervised mapping network parameters; Predict network parameters for SOC; This is the projection vector in the attention mechanism.
[0136] VII. Training Strategies
[0137] To fully utilize unlabeled and a small number of labeled samples, this invention employs a two-stage training strategy:
[0138] Phase A: Self-supervised pre-training phase
[0139] The optimization objective is to train on samples without SOC labels.
[0140] ,
[0141] Used for learning environment – vegetation structure mapping and attention distribution.
[0142] Phase B: Supervised Fine-tuning Phase
[0143] Fine-tuning was performed on a small number of labeled samples, with the optimization objective being:
[0144] ,
[0145] Used to improve SOC prediction accuracy and maintain structural consistency.
[0146] The optimizer uses AdamW and combines a learning rate scheduling mechanism with a gradient pruning strategy to ensure training stability and convergence efficiency.
[0147] Example 1 (Farmland area: a plain in China, 120×120km)
[0148] 1. Data and Regions
[0149] Region: Black soil farmland area; Period: April 2021 to October 2022.
[0150] Vegetation end features Sentinel-2L2A multi-temporal NDVI and EVI (10m, monthly composite, linear interpolation after cloud masking); vegetation structure indices (such as NBR and SAVI) and simple biomass indices (AGB_proxy, constructed from red-edge bands, standardized and used as a proxy variable in self-supervised tasks).
[0151] Environmental characteristics DEM and slope / aspect (resampled from 30m to 10m); climate elements (temperature, precipitation, evapotranspiration, radiation; meteorological grid interpolation to 10m and seasonal statistical features); soil physicochemical properties base map (texture, bulk density, organic matter background layer; unified to 10m resolution, Z-score normalization).
[0152] SOC label y: 320 SOC test points (dry combustion method), 240 for training / validation, 80 for testing; the remaining pixels are unlabeled.
[0153] 2. Pretreatment
[0154] 1) Spatiotemporal alignment: All covariates are reprojected to the same coordinate system and meshed to 10m; the time dimension is aligned to a monthly series.
[0155] 2) Missing data handling: Missing data caused by cloud occlusion is filled by temporal linear interpolation and spatiotemporal weighted interpolation in the same neighborhood (up to 2 periods).
[0156] 3) Standardization: Perform Z-score for each feature by region; perform additional min-max normalization within the growing season for time-series features.
[0157] 3. Network Structure and Key Hyperparameters
[0158] 1) Context Branch (Transformer Encoding): Embedding Dimension d emb =64, head number H=4, layer number L=3, pooling is average pooling, resulting in .
[0159] 2) Vegetation branch: Attention-weighted aggregation Later Layer Transformer output .
[0160] 3) Bidirectional cross-branch attention: First, "environmental" attention. "Vegetation", then "Vegetation" "Environment" refers to scaled dot product attention (residual and ).
[0161] 4) Fusion and Regression Head: The regression head is MLP(384→256→64→1), which activates GELU.
[0162] 5) Uncertainty Branch: Heteroscedasticity Regression Output The confidence interval was calibrated using MC-Dropout (p=0.2, 20 samples).
[0163] 6) Loss and Weights:
[0164] Monitoring losses ,
[0165] Structural self-supervised loss ,
[0166] Attention entropy regularization ,
[0167] Joint losses , take α=1.0, β=0.5, γ=0.01.
[0168] 7) Optimization and scheduling: AdamW (lr=2e-4), weight decay 1e-4, Cosine restart (T0=10), gradient clipping 1.0.
[0169] 8) Pseudo-label strategy: initial threshold (by variance) The overall score (consistent with the MC confidence band) decreases linearly to 0.80 every 5 epochs; pseudo-labels are selected only from samples within the 30th percentile of variance to prevent early drift; the teacher network is fixed after two rounds of iteration.
[0170] 4. Training Strategies
[0171] 1) Phase A (30 epochs of pre-training): Minimize The proxy tasks include NDVI / EVI reconstruction, phase 1 to 3 extrapolation, and AGB. proxy return.
[0172] 2) Phase B (fine-tuning 40 epochs): Introduction And pseudo-labels are introduced round by round (no more than 5 new labels are added to the unlabeled pool each round).
[0173] 5. Evaluation and Comparison
[0174] Metrics: Test set RMSE, MAE, R2, CRPS (Continuous Rank Probability Score, used for uncertainty), PICP (Predicted Interval Coverage, 95%)
[0175] contrast:
[0176] Comparative Example A (Supervised Concatenation): Xe and Xv are directly concatenated and input into a 3-layer MLP regression;
[0177] Comparative Example B (One-way attention): Only "environment → vegetation" attention, "vegetation → environment" is removed;
[0178] Comparative example C (no self-supervised / no pseudo-labels): Remove L struct With pseudo-label process;
[0179] Comparative example D (without multiplicative interaction terms): the fused vector is removed. .
[0180]
[0181] 6. Explanation:
[0182] 1) Introducing bidirectional cross-branch attention and multiplicative interaction terms significantly reduces error (RMSE decreases by approximately 10%–13%).
[0183] 2) The self-supervised structure plus pseudo-labels improves R² by about 0.05–0.09 when labels are scarce (240 points) and reduces CRPS, indicating that uncertainty and point estimation are improved simultaneously.
[0184] 3) PICP close to 0.95 (0.92) indicates that the uncertainty branch calibration is effective.
[0185] 7. Uncertainty-driven active sampling
[0186] After global inference, 20 additional sampling points were selected from the top 10% of pixels with low spatial clustering and variance and added to the training; after fine-tuning for 10 epochs, the results were evaluated again on the same test set: RMSE improved from 2.49 to 2.35, R... 2 The uncertainty index changed from 0.78 to 0.81; the PICP index changed from 0.92 to 0.94. This indicates that the uncertainty index can be used for sampling optimization, further improving generalization accuracy with the addition of smaller samples.
[0187] The foregoing description of embodiments of the present invention, through which those skilled in the art are able to implement or use the present invention, will be readily apparent to those skilled in the art. Various modifications to these embodiments will be readily apparent to those skilled in the art. The general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novelty disclosed herein.
[0188] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0189] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0190] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0191] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0192] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0193] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0194] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
Claims
1. A self-supervised prediction method for soil organic carbon (SOC) based on a bi-branch attention mechanism, characterized in that, The method includes the following steps: S0, Data Preparation, the data preparation includes: processing the environmental feature matrix With vegetation feature matrix Spatial alignment, temporal registration, missing value imputation, and standardization are performed; among them It must contain at least one or more of NDVI and EVI. It must include at least two or more of the following: climate, hydrology, topography, and soil physicochemical properties; S1, dual-branch representation: input multi-temporal remote sensing vegetation indices into the vegetation branch to obtain potential vegetation representation, and input environmental factors into the environment branch to obtain potential environmental representation; The environment branch employs a Transformer encoder that incorporates feature embeddings and learnable positional encodings, utilizing multi-head self-attention, residual connections, and feedforward networks to process the environment feature matrix. Modeling is performed, and a fixed-length environmental latent vector is obtained through pooling; the vegetation branch first processes each vegetation feature matrix. Attention-weighted aggregation with learnable projection is applied to obtain vegetation aggregation vectors, which are then extracted by a Transformer encoder; S2, bidirectional cross-branch attention fusion: the vegetation representation is updated with weights using the environment representation as the query, and the environment representation is updated with weights using the vegetation representation as the query, resulting in a fused vegetation representation and environment representation; S3, Structural self-supervised and pseudo-label training: Under the condition of lack of SOC labels, pre-training is performed using at least one of the following self-supervised surrogate tasks: (i) vegetation index reconstruction, (ii) time series prediction, and (iii) surrogate variable regression; and SOC pseudo-labels are generated on unlabeled samples, filtered according to confidence thresholds, and then jointly iteratively trained with a small number of ground truth samples. S4, Fusion and Prediction: Construct a fusion feature that includes environmental representation, vegetation representation and their element-wise product, input the regression head and output the SOC prediction value; S5, Constraints and Uncertainties: Entropy regularization is applied to cross-branch attention to enhance sparsity and interpretability; and uncertainty indices are inferred through heteroscedasticity regression and / or randomization for result evaluation and sampling optimization.
2. The method according to claim 1, characterized in that, The bidirectional cross-branch attention fusion includes: (i) calculating a weighted sum of the environment representation as the query and the vegetation representation as the key and value to update the vegetation representation; (ii) calculating a weighted sum of the vegetation representation as the query and the environment representation as the key and value to update the environment representation; the two are executed sequentially or in parallel to output a fused representation, and are trained through layer normalization and residual structure stabilization.
3. The method according to claim 1, characterized in that, Structural self-supervised mapping involves mapping the latent representation of the environment to the latent vegetation space using a nonlinear mapping network, and using the distance between the mapping result and the true latent vegetation representation as the structural self-supervised loss for pre-training of unlabeled samples.
4. The method according to claim 1, characterized in that, The fusion representation consists of three parts: the latent representation of the environment, the latent representation of the vegetation, and the element-wise product of the two, which are input into the regression network to output the SOC. During training, a joint loss is used, which includes at least the weighted sum of the supervised loss, the structural self-supervised loss, and the attention entropy regularization term.
5. The method according to claim 1, characterized in that, The pseudo-label strategy employs a confidence screening and iterative update mechanism based on a threshold τ: when the prediction confidence of an unlabeled sample is greater than τ, it is added to the training set, and the parameters of the regression head and attention module are updated according to each round. τ can be adaptively adjusted with each round.
6. The method according to claim 1, characterized in that, Uncertainty estimation employs heteroscedastic regression and / or Monte Carlo random inactivation inference to output variance or confidence interval, and uses uncertainty for priority ranking in active sampling or monitoring site optimization.
7. A SOC prediction system based on a two-branch self-supervised attention mechanism, characterized in that, The system is used to implement the method according to any one of claims 1-6, comprising: Vegetation branch module: used for attention weighting and Transformer encoding of multi-temporal vegetation indices; Environment branch module: used for embedding, positional encoding, and Transformer encoding of environmental factor sequences; Cross-branch attention module: used to implement bidirectional attention fusion between environment and vegetation and output fused representation; Self-supervised mapping and pseudo-label training module: used to perform iterative training of structured self-supervised agent tasks and confidence-selected pseudo-labels; SOC Regression and Uncertainty Module: Used to output SOC prediction values and uncertainty indicators based on fusion representation.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the method according to any one of claims 1-6.
9. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the method of any one of claims 1-6.
Citation Information
Patent Citations
Hyperspectral remote sensing image ground object clustering method of self-supervised double-branch Transform structure
CN118072059A
High-resolution large-scale forest biomass remote sensing prediction method and system
CN119323736A