Learning device for domain adaptation, method for generating trained models, inference device, and program
The learning device with shared feature extractors and adversarial training for source and target domain recognizers addresses the challenges of domain adaptation, ensuring accurate model adaptation and maintaining source domain accuracy by merging common features and preserving domain differences.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- FAIRY DEVICES INC
- Filing Date
- 2022-08-17
- Publication Date
- 2026-07-03
AI Technical Summary
Conventional domain adaptation techniques face challenges in maintaining inference accuracy in the source domain when adapting to a target domain with a different label configuration, as they suffer from catastrophic forgetting and require costly and time-consuming labeling of rare data, and existing methods fail to address the loss of information from the source domain during training.
A learning device with a feature extractor shared by two recognizers for the source and target domains and a domain discriminator, trained adversarially to merge common features while preserving domain differences, utilizing semi-supervised learning with labeled and unlabeled target domain data.
The approach enables accurate model adaptation to the target domain while maintaining accuracy in both source and target domains, overcoming the limitations of conventional methods by fusing overlapping features and preserving domain-specific information.
Smart Images

Figure 0007884237000001 
Figure 0007884237000002 
Figure 0007884237000003
Abstract
Description
Technical Field
[0001] The present invention relates to a learning device, a learning program, and a method for generating a learned model for adapting a source domain to a target domain. Further, the present invention relates to an inference device, an inference program, and an inference method for performing inference on target data using the learned model obtained here.
Background Art
[0002] In statistical machine learning, a model is trained using training data with labels. This technology is utilized in various fields such as image recognition, speech recognition, and natural language processing. On the other hand, when the distribution of target data for which labels are to be inferred using a learned model is different from the distribution of the training data used during the learning of this learned model, there is a known problem that the inference accuracy of the target data decreases. This problem is called domain mismatch.
[0003] In this specification, large-scale training data with sufficient labels already assigned is referred to as "source domain data", and the distribution to which this source domain data belongs is referred to as the "source domain". Further, training data for training a model that functions with high accuracy in another distribution by applying the knowledge (information) obtained from the source domain data is referred to as "target domain data", and the distribution to which this target domain data belongs is referred to as the "target domain". Note that these terms are well-known in the technical field of domain adaptation and do not differ from the meanings of the terms used in this technical field.
Prior Art Documents
Patent Documents
[0004]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0005] Incidentally, if the target domain data is sufficiently labeled, a technique called transfer learning can be used, which involves re-optimizing a pre-trained model from the source domain on the target domain dataset. However, labeling target domain data is a costly and time-consuming process, making it impractical to prepare a large amount of labeled data in the target domain.
[0006] Furthermore, in conventional domain adaptation techniques such as transfer learning, a phenomenon called catastrophic forgetting is known, in which the accuracy in the source domain dramatically deteriorates. There is data that is common in the source domain but rarely found in the target domain. Finding and labeling a sufficient amount of such rare data in the target domain is not practical due to the enormous cost and time required. Therefore, a model adapted to the target domain by transfer learning cannot perform inference with appropriate accuracy for data that is rare in the target domain. In other words, even if the data is common in the source domain, if it is rare in the target domain, the model cannot maintain the original level of accuracy after domain adaptation.
[0007] Furthermore, if only a small amount of data in the target domain is labeled, it is possible to train a model adapted to the target domain using domain adaptation techniques that utilize data from both the source and target domains (e.g., adversarial domain adaptation). However, in order to train a model using adversarial domain adaptation, for example, the label structure (also called the task) in the source and target domains must be exactly the same. Taking emotion speech recognition as an example, if the source domain labels speech data into two classes, "calm" and "angry," a model that classifies it into three classes, "calm," "joyful," and "angry," in the target domain cannot be trained using conventional domain adaptation techniques. Similarly, if arousal and valence are assigned as continuous values in the source domain, a model that classifies them into three classes, "calm," "joyful," and "angry," in the target domain cannot be trained using conventional domain adaptation techniques.
[0008] Furthermore, Patent Document 1 discloses a learning device aimed at obtaining highly accurate processing results even when the samples of the target domain do not adequately correspond to the samples of the source domain. This learning device generates pseudo-samples of a second class in the target domain based on the distribution of samples of a first class included in the target domain in the feature space, and then uses machine learning to transform the data in the feature space so that the distributions of samples of the first and second classes included in the source domain approach the distributions of the pseudo-samples of the first and second classes included in the target domain. This is said to allow the sample distribution of the source domain to be sufficiently close to the sample distribution of the target domain when adapting the source domain to the target domain. However, transforming the data so that the distribution of samples in the source domain approaches the distribution of samples in the target domain, as in the learning device of Patent Document 1, still fails to solve the problem inherent in transfer learning, where information from the samples in the source domain is lost during training, and the inference accuracy in the source domain deteriorates.
[0009] Therefore, the main objective of the present invention is to provide a domain adaptation technique that can train a model adapted to a target domain while maintaining accuracy in both the source domain and the target domain, even when target domain data with a different label configuration from the source domain is provided. [Means for solving the problem]
[0010] The inventors of the present invention diligently considered means to solve the problems of the prior art described above. As a result, they decided to basically provide two recognizers for recognizing the labels of the source domain and the target domain, and a discriminator for discriminating between the domains of the training data. The two recognizers and the discriminator share a feature extractor, and this feature extractor is trained to be adversarial to the discriminator. In this way, by training the feature extractor to merge parts of the data features common to both the source domain and the target domain in the feature space, and to not merge parts that are different, it became possible to train a model adapted to the target domain while achieving accuracy in both the source domain and the target domain. Based on the above findings, the inventors realized that the problems of the prior art could be solved, and thus completed the present invention. Specifically, the present invention has the following configuration or steps.
[0011] The first aspect of the present invention relates to the learning device 100. The learning device 100 comprises a feature extractor 110, a source domain recognizer 120, a target domain recognizer 130, a domain discriminator 140, a source domain label comparison unit 150, a target domain label comparison unit 160, and a domain comparison unit 170. The feature extractor 110, source domain recognizer 120, target domain recognizer 130, and domain discriminator 140 each have one or more intermediate layers (hidden layers) between the input layer and the output layer, and are a neural network model in which the weights (parameters) of the connection strength of each node can be adjusted by machine learning.
[0012] The feature extractor 110 extracts features from the training data 101, which includes source domain data and target domain data. The source domain recognizer 120 takes the features output from the feature extractor 110 as input and outputs an estimated label 121 corresponding to the label structure of the source domain. The target domain recognizer 130 takes the features output from the feature extractor 110 as input and outputs an estimated label 131 corresponding to the label structure of the target domain. The domain discriminator 140 takes the features output from the feature extractor 110 as input, discriminates whether the features belong to the source domain or the target domain, and outputs an estimated domain 141. The source domain label comparison unit 150 trains at least the source domain recognizer 120 based on the comparison result between the estimated label 121 output by the source domain recognizer 120 and the known ground truth label 151. At this time, the feature extractor 110 may also be trained in addition to the source domain recognizer 120 based on the comparison result. The target domain label comparison unit 160 trains at least the target domain recognizer 130 based on the comparison result between the estimated label 131 output by the target domain recognizer 130 and the known ground truth label 161. At this time, the feature extractor 110 may also be trained in addition to the target domain recognizer 130 based on the comparison result. The domain comparison unit 170 trains the feature extractor 110 and the domain discriminator 140 to be adversarial to each other based on the comparison result between the estimated domain 141 output by the domain discriminator 140 and the known ground truth domain 171. At this time, it is preferable for the domain comparison unit 170 to train the feature extractor 110 to deceive the domain discriminator 140 and to train the domain discriminator 140 to correctly discriminate domains. That is, the domain comparison unit 170 trains the feature extractor 110 so that the domain discriminator 140 cannot classify domains from the features extracted by the feature extractor 110.
[0013] As shown in the above configuration, for example, by training the feature extractor 110 and the domain discriminator 140 to be adversarial to each other through adversarial learning, the feature extractor 110 is trained to output features that contain as little information as possible that can discriminate between domains. As a result, the feature extractor 110 is trained so that the common parts of the source domain data and the target domain data merge in the feature space. Then, by sharing the feature extractor 110 thus trained by the source domain recognizer 120 and the target domain recognizer 130, and inputting the features of the training data output from the feature extractor 110 into both recognizers 120 and 130, it becomes possible to achieve accuracy in both the source domain and the target domain.
[0014] The learning device 100 according to the present invention, when the target domain data includes both labeled and unlabeled data, uses semi-supervised learning with both types of data to extract a feature from the feature extractor 110. ,Ta The target domain recognizer 130 and domain discriminator are trained. In this way, by using semi-supervised learning, unlabeled data included in the target domain data can also be used to train each model.
[0015] A second aspect of the present invention relates to a learning program. The learning program according to the present invention is a program that causes a computer to function as a learning device 100 according to the first aspect described above. This learning program may be pre-installed on the computer or may be downloaded to the computer via the internet. The learning program may also be stored on a computer-readable recording medium such as a CD-ROM.
[0016] A third aspect of the present invention relates to a method for generating a trained model. In the method for generating a trained program according to the present invention, training data including source domain data and target domain data is input to a feature extractor 110, and features of the training data are extracted (feature extraction step). The features output by the feature extractor 110 are then input to a source domain recognizer 120, which outputs an estimated label corresponding to the label structure of the source domain (source domain estimated label output step). The features output by the feature extractor 110 are then input to a target domain recognizer 130, which outputs an estimated label corresponding to the label structure of the target domain (target domain estimated label output step). The features output by the feature extractor 110 are then input to a domain discriminator 140, which discriminates whether the features belong to the source domain or the target domain, and outputs an estimated domain (estimated domain output step). There is no particular order to these steps, and all steps can be performed in parallel. Next, the source domain label comparison unit 150 trains at least the source domain recognizer based on the comparison result between the estimated label output by the source domain recognizer 120 and the known ground truth label (source domain recognizer training step). At this time, the feature extractor 110 may also be trained in addition to the source domain recognizer 120 based on the comparison result. The target domain label comparison unit 160 trains at least the target domain recognizer 130 based on the comparison result between the estimated label output by the target domain recognizer 130 and the known ground truth label (target domain recognizer training step). At this time, the feature extractor 110 may also be trained in addition to the target domain recognizer 130 based on the comparison result. The domain comparison unit 170 trains the feature extractor 110 and the domain discriminator 140 to be adversarial to each other based on the comparison result between the estimated domain output by the domain discriminator 140 and the known ground truth domain (feature extractor / domain discriminator training step). Furthermore, there is no particular order to the training steps; all steps can be performed in parallel.The above process yields a trained model that includes at least a trained feature extractor 210, a trained source domain recognizer 220, and a trained target domain recognizer 230. This trained model may further include a trained domain discriminator 240.
[0017] A fourth aspect of the present invention relates to an inference device 200. The inference device 200 according to the present invention basically performs inference on target data using a model trained in the learning device 100 etc. relating to the first aspect described above. In this specification, "inference" means a process that applies target data to a model obtained by machine learning and derives a result, such as classification, regression, detection, and prediction. The application fields of the inference device 200 include, but are not limited to, fields such as speech signal processing, natural language processing, image processing, and time series data processing. The inference device 200 comprises a trained feature extractor 210, a trained source domain recognizer 220, and a trained target domain recognizer 230. The trained feature extractor 210 extracts features from the target data, including source domain data and target domain data. The trained source domain recognizer 220 takes the features output from the feature extractor 210 as input and outputs an estimated label 121 corresponding to the label configuration of the source domain. The trained source domain recognizer 220 takes the features output from the feature extractor 210 as input and outputs an estimated label 131 corresponding to the label structure of the target domain. Here, the trained feature extractor 210, the trained source domain recognizer 220, and the trained target domain recognizer 230 are trained according to the method for generating the learning model relating to the third aspect described above.
[0018] The inference device 200 according to the present invention preferably further comprises a selection unit 250. The selection unit 250 selects either the estimated label output by the trained source domain recognizer 220 or the estimated label output by the trained target domain recognizer 230, according to predetermined criteria. Thus, the selection of the estimated label may be performed automatically by the inference device 200 (computer). However, the selection unit 250 is not an essential component, and the inference process may be terminated when the source domain recognizer 220 and the target domain recognizer 230 each output an estimated label.
[0019] The inference device 200 according to the present invention may further include a trained domain discriminator 240. The domain discriminator 240 takes the features output from the feature extractor 210 as input, discriminates whether the features belong to the source domain or the target domain, and outputs an estimated domain 241. In this case, it is preferable that the selection unit 250 selects either the estimated label output by the trained source domain recognizer 220 or the estimated label output by the trained target domain recognizer 230 based on the estimated domain 241 output by the domain discriminator 240.
[0020] A fifth aspect of the present invention relates to an inference program. The inference program according to the present invention is a program that causes a computer to function as an inference device 200 according to the fourth aspect described above. This inference program may be pre-installed on the computer or may be downloaded to the computer via the internet. The inference program may also be stored on a computer-readable recording medium such as a CD-ROM.
[0021] The sixth aspect of the present invention relates to an inference method. The inference device 200 according to the present invention basically uses the model trained in the learning device 100 and the like according to the first aspect described above to perform inference on target data. First, target data including source domain data and target domain data is input to the learned feature extractor 210 to extract the features of the target data (feature extraction step). Further, the features output by the feature extractor 210 are input to the learned source domain recognizer 220, and an estimated label corresponding to the label configuration of the source domain is output (source domain estimated label output step). Further, the features output by the feature extractor 210 are input to the learned target domain recognizer 230, and an estimated label corresponding to the label configuration of the target domain is output (target domain estimated label output step). There is no particular sequential relationship in the steps up to this point, and all steps may be performed in parallel. Here, the learned feature extractor 210, the learned source domain recognizer 220, and the learned target domain recognizer 230 are trained according to the method for generating a learning model according to the third aspect described above.
Advantages of the Invention
[0022] According to the present invention, in domain adaptation, even when target domain data having a label configuration different from that of the source domain is given, it is possible to accurately train a model adapted to the target domain while achieving both the accuracy in the source domain and the target domain.
[0023] That is, conventional transfer learning-based domain adaptation has tolerated a significant deterioration in accuracy in the source domain. In contrast, the present invention realizes a multi-task learning model by providing different recognizers for estimating the labels of the source domain and the target domain, namely, the source domain recognizer 120 and the target domain recognizer 130, and achieves both the accuracy in the source domain and the target domain. In this regard, the present invention is essentially different from the conventional transfer learning method.
[0024] Furthermore, conventional adversarial domain adaptation aims to make the source domain and the target domain indistinguishable. This is due to the idea in the prior art that, on the premise of a complete match of the label configurations of the source domain and the target domain, a single recognizer common to both domains is used. In contrast, as described above, the present invention uses different recognizers, namely the source domain recognizer 120 and the target domain recognizer 130. As a result, it is not necessary for the label configurations of the source domain and the target domain to completely match. Therefore, in the present invention, the parts where the data features match in the source domain and the target domain are fused by the adversarial learning between the feature extractor 110 and the domain discriminator 140, and the different parts are not fused. In this regard, the present invention is essentially different from the conventional adversarial domain adaptation methods.
[0025] Thus, the present invention utilizes both a "multi-task learning model" and "adversarial domain adaptation", and introduces weight parameters for each loss (the losses of the recognizers for the source domain and the target domain, and the loss of the domain discriminator). Thereby, the feature extractor 110 is trained so that only the parts where the data features overlap in the source domain and the target domain are fused in the feature space, and at the same time, each recognizer 120, 130 is trained so that both the label configurations (tasks) of the source domain and the target domain achieve similarly high accuracy.
Brief Description of the Drawings
[0026] [Figure 1] FIG. 1 shows an example of the source domain and the target domain assumed by the present invention. [Figure 2] FIG. 2 is a block diagram showing an example of the model structure of the learning device according to the present invention. [Figure 3] FIG. 3 is a block diagram showing an example of the model structure of the inference device according to the present invention. [Figure 4]Figure 4 schematically illustrates the learning phase and inference phase in the present invention with an example. [Figure 5] Figure 5 is a block diagram showing an example of an embodiment in which semi-supervised learning is applied to the present invention. [Figure 6] Figure 6 shows an example of the hardware configuration of a computer that functions as a learning device and an inference device according to the present invention. [Modes for carrying out the invention]
[0027] The following describes embodiments for carrying out the present invention with reference to the drawings. The present invention is not limited to the embodiments described below, but also includes modifications made to the embodiments described below within the scope that would be obvious to those skilled in the art.
[0028] First, with reference to Figure 1, the training data and tasks (label configuration) assumed in this invention will be explained. Here, it is assumed that there is a large-scale dataset with labels as the training data for the source domain (source domain data). Furthermore, it is assumed that the training data for the target domain (target data) is a large or small dataset, and that all or only a part of it is labeled. As will be described later, in embodiments to which semi-supervised learning is applied, it is also possible to handle cases where only a part of the target data is labeled. In addition, it is assumed that the tasks of the source domain and target domain are not only completely identical, but also partially different or completely different. This invention differs from conventional transfer learning-based domain adaptation methods (methods that re-optimize a pre-trained model of the source domain on the target domain dataset) in that it effectively utilizes source domain data when adapting to a domain.
[0029] For example, as shown in Figure 1, consider a case where a general-purpose corpus is used as the source domain data, and the target domain data is unique customer data, with only a portion of it having correct labels. While target domain data is often labeled manually by humans through crowdsourcing, it becomes difficult to label all data when the data volume becomes enormous. Furthermore, a typical case where machine learning solves a problem involves both the source domain and target domain tasks being classification problems. However, the classes in the source and target domains only partially overlap, and after domain adaptation, classification is performed on the union of the two classes.
[0030] Figure 1 shows an example of analyzing human speech to recognize emotions (emotional speech recognition). In this case, the source domain data is assigned one of five labels for classifying emotions: "calm," "joy," "anger," "sadness," and "surprise." Some of the target domain data is assigned one of six labels: "calm," "anger," "irritation," "rage," "disgust," and "doubt." The rest of the target domain data is unlabeled. The label "calm" is common to both domains, but "joy" is rare in the target domain, so labeled target domain data is not available. Also, "anger" in the source domain is split into "anger," "irritation," and "rage" in the target domain. Furthermore, "sadness" in the source domain is deleted in the target domain, while "disgust" is added. In addition, "surprise" in the source domain partially overlaps with "doubt" in the target domain. In this situation, existing domain adaptation techniques (e.g., adversarial domain adaptation) cannot be used because the tasks (label configurations) of the source domain and target domain are inconsistent. Furthermore, since the model adapted to the domain is required to recognize "joy," which is rare in the target domain, the accuracy of the source domain must also be maintained at its original level. In addition, it is preferable to make effective use of unlabeled data in the target domain. As such situations frequently occur in reality, this invention proposes a solution that anticipates such situations.
[0031] Note that there may be multiple source domains and multiple target domains. Similarly, there may be multiple tasks in both the source and target domains. The percentage of labeled data in the target domain is not a concern, but cases where no labeled data exists are not considered. Also, for simplicity's sake, the explanation is omitted, but unlabeled data may be present in the source domain (as described later, semi-supervised learning can be used for the source domain as well, similar to the target domain).
[0032] Figure 2 shows the model structure of the present invention in the learning phase. That is, Figure 2 shows an example of the learning device 100 according to the present invention. The learning device 100 can be realized by a general-purpose computer. The learning device 100 calculates information input via an input / output interface using a control arithmetic unit such as a processor, according to a predetermined computer program stored in a storage device such as storage or main memory, and outputs the calculation result via the interface. As shown in the figure, the learning device 100 includes a feature extractor 110, a source domain recognizer 120, a target domain recognizer 130, and a domain discriminator 140 as functional blocks of the control arithmetic unit such as a processor. These elements 110, 120, 130, and 140 are neural network models having one or more hidden layers between the input layer and the output layer, and the weights of the connection strength of each node are adjusted by statistical machine learning. The purpose of this learning device 100 is to train these elements 110, 120, 130, and 140 with training data 101 to obtain a trained model with adjusted weights. Furthermore, the learning device 100 includes a source domain label comparison unit 150, a target domain label comparison unit 160, and a domain comparison unit 170 as elements for training these elements 110, 120, 130, and 140, and these are also realized by a control arithmetic unit such as a processor.
[0033] The training data 101 includes both source domain data and target domain data without distinction. For simplicity, it is assumed here that all training data 101 are assigned the correct labels 151 and 161. First, the training data 101 is input to the feature extractor 110 without distinguishing whether it is source domain data or target domain data. The feature extractor 110 extracts essential information (features) from the training data 101, and a known method such as a hierarchical neural network can be used. The features output from the feature extractor 110 (features embedded in the hidden space of the neural network) are input to the source domain recognizer 120, the target domain recognizer 130, and the domain discriminator 140, respectively.
[0034] The source domain recognizer 120 and the target domain recognizer 130 are recognition models provided separately for the tasks of the source domain and the target domain, respectively. In other words, the source domain recognizer 120 is a neural network model that, when given features from the training data 101, outputs an estimated label 121 corresponding to the task of the source domain. On the other hand, the target domain recognizer 130 is a neural network model that, when given features from the training data 101, outputs an estimated label 131 corresponding to the task of the target domain. As mentioned above, the problem that each recognizer solves can be any machine learning problem, such as classification, regression, detection, or prediction. Focusing on the relationship between the feature extractor 110, the source domain recognizer 120, and the target domain recognizer 130, this model has a structure in which different recognizers 120 and 130 corresponding to the tasks of the source domain and the target domain, respectively, share the feature extractor 110, and it reduces to a "multitask learning" model.
[0035] The estimated label 121 output by the source domain recognizer 120 is input to the source domain label comparison unit 150. The source domain label comparison unit 150 compares this estimated label 121 with the correct source domain label assigned to the training data 101, and defines a loss to be applied to the feature extractor 110 and the source domain recognizer 120 in order to penalize them if there is a mismatch. Note that if the training data 101 is from the target domain, the estimated label 121 output by the source domain recognizer 120 will not be correct, so no loss is applied. Similarly, the estimated label 131 output by the target domain recognizer 130 is input to the target domain label comparison unit 160. The target domain label comparison unit 160 compares the estimated label 131 with the correct target domain label assigned to the training data 101. If there is a mismatch, a loss is defined to penalize the feature extractor 110 and the target domain recognizer 130. Note that if the training data 101 is from the source domain, the estimated label 121 output by the target domain recognizer 130 will not be correct, so no loss is applied. This trains the feature extractor 110, the source domain recognizer 120, and the target domain recognizer 130, respectively. The weights of the losses applied to the source domain recognizer 120 and the target domain recognizer 130 can be adjusted. The weights of the source domain and target domain losses are parameters that control how much priority is given to each task.
[0036] The domain discriminator 140 is a neural network model that, upon receiving features extracted from the training data 101 by the source domain recognizer 120, outputs an estimated domain 141 that discriminates whether the training data 101 containing these features corresponds to the source domain or the target domain. The estimated domain 141 output by the domain discriminator 140 is input to the domain comparison unit 170. The domain comparison unit 170 compares this estimated domain 141 with the correct domain 171 of the original training data 101. The domain comparison unit 170 defines a loss to be applied to the domain discriminator 140 in order to penalize it if the estimated domain 141 and the correct domain 171 do not match. This trains the domain discriminator 140. On the other hand, the domain comparison unit 170 defines a loss to impose on the feature extractor 110 in order to penalize it if the estimated domain 141 output by the domain discriminator 140 matches the correct domain 171.
[0037] Thus, in the learning phase, the feature extractor 110 and the domain discriminator 140 are trained to be adversarial to each other. That is, the domain discriminator 140 is trained to correctly estimate (discriminate) the domain of the training data 101, while the feature extractor 110 is trained to deceive the domain discriminator 140. Therefore, focusing on the relationship between the feature extractor 110 and the domain discriminator 140, the feature extractor 110 corresponds to the generator in a GAN (Generative Adversarial Network), and the domain discriminator 140 corresponds to the discriminator in a GAN. One method for training the feature extractor 110 and the domain discriminator 140 adversarially is to insert a gradient reversal layer between the feature extractor 110 and the domain discriminator 140. However, this is not the only method, and other adversarial learning methods may be used. By employing adversarial learning, the feature extractor 110 is trained to output features that contain as little information as possible that would allow the domain discriminator 140 to discriminate between domains. This merges the overlapping parts of the source domain and the target domain in the feature space. On the other hand, unlike conventional domain adaptation methods, this invention does not perform processes such as re-optimizing the pre-trained source domain model on the target domain dataset. Therefore, the parts of the source domain that differ from the target domain are not merged in the feature space and their original levels are maintained. As a result, the degradation of inference accuracy in the source domain is limited. The weights of the adversarial loss of the domain discriminator 140 (for example, coefficients multiplied by the gradient inversion layer during backpropagation) can be adjusted and are parameters that control the degree of fusion in the feature space.
[0038] By repeatedly training the feature extractor 110, source domain recognizer 120, target domain recognizer 130, and domain discriminator 140 described above using a large amount of training data 101, a trained model is obtained in which the weights (parameters) of the neural network are optimized for the source domain and target domain. As shown in Figure 3, this trained model includes a trained feature extractor 210, a trained source domain recognizer 220, a trained target domain recognizer 230, and a trained domain discriminator 240, and this trained model is applied to an inference device 200 that performs inference on the target data 201.
[0039] Figure 3 shows the model structure of the present invention in the inference phase. That is, Figure 3 shows an example of the inference device 200 according to the present invention. The inference device 200 can be implemented using a general-purpose computer, similar to the learning device 100 described above. The inference device 200 may be implemented using the same computer as the learning device 100, or the inference device 200 may be implemented using a different computer by applying the trained model generated by the learning device 100 to another computer. Furthermore, this trained model can be duplicated. The inference device 200 calculates the information input via the input / output interface using a control arithmetic unit such as a processor, according to a predetermined computer program stored in a storage device such as storage or main memory, and outputs the calculation result via the interface. As shown in the figure, the inference device 200 includes a selection unit 250 in addition to the aforementioned trained models (210, 220, 230, 240) as a functional block of the control arithmetic unit such as a processor.
[0040] In the inference phase, target data 201, whose labels are unknown, is input to the trained model. It is assumed that the target data 201 is data related to either the source domain or the target domain. The target data 201 is first input to the trained feature extractor 210. The feature extractor 210 extracts the features of the target data 201 and outputs them to the trained source domain recognizer 220, the trained target domain recognizer 230, and the trained domain discriminator 240. Based on the input features, the source domain recognizer 220 and the target domain recognizer 230 output estimated labels 221 and 231 of the target data 201 to the selection unit 250, respectively. Depending on the target data 201, both the source domain recognizer 220 and the target domain recognizer 230 may output estimated labels 221 and 231, or one of the recognizers may be unable to estimate, and only the other may output estimated labels. Depending on the target data 201, both recognizers 220 and 230 may be unable to make an estimation. In this case, it is highly likely that the target data 201 input to the trained model was selected incorrectly. The domain discriminator 240 discriminates the domain of the target data 201 based on the input features and outputs the estimated domain 241 as a result. Several typical methods can be considered for obtaining a final conclusion from the inference results of these trained models.
[0041] One approach is that, if both the source domain recognizer 220 and the target domain recognizer 230 output estimated labels 221 and 231, the selection unit 250 prioritizes the target domain recognizer 230 regardless of the domain discriminator 240's result and adopts the estimated label 231 output by the target domain recognizer 230. In other words, assuming that the labels of the target data 201 input to the trained model in the inference phase are limited to those included in the training data 101 of the target domain, the target domain recognizer 230 will always output an estimated label 231 that is closer to the correct answer. Therefore, if the estimated labels 221 and 231 output by both the source domain recognizer 220 and the target domain recognizer 230 are in conflict, the selection unit 250 only needs to determine that the estimated label 231 output by the target domain recognizer 230 is the correct answer. Furthermore, as an application of this method, if the estimated domain of the target data 201 is the source domain, the inference result may be considered unknown (i.e., the inference may be considered to have failed). For example, if the domain discriminator 240 determines that the estimated domain of the target data 201 is the source domain, or if the estimated label 221 is output only from the source domain recognizer 220 and the estimated label 231 is not output from the target domain recognizer 230 because estimation is not possible, the selection unit 250 may determine that the inference of the target data 201 has failed. Note that if domain discrimination of the training data 201 is not required, the domain discriminator 240 can be omitted from the model shown in Figure 3.
[0042] A second method involves the selection unit 250 adopting the inference results of the recognition units 220 and 230 corresponding to the estimated domain 241 output by the domain discriminator 240 when both the source domain recognition unit 220 and the target domain recognition unit 230 output estimated labels 221 and 231. That is, if the domain discriminator 240 estimates that the target data 201 is from the target domain, the selection unit 250 adopts the estimated label 231 output from the target domain recognition unit 230. Similarly, if the domain discriminator 240 estimates that the target data 201 is from the source domain, the selection unit 250 adopts the estimated label 221 output from the source domain recognition unit 220. This is effective when it is not possible to rule out the possibility that the label of the target data 201 input during inference is a label that was not included in the training data 101 of the target domain, for example, because it is extremely rare in the target domain. In this case, labels that were not included in the training data 101 of the target domain due to reasons such as being extremely rare can be accurately recognized by effectively utilizing the source domain.
[0043] In either the first or second method described above, the selection unit 250 should adopt the estimated label that yields the highest score output by the source domain recognizer 220 or the target domain recognizer 230. Furthermore, if the confidence level of the estimated label's score is lower than a predetermined threshold (for example, if it is at the same level as the chance rate), the selection unit 250 may consider the final inference result to be unknown. In other words, if the estimated label's score is below a predetermined value, the reliability of the inference result is low, and the inference can be considered to have failed. Not limited to the above method, the selection unit 250 can use all of the outputs of the source domain recognizer 220, the target domain recognizer 230, and the domain discriminator 240 to determine the final inference result.
[0044] Next, with reference to Figure 4, the concepts of the learning phase and inference phase in the present invention will be explained with an example. In this example, in the learning phase, the label configurations of the source domain training data (source domain data) and the target domain training data (target domain data) do not completely match, but are only partially common. The illustrated example relates to emotion speech recognition, where the labels for "calm" and "anger" are common to the source domain data, but for example, the labels for "sadness" and "surprise" in the source domain data do not exist in the target domain. Also, although "joy" in the source domain data does exist in the target domain, it is rarely included in the target domain, so no target domain data (training data) is prepared. In such a situation, if conventional transfer learning-based domain adaptation is used, there is a problem that the recognition accuracy of the data for "sadness," "surprise," and "joy," for which only source domain data is available, deteriorates in the model after domain adaptation, and the present invention provides a means to solve this problem.
[0045] In other words, as mentioned above, by training the feature extractor 110 and the domain discriminator 140 to be adversarial to each other through adversarial learning, for example, the trained feature extractor 210 is trained to output features that contain as little information as possible that can discriminate between domains. As a result, the common part (intersection part) of the source domain data and the target domain data is merged in the feature space. Therefore, even if the target domain data does not contain data such as "joy" during the learning phase, the trained source domain recognizer 220 can accurately recognize this "joy" data during the inference phase. On the other hand, as mentioned above, the present invention realizes a multi-task learning model by providing a source domain recognizer 220 and a target domain recognizer 230, which are different recognizers for estimating labels of the source domain and target domain, and achieves accuracy in both the source domain and the target domain. In other words, the recognition accuracy in the source domain does not deteriorate. Therefore, data such as "sadness" and "surprise" that do not exist in the target domain but exist only in the source domain can be accurately recognized by the trained source domain recognizer 220. Naturally, data such as "rage," "irritation," "disgust," and "doubt," which exist only in the target domain, can be accurately recognized by the pre-trained target domain recognizer 230.
[0046] Figure 5 shows an embodiment for using unlabeled data as training data when the training data for the target domain includes such data, as in the example shown in Figure 1. While this explanation uses the example of the target domain's training data including unlabeled data, similar processing can be performed when the source domain's training data includes unlabeled data.
[0047] In this embodiment, in addition to the learning process shown in Figure 2, semi-supervised learning is used to utilize unlabeled data of the target domain. Semi-supervised learning methods such as NST (Noisy Student Training) and Self-training with noisy student can be used. Here, the learning process of NST will be explained as an example.
[0048] As shown in Figure 5, the model is first trained using only the labeled data 101 (training data). This training process is shown in Figure 2. The trained model obtained in this way is then used as the 0th generation teacher model 100a (initialized).
[0049] Next, using the 0th generation training model 100a obtained here, inference is performed on the unlabeled data 102 and estimated labels are output. If the confidence level of the estimated labels output here is high, they are assigned to the unlabeled data 102 as pseudo-labels 103a. The confidence threshold for deciding whether to assign an estimated label to a pseudo-label 103a can be adjusted as appropriate. This results in unlabeled data 102a (0th generation) with pseudo-labels assigned.
[0050] Next, unlabeled data 102a, which has been assigned a pseudo-label 103a from the unlabeled data 102, is added to the labeled data 101. Here, the pseudo-label 103a is considered the correct label.
[0051] The first-generation student model 100b is trained using the data obtained in this way (data with labels or pseudo-labels). During this process, the amount of training data is increased through data augmentation. Any known data augmentation method can be appropriately adopted.
[0052] Next, the first-generation student model 100b is used as a new teacher model (the first-generation teacher model) to perform inference on the unlabeled data 102 and output an estimated label. If the confidence level of the estimated label output here is high, it is assigned to the unlabeled data 102 as a new pseudo-label 103b. This results in unlabeled data 102b (first generation) with the pseudo-label assigned.
[0053] By repeating the process described so far over multiple generations, the amount of training data can be gradually increased. In other words, the initial teacher model 100a is called the 0th generation, and each subsequent repetition of pseudo-labeling and model training based on it represents one generation. As generations progress, the criteria for assigning pseudo-labels to the data (for example, a threshold for score confidence, or sorting by score confidence and selecting only a specified number of data points) can be relaxed, thereby gradually increasing the amount of training data for the student model. Alternatively, a validation set prepared separately from the training set can be used to optimize the optimal generation and parameters such as the weights of each loss. In this way, even if the target domain (or source domain) includes unlabeled training data, it is possible to use this data to train the model.
[0054] Furthermore, in the training process of a model using semi-supervised learning, it is possible to change the weights of the adversarial domain discrimination task as training progresses. To adjust the weights of the adversarial domain discrimination task, one can change the weighting coefficient for the domain discriminator loss in the overall loss, or change the coefficient multiplied when the gradient inversion layer propagates the error. For example, let's consider the case where the coefficient of the gradient inversion layer is changed and NST (Noisy Student Training) is adopted as the semi-supervised learning method. As an example, the weighting coefficient of the adversarial domain discrimination task is defined such that a value of +1 corresponds to a model with a domain discriminator and a gradient inversion layer, a value of 0 corresponds to a model with a gradient inversion layer but no domain discriminator, and a value of -1 corresponds to a model with a domain discriminator but no gradient inversion layer. In each generation of NST, it is possible to gradually change the weighting coefficient of the adversarial domain discrimination task from -1 to +1. That is, in the early stages of the training process, the features output by the feature extractor may include information for discriminating between the source domain and the target domain. Therefore, in the early stages of training, the task of distinguishing the source domain from the target domain is expected to become easier, and the pseudo-labels assigned to unlabeled data are expected to become more accurate. In the middle to late stages of training, the model is trained so that the features output by the feature extractor do not contain information that is effective in discriminating between the source domain and the target domain. Therefore, the task of distinguishing between the source domain and the target domain becomes more difficult, but the source domain and the target domain merge in the feature space. In other words, the model is ultimately trained using adversarial domain adaptation. Thus, it is also possible to adopt a training strategy that gradually increases the difficulty of the tasks that the model must learn by changing the weights of the adversarial domain discrimination task as training progresses.
[0055] In this embodiment, a model consisting of a feature extractor 110, a source domain recognizer 120, a target domain recognizer 130, and a domain discriminator 140, as shown in Figure 2, is trained using semi-supervised learning with both labeled and unlabeled training data. This makes it possible to use source domains and target domains with different tasks (label configurations), including unlabeled data, for model training.
[0056] In semi-supervised learning, the weight parameters for each loss given to the feature extractor 110, source domain recognizer 120, target domain recognizer 130, and domain discriminator 140 may differ from generation to generation. In the early stages of a generation, there is little training data for the target domain, making it difficult to estimate correct pseudo-labels for the unlabeled data of the target domain. Therefore, it is preferable to initially set strict criteria for assigning pseudo-labels (adopting only a small number of reliable pseudo-labels) and gradually relax the criteria to increase the amount of training data as generations progress. Also, if unlabeled data from the source domain is used, the criteria for assigning pseudo-labels to the source domain and the target domain do not have to be the same. In the source domain, it is assumed that there is a large amount of labeled data from the beginning, so for example, pseudo-labels may be assigned to all data in the first generation.
[0057] Furthermore, the 0th generation supervised model 100a obtained in the NST initialization step is none other than a model trained using only labeled data, that is, a model trained by supervised learning. If the 0th generation achieves the highest accuracy for the best validation set, the supervised learning model will be selected. Thus, this embodiment includes the case where supervised learning is used instead of semi-supervised learning.
[0058] Figure 9 is a block diagram showing an example of the hardware configuration of computer 300. Computer 300 includes a processor 310 such as a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit), main memory 320, storage 330, and an input / output interface 340. The learning device 100 and inference device 200 mentioned above can both be implemented in computer 300 with this configuration.
[0059] Specifically, programs for the learning device 100 and / or the inference device 200 are stored in the storage 330. The processor 310 reads each program from the storage 330, loads it into the main memory 320, and executes processing according to the program. The processor 310 also allocates the memory area in the main memory 320 necessary for the execution of each process described above, according to each program. Information input to and output from the processor 310 are performed via the interface 340. For example, input devices may be connected to the computer 300 via the interface 340, or display devices and communication devices may be connected via this interface 340.
[0060] When the aforementioned learning device 100 (see Figure 2) is implemented in this computer 300, the program for executing the operation of the feature extractor 110, source domain recognizer 120, target domain recognizer 130, domain discriminator 140, source domain label comparison unit 150, target domain label comparison unit 160, and domain comparison unit 170 is stored in the storage 330. The training data 101 and its corresponding ground truth labels 151, 161 and ground truth domains 171 are also stored in the storage 330. The processor 310 reads the program from the storage 330 and expands it into the main memory 320, and executes processing according to the program while reading the data stored in the storage 330. The processor 310 also executes processing according to the program while temporarily storing each estimated label 121, 131 and estimated domain 141 that arises during processing in the main memory 320 or writing them to the storage 330.
[0061] Similarly, when the aforementioned inference device 200 (see Figure 3) is implemented in this computer 300, a program for executing the operation of the trained feature extractor 210, trained source domain recognizer 220, trained target domain recognizer 230, trained domain discriminator 240, and selection unit 250 is stored in the storage 330. The target data 201 is also stored in the storage 330. The processor 310 reads the program from the storage 330 and expands it into the main memory 320, and while reading the data stored in the storage 330, executes processing according to the program. The processor 310 also executes processing according to the program while temporarily storing each estimated label 221, 231 and estimated domain 241 that arises during processing in the main memory 320 or writing them to the storage 330.
[0062] In this specification, embodiments of the present invention have been described with reference to the drawings in order to express the content of the present invention. However, the present invention is not limited to the above embodiments, and includes modifications and improvements that are obvious to those skilled in the art based on the matters described in this specification. [Explanation of Symbols]
[0063] 100...Learning device 101...Training data 110...Feature extractor 120... Source Domain Recognition 121... Estimated source domain label 130...Target Domain Recognition 131…Estimated target domain label 140... Domain discriminator 141…Estimated domain 150... Source Domain Label Comparison Section 151... Source domain correct label 160...Target Domain Label Comparison Section 161... Target domain correct label 170... Domain Comparison Section 171...Correct domain 200…Inference device 210... Pre-trained feature extractor 220... Pre-trained source domain recognizer 221… Estimated source domain label 230... Pre-trained target domain recognizer 231…Estimated target domain label 240... Pre-trained domain discriminators 241…Estimated domain 250...Selection section 300... Computer 310… Processor 320... Main memory 330... Storage 340… Interface
Claims
1. A feature extractor (110) extracts features from training data, including source domain data and target domain data, A source domain recognizer (120) takes the aforementioned feature quantities as input and outputs an estimated label corresponding to the label configuration of the source domain, A target domain recognizer (130) takes the aforementioned feature quantities as input and outputs an estimated label corresponding to the label structure of the target domain, A domain discriminator (140) takes the aforementioned feature as input, discriminates whether the feature belongs to the source domain or the target domain, and outputs an estimated domain. A source domain label comparison unit (150) trains the source domain recognizer based on the comparison result between the estimated label output by the source domain recognizer and a known ground truth label, A target domain label comparison unit (160) trains the target domain recognizer based on the comparison result between the estimated label output by the target domain recognizer and a known ground truth label, The domain comparison unit (170) trains the feature extractor and the domain discriminator to be adversarial to each other based on the comparison result between the estimated domain output by the domain discriminator and known correct domains. Both the label configuration of the source domain and the label configuration of the target domain are classification problems, and the classification classes of the source domain and the classification classes of the target domain overlap only partially. Learning device.
2. The domain comparison unit trains the feature extractor to deceive the domain discriminator, and trains the domain discriminator to correctly discriminate between domains. The learning device according to claim 1.
3. If the target domain data includes both labeled and unlabeled data, the feature extractor, target domain recognizer, and domain discriminator are trained using semi-supervised learning with both types of data. The learning device according to claim 1.
4. A learning program for causing a computer to function as the learning device described in claim 1.
5. The process involves inputting training data, including source domain data and target domain data, into a feature extractor (110) and extracting features from the training data. The process involves inputting the aforementioned feature quantities into a source domain recognizer (120) and outputting an estimated label corresponding to the label configuration of the source domain, The process involves inputting the aforementioned feature quantities into a target domain recognizer (130) and outputting an estimated label corresponding to the label configuration of the target domain, The process involves inputting the aforementioned feature quantities into a domain discriminator (140), discriminating whether the feature quantities belong to the source domain or the target domain, and outputting the estimated domain. The process includes training the source domain recognizer based on the comparison result between the estimated label output by the source domain recognizer and the known ground truth label, The process includes at least training the target domain recognizer based on the comparison result between the estimated label output by the target domain recognizer and a known ground truth label, The process includes training the feature extractor and the domain discriminator to be adversarial to each other based on the comparison result between the estimated domain output by the domain discriminator and known ground truth domains, The label configuration of the source domain and the label configuration of the target domain are both classification problems, and the classification classes of the source domain and the classification classes of the target domain overlap only partially. This results in a trained model that includes a trained feature extractor (210), a trained source domain recognizer (220), and a trained target domain recognizer (230). Method for generating a pre-trained model.
6. A pre-trained feature extractor (210) extracts features from target data, including source domain data and target domain data, A trained source domain recognizer (220) takes the aforementioned features as input and outputs an estimated label corresponding to the label structure of the source domain, The system includes a trained target domain recognizer (230) that takes the aforementioned features as input and outputs an estimated label corresponding to the label structure of the target domain, The trained feature extractor, the trained source domain recognizer, and the trained target domain recognizer are trained according to the method described in claim 5. Reasoning device.
7. The system further includes a selection unit (250) that selects either the estimated label output by the trained source domain recognizer or the estimated label output by the trained target domain recognizer according to predetermined criteria. The inference device according to claim 6.
8. The system further includes a trained domain discriminator (240) that takes the aforementioned feature as input, discriminates whether the feature belongs to the source domain or the target domain, and outputs an estimated domain. The selection unit selects either the estimated label output by the trained source domain recognizer or the estimated label output by the trained target domain recognizer, based on the estimated domain output by the trained domain discriminator. The inference device according to claim 7.
9. An inference program for causing a computer to function as the inference device described in claim 6.
10. The process involves inputting the target data, including source domain data and target domain data, into a trained feature extractor (210) and extracting features from the target data. The process involves inputting the aforementioned features into a pre-trained source domain recognizer (220) and outputting an estimated label corresponding to the label configuration of the source domain, The process includes inputting the aforementioned features into a pre-trained target domain recognizer (230) and outputting an estimated label corresponding to the label configuration of the target domain, The trained feature extractor, the trained source domain recognizer, and the trained target domain recognizer are trained according to the method described in claim 5. Reasoning method.