Meta-learning method, meta-learning device, and program
The proposed meta-learning method addresses the challenge of utilizing diverse and unlabeled training data by generating latent vectors and training model parameters, enhancing performance on target tasks with varied feature spaces and limited data.
Patent Information
- Application Number
- JP2024542554
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2026-02-25
- Estimated Expiration
- 2042-08-26
AI Technical Summary
Existing meta-learning methods struggle to utilize training data with different feature spaces and unlabeled data effectively, limiting their performance on target tasks with limited data.
A meta-learning method that includes inputting multiple training datasets with different feature spaces, selecting labeled and unlabeled data, generating latent vectors, predicting labels for unlabeled data, and training model parameters to improve performance on target tasks using unlabeled data.
Enables high-performance meta-learning from a collection of training datasets with different feature spaces, including unlabeled data, achieving better results than existing methods even with a small amount of target task data.
Smart Images

Figure 0007819776000017 
Figure 0007819776000018 
Figure 0007819776000019
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a meta-learning method, a meta-learning device, and a program. [Background technology]
[0002] In machine learning methods, model parameters are usually learned using task-specific training data. To achieve high performance on a target task, a large amount of task-specific training data is required. However, depending on the task, preparing a sufficient amount of training data can be costly.
[0003] To solve the above problems, meta-learning methods have been proposed that utilize training data from different tasks to achieve high performance in a target task even with a small amount of training data (see, for example, Non-Patent Document 1). However, the meta-learning method proposed in Non-Patent Document 1 cannot utilize training data with different feature spaces. In response to this, a meta-learning method that can utilize training data with different feature spaces has been proposed (see, for example, Non-Patent Document 2), but the meta-learning method proposed in Non-Patent Document 2 has the problem of being unable to utilize unlabeled training data. [Prior art documents] [Non-patent literature]
[0004] [Non-Patent Document 1] Finn, Chelsea, Pieter Abbeel, and Sergey Levine. \Model-agnostic meta-learning for fast adaptation of deep networks.'' Proceedings of the 34th International Conference on Machine Learning, 2017. [Non-patent document 2] Tomoharu Iwata, Atsutoshi Kumagai, Meta-learning from Tasks with Heterogeneous Attribute Spaces, Neural Information Processing Systems, 2020. Summary of the Invention [Problem to be solved by the invention]
[0005] The present disclosure has been made in consideration of the above points, and aims to provide a technology that enables meta-learning of model parameters for a target task from a set of multiple training datasets with different feature spaces, including unlabeled training data. [Means for solving the problem]
[0006] A meta-learning method according to one aspect of the present disclosure includes an input step of inputting a plurality of training datasets, each training dataset being composed of training data containing at least features of examples, the plurality of training datasets possibly including training data that does not contain labels for the features, and the feature spaces of the features possibly being different; a first selection step of selecting one training dataset from the plurality of training datasets; a second selection step of selecting from the one training dataset a first feature to be labeled data, a first label for the first feature, a second feature to be unlabeled data, and a second label for the second feature; a generation step of generating a latent vector for each example represented by the first feature or the second feature using training target parameters, the labeled data, and the unlabeled data; a prediction step of predicting a label for the unlabeled data using the latent vector; and a training step of learning the training target parameters using the predicted label for the unlabeled data and the second label. [Effects of the Invention]
[0007] A technology is provided that enables meta-learning of model parameters for a target task from a collection of multiple training datasets with different feature spaces, including unlabeled training data. [Brief explanation of the drawings]
[0008] [Figure 1] FIG. 1 is a diagram illustrating an example of the hardware configuration of a meta-learning device according to an embodiment of the present invention. [Figure 2] FIG. 1 is a diagram illustrating an example of the functional configuration of a meta-learning device according to an embodiment of the present invention. [Figure 3] 10 is a flowchart illustrating an example of a meta-learning process according to the present embodiment. [Figure 4] 10 is a flowchart illustrating an example of a label prediction process according to the present embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0009] An embodiment of the present invention will be described below. In the following embodiment, a meta-learning device 10 is described that performs meta-learning of model parameters for a target task when a set of multiple training data sets, each containing unlabeled training data and having different feature spaces, is given. A case where the meta-learning device 10 predicts labels for unlabeled data in the target task using the model parameters learned by this meta-learning is also described.
[0010] Here, the meta-learning device 10 has a "meta-learning time" during which it meta-learns model parameters for a target task, and a "label prediction time" during which it predicts labels for unlabeled data in the target task using the model parameters learned during meta-learning. Note that the "meta-learning time" may simply be called "learning time," for example. The "label prediction time" may also be called "inference time" or "test time," for example.
[0011] During meta-learning, the meta-learning device 10 receives the t-th learning data set as D (t) ={(x tn ,ytn )|n=1, ,N t}, and a set of T training datasets D={D (t) |t=1, ,T} is given, where x tn is the t-th training dataset D (t) The feature value included in the nth training data, y tn is the label. Then, the training dataset D (t) There may be unlabeled features in (t=1, ,T). t is the number of training data included in the t-th training dataset, and T is the number of training datasets. Note that training data (i.e., data represented by pairs of features and their labels, data represented by unlabeled features, etc.) may also be called "examples."
[0012] For simplicity, let t represent the task and let D be the t-th training dataset. (t) is a training dataset specific to task t. However, this is just an example. For example, the training dataset can be (t) and the training dataset is D (t') and may be task-specific training data sets for the same task.
[0013] The meta-learning device 10 at the time of label prediction receives a set of labeled features X L and its label set Y L and the unlabeled feature set X U The target task is assumed to be different from any of the tasks targeted by the training dataset given during meta-learning. During label prediction, the unlabeled feature set X U The goal is to predict the label of each feature contained in (i.e., predict the label of unlabeled data).
[0014] In this embodiment, the features are assumed to be in vector format, but if the features are not in vector format (for example, if the features are expressed as images, graphs, etc.), the following embodiments can be similarly applied by converting the features into vectors. Also, in this embodiment, the task is classification or regression, but the following embodiments can be similarly applied to other machine learning problems, such as density estimation or clustering. Furthermore, the following embodiments can be similarly applied when some information about the case, such as an explanation of the features, is added in addition to the features and labels.
[0015] In the following embodiment, we will explain the case where the same meta-learning device 10 is used for both meta-learning and label prediction, but meta-learning and label prediction may be performed by different devices. In this case, the device that performs label prediction may be called, for example, a "label prediction device," a "prediction device," or an "inference device."
[0016] <Example of hardware configuration of meta-learning device 10> An example of the hardware configuration of a meta-learning device 10 according to this embodiment is shown in Figure 1. As shown in Figure 1, the meta-learning device 10 according to this embodiment is realized by the hardware configuration of a general computer or computer system, and includes, for example, an input device 101, a display device 102, an external I / F 103, a communication I / F 104, a RAM (Random Access Memory) 105, a ROM (Read Only Memory) 106, an auxiliary storage device 107, and a processor 108. Furthermore, each of these pieces of hardware is connected to each other via a bus 109 so that they can communicate with each other.
[0017] The input device 101 is, for example, a keyboard, a mouse, a touch panel, a physical button, etc. The display device 102 is, for example, a display, a display panel, etc. Note that the meta-learning device 10 does not necessarily have to have at least one of the input device 101 and the display device 102, for example.
[0018] The external I / F 103 is an interface with an external device such as a recording medium 103a. The meta-learning device 10 can read from and write to the recording medium 103a via the external I / F 103. Examples of the recording medium 103a include a flexible disk, a CD (Compact Disc), a DVD (Digital Versatile Disk), an SD memory card (Secure Digital memory card), and a USB (Universal Serial Bus) memory card.
[0019] The communication I / F 104 is an interface for connecting the meta-learning device 10 to a communication network or the like. The RAM 105 is a volatile semiconductor memory (storage device) that temporarily stores programs and data. The ROM 106 is a non-volatile semiconductor memory (storage device) that can store programs and data even when the power is turned off. The auxiliary storage device 107 is a storage device (storage device) such as an HDD (Hard Disk Drive), SSD (Solid State Drive), or flash memory. The processor 108 is an arithmetic device such as a CPU (Central Processing Unit) or GPU (Graphics Processing Unit).
[0020] The meta-learning device 10 according to this embodiment has the hardware configuration shown in Figure 1, and is therefore capable of performing various processes described below. Note that the hardware configuration shown in Figure 1 is merely an example, and the hardware configuration of the meta-learning device 10 is not limited to this. For example, the meta-learning device 10 may have multiple auxiliary storage devices 107 or multiple processors 108, may not have some of the hardware shown in the figure, or may have various hardware components other than the hardware shown in the figure.
[0021] <Example of functional configuration of meta-learning device 10> FIG. 2 shows an example of the functional configuration of the meta-learning device 10 according to this embodiment. As shown in FIG. 2, the meta-learning device 10 according to this embodiment includes an input unit 201, a latent vector generation unit 202, a prediction unit 203, a meta-learning unit 204, and an output unit 205. Each of these units is realized, for example, by a processor 108 or the like executing one or more programs installed in the meta-learning device 10. The meta-learning device 10 according to this embodiment also includes a memory unit 206. The memory unit 206 is realized, for example, by an auxiliary storage device 107 or the like. Note that the memory unit 206 may also be realized, for example, by a storage device such as a database server connected to the meta-learning device 10 via a communication network or the like.
[0022] During meta-learning, the input unit 201 inputs a set D of given training data sets. The input unit 201 also inputs the t-th training data set D from the set D of training data sets. (t) After randomly selecting, this training dataset D (t) From the labeled feature set X L and its label set Y L and an unlabeled feature set X U and its label set Y U The label set Y U is the set of unlabeled features X U It is used as the correct answer (teacher) for the prediction results when predicting the labels of each feature contained in
[0023] Furthermore, the input unit 201 receives a given labeled feature set X L and its label set Y L and an unlabeled feature set X U Enter .
[0024] The latent vector generation unit 202 generates a labeled feature set X L and its label set Y L and an unlabeled feature set X UTaking all of this input information into consideration, the latent vector generator 202 generates a latent vector that represents the characteristics of each case through an operation that can adapt to changes in the feature space and label space. Here, the latent vector generator 202 includes a variable feature self-attention mechanism 210 that is used as a module of the latent vector generator 202. Below, we will explain the variable feature self-attention mechanism 210, and then explain the method for generating latent vectors using the latent vector generator 202.
[0025] The variable feature self-attention mechanism unit 210 is realized by a neural network, and takes a tensor as input and transforms the tensor.
[0026]
number
[0027] First, the variable feature self-attention mechanism unit 210 calculates the input tensor Z as follows:
[0028]
number
[0029]
number
[0030] Next, the variable feature self-attention mechanism unit 210 calculates a weight matrix (math) that represents the similarity between slices on the first axis, such that the closer the query Q and the key K are to each other, the higher the value of the matrix (math) is.
[0031]
number
[0032]
number
[0033]
number
[0034] Next, the variable feature self-attention mechanism unit 210 calculates the output O by integrating the first axis of the value V using the weight matrix A. This is, for example,
[0035]
number
[0036] The variable feature self-attention mechanism unit 210 may convert multiple outputs O together as a final output. For example, when R outputs O are combined,
[0037]
number
[0038] Although the above description has been given of a case where an attention mechanism for the self is used, it is also possible to use an attention mechanism for other tensors, for example.
[0039] Next, a method for generating latent vectors by the latent vector generation unit 202 will be described. First, the latent vector generation unit 202 generates the input X L , Y L and X U From this, we create a tensor that distinguishes between features and labels, and between labeled and unlabeled features. For example, we could create a tensor whose slice along the first axis looks like this:
[0040]
number
[0041] If, in addition to the features and labels, some information about the cases, such as explanatory text about the features, is added, then this information can be concatenated to the tensors input to the latent vector generation unit 202. If this information is not in vector format, it can be converted into a vector using, for example, a neural network. This makes it possible to generate latent vectors that take into account some information about the cases.
[0042] Next, the latent vector generation unit 202 transforms the tensor by an operation that can accommodate changes in the feature space and label space. For example, the tensor is transformed by using the variable feature self-attention mechanism unit 210 to alternately perform self-attention on examples and self-attention on features and labels. Specifically, as the 2b-1 (where b is a natural number)-th transformation, self-attention on examples is performed as
[0043]
number
[0044]
number
[0045] In addition, as the second transformation, we apply self-attention to the features and labels.
[0046]
number
[0047] Then, the latent vector generation unit 202 converts the slices of each instance of the finally obtained Bth (B is a predetermined natural number) tensor into vectors, and sets the resulting slices as latent vectors. (B) The matrix representing the slice for each case is converted into a vector (for example, if the matrix has a rows and b columns, it is converted into an ab-dimensional vector) and used as the latent vector.
[0048] The prediction unit 203 predicts the label of an unlabeled feature using the latent vector of each example and the label assigned to the labeled feature. For example, if the label is discrete, the probability that the label is y can be calculated using a Gaussian mixture distribution as follows:
[0049]
number
[0050] Although a Gaussian mixture distribution was used above, any classification / regression model other than a Gaussian mixture distribution, such as linear regression or Gaussian process, can also be used. When a classification / regression model is used, the model parameters Θ may also include the parameters of this classification / regression model.
[0051] The meta-learning unit 204 learns the model parameters Θ so that the performance of the target task is improved. That is, the meta-learning unit 204 learns the model parameters Θ so that the expected test performance of the target task is improved. This can be done, for example, by
[0052]
number
[0053] The output unit 205 outputs the learned model parameter Θ to a predetermined output destination during meta-learning, and outputs the predicted label to a predetermined output destination during label prediction.
[0054] For example, the output unit 205 outputs the trained model parameters Θ and the predicted labels to the storage unit 206. Alternatively, for example, the trained model parameters Θ and the predicted labels may be output to the display device 102 such as a display, or may be output to a terminal device or the like connected via a communication network.
[0055] The storage unit 206 stores a set D of training data sets given during meta-learning. Also, during label prediction, a set X L and its label set Y L and an unlabeled feature set X U In addition to these, the storage unit 206 stores the model parameter Θ, hyperparameters (for example, the number of labeled features for each task N L and the number of unlabeled features N U etc.), temporary information, etc. are stored.
[0056] <Meta-learning processing> An example of the meta-learning process according to this embodiment will be described below with reference to FIG.
[0057] First, the input unit 201 receives a set D of training data sets and the number N of labeled features for each task. L and the number of unlabeled features N U and are input from the storage unit 206 (step S101). L and N U may vary from task to task.
[0058] Next, the meta-learning unit 204 initializes the model parameters Θ using any known method (step S102).
[0059] Next, the input unit 201 receives one learning data set D (t) {D (1) ,···,D (T)} is selected at random (step S103).
[0060] Next, the input unit 201 inputs the learning data set D selected in step S103 above. (t) The features and their labels are calculated from N L Randomly sample and label the feature set X L and its label set Y L (Step S104) where the learning data set D (t) If a label is not assigned to a feature sampled from, then a specific value (e.g., 0) representing the absence of a label is considered as the label for this feature, and the label set Y L The elements of
[0061] Next, the input unit 201 receives the labeled feature set X obtained in step S104. L and its label set Y L The learning dataset D selected in step S103 above is (t) The features and their labels are calculated from N U Randomly sample and create an unlabeled feature set XU and its label set Y U (Step S105). (t) may include features with no labels attached, but in this step, features with no labels attached are not sampled.
[0062] Next, the latent vector generation unit 202 generates a labeled feature set X L and its label set Y L and an unlabeled feature set X U Using these as inputs, a latent vector for each case is generated (step S106). Note that if unlabeled features are sampled in step S104, for example, in the second slice of equation (5), all of the elements in the rows corresponding to the unlabeled feature cases, which indicate whether or not the label is observed, are set to 0 (i.e., a value indicating unobserved).
[0063] Next, the prediction unit 203 calculates the latent vector of each example generated in step S106 and the label set Y L and the labels contained in U The labels of the features included in the vector are predicted (step S107).
[0064] Next, the meta-learning unit 204 calculates the unlabeled feature set X U Label set Y U The test performance is calculated by comparing the test performance with the test performance (step S108).
[0065]
number
[0066] Next, the meta-learning unit 204 learns (updates) the model parameter Θ so as to improve the performance of the target task (step S109). For example, when the performance of the target task is evaluated based on the expected test performance (expected value of test performance), the model parameter Θ is learned using the above equation (10).
[0067] Next, the meta-learning unit 204 determines whether a predetermined termination condition is met (step S110). If the termination condition is met, the process proceeds to step S111; if not, the process proceeds to step S103. As a result, steps S103 to S109 are repeatedly executed until the termination condition is met. Note that examples of the termination condition include the number of repetitions of steps S103 to S109 exceeding a predetermined threshold, or the model parameter Θ converging.
[0068] If it is determined in step S110 above that the predetermined termination condition is satisfied, the output unit 205 outputs the learned model parameters Θ to a predetermined output destination (step S111).
[0069] <Label prediction process> An example of the label prediction process according to this embodiment will be described below with reference to Fig. 4. In the following, it is assumed that the model parameter Θ has already been learned.
[0070] First, the input unit 201 receives a labeled feature set X L and its label set Y L and an unlabeled feature set X U are input from the storage unit 206 (step S201).
[0071] Next, the latent vector generation unit 202 generates a labeled feature set X L and its label set Y L and an unlabeled feature set X U Using these as inputs, a latent vector is generated for each case (step S202).
[0072] Next, the prediction unit 203 calculates the latent vector of each example generated in step S202 and the label set Y L and the labels contained in U (Step S203) Specifically, for example, the labels of the unlabeled features may be sampled according to the above formula (9).
[0073] Then, the output unit 205 outputs the label predicted in the above step S203 to a predetermined output destination (step S204).
[0074] <Evaluation> To evaluate the meta-learning device 10 according to this embodiment, we compared it with existing methods using artificial data. The existing methods we used were Gaussian Mixture Model (GMM), Gaussian Process (GP), Label Propagation (LP), Model Agnostic Meta Learning (MAML), PrototypeNet (Proto), Heterogeneous Meta Learning (HML), and Meta Label Propagation (MetaLP).
[0075] The evaluation index used was the test correct answer rate. The evaluation results (mean and standard error) are shown in Table 1 below.
[0076] [Table 1] Here, the proposed method represents the meta-learning device 10 according to this embodiment. Also, Shot represents the number of labeled features for each task.
[0077] As shown in Table 1 above, it can be seen that the meta-learning device 10 according to this embodiment is able to achieve a higher test correct answer rate than existing methods.
[0078] <Summary> As described above, when a set of multiple training datasets, including unlabeled training data, with different feature spaces is provided, the meta-learning device 10 according to this embodiment can learn model parameters by utilizing the unlabeled training data. Therefore, the meta-learning device 10 according to this embodiment can achieve high performance on a target task even when only a small amount of training data for the target task is provided.
[0079] The present invention is not limited to the above-described specifically disclosed embodiments, and various modifications, changes, and combinations with known technologies are possible without departing from the scope of the claims. [Explanation of symbols]
[0080] 10 Meta-learning device 101 Input Device 102 Display device 103 External I / F 103a Recording media 104 Communication I / F 105 RAM 106 ROM 107 Auxiliary storage 108 processors 109 Bus 201 Input section 202 Latent Vector Generation Unit 203 Prediction Department 204 Meta-Learning Department 205 Output section 206 Memory section 210 Variable Feature Self-Attention Mechanism
Claims
1. an input step of inputting a plurality of training data sets, each training data set including at least feature quantities of examples, which may include training data that does not include labels for the feature quantities, and in which the feature quantities may have different feature quantity spaces; a first selection step of selecting one training data set from the plurality of training data sets; a second selection step of selecting, from the one training dataset, a first feature to be labeled data and a first label for the first feature, a second feature to be unlabeled data, and a second label for the second feature; a generation step of generating a latent vector for each example represented by the first feature or the second feature using training target parameters, the labeled data, and the unlabeled data; a prediction procedure that uses the latent vectors to predict labels for the unlabeled data; a learning procedure for learning the learning target parameters using the label prediction result for the unlabeled data and the second label; A meta-learning method performed by a computer.
2. The generating procedure includes: creating a tensor that distinguishes between features and labels and between the labeled data and the unlabeled data using the labeled data and the unlabeled data; 2. The meta-learning method of claim 1, wherein attention to the examples and attention to features and labels are alternately repeated a predetermined number of times for the tensor, and then a slice of the tensor for each example after the repetitions is generated as a latent vector for each example.
3. The generating procedure includes:
3. The meta-learning method of claim 2, wherein a slice along a first axis creates the tensor composed of a first matrix representing information on features or labels, a second matrix representing information on whether the features or labels are observed, a third matrix representing information on whether each element corresponds to a feature, and a fourth matrix representing information on whether each element corresponds to a label.
4. The second selection procedure includes: if no label exists for the first feature amount, a label having a predetermined value representing that no label exists for the first feature amount is set as a first label for the first feature amount; The generating procedure includes:
4. The meta-learning method according to claim 3, wherein, when a label for the first feature does not exist, information indicating that a label is not observed is set to an element of the second matrix that indicates whether a label for the first feature has been observed.
5. The generation procedure includes an attention mechanism procedure that uses a tensor having a variable dimension along a predetermined axis as an input and calculates attention regarding the tensor using a neural network; The generating procedure includes: The method of claim 2 , wherein the attention to the examples and the attention to the features and labels are calculated by the attention mechanism procedure.
6. The meta-learning method according to claim 5 , wherein the parameters to be learned include parameters of the neural network.
7. an input unit configured to input a plurality of training data sets, each training data set including at least feature quantities of examples, which may include training data that does not include labels for the feature quantities, and in which the feature quantities may have different feature quantity spaces; a first selection unit configured to select one training data set from the plurality of training data sets; a second selection unit configured to select, from the one training dataset, a first feature to be labeled data and a first label for the first feature, a second feature to be unlabeled data, and a second label for the second feature; a generation unit configured to generate a latent vector for each example represented by the first feature or the second feature using a learning target parameter, the labeled data, and the unlabeled data; a predictor configured to predict a label for the unlabeled data using the latent vector; a learning unit configured to learn the learning target parameters using the label prediction result for the unlabeled data and the second label; A meta-learning device having
8. an input step of inputting a plurality of training data sets, each training data set including at least feature quantities of examples, which may include training data that does not include labels for the feature quantities, and in which the feature quantities may have different feature quantity spaces; a first selection step of selecting one training data set from the plurality of training data sets; a second selection step of selecting, from the one training dataset, a first feature to be labeled data and a first label for the first feature, a second feature to be unlabeled data, and a second label for the second feature; a generation step of generating a latent vector for each example represented by the first feature or the second feature using training target parameters, the labeled data, and the unlabeled data; a prediction procedure that uses the latent vectors to predict labels for the unlabeled data; a learning procedure for learning the learning target parameters using the label prediction result for the unlabeled data and the second label; A program that causes a computer to execute the following.
Citation Information
Patent Citations
System and method for learning interactive language
JP2019185748A
Computer system
JP2020071694A
Few-shot language model training and implementation
US20200364302A1
Learning method, learning device, and program
WO2021250751A1