WO2022249285A1 - 機械学習プログラム、装置、及び方法 - Google Patents

機械学習プログラム、装置、及び方法 Download PDF

Info

Publication number
WO2022249285A1
WO2022249285A1 PCT/JP2021/019817 JP2021019817W WO2022249285A1 WO 2022249285 A1 WO2022249285 A1 WO 2022249285A1 JP 2021019817 W JP2021019817 W JP 2021019817W WO 2022249285 A1 WO2022249285 A1 WO 2022249285A1
Authority
WO
WIPO (PCT)
Prior art keywords
machine learning
learning model
parameters
pruning process
class
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/JP2021/019817
Other languages
English (en)
French (fr)
Inventor
寛彰 金月
健一 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to PCT/JP2021/019817 priority Critical patent/WO2022249285A1/ja
Priority to JP2023523763A priority patent/JP7559942B2/ja
Publication of WO2022249285A1 publication Critical patent/WO2022249285A1/ja
Priority to US18/515,043 priority patent/US20240086710A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0495Quantised networks; Sparse networks; Compressed networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0499Feedforward networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/09Supervised learning

Definitions

  • the disclosed technology relates to a machine learning program, a machine learning device, and a machine learning method.
  • the technology disclosed herein is used when generating a machine learning model by combining individual machine learning models that classify only some classes generated by pruning from the original machine learning model. Prevents the effect from fading.
  • the disclosed technology performs a first pruning based on parameters of a machine learning model for classifying into a plurality of classes and training data including a first class among the plurality of classes in a correct label.
  • the parameters related to the first pruning process are parameters for generating a first machine learning model that classifies the first class by executing the first pruning process on the machine learning model.
  • the disclosed technique is based on parameters of the machine learning model, training data including a correct label that includes a second class among the plurality of classes, and a loss function including parameters related to the first pruning process. to generate parameters for the second pruning process.
  • a parameter for the second pruning process is a parameter for generating a second machine learning model that classifies the second class by executing the second pruning process on the machine learning model.
  • the effect of pruning is weakened. It has the effect of being able to suppress
  • FIG. 4 is a diagram for explaining generation of a base mask
  • FIG. 10 is a diagram for explaining generation of a mask other than a base mask
  • FIG. 4 is a functional block diagram of a classification device.
  • FIG. 4 is a diagram for explaining an example of processing of a machine learning device and a classification device
  • 1 is a block diagram showing a schematic configuration of a computer functioning as a machine learning device;
  • FIG. 1 is a block diagram showing a schematic configuration of a computer functioning as a classification device;
  • FIG. 11 is a diagram for explaining an example of experimental results of a sharing ratio of parameters between modules according to the embodiment;
  • a machine learning system includes a machine learning device and a classification device.
  • a machine learning device generates a mask for modularizing the N-class classifier.
  • the classifier uses the generated mask to generate a specific class classifier according to the task, and classifies the operational data.
  • Each of the machine learning device and the classification device will be described in detail below.
  • the machine learning device 10 functionally includes an N-class classifier generator 12 , a first mask generator 14 and a second mask generator 16 . Also, an N-class classifier 22 and a mask set 24 are stored in a predetermined storage area of the machine learning device 10 .
  • the N-class classifier generation unit 12 generates an N-class classifier 22 that is a classifier for classifying input data into one of N classes.
  • the N class classifier 22 may be a neural network (NN) as shown in FIG.
  • NN neural network
  • each neuron is indicated by a circle, and the neurons in each layer are connected by edges.
  • the output layer (dotted line in FIG. 2) has N neurons corresponding to each class, and each neuron in the output layer outputs the probability that the input data is classified into each class.
  • the N-class classifier generation unit 12 acquires the training data input to the machine learning device 10 and calculates edge weights, which are parameters of the N-class classifier 22, by machine learning using the acquired training data.
  • Training data is data in which correct labels indicating classes to which the data belong are associated with data such as image data, voice data, and sensor data.
  • N-class classifier 22 from the N-class classifier 22 as described above, partial networks capable of classifying only some classes are cut out as modules, and the modules are combined as appropriate to classify arbitrary multi-classes. generate a vessel.
  • Advantages of modularization are that a smaller network makes risk verification easier, and that the number of classifier parameters generated by combining modules can be reduced. A classifier with a smaller number of parameters reduces the amount of calculation, and thus is more practical as a classifier for use during operation.
  • the original NN classifies the input data into one of three classes: "cat", “dog”, and "bird". .
  • the original NN includes a partial network representing the class "cat”, a partial network representing the class "dog”, and a partial network representing the class "bird”.
  • the machine learning device cuts out a partial network representing the class "cat” as a module A, a partial network representing the class "dog” as a module B, and a partial network representing the class "bird” as a module C. Then, as shown in the lower diagram of FIG.
  • the machine learning device divides module A and module B into Generate a combined classifier. Then, the machine learning device classifies the input data into the class "cat” or the class "dog” using a classifier that combines the module A and the module B. Similarly, if the task at the time of operation is a task of classifying whether the input data indicates whether it is a cat or a bird, the machine learning device 10 generates a classifier that combines module A and module C. , classifies the input data into the class "cat” or the class "bird".
  • Non-Patent Document 1 As a method of modularizing NN, there is a method of applying a super mask, as shown in Non-Patent Document 1 mentioned above. Modularization by this method will be described by taking as an example a case where the original NN is a 10-class classification NN corresponding to 10 digits of MNIST, which is an image data set of handwritten digits. As shown in FIG. 4, module 0 is the remaining partial network when the original NN is pruned by “mask 0” generated by machine learning based on training data with correct label “0”. Module 0 is a single class classifier that classifies whether the number indicated by the input image data is "0" or otherwise (1 to 9).
  • module 1 is the remaining partial network when the original NN is pruned with “mask 1” generated by machine learning based on training data with correct label “1”.
  • a module 1 is a single class classifier that classifies whether the number indicated by the input image data is "1" or otherwise (0, 2 to 9). By combining module 1 and module 2, a classifier for two-class classification that classifies "0" or "1" is generated.
  • the effect of modularization by pruning the original NN is that the number of parameters of the classifier generated by combining modules can be reduced.
  • the edges included in the modules may vary among the generated modules.
  • the effect of modularization by pruning is reduced.
  • each module is generated so as to suppress variations in edges between modules.
  • the first mask generation unit 14 generates a parameter related to the first pruning process based on the machine learning model parameters for classifying into a plurality of classes and the training data including the first class in the correct label among the plurality of classes. to generate
  • the parameter for the first pruning process is a parameter for generating the first machine learning model for classifying the first class by executing the first pruning process on the machine learning model.
  • the first mask generator 14 prepares a score matrix whose elements are scores corresponding to each edge of the original NN.
  • s ⁇ i,j ⁇ is the score corresponding to the j-th edge of the i-th layer of the original NN.
  • the initial values of the score matrix may be set randomly.
  • the first mask generation unit 14 generates a mask in which the top k% elements in the score matrix are set to 1 and the other elements are set to 0 in descending order of score. Further, the first mask generation unit 14 may generate a mask that assigns 1 to elements whose scores are equal to or greater than a predetermined value and 0 to elements whose scores are less than the predetermined value in the score matrix.
  • the first mask generation unit 14 executes machine learning forward processing using a partial network including edges corresponding to elements with a value of 1 in the generated mask and neurons connected by the edges. .
  • the portion corresponding to the elements with a mask value of 1 in the original NN is indicated by a solid line
  • the portion corresponding to the elements with a mask value of 0 is indicated by a dotted line. More specifically, the first mask generation unit 14 inputs training data to the portion of the original NN corresponding to a mask value of 1 and propagates it in the forward direction.
  • the first mask generator 14 sets the correct label y of the training data to a value indicating a positive example for a specific class and a value indicating a negative example for other classes.
  • a "specific class” is any one of a plurality of classes classified by the original NN, and may be any one of the plurality of classes. Then, the first mask generating unit 14 obtains the classification result ⁇ (“ ⁇ (hat)” on “y” in the numerical formula described later).
  • the first mask generation unit 14 executes machine learning backward processing on each score in the score matrix instead of on the edge weights of the NN. Specifically, the first mask generation unit 14 updates each score in the score matrix by error backpropagation so that the classification result y ⁇ approaches the correct label y. For example, the first mask generator 14 updates each score in the score matrix so as to minimize the loss function shown in Equation (1) below.
  • CE(y, y ⁇ ) is the cross entropy of y and y ⁇ .
  • the first mask generation unit 14 repeats the above-described forward processing and backward processing until the end determination of machine learning is satisfied.
  • the score matrix among the edges included in the original NN, the score corresponding to an edge with a higher degree of appropriateness to be left as an edge of a module for classifying a specific class has a larger value.
  • the first mask generation unit 14 uses the mask generated from the score matrix when machine learning is finished as a mask for generating a module for classifying a specific class.
  • the mask generated by the first mask generation unit 14 will be referred to as a "base mask”, and the module generated by the base mask will be referred to as a “base module”.
  • the first mask generator 14 adds the generated base mask to the mask set 24 and stores it, and passes the score matrix corresponding to the base mask to the second mask generator 16 .
  • the second mask generation unit 16 is based on the parameters of the machine learning model, the training data including the second class of the plurality of classes in the correct label, and the loss function including parameters related to the first pruning process. Generate parameters for the second pruning process. Parameters for the second pruning process are parameters for generating a second machine learning model that classifies the second class by executing the second pruning process on the machine learning model that classifies into a plurality of classes. is.
  • the second mask generation unit 16 like the first mask generation unit 14, performs machine learning based on training data associated with each correct label indicating a class other than a specific class. Generate a mask to generate a module for classifying
  • the mask generated by the second mask generation unit 16 will be referred to as a "training target mask”
  • the module generated by the training target mask will be referred to as a "training target module”.
  • the second mask generation unit 16 generates a score matrix corresponding to the training mask so that the score matrix corresponding to the training mask is similar to the score matrix corresponding to the base mask. Update each score in the score matrix.
  • the second mask generation unit 16 updates each score in the score matrix so as to minimize the loss function L as shown in the following equation (2) for each training target mask.
  • s ⁇ i, j ⁇ is the value of each element of the score matrix corresponding to the training target mask
  • s ⁇ i, j ⁇ * is the value of each element of the score matrix corresponding to the base mask
  • is the hyperparameter.
  • the classification device 30 functionally includes a specific class classifier generator 32 and a classifier 34 .
  • a specific class classifier 42 is stored in a predetermined storage area of the classification device 30 .
  • the specific class classifier generation unit 32 receives task information regarding tasks during operation.
  • the task information includes information designating a module corresponding to the task.
  • the specific class classifier generator 32 acquires a mask corresponding to the designated module from the mask set 24 based on the received task information.
  • the specific class classifier generator 32 also acquires the original NN, which is the N class classifier 22 .
  • the specific class classifier generation unit 32 cuts out a union of portions corresponding to each of the masks acquired from the mask set 24 (hereinafter referred to as a “union portion”) from the acquired original NN. By applying the obtained mask to the union part, a module corresponding to the mask is generated.
  • the specific class classifier generator 32 stores the extracted union part and the obtained mask as a specific class classifier 42 .
  • the classification unit 34 acquires operational data, inputs the operational data into the specific class classifier 42, and outputs the class to which the operational data belongs among the classes corresponding to the tasks as the classification result. Operational data is similar to training data, except that the correct labels are unknown. Specifically, the classification unit 34 applies each of the masks included in the specific class classifier 42 to the union part to generate each of the modules for classifying each of the classes according to the task. The classification unit 34 inputs operational data to each module, obtains classification results, integrates each of the classification results, and determines a final classification result. The classification unit 34 uses the classification result output from each module, that is, the classification result output from the module showing the highest probability among the probabilities that the operational data belongs to the class corresponding to each module, as the final classification result. You can decide. The classification unit 34 outputs the determined final classification result.
  • the task of classifying operational data into class "3" or class "5" is performed by modularizing the NN of the ten-class classification corresponding to the ten numbers 0 to 9 of the MNIST.
  • An example of the processing of the machine learning device 10 and the classification device 30 will be described as an example.
  • the first mask generation unit 14 generates a base mask by machine learning based on training data associated with a correct label indicating one class and the N-class classifier 22 .
  • the number indicated by the input image data is classified as 0 or other than 0, which is a single class classifier module 0.
  • An example is shown in which the module 0 mask is used as the base mask.
  • the second mask generator 14 generates module 1 to module 9 masks for generating modules 1 to 9, respectively.
  • the second mask generation unit 16 generates the module 1 mask to the module 9 mask so that each score matrix corresponding to each of the module 1 mask to module 9 mask is similar to the score matrix corresponding to the base mask. Generate each. This produces 10 masks corresponding to each of modules 0-9 and stored as mask set 24 .
  • the specific class classifier generation unit 32 receives task information specifying modules 3 and 5 and acquires the module 3 mask and the module 5 mask from the mask set 24 .
  • the specific class classifier generation unit 32 cuts out the union part of the part corresponding to the module 3 mask and the part corresponding to the module 5 mask from the N class classifier 22, and together with the module 3 mask and the module 5 mask, Stored as a specific class classifier 42 .
  • the specific class classifier generator 32 applies the module 3 mask to the union part to generate module 3, and applies the module 5 mask to the union part to generate module 5.
  • the classification unit 34 acquires image data of handwritten digits as operation data, and inputs the operation data to the module 3 to obtain a classification result indicating the probability that the number indicated by the operation data is 3.
  • the classification unit 34 obtains a classification result indicating the probability that the number indicated by the operational data is 5 by inputting the operational data into the module 5 .
  • the classification unit 34 outputs the classification result with the higher probability as the final classification result. For example, when the classification result of module 3 is 90% and the classification result of module 5 is 10%, the classification unit 34 outputs the classification result that the number indicated by the operational data is "3".
  • the machine learning device 10 may be realized by, for example, a computer 50 shown in FIG.
  • the computer 50 includes a CPU (Central Processing Unit) 51 , a memory 52 as a temporary storage area, and a non-volatile storage section 53 .
  • the computer 50 also includes an input/output device 54 such as an input unit and a display unit, and an R/W (Read/Write) unit 55 that controls reading and writing of data to and from a storage medium 59 .
  • the computer 50 also has a communication I/F (Interface) 56 connected to a network such as the Internet.
  • the CPU 51 , memory 52 , storage unit 53 , input/output device 54 , R/W unit 55 and communication I/F 56 are connected to each other via bus 57 .
  • the storage unit 53 may be realized by a HDD (Hard Disk Drive), SSD (Solid State Drive), flash memory, or the like.
  • a storage unit 53 as a storage medium stores a machine learning program 60 for causing the computer 50 to function as the machine learning device 10 .
  • Machine learning program 60 has an N-class classifier generation process 62 , a first mask generation process 64 and a second mask generation process 66 .
  • the storage unit 53 also has an information storage area 70 in which information constituting each of the N-class classifier 22 and the mask set 24 is stored.
  • the CPU 51 reads out the machine learning program 60 from the storage unit 53, develops it in the memory 52, and sequentially executes the processes of the machine learning program 60.
  • the CPU 51 operates as the N-class classifier generation unit 12 shown in FIG. 1 by executing the N-class classifier generation process 62 . Further, the CPU 51 operates as the first mask generation unit 14 shown in FIG. 1 by executing the first mask generation process 64 . Further, the CPU 51 operates as the second mask generation unit 16 shown in FIG. 1 by executing the second mask generation process 66 .
  • the CPU 51 also reads information from the information storage area 70 and develops each of the N-class classifier 22 and the mask set 24 in the memory 52 . Thereby, the computer 50 executing the machine learning program 60 functions as the machine learning device 10 . Note that the CPU 51 that executes the program is hardware.
  • the classification device 30 may be realized, for example, by the computer 80 shown in FIG.
  • the computer 80 includes a CPU 81 , a memory 82 as a temporary storage area, and a non-volatile storage section 83 .
  • the computer 80 also includes an input/output device 84 such as an input unit and a display unit, a R/W unit 85 that controls reading and writing of data to/from a storage medium 89, and a communication I/F86.
  • the CPU 81 , memory 82 , storage unit 83 , input/output device 84 , R/W unit 85 and communication I/F 86 are connected to each other via bus 87 .
  • the storage unit 83 may be implemented by an HDD, SSD, flash memory, or the like.
  • a storage unit 83 as a storage medium stores a sorting program 90 for causing the computer 80 to function as the sorting device 30 .
  • the classifier program 90 has a specific class classifier generation process 92 and a classifier process 94 .
  • the storage unit 83 also has an information storage area 100 in which information constituting the specific class classifier 42 is stored.
  • the CPU 81 reads out the classification program 90 from the storage unit 83, develops it in the memory 82, and sequentially executes the processes of the classification program 90.
  • the CPU 81 operates as the specific class classifier generation unit 32 shown in FIG. 7 by executing the specific class classifier generation process 92 . Further, the CPU 81 operates as the classification section 34 shown in FIG. 7 by executing the classification process 94 . Also, the CPU 81 reads information from the information storage area 100 and develops the specific class classifier 42 in the memory 82 .
  • the computer 80 executing the classification program 90 functions as the classification device 30 . Note that the CPU 81 that executes the program is hardware.
  • each of the machine learning program 60 and the classification program 90 can also be realized by, for example, a semiconductor integrated circuit, more specifically an ASIC (Application Specific Integrated Circuit) or the like.
  • a semiconductor integrated circuit more specifically an ASIC (Application Specific Integrated Circuit) or the like.
  • the machine learning device 10 receives training data and is instructed to generate a mask for modularization, the machine learning device 10 executes the machine learning process shown in FIG. Further, when task information and operation data are input to the classification device 30 and classification of the operation data is instructed, the classification processing shown in FIG. 12 is executed in the classification device 30 .
  • the machine learning process and the classification process will be described below. Note that the machine learning process and the classification process are examples of the machine learning method of the technology disclosed herein.
  • step S ⁇ b>10 the N-class classifier generator 12 acquires training data input to the machine learning device 10 .
  • step S12 the N-class classifier generator 12 generates the N-class classifier 22 by machine learning using the acquired training data.
  • step S14 the first mask generation unit 14 prepares a score matrix whose elements are scores corresponding to each edge of the N class classifier 22. Also, the first mask generation unit 14 sets the correct label y of the acquired training data as a positive example for a specific class and a negative example for other classes. Then, the first mask generation unit 14 applies a mask to the N class classifier 22 in which the top k% elements in the order of the score are 1 and the other elements are 0 in the score matrix, training data and propagate forward to obtain the classification result y ⁇ . Furthermore, the first mask generation unit 14 updates each score of the score matrix by error backpropagation so that the classification result y ⁇ approaches the correct label y, and generates a base mask from the score matrix when machine learning is completed. Generate.
  • step S16 similarly to step S14 above, the second mask generation unit 16 generates a training target mask for generating each of the training target modules for classifying classes other than the specific class. At this time, the second mask generation unit 16 generates each training target mask such that the score matrix is similar to the score matrix of the base mask.
  • step S18 each of the first mask generation unit 14 and the second mask generation unit 16 stores the generated mask as the mask set 24, and the machine learning process ends.
  • step S20 the specific class classifier generator 32 acquires task information including information designating a module corresponding to the task.
  • step S22 the specific class classifier generator 32 acquires from the mask set 24 the mask corresponding to the module specified by the task information. Further, the specific class classifier generating unit 32 cuts out the union part of the parts corresponding to each of the obtained masks from the N class classifier 22 and stores it as the specific class classifier 42 together with the obtained mask.
  • step S24 the classification unit 34 acquires the operational data input to the classification device 30.
  • step S26 the classification unit 34 applies each mask included in the specific class classifier 42 to the union part to generate each module for classifying each class according to the task. . Then, the classification unit 34 inputs operational data to each module, obtains classification results, integrates each of the classification results, determines and outputs final classification results. Then, the classification process ends.
  • the machine learning device based on the N class classifier and the training data including the first class out of the N classes in the correct label, Generate a base mask for pruning to generate a base module.
  • a base mask is generated by binarizing a score matrix whose elements are scores corresponding to each edge of the N-class classifier.
  • the machine learning device uses an N class classifier, training data including the second class of the N classes in the correct label, and a loss function including the score matrix value corresponding to the base mask. Create a mask for pruning to create a module.
  • the rate of sharing the same parameters between modules increases. Therefore, it is possible to suppress the reduction in the pruning effect of reducing the number of parameters of a classifier generated by combining modules.
  • Comparative Example 1 and Comparative Example 2 shown in FIG. 13 are methods in which the loss function used when updating the score matrix for mask creation does not include a regularization term that penalizes the difference in score matrix between modules. Further, Comparative Example 1 is a case where the initial values of the score matrix are not shared among the modules, and Comparative Example 2 is a case where they are shared.
  • the present method 1 and the present method 2 are methods that include a regularization term in the loss function with the difference in score matrix between modules as a penalty, as in the above embodiment.
  • the initial values of the score matrix are shared between modules.
  • the "ratio of the number of parameters when combined with respect to the original NN” is the ratio of the number of parameters when two modules are combined to the number of parameters of the original NN. This value is also the average of all 45 pairs of combinations of 2 out of 10 modules. As described above, each module is generated to have 5% of the number of parameters of the original NN, so this value is between 0.05 and 0.1, and the smaller this value is, the more similar the two modules are. represents that Also, in FIG. 13, the "proportion of shared parameters” is the ratio of the number of parameters shared by two modules to be combined.
  • machine learning device and the classification device are implemented by different computers.
  • machine learning device and the classification device may be implemented by one computer.
  • the machine learning program and the classification program have been pre-stored (installed) in the storage unit, but the present invention is not limited to this.
  • the program according to the technology disclosed herein can also be provided in a form stored in a storage medium such as a CD-ROM, DVD-ROM, USB memory, or the like.
  • machine learning device 12
  • N class classifier generator 14
  • first mask generator 16
  • second mask generator 22
  • class classifier 24
  • classifier 32
  • specific class classifier generator 34
  • classifier 42
  • specific class classifier 50 80 computers 51, 81 CPUs 52, 82 memories 53, 83 storage units 59, 89 storage medium 60 machine learning program 90 classification program

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

