A glacier mass balance simulation method and system based on feature interaction

By employing a cross-attention Transformer encoder architecture and a multi-stage training strategy, the problems of insufficient feature interaction and high simulation uncertainty in glacier mass balance were solved, achieving high-precision glacier mass balance simulation and providing reliable technical support for glacier change research and water resource management.

CN121808711BActive Publication Date: 2026-05-15HUAZHONG UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAZHONG UNIV OF SCI & TECH
Filing Date
2026-03-10
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing glacier mass balance techniques suffer from insufficient feature interaction, inadequate generalization performance, and high simulation uncertainty.

Method used

We employ a model based on a cross-attention Transformer encoder architecture. By processing multi-source glacier datasets in a unified format and enhancing slope aspect features, we construct an integrated simulation model. We utilize one-glacier cross-validation and multi-stage fine-tuning training, combined with performance index selection and model integration, to achieve deep interactive fusion of meteorological dynamic features and static topographic features.

Benefits of technology

It improves the accuracy and generalization ability of glacier mass balance simulation, reduces simulation uncertainty, and provides a reliable tool for glacier change research and water resource management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121808711B_ABST
    Figure CN121808711B_ABST
Patent Text Reader

Abstract

The application discloses a glacier mass balance simulation method and system based on feature interaction and belongs to the technical field of glacier hydrology and climate change monitoring, and comprises the following steps: sequentially performing unified format processing and slope direction feature enhancement on a multi-source data set of a glacier, and then dividing the multi-source data set into a simulation data set and an observation data set; training a model based on a cross-attention Transformer encoder architecture by using the simulation data set, so as to obtain a pre-training model; performing multi-stage fine-tuning training on the pre-training model by using the observation data set when performing leave-one-glacier cross-validation, so as to obtain a plurality of fine-tuned models; performing model integration based on performance index screening on the plurality of fine-tuned models, so as to construct an integrated simulation model; inputting meteorological dynamic features and static topographic features of a target glacier into the integrated simulation model after preprocessing, so as to perform glacier mass balance simulation, and finally obtaining glacier mass balance simulation results. The application reduces simulation uncertainty and realizes high-precision simulation of glacier mass balance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of glacier hydrology and climate change monitoring technology, and more specifically, relates to a method and system for glacier mass balance simulation based on feature interaction. Background Technology

[0002] Glacier mass balance is a core indicator characterizing the response of glaciers to climate change, and it is of great significance for global change assessment, water resource management, and sea-level change simulation. Current research on glacier mass balance mainly relies on two types of methods: physical modeling methods, such as energy balance models and empirical temperature index models. These methods depend on high spatiotemporal resolution meteorological inputs, have complex parameters, high computational costs, limited computational accuracy, and limited applicability in regions with scarce data; and machine learning methods, such as linear regression and random forests. These methods struggle to effectively characterize the high-dimensional nonlinear coupling relationship between climate factors and glacier topographic features, and their generalization ability is limited.

[0003] In recent years, artificial intelligence technology has developed rapidly, and deep learning has made breakthroughs in fields such as image recognition and natural language processing. Deep learning has powerful nonlinear fitting and automatic feature extraction capabilities, providing new methods for glacier monitoring. However, in the field of glacier mass balance research, deep learning technology has not yet been effectively introduced into a systematic solution. Current solutions simply use deep learning models as simple regression tools, failing to be specifically designed for the data characteristics of this field, resulting in practical limitations. Existing technologies still have the following shortcomings: existing methods typically perform simple vector concatenation of climate features and static topographic features at the input layer, lacking dedicated network structures capable of dynamic modeling and interactive modeling mechanisms; different glacier samples vary greatly in size, resulting in insufficient generalization performance of models on small sample glaciers; and the results of multiple models are difficult to effectively fuse, leading to high simulation uncertainty.

[0004] This shows that existing glacier mass balance technologies suffer from technical problems such as insufficient feature interaction, insufficient generalization performance, and high simulation uncertainty. Summary of the Invention

[0005] In view of the above-mentioned defects or improvement needs of existing technologies, the present invention provides a glacier mass balance simulation method and system based on feature interaction, thereby solving the technical problems of insufficient feature interaction, insufficient generalization performance and high simulation uncertainty in existing glacier mass balance technologies.

[0006] To achieve the above objectives, according to one aspect of the present invention, a method for simulating glacier mass balance based on feature interaction is provided, comprising:

[0007] After preprocessing the meteorological dynamics and static topographic features of the target glacier, the data are input into the integrated simulation model to perform glacier mass balance simulation and obtain the glacier mass balance simulation results.

[0008] The integrated simulation model was constructed in the following manner:

[0009] A multi-source dataset of glaciers was obtained. After the multi-source dataset of glaciers was processed in a unified format and enhanced with slope aspect features, it was divided into a simulation dataset and an observation dataset.

[0010] A pre-trained model is obtained by training a model based on a cross-attention Transformer encoder architecture using a simulated dataset.

[0011] When performing leave-one-out glacier cross-validation on the pre-trained model, multi-stage fine-tuning training is performed using the observation dataset to obtain multiple fine-tuned models.

[0012] Multiple fine-tuned models are integrated based on performance metrics to construct an integrated simulation model.

[0013] Furthermore, the simulated dataset and the observed dataset are obtained in the following manner:

