Model parameter fusion method and device

By evaluating and splicing the local and global compatibility of deep neural network models, the model parameter incompatibility problem is solved, and the performance and stability of the fusion model are improved.

CN119720101AActive Publication Date: 2025-03-28SHANDONG INSPUR SCI RES INST CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510221599.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-03-28
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

In application scenarios such as multi-task learning, transfer learning, and model integration, there is often incompatibility in model parameters, which affects the performance of the fusion model and leads to instability in output.

Method used

By obtaining the model parameters of each parameter position of the model to be fused, local and global compatibility are evaluated, and parameter splicing is performed to obtain the fusion parameters. Specific steps include local level evaluation, global level evaluation and parameter splicing, and weighted splicing using dual compatibility scores.

Benefits of technology

An accurate and intelligent parameter splicing strategy is realized to retain information to the greatest extent and improve the performance and robustness of the fusion model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720101A_ABST
    Figure CN119720101A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and provides a model parameter fusion method and device, and the method comprises the steps: obtaining model parameters of all parameter positions in a to-be-fused model, and enabling the to-be-fused model to be constructed based on a deep neural network; based on the model parameters of the to-be-fused model, respectively evaluating each model parameter in the to-be-fused model to obtain a local-level compatibility score of each model parameter; constructing histogram distribution corresponding to the model parameters of the to-be-fused model, and quantifying a global-level compatibility score of the to-be-fused model based on the histogram distribution; and based on the local-level compatibility score of each model parameter and the global-level compatibility score corresponding to each model parameter, splicing the model parameters of each parameter position to obtain a fusion parameter of each parameter position in the fusion model. According to the method provided by the invention, an accurate and intelligent parameter splicing strategy is realized, information is reserved to the greatest extent, and the model performance and robustness of the fusion model are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and device for fusing model parameters. Background Art

[0002] Deep neural networks have achieved remarkable results in many fields such as image recognition, natural language processing, and recommendation systems. In the actual application of complex tasks, in order to save training costs and improve training efficiency, the existing initial models with good performance in various fields built based on deep neural networks are generally used for multi-task learning, transfer learning, and model integration to obtain a fusion model that can ultimately handle complex tasks.

[0003] However, in application scenarios such as multi-task learning, transfer learning, and model integration, the problem of model parameter incompatibility is often encountered. Due to differences in data distribution, network structure, and optimization strategy during the training process, the learned parameters of different models are often incompatible. This incompatibility not only affects the performance of the fusion model, but may also cause the output of the fusion model to be unstable. Summary of the invention

[0004] The present invention provides a method and device for fusing model parameters, which are used to solve the problem that model parameters to be fused in the prior art often have incompatibility, which not only affects the performance of the fusion model, but also may cause the output of the fusion model to be unstable.

[0005] The present invention provides a method for fusing model parameters, comprising: Obtaining model parameters of each parameter position in the model to be fused, wherein the model to be fused is constructed based on a deep neural network; Based on the model parameters of the model to be fused, respectively evaluating each model parameter in the model to be fused to obtain a local level compatibility score of each model parameter; Constructing a histogram distribution corresponding to the model parameters of the model to be fused, and quantifying the global compatibility score of the model to be fused based on the histogram distribution; Based on the local-level compatibility score of each model parameter and the global-level compatibility score corresponding to each model parameter, the model parameters at each parameter position are spliced ​​to obtain the fusion parameters corresponding to each parameter position in the fusion model.

[0006] According to a model parameter fusion method provided by the present invention, the model parameters at each parameter position are spliced ​​based on the local level compatibility score of each model parameter and the global level compatibility score corresponding to each model parameter to obtain the fusion parameters corresponding to each parameter position in the fusion model, including: Based on the local compatibility score of each model parameter and the global compatibility score corresponding to each model parameter, score fusion is performed to obtain a dual compatibility score of each model parameter; Based on the dual compatibility scores of the model parameters, the model parameters at the parameter positions are spliced ​​to obtain the fusion parameters of the fusion model.

[0007] According to a model parameter fusion method provided by the present invention, the model parameters at the positions of the parameters are spliced ​​based on the dual compatibility scores of the model parameters to obtain the fusion parameters of the fusion model, including: Determine the task complexity score for each network layer; When the task complexity score is greater than a preset score threshold, based on the dual compatibility scores of the model parameters under each network layer, the model parameters at each parameter position under each network layer are weightedly spliced ​​to obtain the fusion parameters.

[0008] According to a model parameter fusion method provided by the present invention, the step of determining the task complexity score of each network layer further includes: When the task complexity score is not greater than a preset score threshold, the dual compatibility scores corresponding to the model parameters under any network layer in the model to be fused are compared, and the model parameters corresponding to the dual compatibility scores with larger comparison results are used as the fusion parameters.

[0009] According to a model parameter fusion method provided by the present invention, the step of determining the task complexity score of each network layer includes: Determine the task complexity score based on at least one of the number of network layers and the type of network layers to which the parameter positions corresponding to the model parameters belong; The network layer type includes at least one of a convolutional layer, a fully connected layer, and a pooling layer.

[0010] According to a model parameter fusion method provided by the present invention, based on the model parameters of the model to be fused, each model parameter in the model to be fused is evaluated respectively to obtain a local level compatibility score of each model parameter, including: Extracting a parameter matrix of model parameters of the model to be fused; Based on the uncertainty evaluation network and the parameter matrix of the model to be fused, each model parameter is evaluated respectively to obtain a local level compatibility score of each model parameter.

[0011] According to a model parameter fusion method provided by the present invention, based on the local level compatibility score of each model parameter and the global level compatibility score corresponding to each model parameter, the model parameters at each parameter position are spliced ​​to obtain the fusion parameters corresponding to each parameter position in the fusion model, and then the method includes: Obtaining fine-tuning sample data of the fusion model; Comparing the fine-tuning sample data with the initial sample data of the model to be fused to obtain a sample distribution comparison result; When the sample distribution comparison result shows that there is a difference, based on the dual compatibility score of each model parameter and the sample distribution comparison result, the optimization weight of the fusion parameter belonging to the same parameter position as each model parameter is calculated; Determining the learning rate of each fusion parameter in the current iteration round based on the optimization weight of each fusion parameter and the previous learning rate of each fusion parameter in the previous iteration round; Based on the optimization weights and learning rates of the fusion parameters, the fusion parameters are updated in the current iteration round to obtain updated fusion parameters.

