How to Train Domain Adversarial Neural Networks

By introducing weight loss function and simultaneous probability density ratio in DANNs, adjusting the loss function and calculating the probability density ratio to achieve class-level feature matching, the problem of incomplete loss function and insufficient category matching in the domain adaptation task is solved, and the prediction performance of the model on the target data set is improved.

JP7661713B2Active Publication Date: 2025-04-15FUJITSU LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2021020084
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-03-11
Filing Date
2021-02-10
Publication Date
2025-04-15
Estimated Expiration
2041-02-10

AI Technical Summary

Technical Problem

There are two main problems in the domain adaptation task of existing Domain Adversarial Neural Networks (DANNs): First, only the prediction loss of the source data set is considered during the optimization process and the loss of the target data set is ignored; second, the category-level matching cannot be achieved, and only the feature space can be matched.

Method used

By introducing a weight loss function, the simultaneous probability density ratio of the target data set and the source data set is used to adjust the loss function of the source data set, so as to improve the prediction performance of the target data set during the training of the label predictor. In addition, the simultaneous probability density ratio is calculated by the output of the domain identifier to achieve class-level feature matching.

Benefits of technology

The improved method can improve the prediction performance of the model on the target dataset in the domain adaptation task and realize class-level feature matching, avoiding the confounding problem of different categories of features during feature space matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007661713000020
    Figure 0007661713000020
  • Figure 0007661713000021
    Figure 0007661713000021
  • Figure 0007661713000022
    Figure 0007661713000022
Patent Text Reader

Abstract

To provide a training method for a domain adversarial neural network.SOLUTION: A domain adversarial neural network includes: a feature extraction part which extracts a first feature as to labeled source data and a second feature as to unlabeled target data; a label prediction part which predicts a label of the source data on the basis of the first feature and predicts a label of the target data on the basis of the second feature; and a discrimination part which discriminates, on the basis of the first feature and second feature, which of the source data and target data a piece of data is. A training method comprises: structuring a first loss function as prediction loss associated with the source data on the basis of output of the label prediction part; weighting the first loss function using a simultaneous probability density ratio of the source data and target data so acquire a second loss function; and using the first loss function and second loss function to train the label prediction part and feature extraction part.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates generally to domain adaptation, and more particularly to a method for training a domain adversarial neural network. [Background technology]

[0002] The training and application of neural networks usually involves a labeled source dataset and an unlabeled target dataset. Due to differences between the source and target datasets, e.g., distribution differences, a neural network model trained with the source dataset may perform poorly when directly applied to the target dataset. The task of domain adaptation is to obtain a model with good performance on the target dataset by training. In this regard, techniques such as Domain Adversarial Neural Networks (DANNs) have been proposed, which solve problems by learning domain-invariant features.

[0003] FIG. 1 shows a schematic diagram of the architecture and training process of DANN. As shown in FIG. 1, DANN includes a feature extractor 110, a label predictor 120, and a domain classifier 130. The feature extractor 110 and the label predictor 120 constitute a standard forward network structure. The domain classifier 130 realizes unsupervised domain adaptation. The domain classifier 130 is connected to the feature extractor 110 through a gradient inversion layer 140. In the process of backpropagation, the gradient inversion layer 140 multiplies the gradient by a negative constant (e.g., "-1" in FIG. 1) to realize the inversion of the gradient, so that the domain classifier 130 and the feature extractor 110 operate in an adversarial manner with each other. Without the gradient inversion layer 140, the training is performed according to the conventional process, i.e., training is performed so that the loss of the label predictor 120 (only for the samples of the source dataset) and the loss of the domain classifier 130 (for the samples of the source dataset and the samples of the target dataset) are minimized. However, with the gradient inversion layer 140, the feature extractor 110 and the domain classifier 130 are trained to be adversarial to each other. Specifically, the feature extractor 110 extracts as many features as possible so that the domain classifier 130 cannot identify whether a sample is from the source domain or the target domain based on the features. Meanwhile, the domain classifier 130 identifies whether a sample is from the source domain or the target domain based on the input features as much as possible. Through such adversarial training, the feature extractor 110 can finally learn to extract domain-invariant features so that the domain classifier 130 cannot identify which domain a sample is from. In this process, the gradient inversion layer 140 can guarantee the similarity of the distribution of features learned in the source domain and the target domain, and therefore can learn domain-invariant features.