機械学習装置は、訓練データを用いた機械学習によりNクラス分類器(22)を生成し、1つのクラスを示す正解ラベルが対応付けられた訓練データとNクラス分類器(22)とを用いた機械学習により、ベースモジュールを生成するためのベースマスクを生成し、他のモジュールがベースモジュールに類似するように、他のモジュールの各々を生成するためのマスクを生成し、生成したマスクをマスク集合(24)として記憶する。分類装置は、タスクに応じたモジュールのマスクと、その和集合部分とを特定クラス分類器42として記憶し、和集合部分に各マスクを適用して生成した各モジュールに運用データを入力して得られる分類結果を統合して、最終的な分類結果を出力する。

Description

機械学習プログラム、装置、及び方法
 開示の技術は、機械学習プログラム、機械学習装置、及び機械学習方法に関する。
 従来、複数のクラスへ分類する機械学習モデルについて、枝刈りによって一部のクラスのみを分類する個別の機械学習モデルを複数生成し、それらを結合させることで特定の複数のクラスを分類する機械学習モデルを生成する技術が存在する。例えば、機械学習済みのニューラルネットワークから、スーパーマスクを用いてサブネットワークを切り出す技術が提案されている。この技術では、ニューラルネットワークのエッジの重みに対応したスコア行列を用意し、ニューラルネットワークの重みに、スコア行列の上位k%の要素を1、その他の要素を0としたスーパーマスクを適用して、機械学習のフォワード処理が実行される。また、この技術では、バックワード処理時には、ニューラルネットワークのエッジの重みは固定した上で、スコア行列の各スコアについて、通常の勾配法により機械学習を実行する。
