Model generation method and device, equipment and storage medium
By performing preset transformation and causal factor mapping on the source domain data, the target model is generated, and the problem of ignoring interdomain differences in the existing technology is solved, and a stronger model generalization ability is achieved.
Patent Information
- Application Number
- CN202411442198.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-02-25
AI Technical Summary
When improving the generalization ability of the model, the existing technology ignores the intrinsic connections and differences between the source domain and the target domain, making it difficult to fully estimate and adapt to the distribution differences between the domains and poor generalization ability.
By performing preset transformations on the acquired source domain data, the auxiliary domain data is generated, the causal factors between the source domain and the auxiliary domain are determined, and the causal factors between the source domain and the auxiliary domain are mapped to the same feature space, and the initial model is trained based on the mapping space to generate the target model.
By enriching data diversity and simulating the distribution of different data, clarifying the internal connections and changes between domains, generating models that can better adapt to the data characteristics of different domains, significantly improving the generalization ability of the model.
Smart Images

Figure CN119514667A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a model generation method, device, equipment and storage medium. Background Art
[0002] Currently, in the field of artificial intelligence, the generalization ability of the model can usually be improved through methods such as data augmentation, regularization technology or adversarial training, but these methods usually ignore the intrinsic connection and differences between the source domain and the target domain. When dealing with complex cross-domain generalization problems, it is difficult to fully estimate and adapt to the distribution differences between domains. Summary of the invention
[0003] The embodiments of the present disclosure provide a model generation method, apparatus, device and storage medium to solve the problem in the related art that the method of ignoring the intrinsic connection and differences between the source domain and the target domain is used to improve the generalization ability of the model, resulting in difficulty in fully estimating and adapting to the distribution differences between domains and poor generalization ability.
[0004] In a first aspect, an embodiment of the present disclosure provides a model generation method, the method comprising: Performing a preset transformation on the acquired source domain data to obtain auxiliary domain data corresponding to the source domain data; the preset transformation includes at least one of the following: rotation, scaling, noise addition, and color transformation; Determining a causal factor between the source domain data and the auxiliary domain data; the causal factor is a factor that triggers the source domain data to be transformed into the auxiliary domain data; According to the causal factors, the source domain data and the auxiliary domain data are mapped to the same feature space to obtain a mapping space; Based on the mapping space, the pre-created initial model is trained to generate a target model.
[0005] In a second aspect, an embodiment of the present disclosure provides a model generation device, the device comprising: A transformation module, configured to perform a preset transformation on the acquired source domain data to obtain auxiliary domain data corresponding to the source domain data; the preset transformation includes at least one of the following: rotation, scaling, noise addition, and color transformation; A determination module, configured to determine a causal factor between the source domain data and the auxiliary domain data; the causal factor is a factor that triggers the source domain data to be transformed into the auxiliary domain data; A mapping module, used for mapping the source domain data and the auxiliary domain data to the same feature space according to the causal factors to obtain a mapping space; The generation module is used to train the pre-created initial model based on the mapping space to generate a target model.
[0006] In a third aspect, an embodiment of the present disclosure provides a model generation device, comprising: a processor; and a memory configured to store computer executable instructions, wherein the computer executable instructions, when executed, enable the processor to implement the steps of the method described in the first aspect above.
[0007] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the steps of the method described in the first aspect above.
[0008] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0009] At least one of the above technical solutions provided by the embodiments of the present invention can achieve the following technical effects: In an embodiment of the present invention, a preset transformation may be first performed on the acquired source domain data to obtain auxiliary domain data corresponding to the source domain data, wherein the preset transformation may include at least one of the following: rotation, scaling, noise addition, and color transformation. Then, the causal factor between the source domain data and the auxiliary domain data may be determined, where the causal factor is a factor that triggers the transformation of the source domain data into the auxiliary domain data. Based on the causal factor, the source domain data and the auxiliary domain data are mapped to the same feature space to obtain a mapping space. Based on the mapping space, the pre-created initial model is trained to generate a target model.
[0010] It can be seen from the above-mentioned embodiments of the invention that after acquiring the source domain data, the embodiments of the present invention can transform the source domain data to obtain auxiliary domain data, thereby enriching the diversity of the data and simulating different data distribution situations that may occur. Then, the embodiments of the present invention will determine the causal factors between the two, and clarify what factors trigger the transformation of the data from the source domain to the auxiliary domain, so as to better grasp the intrinsic connection and change law between different data domains. According to the determined causal factors, the source domain data and the auxiliary domain data can be mapped to the same feature space to obtain a mapping space, so that the subsequently generated model can learn the data features of different domains in the same space, so as to better adapt to the changes in the data, learn the cross-domain universal feature representation, and is no longer limited to the data mode of a single source domain. When training is performed based on the mapping space to generate the target model, the information of the source domain and the auxiliary domain can be fully utilized to better estimate and adapt to the distribution differences between different domains. In this way, when faced with unknown target domain data, the model already has the ability to handle different data distributions and can perform various tasks more accurately, thereby greatly improving the generalization ability of the model. It effectively solves the problem of difficulty in fully estimating and adapting to distribution differences between domains and poor generalization ability in related technologies due to the use of methods that ignore the inherent connections and differences between the source domain and the target domain to improve the generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate one or more embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor. Figure 1 One of the flow charts of the model generation method provided by one embodiment of the present invention; Figure 2 A second flow chart of a model generation method provided by an embodiment of the present invention; Figure 3 A third flow chart of a model generation method provided by an embodiment of the present invention; Figure 4 A fourth flowchart of a model generation method provided by an embodiment of the present invention; Figure 5 A fifth flow chart of a model generation method provided by an embodiment of the present invention; Figure 6 A sixth flow chart of a model generation method provided by an embodiment of the present invention; Figure 7 A seventh flowchart of a model generation method provided by an embodiment of the present invention; Figure 8 FIG8 is a flow chart of a model generation method provided by an embodiment of the present invention; Fig. 9 A ninth flowchart of a model generation method provided by an embodiment of the present invention; Fig.10 A schematic diagram of the module composition of a model generation device 1000 provided in one embodiment of the present invention; Fig.11 A schematic diagram of the hardware structure of a model generation device provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0012] In order to make the technical parties in this technical field better understand the technical aspects of one or more embodiments of the present disclosure, and to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in combination with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only 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 making creative work are within the scope of protection of the present invention.
[0013] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0014] See also Figure 1 , Figure 1 One of the flow charts of the model generation method provided by one embodiment of the present invention is as follows: Figure 1 As shown, the method comprises the following steps: Step 102: performing a preset transformation on the acquired source domain data to obtain auxiliary domain data corresponding to the source domain data; the preset transformation includes at least one of the following: rotation, scaling, noise addition, and color transformation.
[0015] Step 104: determine the causal factors between the source domain data and the auxiliary domain data; the causal factors are factors that trigger the transformation of the source domain data into the auxiliary domain data.
[0016] Step 106: According to causal factors, the source domain data and the auxiliary domain data are mapped to the same feature space to obtain a mapping space.
[0017] Step 108: Based on the mapping space, the pre-created initial model is trained to generate a target model.
[0018] In an embodiment of the present invention, after the source domain data is acquired, a preset transformation may be performed on the source domain data, wherein the preset transformation may include at least one of the following: rotation, scaling, noise addition, and color transformation. After the preset transformation is performed, auxiliary domain data may be obtained.
[0019] In one embodiment of the present invention, when performing a preset transformation on the acquired source domain data, a parameter range may be set first, and then candidate transformation parameters may be determined from the preset parameter range. When determining the candidate transformation parameters, they may be determined by random selection.
[0020] In one example, the source domain data can be Apply a series of preset transformations , generate auxiliary domain data The purpose of the transformation is to simulate the diversity that may appear in the target domain. Mathematically, the generation of auxiliary domain data can be expressed as:
[0021] in, represents a data transformation function; is the probability distribution from the transformation parameters Parameters randomly drawn from ; is the generated auxiliary domain dataset.
[0022] After determining the candidate transformation parameters, the data transformation distribution difference value corresponding to each candidate transformation parameter can be determined, wherein the data transformation distribution difference value can be the difference value in distribution between the data after transformation according to the corresponding candidate transformation parameter and the data before transformation. The candidate transformation parameter corresponding to the determined maximum data transformation distribution difference value can be determined as the target transformation parameter, and the acquired source domain data can be subjected to a preset transformation according to the target transformation parameter. Through the preset transformation, the domain shift simulation of the source domain can be realized, and the auxiliary domain simulating the source domain domain shift can be obtained.
[0023] In one embodiment of the present invention, the transformation parameters The choice of is crucial to simulate domain shift. The embodiment of the present invention adopts an optimization strategy to determine the most effective transformation parameters. The goal of the optimization is to maximize the distribution difference between the source domain and the auxiliary domain while maintaining the identifiability of the category. In one example, the parameter optimization problem can be formalized as:
[0024] in, is a function that measures the difference in distributions, such as the Kullback-Leibler (KL) divergence or the Wasserstein distance; and These are the data distribution of the source domain and the auxiliary domain, respectively.
[0025] In one embodiment, in order to ensure that the simulated auxiliary domain can effectively cover the potential distribution of the target domain, the embodiment of the present invention maintains the diversity and balance of the auxiliary domain through a method based on a dynamic transformation selection mechanism. The core idea of this mechanism is to adjust the sampling strategy of the transformation parameters to respond to the statistical characteristics of the current auxiliary domain. First, a transformation parameter sampling strategy is defined , this strategy uses the statistical characteristics of the auxiliary domain to dynamically adjust the transformation parameters The sampling probability of is determined by a probability density function that takes into account the prior distribution of the parameters and the consistency with the statistical characteristics of the current auxiliary domain:
[0026] in, is the prior distribution of the transformation parameters; and are the mean and variance of the auxiliary domain, respectively.
[0027] The effect of simulated domain shift can be verified by evaluation. The embodiment of the present invention further proposes an evaluation method based on domain fitness, which evaluates the quality of simulated domain shift by comparing the difference in feature representation between the source domain and the auxiliary domain. Specifically, by training a feature extractor On the source domain, then and auxiliary domain data Mapped to feature space, and evaluate the effect of simulated domain shift by maximizing the consistency between feature representations:
[0028] in, is the domain fitness loss, is the conditional probability distribution, which measures the probability of Under the condition of The simulated domain offset of this module is only used to generate and evaluate auxiliary domain data.
[0029] See also Figure 2 , is a flow chart of an embodiment of the present invention, Figure 2 It mainly includes the following parts: 1. Data transformation module (M1): M1 is responsible for performing various data transformation operations on the source domain data to generate diverse auxiliary domain samples.
[0030] 2. Transformation Parameter Optimization (M4): M4 adopts an optimization strategy to determine the most effective transformation parameters to maximize the distribution difference between the source domain and the auxiliary domain.
[0031] 3. Simulation domain diversity and balance (M5): M5 maintains the diversity and balance of the auxiliary domain through a dynamic transformation selection mechanism.
[0032] 4. Simulated Domain Shift Evaluation (M3): M3 evaluates the quality of simulated domain shift by comparing the differences in feature representation between the source domain and the auxiliary domain.
[0033] 5. Iterative improvement of simulation domain shift (M2): M2 is iteratively improved according to the evaluation results, gradually approaching the actual distribution of the target domain.
[0034] In Figure 2, arrows are used to represent data flow and information transmission. The output of M1 points to M2 through an arrow, indicating that the generated auxiliary domain samples are transmitted to the iterative improvement module; there is a feedback loop between M2 and M3, and the evaluation results of M3 are fed back to M2 to guide the further optimization of the simulation domain offset; M4 provides M1 with optimized transformation parameters to ensure the effectiveness of data transformation; M5 receives the evaluation results from M3 and adjusts the sampling strategy of the transformation parameters to maintain the diversity and balance of the simulation domain.
[0035] pass Figure 2 The structural diagram of the simulated domain shift mechanism shown can effectively implement the basis of cross-domain generalization learning of the model.
[0036] After obtaining the auxiliary domain data, the causal factors between the source domain data and the auxiliary domain data can be determined, that is, the factors that can trigger the source domain data to be transformed into the auxiliary domain data. When determining the causal factors, it can be manually determined by relevant personnel, or it can be determined by statistical analysis of the correlation between the source domain data and the auxiliary domain data, which is not limited in the embodiment of the present invention.
[0037] In the embodiment of the present invention, after determining the causal factors between the source domain data and the auxiliary domain data, the source domain data and the auxiliary domain data can be mapped to the same feature space according to the causal factors to obtain a mapping space.
[0038] In one embodiment of the invention, after determining the causal factors, the specified data distribution transformation value corresponding to each causal factor may be determined first, wherein the specified data distribution change value may be the distribution change value of the auxiliary domain data when the source domain data changes.
[0039] When determining the specified data distribution change value corresponding to each causal factor, in one embodiment, the distribution change of the auxiliary domain data when each causal factor changes can be determined first, and the data representation of the source domain data and the auxiliary domain data can be learned to determine the data distribution value of the source domain data and the auxiliary domain data. Then, when each causal factor changes, the change value of the data distribution value of the auxiliary domain data along with the data distribution value of the source domain data can be determined to obtain the specified data distribution change value corresponding to each causal factor.
[0040] After determining the specified data distribution change value corresponding to each causal factor, the causal factor corresponding to the maximum specified data distribution change value may be determined as the key causal factor.
[0041] In one example, after determining the causal factors between the source domain data and the auxiliary domain time, the solution can use the causal graph to simulate, that is, the causal graph can be used to simulate the source domain data and auxiliary domain data When building a causal graph, you can first define a set of variables, which can include source domain data, auxiliary domain data, and their possible causal factors. Then, use statistical methods or domain knowledge to infer the causal relationship between these variables and build a graph. .
[0042] Then, this example can introduce counterfactual reasoning, which is a method of reasoning that considers the situation of "what if...", which allows exploring different results that may occur under different conditions. In this example, counterfactual reasoning can be used to evaluate the impact on the domain distribution when removing or changing certain causal factors. Specifically, for each causal factor , we can consider intervening on it and then evaluate the auxiliary domain data after the intervention Distribution changes:
[0043] in, Causal factors The distribution of auxiliary domain data after the intervention; Causal factors Force a setting to a specific value .
[0044] In this example, a method based on latent variable models is proposed to quantify causal effects. Specifically, latent variable models such as variational autoencoders (VAE) or other latent variable models can be used to learn data representations of source domains and auxiliary domains, and calculate the changes in data distribution under the intervention of different causal factors:
[0045] in, is the loss of causal effect; It is the potential representation of the source domain data; Given a latent variable and causal factors after intervention The probability distribution of auxiliary domain data under the condition of .
[0046] By quantifying the causal effect, we can identify the key causal factors that have the greatest impact on the domain distribution, that is, the core elements of domain shift. This example further uses an importance score-based method to identify these factors. Specifically, for each causal factor , its contribution to the change in the auxiliary domain data distribution can be calculated, and the factor with the largest contribution can be selected as the key factor of domain shift:
[0047] in, is the key domain shift factor identified; Is a causal factor The change in the causal effect loss.
[0048] See also Figure 3 , is a flow chart of an embodiment of the present invention, Figure 3 It mainly includes the following parts: 1. Causal graph construction (M6): M6 is responsible for defining a set of variables and inferring the causal relationships between them, and constructing a graph that simulates the causal relationship between source domain and auxiliary domain data.
[0049] 2. Counterfactual Reasoning Analysis (M8): M8 uses counterfactual reasoning methods to evaluate the impact of specific causal factors on the domain distribution by intervening in them and observing the changes in the distribution of auxiliary domain data.
[0050] 3. Causal effect quantification (M9): M9 uses a latent variable model to quantify the contribution of each causal factor to the change in domain distribution, providing a basis for identifying key domain shift factors.
[0051] 4. Identification of domain shift factors (M10): Based on the quantitative causal effects, M10 identifies the factors that have the greatest impact on domain distribution, that is, the core elements that cause domain shift.
[0052] 5. Meta-causal driven analysis iterative optimization (M7): M7 iteratively optimizes the causal graph and counterfactual reasoning strategy based on the identified domain shift factors to improve the accuracy of the analysis.
[0053] In Figure 3, arrows are used to represent data flow and information transmission. The output of M6 points to M8 through an arrow, indicating the reasoning and analysis process after the causal graph is built; the analysis results of M8 are passed to M9 to quantify the causal effect; the quantification results of M9 help M10 identify key domain shift factors; the identification results of M10 are fed back to M6 for iterative optimization and update of the causal graph.
[0054] pass Figure 3 The schematic diagram of the structure of the meta-causal driven analysis shown makes it clear how to explore the root causes of domain drift by building a causal graph and performing counterfactual reasoning.
[0055] In an embodiment of the present invention, after determining the key causal factors, the source domain data and the auxiliary domain data can be mapped to the same feature space, and based on the key causal factors, the mapping weight corresponding to the minimum mapping distribution difference value can be determined, wherein the mapping distribution difference value can be the distribution difference value of the source domain data and the auxiliary domain data in the same feature space.
[0056] In one embodiment of the invention, when determining the mapping weight corresponding to the minimum mapping distribution difference value according to the key causal factor, the effect value corresponding to the key causal factor can be determined according to the latent variable model. In one example, the effect value corresponding to the key causal factor can be determined according to the latent variable model as shown in the above formula (6). Then, according to the effect value corresponding to the key causal factor and the specified data distribution change value, the mapping weight corresponding to the minimum mapping distribution difference value is determined, and according to the mapping weight, the first mapping subspace obtained after the source domain data is mapped to the same feature space and the second mapping subspace obtained after the auxiliary domain data is mapped to the same feature space are determined.
[0057] In one example, the distribution difference between the source domain and the auxiliary domain can be reduced by effectively aligning them, thus enhancing the generalization performance of the model in the target domain. Therefore, this example introduces domain alignment. The core of domain alignment is to learn a feature mapping so that the feature representations of the source domain and the auxiliary domain can be aligned with each other. Therefore, this example proposes a feature mapping method that learns a mapping function , the source domain data Mapped to a common feature space that can also represent auxiliary domain data :
[0058] in, and is a domain-specific feature mapping function; is a common feature space; is the generated auxiliary domain dataset. The parameters of the mapping function are learned by minimizing the distribution difference between the source domain and auxiliary domain data in the common feature space.
[0059] This example then applies the weight network to adjust the weights of the feature maps according to the causal effects obtained from the meta-causal driver analysis. Specifically, for each causal factor , the effect to weight network learns a weight , the weight reflects the contribution of the causal factor to the domain alignment:
[0060] in, Is a causal factor The effect size of is the activation function used to map the effect value to the weight space.
[0061] To achieve domain alignment, this example defines a loss function that takes into account not only the accuracy of the feature map but also the impact of causal effects on the feature map weights. Defined as:
[0062] in, It is the feature mapping loss, which measures the consistency of the source domain and auxiliary domain data in the common feature space; is the regularization coefficient used to balance the feature mapping loss and the causal effect loss; is the causal effect loss, which measures the contribution of causal factors to domain alignment.
[0063] See also Figure 4 , is a flow chart of an embodiment of the present invention, Figure 4 It mainly includes the following parts: 1. Feature Mapping and Weight Learning (M11): M11 is responsible for learning the mapping function of the source domain and auxiliary domain data to the common feature space and optimizing the weights by minimizing the distribution difference.
[0064] 2. Effect to Weight Network (M13): M13 adjusts the weights of feature maps according to the causal effects obtained from meta-causal driving analysis, reflecting the contribution of causal factors to domain alignment.
[0065] 3. Domain alignment loss function (M14): M14 combines feature mapping loss and causal effect loss to define the objective function of domain alignment optimization.
[0066] 4. End-to-end optimization (M15): M15 performs end-to-end optimization, jointly updating the parameters of the feature mapping function and the effect-to-weight network.
[0067] 5. Domain alignment evaluation and feedback (M12): M12 evaluates the effect of domain alignment and feeds the evaluation results back to weight learning and the effect to the weight network to achieve iterative optimization.
[0068] In Figure 4, arrows are used to represent data flow and information transmission in each part. The output of M11 points to M13 through an arrow, indicating that the feature mapping result is passed to the weight adjustment network; the weight adjustment result of M13 is passed to M14 for calculating the domain alignment loss; the loss calculation result of M14 is fed back to M11 and M13 to guide their parameter update; M15 is responsible for the entire end-to-end optimization process to ensure the consistency and accuracy of the model during the domain alignment process; M12 evaluates the optimization results of M15 and feeds back the evaluation results to M11 and M13 to achieve continuous improvement of model performance.
[0069] Figure 4 The domain alignment strategy shown can convert causal effects into weight adjustments of feature maps through an effect-to-weight network, thereby achieving effective alignment between the source domain and the auxiliary domain.
[0070] In the embodiment of the present invention, after the mapping space is obtained, the pre-created initial model can be trained based on the mapping space to generate a target model.
[0071] In one embodiment of the invention, the mapping space may include a first mapping subspace obtained after the source domain data is mapped to the same feature space, and a second mapping subspace obtained after the auxiliary domain data is mapped to the same feature space. The first feature subspace and the second feature subspace can be determined respectively according to the common features between the first mapping subspace and the second mapping subspace, and the non-common features between the first mapping subspace and the second mapping subspace.
[0072] In one example, a two-layer optimization architecture is further introduced to ensure that the model can capture common feature representations across domains by simultaneously optimizing the basic feature space and the domain-specific subspace, while learning more refined feature representations for each specific domain.
[0073] The learning goal of the basic feature space is to extract feature representations that are common across domains. To this end, this example uses a shared feature extractor , which extracts features from data in all domains:
[0074] in, Is the input data, which can be source domain data or auxiliary domain data ; is the extracted feature representation; is a feature extractor.
[0075] In addition to the base feature space, this example also learns a specific subspace for each domain. The domain-specific subspace allows the model to capture domain-specific features, thereby improving the performance of the model in that domain. domain, learn a subspace representation ,in is the characteristic mapping function of the domain.
[0076] The goal of the two-layer optimization architecture is to optimize both the base feature space and the domain-specific subspace simultaneously to achieve cross-domain generalization. Defined as:
[0077] in, It is the loss function of the basic feature space, which measures the performance of the model on all domains; It is The loss function of a domain measures the performance of the model on that specific domain; is the total number of domains.
[0078] The loss function of the basic feature space is:
[0079] in, It is Datasets for domains; is from The data points and labels sampled in ; is a given feature representation Time Tags The conditional probability of .
[0080] The loss function for the domain-specific subspace is:
[0081] in, It is The output of the feature mapping function of the domain.
[0082] See also Figure 5 , is a flow chart of an embodiment of the present invention, Figure 5 It mainly includes the following parts: 1. Basic feature space learning (M16): M16 is responsible for extracting feature representations that are common across domains and providing a shared feature extractor for data in all domains.
[0083] 2. Domain-specific subspace learning (M17): M17 learns a subspace for each specific domain to capture the unique characteristics of that domain.
[0084] 3. Two-level optimization objective function (M18): M18 defines the objective function of the optimization problem, combining the losses of the base feature space and all domain-specific subspaces.
[0085] 4. Loss function design and optimization (M19): M19 is responsible for designing and optimizing the loss function of the basic feature space and domain-specific subspace.
[0086] 5. Two-layer optimization algorithm implementation (M20): M20 implements a two-layer optimization algorithm to update model parameters by alternately optimizing the basic feature space and the domain-specific subspace.
[0087] exist Figure 5 In the figure, arrows are used to represent data flow and information transfer in each part. The output of M16 points to M17 through an arrow, indicating that the extraction result of cross-domain universal features is transferred to domain-specific subspace learning; the output of M17 is transferred to M18 through an arrow, indicating the integration of domain-specific features; M18 combines the losses of the basic feature space and the domain-specific subspace to form a double-layer optimization objective function; M19 designs the loss function according to the objective function of M18, and passes it to M20 through an arrow to guide the update of model parameters; M20 implements end-to-end double-layer optimization, and its output is fed back to M16 and M17 through arrows to achieve iterative optimization of the model.
[0088] pass Figure 5 The structural diagram of the two-layer optimization architecture shown in the figure shows how to enhance the cross-domain generalization ability of the model by simultaneously optimizing the basic feature space and the domain-specific subspace.
[0089] In the embodiment of the present invention, the pre-created initial model may be trained based on the first feature subspace and the second feature subspace to generate a target model.
[0090] In one embodiment of the invention, a domain-enhanced meta-learning framework can be used to train the initial model, and domain knowledge can be enhanced at both the feature and label levels to generate a target model with higher generalization ability. In one example, the Dirichlet mixture and soft label distillation techniques can be integrated to significantly improve the model's learning and generalization capabilities for different domain knowledge.
[0091] In one embodiment of the invention, when domain knowledge can be enhanced at the feature level, when a pre-created initial model is trained based on a first feature subspace and a second feature subspace, features of different domains can be extracted from the first feature subspace and the second feature subspace, and the extracted features of different domains can be mixed to obtain mixed feature samples, and the pre-created initial model can be trained based on the mixed feature samples.
[0092] In one example, the Dirichlet mixture technique can be used to enhance domain knowledge at the feature level. This technique can promote the model to learn more generalized feature representations by mixing feature representations from different domains. A sample of domains , using Dirichlet distribution to mix feature representations from all domains:
[0093] in, It is Feature representation of each domain; are weights sampled from a Dirichlet distribution; is the total number of domains.
[0094] In one example, domain knowledge can be enhanced at the label level. For example, soft label distillation technology can be used to enhance domain knowledge at the label level. This technology can extract soft label information from the teacher network and distill it into the student network, thereby enhancing the student network's learning of domain knowledge. Specifically, for the first A sample of domains , calculate the output of the teacher network , and use it as the training target of the student network:
[0095] in, is the output of the student network; is the soft label output of the teacher network; is the soft label distillation loss function; It is Domain datasets.
[0096] In one example, a meta-learning framework can also be introduced to further improve the generalization ability of the model by designing meta-learning tasks. In this example, two types of meta-learning tasks can be designed: meta-learning tasks at the feature level and meta-learning tasks at the label level. The meta-learning task at the feature level focuses on learning cross-domain feature representations, while the meta-learning task at the label level focuses on learning cross-domain label relationships. The meta-learning algorithm can be implemented by alternating between fast adaptation and slow learning. In the fast adaptation stage, the model uses a small amount of source domain data for fast adaptation to predict the data in the target domain. In the slow learning stage, the model updates its parameters to improve long-term generalization ability. Specifically, fast adaptation can use model-based optimization methods, while slow learning can use gradient-based optimization methods:
[0097]
[0098] in, and They are fast adaptation parameters and slow learning parameters; and is the learning rate; and They are fast adaptation loss and slow learning loss respectively. The calculation of the domain-enhanced meta-learning framework takes into account the commonalities and differences between domains, and evaluates the performance of the model in different domains by comparing them. Specifically, the accuracy of the model in the source domain and the target domain, as well as the transfer performance of the model between different domains, can be evaluated. In addition, the sensitivity of the model to domain shift is also evaluated, that is, the performance change of the model when facing different degrees of domain shift. This framework can effectively improve the model's ability to learn and generalize knowledge from different domains.
[0099] See also Figure 6 , is a flow chart of an embodiment of the present invention, Figure 6 It mainly includes the following parts: 1. Dirichlet mixture technology (M21): M21 promotes the model to learn more generalized feature representations by weighted mixing of feature representations of different domains according to Dirichlet distribution.
[0100] 2. Soft label distillation technology (M23): M23 uses the output of the teacher network as soft labels to guide the student network learning and enhance the model's generalization ability for label information.
[0101] 3. Meta-learning task design (M24): M24 designs meta-learning tasks at the feature and label levels to further enhance the model’s ability to learn cross-domain features and label relationships.
[0102] 4. Meta-learning algorithm implementation (M25): M25 optimizes the performance of the model in different domains through a meta-learning algorithm that combines fast adaptation and slow learning.
[0103] exist Figure 6 In the figure, arrows are used to represent data flow and information transmission. The output of M21 points to M23 through an arrow, indicating that the enhancement result at the feature level is transmitted to the enhancement process at the label level; the output of M23 is transmitted to M24 through an arrow, indicating that the result of soft label distillation is used to guide the design of meta-learning tasks; the meta-learning task design result of M24 is transmitted to M25 for implementing the meta-learning algorithm; the algorithm implementation result of M25 is fed back to M21 and M23 to achieve continuous optimization at the feature and label levels.
[0104] Figure 6 The domain-enhanced meta-learning framework shown can significantly improve the model's ability to learn and generalize knowledge in different domains through enhancements at the feature level and label level.
[0105] See also Figure 7 , is a schematic diagram of the overall flow of the model generation method in the implementation of the present invention, which mainly includes the following parts: 1. Simulation domain offset mechanism (M1): M1 is responsible for generating auxiliary domain samples through data transformation and building a virtual target domain environment without directly accessing the target domain data.
[0106] 2. Meta-causal driven analysis (M2): M2 constructs a causal graph, performs counterfactual reasoning, identifies the core elements of domain shift, and provides a theoretical basis for domain alignment.
[0107] 3. Domain alignment strategy (M3): M3 uses the effect-to-weight network to adjust the feature mapping weights according to the causal effect to achieve effective alignment between the source domain and the auxiliary domain.
[0108] 4. Two-layer optimization architecture (M4): M4 adopts a two-layer optimization method to simultaneously optimize the basic feature space and the domain-specific subspace to capture cross-domain common features and domain-specific features.
[0109] 5. Domain-enhanced meta-learning framework (M5): M5 enhances domain knowledge at the feature and label levels, and improves the learning and generalization capabilities of the model through Dirichlet mixture and soft label distillation techniques.
[0110] exist Figure 7 In the figure, arrows represent data flow and information transmission. The auxiliary domain samples generated by M1 are passed to M2 for meta-causal driven analysis; the analysis results of M2 are used in the domain alignment strategy of M3; the alignment results of M3 are fed back to M1 and M4 for optimization; the optimization results of M4 affect the data transformation of M1 and the weight adjustment of M3 at the same time; the domain enhancement meta-learning framework of M5 provides additional generalization capability improvement for the entire system.
[0111] Figure 7 This is a structural diagram of the cross-domain generalization learning method proposed in an embodiment of the present invention, which shows that the framework proposed in an embodiment of the present invention that combines simulated domain shift and meta-causal driven analysis can effectively enhance the adaptability and generalization ability of machine learning models to data in different domains.
[0112] The following two application examples are used to illustrate the practical application process of the above model generation method: See also Figure 8 , the method of the present invention is applied to the intelligent medical diagnosis system. The specific process is as follows: 1. Medical data collection: Collect medical imaging data and medical record information from different hospitals and clinics.
[0113] 2. Data preprocessing and feature extraction (M1): Preprocess the collected medical data, including image standardization and noise removal, and extract key medical features.
[0114] 3. Auxiliary domain generation: Generate simulated medical imaging data using the simulated domain offset mechanism (M2) to simulate imaging characteristics under different devices and conditions.
[0115] 4. Meta-causal driven analysis (M3): Identify the causal relationship between imaging features and disease diagnosis by constructing causal graphs and performing counterfactual reasoning.
[0116] 5. Domain alignment and model training (M4): Apply the domain alignment strategy, combine the effect to the weight network, align the feature space of different medical images, and train the disease diagnosis model through a two-layer optimization architecture.
[0117] 6. Disease Diagnosis and Risk Assessment (M5): Use trained models to perform real-time disease diagnosis and assess patients’ health risks.
[0118] 7. Diagnosis result feedback and model iteration (M6): Feedback the diagnosis results to the doctors, and collect the doctors’ diagnosis results for iterative optimization of the model.
[0119] Depend on Figure 8 It can be seen that the model generation method in the embodiment of the present invention can be well applied in an intelligent medical diagnosis system, thereby effectively improving the accuracy and efficiency of disease diagnosis.
[0120] See also Fig. 9 , the method of the present invention is applied to the intelligent agricultural management system. The specific process is as follows: 1. Agricultural data collection: Collect crop growth data and environmental data through sensors deployed in the field and images taken by drones.
[0121] 2. Data preprocessing and feature extraction (M1): Preprocess the collected agricultural data, including image cropping and feature extraction, as well as data cleaning and standardization.
[0122] 3. Auxiliary domain generation: The simulated domain offset mechanism (M2) is used to generate simulated crop growth data to simulate crop growth conditions in different seasons and environments.
[0123] 4. Meta-causal driven analysis (M3): Identify the causal relationship between crop growth characteristics and the occurrence of pests and diseases by constructing causal graphs and performing counterfactual reasoning.
[0124] 5. Domain alignment and model training (M4): Apply the domain alignment strategy, combine the effect to the weight network, align the feature space of different agricultural data, and train the pest and disease detection and yield prediction models through a two-layer optimization architecture.
[0125] 6. Pest and disease detection and yield prediction (M5): Use the trained model for real-time pest and disease detection and crop yield prediction.
[0126] 7. Application of prediction results and model iteration (M6): Apply the prediction results to support agricultural production decisions, and collect actual yield data for iterative optimization of the model.
[0127] Depend on Fig. 9 It can be seen that the model generation method in the embodiment of the present invention can be well applied in the intelligent agricultural management system, thereby effectively improving the accuracy of crop disease and pest detection and yield prediction.
[0128] In an embodiment of the present invention, a preset transformation may be first performed on the acquired source domain data to obtain auxiliary domain data corresponding to the source domain data, wherein the preset transformation may include at least one of the following: rotation, scaling, noise addition, and color transformation. Then, the causal factor between the source domain data and the auxiliary domain data may be determined, where the causal factor is a factor that triggers the transformation of the source domain data into the auxiliary domain data. Based on the causal factor, the source domain data and the auxiliary domain data are mapped to the same feature space to obtain a mapping space. Based on the mapping space, the pre-created initial model is trained to generate a target model.
[0129] It can be seen from the above-mentioned embodiments of the invention that after acquiring the source domain data, the embodiments of the present invention can transform the source domain data to obtain auxiliary domain data, thereby enriching the diversity of the data and simulating different data distribution situations that may occur. Then, the embodiments of the present invention will determine the causal factors between the two, and clarify what factors trigger the transformation of the data from the source domain to the auxiliary domain, so as to better grasp the intrinsic connection and change law between different data domains. According to the determined causal factors, the source domain data and the auxiliary domain data can be mapped to the same feature space to obtain a mapping space, so that the subsequently generated model can learn the data features of different domains in the same space, so as to better adapt to the changes in the data, learn the cross-domain universal feature representation, and is no longer limited to the data mode of a single source domain. When training is performed based on the mapping space to generate the target model, the information of the source domain and the auxiliary domain can be fully utilized to better estimate and adapt to the distribution differences between different domains. In this way, when faced with unknown target domain data, the model already has the ability to handle different data distributions and can perform various tasks more accurately, thereby greatly improving the generalization ability of the model. It effectively solves the problem of difficulty in fully estimating and adapting to distribution differences between domains and poor generalization ability in related technologies due to the use of methods that ignore the inherent connections and differences between the source domain and the target domain to improve the generalization ability of the model.
[0130] Corresponding to the above-mentioned model generation method, an embodiment of the present invention further provides a model generation device, Fig.10 A schematic diagram of the module composition of the model generation device 1000 provided in an embodiment of the present invention is shown in FIG. Fig.10 As shown, the model generation device 1000 includes: The transformation module 1001 is used to perform a preset transformation on the acquired source domain data to obtain auxiliary domain data corresponding to the source domain data; the preset transformation includes at least one of the following: rotation, scaling, noise addition and color transformation; A determination module 1002 is used to determine a causal factor between the source domain data and the auxiliary domain data; the causal factor is a factor that triggers the source domain data to be transformed into the auxiliary domain data; A mapping module 1003 is used to map the source domain data and the auxiliary domain data to the same feature space according to the causal factors to obtain a mapping space; The generation module 1004 is used to train the pre-created initial model based on the mapping space to generate a target model.
[0131] Optionally, the mapping module 1003 is used to: Determine the specified data distribution change value corresponding to each of the causal factors, and determine the causal factor corresponding to the maximum specified data distribution change value as the key causal factor; wherein the specified data distribution change value is the distribution change value of the auxiliary domain data when the source domain data changes; Mapping the source domain data and the auxiliary domain data to the same feature space, and determining a mapping weight corresponding to a minimum mapping distribution difference value according to the key causal factor; wherein the mapping distribution difference value is a distribution difference value of the source domain data and the auxiliary domain data in the same feature space; Determining, according to the mapping weights, a first mapping subspace obtained after the source domain data is mapped to the same feature space, and a second mapping subspace obtained after the auxiliary domain data is mapped to the same feature space; The generating module 1004 is used for: Determine a first feature subspace and a second feature subspace respectively according to the common features between the first mapping subspace and the second mapping subspace, and the non-common features between the first mapping subspace and the second mapping subspace; Based on the first feature subspace and the second feature subspace, the pre-created initial model is trained to generate a target model.
[0132] Optionally, the transformation module 1001 is used to: Determine candidate transformation parameters from within a preset parameter range; Determine the data transformation distribution difference value corresponding to each candidate transformation parameter; wherein the data transformation distribution difference value is the difference in distribution between the data after transformation according to the corresponding candidate transformation parameter and the data before transformation; Determine the candidate transformation parameter corresponding to the determined maximum data transformation distribution difference value as the target transformation parameter; According to the target transformation parameters, a preset transformation is performed on the acquired source domain data.
[0133] Optionally, the mapping module 1003 is used to: Determining a distribution change of the auxiliary domain data when each of the causal factors changes; Learning data representations of the source domain data and the auxiliary domain data to determine data distribution values of the source domain data and the auxiliary domain data; When determining the change of each of the causal factors, the data distribution value of the auxiliary domain data follows the change value of the data distribution value of the source domain data to obtain the specified data distribution change value corresponding to each of the causal factors.
[0134] Optionally, the mapping module 1003 is used to: According to the latent variable model, determining the effect value corresponding to the key causal factor; A mapping weight corresponding to a minimum mapping distribution difference value is determined according to the effect value corresponding to the key causal factor and the specified data distribution change value.
[0135] Optionally, the generating module 1004 is used to: Extracting features of different domains from the first feature subspace and the second feature subspace; Mix the features extracted from different domains to obtain mixed feature samples; The pre-created initial model is trained according to the mixed feature samples.
[0136] In an embodiment of the present invention, a preset transformation may be first performed on the acquired source domain data to obtain auxiliary domain data corresponding to the source domain data, wherein the preset transformation may include at least one of the following: rotation, scaling, noise addition, and color transformation. Then, the causal factor between the source domain data and the auxiliary domain data may be determined, where the causal factor is a factor that triggers the transformation of the source domain data into the auxiliary domain data. Based on the causal factor, the source domain data and the auxiliary domain data are mapped to the same feature space to obtain a mapping space. Based on the mapping space, the pre-created initial model is trained to generate a target model.
[0137] It can be seen from the above-mentioned embodiments of the invention that after acquiring the source domain data, the embodiments of the present invention can transform the source domain data to obtain auxiliary domain data, thereby enriching the diversity of the data and simulating different data distribution situations that may occur. Then, the embodiments of the present invention will determine the causal factors between the two, and clarify what factors trigger the transformation of the data from the source domain to the auxiliary domain, so as to better grasp the intrinsic connection and change law between different data domains. According to the determined causal factors, the source domain data and the auxiliary domain data can be mapped to the same feature space to obtain a mapping space, so that the subsequently generated model can learn the data features of different domains in the same space, so as to better adapt to the changes in the data, learn the cross-domain universal feature representation, and is no longer limited to the data mode of a single source domain. When training is performed based on the mapping space to generate the target model, the information of the source domain and the auxiliary domain can be fully utilized to better estimate and adapt to the distribution differences between different domains. In this way, when faced with unknown target domain data, the model already has the ability to handle different data distributions and can perform various tasks more accurately, thereby greatly improving the generalization ability of the model. It effectively solves the problem of difficulty in fully estimating and adapting to distribution differences between domains and poor generalization ability in related technologies due to the use of methods that ignore the inherent connections and differences between the source domain and the target domain to improve the generalization ability of the model.
[0138] Corresponding to the above-mentioned model generation method, an embodiment of the present invention further provides a model generation device, Fig.11 A schematic diagram of the hardware structure of a model generation device provided in one embodiment of the present invention.
[0139] The model generating device may be a terminal device or a server for generating a model provided in the above-mentioned embodiment.
[0140] The model generation device may have relatively large differences due to different configurations or performances, and may include one or more processors 1101 and memory 1102, and the memory 1102 may store one or more storage applications or data. Among them, the memory 1102 may be a short-term storage or a persistent storage. The application stored in the memory 1102 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the model generation device. Furthermore, the processor 1101 may be configured to communicate with the memory 1102, and execute a series of computer executable instructions in the memory 1102 on the model generation device. The model generation device may also include one or more power supplies 1103, one or more wired or wireless network interfaces 1104, one or more input and output interfaces 1105, and one or more keyboards 1106.
[0141] Specifically in this embodiment, the model generation device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the model generation device, and is configured to be executed by one or more processors.
[0142] In an embodiment of the present invention, a preset transformation may be first performed on the acquired source domain data to obtain auxiliary domain data corresponding to the source domain data, wherein the preset transformation may include at least one of the following: rotation, scaling, noise addition, and color transformation. Then, the causal factor between the source domain data and the auxiliary domain data may be determined, where the causal factor is a factor that triggers the transformation of the source domain data into the auxiliary domain data. Based on the causal factor, the source domain data and the auxiliary domain data are mapped to the same feature space to obtain a mapping space. Based on the mapping space, the pre-created initial model is trained to generate a target model.
[0143] It can be seen from the above-mentioned embodiments of the invention that after acquiring the source domain data, the embodiments of the present invention can transform the source domain data to obtain auxiliary domain data, thereby enriching the diversity of the data and simulating different data distribution situations that may occur. Then, the embodiments of the present invention will determine the causal factors between the two, and clarify what factors trigger the transformation of the data from the source domain to the auxiliary domain, so as to better grasp the intrinsic connection and change law between different data domains. According to the determined causal factors, the source domain data and the auxiliary domain data can be mapped to the same feature space to obtain a mapping space, so that the subsequently generated model can learn the data features of different domains in the same space, so as to better adapt to the changes in the data, learn the cross-domain universal feature representation, and is no longer limited to the data mode of a single source domain. When training is performed based on the mapping space to generate the target model, the information of the source domain and the auxiliary domain can be fully utilized to better estimate and adapt to the distribution differences between different domains. In this way, when faced with unknown target domain data, the model already has the ability to handle different data distributions and can perform various tasks more accurately, thereby greatly improving the generalization ability of the model. It effectively solves the problem of difficulty in fully estimating and adapting to distribution differences between domains and poor generalization ability in related technologies due to the use of methods that ignore the inherent connections and differences between the source domain and the target domain to improve the generalization ability of the model.
[0144] Another embodiment of the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions implement the above process when executed by a processor.
[0145] The storage medium in the embodiment of the present disclosure can implement each process of the above-mentioned model generation method embodiment and achieve the same effect and function, which will not be repeated here.
[0146] Another embodiment of the present disclosure further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above process is implemented.
[0147] The computer program product in the embodiment of the present disclosure can implement each process of the above-mentioned model generation method embodiment and achieve the same effects and functions, which will not be repeated here.
[0148] In various embodiments of the present disclosure, the computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0149] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0150] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0151] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0152] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0153] It should be understood by those skilled in the art that one or more embodiments of the present disclosure may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0154] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0155] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0157] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0158] One or more embodiments of the present disclosure may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present disclosure may also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0159] Each embodiment in the present disclosure is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0160] The above description is only an embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the scope of the claims of the present disclosure.
Claims
1. A model generation method, characterized in that: The method comprises: Performing a preset transformation on the acquired source domain data to obtain auxiliary domain data corresponding to the source domain data; the preset transformation includes at least one of the following: rotation, scaling, noise addition, and color transformation; Determining a causal factor between the source domain data and the auxiliary domain data; the causal factor is a factor that triggers the source domain data to be transformed into the auxiliary domain data; According to the causal factors, the source domain data and the auxiliary domain data are mapped to the same feature space to obtain a mapping space; Based on the mapping space, the pre-created initial model is trained to generate a target model.
2. The method according to claim 1, characterized in that The mapping of the source domain data and the auxiliary domain data to the same feature space according to the causal factors to obtain a mapping space includes: Determine the specified data distribution change value corresponding to each of the causal factors, and determine the causal factor corresponding to the maximum specified data distribution change value as the key causal factor; wherein the specified data distribution change value is the distribution change value of the auxiliary domain data when the source domain data changes; Mapping the source domain data and the auxiliary domain data to the same feature space, and determining a mapping weight corresponding to a minimum mapping distribution difference value according to the key causal factor; wherein the mapping distribution difference value is a distribution difference value of the source domain data and the auxiliary domain data in the same feature space; Determining, according to the mapping weights, a first mapping subspace obtained after the source domain data is mapped to the same feature space, and a second mapping subspace obtained after the auxiliary domain data is mapped to the same feature space; The step of training a pre-created initial model based on the mapping space to generate a target model includes: Determine a first feature subspace and a second feature subspace respectively according to the common features between the first mapping subspace and the second mapping subspace, and the non-common features between the first mapping subspace and the second mapping subspace; Based on the first feature subspace and the second feature subspace, the pre-created initial model is trained to generate a target model.
3. The method according to claim 1, characterized in that The performing a preset transformation on the acquired source domain data includes: Determine candidate transformation parameters from within a preset parameter range; Determine the data transformation distribution difference value corresponding to each candidate transformation parameter; wherein the data transformation distribution difference value is the difference value in distribution between the data after transformation according to the corresponding candidate transformation parameter and the data before transformation; Determine the candidate transformation parameter corresponding to the determined maximum data transformation distribution difference value as the target transformation parameter; According to the target transformation parameters, a preset transformation is performed on the acquired source domain data.
4. The method according to claim 2, characterized in that: The determining of the specified data distribution change value corresponding to each of the causal factors includes: Determining a distribution change of the auxiliary domain data when each of the causal factors changes; Learning data representations of the source domain data and the auxiliary domain data to determine data distribution values of the source domain data and the auxiliary domain data; When determining the change of each of the causal factors, the data distribution value of the auxiliary domain data follows the change value of the data distribution value of the source domain data to obtain the specified data distribution change value corresponding to each of the causal factors.
5. The method according to claim 2, characterized in that: The determining, according to the key causal factors, a mapping weight corresponding to a minimum mapping distribution difference value comprises: According to the latent variable model, determining the effect value corresponding to the key causal factor; A mapping weight corresponding to a minimum mapping distribution difference value is determined according to the effect value corresponding to the key causal factor and the specified data distribution change value.
6. The method according to claim 2, characterized in that The training of the pre-created initial model based on the first feature subspace and the second feature subspace includes: Extracting features of different domains from the first feature subspace and the second feature subspace; Mix the features extracted from different domains to obtain mixed feature samples; The pre-created initial model is trained according to the mixed feature samples.
7. A model generation device, characterized in that: The device comprises: A transformation module, configured to perform a preset transformation on the acquired source domain data to obtain auxiliary domain data corresponding to the source domain data; the preset transformation includes at least one of the following: rotation, scaling, noise addition, and color transformation; A determination module, configured to determine a causal factor between the source domain data and the auxiliary domain data; the causal factor is a factor that triggers the source domain data to be transformed into the auxiliary domain data; A mapping module, used for mapping the source domain data and the auxiliary domain data to the same feature space according to the causal factors to obtain a mapping space; The generation module is used to train the pre-created initial model based on the mapping space to generate a target model.
8. A model generation device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the method according to any one of claims 1 to 6 when executed by the processor.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.