[0004] Although DANN can achieve good results in the task of domain adaptation, it has some problems. First, in the optimization process of the label predictor 120, only the prediction loss for the samples of the source dataset is minimized, and the prediction loss for the samples of the target dataset is not considered. Second, DANN realizes domain adaptation by matching feature space, but cannot realize class level matching. Summary of the Invention [Problem to be solved by the invention]

[0005] In order to solve the above problems, the present invention provides a training method for improving DANN. In short, the method of the present invention uses the joint probability density ratio of the target data set and the source data set to weight the loss function of the source data set, and the weighted loss function can be close to the loss function of the target data set. Therefore, by using the weighted loss function in the training process of the label predictor, better prediction performance can be achieved when the trained predictor is applied to the target data set. [Means for solving the problem]

[0006] In one aspect of the present invention, there is provided a method for training a domain adversarial neural network model, the domain adversarial neural network model including: a feature extraction unit that extracts a first feature for input labeled source data and extracts a second feature for input unlabeled target data; a label prediction unit that predicts a label of the source data based on the extracted first feature and predicts a label of the target data based on the extracted second feature; and an identification unit that identifies whether the input data is source data or target data based on the extracted first feature and second feature, the training method including the steps of: constructing a first loss function based on an output of the label prediction unit, the first loss function being a predicted loss associated with the source data; obtaining a second loss function by weighting the first loss function using a joint probability density ratio of the source data and the target data; and training the label prediction unit and the feature extraction unit using the first loss function and the second loss function.

[0007] In another aspect of the present invention, there is provided an apparatus for training a domain adversarial neural network model, the domain adversarial neural network model including: a feature extraction unit that extracts a first feature for input labeled source data and extracts a second feature for input unlabeled target data; a label prediction unit that predicts a label of the source data based on the extracted first feature and predicts a label of the target data based on the extracted second feature; and an identification unit that identifies whether the input data is source data or target data based on the extracted first feature and second feature. The training apparatus includes a memory that stores a program; and one or more processors. The processor executes the program to perform the steps of: constructing a first loss function based on an output of the label prediction unit, the first loss function being a predicted loss associated with the source data; obtaining a second loss function by weighting the first loss function using a joint probability density ratio of the source data and the target data; and training the label prediction unit and the feature extraction unit using the first loss function and the second loss function.

[0008] In another aspect of the present invention, there is provided a storage medium having stored thereon a program for training a domain adversarial neural network model, the domain adversarial neural network model including: a feature extraction unit that extracts a first feature for input labeled source data and extracts a second feature for input unlabeled target data; a label prediction unit that predicts a label of the source data based on the extracted first feature and predicts a label of the target data based on the extracted second feature; and an identification unit that identifies whether the input data is source data or target data based on the extracted first feature and second feature. When the program is executed by a computer, the storage medium causes the computer to execute a method including the steps of: constructing a first loss function based on an output of the label prediction unit, the first loss function being a predicted loss associated with the source data; obtaining a second loss function by weighting the first loss function using a joint probability density ratio of the source data and the target data; and training the label prediction unit and the feature extraction unit using the first loss function and the second loss function. [Brief description of the drawings]

[0009] [Figure 1] FIG. 1 shows a schematic diagram of the DANN architecture and training process. [Diagram 2] FIG. 1 illustrates a schematic diagram of a domain adaptation framework according to one embodiment of the present invention. [Diagram 3] FIG. 13 is a diagram showing a curve of the parameter λC. [Figure 4] FIG. 13 is a diagram showing a curve of the parameter λp. [Diagram 5] 2 is a flowchart of a method for training a domain adversarial neural network according to the embodiment. [Figure 6] FIG. 2 is a diagram showing a modular framework of a domain adversarial neural network training apparatus according to the embodiment. [Figure 7]FIG. 2 illustrates a schematic diagram of a domain adaptation framework according to another embodiment of the present invention. [Figure 8] FIG. 13 is a graph showing the curve of the parameter λ TC. [Figure 9] FIG. 2 illustrates an example of semantic segmentation. [Figure 10] FIG. 1 is a block diagram showing an exemplary configuration of computer hardware capable of implementing the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] The present invention improves on DANN and provides a joint density ratio estimation-based domain adaptation method (JDA). Figure 2 shows a schematic diagram of a domain adaptation framework according to one embodiment of the present invention.