[0012] According to a model parameter fusion method provided by the present invention, the learning rate of each fusion parameter in the current iteration round is determined based on the optimization weight of each fusion parameter and the previous learning rate of each fusion parameter in the previous iteration round, which is expressed as: ; in, Represents the learning rate of each fusion parameter of the current iteration round; represents the previous learning rate of each fusion parameter in the previous iteration round; Indicates the dynamic adjustment coefficient; represents the optimization weight of each fusion parameter; Indicates the number of rows of the parameter matrix corresponding to the fusion parameters; Indicates the number of columns of the parameter matrix corresponding to the fusion parameters.

[0013] The present invention also provides a model parameter fusion device, comprising: An acquisition unit, which acquires model parameters at each parameter position in a model to be fused, wherein the model to be fused is constructed based on a deep neural network; A local level evaluation unit, based on the model parameters of the model to be fused, respectively evaluates each model parameter in the model to be fused, and obtains a local level compatibility score of each model parameter; A global level evaluation unit, constructing a histogram distribution corresponding to the model parameters of the model to be fused, and quantifying the global level compatibility score of the model to be fused based on the histogram distribution; The fusion unit splices the model parameters at each parameter position based on the local level compatibility score of each model parameter and the global level compatibility score corresponding to each model parameter to obtain the fusion parameters corresponding to each parameter position in the fusion model.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for fusing model parameters as described above is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for fusing model parameters as described in any one of the above is implemented.

[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for fusing model parameters as described above is implemented.

[0017] The model parameter fusion method and device provided by the present invention quantify the local-level compatibility score of each model parameter of the model to be fused, as well as the global-level compatibility score of the model to be fused, and splice the model parameters at each parameter position through the local-level compatibility score of each model parameter and the global-level compatibility score corresponding to each model parameter, so as to obtain the fusion parameters corresponding to each parameter position in the fusion model, realize an accurate and intelligent parameter splicing strategy, retain information to the greatest extent, and greatly improve the model performance and robustness of the fusion model. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 It is one of the flow charts of the model parameter fusion method provided by the present invention; Figure 2 This is the second flow chart of the model parameter fusion method provided by the present invention; Figure 3 It is a structural schematic diagram of a device for fusing model parameters provided by the present invention; Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] In view of the above problems, the present invention provides a model parameter fusion method to achieve efficient model parameter fusion, thereby improving the robustness and generalization ability of the model. Figure 1 This is one of the flow charts of the model parameter fusion method provided by the present invention, such as Figure 1 As shown, the method includes: Step 110, obtaining model parameters of each parameter position in the model to be fused, wherein the model to be fused is constructed based on a deep neural network; Here, the model to be fused may refer to a deep neural network model obtained by pre-training on a large-scale data set. The features learned by the model to be fused on general tasks can be transferred to other specific tasks, thereby accelerating the training process of the models corresponding to other specific tasks and improving the performance of the models.

[0022] Specifically, two pre-trained models related to the target task can be obtained and used as the models to be fused. The models to be fused here can be different instances of the same type, such as image recognition models, audio recognition models, etc. In addition, the model parameters of each parameter position in the model to be fused can be accessed through the API provided by the deep learning framework, and the model parameters of each parameter position in multiple pre-trained models can be obtained to obtain the model parameters of each parameter position in the model to be fused. The deep learning framework here can be TensorFlow or PyTorch. It should be noted that there can be multiple models to be fused here, at least two.

[0023] Step 120, based on the model parameters of the model to be fused, respectively evaluate each model parameter in the model to be fused to obtain a local level compatibility score of each model parameter; Here, the local-level compatibility score can be used to measure the applicability of a single model parameter among all model parameters of the model to be fused, and can reflect the performance of a single model parameter on a specific layer, task or dataset, that is, it is used to reflect the compatibility of a single model parameter with the model parameters of all models to be fused.

[0024] Specifically, for the local compatibility score of each model parameter of a single model to be fused, the local compatibility score of each model parameter can be obtained by locally evaluating the parameter value of the model parameter at each parameter position. For example, the uncertainty matrix of the parameter value of each model parameter can be calculated through the parameter uncertainty evaluation network to obtain the local compatibility score of the model parameter and the compatibility score of a single parameter dimension. Similarly, the local compatibility score of each model parameter of another fusion model can be calculated by the same method as above.

[0025] Step 130, constructing a histogram distribution corresponding to the model parameters of the model to be fused, and quantifying the global compatibility score of the model to be fused based on the histogram distribution; Here, the global compatibility score can be used to measure the consistency and applicability of the model parameters of a single model to be fused among the model parameters of all models to be fused. It can be used to reflect the overall distribution characteristics of the model parameters of a single model to be fused and the degree of matching with the ideal distribution, that is, to reflect the compatibility of the model parameters of a single model to be fused with the model parameters of all models to be fused as a whole.

[0026] Specifically, for the global compatibility score of a single model to be fused, a histogram distribution corresponding to the model parameters of the model to be fused is constructed, and based on the histogram distribution, the global compatibility score of the model to be fused is quantified. Specifically, first, the parameter values ​​of the model parameters at each parameter position can be counted, and the parameter value range can be equally divided into u intervals, counting the number of parameters in each interval , construct the histogram distribution corresponding to the model parameters of a single model to be fused. Then, we can calculate the parameter values ​​of the model parameters that fall in the i The probability in the interval , can be calculated by the following formula: = ; In the formula, Indicates that the parameter value falls in i The probability in the interval Indicates i The number of parameters in the interval; Indicates the number of rows of the parameter matrix corresponding to the model parameters of the model to be fused; Indicates the number of columns of the parameter matrix corresponding to the model parameters of the model to be fused.

