Method for accelerating LBFGS inversion by using physically guided and data-driven multi-task forward modeling simulation

By introducing physically-guided and data-driven multi-task neural networks into the traditional LBFGS inversion framework for forward response calculation, the problem of too long calculation time in the traditional inversion method is solved, and a more efficient inversion process is achieved, which is suitable for the development of clean geothermal energy.

CN120180686AActive Publication Date: 2025-06-20CHINA WEST NORMAL UNIVERSITY +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510225511.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-20
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

In traditional geothermal exploration, the fault recognition-dependent geoelectromagnetic inversion algorithm requires a large number of forward response simulation calculations, resulting in too long calculation time and cannot quickly perform large-scale fine inversion, limiting the efficiency of on-site analysis.

Method used

Physical bootstrap and data-driven multi-task neural network (PDMNet) is used to fit and train MT forward response calculations to generate efficient forward response models, and embed them in the traditional LBFGS inversion framework to replace the traditional forward response calculation module.

Benefits of technology

This significantly accelerates the forward response calculation in LBFGS inversion, improves the inversion efficiency, and enables the development and utilization of clean geothermal energy more quickly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120180686A_ABST
    Figure CN120180686A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of geophysics, and provides a method for accelerating LBFGS inversion by using physical guidance and data-driven multi-task forward modeling simulation, which comprises the following steps of: 1, writing a physical guidance and data-driven multi-task neural network (PDMNet) by using a python language to perform fitting training on MT forward modeling response calculation; 2, converting the python language model obtained by training into a dynamic link library program written by a C + + language; 3, a dynamic link library program is integrated to replace a forward modeling response calculation module in a traditional LBFGS inversion method written by a Fortran language, and improvement is carried out; and 4, predicting a transverse magnetic TM forward modeling response task through an improved traditional LBFGS inversion method. According to the method, the traditional MT LBFGS inversion can be effectively accelerated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of geophysics, and specifically, to a method for accelerating LBFGS inversion using physics-guided and data-driven multi-task forward simulation. Background Art

[0002] Geothermal resources are playing an increasingly important role in the modern industrial system. Since geothermal energy is a clean energy source, more and more potential geothermal development areas are being re-explored. In geothermal surveys, fault identification is one of the most important steps. The geophysical magnetotelluric method (MT), as a favorable method for identifying faults, is widely used in the surveys of geothermal exploration areas.

[0003] In order to obtain effective tomographic imaging results in geothermal areas, inversion algorithms have been widely applied in the MT method. However, all these inversion algorithms must call a large number of forward response simulation calculations to determine the root mean square (rms) error between the simulated data and the measured data. Traditional forward response calculations require the calculation of large sparse matrices, which makes the forward response calculation time increase rapidly with the expansion of the matrix. Therefore, if a large amount of measured data needs to be processed, large-scale fine inversion cannot be quickly carried out on-site in the field, which means that traditional inversion methods are not conducive to the rapid analysis of exploration personnel on-site. Summary of the Invention

[0004] The content of the present invention is to provide a method for accelerating LBFGS inversion using physics-guided and data-driven multi-task forward simulation, which can effectively accelerate the traditional MT LBFGS inversion method.

[0005] A method for accelerating LBFGS inversion using physics-guided and data-driven multi-task forward simulation according to the present invention includes the following steps:

[0006] I. Fitting and training the MT forward response calculation using a physics-guided and data-driven multi-task neural network (PDMNet) written in the Python language, that is, the training loss function consists of a data fitting term and a model fitting term; the data fitting term uses a multi-task form for forward response calculation, that is, an encoder encodes the geoelectric model, and 2 decoders calculate the apparent resistivity and impedance phase respectively, and then fit with the label data; the model fitting term then has Bostick perform inversion calculations on the apparent resistivity and impedance phase obtained by the 2 decoders, and then fit with the designed geoelectric model; through such physics-guided and data-driven multi-task training, the data calculation accuracy is improved;

[0007] II. Converting the trained Python language model into a dynamic link library program written in the C++ language;

[0008] III. Integrate and replace the forward response calculation module in the traditional LBFGS inversion method written in Fortran with a dynamic link library program for improvement;

[0009] IV. Predict the transverse magnetic TM forward response task by the improved traditional LBFGS inversion method.

[0010] Preferably, in step I, generate the corresponding apparent resistivity data set and impedance phase data set by the finite difference method, and use the T-Unet hybrid neural network to train them.

[0011] Preferably, the apparent resistivity and the phase φ TM are solved by the following formula:

[0012]

[0013] where ρ represents the underground resistivity, H x represents the magnetic field component in the x direction, ω represents the angular frequency, μ is the magnetic permeability, and E y is the electric field strength in the y direction.