[0011] As shown in FIG. 2, the domain adversarial neural network according to the present invention includes a feature extractor G, a label predictor C, and a domain classifier D. Furthermore, X P represents the labeled source samples, and X Q represents the unlabeled target samples, and G(X P ) represents the features of the source sample, and G(X Q ) represents the characteristics of the target sample, and Y P represents the label of the source sample, and Y Q represents the label of the target sample. Since the target sample is unlabeled data, Y Q is a pseudo-label.

[0012] A feature extractor G is a set of labeled source samples X P About Features G(X P ) and extract the unlabeled target sample X Q About Features G(X Q) is extracted. The label predictor C extracts the extracted features G(X P ) based on source sample X P Label Y P and predict the extracted features G(X Q ) based on target sample X Q Label Y Q The domain classifier D predicts the extracted features G(X P ) and feature G(X Q ) to identify whether the input sample is a source sample or a target sample.

[0013] In training the label predictor C, we use the label prediction loss function L UC and the weighted label prediction loss function L C The following formulas (1) and (2) show these two loss functions, respectively.

number

number

[0014] Here, E represents the mathematical expectation, P represents the distribution of the source data, l represents the cross-entropy loss function, C represents the classifier, i.e., the label predictor, and r(x,y) represents the joint probability density ratio of the target data set and the source data set, which can be expressed as the following formula (3).

number

[0015] Here, p(x,y) represents the joint probability density function of the source domain, and q(x,y) represents the joint probability density function of the target domain.

[0016] Weighted label prediction loss function L C In the loss function L, the predicted loss of each source sample is weighted by the joint probability density ratio r(x,y). Ccan be close to the loss function of the target dataset. Therefore, in training the label predictor C, the loss function L C Using this can improve the performance of the model on the target dataset.

[0017] In the present invention, the joint probability density ratio r(x,y) may be calculated based on the output of the domain identifier D. Therefore, the domain identifier D is not only used to distinguish the source sample from the target sample, but also to estimate the joint probability density ratio. The details are as follows:

[0018] First, equation (4) is the classification loss function L of the domain classifier D. D Represents.

number

[0019] Here, P represents the distribution of the source data and Q represents the distribution of the target data.

[0020] Loss function L D Since D is an independent variable, the loss function L D The optimal solution D when is the minimum value * It is necessary to calculate (G(x),y).

[0021] According to equation (4), the following equation can be obtained:

number

[0022] D * Substituting (G(x),y), we further obtain the following equation:

number

[0023] If the function f(d)=plog(d)+qlog(1-d) has a maximum value in the interval (0,1), then the variable (outside 1) TIFF0007661713000007.tif20170, so the following formula can be obtained based on formula (6).

number

[0024] Where: (outside 2) The result is TIFF0007661713000009.tif14170.

[0025] Considering the definition of equation (3), the joint probability density ratio r(x, y) can be expressed as the following equation (8).

number

[0026] According to formula (8), the loss function L of the domain classifier D is D Output D when is at its minimum value * The joint probability density ratio r(x,y) may be calculated using (G(x),y).

[0027] The output of the domain classifier D is used to estimate the joint probability density ratio, so the domain classifier D uses the features G(X P ), G(X Q ) as well as inputting the labels Y of the source and target samples. P , Y Q Since the label of the target sample is unknown, in the present invention, the label prediction result of the target sample by the label predictor C is expressed as a pseudo label Y Q and input it to the domain classifier D.

[0028] In the present invention, the estimated joint probability density ratio is used to weight the predicted losses for the source dataset, resulting in a weighted loss function (L C), it is possible to realize not only feature space matching but also class level matching. Compared to the present invention, when only feature space matching is realized, the following problem occurs. Although the features of the source domain sample and the target domain sample are close to each other in the feature space, the features of samples of different classes may be mixed, so that the samples of each class cannot be appropriately distinguished. On the other hand, the present invention can achieve class level matching, and therefore this problem can be solved.