[0027] Next, the information entropy of the model to be fused can be calculated to consider the complexity of the model and the risk of overfitting, and a regularization term can be introduced. Here, the information entropy of the model to be fused can be calculated using the following formula: ; In the formula, Represents the information entropy of the fusion model; Indicates model parameters, k Indicates the total number of model parameters of the fusion model; represents the regularization coefficient; Represents the L2 norm of the model parameters of the fusion model, which is used to control the model complexity.

[0028] Then, the information entropy of another model to be fused can be calculated by the aforementioned method of calculating the information entropy of a single model to be fused. Then, the global compatibility score of the single model to be fused can be calculated by the difference in the information entropy of the two models to be fused. Here, the global compatibility score of the single model to be fused can be calculated by the following formula: ; In the formula, and They represent the global compatibility scores of the models A and B to be fused, respectively, and G represents the global level; represents the global uncertainty assessment network; Represents the information entropy of the model A to be fused; represents the information entropy of the model to be fused B. From the formula, we can see that the global compatibility scores of the models to be fused are the same.

[0029] Step 140, based on the local level compatibility score of each model parameter and the global level compatibility score corresponding to each model parameter, the model parameters at each parameter position are concatenated to obtain the fusion parameters corresponding to each parameter position in the fusion model.

[0030] Specifically, for the model parameters corresponding to any same parameter position of the model to be fused, in order to calculate the fusion parameters of the parameter position, the model parameters of the parameter position can first be evaluated by the local compatibility score of the model parameter and the global compatibility score of the model to be fused to which the model parameter belongs, to obtain a dual compatibility score. Then, according to the dual compatibility score, the model parameters of the parameter position are spliced ​​to obtain the fusion parameters corresponding to the parameter position in the fusion model. For example, the local compatibility score of the model parameter and the global compatibility score of the model to be fused to which the model parameter belongs can be weighted to calculate the dual compatibility score of the model parameter.

[0031] Then, the parameter splicing method corresponding to the dual compatibility score can be selected according to the size of the dual compatibility score, and the model parameters of the model to be fused corresponding to the parameter position can be spliced ​​according to the parameter splicing method to obtain the fusion parameters corresponding to the parameter position of the fusion model, so as to achieve an accurate and intelligent parameter splicing strategy, retain information to the greatest extent, and do not need to increase the inference cost. Similarly, the fusion parameters corresponding to other parameter positions can be calculated by calculating the fusion parameters of the parameter position for the model parameters corresponding to any same parameter position of the model to be fused.

[0032] It should be explained that the parameter splicing method here may include directly selecting the model parameters of any model to be fused at the parameter position as the fusion parameter. Alternatively, by using the dual compatibility scores of the model parameters of each model to be fused at the parameter position, weighted calculation is performed on the model parameters of each model to be fused at the parameter position, and the result of the weighted calculation is used as the fusion parameter.

[0033] In addition, the obtained fusion model can be regarded as a model with the learning ability of the models to be fused, which can complete the tasks that the models to be fused can complete separately, and more importantly, it can complete the complex tasks composed of the tasks that the models to be fused can complete separately.

[0034] It is understandable that deep neural networks have achieved remarkable achievements in many fields such as image recognition, natural language processing, and recommendation systems. Among them, the models to be integrated in the field of image recognition can be image classification models, target detection models, image segmentation models, face recognition models, etc.; the models to be integrated in the field of natural language processing can be translation models, text classification models, dialogue generation models, etc.; the models to be integrated in the field of recommendation systems can be content-based recommendation models, sequence recommendation models, etc.

[0035] In one embodiment, taking the target detection model as the model to be fused as an example, first, a vehicle detection model for vehicle detection and a pedestrian detection model for pedestrian detection can be used as the models to be fused, and the model parameters for each parameter position in the vehicle detection model and the pedestrian detection model can be obtained. Then, the model parameters of the vehicle detection model and the pedestrian detection model can be used to evaluate each model parameter in the vehicle detection model and the pedestrian detection model, respectively, to obtain the local level compatibility score of each model parameter, that is, to obtain the local level compatibility score of each model parameter in the vehicle detection model and the pedestrian detection model.

[0036] Furthermore, the histogram distributions corresponding to the vehicle detection model and the pedestrian detection model are constructed, and then the global compatibility scores of the vehicle detection model and the pedestrian detection model are quantified by constructing the two histogram distributions, that is, the global compatibility scores of all model parameters in the vehicle detection model and the global compatibility scores of all model parameters in the pedestrian detection model are quantified. Then, the model parameters corresponding to the vehicle detection model and the pedestrian detection model at each parameter position can be spliced ​​through the local compatibility scores of each model parameter and the global compatibility scores corresponding to each model parameter, and the fusion model that can be used for autonomous driving can be finally obtained.

[0037] The method provided by the embodiment of the present invention quantifies the local-level compatibility score of each model parameter of the model to be fused, as well as the global-level compatibility score of the model to be fused. The model parameters at each parameter position are spliced ​​according to the local-level compatibility score of each model parameter and the global-level compatibility score corresponding to each model parameter, so as to obtain the fusion parameters corresponding to each parameter position in the fusion model, thereby realizing an accurate and intelligent parameter splicing strategy, retaining information to the greatest extent, and greatly improving the model performance and robustness of the fusion model.

[0038] Based on any of the above embodiments, step 140 includes: Based on the local compatibility score of each model parameter and the global compatibility score corresponding to each model parameter, score fusion is performed to obtain a dual compatibility score of each model parameter; Based on the dual compatibility scores of the model parameters, the model parameters at the parameter positions are spliced ​​to obtain the fusion parameters of the fusion model.

[0039] Specifically, the local-level compatibility score of each model parameter and the global-level compatibility score corresponding to the model to be fused to which each model parameter belongs can be scored and fused. For example, weighted calculation can be performed to obtain a dual compatibility score for each model parameter.

[0040] The dual compatibility score here can be calculated using the following formula: ; ; In the formula, , They represent the dual compatibility scores of any model parameter at the same parameter position in the models A and B to be fused; , Respectively represent the global compatibility scores of the models A and B to be fused; , It represents the local compatibility score of any model parameter at the same parameter position in the models A and B to be fused, and L represents the local level; Represents the weight coefficient used to adjust the relative importance of the local-level compatibility score and the global-level compatibility score.