[0014] The data includes: Observational glacier datasets obtained from field observation databases, including measured mass balance labels for multiple glaciers in multiple years; Glacier climate datasets obtained from meteorological data platforms, including meteorological dynamic characteristics of multiple glaciers in multiple years; Glacier static topographic feature datasets obtained from global glacier catalog databases, including static topographic features of multiple glaciers; Glacier climate datasets and glacier static topographic feature datasets are input into physical models to simulate glacier mass balance, resulting in simulated glacier datasets, including simulated mass balance labels for multiple glaciers in multiple years;

[0015] The observed glacier dataset, glacier climate dataset, glacier static topographic feature dataset, and simulated glacier dataset constitute a multi-source dataset for glaciers. The multi-source datasets of glaciers are processed in sequence to achieve a unified format, slope aspect enhancement, and missing and outlier cleaning to obtain a standardized multi-source dataset. The observed glacier dataset, glacier climate dataset, and glacier static topographic feature dataset are combined into an observed dataset, and the glacier climate dataset, glacier static topographic feature dataset, and simulated glacier dataset are combined into a simulated dataset.

[0016] Furthermore, the model based on the cross-attention Transformer encoder architecture includes: a meteorological dynamic feature multilayer perceptron module, a static terrain feature multilayer perceptron module, a multilayer cross-attention interaction module, a feature fusion output module, and a regression simulation head;

[0017] When training a model based on a cross-attention Transformer encoder architecture using a simulated dataset,

[0018] The meteorological dynamic feature multilayer perceptron module extracts features from the input simulated dataset to obtain meteorological feature representations, while the static terrain feature multilayer perceptron module extracts features from the input simulated dataset to obtain terrain feature representations.

[0019] The multi-layer cross-attention interaction module includes N sequentially connected interaction layers, where N≥2. Each interaction layer includes a sequentially connected multi-head cross-attention sub-layer and a feedforward neural network sub-layer. In each interaction layer, meteorological features are used as the query vector, and terrain features are used as the key vector and value vector. The attention mechanism calculates the attention weight based on the correlation between the query vector and the key vector, and performs weighted aggregation on the value vector to obtain the updated representation of the fused terrain information.

[0020] The feature fusion output module concatenates the updated representation output by the final interaction layer with the terrain feature representation to obtain the fused feature representation. The regression simulation head performs regression simulation on the fused feature representation to predict the simulation results of glacier mass balance.

[0021] Furthermore, the pre-trained model is trained in the following manner:

[0022] The error between the predicted glacier mass balance simulation results and the simulated mass balance labels in the simulation dataset is used as the loss function, and the parameters are updated through backpropagation to obtain the pre-trained model.

[0023] Furthermore, the pre-trained model is trained in the following manner:

[0024] The simulated dataset is divided into a training set and a validation set.

[0025] The dynamic meteorological features and static terrain features of the training set samples are used as inputs, and the simulated mass balance labels of the samples are used as targets. The mean squared error loss function is used for optimization.

[0026] The loss value of the mean squared error loss function is monitored on the validation set. When the validation loss value no longer decreases over multiple consecutive training epochs, an early stopping mechanism is triggered, and the model parameters with the lowest validation loss value are saved as the final pre-trained model.

[0027] Furthermore, the specific method for the cross-verification of the glacier is as follows:

[0028] The samples in the observation dataset are grouped according to the glacier to which they belong, resulting in M ​​glacier groups, where M≥2;

[0029] The leave-one-glacier cross-validation method is adopted, in which each glacier group is used as the test set and all other glacier groups are used as the training set.

[0030] For each validation fold, the parameters of the pre-trained model are fine-tuned in multiple stages using samples from the training set for that validation fold.

[0031] Furthermore, the specific method of the multi-stage fine-tuning training is as follows:

[0032] The fold pre-training model was trained using a three-stage fine-tuning method. In the first stage, all parameters of the meteorological dynamic feature multilayer perceptron module, the static terrain feature multilayer perceptron module, the multilayer cross-attention interaction module, and the feature fusion output module were frozen, and only the parameters of the regression simulation head were updated.

[0033] In the second stage, the parameters of the feature fusion output module are unfrozen, so that they can be used together with the parameters of the regression simulation head for training.

[0034] In the third stage, all parameters of the meteorological dynamic feature multilayer sensor module, the static terrain feature multilayer sensor module, the multilayer cross-attention interaction module, and the feature fusion output module are unfrozen and fine-tuned end-to-end.

[0035] After completing the three-stage fine-tuning, the fine-tuned model of this verification fold is obtained, and finally, M glacier groups correspond to M fine-tuned models.

[0036] Furthermore, the initial learning rate of the first stage > the initial learning rate of the second stage > the initial learning rate of the third stage.

[0037] Furthermore, the integrated simulation model is constructed in the following manner:

[0038] For each fine-tuned model, calculate the performance evaluation index of the mass balance simulation on its corresponding test set to obtain the determination coefficient of each fine-tuned model.

[0039] From M fine-tuned models, extract the fine-tuned models with a determination coefficient greater than the preset value to form multiple high-quality candidate models. For each high-quality candidate model, divide its determination coefficient by the sum of the determination coefficients of all high-quality candidate models to obtain the normalized ensemble weight of the high-quality candidate model.

[0040] An ensemble simulation model is constructed by weighting and fusing all high-quality candidate models based on normalized ensemble weights.

[0041] According to another aspect of the present invention, a glacier mass balance simulation system based on feature interaction is provided, comprising:

[0042] The model building module is used to acquire multi-source datasets of glaciers. After processing the multi-source datasets of glaciers in a unified format and enhancing their aspect features, they are divided into simulated datasets and observational datasets. A model based on a cross-attention Transformer encoder architecture is trained using the simulated dataset to obtain a pre-trained model. When performing leave-one-out glacier cross-validation on the pre-trained model, multi-stage fine-tuning training is performed using the observational dataset to obtain multiple fine-tuned models. The multiple fine-tuned models are then integrated based on performance metrics to construct an ensemble simulation model.

[0043] The simulation module is used to preprocess the meteorological dynamics and static topographic features of the target glacier and then input them into the integrated simulation model to simulate the glacier mass balance and obtain the glacier mass balance simulation results.

[0044] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:

[0045] (1) This invention achieves interactive fusion of climate and topographic features through a model based on a cross-attention Transformer encoder architecture, employs a multi-stage learning strategy of pre-training and fine-tuning to improve the model's generalization ability, implements cross-validation to ensure reliable results, and reduces uncertainty through a model integration simulation mechanism based on performance index selection. This invention solves the technical problems of insufficient feature interaction, insufficient generalization performance, and high simulation uncertainty in existing glacier mass balance techniques. It achieves high-precision simulation of glacier mass balance, providing a reliable technical tool for glacier change research, water resource management, and climate change assessment.

[0046] (2) This invention collects glacier-related data from multiple databases and uses a physical model to simulate the glacier's mass balance. It does not rely on the statistical regularities of historical data, but directly simulates the physical response of glaciers to climatic conditions. Therefore, it has a fundamental advantage in understanding the intrinsic mechanisms of glacier changes. By sequentially processing the multi-source datasets of glaciers in a unified format, enhancing slope aspect features, and cleaning missing and outlier values, the quality of the multi-source datasets can be significantly improved, laying a solid foundation for reducing simulation uncertainties in the future.

[0047] (3) The model designed in this invention, based on a cross-attention Transformer encoder architecture, extracts meteorological and terrain features using a multilayer perceptron module for dynamic meteorological features and a multilayer perceptron module for static terrain features, respectively, avoiding mutual interference before feature interaction. By constructing N sequentially connected interaction layers, multi-level feature interaction learning is achieved. This design allows the model to capture the complex relationship between meteorological and terrain features from different levels of abstraction, and each layer can learn interaction patterns at different granularities. The attention mechanism can automatically learn the correlation between meteorological and terrain features without the need for manual design of feature interaction rules. The final feature fusion output module adopts a splicing strategy, retaining all information from the original terrain features and the output of the interaction layers, which is convenient for subsequent regression task processing. This multi-layer cross-attention interaction architecture has stronger feature expression capabilities and better prediction performance compared to traditional methods.

[0048] (4) This invention provides two training methods. The first method is simple and fast, while the second method monitors the loss value of the mean squared error loss function on the validation set, which can obtain a model with higher simulation accuracy. By using the leave-one-out glacier cross-validation method, it can be ensured that each training and testing uses a completely independent dataset, thereby more realistically evaluating the model's performance on unseen glaciers and improving the model's generalization ability. Multi-stage fine-tuning enables the model to gradually adapt to the characteristics of different glaciers, thus having stronger adaptability and robustness when facing new glacier data. Limiting the initial learning rate at different stages can gradually enhance the model's adaptability to observed data while ensuring model stability.

[0049] (5) This invention extracts finely tuned models with a determination coefficient greater than a preset value from M finely tuned models to form multiple high-quality candidate models. The high-quality candidate models selected through performance indicators help improve the simulation accuracy of the model for glacial mass balance. Based on normalized ensemble weights, all high-quality candidate models are weighted and fused. This weighting method gives higher say to models with stronger generalization ability, integrates the advantages of multiple models, and can obtain more stable and accurate simulation results than a single model. Attached Figure Description

[0050] Figure 1 This is a flowchart of the method provided in an embodiment of the present invention.

[0051] Figure 2 This is a comparison chart of simulated and observed values ​​of glacier mass balance provided in an embodiment of the present invention. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0053] like Figure 1 As shown, a glacier mass balance simulation method based on feature interaction includes:

[0054] After preprocessing the meteorological dynamics and static topographic features of the target glacier, the data are input into the integrated simulation model to perform glacier mass balance simulation and obtain the glacier mass balance simulation results.

[0055] The integrated simulation model was constructed in the following manner:

[0056] A multi-source dataset of glaciers was obtained. After the multi-source dataset of glaciers was processed in a unified format and enhanced with slope aspect features, it was divided into a simulation dataset and an observation dataset.

[0057] A pre-trained model is obtained by training a model based on a cross-attention Transformer encoder architecture using a simulated dataset.

[0058] When performing leave-one-out glacier cross-validation on the pre-trained model, multi-stage fine-tuning training is performed using the observation dataset to obtain multiple fine-tuned models.

[0059] Multiple fine-tuned models are integrated based on performance metrics to construct an integrated simulation model.

[0060] The glacier mass balance simulation method of this invention can be used to evaluate and optimize artificial rain / snow enhancement programs. By simulating and calculating the degree of restoration of the mass balance in glacier accumulation areas under different operational conditions, it can guide implementation. This method can also be used to formulate glacier protection technical solutions, such as covering tourist glaciers with insulating materials to slow melting. Furthermore, this method can be used for long-term water resource evolution prediction. By accurately calculating the reserves and future trends of upstream glaciers, it provides crucial scientific basis for the site selection, installed capacity design, and power generation life assessment of hydropower projects.

[0061] Example 1

[0062] A method for simulating glacier mass balance based on feature interaction, comprising:

[0063] A multi-source dataset of glaciers was obtained. After the multi-source dataset of glaciers was processed in a unified format and enhanced with slope aspect features, it was divided into a simulation dataset and an observation dataset.