Vivek Ramanujan, Mitchell Wortsman, Aniruddha Kembhavi, Ali Farhadi, and Mohammad Rastegari, "What's Hidden in a Randomly Weighted Neural Network?", CVPR, 31 Mar 2020.
 上述のように、枝刈りによって生成した個別の機械学習モデルのうち、運用時のタスクに応じた個別の機械学習モデルを選択して結合することで、元の機械学習モデルに比べて、機械学習モデルのパラメータ数を少なくできるという効果がある。しかし、個別の機械学習モデルの構造によっては、結合により生成する機械学習モデルにおいて、枝刈りの効果が薄まる場合がある。
 一つの側面として、開示の技術は、元の機械学習モデルから枝刈りによって生成した一部のクラスのみを分類する個別の機械学習モデルを結合して機械学習モデルを生成する場合において、枝刈りの効果が薄まることを抑制する。
 一つの態様として、開示の技術は、複数のクラスへ分類する機械学習モデルのパラメータと、前記複数のクラスのうち第1のクラスを正解ラベルに含む訓練データとに基づいて、第1の枝刈り処理に関するパラメータを生成する。前記第1の枝刈り処理に関するパラメータは、前記機械学習モデルに第1の枝刈り処理を実行することによって前記第1のクラスを分類する第1の機械学習モデルを生成するためのパラメータである。また、開示の技術は、前記機械学習モデルのパラメータと、前記複数のクラスのうち第2のクラスを正解ラベルに含む訓練データと、前記第1の枝刈り処理に関するパラメータを含む損失関数とに基づいて、第2の枝刈り処理に関するパラメータを生成する。第2の枝刈り処理に関するパラメータは、前記機械学習モデルに第2の枝刈り処理を実行することによって前記第2のクラスを分類する第2の機械学習モデルを生成するためのパラメータである。
 一つの側面として、元の機械学習モデルから枝刈りによって生成した一部のクラスのみを分類する個別の機械学習モデルを結合して機械学習モデルを生成する場合において、枝刈りの効果が薄まることを抑制することができる、という効果を有する。
