Information processing device, information processing method, and program
The proposed neural network training method stabilizes performance by aligning labeled and unlabeled data distributions through adversarial training, addressing variability issues in semi-supervised learning.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- OKI ELECTRIC INDUSTRY CO LTD
- Filing Date
- 2022-08-29
- Publication Date
- 2026-07-29
AI Technical Summary
The performance of neural networks varies depending on the data input during the learning phase, particularly in semi-supervised learning scenarios where the selection of labeled data is user-dependent, leading to inconsistent performance.
A neural network training method involving a feature extraction unit, multiple identification units, evaluation units, and a gradient inversion unit to update weight parameters and invert gradients, ensuring consistent performance by aligning labeled and unlabeled data distributions.
Reduces variability in neural network performance by aligning labeled and unlabeled data distributions through adversarial training, enhancing the stability and accuracy of neural network outputs.
Smart Images

Figure 0007896422000011 
Figure 0007896422000012 
Figure 0007896422000013
Abstract
Description
Technical Field
[0001] The present invention relates to an information processing apparatus, an information processing method, and a program.
Background Art
[0002] A neural network acquires high performance for various problems (e.g., image recognition problems, etc.) through learning. Here, various learning methods are known for neural networks (see, for example, Non-Patent Document 1, Non-Patent Document 2, and Patent Document 1).
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Non-Patent Documents
[0004]
Non-Patent Document 1
Non-Patent Document 2
Summary of the Invention
Problems to be Solved by the Invention
[0005] However, the performance of a neural network can vary depending on the data input to the neural network during the learning phase.
[0006] Therefore, the present invention has been proposed to solve these problems, and it is desirable that a technology be provided that can reduce the variability in the performance of neural networks. [Means for solving the problem]
[0007] To solve the above problems, according to one aspect of the present invention, an information processing device is provided, comprising: a feature extraction unit that extracts feature quantities from input data based on input data and a first neural network; a first identification unit that outputs a first identification result based on the feature quantities and a second neural network connected downstream of the first neural network; a first evaluation unit that outputs a first evaluation result based on the first identification result; a second identification unit that outputs a second identification result based on the feature quantities and a third neural network connected downstream of the first neural network and in parallel with the second neural network; a second evaluation unit that outputs a second evaluation result based on the second identification result; an update unit that updates the weight parameters of the first neural network, the second neural network, and the third neural network, respectively, based on the first evaluation result and the second evaluation result; and a gradient inversion unit that inverts the sign of the gradient output from the third neural network to the first neural network when updating the weight parameters.
[0008] The information processing device may be applied to semi-supervised learning. In this case, the second identification unit may output the second identification result based on inferring whether or not a teacher label has been assigned to the input data.
[0009] The second evaluation unit may calculate a second loss based on the second identification result and information indicating whether or not the teacher label has been assigned to the input data, and output the second evaluation result based on the second loss.
[0010] The first evaluation unit may, if a teacher label is assigned to the input data, calculate a first loss based on the first identification result and the teacher label, and output the first evaluation result based on the first loss.
[0011] The first evaluation unit may, if no training labels are assigned to the input data, calculate a first loss based on the first identification result and the pseudo-label, and output the first evaluation result based on the first loss.
[0012] The update unit may update the weight parameters of the first neural network, the second neural network, and the third neural network, respectively, by backpropagation based on the first evaluation result and the second evaluation result.
[0013] The gradient reversal unit may reverse the sign of the gradient by multiplying the gradient calculated by the backpropagation method based on the second evaluation result by a negative coefficient.
[0014] The gradient reversal unit may reverse the sign of the gradient by multiplying the gradient by the coefficient based on the input data.
[0015] The gradient inversion unit may calculate the coefficients based on the weight parameters of a fourth neural network located between the third neural network and the first neural network, and the first identification result.
[0016] The gradient inversion unit may calculate the coefficient such that the absolute value of the coefficient increases as the weight parameters of the fourth neural network and the first identification result become closer.
[0017] The update unit may update the weight parameters of the fourth neural network based on the gradient output from the third neural network to the fourth neural network and the feature quantities.
[0018] The gradient inversion unit may classify the features of the first input data to which a teacher label has been assigned and the second input data to which a teacher label has not been assigned, based on the first identification result, and calculate the coefficient based on the difference between the distribution of features of the first input data and the distribution of features of the second input data for each class.
[0019] The gradient reversal section may calculate the coefficient such that the absolute value of the coefficient increases as the difference increases.
[0020] Furthermore, in order to solve the above problems, according to another aspect of the present invention, there is a computer-based information processing method provided which includes: extracting feature quantities from input data based on the input data and a first neural network; outputting a first identification result based on the feature quantities and a second neural network connected downstream of the first neural network; outputting a first evaluation result based on the first identification result; outputting a second identification result based on the feature quantities and a third neural network connected downstream of the first neural network and in parallel with the second neural network; outputting a second evaluation result based on the second identification result; updating the weight parameters of the first neural network, the second neural network, and the third neural network based on the first evaluation result and the second evaluation result; and inverting the sign of the gradient output from the third neural network to the first neural network when updating the weight parameters.
[0021] Furthermore, in order to solve the above problems, according to another aspect of the present invention, a program is provided that causes a computer to function as: a feature extraction unit that extracts feature quantities from input data based on input data and a first neural network; a first identification unit that outputs a first identification result based on the feature quantities and a second neural network connected downstream of the first neural network; a first evaluation unit that outputs a first evaluation result based on the first identification result; a second identification unit that outputs a second identification result based on the feature quantities and a third neural network connected downstream of the first neural network and in parallel with the second neural network; a second evaluation unit that outputs a second evaluation result based on the second identification result; an update unit that updates the weight parameters of the first neural network, the second neural network, and the third neural network, respectively, based on the first evaluation result and the second evaluation result; and a gradient inversion unit that inverts the sign of the gradient output from the third neural network to the first neural network when updating the weight parameters. [Effects of the Invention]
[0022] As described above, the present invention provides a technology that makes it possible to reduce the variability in the performance of neural networks. [Brief explanation of the drawing]
[0023] [Figure 1] This figure shows an example of the functional configuration of a learning device 10 according to the first embodiment of the present invention. [Figure 2] This flowchart shows an example of the operation of the learning stage performed by the learning device 10 according to the first embodiment of the present invention. [Figure 3] This figure shows an example of the functional configuration of a learning device 20 according to a second embodiment of the present invention. [Figure 4] This flowchart shows an example of the operation of the learning stage performed by the learning device 20 according to the second embodiment of the present invention. [Figure 5] This figure shows an example of the functional configuration of a learning device 30 according to a third embodiment of the present invention. [Figure 6] This figure shows the hardware configuration of an information processing device 900 as an example of a learning device 10 according to the first embodiment of the present invention. [Modes for carrying out the invention]
[0024] Preferred embodiments of the present invention will be described in detail below with reference to the attached drawings. In this specification and the drawings, components having substantially the same functional configuration are denoted by the same reference numerals, and redundant descriptions will be omitted.
[0025] (0. Overview of the Embodiment) An overview of embodiments of the present invention will be described.
[0026] Neural networks (hereinafter also referred to as "NN") acquire high performance for various problems (for example, image recognition problems) through learning. Generally, in order to generate a high-performance NN, it is necessary to prepare a large amount of input data and corresponding teacher labels, and to train the NN using this large amount of input data and teacher labels. However, since the task of assigning teacher labels to input data is mainly done manually, it can be a significant burden for the user.
[0027] In recent years, research and development of semi-supervised learning, which uses both labeled input data and unlabeled input data, has become increasingly active in order to address these challenges. Semi-supervised learning reduces the effort required to assign labels, thus potentially alleviating the burden on users associated with this task.
[0028] The method described in Non-Patent Document 1 is one of the semi-supervised learning methods that has achieved significant results, particularly in image recognition. Specifically, the method described in Non-Patent Document 1 applies two types of data augmentation with different strengths to unlabeled data, and creates pseudo-teacher labels (hereinafter also referred to as "pseudo-labels") by performing inference using a neural network based on the data with weak data augmentation. The error between the data corresponding to the highly reliable pseudo-labels and the data with strong data augmentation is used as the loss.
[0029] The method described in Non-Patent Document 2 is also one of the semi-supervised learning methods, particularly in image recognition. The method described in Non-Patent Document 2 addresses the issue that when there is a small amount of labeled data, a difference in the empirical distribution arises between labeled and unlabeled data. To bring the two empirical distributions closer together, it incorporates a regularization term using the concept of domain adaptation. Note that the empirical distribution can refer to the probability distributions generated from the labeled data and the unlabeled data, respectively.
[0030] However, when performing semi-supervised learning, the selection of data to which training labels are assigned is at the user's discretion. Therefore, according to the method described in Non-Patent Document 1, as addressed in Non-Patent Document 2, the smaller the amount of labeled data, the more likely it is that the performance of the neural network will vary depending on the pattern of the data to which training labels are assigned. Furthermore, the performance of the neural network generated by the method described in Non-Patent Document 2 is not as improved as the performance of the neural network generated by the method described in Non-Patent Document 1.
[0031] Therefore, this specification primarily proposes techniques that can reduce the variability in NN performance that depends on the input data to the NN during the training phase. As an example, this specification proposes a technique that can reduce the variability in NN performance that depends on the pattern of labeled data selected by the user. Furthermore, this specification also proposes techniques that can further improve the performance of NNs.
[0032] In this embodiment of the present invention, an information processing device for training a neural network (hereinafter also referred to as the "training device") will be described. In the training device, the neural network is trained based on training data (training phase). Subsequently, the discrimination device outputs test results based on the trained neural network and test data (testing phase).
[0033] In embodiments of the present invention, the case where the learning device and the identification device are implemented by the same computer is primarily assumed. However, the learning device and the identification device may be implemented by different computers. In such cases, the trained neural network (NN) generated by the learning device is provided to the identification device. For example, the trained NN may be provided from the learning device to the identification device via a recording medium or via communication.
[0034] (1. First Embodiment) First, a first embodiment of the present invention will be described.
[0035] (Configuration of the learning device) Referring to Figure 1, an example of the configuration of a learning device according to the first embodiment of the present invention will be described. Figure 1 is a diagram showing an example of the functional configuration of a learning device 10 according to the first embodiment of the present invention. As shown in Figure 1, the learning device 10 according to the first embodiment of the present invention comprises a dataset 101, a label set 102, an input unit 103, a feature extraction unit 111, a class identification unit 112, a gradient inversion unit 113, a domain identification unit 114, a class evaluation unit 121, a domain evaluation unit 122, and an update unit 123.
[0036] Furthermore, the learning device 10 has an NN 110. The NN 110 has weight parameters 115. Moreover, the NN 110 includes a first NN (hereinafter also referred to as the "feature extraction NN") included in the feature extraction unit 111, a second NN (hereinafter also referred to as the "class identification NN") included in the class identification unit 112, a third NN (hereinafter also referred to as the "domain identification NN") included in the domain identification unit 114, and a fourth NN (hereinafter also referred to as the "gradient inversion layer") included in the gradient inversion unit 113.
[0037] The feature extraction neural network (NN) is connected to the input unit 103. More specifically, the feature extraction NN is connected to the stage after the input unit 103.
[0038] The class discrimination NN is connected to the subsequent stage of the feature extraction NN. Note that the stage after the feature extraction NN may mean the stage ahead of NN110 in the forward direction relative to the feature extraction NN.Here, we mainly assume that the class discrimination NN is directly connected to the feature extraction NN.However, the class discrimination NN may also be indirectly connected to the feature extraction NN.Furthermore, the class evaluation unit 121 is connected to the subsequent stage of the class discrimination NN.
[0039] The domain identification NN is connected after the feature extraction NN and in parallel with the class identification NN. Note that "after the domain identification NN" can mean ahead of NN110 in the forward direction, relative to the domain identification NN. Here, we mainly assume that the domain identification NN is directly connected to the feature extraction NN. However, the domain identification NN may also be indirectly connected to the feature extraction NN.
[0040] Furthermore, the fact that the domain identification NN is connected in parallel with the class identification NN means that if the subsequent stages of the feature extraction NN in NN110 branch into multiple routes, one of the routes may contain the class identification NN and the other may contain the domain identification NN. In addition, the domain evaluation unit 122 is connected to the subsequent stages of the domain identification NN.
[0041] The gradient inversion layer is located between the feature extraction NN and the domain discrimination NN. More specifically, the gradient inversion layer is connected after the feature extraction NN and before the domain discrimination NN. Here, we mainly assume that the gradient inversion layer is directly connected to the feature extraction NN. However, the gradient inversion layer may also be indirectly connected to the feature extraction NN. Similarly, here, we mainly assume that the gradient inversion layer is directly connected to the domain discrimination NN. However, the gradient inversion layer may also be indirectly connected to the domain discrimination NN.
[0042] In the following explanation, the propagation of data in the forward direction of the NN110 will also be simply referred to as "forward propagation." Conversely, the propagation of data in the reverse direction of the NN110 (hereinafter also simply referred to as "backward propagation") will also be simply referred to as "backpropagation."
[0043] The input unit 103, feature extraction unit 111, class identification unit 112, gradient inversion unit 113, domain identification unit 114, class evaluation unit 121, domain evaluation unit 122, and update unit 123, etc., include a computing device such as a CPU (Central Processing Unit) or GPU (Graphics Processing Unit), and their functions can be realized when a program stored in ROM (Read Only Memory) is loaded into RAM by the computing device and executed.
[0044] At this time, a computer-readable recording medium on which the program is recorded may also be provided. Alternatively, these blocks may be composed of dedicated hardware or a combination of multiple hardware components. Data necessary for calculations by the arithmetic unit is appropriately stored in a storage unit (not shown).
[0045] The dataset 101, label set 102, and weight parameters 115 are stored in a memory unit (not shown). Such a memory unit may consist of RAM (Random Access Memory), a hard disk drive, or flash memory.
[0046] (Weight parameter 115) The weight parameter 115 includes weight parameters corresponding to the feature extraction NN, class classification NN, and domain classification NN, respectively. Initially, the weight parameter 115 is set to an initial value. For example, the initial value set for the weight parameter 115 can be any value. For example, the initial value set for the weight parameter 115 can be a random value, or it can be a pre-trained value obtained through training.
[0047] (Dataset 101) Dataset 101 consists of multiple training data (hereinafter also referred to as "input data"). One example of input data is labeled data. Another example of input data is unlabeled data. In the embodiments of the present invention, the case where the input data is image data (particularly still image data) is mainly assumed. However, the type of input data is not particularly limited, and data other than still image data can also be used as input data. For example, the input data may be video data containing multiple frames, time-series data, or audio data.
[0048] (Label set 102) The label set 102 consists of teacher labels assigned to labeled data among the input data. In the embodiments of the present invention, it is mainly assumed that the teacher labels are the correct classes in a class identification problem. However, the type of teacher label is not particularly limited. For example, the teacher label may be the correct coordinates and correct class of an object in a detection problem that detects the coordinates and class of an object.
[0049] (Input section 103) The input unit 103 obtains input data from the dataset 101. For example, the input unit 103 treats input data with assigned teacher labels as "labeled data." On the other hand, the input unit 103 treats input data without assigned teacher labels as "unlabeled data." Furthermore, the input unit 103 obtains the teacher labels assigned to the labeled data from the label set 102.
[0050] The input unit 103 applies data augmentation to the acquired input data, then creates a mini-batch based on the data augmented input data, and outputs the created mini-batch to the feature extraction unit 111. For example, the input unit 103 applies at least one type of data augmentation to labeled data. On the other hand, the input unit 103 applies two types of data augmentation with different strengths to unlabeled data. The size of the mini-batch is not particularly limited.
[0051] Furthermore, the strength of data augmentation is not limited. For example, examples of data augmentation include color changes, translations, and rotations, but color changes and translations may be considered weaker data augmentations compared to rotations.
[0052] (Feature extraction unit 111) The feature extraction unit 111 extracts features based on the input data contained in the mini-batch output from the input unit 103 and the feature extraction neural network (NN). Here, the feature extraction NN may consist of a convolutional layer, a pooling layer, and an activation function.
[0053] More specifically, the feature extraction unit 111 obtains data output from the feature extraction NN as features by inputting the input data into the feature extraction NN, which has weight parameters corresponding to the feature extraction NN set from the weight parameters 115, and performing forward propagation in the forward direction of the NN 110. The feature extraction unit 111 outputs the extracted features to the class identification unit 112 and the gradient inversion unit 113, respectively.
[0054] (Class identification unit 112) The class identification unit 112 functions as an example of the first identification unit and obtains a first identification result based on the feature quantities output from the feature extraction unit 111 and the class identification NN. The first identification result can also be rephrased as the first inference result. Here, the class identification NN may be configured to include a fully connected layer and an activation function.
[0055] More specifically, the class identification unit 112 obtains the data output from the class identification NN as a first identification result by inputting the feature quantities into the class identification NN, which has the weight parameters corresponding to the class identification NN set among the weight parameters 115, and performing forward propagation in the forward direction of the NN 110. The class identification unit 112 outputs the first identification result to the class evaluation unit 121.
[0056] As described above, the embodiments of the present invention primarily assume that the teacher label is the correct class in a class identification problem. In such cases, the first identification result may correspond to the "predicted class" that corresponds to the correct class. Therefore, in the following, the first identification result obtained by the class identification unit 112 will also simply be referred to as the "predicted class".
[0057] The format of the predicted classes output from the class identification unit 112 is not particularly limited. However, it is preferable that the format of the predicted classes be set in conjunction with the format of the teacher labels. For example, if the teacher labels are one-hot vectors with a length equal to the number of classes, the predicted classes may also be vectors with a length equal to the number of classes. In this case, the predicted classes may include values for each class (hereinafter also referred to as "inferred values").
[0058] For example, if the class identification unit 112 adjusts the sum of the inferred values for all classes to 1, then the inferred value corresponding to each class may correspond to the probability corresponding to each class. However, the sum of the inferred values for all classes does not necessarily have to be adjusted to 1 by the class identification unit 112. In either case, the inferred value output from the class identification unit 112 can be a larger value the higher the likelihood of that class.
[0059] (Class evaluation unit 121) The class evaluation unit 121 functions as an example of the first evaluation unit and obtains a first evaluation result (hereinafter also referred to as the "class evaluation result") based on the expected class. More specifically, the class evaluation unit 121 calculates a first loss for each mini-batch based on the expected class and the target, and obtains a class evaluation result for each mini-batch based on the first loss. The class evaluation unit 121 then outputs the class evaluation result to the update unit 123.
[0060] Here, the goal compared to the predicted class is not limited to a specific goal, but may be similar to the goals used in general neural networks. For example, the goal compared to the predicted class based on labeled data may be the training labels. On the other hand, the goal compared to the predicted class based on unlabeled data may be the predicted class based on unlabeled data after weaker data augmentation (e.g., color change or translation) (i.e., pseudo-labels).
[0061] In other words, if the input data is labeled data, the class evaluation unit 121 may calculate a first loss based on the predicted class based on the labeled data and the teacher labels. On the other hand, if the input data is unlabeled data, the class evaluation unit 121 may calculate a first loss based on the predicted class based on the unlabeled data after stronger data augmentation (e.g., rotation) and the pseudo-labels.
[0062] The loss function used to calculate the first loss is not limited to a specific function, and may be the same as the loss function used in general neural networks.
[0063] For example, the loss function used to calculate the first loss based on labeled data may be the mean squared error based on the difference between the teacher label and the expected class. Alternatively, the loss function used to calculate the first loss based on labeled data may be the cross-entropy error based on the difference between the teacher label and the expected class.
[0064] On the other hand, the loss function used to calculate the first loss based on unlabeled data may be the mean squared error based on the difference between the pseudolabels and the predicted class based on the unlabeled data after stronger data augmentation. Alternatively, the loss function used to calculate the first loss based on unlabeled data may be the cross-entropy error based on the difference between the pseudolabels and the predicted class based on the unlabeled data after stronger data augmentation.
[0065] Furthermore, as described in Non-Patent Document 1, if the reliability of the pseudo-labels for unlabeled data is low, the first loss based on the unlabeled data may be 0 (zero).
[0066] (Gradient reversal section 113) The gradient inversion unit 113 inverts the sign of the gradient output from the domain discrimination NN to the feature extraction NN when the update unit 123 updates the weight parameters 115. This makes it more difficult for the feature extraction NN to distinguish whether the input data is labeled or not from the features. Therefore, since the class discrimination NN learns based on the features of the labeled data and the features of the unlabeled data, which are close to each other, the variability in the performance of the class discrimination NN can be reduced.
[0067] More specifically, during forward propagation, the gradient inversion unit 113 outputs the features output in the forward direction from the feature extraction NN directly to the domain recognition NN. On the other hand, during backpropagation, the gradient output in the reverse direction from the domain recognition NN is calculated by the update unit 123. The gradient inversion unit 113 inverts the sign of this gradient by multiplying it by a negative coefficient, and outputs the gradient after the sign inversion to the feature extraction NN.
[0068] More specifically, the gradient inversion unit 113 is configured to include a gradient inversion layer (in the first embodiment of the present invention, the gradient inversion layer is also referred to as "R1"). The gradient inversion layer R1 is located between the feature extraction NN and the domain discrimination NN. Here, we mainly assume that the gradient inversion layer R1 is directly connected to the feature extraction NN. However, the gradient inversion layer R1 may be indirectly connected to the feature extraction NN. Similarly, here we mainly assume that the gradient inversion layer R1 is directly connected to the domain discrimination NN. However, the gradient inversion layer R1 may be indirectly connected to the domain discrimination NN.
[0069] During forward propagation, the gradient inversion layer R1 processes the f-dimensional feature x output from the feature extraction NN based on the i-th input data within the minibatch. i It is applied to this as an identity function. On the other hand, during backpropagation, the gradient inversion layer R1 is applied to the gradient output from the domain-recognition NN as a function that inverts the sign of the gradient. For example, the function that inverts the sign of the gradient can be expressed as shown in equation (1) below.
[0070]
number
[0071] Here, x on the left side of equation (1) i This is the input to the gradient inversion layer R1, and R1(x i ) is the output from the gradient inversion layer R1. In equation (1), I on the right-hand side is the identity matrix. "-r(t)" on the right-hand side of equation (1) is an example of a negative coefficient that is multiplied by the gradient output in the reverse direction from the domain discrimination NN. r(t) is a coefficient that depends on the number of training steps t, and the specific form of r(t) is not particularly limited.
[0072] For example, r(t) may be 1. In this case, the application of the gradient inversion layer R1 will only invert the sign of the gradient. Alternatively, r(t) may be a coefficient that increases gradually from 0 depending on the number of learning steps t. This allows the amount of gradient inversion to increase gradually.
[0073] (Domain identification unit 114) The domain identification unit 114 functions as an example of a second identification unit and obtains a second identification result based on the data obtained by applying the identity function by the gradient inversion unit 113 to the features output from the feature extraction unit 111 (i.e., the features output from the feature extraction unit 111) and the domain identification NN. The second identification result can also be rephrased as a second inference result. Here, the domain identification NN may be configured to include a fully connected layer and an activation function.
[0074] More specifically, the domain identification unit 114 obtains the data output from the domain identification NN as a second identification result based on the fact that it inputs features into the domain identification NN, which has weight parameters corresponding to the domain identification NN set among the weight parameters 115, and performs forward propagation in the forward direction of the NN 110. The domain identification unit 114 outputs the domain identification result to the domain evaluation unit 122.
[0075] In the embodiments of the present invention, the domain identification unit 114 identifies whether the input data is labeled data (i.e., whether the features were extracted from labeled data) based on inference by the domain identification neural network, and outputs the result obtained by the identification as a second identification result (hereinafter also referred to as the "domain identification result").
[0076] The format of the domain identification result output from the domain identification unit 114 is not particularly limited, and should be in a format that allows identification of whether or not the input data is labeled data. More specifically, the domain identification result may be expressed as a probability (scalar) that the input data is labeled data, or as a two-dimensional vector composed of a combination of the probability that the input data is labeled data and the probability that the input data is unlabeled data.
[0077] (Domain Evaluation Section 122) The domain evaluation unit 122 functions as an example of the second evaluation unit and obtains a second evaluation result (hereinafter also referred to as the "domain evaluation result") based on the domain identification result. More specifically, the domain evaluation unit 122 calculates a second loss for each mini-batch based on the domain identification result and the target, and obtains a domain evaluation result for each mini-batch based on the second loss. The domain evaluation unit 122 then outputs the domain evaluation result to the update unit 123.
[0078] Here, the objective compared with the domain identification result is not limited to a specific objective, but may be the same objective used in general neural networks. The objective compared with the domain identification result may be information indicating whether or not the input data is labeled data.
[0079] The format of the target compared to the domain identification result should be set to match the format of the domain identification result. For example, if the format of the domain identification result is a scalar, the target compared to the domain identification result may also be a scalar. For example, the input data may be represented by the scalar "1" if it is labeled data, and by the scalar "0" if it is unlabeled data.
[0080] Alternatively, for example, if the domain identification result is in the form of a two-dimensional vector, the target compared to the domain identification result may also be a two-dimensional vector. For example, the input data being labeled may be represented by the two-dimensional vector "1,0", and the input data being unlabeled may be represented by the two-dimensional vector "0,1".
[0081] The loss function used to calculate the second loss is not limited to a specific function, and may be the same as the loss function used in general neural networks.
[0082] For example, if the target being compared with the domain identification result is a scalar, the loss function used to calculate the second loss may be a binary cross-entropy error based on the difference between the target and the domain identification result. Alternatively, if the target being compared with the domain identification result is a two-dimensional vector, the loss function used to calculate the second loss may be a cross-entropy error based on the difference between the target and the domain identification result.
[0083] (Updated part 123) The update unit 123 updates the weight parameters of the feature extraction NN, class discrimination NN, and domain discrimination NN based on the class evaluation results and domain evaluation results. As a result, the feature extraction NN and class discrimination NN are trained so that the predicted class approaches the teacher label or pseudo-label, and the feature extraction NN and domain discrimination NN are trained so that they can accurately distinguish whether the input data is labeled or not.
[0084] Furthermore, as described above, the sign of the gradient output from the domain identification NN to the feature extraction NN is inverted by the gradient inversion unit 113, so that it becomes more difficult to distinguish from the features whether the input data is labeled or not, and the feature extraction NN is trained accordingly. Through this adversarial training between the domain identification NN and the feature extraction NN, the feature extraction NN and the class identification NN are trained so that the features of the labeled data and the features of the unlabeled data become closer, thereby reducing the variability in the performance of the feature extraction NN and the class identification NN.
[0085] More specifically, the update unit 123 may update the weight parameters of the feature extraction NN, class classification NN, and domain classification NN by backpropagation based on the class evaluation results and domain evaluation results.
[0086] The update unit 123 determines whether the learning termination condition has been met each time it finishes updating the weight parameters. If it is determined that the learning termination condition has not been met, the input unit 103 acquires the next input data, and the feature extraction unit 111, class identification unit 112, class evaluation unit 121, domain identification unit 114, domain evaluation unit 122, gradient inversion unit 113, and update unit 123 execute processing based on the next input data again. On the other hand, if it is determined that the learning termination condition has been met, learning is terminated.
[0087] The learning termination conditions are not particularly limited and can be any conditions that indicate that learning has been performed to a certain extent. Specifically, the learning termination conditions may include the condition that the first loss or the second loss is less than a threshold. Alternatively, the learning termination conditions may include the condition that the change in the first loss or the change in the second loss is less than a threshold (the condition that the first loss or the second loss has reached a convergence state).
[0088] Alternatively, the learning termination condition may include the condition that the weight parameters have been updated a predetermined number of times. Or, if the accuracy (e.g., correctness) of the class discrimination NN or domain discrimination NN is calculated, the learning termination condition may include the condition that the accuracy is greater than a predetermined percentage (e.g., 90%).
[0089] The above describes an example of the configuration of the learning device 10 according to the first embodiment of the present invention.
[0090] (Learning phase actions) Next, with reference to Figure 2, the flow of operations in the learning stage performed by the learning device 10 according to the first embodiment of the present invention will be described. Figure 2 is a flowchart showing an example of operations in the learning stage performed by the learning device 10 according to the first embodiment of the present invention.
[0091] First, the input unit 103 obtains input data from the dataset 101. For example, the input unit 103 treats input data with assigned teacher labels as "labeled data." On the other hand, the input unit 103 treats input data without assigned teacher labels as "unlabeled data." Furthermore, the input unit 103 obtains the teacher labels assigned to the labeled data from the label set 102.
[0092] Then, the input unit 103 applies data augmentation to the acquired input data, creates a mini-batch based on the data augmented input data (S101), and outputs the created mini-batch to the feature extraction unit 111. For example, the input unit 103 applies at least one type of data augmentation to labeled data. On the other hand, the input unit 103 applies two types of data augmentation with different strengths to unlabeled data.
[0093] Next, the feature extraction unit 111 extracts features using a feature extraction neural network with weight parameters set based on the mini-batch created by the input unit 103 (S102), and outputs the extracted features to the class identification unit 112 and the gradient inversion unit 113, respectively.
[0094] The class identification unit 112 obtains a predicted class using a class identification neural network based on the features output from the feature extraction unit 111. The class identification unit 112 then outputs the predicted class to the class evaluation unit 121 (S103). The class evaluation unit 121 evaluates the predicted class output from the class identification unit 112 and obtains a class evaluation result (S104). The class evaluation unit 121 outputs the class evaluation result to the update unit 123.
[0095] Next, the domain identification unit 114 obtains a domain identification result using a domain identification neural network (NN) based on the data output from the gradient inversion unit 113 corresponding to the features (i.e., the features output from the feature extraction unit 111). The domain identification unit 114 outputs the domain identification result to the update unit 123 (S105). The domain evaluation unit 122 evaluates the domain identification result and obtains a domain evaluation result (S106). The domain evaluation unit 122 outputs the domain evaluation result to the update unit 123.
[0096] The update unit 123 updates the weight parameters 115 of the NN 110 based on the class evaluation results output from the class evaluation unit 121 and the domain evaluation results output from the domain evaluation unit 122 (S107). More specifically, the update unit 123 updates the weight parameters of the feature extraction NN, class discrimination NN, and domain discrimination NN respectively using backpropagation based on the class evaluation results and domain evaluation results.
[0097] At this time, the gradient inversion unit 113 inverts the sign of the gradient output from the domain identification NN to the feature extraction NN. For example, the function for inverting the sign of the gradient can be expressed as shown in equation (1) above.
[0098] If the learning termination condition is not met (NO in S108), the operation proceeds to S101. On the other hand, if the learning termination condition is met (YES in S108), learning by NN110 is terminated.
[0099] The above describes the flow of operations in the "learning stage" performed by the learning device 10 according to the first embodiment of the present invention.
[0100] (Summary of the first embodiment) As described above, in the learning device 10 according to the first embodiment of the present invention, the update unit 123 updates the weight parameters of the feature extraction NN, class discrimination NN, and domain discrimination NN based on the class evaluation results and the domain evaluation results. As a result, learning is performed by the feature extraction NN and class discrimination NN so that the predicted class approaches the teacher label or pseudo-label, and thus the effect of maintaining high discrimination performance by the feature extraction NN and class discrimination NN is achieved.
[0101] Furthermore, in the learning device 10 according to the first embodiment of the present invention, the gradient inversion unit 113 inverts the sign of the gradient output from the domain discrimination NN to the feature extraction NN when updating the weight parameters 115. Through adversarial learning by the domain discrimination NN and the feature extraction NN, learning by the feature extraction NN and the class discrimination NN is performed so that the empirical distribution between labeled data and unlabeled data approaches each other, thereby reducing the variability in the performance of the feature extraction NN and the class discrimination NN.
[0102] The first embodiment of the present invention has been described above.
[0103] (2. Second Embodiment) Next, a second embodiment of the present invention will be described.
[0104] In the first embodiment of the present invention, the case in which the amount of positive / negative reversal of the gradient by the gradient reversal unit 113 does not depend on the input data was described. In other words, in the first embodiment of the present invention, the case in which the amount of positive / negative reversal of the gradient by the gradient reversal unit 113 is equal for all input data was described. However, in such a case, the magnitude of the difference in empirical distribution between labeled data and unlabeled data is not particularly considered.
[0105] Therefore, in the second embodiment of the present invention, a method for making the amount of gradient reversal dependent on the input data will be described.
[0106] (Configuration of the learning device) Referring to Figure 3, an example of the configuration of a learning device according to a second embodiment of the present invention will be described. Figure 3 is a diagram showing an example of the functional configuration of a learning device 20 according to a second embodiment of the present invention. As shown in Figure 3, the functional configuration of the learning device 20 according to a second embodiment of the present invention is common in many respects with the functional configuration of the learning device 10 according to a first embodiment of the present invention.
[0107] However, the functions of the weight parameter 215, NN210, gradient inversion unit 213, and update unit 223 in the learning device 20 according to the second embodiment of the present invention differ from the functions of the weight parameter 115, NN110, gradient inversion unit 113, and update unit 123 in the learning device 10 according to the first embodiment of the present invention. Therefore, in the following description, the functions of NN210 (including the weight parameter 215), gradient inversion unit 213, and update unit 223 will be mainly described, and detailed descriptions of the functions of the other components will be omitted.
[0108] (Weight parameter 215) In a second embodiment of the present invention, the weight parameter 215 includes not only the weight parameters corresponding to the feature extraction NN, class classification NN, and domain classification NN, but also the weight parameter corresponding to the gradient inversion layer R2. Here, in a class classification problem with C classes, the weight parameter corresponding to the gradient inversion layer R2 is a C-dimensional vector p = [p1, ..., p C ]∈R C Assume that it is composed of the following:
[0109] In the initial state, the weight parameters corresponding to the gradient inversion layer R2 are set to initial values. For example, the initial values set for the weight parameters corresponding to the gradient inversion layer R2 can be any values. For example, the initial values set for the weight parameters corresponding to the gradient inversion layer R2 can be random values, or they can be pre-trained values obtained through learning.
[0110] (Gradient reversal section 213) The gradient inversion unit 213 inverts the sign of the gradient output from the domain recognition NN to the feature extraction NN by multiplying the gradient output from the domain recognition NN to the feature extraction NN by a negative coefficient based on the input data. As a result, the variability in the performance of the feature extraction NN and the class recognition NN can be further reduced compared to the case where the amount of gradient inversion by the gradient inversion unit 213 does not depend on the input data (first embodiment of the present invention).
[0111] More specifically, during forward propagation, the gradient inversion unit 213 outputs the feature quantities output in the forward direction from the feature extraction NN directly to the domain identification NN, similar to the gradient inversion unit 113 in the first embodiment of the present invention.
[0112] On the other hand, during backpropagation, the gradient inversion unit 213 calculates a negative coefficient based on the weight parameter corresponding to the gradient inversion layer R2 and the predicted class obtained by the class identification unit 112. At this time, it is desirable for the gradient inversion unit 213 to calculate the negative coefficient such that the absolute value of the negative coefficient increases as the weight parameter corresponding to the gradient inversion layer R2 approaches the predicted class.
[0113] The gradient inversion unit 113 then inverts the sign of the gradient by multiplying the gradient output in the reverse direction from the domain discrimination NN by a negative coefficient, and outputs the gradient after the sign inversion to the feature extraction NN. As a result, the closer the weight parameters corresponding to the gradient inversion layer R2 are to the predicted class, the greater the amount of sign inversion of the gradient output from the domain discrimination NN to the feature extraction NN, which can further reduce the variability in the performance of the feature extraction NN and the class discrimination NN.
[0114] More specifically, the gradient inversion part 213 is configured to include a gradient inversion layer (in the second embodiment of the present invention, the gradient inversion layer is also expressed as "R2") in the same manner as the gradient inversion part 113 according to the first embodiment of the present invention.
[0115] During forward propagation, the gradient inversion layer R2, similar to the gradient inversion layer R1 according to the first embodiment of the present invention, is the f-dimensional feature quantity x output from the feature extraction NN based on the i-th input data in the mini-batch. i is applied as an identity function. Therefore, during forward propagation, the weight parameter p corresponding to the gradient inversion layer R2 is not used.
[0116] On the other hand, during backpropagation, the gradient inversion layer R2 is applied as a function that reverses the sign of the gradient based on the gradient output from the domain discrimination NN, the weight parameter p corresponding to the gradient inversion layer R2, and the predicted class y i ∈R C and. For example, the function that reverses the sign of the gradient can be expressed as in the following formula (2).
[0117]
Equation
[0118] Here, x on the left side of formula (2) i is the input to the gradient inversion layer R2, and R2(x i ) is the output from the gradient inversion layer R2. I on the right side of formula (2), and r(t) on the right side of formula (2) are the same as I and r(t) according to the first embodiment of the present invention. "-r(t)·q" on the right side of formula (2) i is an example of the negative coefficient multiplied by the gradient output from the domain discrimination NN.
[0119] Also, as shown in formula (3), q i∈R represents the weight parameters p corresponding to the gradient inversion layer R2 after normalization (so that the mean of all classes is 1), and the predicted class y i This is the inner product of the following: This results in the weight parameters p and the predicted class y corresponding to the gradient inversion layer R2. i The closer they are, q i The value of (i.e., the negative coefficient "-r(t)·q" in equation (2) i The absolute value of () can be large, potentially leading to a significant reversal of the gradient's sign. Note that normalization of the weight parameter p is not required.
[0120] (Update section 223) The update unit 223 updates the weight parameters of the feature extraction NN, class identification NN, and domain identification NN, respectively, based on the class evaluation results and domain evaluation results, similar to the update unit 123 in the first embodiment of the present invention.
[0121] Furthermore, the update unit 223 uses the gradient output from the domain identification NN to the gradient inversion layer R2 and the f-dimensional feature x output from the feature extraction NN based on the i-th input data within the minibatch. i Based on this, the weight parameter p corresponding to the gradient inversion layer R2 is updated.
[0122] More specifically, the update unit 223 receives the output R2(x) from the gradient inversion layer R2. i ) for q i Calculate the partial derivative with respect to the output R2(x). For example, the output R2(x) from the gradient inversion layer R2. i ) for q i The partial derivative with respect to can be defined pseudo-wise as shown in equation (4) below.
[0123]
number
[0124] Then, the update unit 223 takes the gradient output in the reverse direction from the domain identification NN and the output R2(x) from the gradient inversion layer R2. i ) for q iThe weight parameter p corresponding to the gradient inversion layer R2 is updated by backpropagating the result of multiplying it with the partial derivative (equation (4)) by the result of the multiplication.
[0125] More specifically, the update unit 223 uses the gradient output in the reverse direction from the domain identification NN and the output R2(x) from the gradient inversion layer R2. i ) for q i Partial derivative with respect to (Equation (4)), and q i The result of multiplying the partial derivative with respect to p (1 in the example of equation (2)) is calculated as the gradient at the weight parameter p corresponding to the gradient inversion layer R2. Then, the update unit 223 updates the weight parameter p corresponding to the gradient inversion layer R2 based on the gradient at the weight parameter p corresponding to the gradient inversion layer R2.
[0126] Similar to the first embodiment of the present invention, the update unit 223 determines whether the learning termination condition has been met each time the weight parameters have been updated. If it is determined that the learning termination condition has not been met, the input unit 103 acquires the next input data, and the feature extraction unit 111, class identification unit 112, class evaluation unit 121, domain identification unit 114, domain evaluation unit 122, gradient inversion unit 213, and update unit 223 perform processing based on the next input data again. On the other hand, if it is determined that the learning termination condition has been met, learning is terminated.
[0127] The above describes an example of the configuration of the learning device 20 according to the second embodiment of the present invention.
[0128] (Learning phase actions) Next, with reference to Figure 4, the flow of operations in the "learning stage" performed by the learning device 20 according to the second embodiment of the present invention will be described. Figure 4 is a flowchart showing an example of operations in the learning stage performed by the learning device 20 according to the second embodiment of the present invention.
[0129] Comparing the example of the learning stage operation performed by the learning device 20 according to the second embodiment of the present invention (Figure 4) with the example of the learning stage operation performed by the learning device 10 according to the first embodiment of the present invention (Figure 2), we find that S101 to S106 and S108 are common, while S107 is replaced by S207. Therefore, in the following, we will mainly explain S207, and omit detailed explanations of S101 to S106 and S108.
[0130] The update unit 223 updates the weight parameters 215 of the NN 210 based on the class evaluation results output from the class evaluation unit 121, the domain evaluation results output from the domain evaluation unit 122, the predicted class output from the class identification unit 112, and the features output forward from the feature extraction NN (S207). More specifically, the update unit 223 updates the weight parameters of the feature extraction NN, the class identification NN, and the domain identification NN respectively using backpropagation based on the class evaluation results and the domain evaluation results.
[0131] At this time, the gradient inversion unit 213 inverts the sign of the gradient output from the domain identification NN to the feature extraction NN by multiplying the gradient output from the domain identification NN to the feature extraction NN by a negative coefficient based on the input data. For example, the function that inverts the sign of the gradient can be expressed as shown in equation (2) above.
[0132] Furthermore, the update unit 223 uses the gradient output in the reverse direction from the domain identification NN and the output R2(x) from the gradient inversion layer R2. i ) for q i The weight parameter p corresponding to the gradient inversion layer R2 is updated by backpropagating the result of multiplying it with the partial derivative (equation (4)) by the result of the multiplication.
[0133] The above describes the flow of operations in the "learning stage" performed by the learning device 20 according to the second embodiment of the present invention.
[0134] (Summary of the second embodiment) As described above, the learning device 20 according to the second embodiment of the present invention can achieve the same effects as the learning device 10 according to the first embodiment of the present invention. Furthermore, according to the learning device 20 according to the second embodiment of the present invention, the amount of positive / negative inversion of the gradient output from the domain identification NN to the feature extraction NN is a learnable parameter "q i Because this can change depending on the input data, it has the effect of further reducing the variability in the performance of feature extraction neural networks and class classification neural networks.
[0135] The second embodiment of the present invention has been described above.
[0136] (3. Third Embodiment) Next, a third embodiment of the present invention will be described.
[0137] In the second embodiment of the present invention, a case was described in which the amount of positive / negative inversion of the gradient by the gradient inversion unit 213 may change depending on the input data. However, in the second embodiment of the present invention, a learnable parameter "q" that is multiplied by the gradient is described. i Because the value is automatically updated, the reversal of the sign of the gradient may become unstable.
[0138] Therefore, in the third embodiment of the present invention, a method for setting the sign inversion amount of the gradient is described using the predicted class output from the class identification unit 112 and the feature quantities output in the forward direction from the feature extraction NN, without using a learnable parameter that is multiplied by the gradient.
[0139] (Configuration of the learning device) Referring to Figure 5, an example of the configuration of a learning device according to a third embodiment of the present invention will be described. Figure 5 is a diagram showing an example of the functional configuration of a learning device 30 according to a third embodiment of the present invention. As shown in Figure 5, the functional configuration of the learning device 30 according to a third embodiment of the present invention is in common with the functional configuration of the learning device 10 according to a first embodiment of the present invention in many respects.
[0140] However, the functions of the gradient reversal unit 313 and the update unit 323 in the learning device 30 according to the third embodiment of the present invention differ from the functions of the gradient reversal unit 113 and the update unit 123 in the learning device 10 according to the first embodiment of the present invention. Therefore, in the following description, the functions of the gradient reversal unit 313 and the update unit 323 will be mainly described, and detailed descriptions of the functions of the other components will be omitted.
[0141] (Gradient reversal section 313) During backpropagation, the gradient inversion unit 313 classifies the features of both the labeled data (first input data) and the unlabeled data (second input data) into classes based on the predicted classes output from the class identification unit 112. The gradient inversion unit 313 then calculates a negative coefficient to be multiplied by the gradient based on the class-specific difference between the feature distribution of the labeled data and the feature distribution of the unlabeled data.
[0142] For example, the gradient inversion unit 313 calculates a negative coefficient such that the absolute value of the negative coefficient increases as the difference between the feature distributions of labeled data and the feature distributions of unlabeled data for each class increases (i.e., the difference between the distributions and the absolute value of the negative coefficient have a positive correlation). Then, the gradient inversion unit 313 inverts the sign of the gradient by multiplying the gradient output in the reverse direction from the domain identification NN by the negative coefficient, and outputs the gradient after the sign has been inverted to the feature extraction NN.
[0143] This further reduces the variability in the performance of the feature extraction NN and the class classification NN, similar to the second embodiment of the present invention. Furthermore, unlike the second embodiment of the present invention, this reduces the possibility of instability in the gradient inversion because the amount of gradient sign reversal is set without using learnable parameters.
[0144] More specifically, the gradient reversal section 313 is configured to include a gradient reversal layer (in the third embodiment of the present invention, the gradient reversal layer is also referred to as "R3"), similar to the gradient reversal section 113 in the first embodiment of the present invention.
[0145] During forward propagation, the gradient inversion layer R3, similar to the gradient inversion layer R1 in the first embodiment of the present invention, generates an f-dimensional feature x output from the feature extraction NN based on the i-th input data within the minibatch. i It is applied to this as an identity function.
[0146] On the other hand, during backpropagation, the gradient inversion layer R3 uses the gradient output from the domain identification NN to obtain the f-dimensional feature x output from the feature extraction NN based on the i-th input data within the minibatch. i And the predicted class y based on the input data. i ∈R C Based on this, it is applied as a function that reverses the sign of the gradient. For example, a function that reverses the sign of the gradient can be expressed as shown in equation (5) below.
[0147]
number
[0148] Here, x on the left side of equation (5) i This is the input to the gradient inversion layer R3, and R3(x i ) is the output from the gradient inversion layer R3. I and r(t) on the right-hand side of equation (5) are the same as I and r(t) in the first embodiment of the present invention. -r(t)·h on the right-hand side of equation (5) i This is an example of a negative coefficient that is multiplied by the gradient output from the domain identification NN.
[0149] h i This is calculated by the gradient inversion unit 313 so as to have a positive correlation with the difference between the feature distribution of the labeled data and the feature distribution of the unlabeled data. <step1>from <step4>up to h i An example of how to calculate h will be explained. However, h i This is just one example. Therefore, h i This can be replaced with another value that has a positive correlation with the difference between the feature distribution of the labeled data and the feature distribution of the unlabeled data.
[0150] <step1> First, the features of the labeled data are x i L Let x be the feature of the unlabeled data. j U The gradient inversion unit 313 processes the feature quantities x of the labeled data for each predicted class. i L and the feature x of the unlabeled data j U The data is then grouped. As shown in equation (6) below, the feature x of the labeled data i L Of these, the set of features belonging to the predicted class c is X. C L As shown in equation (7) below, the feature x of the unlabeled data j U Of these, the set of features belonging to the predicted class c is X. C U Let's assume that.
[0151]
number
[0152] Here, B L is the number of labeled data in the mini-batch, and B U This is the number of unlabeled data points in the mini-batch. Also, {1, ..., B L Let} be the set of subscripts that represent labeled data within a minibatch, and {B L +1, ..., B L +B U Let} be the set of subscripts that represent unlabeled data within a minibatch.
[0153] <step2> Next, as shown in equation (8) below, the gradient inversion unit 313 calculates the cosine similarity for all combinations of features of labeled data and features of unlabeled data for each predicted class, calculates the average cosine similarity for each predicted class, and subtracts the average from 1 to obtain the similarity s c Let's assume that the similarity s corresponds to each predicted class. c The cosine similarity between the features of the labeled data and the features of the unlabeled data approaches 0 as the cosine similarity is high, and approaches 2 as the cosine similarity is low.
[0154]
number
[0155] <step3> Next, as shown in equation (9) below, the gradient inversion unit 313 adjusts the similarity s for each predicted class so that the average similarity across all predicted classes becomes 1. c Normalize the similarity s. c Normalization of the result is not necessarily required.
[0156]
number
[0157] <step4> Next, as shown in equation (10) below, the gradient inversion unit 313 calculates the similarity s after normalization. c And, predicted class y i The inner product is calculated. The inner product calculated in this way is equal to the weight h for each data in equation (5) above. i It can be used as such.
[0158]
number
[0159] (Update section 323) The update unit 323 updates the weight parameters of the feature extraction NN, class identification NN, and domain identification NN, respectively, based on the class evaluation results and domain evaluation results, similar to the update unit 123 in the first embodiment of the present invention. At this time, the sign of the gradient output from the domain identification NN to the feature extraction NN is reversed by the gradient inversion unit 313 using the function shown in equation (5) above.
[0160] The above describes an example of the configuration of the learning device 30 according to the third embodiment of the present invention.
[0161] (Learning phase actions) Next, the flow of operations in the "learning stage" performed by the learning device 30 according to the third embodiment of the present invention will be explained with reference to the flowchart (Figure 2) showing the flow of operations in the "learning stage" performed by the learning device 10 according to the first embodiment of the present invention.
[0162] Here, the example of the learning stage operation performed by the learning device 30 according to the third embodiment of the present invention differs in the details of S107 compared to the example of the learning stage operation performed by the learning device 10 according to the first embodiment of the present invention (Figure 2). Therefore, below, we will mainly describe S107 performed by the learning device 30 according to the third embodiment of the present invention, and omit detailed explanations of S101 to S106 and S108.
[0163] The update unit 323 updates the weight parameters 115 of the NN 110 based on the class evaluation results output from the class evaluation unit 121 and the domain evaluation results output from the domain evaluation unit 122, similar to the update unit 123 in the first embodiment of the present invention (S107). More specifically, the update unit 323 updates the weight parameters of the feature extraction NN, class identification NN, and domain identification NN respectively by backpropagation based on the class evaluation results and domain evaluation results, similar to the update unit 123 in the first embodiment of the present invention.
[0164] At this time, the gradient inversion unit 313 applies a negative coefficient "-h" as the difference between the distribution of features in the labeled data and the distribution of features in the unlabeled data for each class becomes larger. i The negative coefficient "-h" is used so that the absolute value of "" becomes large. i The negative coefficient "-h" is calculated. i By multiplying the gradient output from the domain recognition NN to the feature extraction NN by this, the sign of the gradient output from the domain recognition NN to the feature extraction NN is reversed. For example, the function that reverses the sign of the gradient can be expressed as shown in equation (5) above.
[0165] The above describes the flow of operations in the "learning stage" performed by the learning device 30 according to the third embodiment of the present invention.
[0166] (Summary of the third embodiment) As described above, the learning device 30 according to the third embodiment of the present invention can achieve the same effects as the learning device 20 according to the second embodiment of the present invention. Furthermore, the learning device 30 according to the third embodiment of the present invention has the effect that the possibility of the gradient's sign reversal becoming unstable can be reduced because the amount of sign reversal of the gradient is set without using learnable parameters.
[0167] The third embodiment of the present invention has been described above.
[0168] (4. Hardware Configuration Example) Next, an example of the hardware configuration of the learning device 10 according to the first embodiment of the present invention will be described. Note that the hardware configurations of the learning device 20 according to the second embodiment of the present invention and the learning device 30 according to the third embodiment of the present invention can also be realized in the same way as the hardware configuration of the learning device 10 according to the first embodiment of the present invention.
[0169] In the following, an example of the hardware configuration of the information processing device 900 will be described as an example of the hardware configuration of the learning device 10 according to the first embodiment of the present invention. Note that the example of the hardware configuration of the information processing device 900 described below is merely one example of the hardware configuration of the learning device 10. Therefore, the hardware configuration of the learning device 10 may be modified by removing unnecessary components from the hardware configuration of the information processing device 900 described below, or by adding new components.
[0170] Figure 6 shows the hardware configuration of an information processing device 900 as an example of a learning device 10 according to the first embodiment of the present invention. The information processing device 900 includes a CPU (Central Processing Unit) 901, a ROM (Read Only Memory) 902, a RAM (Random Access Memory) 903, a host bus 904, a bridge 905, an external bus 906, an interface 907, an input device 908, an output device 909, a storage device 910, and a communication device 911.
[0171] The CPU 901 functions as both an arithmetic processing unit and a control unit, controlling the overall operation of the information processing unit 900 according to various programs. The CPU 901 may also be a microprocessor. The ROM 902 stores programs and arithmetic parameters used by the CPU 901. The RAM 903 temporarily stores programs used in the execution of the CPU 901 and parameters that change as needed during its execution. These are interconnected by a host bus 904, which consists of a CPU bus and other components.
[0172] The host bus 904 is connected to an external bus 906, such as a PCI (Peripheral Component Interconnect / Interface) bus, via a bridge 905. It is not always necessary to configure the host bus 904, bridge 905, and external bus 906 separately; these functions may be implemented on a single bus.
[0173] The input device 908 consists of input means for the user to input information, such as a mouse, keyboard, touch panel, buttons, microphone, switches, and levers, and an input control circuit that generates input signals based on the user's input and outputs them to the CPU 901. The user operating the information processing device 900 can input various types of data to the information processing device 900 or instruct it to perform processing operations by operating this input device 908.
[0174] The output device 909 includes, for example, display devices such as CRT (Cathode Ray Tube) display devices, liquid crystal display (LCD) devices, OLED (Organic Light Emitting Diode) devices, lamps, and audio output devices such as speakers.
[0175] The storage device 910 is a device for storing data. The storage device 910 may include a storage medium, a recording device for recording data on the storage medium, a reading device for reading data from the storage medium, and a deletion device for deleting data recorded on the storage medium. The storage device 910 is composed of, for example, an HDD (Hard Disk Drive). This storage device 910 drives the hard disk and stores programs executed by the CPU 901 and various data.
[0176] The communication device 911 is a communication interface composed of, for example, a communication device for connecting to a network. The communication device 911 may support either wireless or wired communication.
[0177] The hardware configuration example of the learning device 10 according to the first embodiment of the present invention has been described above.
[0178] (5. Summary) Although preferred embodiments of the present invention have been described in detail above with reference to the attached drawings, the present invention is not limited to these examples. It is clear to any person with ordinary skill in the art to which the present invention belongs that various modifications or alterations can be conceived within the scope of the technical idea described in the claims, and these are also understood to fall within the technical scope of the present invention.
[0179] In the first to third embodiments of the present invention, the case where the training data is still image data has been mainly described. However, the type of training data is not particularly limited. For example, if features are extracted that match the type of training data, data other than still image data can also be used as training data. For example, the training data may be video data containing multiple frames, audio data, or other time-series data.
[0180] In this case, if the training data is static image data, it is common to use two-dimensional convolutional layers in both NN110 and NN210. On the other hand, if three-dimensional convolutional layers are used in both NN110 and NN210, moving image data can be applied as training data.
[0181] In a second embodiment of the present invention, an example was described in which the gradient inversion unit 213 normalizes p such that the average value of the weight parameter p corresponding to the gradient inversion layer R2 in equation (3) above becomes 1. In this example, an example was described in which the gradient inversion unit 213 subtracts the average value of p from p and adds 1. However, the normalization performed by the gradient inversion unit 213 is not limited to this example. For example, as shown in equation (11) below, the gradient inversion unit 213 may perform normalization by dividing p by the average value of p.
[0182]
number
[0183] In a third embodiment of the present invention, the coefficient h in the above formula (5) is i Here are some examples of calculation methods: <step1>from <step4>This was shown up to that point. However, the coefficient h i The method for calculating the coefficient h is not limited to this example. i This value should have a positive correlation with the magnitude of the difference in the empirical distribution between the labeled data and the unlabeled data.
[0184] moreover, <step4>Similarity S c The similarity S is calculated for each mini-batch. c It is possible that the fluctuations in similarity will become large. Therefore, in order to avoid large fluctuations in similarity, the similarity S is calculated as shown in equation (12) below. c Instead, similarity S c The moving average of is the coefficient h in the above equation (10). i It may be used in the calculation of [the value].
[0185]
number
[0186] Here, S in equation (12) above ma The similarity is S c This is the moving average of the moving average S ma The initial value of is not particularly limited. Also, α in equation (12) above is a coefficient used to calculate the moving average, and for example, α may be a value such as 0.99. [Explanation of Symbols]
[0187] 10, 20, 30 Learning devices 101 datasets 102 Label Set 103 Input section 110, 210 Neural Networks 111 Feature Extraction Unit 112 Class Identification Unit 113, 213, 313 Gradient reversal section 114 Domain Identification Section 115, 215 weight parameters 121 Class Evaluation Department 122 Domain Evaluation Department 123, 223, 323 update section
Claims
1. An input unit that acquires input data and performs data augmentation on the acquired input data, A feature extraction unit extracts feature quantities from the data-enhanced input data based on the data-enhanced input data and a first neural network. A first identification unit that outputs a first identification result based on the aforementioned feature quantities and a second neural network connected downstream of the first neural network, A first evaluation unit that outputs a first evaluation result based on the first identification result, A second identification unit outputs a second identification result based on the aforementioned feature quantities and a third neural network connected after the first neural network and in parallel with the second neural network. A second evaluation unit that outputs a second evaluation result based on the second identification result, An update unit updates the weight parameters of the first neural network, the second neural network, and the third neural network based on the first evaluation result and the second evaluation result, When updating the weight parameters, a gradient inversion unit is used to invert the sign of the gradient output from the third neural network to the first neural network, Equipped with, The input unit applies at least one type of data augmentation to the acquired input data if a teacher label is assigned to the input data, and applies two types of data augmentation with different strengths to the acquired input data if a teacher label is not assigned to the acquired input data. If the input data does not have a teacher label, the first identification unit outputs a first identification result based on the feature quantities of the input data to which the stronger data augmentation has been applied and the second neural network, and outputs a pseudo-label based on the feature quantities of the input data to which the weaker data augmentation has been applied and the second neural network. The first evaluation unit, if no training label is assigned to the input data, calculates a first loss based on the first identification result and the pseudo-label, and outputs the first evaluation result based on the first loss. Information processing device.
2. The second identification unit outputs the second identification result based on inferring whether or not a teacher label has been assigned to the input data. The information processing apparatus according to claim 1.
3. The second evaluation unit calculates a second loss based on the second identification result and information indicating whether or not the teacher label is assigned to the input data, and outputs the second evaluation result based on the second loss. The information processing apparatus according to claim 2.
4. The first evaluation unit, if a teacher label is assigned to the input data, calculates a first loss based on the first identification result and the teacher label, and outputs the first evaluation result based on the first loss. The information processing apparatus according to claim 1.
5. The update unit updates the weight parameters of the first neural network, the second neural network, and the third neural network, respectively, using a backpropagation method based on the first evaluation result and the second evaluation result. The information processing apparatus according to claim 1.
6. The gradient reversal unit reverses the sign of the gradient by multiplying the gradient calculated by the backpropagation method based on the second evaluation result by a negative coefficient. The information processing apparatus according to claim 5.
7. The gradient reversal unit reverses the sign of the gradient by multiplying the gradient by the coefficient based on the input data. The information processing apparatus according to claim 6.
8. The gradient inversion unit calculates the coefficients based on the weight parameters of the fourth neural network located between the third neural network and the first neural network, and the first identification result. The information processing apparatus according to claim 7.
9. The gradient inversion unit calculates the coefficient such that the absolute value of the coefficient increases as the weight parameters of the fourth neural network and the first identification result become closer. The information processing apparatus according to claim 8.
10. The update unit updates the weight parameters of the fourth neural network based on the gradient output from the third neural network to the fourth neural network and the feature quantities. The information processing apparatus according to claim 8.
11. The gradient inversion unit classifies the features of the first input data, which has a teacher label assigned to it, and the second input data, which does not have a teacher label assigned to it, into classes based on the first identification result, and calculates the coefficients based on the difference between the distribution of features of the first input data and the distribution of features of the second input data for each class. The information processing apparatus according to claim 6.
12. The gradient reversal unit calculates the coefficient such that the absolute value of the coefficient increases as the difference increases. The information processing apparatus according to claim 11.
13. To acquire input data and to perform data augmentation on the acquired input data, Based on the data-enhanced input data and the first neural network, the features of the data-enhanced input data are extracted. Based on the aforementioned features and a second neural network connected to the subsequent stage of the first neural network, a first classification result is output. Outputting a first evaluation result based on the first identification result, Based on the aforementioned feature quantities and a third neural network connected after the first neural network and in parallel with the second neural network, a second classification result is output. Outputting a second evaluation result based on the second identification result, Based on the first evaluation result and the second evaluation result, the weight parameters of the first neural network, the second neural network, and the third neural network are updated. When updating the weight parameters, the sign of the gradient output from the third neural network to the first neural network is reversed. Includes, The aforementioned data augmentation includes, if the input data has a teacher label attached, applying at least one type of data augmentation to the acquired input data, and if the acquired input data does not have a teacher label attached, applying two types of data augmentation with different levels of intensity to the acquired input data. Outputting the first identification result means, if the input data does not have a training label, outputting the first identification result based on the features of the input data with the stronger data augmentation and the second neural network, and outputting a pseudo-label based on the features of the input data with the weaker data augmentation and the second neural network. Outputting the first evaluation result includes, if the input data does not have a training label, calculating a first loss based on the first identification result and the pseudo-label, and outputting the first evaluation result based on the first loss. A method of information processing performed by a computer.
14. Computers, An input unit that acquires input data and applies data augmentation to the acquired input data, A feature extraction unit extracts feature quantities from the data-enhanced input data based on the data-enhanced input data and a first neural network. A first identification unit that outputs a first identification result based on the aforementioned feature quantities and a second neural network connected downstream of the first neural network, A first evaluation unit that outputs a first evaluation result based on the first identification result, A second identification unit outputs a second identification result based on the aforementioned feature quantities and a third neural network connected after the first neural network and in parallel with the second neural network. A second evaluation unit that outputs a second evaluation result based on the second identification result, An update unit updates the weight parameters of the first neural network, the second neural network, and the third neural network based on the first evaluation result and the second evaluation result, When updating the weight parameters, a gradient inversion unit is used to invert the sign of the gradient output from the third neural network to the first neural network, To make it function as, The input unit applies at least one type of data augmentation to the acquired input data if a teacher label is assigned to the input data, and applies two types of data augmentation with different strengths to the acquired input data if a teacher label is not assigned to the acquired input data. If the input data does not have a teacher label, the first identification unit outputs a first identification result based on the feature quantities of the input data to which the stronger data augmentation has been applied and the second neural network, and outputs a pseudo-label based on the feature quantities of the input data to which the weaker data augmentation has been applied and the second neural network. The first evaluation unit, if no training label is assigned to the input data, calculates a first loss based on the first identification result and the pseudo-label, and outputs the first evaluation result based on the first loss. program.