[0064] Specifically, the system obtains glacier datasets from field observation databases, including measured mass balance labels for multiple glaciers in multiple years; glacier climate datasets from meteorological data platforms, including meteorological dynamic characteristics of multiple glaciers in multiple years; and glacier static topographic feature datasets from global glacier catalog databases, including static topographic features of multiple glaciers. The glacier climate dataset and glacier static topographic feature datasets are then input into a physical model to simulate glacier mass balance, resulting in a simulated glacier dataset, including simulated mass balance labels for multiple glaciers in multiple years.

[0065] The meteorological dynamic characteristics include at least: precipitation, downward component of shortwave radiation, upward component of shortwave radiation, downward component of longwave radiation, upward component of longwave radiation, near-surface air temperature, wind speed, air pressure, relative humidity, and surface albedo; the static topographic characteristics include at least: longitude of the glacier center, latitude of the glacier center, glacier area, median elevation of the glacier, mean slope of the glacier, and original aspect. For example, when studying glaciers on the Qinghai-Tibet Plateau, the geometric characteristics of glaciers in the study area can be obtained from RGI6.0 (Global Glacier Inventory Data), monthly meteorological data for the corresponding region can be obtained from ERA5 reanalysis data, and combined with publicly released WGMS (World Glacier Monitoring Service) observation data and simulation data generated based on physical models. Scripts written using the Pandas library in Python can be used to associate these data according to glacier unique identifiers (such as RGIId) and year.

[0066] The target simulation area is determined, and the geometric data of all glaciers to be simulated in the area are obtained from the global glacier catalog database as the terrain input basis for the physical model; the geometric data includes at least: glacier outline polygon, glacier area, glacier elevation zone distribution and corresponding slope information;

[0067] Simultaneously, high spatiotemporal resolution grid climate reanalysis data covering the target area and simulation period are acquired as the climate dataset for the physical model;

[0068] The climate data includes at least: near-surface air temperature and solid precipitation.

[0069] Configure the core physical parameter set of the physical model;

[0070] Input glacier geometric data and climate forcing field data into the configured physical model;

[0071] The model performs calculations for each glacier and each year based on physical equations (including but not limited to ice flow dynamics equations and surface mass balance equations);

[0072] From the model output, the simulated mass balance value of each glacier in each year is extracted to form a simulated mass balance label.

[0073] The observed glacier dataset, glacier climate dataset, glacier static topographic feature dataset, and simulated glacier dataset constitute a multi-source dataset for glaciers. The multi-source datasets of glaciers are processed in sequence to achieve a unified format, slope aspect enhancement, and missing and outlier cleaning to obtain a standardized multi-source dataset. The observed glacier dataset, glacier climate dataset, and glacier static topographic feature dataset are combined into an observed dataset, and the glacier climate dataset, glacier static topographic feature dataset, and simulated glacier dataset are combined into a simulated dataset.

[0074] Unified format processing, including:

[0075] Based on the unique identifier of the glacier and the year of observation, the simulated glacier dataset, the observed glacier dataset, the glacier climate dataset, and the glacier static topographic feature dataset are associated;

[0076] Data merging tools were used to vertically stitch together datasets from different sources but with the same structure, resulting in intermediate datasets for simulated glaciers and intermediate datasets for observed glaciers.

[0077] For example, the simulation data comes from the physical simulation outputs of RGI zones 13, 14, and 15, while the observation data comes from glaciers with actual measurement records. The `pd.concat()` function is used to merge the simulation data tables from different RGI zones into a unified simulation dataset. Similarly, observation data tables from different data sources are merged into a unified observation dataset.

[0078] Enhanced slope aspect characteristics, including:

[0079] Identify the feature columns representing glacier slope aspect in the intermediate dataset;

[0080] Convert the degree value of the slope to the radian value;

[0081] The sine and cosine values ​​of the radian value are calculated respectively to generate two new feature columns, which are used to represent the slope aspect information more continuously and periodically.

[0082] The generated aspect sine and aspect cosine features are added to the intermediate dataset.

[0083] For example, the "Aspect" column in the original data stores aspect values ​​from 0° to 360°. A transformation is performed using Python's NumPy library. This process addresses the discontinuity of aspect as a loop variable, allowing the model to better learn the impact of aspect on solar radiation reception.

[0084] The dataset after feature enhancement is cleaned of missing and outlier values, including:

[0085] For each sample data, check whether its climate dynamics, static topography features, and mass balance labels are missing;

[0086] If a sample has a missing value for any required feature or label, then the sample is removed from the dataset.

[0087] For the remaining complete sample data, calculate the statistical distribution of its key numerical features, identify and remove extreme outliers that exceed the preset reasonable physical range.

[0088] For example, for climate characteristics, check if there are physically impossible values ​​such as temperatures below -80°C or above 50°C;

[0089] For the mass balance label, check for extreme outliers caused by data recording errors, such as annual balances exceeding ±10,000 mm we. Remove rows with missing values ​​using Pandas' dropna function, and filter and remove outliers based on physical common sense or statistical methods, such as the 3σ rule.

[0090] Obtain a standardized initial dataset, including:

[0091] The samples were grouped according to the unique identifier of the glacier;

[0092] Within each glacier group, the samples are sorted in ascending order by year;

[0093] All features are standardized to use floating-point data types.

[0094] Generate initial simulated glacier and measured glacier datasets containing all processed features, labels, glacier identifiers, and year information.