[0029] In the present invention, a weighted sum of loss functions is used to train the model shown in FIG. 2. For example, as shown in Equation (9), the above-mentioned loss function L UC , L C , L D Train a model based on a weighted sum of

number

[0030] In equation (9), the weight λ C We use λ to control the level at which the loss function LC acts in the process of optimizing the label predictor C and the feature extractor G. At the beginning of training, the estimation of the joint probability density ratio is inaccurate, so we use λ to optimize the model mainly based on the predicted loss of the source samples. C It is preferable to set the value of λ relatively small. As training progresses, the estimates of the joint probability density ratios become increasingly accurate, so that the model can be optimized based on the predicted loss of the target samples. C We may gradually increase the value of λ. For example, during the training process, C may be gradually increased from the initial value "0" to "1". C may be expressed by the following equation (10).

number

[0031] Here, p represents the progress of training and increases linearly from 0 to 1, and α and n represent hyperparameters, which may be set based on experience. For example, both are set to 10. Figure 3 shows the parameter λ C , where α is set to 1 and n is set to 10.

[0032] On the other hand, as shown in FIG. 2, in the process of backpropagation, the gradient inversion layer 240, like the gradient inversion layer of the DANN, applies a negative constant “−λ p In the training process of the present invention, the parameter λ is multiplied to realize the inversion of the gradient. C Similarly, the parameter λ p Gradually increase the value of λ, for example from the initial value "0" to "1". p may be expressed by the following Equation (11).

number

[0033] Here, p represents the training progress and increases linearly from 0 to 1, and γ represents a hyperparameter, which may be set to, for example, 10 based on experience. Figure 4 shows the parameter λ p λ p does not appear in equation (9) because it is only used to optimize the feature extractor G.

[0034] 5 is a flowchart of a method for training a domain adversarial neural network according to the embodiment, and FIG. 6 is a diagram showing a modular framework of a training device for a domain adversarial neural network according to the embodiment. As shown in FIG. 5 and FIG. 6, in step S510, a loss function L is calculated based on the output of a label predictor C according to Equation (1). UC Construct a loss function L UC is the predicted loss associated with the source data. This step may be performed by the first loss function generator 610 in FIG.

[0035] In step S520, a joint probability density ratio r(x,y) between the source data set and the target data set is determined based on the output of the domain identifier D according to Equation (8). This step may be performed by the joint probability density ratio determiner 640 in FIG. 6.

[0036] In step S530, the loss function L is calculated using the joint probability density ratio r(x, y) as shown in Equation (2). UC Weighting the loss function L C Obtain the loss function L C can approximate the expected loss associated with the target dataset. This step may be performed by the second loss function generator 620 in FIG. 6.

[0037] In step S540, a loss function L is calculated based on the output of the domain classifier D according to Equation (4). D This step may be performed by the third loss function generator 630 in FIG.

[0038] In step S550, the loss function L is calculated according to the formula (9). UC , loss function L C and the loss function L D We train a domain adversarial neural network model based on a weighted combination of the loss function L as the training progresses. C Weight λ Cmay be gradually increased. This step may be performed by the training unit 650 in FIG. 6. The following describes a domain adaptation framework according to another embodiment of the present invention with reference to FIG. 7. In this embodiment, the above-mentioned JDA and self-ensembling are combined (JDA-SE). As shown in FIG. 7, the domain adversarial neural network model according to the present invention includes a feature extractor G and a label predictor C, which are student networks, and a teacher feature extractor G and a teacher label predictor C, which are teacher networks. The teacher network has a network structure similar to that of the corresponding student network. The difference is that the network parameters of the teacher network are not trainable. In addition, the network parameters of the teacher feature extractor G are the exponential moving average of the parameters of the feature extractor G, and the network parameters of the teacher label predictor C are the exponential moving average of the parameters of the label predictor C.

[0039] The difference between this embodiment and the embodiment shown in FIG. 2 is, for example, as shown in the following formula (12), the target consistency loss function L TC has been introduced.

number

[0040] In this embodiment, as shown in formula (13), the loss function L UC , L C , L D , L TC Train a model based on a weighted sum of

number