[0041] Then, the model parameters at each parameter position can be spliced ​​through the dual compatibility score of each model parameter to obtain the fusion parameters of the fusion model.

[0042] It can be understood that the larger the value of the dual compatibility score is, the stronger the compatibility of the model parameters at the parameter position of the model to be fused is, and the better the performance is. Therefore, the model parameters with larger dual compatibility scores can be selected as fusion parameters.

[0043] It can also be understood that the dual compatibility scores corresponding to the model parameters of different models to be fused at the same parameter position can be used as the weight for splicing and fusion of the model parameters at that parameter position, and the model parameters at that parameter position can be weighted spliced ​​to obtain more comprehensive, accurate, and more powerful and robust fusion parameters.

[0044] The method provided by the embodiment of the present invention can more flexibly adapt to tasks of different complexity by comprehensively considering local and global compatibility scores, thereby improving the performance of the fusion model. In addition, the introduction of the global compatibility score takes into account the consistency of the parameters in the entire model, which helps to improve the generalization ability of the fusion model on unseen data.

[0045] Based on any of the above embodiments, the dual compatibility scores of the model parameters are used to concatenate the model parameters at the parameter positions to obtain the fusion parameters of the fusion model, including: Determine the task complexity score for each network layer; When the task complexity score is greater than a preset score threshold, based on the dual compatibility scores of the model parameters under each network layer, the model parameters at each parameter position under each network layer are weightedly spliced ​​to obtain the fusion parameters.

[0046] Here, the task complexity score can be used to measure the complexity of the task undertaken by the model parameter, and to guide the selection of the fusion strategy. In addition, the preset score threshold here can be a preset score value, which can be used to measure the complexity of the task undertaken by the model parameter at the parameter position.

[0047] Specifically, the complexity of the tasks undertaken by each network layer can be evaluated by analyzing factors such as model structure, task requirements, and data set characteristics. For example, the task complexity score of each network layer of the model to be fused can be determined based on factors such as model depth, width, number of parameters, task type (such as classification, regression, generation, etc.), data set size and quality.

[0048] Then, the task complexity scores of different models to be fused in the same network layer can be averaged, or the task complexity score with a larger value can be selected to obtain the task complexity score of each network layer. Then, the task complexity score of the network layer is compared with the preset score threshold.

[0049] When the task complexity score of the network layer is greater than the preset score threshold, it means that the task complexity of the network layer is large and the task difficulty is high. When processing high-complexity tasks, soft splicing is preferred to ensure information retention. Therefore, the "soft splicing" method is preferred for splicing. In detail, for the splicing of model parameters at each parameter position under any network layer, the dual compatibility score of each model parameter at the network layer can be used as the fusion weight to perform weighted splicing on the model parameters corresponding to each parameter position at the network layer to obtain the fusion parameters of each parameter position at the network layer. Similarly, the method of obtaining the fusion parameters of each parameter position at any network layer can be used to calculate the fusion parameters of each parameter position when the task complexity score of other network layers is greater than the preset score threshold.

[0050] Here, the fusion parameter of the parameter position can be calculated by the following formula: + ; In the formula, Indicates the Nth layer and parameter position of the fusion model [ ] fusion parameters at ; Represents the model parameters of each parameter position of the model A to be fused under N layers; represents the dual compatibility score of the model parameters under the Nth layer in the model A to be fused; Represents the model parameters of each parameter position of the model B to be fused under N layers; Indicates the dual compatibility score of the model parameters of the model B to be fused under N layers.

[0051] The method provided by the embodiment of the present invention introduces the task complexity score of the model parameters, compares the task complexity score of the model parameters with the preset score threshold, realizes the adaptive parameter splicing method with the model position, and improves the accuracy and performance of the fusion parameters. In addition, when the task complexity score is greater than the preset score threshold, based on the dual compatibility score of the model parameters under each network layer, the model parameters under each network layer are weighted spliced ​​to obtain each fusion parameter, which can more flexibly adapt to tasks of different complexities, thereby improving the performance of the fusion model. By weighted splicing of the parameters of multiple models, this method can fuse the advantages of different models, reduce the deviation or overfitting risk that may exist in a single model, and thus enhance the robustness of the fusion model.

[0052] Based on any of the above embodiments, the step of determining the task complexity score of each network layer further includes: When the task complexity score is not greater than a preset score threshold, the dual compatibility scores corresponding to the model parameters under any network layer in the model to be fused are compared, and the model parameters corresponding to the dual compatibility scores with larger comparison results are used as the fusion parameters.

[0053] Specifically, when the task complexity score is not greater than the preset score threshold, it means that the task difficulty and complexity of the parameter position are low. For example, when processing low-complexity tasks, the "hard splicing" splicing method may be selected to increase the speed and reduce the computational overhead. The "hard splicing" splicing method can be detailed by comparing the dual compatibility scores corresponding to the model parameters under any network layer in the model to be fused, and using the model parameters corresponding to the dual compatibility scores with larger comparison results as the fusion parameters. For example, "hard splicing" can be implemented by the following formula: ; In the formula, Represents the fusion parameters of the Nth layer of the fusion model; Represents the dual compatibility score of the model parameters of the model A to be fused under N layers , greater than the double compatibility score of the model parameters of the model B to be fused under N layers When , the fusion parameters of the Nth layer of the fusion model are the model parameters of the model A to be fused at the Nth layer Otherwise, the fusion parameters of the Nth layer of the fusion model are the model parameters of the model B to be fused at the Nth layer. .

[0054] It can be understood that the larger the value of the dual compatibility score is, the better the parameter performance of the model parameter corresponding to the dual compatibility score is. The model parameter can then be shared with the fusion model as a fusion parameter of the fusion model to improve the model performance of the fusion model.