[0095] For example, the final simulated dataset may contain tens of thousands of samples, each with multiple climate and terrain features and a simulated mass balance label; the observational dataset may contain thousands of samples with the same multiple features and a measured mass balance label. The datasets are stored in DataFrame format for easy loading of subsequent data.

[0096] A model based on a cross-attention Transformer encoder architecture is trained using a simulated dataset to obtain a pre-trained model. When performing leave-one-out glacier cross-validation on the pre-trained model, multi-stage fine-tuning training is performed using an observation dataset to obtain multiple fine-tuned models. The multiple fine-tuned models are then integrated based on performance metrics to construct an ensemble simulation model.

[0097] The model based on the cross-attention Transformer encoder architecture includes an encoder and a regression simulation head. The encoder includes a multilayer perceptron module for meteorological dynamic features, a multilayer perceptron module for static terrain features, a multilayer cross-attention interaction module, and a feature fusion output module.

[0098] The meteorological dynamic feature multilayer sensor module includes a fully connected layer, a layer normalization layer, a fully connected layer, an activation function, and a fully connected layer connected in sequence.

[0099] The static terrain feature multilayer sensor module has the same but independent hierarchical structure as the climate dynamic feature multilayer sensor module.

[0100] The multi-layer cross-attention interaction module includes N sequentially connected interaction layers, where N≥2. Each interaction layer includes a sequentially connected multi-head cross-attention sub-layer and a feedforward neural network sub-layer. In each interaction layer, meteorological features are used as the query vector, and terrain features are used as the key vector and value vector. The attention mechanism calculates the attention weight based on the correlation between the query vector and the key vector, and performs weighted aggregation on the value vector to obtain the updated representation of the fused terrain information.

[0101] The feature fusion output module concatenates the updated representation output by the final interaction layer with the terrain feature representation, and performs dimensionality reduction and fusion through a multilayer perceptron to output a unified high-dimensional feature representation.

[0102] For example, the HMAEncoder class is defined using the PyTorch framework. The climate MLP module maps 10-dimensional climate features to 512-dimensional vectors, and the terrain MLP module maps 6-dimensional terrain features to 512-dimensional vectors. The cross-attention module has four layers, each with eight attention heads. This design allows the model to dynamically learn complex interactions, such as the greater sensitivity of high-altitude areas to warming or the different responses of north-slope glaciers to changes in longwave radiation.

[0103] The training of the pre-trained model includes:

[0104] The simulated dataset is divided into a training set and a validation set.

[0105] The dynamic meteorological features and static terrain features of the training set samples are used as inputs, and the simulated mass balance labels of the samples are used as targets. The mean squared error loss function is used for optimization.

[0106] The loss value of the mean squared error loss function is monitored on the validation set. When the validation loss value no longer decreases over multiple consecutive training epochs, an early stopping mechanism is triggered, and the model parameters with the lowest validation loss value are saved as the final pre-trained model.

[0107] For example, Scikit-learn's StandardScaler is used to fit climate and terrain normalizers separately on the training set, and then applied to the entire dataset. During model training, the AdamW optimizer is used with an initial learning rate of 1e. -3 A learning rate scheduler incorporating linear preheating and cosine annealing is employed. Training is halted when the validation set loss fails to decrease over 30 consecutive epochs, and the model weights with the lowest validation loss are loaded. By pre-training on large-scale simulated data (such as data from three RGI regions), the model learns general physical patterns and feature interactions of glacier responses to climate.

[0108] A one-glacier cross-validation was implemented, and a three-stage progressive fine-tuning strategy was used to fine-tune the pre-trained model to obtain multiple fine-tuned models.

[0109] Implement cross-validation strategies, including:

[0110] The samples in the observation dataset are grouped according to the glacier to which they belong, resulting in M ​​glacier groups, where M≥2;

[0111] The leave-one-glacier cross-validation method is adopted, in which each glacier group is used as the test set and all other glacier groups are used as the training set.

[0112] For each validation fold, the parameters of the pre-trained model are fine-tuned in multiple stages using samples from the training set for that validation fold.

[0113] For example, suppose the observational data includes 26 glaciers with recorded data, each with 5-30 years of observations. In the first fold, all years of data for glacier A are used as the test set, and data for glaciers B through Z are used as the training set. A new StandardScaler is refitted using the training set (BZ), and both the training and test sets (A) are standardized. Then, a new model is instantiated, loading the pre-trained weights. This method prevents information from the test set (glacier A) from leaking to the model during the training phase (e.g., through global normalization).

[0114] A three-stage progressive fine-tuning strategy was adopted to train the fold model: In the first stage, all parameters of the encoder were frozen, and only the parameters of the regression simulation head were allowed to be updated. A relatively high initial learning rate was used in this stage.

[0115] In the second stage, the parameters of the feature fusion output module in the encoder are unfrozen so that they can be trained together with the parameters of the regression head module. A moderate initial learning rate is used in this stage.

[0116] In the third stage, all parameters of the encoder module are unfrozen, and end-to-end fine-tuning of the entire model is performed. A low initial learning rate is used in this stage.

[0117] In each fine-tuning stage, a dynamic learning rate scheduling strategy based on validation loss is adopted, and gradient pruning is implemented to stabilize the training process.

[0118] After each training cycle, the simulated loss of the model on the test set for that fold is calculated;

[0119] Monitor the test loss, and when it no longer decreases within a set number of consecutive periods, trigger the early stop mechanism to terminate the training of the current stage and save the model state with the lowest loss on the test set in that stage.