[0014] Preferably, the objective inversion function of the improved traditional LBFGS inversion method is:

[0015]

[0016] where is the forward response value predicted by the hybrid neural network, m, m0, C d , C m are the inversion parameter, initial model, data, and model-data covariance matrix respectively, d obs represents the observation vector λ represents the factor used to balance the data term and model term in the objective function.

[0017] Preferably, for the traditional LBFGS inversion method, it is necessary to continuously call the forward response function to determine whether the root mean square error has been reduced to the threshold. Using PDMNet can quickly calculate the forward response value, thus accelerating the traditional LBFGS inversion.

[0018] Preferably, a physical model loss function is added to the neural network loss function, that is, by performing Bostick fast imaging on the predicted forward response value and fitting it with the designed model, so as to continuously optimize the training network and continuously adjust the parameters.

[0019] Preferably, when calculating the forward response, it is necessary to calculate the apparent resistivity and impedance phase, and adopt multi-task network learning to calculate the apparent resistivity and impedance phase simultaneously.

[0020] The beneficial effects of the present invention are as follows:

[0021] The present invention further embeds the forward response model obtained by physical guidance and data-driven multi-task neural network training as a calculation module into the traditional LBFGS inversion framework, replacing the forward response calculation module in the traditional LBFGS. This can quickly improve the calculation efficiency of the forward response in LBFGS inversion, realize the inversion method combining traditional electromagnetic inversion and neural network, improve its inversion efficiency and be used for the efficiency of clean geothermal energy development and utilization. Description of the Drawings

[0022] Figure 1 It is a flowchart of a method for accelerating L-BFGS inversion using physical guidance and data-driven multi-task neural network;

[0023] Figure 2 It is a forward scheme of physical guidance and data-driven multi-task neural network;

[0024] Figure 3 It is a schematic diagram of TUnet multi-task learning

[0025] Figure 4 It is a schematic diagram for comparing the final inversion results;

[0026] Figure 5 It is a comparison of the forward modeling responses during the intermediate iteration of the two methods

[0027] Figure 6 It is a schematic diagram for comparing the final forward modeling responses of the two methods. Detailed Embodiments

[0028] To further understand the content of the present invention, the present invention will be described in detail in combination with the drawings and embodiments. It should be understood that the embodiments are only for explaining the present invention and not for limiting it.

[0029] As Figure 1 shown, this embodiment provides a method for accelerating LBFGS inversion using physical guidance and data-driven multi-task neural network, which includes the following steps:

[0030] 1. Use the Python language to write a physics-guided and data-driven multi-task neural network to fit and train the MT forward response calculation; that is, the training loss function consists of a data fitting term and a model fitting term; the data fitting term uses a multi-task form to perform forward response calculations, that is, one encoder encodes the geoelectric model, and 2 decoders calculate the apparent resistivity and impedance phase respectively, and then fit with the label data; the model fitting term has Bostick perform inversion calculations on the apparent resistivity and impedance phase obtained by the 2 decoders, and then fit with the designed geoelectric model; through such physics-guided and data-driven multi-task training, improve the data calculation accuracy;

[0031] 2. Convert the trained Python language model into a dynamic link library program written in C++ language;

[0032] 3. Integrate and replace the forward response calculation module in the traditional LBFGS inversion method written in Fortran language with the dynamic link library program for improvement;

[0033] 4. Predict the transverse magnetic TM forward response task through the improved traditional LBFGS inversion method.

[0034] In step 1, according to the following formula, use the finite difference method to generate the corresponding apparent resistivity data set and impedance phase data set, and use the physics-guided and data-driven multi-task neural network to train and fit them. The physics-guided and data-driven loss function is shown in Figure 2 as shown, and the TUnet multi-task architecture diagram is as shown in Figure 3 as shown.

[0035] Apparent resistivity and phase φ TM are solved by the following formula:

[0036]

[0037] where ρ represents the underground resistivity, H x represents the magnetic field component in the x direction, ω represents the angular frequency, and μ is the magnetic permeability.

[0038] In MT two-dimensional inversion, the transverse magnetic TM has strong lateral resolution, so it is widely used for fault identification. Therefore, in this embodiment, the control equation of the transverse magnetic TM polarization is selected as the research object:

[0039]

[0040] H x | z=0 = 1

[0041] y and z represent the y - direction and z - direction. Using the finite - difference method (FDM) and a type of boundary conditions, these equations can be transformed into a problem of solving a large, complex, sparse matrix:

[0042] AH x =b