[0055] The method provided by the embodiment of the present invention, when the task complexity score is not greater than the preset score threshold, compares the dual compatibility scores corresponding to the model parameters under any network layer in the model to be fused, and uses the model parameters corresponding to the dual compatibility scores with larger comparison results as the fusion parameters, thereby achieving efficient, accurate and performance-optimized model parameter selection and reducing the amount of calculation to obtain the fusion parameters.

[0056] In general, the method provided by the embodiment of the present invention introduces the task complexity score of the model parameters. When the task complexity score is greater than the preset score threshold, the model parameters at each parameter position are weightedly spliced ​​based on the dual compatibility score of each model parameter to obtain each fusion parameter to achieve "soft splicing". When the task complexity score is not greater than the preset score threshold, the dual compatibility score corresponding to the model parameter at any parameter position in the model to be fused is compared, and the model parameters corresponding to the dual compatibility score with a larger comparison result are used as the fusion parameters to achieve "hard splicing". That is, when it is detected that the complexity of the task increases, such as when the data distribution becomes more complex, it is automatically adjusted to the "soft splicing" mode to ensure higher model accuracy. On the contrary, when the task is simple and the real-time requirements are high, the hard splicing method will be preferred to reduce computational overhead.

[0057] It should be noted that an additional parameter sharing mechanism is introduced, so that the parameters of different models to be fused can "borrow" information from each other during the reasoning process. For example, when a model to be fused performs well on a specific task, the fusion model can improve the overall performance by sharing its parameter updates, achieving cross-model compatible optimization and optimizing through knowledge sharing and information complementarity between models.

[0058] Based on any of the above embodiments, determining the task complexity score of each network layer includes: Determine the task complexity score based on at least one of the number of network layers and the type of network layers to which the parameter positions corresponding to the model parameters belong; The network layer type includes at least one of a convolutional layer, a fully connected layer, and a pooling layer.

[0059] Specifically, the task complexity scoring rules can be pre-set. For example, the higher the number of network layers, the higher the corresponding task complexity score; conversely, the lower the corresponding task complexity score. The task complexity scores corresponding to the convolutional layer, the fully connected layer, and the pooling layer gradually increase. For example, for lower layers, such as the input layer and the convolutional layer, hard splicing is preferred.

[0060] Then, the task complexity score corresponding to the model parameter is calculated by at least one of the number of network layers and the type of network layer to which the parameter position corresponding to the model parameter belongs. Similarly, the other model parameters are calculated in the same way.

[0061] In one embodiment, it is assumed that there are two pre-trained models (models to be fused) and , both models have multiple levels of parameters and , where N represents the number of network layers, for example, layer 1, layer 2, etc. Therefore, the task complexity score can be determined by at least one of the network layer number and network layer type to which the parameter position corresponding to the model parameter belongs, and a more efficient fusion can be achieved by selecting a suitable splicing strategy for each layer.

[0062] The method provided in the embodiment of the present invention, in addition to compatibility assessment based on local compatibility scores and global compatibility scores, also introduces the concept of multi-level splicing, that is, different splicing strategies are applied to different network layers or network layer types of the fusion model. Therefore, according to the complexity, parameter size and task requirements reflected by the number of network layers and / or network layer types, the splicing method is flexibly adjusted, further optimizing the model performance and fusion efficiency of the fusion model.

[0063] Based on any of the above embodiments, step 120 includes: Extracting a parameter matrix of model parameters of the model to be fused; Based on the uncertainty evaluation network and the parameter matrix of the model to be fused, each model parameter is evaluated respectively to obtain a local level compatibility score of each model parameter.

[0064] Specifically, the parameter matrix corresponding to the model parameters of each model to be fused can be extracted separately. For example, the parameter matrix corresponding to the model A to be fused can be expressed as Then, the parameter matrix of each model to be fused can be input into the uncertainty evaluation network, and each model parameter can be evaluated by the uncertainty evaluation network to obtain the local compatibility score of each model parameter, for example, the local compatibility score of each model parameter of the models A and B to be fused can be obtained. Here, the local compatibility score of any model parameter can be calculated by the following formula: ; In the formula, Indicates the parameter position of the model A to be fused is local-level compatibility scores for model parameters; represents the local level uncertainty assessment network, L represents the local level; Represents the parameter matrix of the model A to be fused; Represents the parameter matrix of the model B to be fused.

[0065] The method provided by the embodiment of the present invention performs parameter-level uncertainty assessment on each model parameter of the parameter matrix corresponding to the model parameters of the fusion model through an uncertainty assessment network, and obtains the accurate parameter performance of each model parameter among all model parameters, laying the foundation for the subsequent optimal splicing of model parameters.

[0066] It should be noted that traditional methods such as pruning, model integration and transfer learning are mostly static and fail to take into account the dynamic nature of changes in input data distribution. Therefore, when faced with constantly changing data in practical applications, the model performance of the fusion model obtained after fusion is often poor. To address this problem, based on any of the above embodiments, step 140 includes: Obtaining fine-tuning sample data of the fusion model; Comparing the fine-tuning sample data with the initial sample data of the model to be fused to obtain a sample distribution comparison result; When the sample distribution comparison result shows that there is a difference, based on the dual compatibility score of each model parameter and the sample distribution comparison result, the optimization weight of the fusion parameter belonging to the same parameter position as each model parameter is calculated; Determining the learning rate of each fusion parameter in the current iteration round based on the optimization weight of each fusion parameter and the previous learning rate of each fusion parameter in the previous iteration round; Based on the optimization weights and learning rates of the fusion parameters, the fusion parameters are updated in the current iteration round to obtain updated fusion parameters.

[0067] Here, the fine-tuning sample data refers to the training sample data required for fine-tuning and optimizing the fusion model. Here, the initial sample data of the model to be fused refers to the training data set used to pre-train the model to be fused. It should be noted that the fine-tuning sample data is usually the sample data collected in the specific scenario where the fusion model is applied, while the initial sample data of the model to be fused is usually the sample data related to the task performed by the fusion model. The initial sample data is simpler and less complex than the fine-tuning sample data.

[0068] Specifically, sample data under a specific task performed by the fusion model can be obtained as fine-tuning sample data, such as image data for an autonomous driving task. In addition, initial sample data corresponding to the model to be fused can also be obtained, such as image data for pedestrian detection and image data for vehicle detection.