[0041] λ C Similarly, λ in Eq. (13) TC is the loss function L in the process of optimizing the label predictor C and the feature extractor G.TC As training progresses, λ TC The value of may be gradually increased, for example from an initial value of "0" to "1". TC may be expressed by the following equation (14).

number

[0042] Here, p represents the progress of training and increases linearly from 0 to 1, and α, n, and β may be preset based on experience, e.g., α is set to 100, n is set to 10, and β is set to 0. Figure 8 shows the parameter λ TC FIG.

[0043] Table 1 below shows the performance comparison of the JDA and JDA-SE schemes of the present invention with conventional schemes (e.g., PFAN, ADDA, DANN, etc.). The comparison is based on the MNIST<->USPS dataset (a well-known handwritten character dataset). The values ​​in Table 1 represent the classification accuracy rate, and the higher the accuracy rate, the better the performance of the scheme.

[0044] In particular, Vanilla (source only) in Table 1 represents a scheme that does not use data from the target dataset, but only uses labeled data from the source dataset for training. This scheme is the simplest scheme and is used as the comparison baseline. Furthermore, the MDA scheme is a variant of JDA, which replaces the joint probability density ratio with the edge probability density ratio. Table 1 also shows the performance of the MDA scheme for comparison. [Table 1] [Table 1]

[0045] As can be seen from Table 1, the JDA and JDA-SE methods of the present invention have better performance. Moreover, compared with the Shift Compensation Network using edge probability density ratio (not shown in Table 1), the advantage of the method of the present invention is that it does not need to rely on the probability of any type of shift (e.g., covariate shift, label shift, etc.), while the Shift Compensation Network needs to rely on the probability of covariate shift.

[0046] The domain adaptation method according to the present invention can be applied to a wide range of domains, and a representative application scenario will be described below as an example.

[0047] [Application Scenario 1] Semantic segmentation Semantic segmentation means marking parts of an image that represent different objects with different colors. Figure 9 shows an example of semantic segmentation. The two images in the leftmost part of Figure 9 are original images, the two images in the second row from the left are ground truth segmentation results of the two original images, and the images in the other rows are segmentation results using different segmentation methods.

[0048] In application scenarios of semantic segmentation, the cost of manually labeling real-world images is very high, so real-world images are rarely labeled. In this case, as an alternative method, training is performed using images of scenes in a simulated environment (e.g., a 3D game). Since automatic labeling of objects in a simulated environment can be easily realized by programming, labeled data can be easily obtained. In this way, a model is trained using labeled data generated in a simulated environment, and images of a real environment are processed using the trained model. However, since the simulated environment does not completely match the real environment, the performance of a model trained using data from a simulated environment is significantly degraded when processing images of a real environment.

[0049] In this case, the domain adaptation method of the present invention can be used to train on labeled simulated environment data and unlabeled real environment data, thereby improving the performance of the model when processing images of the real environment.

[0050] [Application Scenario 2] Handwritten character recognition Handwritten characters usually include handwritten numbers, characters (e.g., Chinese, Japanese), etc. In handwritten character recognition, commonly used labeled character sets include MNIST, USPS, SVHN, etc., and models are usually trained using these labeled character data. However, when the trained model is applied to recognize real (unlabeled) handwritten characters, its accuracy rate may decrease.

[0051] In this case, the domain adaptation method of the present invention can be used to improve the performance of the model when processing the target data, since it can be trained on labeled source data and unlabeled target data.

[0052] [Application Scenario 3] Classification and prediction of time series data Forecasting of time series data includes, for example, forecasting of air pollution index, forecasting of length of stay (LOS) of ICU patients, forecasting of stock market, etc. The following will explain using time series data of fine particulate matter (PM2.5) index as an example.

[0053] Each data of the time series data set of the PM2.5 index records information such as the PM2.5 index, temperature, air pressure, wind speed, wind direction, cumulative rainfall, and cumulative snowfall in a specific area within a specific time range (for example, within one hour). Assume that it is necessary to predict the range of the PM2.5 index in the area for three days and beyond. For this purpose, a prediction model is constructed and a sample is constructed by selecting data of a specified length. For example, a specific 24-hour data in the data set is selected as a sample, and each data contains 8-dimensional features, so that the sample contains 24*8-dimensional features. Then, a label is assigned to the sample based on the range of the PM2.5 index in the data set for three days and beyond. In this way, a training sample set can be constructed and a prediction model can be trained using the training sample set. After the training is completed, the trained model may be applied to actual prediction. For example, the range of the PM2.5 index three days later may be predicted based on the data (unlabeled data) of the 24 hours immediately preceding the current time.