[0043] where A is a large complex sparse matrix, H x is the horizontal magnetic - field vector to be solved, and b is the right - hand side constant. By solving the above equation and its relationship with the electric field, the apparent resistivity and phase can be obtained. See the apparent resistivity and phase solution formulas for details.

[0044] In the traditional L - BFGS inversion method, the forward - response function is continuously called to determine whether the root - mean - square error has been reduced to the threshold. It uses the TM - model equation of MT for inversion, and the form of the objective function is set as follows:

[0045]

[0046] where m, m0, C d , C m are the inversion parameter, initial model, data, and data - model covariance matrix respectively, d obs represents the observation vector λ represents the factor used to balance the data term and model term in the objective function. It can be seen from the objective function that due to the presence of the forward - response operator in the objective function, as the number of iterations increases, a large number of forward - response calculations will be frequently executed, which consumes a large amount of time and thus affects the inversion execution efficiency.

[0047] From Figure 1 the L - BFGS framework, it can be seen that to calculate the objective function, the forward - response calculation must be called. Therefore, the forward - response simulation occupies a large proportion of the calculations in the entire L - BFGS inversion. However, the traditional forward - response calculation takes a lot of time. To solve this problem, in this embodiment, a physics - guided and data - driven multi - task neural - network forward - response calculation simulation is used to replace the traditional forward - response calculation module in the inversion system to achieve the advantage of quickly calculating the inversion objective function.

[0048] At present, the vast majority of geophysical inversion methods are developed based on Fortran language. This embodiment is also developed based on Fortran language. Therefore, in order to embed the neural network training model written in Python into the Fortran language environment and then deploy the trained model, it is first necessary to perform secondary development in C++ and convert it into a dynamic link library. At this time, the dynamic link library can be used in the Fortran development environment to replace the forward response calculation in the traditional LBFGS inversion, thus realizing the integration of Python, C++, and Fortran languages. F(m) is replaced by the forward prediction result of the neural network.

[0049] The target inversion function of the improved traditional LBFGS inversion method is:

[0050]

[0051] Among them, is the forward response value predicted by the hybrid neural network.

[0052] In this embodiment, a physical model loss function is added to the neural network loss function, that is, by performing Bostick fast imaging on the predicted forward response value and fitting it with the designed model, the training network is continuously optimized and the parameters are continuously adjusted.

[0053] In this embodiment, when performing forward response calculation, it is necessary to calculate the apparent resistivity and impedance phase, and multi-task network learning is adopted to calculate the apparent resistivity and impedance phase simultaneously.

[0054] Experiments and Results

[0055] A. Experimental Description

[0056] Before replacing the forward response module in the traditional LBFGS inversion, it is necessary to generate a neural network forward response model. Creating a sample dataset is a key step in generating a neural network model. In many fields, networks are usually trained using rich and accurately labeled open-source datasets. However, obtaining an actual sample dataset of thousands or even tens of thousands of MT forward responses is quite challenging. It is worth noting that traditional inversion algorithms, such as LBFGS or NLCG, involve a large amount of forward response calculations during the iterative inversion process. Since the neural network model is developed in the Python language environment using PyTorch, and finally accelerating LBFGS requires loading and calling this model in the Fortran environment. Therefore, the first step is to overcome the problem of migrating the PyTorch network model between different environments, because PyTorch itself provides a method to convert the model into a serialized form using the TorchScript method. This method aims to ensure that the model can be seamlessly transferred between platforms and environments, thereby improving the flexibility and portability of the model. Then, the neural network model compiled and converted by TorchScript can be saved using Python. At this time, the C++ language environment can recognize and load the neural network model. The next step is to use the tracing function in Torch to generate module objects for apparent resistivity and impedance phase. Then, the converted model is loaded and called through the C++ API (LibTorch) to complete the deployment of the neural network model. Finally, a dynamic link library is generated in the C++ environment for loading and calling the LBFGS inversion program in the Fortran environment.

[0057] B. Experimental Results of Generalization Ability Verification

[0058] In the experiment, to verify the generalization performance of the network, we generated a random composite resistivity model with gradually changing resistivity values through cubic spline interpolation, aiming to create a training dataset consistent with the actual underground model to ensure effective application. The relevant inversion parameters are as follows: the initial model is a homogeneous medium with a resistivity of 100 Ω·m. The error level is 0.05, λ is 0.1, the root mean square threshold is 1.05, and the threshold of the number of iterations is 50. Obviously, the LBFGS inversion integrating the neural network forward response has a very similar root mean square inversion iteration curve to the traditional LBFGS inversion, and both can reduce the fitting difference. Figure 4 It shows that the final inversion results obtained by different methods have good consistency. Figure 4 In it, the first row is the designed geoelectric model (a, b, c); the second row is the results of the conventional LBFGS inversion (d, e, f); the third row is the results of the LBFGS inversion integrating the comprehensive DL forward modeling (g, h, i); the fourth row is the relative error distribution between the second row and the third row (j, k, l).