機械学習装置の機能ブロック図である。 Nクラス分類器の一例を示す図である。 Nクラス分類器のモジュール化を説明するための図である。 Nクラス分類器のモジュール化を説明するための図である。 ベースマスクの生成を説明するための図である。 ベースマスク以外のマスクの生成を説明するための図である。 分類装置の機能ブロック図である。 機械学習装置及び分類装置の処理の一例を説明するための図である。 機械学習装置として機能するコンピュータの概略構成を示すブロック図である。 分類装置として機能するコンピュータの概略構成を示すブロック図である。 機械学習処理の一例を示すフローチャートである。 分類処理の一例を示すフローチャートである。 本実施形態におけるモジュール間でのパラメータの共有割合の実験結果の一例を説明するための図である。
 以下、図面を参照して、開示の技術に係る実施形態の一例を説明する。本実施形態に係る機械学習システムは、機械学習装置と、分類装置とを含む。機械学習装置は、Nクラス分類器をモジュール化するためのマスクを生成する。分類器は、生成されたマスクを用いてタスクに応じた特定クラス分類器を生成し、運用データを分類する。以下、機械学習装置及び分類装置の各々について詳述する。
 まず、機械学習装置について説明する。図1に示すように、機械学習装置10は、機能的には、Nクラス分類器生成部12と、第1マスク生成部14と、第2マスク生成部16とを含む。また、機械学習装置10の所定の記憶領域には、Nクラス分類器22と、マスク集合24とが記憶される。
 Nクラス分類器生成部12は、入力されたデータを、N個のクラスのいずれかに分類するための分類器であるNクラス分類器22を生成する。例えば、Nクラス分類器22は、図2に示すようなニューラルネットワーク(Neural Network:NN)としてよい。図2の例では、丸印が各ニューロンであり、各層のニューロン間はエッジで接続されている。出力層(図2中の破線部)は、各クラスに対応したN個のニューロンを持ち、出力層の各ニューロンからは、入力されたデータが各クラスに分類される確率が出力される。
 Nクラス分類器生成部12は、機械学習装置10に入力された訓練データを取得し、取得した訓練データを用いた機械学習により、Nクラス分類器22のパラメータであるエッジの重みを算出する。訓練データは、画像データ、音声データ、センサデータ等のデータに、そのデータが属するクラスを示す正解ラベルが対応付けられたデータである。
 本実施形態では、上記のようなNクラス分類器22から、一部のクラスのみを分類可能な部分ネットワークをモジュールとして切り出し、モジュール同士を適宜結合することにより、任意のマルチクラスを分類可能な分類器を生成する。モジュール化することの利点は、ネットワークが小さくなることで、リスク検証が容易になること、及び、モジュール同士の結合で生成される分類器のパラメータ数を少なくすることができる点である。分類器のパラメータ数が少ない方が、計算量が低減されるため、運用時に用いる分類器として実用性が高まる。
 ここで、NNのモジュール化について説明する。例えば、図3の上図に示すように、オリジナルのNNが、入力されたデータを、クラス「猫」、「犬」、及び「鳥」の3クラスのいずれかに分類するものであるとする。オリジナルのNNには、クラス「猫」を表現する部分ネットワークと、クラス「犬」を表現する部分ネットワークと、クラス「鳥」を表現する部分ネットワークとが含まれる。機械学習装置は、クラス「猫」を表現する部分ネットワークをモジュールA、クラス「犬」を表現する部分ネットワークをモジュールB、及びクラス「鳥」を表現する部分ネットワークをモジュールCとして切り出す。そして、図3の下図に示すように、運用時のタスクが、入力されたデータが示すものが、猫か犬かを分類するタスクである場合、機械学習装置は、モジュールAとモジュールBとを結合した分類器を生成する。そして、機械学習装置は、入力されたデータを、モジュールAとモジュールBとを結合した分類器を用いて、クラス「猫」又はクラス「犬」に分類する。同様に、運用時のタスクが、入力されたデータが示すものが、猫か鳥かを分類するタスクである場合、機械学習装置10は、モジュールAとモジュールCとを結合した分類器を生成し、入力されたデータをクラス「猫」又はクラス「鳥」に分類する。
 NNをモジュール化する手法として、上述した非特許文献1に示すように、スーパーマスクを適用する手法が存在する。オリジナルのNNが手書き数字の画像データセットであるMNISTの10個の数字に対応する10クラス分類のNNである場合を例に、この手法によるモジュール化ついて説明する。図4に示すように、正解ラベル「0」の訓練データに基づく機械学習により生成した「マスク0」によりオリジナルのNNを枝刈りした際の、残りの部分ネットワークがモジュール0となる。モジュール0は、入力された画像データが示す数字が、「0」かそれ以外(1~9)かを分類するシングルクラス分類器である。同様に、正解ラベル「1」の訓練データに基づく機械学習により生成した「マスク1」によりオリジナルのNNを枝刈りした際の、残りの部分ネットワークがモジュール1となる。モジュール1は、入力された画像データが示す数字が、「1」かそれ以外(0、2~9)かを分類するシングルクラス分類器である。モジュール1とモジュール2とを結合することにより、「0」か「1」かを分類する2クラス分類の分類器が生成される。
 上述したように、モジュールを結合して生成される分類器のパラメータ数を少なくすることができる点が、オリジナルのNNの枝刈りによるモジュール化の効果である。しかし、生成されたモジュール間で、モジュールに含まれるエッジにばらつきが生じる場合がある。このような場合には、モジュール間で共有するエッジが少ないため、すなわち、モジュール間で同じパラメータを共有している割合が低いため、上記の枝刈りによるモジュール化の効果が薄まる。特に、オリジナルのNNに含まれるエッジ数が多い場合には、枝切りのバリエーションが多くなるため、枝切りにより生成されるモジュール間で、モジュールに含まれるエッジのばらつきが大きくなる。そこで、本実施形態では、モジュール間でのエッジのばらつきを抑制するように、各モジュールを生成する。以下、モジュールを生成するためのマスクを生成する第1マスク生成部14及び第2マスク生成部16について詳述する。
 第1マスク生成部14は、複数のクラスへ分類する機械学習モデルのパラメータと、複数のクラスのうち第1のクラスを正解ラベルに含む訓練データとに基づいて、第1の枝刈り処理に関するパラメータを生成する。第1の枝刈り処理に関するパラメータとは、機械学習モデルに第1の枝刈り処理を実行することによって第1のクラスを分類する第1の機械学習モデルを生成するためのパラメータである。
 具体的には、図5に示すように、第1マスク生成部14は、オリジナルのNNのエッジの各々に対応したスコアを要素とするスコア行列を用意する。図5右図において、s{i,j}は、オリジナルのNNのi番目の層のj番目のエッジに対応するスコアである。スコア行列の初期値はランダムに設定してよい。第1マスク生成部14は、スコア行列において、スコアが高い順に上位k%の要素を1、その他の要素を0としたマスクを生成する。また、第1マスク生成部14は、スコア行列において、スコアが所定値以上の要素を1、所定値未満の要素を0とするマスクを生成してもよい。第1マスク生成部14は、オリジナルのNNにおいて、生成したマスクの値が1の要素に対応するエッジ及びそのエッジで接続されたニューロンを含む部分ネットワークを用いて、機械学習のフォワード処理を実行する。図5の左図では、オリジナルのNNのうち、マスクの値が1の要素に対応する部分を実線、マスクの値が0の要素に対応する部分を点線で表している。より具体的には、第1マスク生成部14は、マスクの値が1に対応するオリジナルのNNの部分に対して、訓練データを入力して順方向に伝播させる。この際、第1マスク生成部14は、訓練データの正解ラベルyを、特定のクラスについては正例を示す値、それ以外のクラスについては負例を示す値とする。「特定のクラス」は、オリジナルのNNにより分類される複数のクラスのいずれか1つのクラスであり、複数のクラスのいずれであってもよい。そして、第1マスク生成部14は、分類結果y^(後述する数式内では、「y」の上に「^(ハット)」)を得る。
 また、第1マスク生成部14は、NNのエッジの重みではなく、スコア行列の各スコアに対して、機械学習のバックワード処理を実行する。具体的には、第1マスク生成部14は、分類結果y^が正解ラベルyに近づくように、誤差逆伝播法によりスコア行列の各スコアを更新する。例えば、第1マスク生成部14は、下記(1)式に示す損失関数を最小化するように、スコア行列の各スコアを更新する。