[0120] After completing all three stages of fine-tuning, the final model state is saved as the fine-tuned model for that validation fold.

[0121] For example, in the first stage, the learning rate is set to 1e. -4 In the first stage, only the regression head is trained to quickly adapt to the distribution of observed data; in the second stage, the parameters of the fusion layer are unfrozen, and the learning rate is adjusted to 3e. -5 The first stage teaches the model how to adjust feature fusion methods based on observed data; the second stage unfreezes all parameters and sets the learning rate to 1e. -5 Each stage uses test set loss monitoring and sets a large early stopping tolerance (e.g., 800 rounds). After traversing all glaciers, 50 fine-tuned models are finally obtained. Each model is trained on data except for a specific glacier and evaluated on that glacier.

[0122] The multiple fine-tuned models are selected based on their performance evaluation metrics on their respective test sets, and an integrated simulation model is constructed using a performance metric weighting method.

[0123] The process of selecting fine-tuned models that meet a preset performance threshold includes:

[0124] For each of the fine-tuned models, a performance evaluation index for the material balance simulation is calculated on its corresponding test set, the index including at least the coefficient of determination;

[0125] Sort all the fine-tuned models in descending order of their coefficient of determination;

[0126] Set a performance threshold for the coefficient of determination, and filter out fine-tuned models whose coefficient of determination is greater than or equal to the performance threshold, and mark them as high-quality candidate models.

[0127] For example, calculate the R² of each model on its reserved test glacier. Assuming a preset R² performance threshold of 0.5, select models with R² ≥ 0.5 from the 50 models, say 15. These models are considered to have good stability simulation capabilities on new, unseen glaciers.

[0128] The method of constructing an integrated simulation model using performance index weighting includes:

[0129] For all the selected high-quality candidate models, calculate the normalized ensemble weights for each model;

[0130] The normalized ensemble weights are calculated by dividing the coefficient of determination of the model by the sum of the coefficients of determination of all high-quality candidate models.

[0131] Therefore, the model with better performance will receive a higher weight in the ensemble simulation;

[0132] The ensemble simulation model itself does not contain any new trainable parameters. Its function is defined as follows: when performing simulation, it calls all high-quality candidate models for forward computation and sums the simulation results of each model according to their corresponding normalized ensemble weights to obtain the final ensemble simulation value.

[0133] For example, suppose the R² values ​​of three high-quality candidate models are 0.8, 0.7, and 0.6, respectively. Their weights are calculated as follows: 0.8 / (0.8+0.7+0.6)≈0.381, 0.7 / 2.1≈0.333, and 0.6 / 2.1≈0.286. For a new glacier dataset, if the three models provide simulated values ​​y1, y2, and y3, respectively, then the ensemble simulated value is 0.381. y1 + 0.333 y2 + 0.286 y3. This weighted approach gives greater weight to models with stronger generalization capabilities, combining the advantages of multiple models to obtain more stable and accurate simulation results than a single model.

[0134] After preprocessing the meteorological dynamics and static topographic features of the target glacier, the data are input into an integrated simulation model to simulate the glacier's mass balance and obtain the simulation results.

[0135] For the meteorological dynamics and static topographic features of the target glacier, the same preprocessing procedure as in the training phase was adopted, and the data were processed in a unified format, enhanced for slope aspect features, and cleaned for missing and outlier values. The standardized features were then input into all high-quality candidate models to obtain a set of preliminary simulation results.

[0136] Based on the pre-calculated normalized ensemble weights of each model, the preliminary simulation results of this group are weighted and averaged to output the final ensemble simulation results. Optionally, the standard deviation of the simulation results can be calculated as a measure of simulation uncertainty.

[0137] For example, to simulate the future mass balance of a glacier lacking long-term observation, we first acquire the glacier's topographic features and future climate scenario data, then perform the same aspect trigonometric transformation. The features are then normalized. These processed features are simultaneously input into high-quality candidate models to obtain corresponding simulated values. Finally, based on pre-calculated model weights, a weighted average is calculated to obtain the final integrated simulated value. Simultaneously, the standard deviation of the simulated values ​​is calculated as a measure of uncertainty in this simulation, providing a reference for decision-making.

[0138] Based on the simulation results of this invention, performance evaluation and uncertainty analysis are performed to generate visualization results and risk assessment reports.

[0139] Specifically, performance evaluation and uncertainty analysis include:

[0140] The simulation results of the integrated simulation model were compared with the measured mass balance labels of the target glacier, and multiple evaluation indicators were calculated, including root mean square error, mean absolute error, coefficient of determination, and Pearson correlation coefficient.

[0141] Visual error analysis is performed by plotting scatter plots of simulated and measured values ​​and overlaying them with an ideal fitting line.

[0142] By plotting the loss curve and evaluation metric change curve during the training process, the convergence and overfitting risk of the model can be analyzed. For ensemble simulations, the consistency and uncertainty range of the simulation results can be visually displayed by plotting the simulation distribution of each candidate model or calculating the simulation interval.

[0143] For example, during the cross-validation phase, simulated and measured scatter plots can be generated for each test glacier, along with metrics such as RMSE, MAE, and R². Loss descent curves during the pre-training and fine-tuning phases can be plotted to confirm that the model has converged sufficiently and is not overfitting. For ensemble simulations, a box plot can be generated to show the distribution of simulated values ​​for a given glacier from all candidate models, with the box range reflecting the simulation's uncertainty.

[0144] Regularly update model parameters and optimize the simulation system, including:

[0145] Establish a model version management and data version control mechanism to record the data, hyperparameters, model structure, and final performance used in each pre-training and fine-tuning process.