[0069] Next, the sample distribution comparison result can be obtained by comparing the fine-tuning sample data with the initial sample data of the model to be fused. For example, the statistical characteristics of the fine-tuning sample data and the initial sample data, such as the mean, variance, distribution form, etc., can be calculated. Then, the statistical characteristics of the fine-tuning sample data and the initial sample data are compared to obtain the sample distribution comparison result. The sample distribution comparison result here can be calculated using the following formula: ; In the formula, Indicates the sample distribution comparison results; Represents the distribution of fine-tuning sample data; represents the distribution of the initial sample data. Therefore, by calculating the difference between the two distributions, it is possible to identify whether the fine-tuning sample data has a large deviation from the initial training data, which can be considered as When it is greater than the preset difference threshold, the sample distribution comparison result is different.

[0070] Furthermore, when there are differences in the sample distribution comparison results, the optimization weights of the fusion parameters belonging to the same parameter position as the model parameters are calculated based on the dual compatibility scores of the model parameters and the sample distribution comparison results. For example, for the optimization weight of the fusion parameter at any parameter position in the fusion model, the optimization weight of the parameter position can be calculated by the dual compatibility score and sample distribution comparison results of any model to be fused at the same parameter position. Similarly, the optimization weights of other parameter positions of the fusion model can be calculated by calculating the optimization weight of the parameter position. The optimization weight here can be calculated using the following formula: ; In the formula, Indicates that the parameter position in the fusion model is The optimization weight of the fusion parameters at ; Indicates that the model A to be fused is at the parameter position Dual compatibility scores; Represents the adjustment coefficient, which is used to control the intensity of dynamic adjustment.

[0071] Therefore, the optimization weights of the fusion parameters can be flexibly adjusted according to the differences in data distribution to cope with changes in fine-tuning sample data.

[0072] Furthermore, in the fine-tuning stage, the learning rate of each fusion parameter in the current iteration round can be determined by the optimization weight of each fusion parameter and the previous learning rate of each fusion parameter in the previous iteration round, so as to realize dynamic adjustment of the learning rate based on parameter compatibility and improve the fine-tuning effect.

[0073] Finally, by optimizing the weights and learning rates of the fusion parameters, the fusion parameters are updated in the current iteration round to obtain the updated fusion parameters. This cycle is repeated until the preset number of iterations is reached, and the fine-tuning training of the fusion model is ended to obtain a fusion model with accurate and reliable prediction results, better model performance, and strong robustness.

[0074] The method provided by the embodiment of the present invention calculates the optimization weights of the fusion parameters belonging to the same parameter position as each model parameter based on the dual compatibility score of each model parameter and the sample distribution comparison result when there is a difference in the sample distribution comparison result; determines the learning rate of each fusion parameter in the current iteration round based on the optimization weight of each fusion parameter and the previous learning rate of each fusion parameter in the previous iteration round; updates each fusion parameter in the current iteration round based on the optimization weight and learning rate of each fusion parameter to obtain updated fusion parameters, thereby alleviating the problem of poor model parameter optimization effect when there is a distribution difference between the fine-tuning sample data and the initial sample data of the pre-trained model, and greatly improving the training effect of fine-tuning training of the fusion model.

[0075] Based on any of the above embodiments, the learning rate of each fusion parameter in the current iteration round is determined based on the optimization weight of each fusion parameter and the previous learning rate of each fusion parameter in the previous iteration round, which is expressed as: ; in, Represents the learning rate of each fusion parameter of the current iteration round; represents the previous learning rate of each fusion parameter in the previous iteration round; Indicates the dynamic adjustment coefficient; represents the optimization weight of each fusion parameter; Indicates the number of rows of the parameter matrix corresponding to the fusion parameters; Indicates the number of columns of the parameter matrix corresponding to the fusion parameters.

[0076] Based on any of the above embodiments, Figure 2 This is the second flow chart of the model parameter fusion method provided by the present invention, such as Figure 2 As shown, the method includes: First, obtain the model parameters of each parameter position in the model to be fused. Then, perform local-level parameter uncertainty assessment based on the model parameters, that is, evaluate each model parameter in the model to be fused based on the model parameters of the model to be fused, and obtain the local-level compatibility score of each model parameter; here, the local compatibility matrix of each network layer can also be obtained through the local-level compatibility score of each model parameter, which can also be regarded as the local-level compatibility score. In addition, perform global model information content assessment based on the model parameters, that is, construct a histogram distribution corresponding to the model parameters of the model to be fused, and quantify the global-level compatibility score of the model to be fused based on the histogram distribution.

[0077] Next, a dual-weight parameter compatibility assessment can be performed using local-level compatibility scores and global-level compatibility scores to obtain a dual compatibility score. Furthermore, the model parameters of the fusion model are subjected to multi-level parameter adaptive splicing, that is, for model parameters of different network layers, a parameter splicing method that is adaptive to them is selected to perform model parameter splicing to obtain more accurate fusion parameters, thereby obtaining a fusion model with better performance and greater robustness. It should be noted that the model parameter fusion method provided in the embodiment of the present invention can be applied to multiple pre-trained models for fusion. For example, for multiple pre-trained models M1, M2, …, M n .

[0078] After obtaining the fusion model, the fusion model can be fine-tuned. Specifically, obtain the fine-tuning sample data of the fusion model; compare the fine-tuning sample data with the initial sample data of the model to be fused to obtain the sample distribution comparison result; when the sample distribution comparison result shows that there is a difference, based on the dual compatibility score of each model parameter and the sample distribution comparison result, calculate the optimization weight of the fusion parameter that belongs to the same parameter position as each model parameter; based on the optimization weight of each fusion parameter and the previous learning rate of each fusion parameter in the previous iteration round, determine the learning rate of each fusion parameter in the current iteration round; based on the optimization weight and learning rate of each fusion parameter, update each fusion parameter in the current iteration round to obtain the updated fusion parameter.