Figure JPOXMLDOC01-appb-M000001
 なお、CE(y,y^)は、yとy^とのクロスエントロピーである。第1マスク生成部14は、上記のフォワード処理及びバックワード処理を機械学習の終了判定を満たすまで繰り返す。これにより、スコア行列において、オリジナルのNNに含まれるエッジのうち、特定のクラスを分類するためのモジュールのエッジとして残す適正度が高いエッジに対応するスコアほど大きな値となる。第1マスク生成部14は、機械学習が終了した際のスコア行列から生成されるマスクを、特定のクラスを分類するためのモジュールを生成するためのマスクとする。以下では、第1マスク生成部14により生成されるマスクを「ベースマスク」といい、ベースマスクにより生成されるモジュールを「ベースモジュール」という。第1マスク生成部14は、生成したベースマスクをマスク集合24に追加して記憶すると共に、ベースマスクに対応するスコア行列を第2マスク生成部16へ受け渡す。
 第2マスク生成部16は、機械学習モデルのパラメータと、複数のクラスのうち第2のクラスを正解ラベルに含む訓練データと、第1の枝刈り処理に関するパラメータを含む損失関数とに基づいて、第2の枝刈り処理に関するパラメータを生成する。第2の枝刈り処理に関するパラメータは、複数のクラスへ分類する機械学習モデルに第2の枝刈り処理を実行することによって第2のクラスを分類する第2の機械学習モデルを生成するためのパラメータである。
 具体的には、第2マスク生成部16は、特定のクラス以外のクラスを示す正解ラベルの各々が対応付けられた訓練データに基づく機械学習により、第1マスク生成部14と同様に、各クラスを分類するためのモジュールを生成するためのマスクを生成する。以下では、第2マスク生成部16により生成されるマスクを「訓練対象マスク」といい、訓練対象マスクにより生成されるモジュールを「訓練対象モジュール」という。この機械学習の際、第2マスク生成部16は、図6に示すように、訓練対象マスクに対応するスコア行列が、ベースマスクに対応するスコア行列と類似するように、訓練対象マスクに対応するスコア行列の各スコアを更新する。例えば、第2マスク生成部16は、訓練対象マスク毎に、下記(2)式に示すような損失関数Lを最小化するように、スコア行列の各スコアを更新する。