[0054] In this scenario, our domain adaptation method can be used to train a model based on labeled and unlabeled data, thereby improving the model's predictive accuracy.

[0055] [Application Scenario 4] Classification and prediction of table-type data The table type data may include financial data such as online loan data, etc. In this example, a predictive model may be built and the method of the present invention may be used to train the model to predict whether a loan arrangement is likely to default on payments.

[0056] [Application Scenario 5] Image Recognition Image recognition or image classification is a field where deep (convolutional) neural networks excel. Similar to the semantic segmentation scenario, this application scenario also suffers from the high cost of labeling real-world image datasets. Therefore, the domain adaptation method according to the present invention may be used to select a labeled dataset (e.g. ImageNet) as a source dataset and train on the source dataset and an unlabeled target dataset to obtain a model with performance that meets the requirements.

[0057] The above describes the embodiments of the present invention with reference to specific examples. The methods according to the above examples may be realized by software, hardware, or a combination of software and hardware. The programs included in the software may be pre-stored in a storage medium installed inside or outside the device. As an example, during execution, these programs are written into a random access memory (RAM) and executed by a processor (e.g., a CPU) to realize each process described in this specification.

[0058] FIG. 10 is a block diagram showing an exemplary configuration of computer hardware capable of implementing the present invention. The computer hardware is an example of a training device for a domain adversarial neural network according to the present invention.

[0059] As shown in FIG. 10, in a computer 1000, a central processing unit (CPU) 1001, a read-only memory (ROM) 1002, and a random access memory (RAM) 1003 are interconnected by a bus 1004.

[0060] The input / output interface 1005 is further connected to the bus 1004. Connected to the input / output interface 1005 are an input unit 1006 including a keyboard, a mouse, a microphone, etc., an output unit 1007 including a display, a speaker, etc., a storage unit 1008 including a hard disk, a non-volatile memory, etc., a communication unit 1009 including a network interface card (such as a local area network (LAN) card, a modem, etc.), and a driver 1010 for driving a removable medium 1011. The removable medium 1011 is, for example, a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory.

[0061] In a computer having the above configuration, the CPU 1001 loads a program stored in the storage unit 1008 into the RAM 1003 via the input / output interface 1005 and the bus 1004, and executes the program to perform the above method.

[0062] The program executed by the computer (CPU 1001) may be recorded on a removable medium 1011, which is a package medium. The package medium is formed of, for example, a magnetic disk (including a floppy disk), an optical disk (including a compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), etc.), a magneto-optical disk, or a semiconductor memory. The program executed by the computer (CPU 1001) may also be provided via a wired or wireless transmission medium of a local area network, the Internet, or digital satellite broadcasting.

[0063] When the removable medium 1011 is installed in the driver 1010, the program can be installed in the storage unit 1008 via the input / output interface 1005. Also, the program is received by the communication unit 1009 via a wired or wireless transmission medium and installed in the storage unit 1008. Alternatively, the program may be pre-installed in the ROM 1002 or the storage unit 1008.

[0064] The programs executed by the computer may be programs that perform operations in the order described in this specification, or may be programs that perform operations in parallel, or may perform operations on an as-needed basis (e.g., when called).

[0065] The devices or units described in this specification are logical and are not limited to physical devices or entities. For example, the functions of each unit described in this specification may be realized by multiple physical entities, or the functions of multiple units described in this specification may be realized by a single physical entity. In addition, features, components, elements, steps, etc. described in one embodiment are not limited to the embodiment, and may be applied to other embodiments, for example, and may be used in place of or combined with specific features, components, elements, steps, etc. of other embodiments.

[0066] The scope of the present invention is not limited to the specific embodiments described herein. As can be understood by those skilled in the art, various modifications or changes may be made to the embodiments described herein according to design requirements and other factors without departing from the principles and spirit of the present invention. The scope of the present invention is limited by the appended claims and their equivalents.