[0146] Set model update trigger conditions. When new, quality-controlled observational glacier data accumulates to a certain scale, a new round of fine-tuning training process is automatically or manually started to update the set of high-quality candidate models.

[0147] Implement continuous monitoring of model performance. If the performance of the integrated simulation model on new data is found to be degraded, trigger the model re-evaluation and iteration process.

[0148] For example, Git is used to manage code and model versions, and DVC (Data Version Control) is used to manage dataset versions. The system can be configured to automatically trigger a full-process fine-tuning and cross-validation, updating the integrated model library, when more than 10 glaciers with continuous observation data spanning more than 5 years are added. Preprocessing, model loading, simulation calculation, and plotting functions are encapsulated into a graphical interface, allowing users to upload data and obtain simulation reports with a single click, enabling operational implementation.

[0149] Example 2

[0150] Taking glacier RGI60-13.08782 as an example, the effectiveness of this method is illustrated. This glacier has over 20 years of continuous measured mass balance records in the observation dataset, meeting the sample size requirements for cross-validation. Using the ensemble simulation model constructed according to this invention, the meteorological dynamics and topographic features of the target glacier are input to perform mass balance prediction. The results are as follows: Figure 2 As shown, the predicted sequence (simulated values) and the measured sequence (observed values) of the glacier are plotted in the same graph. It can be seen that the predicted curve and the observed curve show a high degree of consistency in terms of trend and interannual fluctuation.

[0151] This demonstrates that the present invention achieves deep interactive fusion of climate and topographic features through a cross-attention Transformer architecture, enhances the model's generalization ability through a multi-stage learning strategy of pre-training and fine-tuning, ensures evaluation reliability through isolated cross-validation, and reduces uncertainty through a performance-weighted ensemble simulation mechanism. The present invention addresses key issues in existing methods such as insufficient feature interaction and high simulation uncertainty, achieving high-precision simulation of glacier mass balance and providing a reliable technical tool for glacier change research, water resource management, and climate change assessment.

[0152] It should be noted that the glacier mass balance simulation method described in the foregoing embodiments can be implemented by a corresponding system. The various modules contained in the system are consistent with the steps, principles and effects of the method, and will not be repeated here.

[0153] This invention also provides an electronic device and a computer-readable storage medium. The electronic device includes a processor, a memory, and a communication bus.

[0154] The computer program implementing the method of this invention can also be stored in a computer-readable storage medium. This storage medium includes, but is not limited to, various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks. When the program in the storage medium is read and executed, the method provided by this invention can be implemented.

[0155] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for simulating glacial mass balance based on feature interaction, characterized in that, include: After preprocessing the meteorological dynamics and static topographic features of the target glacier, the data are input into the integrated simulation model to perform glacier mass balance simulation and obtain the glacier mass balance simulation results. The integrated simulation model was constructed in the following manner: A multi-source dataset of glaciers was obtained. After the multi-source dataset of glaciers was processed in a unified format and enhanced with slope aspect features, it was divided into a simulation dataset and an observation dataset. A pre-trained model is obtained by training a model based on a cross-attention Transformer encoder architecture using a simulated dataset. When performing leave-one-out glacier cross-validation on the pre-trained model, multi-stage fine-tuning training is performed using the observation dataset to obtain multiple fine-tuned models. Multiple fine-tuned models are integrated based on performance metrics to construct an integrated simulation model; The model based on the cross-attention Transformer encoder architecture includes: a meteorological dynamic feature multilayer perceptron module, a static terrain feature multilayer perceptron module, a multilayer cross-attention interaction module, a feature fusion output module, and a regression simulation head; When training a model based on a cross-attention Transformer encoder architecture using a simulated dataset, The meteorological dynamic feature multilayer perceptron module extracts features from the input simulated dataset to obtain meteorological feature representations, while the static terrain feature multilayer perceptron module extracts features from the input simulated dataset to obtain terrain feature representations. The multi-layer cross-attention interaction module includes N sequentially connected interaction layers, where N≥2. Each interaction layer includes a sequentially connected multi-head cross-attention sub-layer and a feedforward neural network sub-layer. In each interaction layer, meteorological features are used as the query vector, and terrain features are used as the key vector and value vector. The attention mechanism calculates the attention weight based on the correlation between the query vector and the key vector, and performs weighted aggregation on the value vector to obtain the updated representation of the fused terrain information. The feature fusion output module concatenates the updated representation output by the final interaction layer with the terrain feature representation to obtain the fused feature representation. The regression simulation head performs regression simulation on the fused feature representation to predict the simulation results of glacier mass balance.

2. The glacier mass balance simulation method based on feature interaction as described in claim 1, characterized in that, The simulation dataset and the observation dataset were obtained in the following way: The data includes glacier observation datasets from field observation databases, including measured mass balance labels for multiple glaciers over multiple years; and glacier climate datasets from meteorological data platforms, including meteorological dynamic characteristics of multiple glaciers over multiple years. A static topographic feature dataset of glaciers was obtained from the global glacier catalog database, including the static topographic features of multiple glaciers. The glacier climate dataset and the static topographic feature dataset of glaciers were input into a physical model to simulate the mass balance of glaciers, resulting in a simulated glacier dataset, including simulated mass balance labels of multiple glaciers in multiple years. The observed glacier dataset, glacier climate dataset, glacier static topographic feature dataset, and simulated glacier dataset constitute a multi-source dataset for glaciers. The multi-source datasets of glaciers are processed in sequence to achieve a unified format, slope aspect enhancement, and missing and outlier cleaning to obtain a standardized multi-source dataset. The observed glacier dataset, glacier climate dataset, and glacier static topographic feature dataset are combined into an observed dataset, and the glacier climate dataset, glacier static topographic feature dataset, and simulated glacier dataset are combined into a simulated dataset.