Figure JPOXMLDOC01-appb-M000002
 なお、s{i,j}は、訓練対象マスクに対応するスコア行列の各要素の値、s{i,j} は、ベースマスクに対応するスコア行列の各要素の値、λはハイパーパラメータである。すなわち、(2)式に示す損失関数は、(1)式に示す損失関数に、モジュール間のスコア行列の差をペナルティとした正則化項を追加したものである。これにより、ベースモジュールと類似した枝刈り処理を実行するための訓練対象マスクが生成され、ベースモジュールと類似した訓練対象モジュールを生成することができる。第2マスク生成部16は、生成した訓練対象マスクをマスク集合24に追加して記憶する。
 次に、分類装置について説明する。図7に示すように、分類装置30は、機能的には、特定クラス分類器生成部32と、分類部34とを含む。また、分類装置30の所定の記憶領域には、特定クラス分類器42が記憶される。
 特定クラス分類器生成部32は、運用時のタスクに関するタスク情報を受け付ける。タスク情報には、タスクに応じたモジュールを指定する情報が含まれる。特定クラス分類器生成部32は、受け付けたタスク情報に基づいて、指定されたモジュールに対応するマスクをマスク集合24から取得する。また、特定クラス分類器生成部32は、Nクラス分類器22であるオリジナルのNNも取得する。特定クラス分類器生成部32は、取得したオリジナルのNNから、マスク集合24から取得したマスクの各々に対応する部分の和集合(以下、「和集合部分」という)を切り出す。和集合部分に、取得したマスクを適用することにより、そのマスクに対応するモジュールが生成される。特定クラス分類器生成部32は、切り出した和集合部分と、取得したマスクとを、特定クラス分類器42として記憶する。
 分類部34は、運用データを取得し、運用データを特定クラス分類器42に入力し、タスクに応じたクラスのうち、運用データが属するクラスを分類結果として出力する。運用データは、正解ラベルが未知である点を除いて、訓練データと同様である。具体的には、分類部34は、特定クラス分類器42に含まれるマスクの各々を和集合部分に適用して、タスクに応じたクラスの各々を分類するためのモジュールの各々を生成する。分類部34は、各モジュールに運用データを入力して分類結果を得て、分類結果の各々を統合して、最終的な分類結果を決定する。分類部34は、各モジュールから出力される分類結果、すなわち、運用データが各モジュールに対応するクラスに属する確率のうち、最も高い確率を示すモジュールから出力された分類結果を最終的な分類結果として決定してよい。分類部34は、決定した最終的な分類結果を出力する。
 ここで、図8を参照して、MNISTの0~9の10個の数字に対応する10クラス分類のNNをモジュール化して、運用データをクラス「3」又はクラス「5」に分類するタスクを例に、機械学習装置10及び分類装置30の処理の一例を説明する。
 まず、Nクラス分類器生成部12は、訓練データを用いた機械学習により、N(N=10)クラス分類器22を生成する。第1マスク生成部14は、1つのクラスを示す正解ラベルが対応付けられた訓練データとNクラス分類器22とに基づく機械学習により、ベースマスクを生成する。図8では、正解ラベル「0」が対応付けられた訓練データに基づき、入力された画像データが示す数字が、0か0以外かを分類するシングルクラス分類器であるモジュール0を生成するためのモジュール0マスクをベースマスクとする例を示している。第2マスク生成部14は、モジュール1~モジュール9の各々を生成するためのモジュール1マスク~モジュール9マスクの各々を生成する。この際、第2マスク生成部16は、モジュール1マスク~モジュール9マスクの各々に対応するスコア行列の各々が、ベースマスクに対応するスコア行列と類似するように、モジュール1マスク~モジュール9マスクの各々を生成する。これにより、モジュール0~9の各々に対応する10個のマスクが生成され、マスク集合24として記憶される。
 特定クラス分類器生成部32は、モジュール3及びモジュール5を指定するタスク情報を受け付け、マスク集合24から、モジュール3マスク及びモジュール5マスクを取得する。特定クラス分類器生成部32は、Nクラス分類器22のうち、モジュール3マスクに対応する部分と、モジュール5マスクに対応する部分との和集合部分を切り出し、モジュール3マスク及びモジュール5マスクと共に、特定クラス分類器42として記憶する。特定クラス分類器生成部32は、和集合部分にモジュール3マスクを適用してモジュール3を生成し、和集合部分にモジュール5マスクを適用してモジュール5を生成する。分類部34は、運用データとして、手書き数字の画像データを取得し、運用データをモジュール3に入力することにより、運用データが示す数字が3である確率を示す分類結果を得る。同様に、分類部34は、運用データをモジュール5に入力することにより、運用データが示す数字が5である確率を示す分類結果を得る。分類部34は、確率が高い方の分類結果を最終的な分類結果として出力する。例えば、分類部34は、モジュール3の分類結果が90%、モジュール5の分類結果が10%の場合、運用データが示す数字は「3」であるとする分類結果を出力する。
 機械学習装置10は、例えば図9に示すコンピュータ50で実現されてよい。コンピュータ50は、CPU(Central Processing Unit)51と、一時記憶領域としてのメモリ52と、不揮発性の記憶部53とを備える。また、コンピュータ50は、入力部、表示部等の入出力装置54と、記憶媒体59に対するデータの読み込み及び書き込みを制御するR/W(Read/Write)部55とを備える。また、コンピュータ50は、インターネット等のネットワークに接続される通信I/F(Interface)56を備える。CPU51、メモリ52、記憶部53、入出力装置54、R/W部55、及び通信I/F56は、バス57を介して互いに接続される。
 記憶部53は、HDD(Hard Disk Drive)、SSD(Solid State Drive)、フラッシュメモリ等によって実現してよい。記憶媒体としての記憶部53には、コンピュータ50を、機械学習装置10として機能させるための機械学習プログラム60が記憶される。機械学習プログラム60は、Nクラス分類器生成プロセス62と、第1マスク生成プロセス64と、第2マスク生成プロセス66とを有する。また、記憶部53は、Nクラス分類器22及びマスク集合24の各々を構成する情報が記憶される情報記憶領域70を有する。
 CPU51は、機械学習プログラム60を記憶部53から読み出してメモリ52に展開し、機械学習プログラム60が有するプロセスを順次実行する。CPU51は、Nクラス分類器生成プロセス62を実行することで、図1に示すNクラス分類器生成部12として動作する。また、CPU51は、第1マスク生成プロセス64を実行することで、図1に示す第1マスク生成部14として動作する。また、CPU51は、第2マスク生成プロセス66を実行することで、図1に示す第2マスク生成部16として動作する。また、CPU51は、情報記憶領域70から情報を読み出して、Nクラス分類器22及びマスク集合24の各々をメモリ52に展開する。これにより、機械学習プログラム60を実行したコンピュータ50が、機械学習装置10として機能することになる。なお、プログラムを実行するCPU51はハードウェアである。
 分類装置30は、例えば図10に示すコンピュータ80で実現されてよい。コンピュータ80は、CPU81と、一時記憶領域としてのメモリ82と、不揮発性の記憶部83とを備える。また、コンピュータ80は、入力部、表示部等の入出力装置84と、記憶媒体89に対するデータの読み込み及び書き込みを制御するR/W部85と、通信I/F86とを備える。CPU81、メモリ82、記憶部83、入出力装置84、R/W部85、及び通信I/F86は、バス87を介して互いに接続される。
 記憶部83は、HDD、SSD、フラッシュメモリ等によって実現してよい。記憶媒体としての記憶部83には、コンピュータ80を、分類装置30として機能させるための分類プログラム90が記憶される。分類プログラム90は、特定クラス分類器生成プロセス92と、分類プロセス94とを有する。また、記憶部83は、特定クラス分類器42を構成する情報が記憶される情報記憶領域100を有する。
 CPU81は、分類プログラム90を記憶部83から読み出してメモリ82に展開し、分類プログラム90が有するプロセスを順次実行する。CPU81は、特定クラス分類器生成プロセス92を実行することで、図7に示す特定クラス分類器生成部32として動作する。また、CPU81は、分類プロセス94を実行することで、図7に示す分類部34として動作する。また、CPU81は、情報記憶領域100から情報を読み出して、特定クラス分類器42をメモリ82に展開する。これにより、分類プログラム90を実行したコンピュータ80が、分類装置30として機能することになる。なお、プログラムを実行するCPU81はハードウェアである。
 なお、機械学習プログラム60及び分類プログラム90の各々により実現される機能は、例えば半導体集積回路、より詳しくはASIC(Application Specific Integrated Circuit)等で実現することも可能である。
 次に、本実施形態に係る機械学習システムの作用について説明する。機械学習装置10に訓練データが入力され、モジュール化のためのマスクの生成が指示されると、機械学習装置10において、図11に示す機械学習処理が実行される。また、分類装置30にタスク情報及び運用データが入力され、運用データの分類が指示されると、分類装置30において、図12に示す分類処理が実行される。以下、機械学習処理及び分類処理の各々について説明する。なお、機械学習処理及び分類処理は、開示の技術の機械学習方法の一例である。
 まず、図11を参照して、機械学習処理について説明する。
 ステップS10で、Nクラス分類器生成部12が、機械学習装置10に入力された訓練データを取得する。次に、ステップS12で、Nクラス分類器生成部12が、取得した訓練データを用いた機械学習により、Nクラス分類器22を生成する。
 次に、ステップS14で、第1マスク生成部14が、Nクラス分類器22のエッジの各々に対応したスコアを要素とするスコア行列を用意する。また、第1マスク生成部14が、取得した訓練データの正解ラベルyを、特定のクラスについては正例、それ以外のクラスについては負例とする。そして、第1マスク生成部14が、スコア行列において、スコアが高い順に上位k%の要素を1、その他の要素を0としたマスクをNクラス分類器22に適用した部分に対して、訓練データを入力して順方向に伝播させ、分類結果y^を得る。さらに、第1マスク生成部14が、分類結果y^が正解ラベルyに近づくように、誤差逆伝播法によりスコア行列の各スコアを更新し、機械学習が終了した際のスコア行列からベースマスクを生成する。
 次に、ステップS16で、上記ステップS14と同様に、第2マスク生成部16が、特定のクラス以外のクラスを分類するための訓練対象モジュールの各々を生成するための訓練対象マスクを生成する。この際、第2マスク生成部16は、スコア行列がベースマスクのスコア行列と類似するように、訓練対象マスクの各々を生成する。次に、ステップS18で、第1マスク生成部14及び第2マスク生成部16の各々が、生成したマスクをマスク集合24として記憶し、機械学習処理は終了する。
 次に、図12を参照して、分類処理について説明する。
 ステップS20で、特定クラス分類器生成部32が、タスクに応じたモジュールを指定する情報が含まれるタスク情報を取得する。次に、ステップS22で、特定クラス分類器生成部32が、タスク情報で指定されたモジュールに対応するマスクをマスク集合24から取得する。また、特定クラス分類器生成部32が、Nクラス分類器22から、取得したマスクの各々に対応する部分の和集合部分を切り出し、取得したマスクと共に、特定クラス分類器42として記憶する。
 次に、ステップS24で、分類部34が、分類装置30に入力された運用データを取得する。次に、ステップS26で、分類部34が、特定クラス分類器42に含まれるマスクの各々を和集合部分に適用して、タスクに応じたクラスの各々を分類するためのモジュールの各々を生成する。そして、分類部34が、各モジュールに運用データを入力して分類結果を得て、分類結果の各々を統合して、最終的な分類結果を決定し、出力する。そして、分類処理は終了する。
 以上説明したように、本実施形態に係る機械学習システムによれば、機械学習装置が、Nクラス分類器と、Nクラスのうちの第1のクラスを正解ラベルに含む訓練データとに基づいて、ベースモジュールを生成するための枝刈り処理に用いるベースマスクを生成する。ベースマスクは、Nクラス分類器のエッジの各々に対応したスコアを要素とするスコア行列をバイナリ化することにより生成される。また、機械学習装置が、Nクラス分類器と、Nクラスのうち第2のクラスを正解ラベルに含む訓練データと、ベースマスクに対応するスコア行列の値を含む損失関数とに基づいて、他のモジュールを生成するための枝刈り処理に用いるマスクを生成する。このように生成されたマスクをNクラス分類器に適用して各モジュールを生成することにより、モジュール間で同じパラメータを共有する割合が高まる。したがって、モジュールを結合して生成される分類器のパラメータ数を少なくすることができるという枝刈りの効果が薄まることを抑制することができる。
 図13を参照して、本実施形態におけるモジュール間でのパラメータの共有割合の実験結果の一例について説明する。この実験では、図8で説明したMNISTの例と同様に、10クラス分類器(オリジナルのNN)から、0~9の各クラスを分類するための10個のモジュールを生成した。なお、各モジュールは、オリジナルのNNの5%のパラメータ(各エッジの重み)数となるように枝切り処理を行うことにより生成した。図13に示す比較例1及び比較例2は、マスク作成のためのスコア行列の更新時に用いる損失関数に、モジュール間のスコア行列の差をペナルティとした正則化項を含まない手法である。また、比較例1は、スコア行列の初期値をモジュール間で共有しない場合、比較例2は、共有する場合である。また、本手法1及び本手法2は、上記実施形態のように、損失関数に、モジュール間のスコア行列の差をペナルティとした正則化項を含む手法である。また、本手法1では、正則化項に対するハイパーパラメータλをλ=1、本手法2では、λ=10とした。また、本手法1及び本手法2とも、スコア行列の初期値をモジュール間で共有した。
 また、図13において、「オリジナルのNNに対する結合時のパラメータ数の割合」は、オリジナルのNNのパラメータ数に対する、2つのモジュールを結合した場合のパラメータ数の割合である。また、この値は、10個のモジュールのうちの2つのモジュールの全組み合わせ45ペアの平均である。上述したように、各モジュールは、オリジナルのNNの5%のパラメータ数となるように生成されているため、この値は0.05~0.1となり、この値が小さいほど2つのモジュールが類似していることを表す。また、図13において、「共有パラメータの割合」は、結合する2つのモジュールで共有するパラメータ数の割合である。
 上述したように、モジュール同士が類似する場合は、モジュールを結合した場合のモデルのパラメータ数を削減することができるという効果がある。この効果を得るために、本手法とは異なり、スコア行列の初期値をモジュール間で共有させることも考えられる。しかし、図13に示すように、比較例1と比較例2とを比較すると、スコア行列の初期値をモジュール間で共有することにより、共有パラメータの割合が多少向上してはいる。これに対し、本手法1及び本手法2では、共有パラメータの割合が大きく向上している。すなわち、比較例1及び比較例2に比べ、本手法1及び本手法2は、よりモデルのデータ数を削減できる効果が高い。また、本手法2のように、損失関数に含まれる正則化項の影響をより大きくした場合には、その効果がより顕著になっている。
 なお、上記実施形態では、1クラス単位でモジュール化する例について説明したが、これに限定されない。例えば、10クラス分類器から、2クラスを分類するためのモジュールや、3クラスを分類するためのモジュールを生成するなど、元の機械学習モデルで分類可能な複数のクラスの一部を分類可能な部分ネットワークをモジュール化するものであればよい。
 また、上記実施形態では、機械学習装置と分類装置とをそれぞれ別のコンピュータで実現する場合について説明したが、機械学習装置と分類装置とを1つのコンピュータで実現してもよい。
 また、上記実施形態では、機械学習プログラム及び分類プログラムの各々が記憶部に予め記憶(インストール)されている態様を説明したが、これに限定されない。開示の技術に係るプログラムは、CD-ROM、DVD-ROM、USBメモリ等の記憶媒体に記憶された形態で提供することも可能である。