[0067] Furthermore, the following supplementary notes are disclosed regarding the embodiments including the above-mentioned examples, but the present invention is not limited to these supplementary notes. (Appendix 1) 1. A method for training a domain adversarial neural network model, comprising: The domain adversarial neural network model is a feature extraction unit for extracting a first feature from input labeled source data and extracting a second feature from input unlabeled target data; a label prediction unit that predicts a label of the source data based on the extracted first feature and predicts a label of the target data based on the extracted second feature; an identification unit that identifies whether the input data is source data or target data based on the extracted first and second features; The training method includes: constructing a first loss function based on an output of the label predictor, the first loss function being a predicted loss associated with the source data; weighting the first loss function using a joint probability density ratio of the source data and the target data to obtain a second loss function; training the label predictor and the feature extractor using the first loss function and the second loss function. (Appendix 2) The domain adversarial neural network model is used to perform image recognition, and the source data and the target data are image data; or The domain adversarial neural network model is used to process financial data, and the source data and the target data are table-type data; or 2. The method of claim 1, wherein the domain adversarial neural network model is used to process environmental meteorological data or medical data, and the source data and the target data are time series data. (Appendix 3) 2. The method of claim 1, wherein the second loss function can approximate a predicted loss associated with the target data. (Appendix 4) 2. The method of claim 1, further comprising determining the joint probability density ratio based on an output of the identification unit. (Appendix 5) The joint probability density ratio r is calculated according to the following formula:

number

Claims

1. 1. A method for training a domain adversarial neural network model, comprising: The domain adversarial neural network model is a feature extraction unit for extracting first features from input labeled source data and extracting second features from input unlabeled target data; a label prediction unit that predicts a label of the source data based on the extracted first feature and predicts a label of the target data based on the extracted second feature; an identification unit that identifies whether the input data is source data or target data based on the extracted first and second features; The computer constructing a first loss function based on an output of the label predictor, the first loss function being a predicted loss associated with the source data; weighting the first loss function using a joint probability density ratio of the source data and the target data to obtain a second loss function; training the label predictor and the feature extractor using the first loss function and the second loss function.

2. The domain adversarial neural network model is used to perform image recognition, and the source data and the target data are image data; or The domain adversarial neural network model is used to process financial data, and the source data and the target data are table-type data; or The method of claim 1 , wherein the domain adversarial neural network model is used to process environmental weather data or medical data, and the source data and the target data are time series data.

3. The method of claim 1 , wherein the second loss function can approximate an expected loss associated with the target data.

4. The method of claim 1 , further comprising the step of determining the joint probability density ratio based on an output of the identifier.

5. The joint probability density ratio r is calculated according to the following formula: [0010] The method of claim 4 , wherein D represents the output of the identifier.

6. The method of claim 4 , wherein the identification unit is further provided with a label of the source data and a label of the target data predicted by the label prediction unit.

7. constructing a third loss function based on an output of the classification unit; training the domain adversarial neural network model based on a weighted combination of the first loss function, the second loss function, and the third loss function; The method of claim 1 , further comprising: gradually increasing the weights for weighting the second loss function as training progresses.

8. the identification unit is connected to the feature extraction unit via a gradient reversal unit; The method of claim 1 , wherein the classifier and the feature extractor operate in an adversarial manner to each other.

9. The domain adversarial neural network model further includes another feature extractor and another label predictor; the parameter of the other feature extraction unit is an exponential moving average of the parameter of the feature extraction unit; the parameter of the other label predictor is an exponential moving average of the parameter of the other label predictor, The method of claim 7 , wherein the training method further comprises constructing a fourth loss function based on outputs of the feature extractor, the other feature extractor, the label predictor, and the other label predictor.

10. training the domain adversarial neural network model based on a weighted combination of the first loss function, the second loss function, the third loss function, and the fourth loss function; The method of claim 9 , further comprising: gradually increasing the weights for weighting the fourth loss function as training progresses.

Citation Information

Patent Citations

  • Systems and Methods for Automatic Speech Recognition Using Domain Adaptation Techniques

    US20190325861A1

  • Learning device, learning method, and recording medium

    WO2019102962A1