[0059] To fully reflect the comparative changes in the forward responses during the inversion iteration process, this embodiment selects the forward responses in the middle iteration process of each model for comparison, as Figure 5 shown. Figure 6 shows the Figure 3 comparison of the forward responses of the final inversion iteration of the model in

[0060] Figure 6 In Figure 4 , (a) is the Figure 4 comparison of the forward responses of two inversion methods for model (a) in Figure 4 . (b)

[0061] Figure 6 shows the comparison of the forward responses of two inversion methods for model (b). (c) is the

[0062] comparison of the forward responses of two inversion methods for model (c) in

[0063] Table 1 Figure 5 Evaluation parameters of the technical achievements of two inversion methods in

[0064]

[0065] Based on the above experimental results, compared with the traditional LBFGS method, the two-dimensional LBFGS inversion method integrating neural network forward modeling improves the time efficiency by 38.21%.

[0066] The above has schematically described the present invention and its embodiments. This description is not restrictive. What is shown in the drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. Therefore, if those of ordinary skill in the art are inspired by this and, without departing from the gist of the present invention, design similar structural forms and embodiments to this technical solution without creative efforts, they shall fall within the protection scope of the present invention.

Claims

1. A method for accelerating LBFGS inversion using physics-guided and data-driven multi-task forward simulation, characterized by: The following steps are involved:

1. Use the physics-guided and data-driven multi-task neural network PDMNet written in Python to fit and train the MT forward response calculation; 2. Convert the trained Python language model into a dynamic link library program written in C++; Third, the dynamic link library program is integrated to replace the forward response calculation module in the traditional LBFGS inversion method written in Fortran language to improve it; 4. Predict the transverse magnetic TM forward response task through the improved traditional LBFGS inversion method.

2. A method for accelerating LBFGS inversion using physics-guided and data-driven multi-task forward simulation according to claim 1, characterized in that: In step 1, the geoelectric model is generated using the cubic spline interpolation curve, and the corresponding apparent resistivity dataset and impedance phase dataset are calculated using the finite difference method, which are then trained using the PDMNet multi-task neural network.

3. The method of accelerating LBFGS modeling using physics-guided and data-driven multi-task forward simulation according to claim 2, characterized in that: Apparent resistivity and phase φ TM Solved by the following formula: Where ρ represents the underground resistivity, H x represents the magnetic field component in the x direction, ω represents the angular frequency, μ is the magnetic permeability, and E y is the electric field strength in the y direction.

4. The method of accelerating LBFGS modeling using physics-guided and data-driven multi-task forward simulation according to claim 3, characterized in that: Improved target inversion function of the traditional LBFGS inversion method for: in, Forward response values ​​predicted by physics-guided and data-driven multi-task neural network (PDMNet), m, m0, C d ,C m are the inversion parameters, initial model, data and model data covariance matrix, d obs Represents the observation vector λ represents the factor used to balance the data term and model term in the objective function.

5. The method of accelerating LBFGS modeling using physics-guided and data-driven multi-task forward simulation according to claim 4, characterized in that: The traditional LBFGS inversion method needs to continuously call the forward response function to determine whether the root mean square error has been reduced to a threshold. The use of PDMNet can quickly calculate the forward response value, thereby accelerating the traditional LBFGS inversion.

6. The method of accelerating LBFGS modeling using physics-guided and data-driven multi-task forward simulation according to claim 5, characterized in that: A physical model loss function is added to the neural network loss function, that is, the predicted forward response value is subjected to Bostick fast imaging and fitted with the design model, so that the training network can be continuously optimized and parameters can be continuously adjusted.

7. The method of accelerating LBFGS modeling using physics-guided and data-driven multi-task forward simulation according to claim 6, characterized in that: When performing forward response calculations, it is necessary to calculate the apparent resistivity and impedance phase. Multi-task network learning is used to simultaneously calculate the apparent resistivity and impedance phase.

Citation Information

Patent Citations

  • Processing method of online inversion data

    CN114880128A

  • Underground structure multi-electrical parameter information inversion method, device and medium

    CN117688836A

  • Magnetotelluric physical and data hybrid drive inversion method

    CN118194728A

  • Object number hybrid drive inversion method based on ground-air electromagnetism

    CN118330759A

  • Stratum parameter inversion method based on physically-driven neural network

    CN119129672A