10   機械学習装置
12   Nクラス分類器生成部
14   第1マスク生成部
16   第2マスク生成部
22   Nクラス分類器
24   マスク集合
30   分類装置
32   特定クラス分類器生成部
34   分類部
42   特定クラス分類器
50、80    コンピュータ
51、81    CPU
52、82    メモリ
53、83    記憶部
59、89    記憶媒体
60   機械学習プログラム
90   分類プログラム

Claims (20)

  1.  複数のクラスへ分類する機械学習モデルのパラメータと、前記複数のクラスのうち第1のクラスを正解ラベルに含む訓練データとに基づいて、前記機械学習モデルに第1の枝刈り処理を実行することによって前記第1のクラスを分類する第1の機械学習モデルを生成するための前記第1の枝刈り処理に関するパラメータを生成し、
     前記機械学習モデルのパラメータと、前記複数のクラスのうち第2のクラスを正解ラベルに含む訓練データと、前記第1の枝刈り処理に関するパラメータを含む損失関数とに基づいて、前記機械学習モデルに第2の枝刈り処理を実行することによって前記第2のクラスを分類する第2の機械学習モデルを生成するための前記第2の枝刈り処理に関するパラメータを生成する、
     処理をコンピュータに実行させることを特徴とする機械学習プログラム。
  2.  前記第2の枝刈り処理に関するパラメータを生成する処理は、前記第2の機械学習モデルによる前記第2のクラスの分類結果と前記正解ラベルとの差を表す項と、前記第1の枝刈り処理に関するパラメータと前記第2の枝刈り処理に関するパラメータとの差を表す項とを含む前記損失関数を最小化することを含む、
     請求項1に記載の機械学習プログラム。
  3.  前記機械学習モデルはニューラルネットワークであり、
     前記第1の枝刈り処理に関するパラメータは、前記複数のクラスへ分類する機械学習モデルに含まれるエッジの各々に対応し、前記第1の機械学習モデルのエッジとして残す適正度が高いエッジほど大きくなるスコアであり、
     前記第2の枝刈り処理に関するパラメータは、前記複数のクラスへ分類する機械学習モデルに含まれるエッジの各々に対応し、前記第2の機械学習モデルのエッジとして残す適正度が高いエッジほど大きくなるスコアである、
     ことを特徴とする請求項1又は請求項2に記載の機械学習プログラム。
  4.  前記複数のクラスへ分類する機械学習モデルに含まれるエッジのうち、対応する前記第1の枝刈り処理に関するパラメータが大きい順に上位所定割合の数のエッジ、又は対応する前記第1の枝刈り処理に関するパラメータが所定値以上のエッジを、前記第1の機械学習モデルに残すことを表す第1のマスクを生成し、
     前記複数のクラスへ分類する機械学習モデルに含まれるエッジのうち、対応する前記第2の枝刈り処理に関するパラメータが大きい順に上位所定割合の数のエッジ、又は対応する前記第2の枝刈り処理に関するパラメータが所定値以上のエッジを、前記第2の機械学習モデルに残すことを表す第2のマスクを生成する、
     処理を前記コンピュータに実行させることを特徴とする請求項3に記載の機械学習プログラム。
  5.  前記第1のマスク及び前記第2のマスクから選択された1以上のマスクの和集合に対応する前記複数のクラスへ分類する機械学習モデルの部分に、前記選択された1以上のマスクの各々を適用することにより、前記選択された1以上のマスクに対応するクラスを分類する第3の機械学習モデルを生成する、
     処理を前記コンピュータに実行させることを特徴とする請求項4に記載の機械学習プログラム。
  6.  分類されるクラスが未知のデータを前記第3の機械学習モデルに入力し、前記データを前記選択された1以上のマスクに対応するクラスに分類する、
     処理を前記コンピュータに実行させることを特徴とする請求項5に記載の機械学習プログラム。
  7.  複数のクラスへ分類する機械学習モデルのパラメータと、前記複数のクラスのうち第1のクラスを正解ラベルに含む訓練データとに基づいて、前記機械学習モデルに第1の枝刈り処理を実行することによって前記第1のクラスを分類する第1の機械学習モデルを生成するための前記第1の枝刈り処理に関するパラメータを生成し、
     前記機械学習モデルのパラメータと、前記複数のクラスのうち第2のクラスを正解ラベルに含む訓練データと、前記第1の枝刈り処理に関するパラメータを含む損失関数とに基づいて、前記機械学習モデルに第2の枝刈り処理を実行することによって前記第2のクラスを分類する第2の機械学習モデルを生成するための前記第2の枝刈り処理に関するパラメータを生成する、
     処理を実行する制御部を含むことを特徴とする機械学習装置。
  8.  前記第2の枝刈り処理に関するパラメータを生成する処理は、前記第2の機械学習モデルによる前記第2のクラスの分類結果と前記正解ラベルとの差を表す項と、前記第1の枝刈り処理に関するパラメータと前記第2の枝刈り処理に関するパラメータとの差を表す項とを含む前記損失関数を最小化することを含む、
     請求項7に記載の機械学習装置。
  9.  前記機械学習モデルはニューラルネットワークであり、
     前記第1の枝刈り処理に関するパラメータは、前記複数のクラスへ分類する機械学習モデルに含まれるエッジの各々に対応し、前記第1の機械学習モデルのエッジとして残す適正度が高いエッジほど大きくなるスコアであり、
     前記第2の枝刈り処理に関するパラメータは、前記複数のクラスへ分類する機械学習モデルに含まれるエッジの各々に対応し、前記第2の機械学習モデルのエッジとして残す適正度が高いエッジほど大きくなるスコアである、
     ことを特徴とする請求項7又は請求項8に記載の機械学習装置。
  10.  前記制御部は、
     前記複数のクラスへ分類する機械学習モデルに含まれるエッジのうち、対応する前記第1の枝刈り処理に関するパラメータが大きい順に上位所定割合の数のエッジ、又は対応する前記第1の枝刈り処理に関するパラメータが所定値以上のエッジを、前記第1の機械学習モデルに残すことを表す第1のマスクを生成し、
     前記複数のクラスへ分類する機械学習モデルに含まれるエッジのうち、対応する前記第2の枝刈り処理に関するパラメータが大きい順に上位所定割合の数のエッジ、又は対応する前記第2の枝刈り処理に関するパラメータが所定値以上のエッジを、前記第2の機械学習モデルに残すことを表す第2のマスクを生成する、
     処理をさらに実行することを特徴とする請求項9に記載の機械学習装置。
  11.  前記制御部は、前記第1のマスク及び前記第2のマスクから選択された1以上のマスクの和集合に対応する前記複数のクラスへ分類する機械学習モデルの部分に、前記選択された1以上のマスクの各々を適用することにより、前記選択された1以上のマスクに対応するクラスを分類する第3の機械学習モデルを生成する、
     処理をさらに実行することを特徴とする請求項10に記載の機械学習装置。
  12.  前記制御部は、分類されるクラスが未知のデータを前記第3の機械学習モデルに入力し、前記データを前記選択された1以上のマスクに対応するクラスに分類する、
     処理をさらに実行することを特徴とする請求項11に記載の機械学習装置。
  13.  複数のクラスへ分類する機械学習モデルのパラメータと、前記複数のクラスのうち第1のクラスを正解ラベルに含む訓練データとに基づいて、前記機械学習モデルに第1の枝刈り処理を実行することによって前記第1のクラスを分類する第1の機械学習モデルを生成するための前記第1の枝刈り処理に関するパラメータを生成し、
     前記機械学習モデルのパラメータと、前記複数のクラスのうち第2のクラスを正解ラベルに含む訓練データと、前記第1の枝刈り処理に関するパラメータを含む損失関数とに基づいて、前記機械学習モデルに第2の枝刈り処理を実行することによって前記第2のクラスを分類する第2の機械学習モデルを生成するための前記第2の枝刈り処理に関するパラメータを生成する、
     処理をコンピュータが実行することを特徴とする機械学習方法。
  14.  前記第2の枝刈り処理に関するパラメータを生成する処理は、前記第2の機械学習モデルによる前記第2のクラスの分類結果と前記正解ラベルとの差を表す項と、前記第1の枝刈り処理に関するパラメータと前記第2の枝刈り処理に関するパラメータとの差を表す項とを含む前記損失関数を最小化することを含む、
     請求項13に記載の機械学習方法。
  15.  前記機械学習モデルはニューラルネットワークであり、
     前記第1の枝刈り処理に関するパラメータは、前記複数のクラスへ分類する機械学習モデルに含まれるエッジの各々に対応し、前記第1の機械学習モデルのエッジとして残す適正度が高いエッジほど大きくなるスコアであり、
     前記第2の枝刈り処理に関するパラメータは、前記複数のクラスへ分類する機械学習モデルに含まれるエッジの各々に対応し、前記第2の機械学習モデルのエッジとして残す適正度が高いエッジほど大きくなるスコアである、
     ことを特徴とする請求項13又は請求項14に記載の機械学習方法。
  16.  前記複数のクラスへ分類する機械学習モデルに含まれるエッジのうち、対応する前記第1の枝刈り処理に関するパラメータが大きい順に上位所定割合の数のエッジ、又は対応する前記第1の枝刈り処理に関するパラメータが所定値以上のエッジを、前記第1の機械学習モデルに残すことを表す第1のマスクを生成し、
     前記複数のクラスへ分類する機械学習モデルに含まれるエッジのうち、対応する前記第2の枝刈り処理に関するパラメータが大きい順に上位所定割合の数のエッジ、又は対応する前記第2の枝刈り処理に関するパラメータが所定値以上のエッジを、前記第2の機械学習モデルに残すことを表す第2のマスクを生成する、
     処理を前記コンピュータが実行することを特徴とする請求項15に記載の機械学習方法。
  17.  前記第1のマスク及び前記第2のマスクから選択された1以上のマスクの和集合に対応する前記複数のクラスへ分類する機械学習モデルの部分に、前記選択された1以上のマスクの各々を適用することにより、前記選択された1以上のマスクに対応するクラスを分類する第3の機械学習モデルを生成する、
     処理を前記コンピュータが実行することを特徴とする請求項16に記載の機械学習方法。
  18.  分類されるクラスが未知のデータを前記第3の機械学習モデルに入力し、前記データを前記選択された1以上のマスクに対応するクラスに分類する、
     処理を前記コンピュータが実行することを特徴とする請求項17に記載の機械学習方法。
  19.  複数のクラスへ分類する機械学習モデルのパラメータと、前記複数のクラスのうち第1のクラスを正解ラベルに含む訓練データとに基づいて、前記機械学習モデルに第1の枝刈り処理を実行することによって前記第1のクラスを分類する第1の機械学習モデルを生成するための前記第1の枝刈り処理に関するパラメータを生成し、
     前記機械学習モデルのパラメータと、前記複数のクラスのうち第2のクラスを正解ラベルに含む訓練データと、前記第1の枝刈り処理に関するパラメータを含む損失関数とに基づいて、前記機械学習モデルに第2の枝刈り処理を実行することによって前記第2のクラスを分類する第2の機械学習モデルを生成するための前記第2の枝刈り処理に関するパラメータを生成する、
     処理をコンピュータに実行させることを特徴とする機械学習プログラムを記憶した記憶媒体。
  20.  機械学習装置と分類装置とを含む機械学習システムであって、
     前記機械学習装置は、
      複数のクラスへ分類する機械学習モデルのパラメータと、前記複数のクラスのうち第1のクラスを正解ラベルに含む訓練データとに基づいて、前記機械学習モデルに第1の枝刈り処理を実行することによって前記第1のクラスを分類する第1の機械学習モデルを生成するための前記第1の枝刈り処理に関するパラメータを生成し、
      前記機械学習モデルのパラメータと、前記複数のクラスのうち第2のクラスを正解ラベルに含む訓練データと、前記第1の枝刈り処理に関するパラメータを含む損失関数とに基づいて、前記機械学習モデルに第2の枝刈り処理を実行することによって前記第2のクラスを分類する第2の機械学習モデルを生成するための前記第2の枝刈り処理に関するパラメータを生成し、
     処理を実行する第1の制御部を含み、
     前記分類装置は、
      前記第1の機械学習モデル及び前記第2の機械学習モデルから選択された1以上の機械学習モデルを結合し、前記選択された1以上の機械学習モデルに対応するクラスを分類する第3の機械学習モデルを生成し、
      分類されるクラスが未知のデータを前記第3の機械学習モデルに入力し、前記データを前記選択された1以上の機械学習モデルに対応するクラスに分類する、
     処理を実行する第2の制御部を含む、
     ことを特徴とする機械学習システム。