[0079] The method provided in the embodiment of the present invention proposes two intelligent parameter splicing strategies, namely, precise splicing and weighted fusion, to retain information to the greatest extent without increasing the inference cost. Through multi-model expansion, the generalization ability and robustness of the model are further enhanced on the basis of multiple pre-trained models, which is particularly suitable for complex tasks and multi-scenario applications, and enhances the flexibility and scalability of the model. This method is applicable to multiple fields such as computer vision and natural language processing, significantly improves the overall performance of the model, and has broad application prospects.

[0080] Based on any of the above embodiments, Figure 3 is a schematic diagram of the structure of the fusion device of the model parameters provided by the present invention, such as Figure 3 As shown, the device comprises: An acquisition unit 310 acquires model parameters at each parameter position in a model to be fused, where the model to be fused is constructed based on a deep neural network; A local level evaluation unit 320, based on the model parameters of the model to be fused, evaluates each model parameter in the model to be fused respectively to obtain a local level compatibility score of each model parameter; A global level evaluation unit 330 constructs a histogram distribution corresponding to the model parameters of the model to be fused, and quantifies the global level compatibility score of the model to be fused based on the histogram distribution; The fusion unit 340 concatenates the model parameters at each parameter position based on the local compatibility score of each model parameter and the global compatibility score corresponding to each model parameter to obtain fusion parameters corresponding to each parameter position in the fusion model.

[0081] The device provided by the embodiment of the present invention quantifies the local-level compatibility score of each model parameter of the model to be fused, as well as the global-level compatibility score of the model to be fused. The model parameters at each parameter position are spliced ​​according to the local-level compatibility score of each model parameter and the global-level compatibility score corresponding to each model parameter, so as to obtain the fusion parameters corresponding to each parameter position in the fusion model, thereby realizing an accurate and intelligent parameter splicing strategy, retaining information to the greatest extent, and greatly improving the model performance and robustness of the fusion model.

[0082] Based on any of the above embodiments, the fusion unit is specifically applied to: Based on the local compatibility score of each model parameter and the global compatibility score corresponding to each model parameter, score fusion is performed to obtain a dual compatibility score of each model parameter; Based on the dual compatibility scores of the model parameters, the model parameters at the parameter positions are spliced ​​to obtain the fusion parameters of the fusion model.

[0083] Based on any of the above embodiments, the fusion unit is further specifically applied to: Determine the task complexity score for each network layer; When the task complexity score is greater than a preset score threshold, based on the dual compatibility scores of the model parameters under each network layer, the model parameters at each parameter position under each network layer are weightedly spliced ​​to obtain the fusion parameters.

[0084] Based on any of the above embodiments, the fusion unit is further specifically applied to: When the task complexity score is not greater than a preset score threshold, the dual compatibility scores corresponding to the model parameters under any network layer in the model to be fused are compared, and the model parameters corresponding to the dual compatibility scores with larger comparison results are used as the fusion parameters.

[0085] Based on any of the above embodiments, the fusion unit is further specifically applied to: Determine the task complexity score based on at least one of the number of network layers and the type of network layers to which the parameter positions corresponding to the model parameters belong; The network layer type includes at least one of a convolutional layer, a fully connected layer, and a pooling layer.

[0086] Based on any of the above embodiments, the local level evaluation unit is specifically applied to: Extracting a parameter matrix of model parameters of the model to be fused; Based on the uncertainty evaluation network and the parameter matrix of the model to be fused, each model parameter is evaluated respectively to obtain a local level compatibility score of each model parameter.

[0087] Based on any of the above embodiments, the fusion unit includes an optimization unit after the fusion unit, and the optimization unit is specifically used for: Obtaining fine-tuning sample data of the fusion model; Comparing the fine-tuning sample data with the initial sample data of the model to be fused to obtain a sample distribution comparison result; When the sample distribution comparison result shows that there is a difference, based on the dual compatibility score of each model parameter and the sample distribution comparison result, the optimization weight of the fusion parameter belonging to the same parameter position as each model parameter is calculated; Determining the learning rate of each fusion parameter in the current iteration round based on the optimization weight of each fusion parameter and the previous learning rate of each fusion parameter in the previous iteration round; Based on the optimization weights and learning rates of the fusion parameters, the fusion parameters are updated in the current iteration round to obtain updated fusion parameters.

[0088] Based on any of the above embodiments, the optimization unit is further specifically used for: ; in, Represents the learning rate of each fusion parameter of the current iteration round; represents the previous learning rate of each fusion parameter in the previous iteration round; Indicates the dynamic adjustment coefficient; represents the optimization weight of each fusion parameter; Indicates the number of rows of the parameter matrix corresponding to the fusion parameters; Indicates the number of columns of the parameter matrix corresponding to the fusion parameters.

[0089] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the fusion method of the model parameters, the method comprising: obtaining the model parameters of each parameter position in the model to be fused, the model to be fused is constructed based on a deep neural network; based on the model parameters of the model to be fused, respectively evaluating each model parameter in the model to be fused to obtain the local level compatibility score of each model parameter; constructing the histogram distribution corresponding to the model parameters of the model to be fused, and quantifying the global level compatibility score of the model to be fused based on the histogram distribution; based on the local level compatibility score of each model parameter and the global level compatibility score corresponding to each model parameter, splicing the model parameters of each parameter position to obtain the fusion parameters corresponding to each parameter position in the fusion model.

[0090] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0091] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the model parameter fusion method provided by the above methods, and the method includes: obtaining the model parameters of each parameter position in the model to be fused, and the model to be fused is constructed based on a deep neural network; based on the model parameters of the model to be fused, evaluating each model parameter in the model to be fused respectively to obtain a local-level compatibility score of each model parameter; constructing a histogram distribution corresponding to the model parameters of the model to be fused, and based on the histogram distribution, quantifying the global-level compatibility score of the model to be fused; based on the local-level compatibility score of each model parameter and the global-level compatibility score corresponding to each model parameter, splicing the model parameters at each parameter position to obtain the fusion parameters corresponding to each parameter position in the fusion model.