3. The glacier mass balance simulation method based on feature interaction as described in claim 2, characterized in that, The pre-trained model is trained in the following manner: The error between the predicted glacier mass balance simulation results and the simulated mass balance labels in the simulation dataset is used as the loss function, and the parameters are updated through backpropagation to obtain the pre-trained model.

4. The glacier mass balance simulation method based on feature interaction as described in claim 2, characterized in that, The pre-trained model is trained in the following manner: The simulated dataset is divided into a training set and a validation set. The dynamic meteorological features and static terrain features of the training set samples are used as inputs, and the simulated mass balance labels of the samples are used as targets. The mean squared error loss function is used for optimization. The loss value of the mean squared error loss function is monitored on the validation set. When the validation loss value no longer decreases over multiple consecutive training epochs, an early stopping mechanism is triggered, and the model parameters with the lowest validation loss value are saved as the final pre-trained model.

5. The glacier mass balance simulation method based on feature interaction as described in claim 2, characterized in that, The specific method for the cross-validation of the "one-glacier" method is as follows: The samples in the observation dataset are grouped according to the glacier to which they belong, resulting in M ​​glacier groups, where M≥2; The leave-one-glacier cross-validation method is adopted, in which each glacier group is used as the test set and all other glacier groups are used as the training set. For each validation fold, the parameters of the pre-trained model are fine-tuned in multiple stages using samples from the training set for that validation fold.

6. The glacier mass balance simulation method based on feature interaction as described in claim 5, characterized in that, The specific method of the multi-stage fine-tuning training is as follows: The fold pre-training model was trained using a three-stage fine-tuning method. In the first stage, all parameters of the meteorological dynamic feature multilayer perceptron module, the static terrain feature multilayer perceptron module, the multilayer cross-attention interaction module, and the feature fusion output module were frozen, and only the parameters of the regression simulation head were updated. In the second stage, the parameters of the feature fusion output module are unfrozen, so that they can be used together with the parameters of the regression simulation head for training. In the third stage, all parameters of the meteorological dynamic feature multilayer sensor module, the static terrain feature multilayer sensor module, the multilayer cross-attention interaction module, and the feature fusion output module are unfrozen and fine-tuned end-to-end. After completing the three-stage fine-tuning, the fine-tuned model of this verification fold is obtained, and finally, M glacier groups correspond to M fine-tuned models.

7. The glacier mass balance simulation method based on feature interaction as described in claim 6, characterized in that, The initial learning rate of the first stage > the initial learning rate of the second stage > the initial learning rate of the third stage.

8. The glacier mass balance simulation method based on feature interaction as described in claim 7, characterized in that, The integrated simulation model was constructed in the following manner: For each fine-tuned model, calculate the performance evaluation index of the mass balance simulation on its corresponding test set to obtain the determination coefficient of each fine-tuned model. From M fine-tuned models, extract the fine-tuned models with a determination coefficient greater than the preset value to form multiple high-quality candidate models. For each high-quality candidate model, divide its determination coefficient by the sum of the determination coefficients of all high-quality candidate models to obtain the normalized ensemble weight of the high-quality candidate model. An ensemble simulation model is constructed by weighting and fusing all high-quality candidate models based on normalized ensemble weights.

9. A glacier mass balance simulation system based on feature interaction, characterized in that, include: The model building module is used to acquire multi-source datasets of glaciers. After processing the multi-source datasets of glaciers in a unified format and enhancing their aspect features, they are divided into simulated datasets and observational datasets. A model based on a cross-attention Transformer encoder architecture is trained using the simulated dataset to obtain a pre-trained model. When performing leave-one-out glacier cross-validation on the pre-trained model, multi-stage fine-tuning training is performed using the observational dataset to obtain multiple fine-tuned models. The multiple fine-tuned models are then integrated based on performance metrics to construct an ensemble simulation model. The model based on the cross-attention Transformer encoder architecture includes: a meteorological dynamic feature multilayer perceptron module, a static terrain feature multilayer perceptron module, a multilayer cross-attention interaction module, a feature fusion output module, and a regression simulation head; When training a model based on a cross-attention Transformer encoder architecture using a simulated dataset, The meteorological dynamic feature multilayer perceptron module extracts features from the input simulated dataset to obtain meteorological feature representations, while the static terrain feature multilayer perceptron module extracts features from the input simulated dataset to obtain terrain feature representations. The multi-layer cross-attention interaction module includes N sequentially connected interaction layers, where N≥2. Each interaction layer includes a sequentially connected multi-head cross-attention sub-layer and a feedforward neural network sub-layer. In each interaction layer, meteorological features are used as the query vector, and terrain features are used as the key vector and value vector. The attention mechanism calculates the attention weight based on the correlation between the query vector and the key vector, and performs weighted aggregation on the value vector to obtain the updated representation of the fused terrain information. The feature fusion output module concatenates the updated representation output by the final interaction layer with the terrain feature representation to obtain the fused feature representation. The regression simulation head performs regression simulation on the fused feature representation to predict the simulation results of glacier mass balance. The simulation module is used to preprocess the meteorological dynamics and static topographic features of the target glacier and then input them into the integrated simulation model to simulate the glacier mass balance and obtain the glacier mass balance simulation results.