PCT/JP2021/019817 2021-05-25 2021-05-25 機械学習プログラム、装置、及び方法 Ceased WO2022249285A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2021/019817 WO2022249285A1 (ja) 2021-05-25 2021-05-25 機械学習プログラム、装置、及び方法
JP2023523763A JP7559942B2 (ja) 2021-05-25 2021-05-25 機械学習プログラム、装置、及び方法
US18/515,043 US20240086710A1 (en) 2021-05-25 2023-11-20 Computer-readable recording medium storing machine learning program, device, and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/019817 WO2022249285A1 (ja) 2021-05-25 2021-05-25 機械学習プログラム、装置、及び方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/515,043 Continuation US20240086710A1 (en) 2021-05-25 2023-11-20 Computer-readable recording medium storing machine learning program, device, and method

Publications (1)

Publication Number Publication Date
WO2022249285A1 true WO2022249285A1 (ja) 2022-12-01

Family

ID=84229755

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/019817 Ceased WO2022249285A1 (ja) 2021-05-25 2021-05-25 機械学習プログラム、装置、及び方法

Country Status (3)

Country Link
US (1) US20240086710A1 (ja)
JP (1) JP7559942B2 (ja)
WO (1) WO2022249285A1 (ja)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10832123B2 (en) 2016-08-12 2020-11-10 Xilinx Technology Beijing Limited Compression of deep neural networks with proper use of mask
JP7022714B2 (ja) 2019-03-26 2022-02-18 Kddi株式会社 クライアント装置、情報処理方法、及びプログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HU, XIAOLONG ET AL.: "DRNet: Dissect and Reconstruct the Convolutional Neural Network via Interpretable Manners.", ARXIV:1911.08691V2., 26 February 2020 (2020-02-26), pages 1 - 8, XP081608049, Retrieved from the Internet <URL:https://arxiv.org/abs/1911.08691v2> [retrieved on 20210719] *

Also Published As

Publication number Publication date
JPWO2022249285A1 (ja) 2022-12-01
US20240086710A1 (en) 2024-03-14
JP7559942B2 (ja) 2024-10-02

Similar Documents

Publication Publication Date Title
CN110892417B (zh) 具有学习教练的异步代理以及在不降低性能的情况下在结构上修改深度神经网络
US10909455B2 (en) Information processing apparatus using multi-layer neural network and method therefor
Zheng et al. Learning in energy-efficient neuromorphic computing: algorithm and architecture co-design
JP6928371B2 (ja) 分類器、分類器の学習方法、分類器における分類方法
CN119831828A (zh) 用于少样本无监督图像到图像转换的方法
CN112508186A (zh) 训练用于图像识别的神经网络的方法和神经网络设备
CN113222103B (zh) 神经网络的更新方法、分类方法和电子设备
CN108140142A (zh) 选择性反向传播
US20210224611A1 (en) Boosting ai identification learning
JPH04288662A (ja) ニュ−ラルネットワ−クシステムの学習方法
JP7073171B2 (ja) 学習装置、学習方法及びプログラム
Tirumala Implementation of evolutionary algorithms for deep architectures
Kariluoto et al. Quality of data in machine learning
CN107223260A (zh) 用于动态地更新分类器复杂度的方法
Foote The history of machine learning and its convergent trajectory towards AI
WO2019102984A1 (ja) 学習装置及び学習方法、識別装置及び識別方法、プログラム並びに記録媒体
CN111666991A (zh) 基于卷积神经网络的模式识别方法、装置和计算机设备
Siddiqui et al. FedNet: Federated implementation of neural networks for facial expression recognition
JP7559942B2 (ja) 機械学習プログラム、装置、及び方法
Tjandra et al. An Evolutionary Algorithm Design for Pauli-based Quantum Kernel Classification.
CN114676835A (zh) 基于模式的神经网络修剪
Varshney et al. Hybrid feature selection method for binary and multi-class high dimension data
JP7800305B2 (ja) 訓練データ生成プログラム、装置、及び方法
US20240104898A1 (en) Methods and apparatus for incremental learning using stored features
Banerjee et al. Handwritten Digit Pattern Recognition by Hybrid of Convolutional Neural Network (CNN) and Boosting Classifier

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21942940

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023523763

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21942940

Country of ref document: EP

Kind code of ref document: A1