[0092] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the model parameter fusion method provided by the above-mentioned methods, the method comprising: obtaining the model parameters of each parameter position in the model to be fused, wherein the model to be fused is constructed based on a deep neural network; based on the model parameters of the model to be fused, evaluating each model parameter in the model to be fused respectively to obtain a local-level compatibility score of each model parameter; constructing a histogram distribution corresponding to the model parameters of the model to be fused, and based on the histogram distribution, quantifying the global-level compatibility score of the model to be fused; based on the local-level compatibility score of each model parameter and the global-level compatibility score corresponding to each model parameter, splicing the model parameters at each parameter position to obtain the fusion parameters corresponding to each parameter position in the fusion model.

[0093] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for fusing model parameters, characterized in that: include: Obtaining model parameters of each parameter position in the model to be fused, wherein the model to be fused is constructed based on a deep neural network; Based on the model parameters of the model to be fused, respectively evaluating each model parameter in the model to be fused to obtain a local level compatibility score of each model parameter; Constructing a histogram distribution corresponding to the model parameters of the model to be fused, and quantifying the global compatibility score of the model to be fused based on the histogram distribution; Based on the local-level compatibility score of each model parameter and the global-level compatibility score corresponding to each model parameter, the model parameters at each parameter position are spliced ​​to obtain the fusion parameters corresponding to each parameter position in the fusion model.

2. The method for fusing model parameters according to claim 1, characterized in that: The step of concatenating the model parameters at the respective parameter positions based on the local compatibility scores of the respective model parameters and the global compatibility scores corresponding to the respective model parameters to obtain fusion parameters corresponding to the respective parameter positions in the fusion model includes: Based on the local compatibility score of each model parameter and the global compatibility score corresponding to each model parameter, score fusion is performed to obtain a dual compatibility score of each model parameter; Based on the dual compatibility scores of the model parameters, the model parameters at the parameter positions are spliced ​​to obtain the fusion parameters of the fusion model.

3. The method for fusing model parameters according to claim 2, characterized in that: The step of splicing the model parameters at the positions of the parameters based on the dual compatibility scores of the model parameters to obtain the fusion parameters of the fusion model includes: Determine the task complexity score for each network layer; When the task complexity score is greater than a preset score threshold, based on the dual compatibility scores of the model parameters under each network layer, the model parameters at each parameter position under each network layer are weightedly spliced ​​to obtain the fusion parameters.

4. The method for fusing model parameters according to claim 3, characterized in that: The step of determining the task complexity score of each network layer further includes: When the task complexity score is not greater than a preset score threshold, the dual compatibility scores corresponding to the model parameters under any network layer in the model to be fused are compared, and the model parameters corresponding to the dual compatibility scores with larger comparison results are used as the fusion parameters.

5. The method for fusing model parameters according to claim 3, characterized in that: The step of determining the task complexity score of each network layer includes: Determine the task complexity score based on at least one of the number of network layers and the type of network layers to which the parameter positions corresponding to the model parameters belong; The network layer type includes at least one of a convolutional layer, a fully connected layer, and a pooling layer.

6. The method for fusing model parameters according to any one of claims 1 to 5, characterized in that: The step of evaluating each model parameter in the model to be fused based on the model parameters of the model to be fused to obtain a local level compatibility score of each model parameter includes: Extracting a parameter matrix of model parameters of the model to be fused; Based on the uncertainty evaluation network and the parameter matrix of the model to be fused, each model parameter is evaluated respectively to obtain a local level compatibility score of each model parameter.

7. The method for fusing model parameters according to any one of claims 2 to 5, characterized in that: Based on the local compatibility score of each model parameter and the global compatibility score corresponding to each model parameter, the model parameters at each parameter position are spliced ​​to obtain the fusion parameters corresponding to each parameter position in the fusion model, and then include: Obtaining fine-tuning sample data of the fusion model; Comparing the fine-tuning sample data with the initial sample data of the model to be fused to obtain a sample distribution comparison result; When the sample distribution comparison result shows that there is a difference, based on the dual compatibility score of each model parameter and the sample distribution comparison result, the optimization weight of the fusion parameter belonging to the same parameter position as each model parameter is calculated; Determining the learning rate of each fusion parameter in the current iteration round based on the optimization weight of each fusion parameter and the previous learning rate of each fusion parameter in the previous iteration round; Based on the optimization weights and learning rates of the fusion parameters, the fusion parameters are updated in the current iteration round to obtain updated fusion parameters.

8. The method for fusing model parameters according to claim 7, characterized in that: The learning rate of each fusion parameter in the current iteration round is determined based on the optimization weight of each fusion parameter and the previous learning rate of each fusion parameter in the previous iteration round, which is expressed as: ; in, Represents the learning rate of each fusion parameter of the current iteration round; represents the previous learning rate of each fusion parameter in the previous iteration round; Indicates the dynamic adjustment coefficient; represents the optimization weight of each fusion parameter; Indicates the number of rows of the parameter matrix corresponding to the fusion parameters; Indicates the number of columns of the parameter matrix corresponding to the fusion parameters.

9. A model parameter fusion device, characterized in that: include: An acquisition unit, which acquires model parameters at each parameter position in a model to be fused, wherein the model to be fused is constructed based on a deep neural network; A local level evaluation unit, based on the model parameters of the model to be fused, respectively evaluates each model parameter in the model to be fused, and obtains a local level compatibility score of each model parameter; A global level evaluation unit, constructing a histogram distribution corresponding to the model parameters of the model to be fused, and quantifying the global level compatibility score of the model to be fused based on the histogram distribution; The fusion unit splices the model parameters at each parameter position based on the local level compatibility score of each model parameter and the global level compatibility score corresponding to each model parameter to obtain the fusion parameters corresponding to each parameter position in the fusion model.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for fusing model parameters as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Multi-modal image fusion method based on high-order degradation model

    CN117197627A

  • Point cloud image fusion method and system for vehicle navigation

    CN117911829A

  • Privacy protection depression identification method and system based on deep optical imaging, computer equipment and medium

    CN118097745A

  • Parameter splicing-based large and small model end cloud cooperative computing method and system

    CN119048198A

  • Network capacity prediction method and device, electronic equipment and storage medium

    CN119071802A