WO2022123619A1 - 学習システム、学習方法、及びプログラム - Google Patents

学習システム、学習方法、及びプログラム Download PDF

Info

Publication number
WO2022123619A1
WO2022123619A1 PCT/JP2020/045416 JP2020045416W WO2022123619A1 WO 2022123619 A1 WO2022123619 A1 WO 2022123619A1 JP 2020045416 W JP2020045416 W JP 2020045416W WO 2022123619 A1 WO2022123619 A1 WO 2022123619A1
Authority
WO
WIPO (PCT)
Prior art keywords
loss
feature amount
image
learning model
learning
Prior art date
Application number
PCT/JP2020/045416
Other languages
English (en)
French (fr)
Inventor
永男 蔡
美廷 金
プリーサム プラキャッシャー
Original Assignee
楽天グループ株式会社
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 楽天グループ株式会社 filed Critical 楽天グループ株式会社
Priority to EP20938500.4A priority Critical patent/EP4040346A1/en
Priority to JP2021563294A priority patent/JP6995262B1/ja
Priority to CN202080041868.XA priority patent/CN114916238A/zh
Priority to PCT/JP2020/045416 priority patent/WO2022123619A1/ja
Priority to US17/616,674 priority patent/US20220398504A1/en
Priority to TW110145679A priority patent/TWI804090B/zh
Publication of WO2022123619A1 publication Critical patent/WO2022123619A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR 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

Definitions

  • This disclosure relates to learning systems, learning methods, and programs.
  • Non-Patent Document 1 describes a method called Few-Shot Object Detection that creates a learning model that can recognize data with an unknown label based on very little training data.
  • Non-Patent Document 1 targets single-label data, it cannot be applied to multi-label data. Therefore, in the conventional method, the accuracy of the learning model that can recognize the multi-label data cannot be improved unless more training data is prepared.
  • One of the purposes of this disclosure is to improve the accuracy of the learning model that can recognize multi-label data with a small amount of training data.
  • the learning system calculates the first loss based on the output of the training model and the target output when the multi-label query data is input to the training model.
  • Calculation means a feature amount acquisition means for acquiring the feature amount of the query data calculated based on the parameters of the learning model, and the feature amount of the support data corresponding to the query data, and the query data.
  • the parameter is adjusted based on the second calculation means for calculating the second loss, the first loss, and the second loss based on the feature amount of the above and the feature amount of the support data.
  • FIG. 1 is a diagram showing an example of the overall configuration of the learning system.
  • the learning system S includes a server 10, a creator terminal 20, and a learning terminal 30, which are connected to a network N such as the Internet or a LAN.
  • a network N such as the Internet or a LAN.
  • FIG. 1 shows one server 10, one creator terminal 20, and one learning terminal 30, there may be a plurality of these.
  • the server 10 is a server computer.
  • the server 10 includes a control unit 11, a storage unit 12, and a communication unit 13.
  • the control unit 11 includes at least one processor.
  • the storage unit 12 includes a volatile memory such as RAM and a non-volatile memory such as a hard disk.
  • the communication unit 13 includes at least one of a communication interface for wired communication and a communication interface for wireless communication.
  • the creator terminal 20 is a computer operated by the creator.
  • the creator is the person who creates the data to be input to the learning model.
  • an image will be described as an example of this data. Therefore, the portion described as an image in this embodiment can be read as data.
  • the data input to the learning model is not limited to images. Examples of other data will be described in the modified examples described later.
  • the creator terminal 20 is a personal computer, a smartphone, or a tablet terminal.
  • the creator terminal 20 includes a control unit 21, a storage unit 22, a communication unit 23, an operation unit 24, and a display unit 25.
  • the physical configurations of the control unit 21, the storage unit 22, and the communication unit 23 may be the same as those of the control unit 11, the storage unit 12, and the communication unit 13, respectively.
  • the operation unit 24 is an input device such as a mouse or a touch panel.
  • the display unit 25 is a liquid crystal display or an organic EL display.
  • the learning terminal 30 is a computer that executes learning of a learning model.
  • the learning terminal 30 is a personal computer, a smartphone, or a tablet terminal.
  • the learning terminal 30 includes a control unit 31, a storage unit 32, a communication unit 33, an operation unit 34, and a display unit 35.
  • the physical configurations of the control unit 31, the storage unit 32, the communication unit 33, the operation unit 34, and the display unit 35 are the same as those of the control unit 11, the storage unit 12, the communication unit 13, the operation unit 24, and the display unit 25, respectively. It may be there.
  • the programs and data described as being stored in the storage units 12, 22, and 32 may be supplied via the network N.
  • the hardware configurations of the server 10, the creator terminal 20, and the learning terminal 30 are not limited to the above examples, and various hardware can be applied.
  • a reading unit for example, an optical disk drive or a memory card slot
  • an input / output unit for example, a USB port
  • at least one of the programs and data stored in the information storage medium may be supplied via at least one of the reading unit and the input / output unit.
  • the processing of the learning system S will be described by taking as an example a case where an image of a product sold via a website is input to a learning model.
  • the creator is a clerk at a store that sells products.
  • the creator edits the photo of the product with the image editing software installed on the creator terminal 20 and creates an image to be posted on the website.
  • Image editing software synthesizes artificial objects with product photos. Objects are components of an image. The product that is the subject is also one of the objects. The object synthesized by the image editing software is an electronic image. For example, the creator synthesizes at least one of a digital text, a digital frame, and a color bar with a photograph of a product for the purpose of promoting the product.
  • Digital text is text synthesized by image editing software. Digital text is different from natural text. Natural text is the text contained in the product itself. In other words, natural text is the text contained in the unedited photo. For example, the natural text is a product name or brand name printed on the product.
  • the digital frame is a frame synthesized by image editing software.
  • a digital frame having 1 pixel and a digital frame having 2 pixels or more exists will be described, but the digital frame may have an arbitrary thickness.
  • Digital frames are different from natural frames.
  • the natural frame is a frame included in the product itself.
  • a natural frame is a frame contained in an unedited photo.
  • a natural frame is the edge of a box of goods.
  • the color bar is an image showing the color variation of the product.
  • the color bar includes each bar of a plurality of colors. For example, in the case of clothes having 10 color variations, the color bar includes 10 color bars.
  • FIG. 2 is a diagram showing an example of an image posted on a website.
  • a square thumbnail will be described as an example of an image.
  • Image I1 shows the natural frame NF20, which is the edge of the coffee box, and the natural text NT21 of the product name printed on the package.
  • Image I2 is not synthesized with digital text or the like.
  • a 1-pixel digital frame DF30 and a digital text DT31 are combined with the bag image.
  • the digital text DT40 is synthesized with respect to the image of the glove.
  • the digital text DT50 and the color bar CB51 composed of nine color bars are combined with the image of the clothes.
  • the image may be uploaded because the design is bad and the customer's purchasing motivation cannot be improved.
  • images that have a good design and enhance customers' purchasing motivation may be uploaded. For this reason, it is important to identify the edited content (artificially decorated part) applied to the image.
  • the learning terminal 30 creates a learning model that executes labeling of the edited content applied to the image.
  • the learning model is a model using machine learning.
  • Various methods can be used for machine learning itself, for example, a convolutional neural network or a recurrent neural network can be used.
  • the learning model of this embodiment is a supervised model or a semi-supervised model, but an unsupervised model may be used.
  • the learning model for labeling as in this embodiment is sometimes called a classification learner. Labeling is to label the input image. Labels are a classification of images. In this embodiment, the label means the edited content applied to the image. The following labels 0 to 6 will be described as an example of the label, but the label is not limited to the example of the present embodiment, and any label can be set.
  • Label 0 Image contains no edits, (Label 1) Image contains digital text, (Label 2) Image contains natural text, (Label 3) Image contains digital frames of 2 pixels or more. , (Label 4) image contains 1 pixel digital frame, (label 5) image contains natural frame, (label 6) image contains color bar. Note that label 0 does not correspond to any of labels 1 to 6.
  • the output of the training model contains seven binary values indicating whether the image belongs to each of labels 0-6.
  • the case where the output of the training model is expressed in a vector format is taken as an example, but the output of the training model may be in any format.
  • the output of the training model may be in array format, matrix format, or a single number.
  • the output of the learning model may be a numerical value of 0 to 6 indicating the label to which the image belongs, instead of the above seven values. In this case, if the image belongs to the label 2 and the label 5, the output of the learning model is a combination of the numerical values of 2 and 5.
  • the value of a certain label is 0, it means that it does not belong to that label.
  • a label with a value of 1 means that it belongs to that label.
  • the output of the training model is [0,1,0,0,1,0,0], it means that the image belongs to label 1 and label 4.
  • the output of the learning model does not have to be a binary of 0 or 1, and an intermediate value may exist.
  • the median value indicates the probability (probability) of belonging to the label. For example, if the value of a label is 0.9, it means that the probability of belonging to that label is 90%.
  • the image database DB contains a mixture of single-label images and multi-label images.
  • a single label means that the image belongs to only one label.
  • the image I4 is a single label image.
  • Multi-label means that an image belongs to a plurality of labels.
  • the images I1, I2, I4, and I5 are multi-label images.
  • the image does not belong to both labels 0 and labels 1-6, but the image may belong to any combination of labels 1-6. Therefore, depending on the image, it may belong to three or more of labels 1 to 6.
  • the first reason is that the majority of the images stored in the image database DB are not only popular products but also less popular products. Such a distribution is called the long tail distribution.
  • a population with a long tail distribution has a wide variety of images. Therefore, even if a large number of training data are prepared, it is difficult for the learning model to recognize the features of the image because the training data has a wide variety of patterns as the shape of the product.
  • the second reason is that the image stored in the image database DB occupies most of the appearance of the product, and the part such as digital text is not conspicuous like fine particles. Therefore, it is difficult for the learning model to recognize features such as digital text. Multi-label images are even more difficult because they need to recognize a number of inconspicuous features such as fine particles. Such a problem can also be called a fine-grained multi-label classification problem. Further, in an image such as the present embodiment, it is difficult to distinguish between a digital text and a natural text, and it is also difficult to distinguish between a digital frame and a natural frame.
  • the learning system S of the present embodiment creates a learning model that can support multi-label by applying Few-Shot learning based on the approach of contrastive learning.
  • Few-Shot learning based on the approach of contrastive learning.
  • FIG. 3 is a functional block diagram showing an example of the function of the learning system S.
  • the functions of the server 10 and the learning terminal 30 will be described, and the functions of the creator terminal 20 will be omitted.
  • the creator terminal 20 may include a function of editing an image based on the operation of the creator and a function of uploading the edited image.
  • the data storage unit 100 is realized.
  • the data storage unit 100 is mainly realized by the storage unit 12.
  • the data storage unit 100 stores data necessary for learning the learning model.
  • the data storage unit 100 stores an image database DB.
  • the image database DB stores images uploaded by each of the plurality of creators.
  • the image database DB also stores an image (an image belonging to label 0) that is only trimmed to a predetermined size and is not artificially decorated.
  • the format for example, size, resolution, number of color bits, extension
  • the image database DB has an arbitrary format.
  • the image of may be stored.
  • the image stored in the image database DB is labeled by the user of the learning terminal 30 after being downloaded to the learning terminal 30, but the image with the label is stored in the image database DB. You may.
  • FIG. 4 is a diagram showing an example of an overall image of the functions of the learning terminal 30.
  • a data storage unit 300 a data acquisition unit 301, a first calculation unit 302, a feature amount acquisition unit 303, a second calculation unit 304, and an adjustment unit 305 are realized.
  • the data storage unit 300 is mainly realized as a storage unit 32, and each of the data acquisition unit 301, the first calculation unit 302, the feature amount acquisition unit 303, the second calculation unit 304, and the adjustment unit 305 mainly includes the control unit 31. It will be realized.
  • the data storage unit 300 stores data necessary for learning the learning models M1 and M2. When the learning model M1 and the learning model M2 are not distinguished in the following description, they are simply described as the learning model M.
  • the data storage unit 300 stores a data set DS for learning. Each of the plurality of images with the correct label is stored in the data set DS.
  • FIG. 5 is a diagram showing an example of the data set DS.
  • the data set DS stores a large number of pairs of images and labels that are correct answers. This pair is used to adjust the parameters of the learning model M. This pair is sometimes referred to as training data, teacher data, or correct answer data.
  • the label that is the correct answer includes a value indicating whether or not the label belongs to each of the labels 0 to 6. That is, the label that is the correct answer is the target output (content that the learning model M should output).
  • the case where a part of the images in the image database DB is stored in the data set DS will be described, but all the images in the image database DB may be stored in the data set DS.
  • the user of the learning terminal 30 accesses the server 10 and downloads a part of the images in the image database DB.
  • the user displays the downloaded image on the display unit 35, assigns a label to be the correct answer, and creates a data set DS.
  • FIG. 6 is a diagram showing an example of the distribution of individual labels.
  • the vertical axis of FIG. 6 indicates each of labels 0 to 6, and the horizontal axis indicates the total number of images (number of samples) for each label.
  • the total number of images of label 1 and label 4 is incremented by 1 due to this one image.
  • the image of the label 1 is extremely large, and the image of the label 5 is extremely small.
  • the distribution in FIG. 6 is a long tail distribution because the total number of images is not even and unbalanced.
  • FIG. 7 is a diagram showing an example of the distribution of individual classes.
  • a class is a concept similar to a label in the sense of some sort of classification, but the classification problem and the label classification problem are different.
  • the classification problem is such that there is no overlap between the subsets and the population always belongs to any one subset.
  • the label classification problem assumes that there are overlaps between subsets and that they do not belong to any subset.
  • At least one label corresponds to the class. Images belong to one of the classes, not the other.
  • a multi-label image belongs to one label and another, but not to one class and another. Assuming that there are 41 combinations of labels in a population of randomly sampled images, there are 41 classes in this population.
  • the distribution in FIG. 7 is a long tail distribution because the total number of images is not even and unbalanced, similar to the distribution in FIG.
  • FIGS. 6 and 7 for the convenience of explaining the long tail distribution, a case where a label is attached to about 40,000 to 50,000 images is taken as an example, but the user assigns the label.
  • the number of images may be less than this.
  • the user may randomly sample several to several thousand images and label them with the correct answer.
  • the method of attaching the correct label to the image is not limited to the above example, and any method can be used.
  • the user may label the image with the correct answer by using a known clustering technique.
  • the user may give a correct label to the image by using the learning model M in which the single-label image is trained.
  • the data storage unit 300 stores not only the data set DS but also the learning model M (actual data of the learning model M).
  • the learning model M includes a program, parameters, and so on.
  • the format itself of the program and the parameter of the learning model M various formats used in machine learning can be used.
  • the program of the learning model M includes code that defines the processing (convolution, calculation of embedded vector, pooling, etc.) in each of the plurality of layers.
  • the parameters of the learning model M include a weighting factor and a bias.
  • the parameters of the learning model M are referenced by the program of the learning model M.
  • the data storage unit 300 stores the learning model M1 for the query image x Q and the learning model M2 for the support image x S.
  • the learning model M1 is an example of the first learning model.
  • the learning model M2 is an example of the second learning model.
  • the query image x Q is input to the learning model M1.
  • the support image x S is input to the second learning model M2. Details of the query image x Q and the support image x S will be described later.
  • the parameters of the learning model M1 and the parameters of the learning model M2 are shared. That is, the parameters of the learning model M1 and the parameters of the learning model M2 are the same.
  • the program of the learning model M1 and the program of the learning model M2 are the same, and the internal structure such as layers is also the same. That is, either one of the learning model M1 and the learning model M2 is a copy of the other.
  • the data stored in the data storage unit 300 is not limited to the above example.
  • the data storage unit 300 may store data necessary for learning the learning model M.
  • the data storage unit 300 may divide the data set DS into three, a training data set, a verification data set, and a test data set, and store the data set DS.
  • the data storage unit 300 may store the same database as the image database DB.
  • the data acquisition unit 301 acquires an image used in the learning of the learning model M.
  • the data acquisition unit 301 acquires the query image x Q and the support image x S from the image group having the long tail distribution in the multi-label.
  • the data acquisition unit 301 may acquire the query image x Q and the support image x S from the image group that does not have the long tail distribution.
  • An image group is a collection of multiple images.
  • this image group is stored in an image database DB having a long tail distribution. If the number of samples of the data set DS exists to a certain extent, the data set DS may also have a long tail distribution, so that even if a collection of a plurality of images stored in the data set DS corresponds to the above image group. good.
  • the long tail distribution is a distribution as referred to FIGS. 6 and 7.
  • the definition of the long tail distribution itself may follow the general definition. For example, if the difference between the total number of images with the most labels or classes and the total number of images with the least labels or classes is greater than or equal to the threshold value, it is a long tail distribution. Further, for example, the total value of the total number of images of the upper a (a is an integer of 2 or more) labels or classes and the total value of the total number of images of the lower b labels or classes (b is an integer of 2 or more). If the difference between, is greater than or equal to the threshold value, it is a long tail distribution.
  • the learning model M of the present embodiment is a model that recognizes an object included in an image
  • a multi-label query image x Q will be described as an example of query data.
  • the support data there is a support image x S corresponding to the query image x Q.
  • Each of the query image x Q and the support image x S is an image used in Few-shot learning.
  • the query image x Q is an image of a new class that is not trained by the training model M.
  • the query image x Q is sometimes called a test image.
  • the support image x S is an image of the same class as the query image x Q or a different class from the query image x Q. For example, if a general class is trained by the training model M using a training data set for general object recognition, a class to be trained using the query image x Q and the support image x S. Is not learned by the learning model M in principle.
  • the data acquisition unit 301 randomly samples and acquires an image group stored in the image database DB, and stores a pair including each image and a label that is a correct answer in the data set DS. As shown in FIG. 4, the data acquisition unit 301 randomly samples the image group stored in the data set DS to acquire the query image x Q and the support image x S.
  • the data acquisition unit 301 randomly acquires the query image x Q and the support image x S from the data set DS for each episode.
  • An episode is a series of processes in Few-shot learning. In Few-shot learning, many episodes are repeated. For example, for each episode, there is an image set of at least one query image x Q and at least one support image x S.
  • N means the number of classes per episode.
  • K means the number of images per episode.
  • N and K are natural numbers.
  • N the smaller N is, the higher the accuracy of the learning model M is, and the higher K is, the higher the accuracy of the learning model M is.
  • N 1 and K is 5 (that is, in the case of 1-Way 5-shot) will be described, but N and K may be arbitrary values.
  • the case where there are episodes corresponding to some combinations among the combinations of labels that can be considered in the multi-label will be described, but all the episodes may exist.
  • a case where there are 15 episodes corresponding to each of the 15 classes shown in FIG. 7 will be described as an example.
  • the number of episodes is not limited to 15, and may be any number.
  • the case where the classes do not overlap between episodes will be described, but the classes may overlap between episodes.
  • FIG. 8 is a diagram showing an example of a query image x Q and a support image x S included in each episode. As shown in FIG. 8, for each of episodes 1 to 15, there is an image set of one query image x Q and five support images x S.
  • the number of query images x Q may be two or more. Further, the number of query images x Q and the number of support images x S may be the same. That is, there may be five query images x Q for each episode.
  • episode 1 is an episode for learning an image of a class having the largest total number of images in the distribution of FIG. 7 (a class having only label 1).
  • the data acquisition unit 301 randomly samples six images of this class (images with labels [0,1,0,0,0,0,0]) from the data set DS.
  • the data acquisition unit 301 uses one of the six images as the query image x Q and the remaining five images as the support image x S.
  • episode 2 is an episode for learning an image of a class (class of label 1 and label 2) having the second largest total number of images.
  • the data acquisition unit 301 randomly samples six images of this class (images with labels [0,1,1,0,0,0]) from the data set DS.
  • the data acquisition unit 301 uses one of the six images as the query image x Q and the remaining five images as the support image x S.
  • the data acquisition unit 301 randomly samples 6 images of the class corresponding to the episode for each episode and acquires them as query images x Q and sample images. That is, the data acquisition unit 301 acquires six images of the class corresponding to the episode as an image set of the query image x Q and the support image x S of a certain episode.
  • one episode includes each support image x S of a plurality of classes.
  • one episode may contain only the query images x Q of any one of the plurality of classes, or may include a plurality of query images x Q corresponding to each of the plurality of classes. May be good. Even when the value of N is 2 or more, the query image x Q is not limited to one.
  • the number of episodes may be specified by the user or may be automatically determined from the statistical values in the image database DB or the data set DS.
  • a user may specify a class to be trained by the learning model M, and episodes may be set according to the number of classes.
  • a class in which the total number of images is equal to or greater than a threshold value may be automatically specified, and episodes may be set according to the number.
  • the data acquisition unit 301 may acquire the number of images according to the episode.
  • the first calculation unit 302 calculates the first loss LBCE based on the output of the learning model M1 and the target output when the multi-label query image x Q is input to the learning model M1. .. That is, the first calculation unit 302 calculates the first loss LBCE based on the parameters of the learning model M1.
  • the output of the learning model M1 is the actual output obtained from the learning model M1.
  • the target output is the content that the learning model M1 should output.
  • the correct label stored in the dataset DS corresponds to the target output.
  • the first loss LBCE indicates an error (difference) between the output of the learning model M1 and the target output.
  • the first loss LBCE is an index capable of measuring the accuracy of the learning model M1.
  • a high first loss LBCE means that the error is large and the accuracy is low.
  • a low first loss LBCE means that the error is small and the accuracy is high.
  • the first loss LBCE can be calculated by using an arbitrary method.
  • the first loss LBCE may be any one that can be calculated based on a predetermined loss function.
  • the set of individual query images x Q included in a certain episode will be referred to as uppercase X Q.
  • the set X Q of the query image x Q of a certain episode is composed of one query image x Q.
  • N 1 in the N-Way K-shot
  • the query image is described as x Qi .
  • i is a natural number less than or equal to N. i ⁇ ⁇ 1, ..., N ⁇ , and x Q i ⁇ X Q.
  • the first calculation unit 302 inputs the query image x Q of a certain episode into the learning model M1.
  • This learning model M1 is a model before parameter adjustment is performed by the adjustment unit 305 described later, and may be, for example, a trained model called ResNet50. That is, the learning model M1 may not be an object such as a digital text to be recognized in the present embodiment, but may be a model in which the characteristics of a general object are learned.
  • the embedding function f (x) calculates the embedding vector f (x Q ) of the query image x Q.
  • x of f (x) means an arbitrary image.
  • the embedded function f (x) may be a part of the program of the learning model M1 or may be an external program called by the learning model M1.
  • the embedded vector is acquired by the feature amount acquisition unit 303, which will be described later.
  • the following equations 1 and 2 are examples of the loss function, and any function can be used as the loss function itself. If a loss other than the multi-label cross-entropy loss is to be used, a loss function corresponding to the loss may be used.
  • Y Q n in Equation 2 is each binary label of the query image x Q , and y Q n ⁇ y Q.
  • yQ is a combination of labels corresponding to each input. The smaller the error between the actual output corresponding to the query image x Q and the target output of the query image x Q , the smaller the first loss LBCE , and the larger this error, the larger the first loss LBCE. Become.
  • the learning model M of the present embodiment can recognize three or more labels, and there is an image set including a query image x Q and a support image x S for each combination of labels (that is, for each episode). Since there are three or more labels, there are two or more combinations of labels.
  • the first calculation unit 302 calculates the first loss LBCE for each combination of labels (that is, for each episode) based on the query image x Q corresponding to the combination.
  • the calculation method of the first loss LBCE of each episode is as described above. Since there are 15 episodes in this embodiment, the first calculation unit 302 calculates the first loss LBCE corresponding to each of the 15 episodes.
  • the last layer of the model in which labels other than the plurality of labels to be recognized are learned is replaced with the layer corresponding to the plurality of labels.
  • the last layer is the output layer.
  • the last layer of the learning model M in which the shape of a general object is learned using ResNet 50 is a layer corresponding to multi-label (in this embodiment, seven values of labels 0 to 6). Is replaced by the layer that outputs).
  • the first calculation unit 302 calculates the first loss LBCE based on the output of the learning model M replaced by the layer corresponding to the plurality of labels and the target output.
  • the feature amount acquisition unit 303 acquires the feature amount of the query image x Q calculated based on the parameters of the learning model M and the feature amount of the support image x S corresponding to the query image x Q.
  • This parameter is the current parameter of the learning model M. That is, this parameter is a parameter before adjustment by the adjustment unit 305 described later. If the pre-learning is performed using ResNet50 or the like, the feature amount is acquired based on the parameters after the pre-learning.
  • the feature amount is information indicating the feature of the image.
  • the case where the embedded vector corresponds to the feature amount will be described. Therefore, the portion described as the embedded vector in this embodiment can be read as a feature amount.
  • the feature quantity can be expressed in any format and is not limited to the vector format. Features may be expressed in other formats such as array format, matrix format, or a single number.
  • learning models M1 and M2 are prepared.
  • the feature amount acquisition unit 303 acquires the embedded vector of the query image x Q calculated based on the parameters of the learning model M1 and the embedded vector of the support image x S calculated based on the parameters of the learning model M2. ..
  • the feature amount acquisition unit 303 acquires the embedded vector of the query image x Q calculated by the learning model M1 when the query image x Q is input to the learning model M1.
  • the feature amount acquisition unit 303 acquires the embedding vector of the support image x S calculated by the learning model M2.
  • the feature amount acquisition unit 303 acquires each embedded vector of the plurality of support images x S. Since the value of K is 5 and there are 5 support images x S per episode, the feature amount acquisition unit 303 inputs each of the 5 support images x S into the learning model M2 and has 5 images. Get the embedded vector. If the value of N is 2 or more, the feature amount acquisition unit 303 may acquire the embedding vector of the support image x S according to the number of N.
  • the feature amount acquisition unit 303 acquires the embedded vector of the query image x Q corresponding to the combination and the embedded vector of the support image x S corresponding to the combination for each combination of labels (that is, for each episode). do. In the present embodiment, since there are 15 episodes, the feature amount acquisition unit 303 has one query image x Q embedded vector and five support images x S corresponding to each of the 15 episodes. Get each embedded vector and.
  • the second calculation unit 304 calculates the second loss L CL based on the embedded vector of the query image x Q and the embedded vector of the support image x S.
  • the second loss L CL indicates an error (difference) between the embedded vector of the query image x Q and the embedded vector of the support image x S.
  • the second loss L CL is an index capable of measuring the accuracy of the learning models M1 and M2.
  • a high second loss L CL means that the error is large and the accuracy is low.
  • a low second loss L CL means that the error is small and the accuracy is high.
  • the second loss L CL can be calculated by using an arbitrary method.
  • the second loss L CL may be any one that can be calculated based on a predetermined loss function.
  • Contrastive loss is the loss used in contrastive learning. contrastive learning is used to learn whether image pairs are similar or dissimilar. For example, the Euclidean distance of a pair of embedded vectors of a pair of images ⁇ X 1 , X 2 ⁇ is used as the distance metric D W.
  • the contrast loss is calculated based on the following formula 3.
  • Y 0, it means that the image X 1 and the image X 2 are similar (same label).
  • Y 1, it means that the image X 1 and the image X 2 are not similar (different labels).
  • the following formula 3 is an example of a loss function, and any function can be used as the loss function itself.
  • M in the following formula 3 is a constant for adjusting the loss when Y is 1.
  • the second calculation unit 304 calculates the second loss L CL based on the following mathematical formula 4.
  • the line drawn on the upper side of f (x S ) in Equation 4 is the average value of the embedded vector of the support image x S.
  • the following formula 4 is an example of a loss function, and any function can be used as the loss function itself.
  • the query image x Q and the support image x S have at least one label of the same label. Although the case where all these labels are the same will be described, these labels may be a partial match rather than an exact match.
  • the second calculation unit 304 calculates the second loss L CL so that the larger the difference between the embedded vector of the query image x Q and the embedded vector of the support image x S , the larger the second loss L CL .
  • the difference in the embedded vector may be expressed by an index other than the distance. The relationship between this difference and the second loss LCL is defined in the loss function.
  • N is 2 or more, and there are a plurality of support images x S per episode. Therefore, the second calculation unit 304 averages the support images x S based on the embedded vectors of the plurality of support images x S.
  • the feature quantity (in the case of Equation 4, the line drawn on the upper side of f (x S )) is calculated, and the second loss L is based on the embedded vector of the query image x Q and the average embedded vector.
  • Get CL The average embedded vector is not a simple average of the five supported images x S , but may be weighted in some way. If the value of N is 2 or more, the average feature amount may be calculated across the classes.
  • the second calculation unit 304 is based on the embedded vector of the query image x Q corresponding to the combination and the embedded vector of the support image x S corresponding to the combination for each combination of labels (that is, for each episode). Then, the second loss L CL is calculated. In the present embodiment, since there are 15 episodes, the second calculation unit 304 has one query image x Q embedded vector and five support images x S corresponding to each of the 15 episodes. The second loss L CL is calculated based on each embedded vector.
  • the adjusting unit 305 adjusts the parameters of the learning model M based on the first loss LBCE and the second loss LCL . Adjusting the parameters has the same meaning as executing the training of the learning model M.
  • various methods can be used, and for example, an inverse error propagation method or a gradient descent method may be used.
  • the adjusting unit 305 adjusts the parameters of the learning model M so that each of the first loss LBCE and the second loss LCL becomes smaller.
  • the parameters of the learning model M are adjusted so that the first loss LBCE becomes small, the error between the output of the learning model M and the label that is the correct answer becomes small. That is, the probability that the learning model M outputs a correct answer increases. In other words, the output of the learning model M approaches the label that is the correct answer.
  • the learning model M will calculate the embedded vector so that it becomes smaller.
  • the query image is adjusted so that the parameters of the training model M are adjusted so that the second loss L CL becomes small.
  • the training model M calculates the embedding vector so that the difference between the embedding vector of xQ and the embedding vector of the support image xS that is not similar to the query image xQ becomes large.
  • the adjusting unit 305 calculates the total loss L total based on the first loss L BCE and the second loss L CL , and sets the parameters of the learning model M based on the total loss L total . adjust.
  • the total loss L total is calculated based on the following formula 5.
  • the following formula 5 is an example of a loss function, and any function can be used as the loss function itself.
  • the total loss L total may be calculated by a weighted average using a weighting coefficient instead of a simple average as in Equation 5 below.
  • the learning model M1 and the learning model M2 exist, and the parameters are shared between them. Therefore, the adjusting unit 305 adjusts each of the parameters of the learning model M1 and the parameters of the learning model M2. In the present embodiment, the adjustment unit 305 adjusts the parameters of the learning model M1 by using the total loss L total , and copies the parameters of the adjusted learning model M1 to the learning model M2.
  • the adjusting unit 305 may adjust the parameters of the learning model M2 by using the total loss L total , and copy the parameters of the adjusted learning model M2 to the learning model M1. Further, the adjusting unit 305 does not copy the parameters, but adjusts the parameters of the learning model M1 by using the total loss L total , and adjusts the parameters of the learning model M2 by using the same total loss L total . You may. Even in this way, the parameters are shared as a result.
  • the adjustment unit 305 adjusts the parameters of the learning model M based on the first loss LBCE and the second loss LCL calculated for each combination of labels (that is, for each episode). Since there are 15 episodes in this embodiment, the adjusting unit 305 is based on 15 loss pairs (1st loss LBCE and 2nd loss LCL pair) corresponding to each of the 15 episodes. Then, the parameters of the learning model M are adjusted.
  • the coordinator 305 calculates 15 total losses L total corresponding to each of the 15 episodes.
  • the adjusting unit 305 adjusts the parameters of the learning model M for each of the 15 total losses L total by using the inverse error propagation method or the like.
  • the adjusting unit 305 may adjust the parameters of the learning model M after collecting all or a part of the 15 total losses L total into one loss.
  • the adjusting unit 305 may adjust the parameters of the learning model M without calculating the total loss L total . For example, the adjusting unit 305 may adjust the parameters of the learning model M so that the first loss L BCE becomes small, and then adjust the parameters so that the second loss L CL becomes small. Further, for example, the adjusting unit 305 may adjust the parameters of the learning model M so that the second loss L CL becomes small, and then adjust the parameters so that the first loss L BCE becomes small.
  • the adjusting unit 305 may adjust the parameters of the learning model M after combining the first loss LBCE in one episode and the first loss LBCE in another episode into one loss.
  • the adjusting unit 305 may adjust the parameters of the learning model M after combining the second loss L CL in one episode and the second loss L CL in another episode into one loss.
  • FIG. 9 is a flow chart showing an example of processing executed by the learning system S.
  • the learning terminal 30 executes the learning of the learning model M
  • FIG. 9 shows an example of the processing executed by the learning terminal 30.
  • This process is executed by the control unit 31 operating according to the program stored in the storage unit 32.
  • This process is an example of the process executed by the functional block shown in FIG.
  • the data set DS is stored in the storage unit 32 in advance. Further, it is assumed that the order of the episodes to be processed and the class corresponding to each episode are specified in advance. For example, the episodes corresponding to each of the 15 classes in the long tail distribution shown in FIG. 7 are in descending order of the total number of images (in the example of FIG. 7, from the class with only label 1 to the classes with label 2 and label 3). It shall be specified as the episode to be processed (in order).
  • the learning terminal 30 randomly samples one query image x Q and five support images x S of the episode to be processed from the data set DS (S1).
  • the learning terminal 30 inputs the query image x Q of the episode to be processed into the learning model M1 (S2).
  • the learning terminal 30 calculates the first loss LBCE of the query image x Q based on the actual output of the learning model M1 and the label that is the correct answer of the query image x Q based on the data set DS ( S3).
  • the learning terminal 30 inputs each of the five support images x S of the episode to be processed into the learning model M2 (S4).
  • the learning terminal 30 acquires an embedded vector of the query image x Q calculated by the learning model M1 and an embedded vector of each of the five support images x S calculated by the learning model M2 (S5).
  • the learning terminal 30 calculates the average value of the embedded vectors of the five supported images x S (S6).
  • the learning terminal 30 calculates the second loss L CL based on the embedded vector of the query image x Q and the average value calculated in S6 (S7).
  • the learning terminal 30 calculates the total loss L total based on the first loss L BCE and the second loss L CL (S8).
  • the learning terminal 30 adjusts the respective parameters of the learning model M1 and the learning model M2 based on the total loss L total (S9).
  • the learning terminal 30 determines whether or not the processing of all episodes has been executed (S10). If there is an episode for which processing has not been executed yet (S10; N), the process returns to the processing of S1 and the next episode becomes the processing target. When it is determined that the process has been executed for all the episodes (S10; Y), the learning terminal 30 determines whether or not the learning has been repeated a predetermined number of times (S11). This number is called an epoch.
  • the learning terminal 30 repeats the adjustment of each parameter of the learning model M1 and the learning model M2 (S12).
  • S12 the processes from S1 to S9 are repeated for each of the 15 episodes.
  • this process ends.
  • the multi-label data is recognized with a small amount of training data by adjusting the parameters of the learning model M based on the first loss LBCE and the second loss LCL .
  • the accuracy of the possible learning model M can be improved. For example, if it is attempted to adjust the parameters of the learning model M using only the first loss LBCE , which is a multi-label cross-entropy loss, it is necessary to prepare a huge amount of training data. Further, for example, if an attempt is made to adjust the parameters of the learning model M by using only the second loss LCL , which is a contrastive loss based on few-shot learning, the number of training data can be reduced, but the first described above.
  • the accuracy of the learning model M that can handle multi-labels may not be sufficiently improved due to the above-mentioned problem and the second problem.
  • the first loss L BCE and the second loss L CL together, it is possible to achieve both a reduction in training data and an improvement in the accuracy of the learning model M.
  • the labeling accuracy of the label (labels 0, 4, 5, 6 in FIG. 6) in which the total number of images in the long tail distribution is relatively small is particularly improved. Further, by realizing the reduction of training data, it is possible to save the user's trouble when creating the learning model M.
  • the learning model M can learn the features of similar images. For example, the accuracy of the learning model M can be improved by adjusting the parameters of the learning model M so that the embedded vector of the query image x Q and the embedded vector of the support image x S come close to each other.
  • the learning system S acquires the second loss L CL based on the embedded vector of the query image x Q and the average value of each embedded vector of the plurality of supported images x S , thereby acquiring the supported image x.
  • the number of S can be increased and the accuracy of the learning model M can be effectively improved. That is, the second loss L CL can be calculated accurately even when the number of support images x S is increased. Further, by combining the embedded vectors of a plurality of support images x S into one average value, one second loss L CL may be calculated, and it is not necessary to calculate a large number of second loss L CLs .
  • the processing load of the terminal 30 can be reduced and learning can be speeded up.
  • the learning system S calculates the total loss L total based on the first loss L BCE and the second loss L CL and adjusts the parameters to adjust the first loss L BCE and the second loss L.
  • the accuracy of the learning model M can be effectively improved by using one index that comprehensively considers CL .
  • the processing required at the time of learning can be simplified. That is, by combining the two losses into one, the learning process can also be combined into one. As a result, the processing load of the learning terminal 30 can be reduced and learning can be speeded up.
  • an image set including the query image x Q and the support image x S exists for each label combination (that is, for each episode), and the first loss L calculated for each label combination exists.
  • the learning model M can learn the characteristics of the combination of various labels, and the accuracy of the learning model M can be improved. Further, even when there are many combinations of labels in the multi-label, it is possible to create a learning model M that can recognize the combinations.
  • the learning system S can execute the calculation of the embedded vector in parallel by inputting the query image x Q into the learning model M1 and inputting the support image x S into the learning model M2, and can perform the learning process. It can be speeded up.
  • the learning system S is a processing target of the learning model M by acquiring the query image x Q and the support image x S from the data group having the long tail distribution in the multi-label. Even if the resulting population has a long tail distribution, the training data can be reduced and the accuracy of the learning model M can be maximized. For example, by making the number of images used for learning (the number of images included in one episode) the same in a class with a large total number of images and a class with a small total number of images, the characteristics of all classes are learned. The model M can be trained evenly.
  • the learning model M starts learning by substituting the last layer of the model in which labels other than the plurality of recognition target labels are learned with the layers corresponding to the plurality of labels.
  • a learning model M having a certain degree of accuracy can be prepared, and the accuracy of the finally obtained learning model M can be improved.
  • the learning model M obtained by the pre-learning can recognize the characteristics of the general object to some extent. That is, this learning model M can recognize to some extent where in the image the object can be classified.
  • a more accurate learning model M can be obtained.
  • the number of times of learning required to obtain the learning model M having a certain degree of accuracy can be reduced, the processing load of the learning terminal 30 can be reduced, and the learning can be speeded up.
  • the learning system S can improve the accuracy of the learning model M that can recognize the multi-label image with a small amount of training data by using the data to be processed by the learning model M as an image.
  • the adjusting unit 305 may calculate the total loss L total based on the first loss L BCE , the second loss L CL , and the weighting coefficient specified by the user.
  • the user can specify at least one weighting coefficient of the first loss LBCE and the second loss LCL .
  • the user may specify both of these weighting factors, or may specify only one of these weighting factors.
  • the weighting coefficient specified by the user is stored in the data storage unit 300.
  • the adjusting unit 305 acquires a value obtained by multiplying each of the first loss L BCE second loss L CL by a weighting coefficient and adding them as the total loss L total .
  • the processing of the adjusting unit 305 after the total loss L total is acquired is the same as that of the embodiment.
  • the accuracy of the learning model M is determined by calculating the total loss L total based on the first loss L BCE , the second loss L CL , and the weighting factor specified by the creator. Can be effectively enhanced. For example, if you want to give priority to the major class in the long tail distribution, you want to increase the weighting coefficient of the first loss LBCE , and if you want to give priority to the minor class in the long tail distribution, you want to learn. , The weighting coefficient of the second loss L CL is increased, and the weighting coefficient can be used properly according to the purpose of the user.
  • the second calculation unit 304 corresponds to the embedding vector of the query image x Q , the embedding vector of the support image x S , and the similarity of the labels between the query image x Q and the support image x S.
  • the second loss L CL may be obtained based on the coefficient.
  • Label similarity is the number or proportion of the same label. The higher or higher the number or proportion of the same label, the higher the similarity of the labels.
  • the query image x Q is a multi-label image belonging to the three labels of label 1, label 2, and label 4.
  • the support image x S is a multi-label image belonging to the three labels of label 1, label 3, and label 4.
  • the coefficient according to the similarity is set to 0.67.
  • the second calculation unit 304 calculates the second loss L CL by multiplying this coefficient by the equation 4.
  • the relationship between the number or ratio of labels and the coefficient may be determined in advance in data such as a mathematical formula or a table.
  • the second calculation unit 304 identifies the number or ratio of the same label between the query image x Q and the support image x S in that episode, and the number or the ratio is specified. Get the coefficient according to the ratio.
  • the second calculation unit 304 calculates the second loss L CL based on the coefficient.
  • parameter adjustment may be performed without taking the average value of each embedded vector of the plurality of supported images x S.
  • the adjustment unit 305 calculates the total loss L total for each support image x S based on the first loss LBCE of the query image x Q and the second loss L CL of the support image x S. And you may perform parameter adjustments.
  • each of the query image x Q and the support image x S is input to one learning model M.
  • the learning model M may be three or more.
  • a learning model M may be prepared for each of N support images x S. It is assumed that the parameters are shared even when the learning model M is three or more.
  • the learning system S does not calculate the first loss LBCE .
  • the parameters of the learning model M may be adjusted based only on the second loss LCL .
  • the learning system S may adjust the parameters of the learning model M based only on the first loss LBCE without calculating the second loss LCL . This is because the learning model M with a certain degree of accuracy may be created even in this way.
  • the recognition target of the learning model M may be any object included in the image, and is not limited to digital text or the like.
  • the learning model M may recognize a multi-label image in which a plurality of objects such as dogs and cats are copied. That is, the label labeled by the learning model M is not limited to digital text and the like, and may be a subject in an image. The label may be any classification of objects in the image.
  • the data input to the learning model M is not limited to images. That is, the learning system S can also be applied to a learning model M that performs recognition other than image recognition.
  • the learning system S may be a learning model M that performs speech recognition.
  • the data input to the learning model M is voice data.
  • the learning system S can also be applied to a learning model M in natural language processing.
  • the data input to the learning model M is document data.
  • the learning system S can be applied to a learning model M that performs various recognitions such as human behavior or a phenomenon in the natural world.
  • the data input to the learning model M may be any data according to the purpose of the learning model M.
  • all or part of the functions included in the learning terminal 30 may be realized by another computer.
  • each of the data acquisition unit 301, the first calculation unit 302, the feature amount acquisition unit 303, the second calculation unit 304, and the adjustment unit 305 may be included in the server 10.
  • each of these functions is mainly realized by the control unit 11.
  • each of these functions may be shared by a plurality of computers.
  • the learning system S may include only one computer.
  • the data described as being stored in the data storage units 100 and 300 may be stored in another computer or information storage medium different from the server 10 or the learning terminal 30.

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)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Image Analysis (AREA)
  • Feedback Control In General (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Electrically Operated Instructional Devices (AREA)

Abstract

学習システム(S)の第1計算手段(302)は、マルチラベルのクエリデータが学習モデルに入力された場合に、学習モデルの出力と、目標となる出力と、に基づいて、第1損失を計算する。特徴量取得手段(303)は、学習モデルのパラメータに基づいて計算された、クエリデータの特徴量と、前記クエリデータに対応するサポートデータの特徴量と、を取得する。第2計算手段(304)は、クエリデータの特徴量と、サポートデータの特徴量と、に基づいて、第2損失を計算する。調整手段(305)は、第1損失と、第2損失と、に基づいて、パラメータを調整する。

Description

学習システム、学習方法、及びプログラム
 本開示は、学習システム、学習方法、及びプログラムに関する。
 従来、画像解析や自然言語処理などの種々の分野において、機械学習が利用されている。教師有り機械学習では、訓練データを用意するのに手間がかかるので、より少ない訓練データで学習モデルの精度を高めることが求められている。例えば、非特許文献1には、非常に少ない訓練データに基づいて、未知のラベルのデータを認識可能な学習モデルを作成するFew-Shot Object Detectionと呼ばれる手法が記載されている。
Leonid Karlinsky, Joseph Shtok, Sivan Harary, Eli Schwartz, Amit Aides, Rogerio Feris, Raja Giryes, and Alex M Bronstein. RepMet: Representative-based metric learning for classification and few-shot object detection. In CVPR, 2019.
 マルチラベルのデータは、ラベルの組み合わせが多数存在するので、訓練データを用意するのに特に手間がかかる。しかしながら、非特許文献1の手法は、シングルラベルのデータを対象としているので、マルチラベルのデータに適用することはできない。このため、従来の手法では、より多くの訓練データを用意しなければ、マルチラベルのデータを認識可能な学習モデルの精度を高めることができなかった。
 本開示の目的の1つは、少ない訓練データで、マルチラベルのデータを認識可能な学習モデルの精度を高めることである。
 本開示の一態様に係る学習システムは、マルチラベルのクエリデータが学習モデルに入力された場合に、前記学習モデルの出力と、目標となる出力と、に基づいて、第1損失を計算する第1計算手段と、前記学習モデルのパラメータに基づいて計算された、前記クエリデータの特徴量と、前記クエリデータに対応するサポートデータの特徴量と、を取得する特徴量取得手段と、前記クエリデータの特徴量と、前記サポートデータの特徴量と、に基づいて、第2損失を計算する第2計算手段と、前記第1損失と、前記第2損失と、に基づいて、前記パラメータを調整する調整手段と、を含む。
 本開示によれば、少ない訓練データで、マルチラベルのデータを認識可能な学習モデルの精度を高めることができる。
学習システムの全体構成の一例を示す図である。 ウェブサイトに掲載される画像の一例を示す図である。 学習システムの機能の一例を示す機能ブロック図である。 学習端末の機能の全体像の一例を示す図である。 データセットの一例を示す図である。 個々のラベルの分布の一例を示す図である。 個々のクラスの分布の一例を示す図である。 個々のエピソードに含まれるクエリ画像とサポート画像の一例を示す図である。 学習システムで実行される処理の一例を示すフロー図である。
[1.学習システムの全体構成]
 以下、本開示に係る学習システムの実施形態の一例を説明する。図1は、学習システムの全体構成の一例を示す図である。図1に示すように、学習システムSは、サーバ10、作成者端末20、及び学習端末30を含み、これらは、インターネット又はLANなどのネットワークNに接続される。なお、図1では、サーバ10、作成者端末20、及び学習端末30の各々を1台ずつ示しているが、これらは複数台あってもよい。
 サーバ10は、サーバコンピュータである。サーバ10は、制御部11、記憶部12、及び通信部13を含む。制御部11は、少なくとも1つのプロセッサを含む。記憶部12は、RAMなどの揮発性メモリと、ハードディスクなどの不揮発性メモリと、を含む。通信部13は、有線通信用の通信インタフェースと、無線通信用の通信インタフェースと、の少なくとも一方を含む。
 作成者端末20は、作成者が操作するコンピュータである。作成者は、学習モデルに入力されるデータを作成する者である。本実施形態では、このデータの一例として画像を説明する。このため、本実施形態で画像と記載した箇所は、データと読み替えることができる。学習モデルに入力されるデータは、画像に限られない。他のデータの例は、後述の変形例で説明する。
 例えば、作成者端末20は、パーソナルコンピュータ、スマートフォン、又はタブレット端末である。作成者端末20は、制御部21、記憶部22、通信部23、操作部24、及び表示部25を含む。制御部21、記憶部22、及び通信部23の物理的構成は、それぞれ制御部11、記憶部12、及び通信部13と同様であってよい。操作部24は、マウス又はタッチパネルなどの入力デバイスである。表示部25は、液晶ディスプレイ又は有機ELディスプレイである。
 学習端末30は、学習モデルの学習を実行するコンピュータである。例えば、学習端末30は、パーソナルコンピュータ、スマートフォン、又はタブレット端末である。学習端末30は、制御部31、記憶部32、通信部33、操作部34、及び表示部35を含む。制御部31、記憶部32、通信部33、操作部34、及び表示部35の物理的構成は、それぞれ制御部11、記憶部12、通信部13、操作部24、及び表示部25と同様であってよい。
 なお、記憶部12,22,32に記憶されるものとして説明するプログラム及びデータは、ネットワークNを介して供給されるようにしてもよい。また、サーバ10、作成者端末20、及び学習端末30の各々のハードウェア構成は、上記の例に限られず、種々のハードウェアを適用可能である。例えば、コンピュータ読み取り可能な情報記憶媒体を読み取る読取部(例えば、光ディスクドライブ又はメモリカードスロット)と、外部機器とデータの入出力をするための入出力部(例えば、USBポート)と、の少なくとも一方が含まれてもよい。例えば、情報記憶媒体に記憶されたプログラム及びデータの少なくとも一方が読取部及び入出力部の少なくとも一方を介して供給されてもよい。
[2.学習システムの概要]
 本実施形態では、ウェブサイトを介して販売される商品の画像が学習モデルに入力される場合を例に挙げて、学習システムSの処理を説明する。例えば、作成者は、商品を販売する店舗の店員である。作成者は、作成者端末20にインストールされた画像編集ソフトで商品の写真を編集し、ウェブサイトに掲載する画像を作成する。
 画像編集ソフトでは、商品の写真に対し、人工的なオブジェクトが合成される。オブジェクトは、画像の構成要素である。被写体である商品もオブジェクトの1つである。画像編集ソフトで合成されるオブジェクトは、電子的な画像である。例えば、作成者は、商品の販促を目的として、商品の写真に対し、デジタルテキスト、デジタルフレーム、及びカラーバーの少なくとも1つを合成する。
 デジタルテキストは、画像編集ソフトで合成されたテキストである。デジタルテキストは、ナチュラルテキストとは異なる。ナチュラルテキストは、商品自体に含まれるテキストである。別の言い方をすれば、ナチュラルテキストは、編集前の写真に含まれるテキストである。例えば、ナチュラルテキストは、商品に印刷された商品名又はブランド名である。
 デジタルフレームは、画像編集ソフトで合成されたフレームである。本実施形態では、1ピクセルのデジタルフレームと、2ピクセル以上のデジタルフレームと、が存在する場合を説明するが、デジタルフレームは、任意の太さであってよい。デジタルフレームは、ナチュラルフレームとは異なる。ナチュラルフレームは、商品自体に含まれるフレームである。別の言い方をすれば、ナチュラルフレームは、編集前の写真に含まれるフレームである。例えば、ナチュラルフレームは、商品の箱の縁である。
 カラーバーは、商品のカラーバリエーションを示す画像である。カラーバーは、複数の色の各々のバーを含む。例えば、10色のカラーバリエーションがある洋服の場合、カラーバーは、10色のバーを含む。作成者は、商品の写真を編集した画像を作成すると、サーバ10に対し、編集済みの画像をアップロードする。アップロードされた画像は、サーバ10の画像データベースに格納され、ウェブサイトに掲載される。
 図2は、ウェブサイトに掲載される画像の一例を示す図である。図2では、画像の一例として、正方形のサムネイルを説明する。図2に示すように、画像I1は、靴の写真に対し、デジタルテキストDT10と、2ピクセル以上のデジタルフレームDF11と、が合成されている。画像I2は、コーヒーの箱の縁であるナチュラルフレームNF20と、パッケージに印刷された商品名のナチュラルテキストNT21と、が写っている。画像I2は、デジタルテキストなどは合成されていない。
 画像I3は、鞄の画像に対し、1ピクセルのデジタルフレームDF30と、デジタルテキストDT31と、が合成されている。画像I4は、手袋の画像に対し、デジタルテキストDT40が合成されている。画像I5は、洋服の画像に対し、デジタルテキストDT50と、9色のバーからなるカラーバーCB51と、が合成されている。
 本実施形態のように、作成者が自由に画像を編集できる場合、デザインが悪く、顧客の購買意欲を向上させることができない画像がアップロードされることがある。逆に、デザインが良く、顧客の購買意欲を向上させる画像がアップロードされることもある。このため、画像に施された編集内容(人工的にデコレーションされた部分)を特定することは重要である。
 そこで、学習端末30は、画像に施された編集内容のラベリングを実行する学習モデルを作成する。学習モデルは、機械学習を利用したモデルである。機械学習自体は、種々の手法を利用可能であり、例えば、畳み込みニューラルネットワーク、又は、再帰型ニューラルネットワークを利用可能である。本実施形態の学習モデルは、教師有りモデル又は半教師有りモデルとするが、教師無しモデルが利用されてもよい。
 本実施形態のように、ラベリングをする学習モデルは、分類学習器と呼ばれることもある。ラベリングは、入力された画像にラベルを付与することである。ラベルは、画像の分類である。本実施形態では、ラベルは、画像に施された編集内容を意味する。ラベルの一例として、下記のラベル0~ラベル6を説明するが、ラベルは、本実施形態の例に限られず、任意のラベルを設定可能である。
 (ラベル0)画像が何の編集内容も含まない、(ラベル1)画像がデジタルテキストを含む、(ラベル2)画像がナチュラルテキストを含む、(ラベル3)画像が2ピクセル以上のデジタルフレームを含む、(ラベル4)画像が1ピクセルのデジタルフレームを含む、(ラベル5)画像がナチュラルフレームを含む、(ラベル6)画像がカラーバーを含む。なお、ラベル0は、ラベル1~ラベル6の何れにも該当しないことを意味する。
 本実施形態では、学習モデルの出力は、画像がラベル0~6の各々に属するか否かを示す7つのバイナリの値を含む。学習モデルの出力がベクトル形式で表現される場合を例に挙げるが、学習モデルの出力は、任意の形式であってよい。例えば、学習モデルの出力は、配列形式、行列形式、又は単一の数値であってもよい。他にも例えば、学習モデルの出力は、上記7つの値ではなく、画像が属するラベルを示す0~6の数値であってもよい。この場合、ラベル2とラベル5に属する画像であれば、学習モデルの出力は、2と5の数値の組み合わせになる。
 例えば、あるラベルの値が0であることは、そのラベルに属さないことを意味する。あるラベルの値が1であることは、そのラベルに属することを意味する。例えば、学習モデルの出力が[0,1,0,0,1,0,0]であれば、画像がラベル1とラベル4に属することを意味する。なお、学習モデルの出力は、0又は1のバイナリでなくてもよく、中間値が存在してもよい。中間値は、ラベルに属する確率(蓋然性)を示す。例えば、あるラベルの値が0.9であれば、そのラベルに属する確率が90%であることを意味する。
 画像データベースDBには、シングルラベルの画像と、マルチラベルの画像と、が混在する。シングルラベルとは、画像が1つのラベルだけに属することである。図2の例であれば、画像I4は、シングルラベルの画像である。マルチラベルとは、画像が複数のラベルに属することである。図2の例であれば、画像I1,I2,I4,I5は、マルチラベルの画像である。本実施形態では、画像がラベル0とラベル1~6との両方に属することはないが、画像がラベル1~6の任意の組み合わせに属することがある。このため、画像によっては、ラベル1~6のうちの3つ以上に属することがある。
 従来技術で説明したように、マルチラベルに対応可能な学習モデルを作成しようとすると、ラベルの組み合わせが多数存在するので、訓練データを用意するのに非常に手間がかかる。このため、マルチラベルに対応可能な学習モデルを作成するのは困難である。更に、本実施形態のような画像は、次の2つの理由により、ラベリングが困難である。
 第1の理由として、画像データベースDBに格納された画像は、人気のある商品ばかりではなく、あまり人気のない商品が大多数を占めていることが挙げられる。このような分布は、ロングテール分布と呼ばれる。ロングテール分布を有する母集団は、多種多様な画像が存在する。このため、多数の訓練データを用意したとしても、その訓練データには商品の形状として多種多様なパターンが存在するので、学習モデルが画像の特徴を認識しにくい。
 第2の理由として、画像データベースDBに格納された画像は、商品の外観が大部分を占めており、デジタルテキストなどの部分は、微粒子のように目立たない。このため、学習モデルは、デジタルテキストなどの特徴を認識しにくい。マルチラベルの画像は、微粒子のように目立たない特徴をいくつも認識する必要があるので、なおさら困難である。このような問題は、fine-grained multi-label classification問題ということもできる。更に、本実施形態のような画像は、デジタルテキストとナチュラルテキストの区別がつきにくいこと、及び、デジタルフレームとナチュラルフレームの区別がつきにくいことも問題として挙げられる。
 そこで、本実施形態の学習システムSは、contrastive learningのアプローチをベースにしたFew-Shot learningを適用することによって、マルチラベルに対応可能な学習モデルを作成する。これにより、ロングテール分布の画像を対象とし、かつ、微粒子のように目立たない特徴を対象にしたとしても(上記第1の理由と第2の理由があったとしても)、より少ない訓練データで、学習モデルの精度を高めるようにしている。以降、学習システムSの詳細を説明する。
[3.学習システムの機能]
 図3は、学習システムSの機能の一例を示す機能ブロック図である。図3では、サーバ10及び学習端末30の機能を説明し、作成者端末20の機能は省略する。作成者端末20は、作成者の操作に基づいて画像を編集する機能と、編集済みの画像をアップロードする機能と、を含めばよい。
[3-1.サーバの機能]
 サーバ10では、データ記憶部100が実現される。データ記憶部100は、記憶部12を主として実現される。データ記憶部100は、学習モデルの学習に必要なデータを記憶する。例えば、データ記憶部100は、画像データベースDBを記憶する。図2を参照して説明したように、画像データベースDBには、複数の作成者の各々によりアップロードされた画像が格納される。画像データベースDBには、所定のサイズにトリミングだけされて、人工的なデコレーションがなされない画像(ラベル0に属する画像)も格納される。
 本実施形態では、画像データベースDBに格納される画像は、形式(例えば、サイズ、解像度、色のビット数、拡張子)が定められているものとするが、画像データベースDBには、任意の形式の画像が格納されていてよい。また、画像データベースDBに格納された画像は、学習端末30にダウンロードされた後に、学習端末30のユーザによってラベルが付与されるものとするが、ラベルが付与された画像が画像データベースDBに格納されてもよい。
[3-2.学習端末の機能]
 図4は、学習端末30の機能の全体像の一例を示す図である。以降、図4を参照しつつ、図3に示す学習端末30の機能を説明する。学習端末30では、データ記憶部300、データ取得部301、第1計算部302、特徴量取得部303、第2計算部304、及び調整部305が実現される。データ記憶部300は、記憶部32を主として実現され、データ取得部301、第1計算部302、特徴量取得部303、第2計算部304、及び調整部305の各々は、制御部31を主として実現される。
[データ記憶部]
 データ記憶部300は、学習モデルM1,M2の学習に必要なデータを記憶する。以降の説明で学習モデルM1と学習モデルM2を区別しないときは、単に学習モデルMと記載する。例えば、データ記憶部300は、学習用のデータセットDSを記憶する。データセットDSには、正解となるラベルが付与された複数の画像の各々が格納される。
 図5は、データセットDSの一例を示す図である。図5に示すように、データセットDSには、画像と、正解となるラベルと、のペアが多数格納される。このペアは、学習モデルMのパラメータの調整に利用される。このペアは、訓練データ、教師データ、又は正解データと呼ばれることがある。正解となるラベルは、ラベル0~ラベル6の各々に属するか否かを示す値を含む。即ち、正解となるラベルは、目標となる出力(学習モデルMが出力すべき内容)である。
 本実施形態では、画像データベースDBの一部の画像がデータセットDSに格納される場合を説明するが、画像データベースDBの全ての画像がデータセットDSに格納されてもよい。例えば、学習端末30のユーザは、サーバ10にアクセスし、画像データベースDBの一部の画像をダウンロードする。ユーザは、ダウンロードした画像を表示部35に表示させて正解となるラベルを付与し、データセットDSを作成する。
 例えば、画像データベースDBに、2億枚程度の画像が格納されており、ユーザが、この中から4~5万枚程度の画像をランダムサンプリングしてラベルを付与したとする。本実施形態の画像は、原則として自由に編集可能なので、作成者がやりがちな編集もあれば、あまりやらない編集もある。このため、ランダムサンプリングされた画像のラベルは、ロングテール分布を有することがある。
 図6は、個々のラベルの分布の一例を示す図である。図6の縦軸は、ラベル0~ラベル6の各々を示し、横軸は、ラベルごとの画像の総数(サンプル数)を示す。例えば、ラベル1とラベル4のマルチラベルの画像がランダムサンプリングされると、この1枚の画像により、ラベル1とラベル4の各々の画像の総数が1ずつ増加する。図6の例では、ラベル1の画像が極端に多く、ラベル5の画像が極端に少ない。図6の分布は、画像の総数が均等ではなくアンバランスなので、ロングテール分布である。
 図7は、個々のクラスの分布の一例を示す図である。クラスは、何らかの分類という意味ではラベルと似た概念であるが、クラス分類問題と、ラベル分類問題と、は異なる。本実施形態では、クラス分類問題は、部分集合の間に重複がなく、母集団が何れか1つの部分集合に必ず属するものとする。ラベル分類問題は、部分集合の間に重複があったり、何れの部分集合にも属さないことが存在したりするものとする。
 本実施形態のように、シングルラベルの画像と、マルチラベルの画像と、が混在する場合には、少なくとも1つのラベルがクラスに相当する。画像は、何れかのクラスに属し、他のクラスには属さない。例えば、マルチラベルの画像は、あるラベルと他のラベルに属するが、あるクラスと他のクラスには属さない。ランダムサンプリングされた画像の母集団におけるラベルの組み合わせが41通り存在したとすると、この母集団には、41個のクラスが存在する。
 図7の例では、画像の総数が閾値(例えば、100個)以上のクラスの分布のみを示している。このため、実際には、画像の総数が閾値未満のクラスも存在する。図7の縦軸は、画像の総数が閾値以上である15個のクラスの各々を示し、横軸は、クラスごとの画像の総数を示す。図7の例では、ラベル1のみを示すクラスの画像が極端に多く、ラベル2とラベル3の組み合わせを示すクラスの画像が極端に少ない。このため、図7の分布は、図6の分布と同様、画像の総数が均等ではなくアンバランスなので、ロングテール分布である。
 なお、図6及び図7では、ロングテール分布を説明する都合上、4万~5万枚程度の画像に対し、ラベルが付与されている場合を例に挙げたが、ユーザがラベルを付与する画像の数は、これよりも少なくてよい。例えば、ユーザは、数枚~数千枚程度の画像をランダムサンプリングして、正解のラベルを付与してもよい。
 また、正解となるラベルを画像に付与する方法は、上記の例に限られず、任意の方法を利用可能である。例えば、ユーザは、公知のクラスタリング手法を利用して、画像に対し、正解のラベルを付与してもよい。また例えば、ユーザは、シングルラベルの画像を学習させた学習モデルMを利用して、画像に対し、正解のラベルを付与してもよい。
 データ記憶部300は、データセットDSだけでなく、学習モデルM(学習モデルMの実データ)を記憶する。学習モデルMは、プログラムと、パラメータと、を含む。学習モデルMのプログラムとパラメータとの形式自体は、機械学習で利用される種々の形式を利用可能である。例えば、学習モデルMのプログラムは、複数のレイヤの各々における処理(畳み込み、埋め込みベクトルの計算、プーリングなど)を定義したコードを含む。また例えば、学習モデルMのパラメータは、重み係数とバイアスとを含む。学習モデルMのパラメータは、学習モデルMのプログラムによって参照される。
 図3及び図4に示すように、本実施形態では、データ記憶部300は、クエリ画像x用の学習モデルM1と、サポート画像x用の学習モデルM2と、を記憶する。学習モデルM1は、第1の学習モデルの一例である。学習モデルM2は、第2の学習モデルの一例である。クエリ画像xは、学習モデルM1に入力される。サポート画像xは、第2の学習モデルM2に入力される。クエリ画像xとサポート画像xの詳細は後述する。
 学習モデルM1のパラメータと、学習モデルM2のパラメータと、は共有されている。即ち、学習モデルM1のパラメータと、学習モデルM2のパラメータと、は同じである。学習モデルM1のプログラムと、学習モデルM2のプログラムと、も同じであり、レイヤなどの内部構造も同じである。即ち、学習モデルM1と学習モデルM2の何れか一方は、他方のコピーである。
 なお、データ記憶部300が記憶するデータは、上記の例に限られない。データ記憶部300は、学習モデルMの学習に必要なデータを記憶すればよい。例えば、データ記憶部300は、データセットDSを、訓練用データセット、検証用データセット、及びテスト用データセットの3つに分割して記憶してもよい。また例えば、データ記憶部300は、画像データベースDBと同じデータベースを記憶してもよい。
[データ取得部]
 データ取得部301は、学習モデルMの学習で利用される画像を取得する。本実施形態では、データ取得部301は、マルチラベルにおけるロングテール分布を有する画像群の中から、クエリ画像xと、サポート画像xと、を取得する。なお、データ取得部301は、ロングテール分布を有していない画像群の中から、クエリ画像xと、サポート画像xと、を取得してもよい。
 画像群は、複数の画像の集まりである。本実施形態では、この画像群は、ロングテール分布を有する画像データベースDBに格納されている。データセットDSのサンプル数が一定程度存在するのであれば、データセットDSもロングテール分布を有することがあるので、データセットDSに格納された複数の画像の集まりが上記画像群に相当してもよい。
 ロングテール分布は、図6及び図7を参照したような分布である。ロングテール分布の定義自体は、一般的な定義に従えばよい。例えば、最も多いラベル又はクラスの画像の総数と、最も少ないラベル又はクラスの画像の総数と、の差が閾値以上の場合には、ロングテール分布である。また例えば、上位a(aは2以上の整数)個のラベル又はクラスの画像の総数の合計値と、下位b個(bは2以上の整数)のラベル又はクラスの画像の総数の合計値と、の差が閾値以上の場合には、ロングテール分布である。
 本実施形態の学習モデルMは、画像に含まれるオブジェクトを認識するモデルなので、クエリデータの一例として、マルチラベルのクエリ画像xを説明する。また、サポートデータの一例として、クエリ画像xに対応するサポート画像xである。クエリ画像xとサポート画像xとの各々は、Few-shot learningにおいて利用される画像である。
 クエリ画像xは、学習モデルMに学習させていない新しいクラスの画像である。クエリ画像xは、テスト画像と呼ばれることもある。サポート画像xは、クエリ画像xと同じクラス、又は、クエリ画像xとは異なるクラスの画像である。例えば、一般的な物体認識の訓練データセットを利用して一般的なクラスが学習モデルMに学習されていたとすると、クエリ画像xとサポート画像xとを利用して学習させようとしているクラスは、原則として、学習モデルMには学習されていない。
 本実施形態では、データ取得部301は、画像データベースDBに格納された画像群をランダムサンプリングして取得し、個々の画像と、正解となるラベルと、を含むペアをデータセットDSに格納する。図4に示すように、データ取得部301は、データセットDSに格納された画像群をランダムサンプリングして、クエリ画像xと、サポート画像xと、を取得する。
 データ取得部301は、エピソードごとに、データセットDSの中からクエリ画像xとサポート画像xをランダムに取得する。エピソードは、Few-shot learningにおける一連の処理の過程である。Few-shot learningでは、いくつものエピソードが繰り返される。例えば、エピソードごとに、少なくとも1枚のクエリ画像xと、少なくとも1枚のサポート画像xと、の画像セットが存在する。
 本実施形態のFew-shot learningは、N-Way K-shotと呼ばれる設定に従う。Nは、1つのエピソードあたりのクラスの数を意味する。Kは、1つのエピソードあたりの画像数を意味する。NとKは、自然数である。一般的には、Nが小さいほど学習モデルMの精度が高くなり、Kが高いほど学習モデルMの精度が高くなる。本実施形態では、Nが1であり、Kが5である場合(即ち、1-Way 5-shotの場合)を説明するが、NとKは、任意の値であってよい。
 本実施形態では、マルチラベルにおいて考え得るラベルの組み合わせのうち、一部の組み合わせに対応するエピソードが存在する場合を説明するが、全通りのエピソードが存在してもよい。以降、図7に示す15個のクラスにそれぞれ対応する15個のエピソードが存在する場合を例に挙げて説明する。エピソードの数は、15個に限られず、任意の数であってよい。本実施形態では、エピソード間でクラスが重複しない場合を説明するが、エピソード間でクラスの重複があってもよい。
 図8は、個々のエピソードに含まれるクエリ画像xとサポート画像xの一例を示す図である。図8に示すように、エピソード1~15の各々に対し、1枚のクエリ画像xと、5枚のサポート画像xと、の画像セットが存在する。なお、クエリ画像xは、2枚以上であってもよい。また、クエリ画像xの数と、サポート画像xの数と、同じであってもよい。即ち、1つのエピソードにつき、クエリ画像xも5枚存在してもよい。
 例えば、エピソード1は、図7の分布において画像の総数が最も多いクラス(ラベル1だけのクラス)の画像を学習させるためのエピソードである。データ取得部301は、データセットDSの中から、このクラスの画像(ラベルが[0,1,0,0,0,0,0]の画像)を6枚ランダムサンプリングする。データ取得部301は、6枚のうちの1枚をクエリ画像xとし、残りの5枚をサポート画像xとする。
 また例えば、エピソード2は、画像の総数が2番目に多いクラス(ラベル1とラベル2のクラス)の画像を学習させるためのエピソードである。データ取得部301は、データセットDSの中から、このクラスの画像(ラベルが[0,1,1,0,0,0,0]の画像)を6枚ランダムサンプリングする。データ取得部301は、6枚のうちの1枚をクエリ画像xとし、残りの5枚をサポート画像xとする。
 他のエピソード3~15についても同様に、データ取得部301は、エピソードごとに、そのエピソードに対応するクラスの画像を6枚ランダムサンプリングして、クエリ画像x及びサンプル画像として取得する。即ち、データ取得部301は、あるエピソードのクエリ画像xとサポート画像xとの画像セットとして、そのエピソードに対応するクラスの画像を6枚取得する。
 なお、Nの値が2以上の場合には、1つのエピソードに、複数のクラスの各々のサポート画像xが含まれる。この場合、1つのエピソードには、複数のクラスのうちの何れかのクラスのクエリ画像xだけが含まれてもよいし、複数のクラスにそれぞれ対応する複数のクエリ画像xが含まれてもよい。Nの値が2以上であった場合も、クエリ画像xは、1枚に限られない。
 また、エピソードの数は、ユーザにより指定されてもよいし、画像データベースDB又はデータセットDSにおける統計値から自動的に決定されてもよい。例えば、ユーザが学習モデルMに学習させるクラスを指定し、その数に応じたエピソードが設定されてもよい。また例えば、画像データベースDB又はデータセットDSにおいて画像の総数が閾値以上のクラスが自動的に特定され、その数に応じたエピソードが設定されてもよい。データ取得部301は、エピソードに応じた数の画像を取得すればよい。
[第1計算部]
 第1計算部302は、マルチラベルのクエリ画像xが学習モデルM1に入力された場合に、学習モデルM1の出力と、目標となる出力と、に基づいて、第1損失LBCEを計算する。即ち、第1計算部302は、学習モデルM1のパラメータに基づいて、第1損失LBCEを計算する。
 学習モデルM1の出力とは、学習モデルM1から得られた実際の出力である。目標となる出力は、学習モデルM1が出力すべき内容である。本実施形態では、データセットDSに格納された正解となるラベルが目標となる出力に相当する。
 第1損失LBCEは、学習モデルM1の出力と、目標となる出力と、の誤差(違い)を示す。第1損失LBCEは、学習モデルM1の精度を計測可能な指標である。第1損失LBCEが高いことは、誤差が大きく精度が低いことを意味する。第1損失LBCEが低いことは、誤差が小さく精度が高いことを意味する。本実施形態では、第1損失LBCEがマルチラベルクロスエントロピー損失である場合を説明するが、第1損失LBCEは、任意の手法を利用して計算可能である。第1損失LBCEは、所定の損失関数に基づいて計算可能なものであればよい。
 以降、あるエピソードに含まれる個々のクエリ画像xのセットを大文字のXと記載する。本実施形態では、あるエピソードのクエリ画像xのセットXは、1枚のクエリ画像xから構成される。本実施形態では、N-Way K-shotにおけるNが1である場合を説明するが、Nが2以上の場合も想定されるので、この場合には、クエリ画像をx と記載することがある。iはN以下の自然数である。i∈{1,・・・,N}であり、x ∈Xである。
 図4に示すように、例えば、第1計算部302は、あるエピソードのクエリ画像xを学習モデルM1に入力する。この学習モデルM1は、後述する調整部305によるパラメータ調整が行われる前のモデルであり、例えば、ResNet50と呼ばれる学習済みのモデルであってもよい。即ち、この学習モデルM1は、本実施形態で認識しようとしているデジタルテキストなどのオブジェクトではなく、一般的なオブジェクトの特徴が学習されたモデルであってもよい。
 例えば、学習モデルM1にクエリ画像xが入力されると、埋め込み関数f(x)により、そのクエリ画像xの埋め込みベクトルであるf(x)が計算される。なお、f(x)のxは、任意の画像を意味する。埋め込み関数f(x)は、学習モデルM1のプログラムの一部であってもよいし、学習モデルM1により呼び出される外部のプログラムであってもよい。埋め込みベクトルは、後述する特徴量取得部303により取得される。
 第1計算部302は、埋め込みベクトルであるf(x)に基づいて、各クラスのバイナリの出力を取得するために、シグモイド関数σ(z)=1/(1+e-z)を利用する。例えば、第1計算部302は、下記の数式1及び数式2に基づいて、第1損失LBCEを計算する。なお、下記の数式1及び数式2は、損失関数の一例であり、損失関数自体は、任意の関数を利用可能である。マルチラベルクロスエントロピー損失以外の損失を利用するのであれば、その損失に応じた損失関数を利用すればよい。
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000002
 数式2のy は、クエリ画像xの各バイナリラベルであり、y ∈yである。yは、各入力に対応するラベルの組み合わせである。クエリ画像xに対応する実際の出力と、当該クエリ画像xの目標となる出力と、の誤差が小さいほど第1損失LBCEは小さくなり、この誤差が大きいほど第1損失LBCEは大きくなる。
 本実施形態の学習モデルMは、3以上のラベルを認識可能であり、ラベルの組み合わせごとに(即ち、エピソードごとに)、クエリ画像xとサポート画像xとを含む画像セットが存在する。3以上のラベルが存在するので、ラベルの組み合わせとしては、2通り以上存在する。
 第1計算部302は、ラベルの組み合わせごとに(即ち、エピソードごとに)、当該組み合わせに対応するクエリ画像xに基づいて、第1損失LBCEを計算する。個々のエピソードの第1損失LBCEの計算方法は、上記説明した通りである。本実施形態では、15個のエピソードが存在するので、第1計算部302は、15個のエピソードにそれぞれ対応する第1損失LBCEを計算する。
 本実施形態の学習モデルMは、認識対象の複数のラベル以外の他のラベルが学習されたモデルの最後のレイヤが、前記複数のラベルに応じたレイヤに代えられている。最後のレイヤは、出力層である。例えば、ResNet50を利用して一般的な物体の形状が学習された学習モデルMの最後のレイヤが、マルチラベルに対応したレイヤ(本実施形態であれば、ラベル0~ラベル6の7個の値を出力するレイヤ)に置き換えられる。これにより、学習モデルMの認識対象となるラベルの組み合わせが出力されるようになる。第1計算部302は、複数のラベルに応じたレイヤに代えられた学習モデルMの出力と、目標となる出力と、に基づいて、第1損失LBCEを計算する。
[特徴量取得部]
 特徴量取得部303は、学習モデルMのパラメータに基づいて計算された、クエリ画像xの特徴量と、クエリ画像xに対応するサポート画像xの特徴量と、を取得する。このパラメータは、学習モデルMの現状のパラメータである。即ち、このパラメータは、後述する調整部305による調整前のパラメータである。ResNet50等を利用して事前学習を行うのであれば、事前学習後のパラメータに基づいて、特徴量が取得される。
 特徴量とは、画像の特徴を示す情報である。本実施形態では、埋め込みベクトルが特徴量に相当する場合を説明する。このため、本実施形態で埋め込みベクトルと記載した箇所は、特徴量と読み替えることができる。特徴量は、任意の形式で表現可能であり、ベクトル形式に限られない。特徴量は、配列形式、行列形式、又は単一の数値等の他の形式で表現されてもよい。
 図4に示すように、本実施形態では、学習モデルM1,M2が用意されている。特徴量取得部303は、学習モデルM1のパラメータに基づいて計算されたクエリ画像xの埋め込みベクトルと、学習モデルM2のパラメータに基づいて計算されたサポート画像xの埋め込みベクトルと、を取得する。特徴量取得部303は、クエリ画像xが学習モデルM1に入力された場合に、学習モデルM1により計算されたクエリ画像xの埋め込みベクトルを取得する。特徴量取得部303は、サポート画像xが学習モデルM2に入力された場合に、学習モデルM2により計算されたサポート画像xの埋め込みベクトルを取得する。
 本実施形態では、1つのエピソードにつき複数のサポート画像xが存在するので、特徴量取得部303は、複数のサポート画像xの各々の埋め込みベクトルを取得する。Kの値が5であり、1つのエピソードにつき5枚のサポート画像xが存在するので、特徴量取得部303は、5枚のサポート画像xの各々を学習モデルM2に入力し、5つの埋め込みベクトルを取得する。Nの値が2以上であれば、特徴量取得部303は、Nの数に応じたサポート画像xの埋め込みベクトルを取得すればよい。
 特徴量取得部303は、ラベルの組み合わせごとに(即ち、エピソードごとに)、当該組み合わせに対応するクエリ画像xの埋め込みベクトルと、当該組み合わせに対応するサポート画像xの埋め込みベクトルと、を取得する。本実施形態では、15個のエピソードが存在するので、特徴量取得部303は、15個のエピソードにそれぞれ対応する、1枚のクエリ画像xの埋め込みベクトルと、5枚のサポート画像xの各々の埋め込みベクトルと、を取得する。
[第2計算部]
 第2計算部304は、クエリ画像xの埋め込みベクトルと、サポート画像xの埋め込みベクトルと、に基づいて、第2損失LCLを計算する。
 第2損失LCLは、クエリ画像xの埋め込みベクトルと、サポート画像xの埋め込みベクトルと、の誤差(違い)を示す。第2損失LCLは、学習モデルM1,M2の精度を計測可能な指標である。第2損失LCLが高いことは、誤差が大きく精度が低いことを意味する。第2損失LCLが低いことは、誤差が小さく精度が高いことを意味する。本実施形態では、第2損失LCLがコントラスティブ損失である場合を説明するが、第2損失LCLは、任意の手法を利用して計算可能である。第2損失LCLは、所定の損失関数に基づいて計算可能なものであればよい。
 コントラスティブ損失は、contrastive learningで利用される損失である。contrastive learningは、画像のペアが似ているか似ていないかを学習するために利用される。例えば、ある画像のペア{X,X}の埋め込みベクトルのペアのユークリッド距離が、距離メトリックDとして利用される。
 例えば、画像のペアの類似性を示す類似性ラベルをY∈{0,1}とすると、コントラスティブ損失は、下記の数式3に基づいて計算される。Yが0であることは、画像Xと画像Xとが似ている(同じラベルである)ことを意味する。Yが1であることは、画像Xと画像Xとが似ていない(違うラベルである)ことを意味する。なお、下記の数式3は、損失関数の一例であり、損失関数自体は、任意の関数を利用可能である。下記数式3におけるMは、Yが1の場合の損失を調整するため定数である。
Figure JPOXMLDOC01-appb-M000003
 上記のようなコントラスティブ学習を、本実施形態の手法に適用するためには、2つの画像の類似性を比較することに代えて、サポート画像xとクエリ画像xとの各々から計算された2つの埋め込みベクトルが入力される。本実施形態では、これらが同じラベルを有するので、類似性ラベルYは0になる。例えば、第2計算部304は、下記の数式4に基づいて、第2損失LCLを計算する。数式4におけるf(x)の上側にラインが引かれたものは、サポート画像xの埋め込みベクトルの平均値である。なお、下記の数式4は、損失関数の一例であり、損失関数自体は、任意の関数を利用可能である。
Figure JPOXMLDOC01-appb-M000004
 本実施形態では、クエリ画像xと、サポート画像xと、は少なくとも1つのラベルが同じである。これらの全てのラベルが同じ場合を説明するが、これらのラベルは、完全一致ではなく、部分一致であってもよい。第2計算部304は、クエリ画像xの埋め込みベクトルとサポート画像xの埋め込みベクトルとの違いが大きいほど、第2損失LCLが大きくなるように、第2損失LCLを計算する。埋め込みベクトルの違いは、距離以外の指標で表現されてもよい。この違いと第2損失LCLとの関係は、損失関数に定義されている。
 本実施形態では、Nが2以上であり、1つのエピソードにつき複数のサポート画像xが存在するので、第2計算部304は、複数のサポート画像xの各々の埋め込みベクトルに基づいて、平均特徴量(数式4であれば、f(x)の上側にラインが引かれたもの)を計算し、クエリ画像xの埋め込みベクトルと、平均埋め込みベクトルと、に基づいて、第2損失LCLを取得する。平均埋め込みベクトルは、5枚のサポート画像xの単純平均ではなく、何らかの重み付けがなされてもよい。Nの値が2以上であれば、クラス間にまたがって平均特徴量が計算されてもよい。
 第2計算部304は、ラベルの組み合わせごとに(即ち、エピソードごとに)、当該組み合わせに対応するクエリ画像xの埋め込みベクトルと、当該組み合わせに対応するサポート画像xの埋め込みベクトルと、に基づいて、第2損失LCLを計算する。本実施形態では、15個のエピソードが存在するので、第2計算部304は、15個のエピソードにそれぞれ対応する、1枚のクエリ画像xの埋め込みベクトルと、5枚のサポート画像xの各々の埋め込みベクトルと、に基づいて、第2損失LCLを計算する。
[調整部]
 調整部305は、第1損失LBCEと、第2損失LCLと、に基づいて、学習モデルMのパラメータを調整する。パラメータを調整するとは、学習モデルMの学習を実行することと同じ意味である。損失に基づいてパラメータを調整する方法自体は、種々の手法を利用可能であり、例えば、逆誤差伝播法又は勾配降下法を利用してもよい。調整部305は、第1損失LBCEと第2損失LCLの各々が小さくなるように、学習モデルMのパラメータを調整する。
 第1損失LBCEが小さくなるように、学習モデルMのパラメータが調整されると、学習モデルMの出力と、正解となるラベルと、の誤差が小さくなる。即ち、学習モデルMが正解を出力する確率が高くなる。別の言い方をすれば、学習モデルMの出力が、正解となるラベルに近づくようになる。
 第2損失LCLが小さくなるように、学習モデルMのパラメータが調整されると、クエリ画像xの埋め込みベクトルと、クエリ画像xと類似するサポート画像xの埋め込みベクトルと、の違いが小さくなるように、学習モデルMが埋め込みベクトルを計算するようになる。
 本実施形態とは逆に、クエリ画像xとは類似しないサポート画像xを利用するのであれば、第2損失LCLが小さくなるように学習モデルMのパラメータが調整されると、クエリ画像xの埋め込みベクトルと、クエリ画像xと類似しないサポート画像xの埋め込みベクトルと、の違いが大きくなるように、学習モデルMが埋め込みベクトルを計算するようになる。
 本実施形態では、調整部305は、第1損失LBCEと、第2損失LCLと、に基づいて、全体損失Ltotalを計算し、全体損失Ltotalに基づいて、学習モデルMのパラメータを調整する。全体損失Ltotalは、下記の数式5に基づいて計算される。なお、下記の数式5は、損失関数の一例であり、損失関数自体は、任意の関数を利用可能である。例えば、下記の数式5のような単純平均ではなく、重み係数を利用した加重平均により、全体損失Ltotalが計算されてもよい。
Figure JPOXMLDOC01-appb-M000005
 本実施形態では、学習モデルM1と学習モデルM2とが存在し、これらの間でパラメータが共有されている。このため、調整部305は、学習モデルM1のパラメータと、学習モデルM2のパラメータと、の各々を調整する。本実施形態では、調整部305は、全体損失Ltotalを利用して学習モデルM1のパラメータを調整し、調整済みの学習モデルM1のパラメータを、学習モデルM2にコピーする。
 なお、上記とは逆に、調整部305は、全体損失Ltotalを利用して学習モデルM2のパラメータを調整し、調整済みの学習モデルM2のパラメータを、学習モデルM1にコピーしてもよい。また、調整部305は、パラメータのコピーをするのではなく、全体損失Ltotalを利用して学習モデルM1のパラメータを調整し、同じ全体損失Ltotalを利用して学習モデルM2のパラメータを調整してもよい。このようにしても、結果的にパラメータが共有される。
 本実施形態では、調整部305は、ラベルの組み合わせごとに(即ち、エピソードごとに)計算された第1損失LBCEと第2損失LCLとに基づいて、学習モデルMのパラメータを調整する。本実施形態では、15個のエピソードが存在するので、調整部305は、15個のエピソードにそれぞれ対応する15個の損失のペア(第1損失LBCEと第2損失LCLのペア)に基づいて、学習モデルMのパラメータを調整する。
 例えば、調整部305は、15個のエピソードにそれぞれ対応する15個の全体損失Ltotalを計算する。調整部305は、15個の全体損失Ltotalの各々について、逆誤差伝播法などを利用して、学習モデルMのパラメータを調整する。調整部305は、15個の全体損失Ltotalのうちの全部又は一部を1つの損失にまとめたうえで、学習モデルMのパラメータを調整してもよい。
 なお、調整部305は、全体損失Ltotalを計算せずに、学習モデルMのパラメータを調整してもよい。例えば、調整部305は、第1損失LBCEが小さくなるように、学習モデルMのパラメータを調整した後に、第2損失LCLが小さくなるように、そのパラメータを調整してもよい。また例えば、調整部305は、第2損失LCLが小さくなるように、学習モデルMのパラメータを調整した後に、第1損失LBCEが小さくなるように、そのパラメータを調整してもよい。
 また、調整部305は、あるエピソードにおける第1損失LBCEと、他のエピソードにおける第1損失LBCEと、を1つの損失にまとめたうえで、学習モデルMのパラメータを調整してもよい。調整部305は、あるエピソードにおける第2損失LCLと、他のエピソードにおける第2損失LCLと、を1つの損失にまとめたうえで、学習モデルMのパラメータを調整してもよい。
[4.学習システムで実行される処理]
 図9は、学習システムSで実行される処理の一例を示すフロー図である。本実施形態では、学習端末30が学習モデルMの学習を実行するので、図9は、学習端末30で実行される処理の一例を示す。この処理は、制御部31が記憶部32に記憶されたプログラムに従って動作することによって実行される。この処理は、図3に示す機能ブロックにより実行される処理の一例である。
 なお、データセットDSは、予め記憶部32に記憶されているものとする。また、処理対象のエピソードの順番と、個々のエピソードに対応するクラスと、は予め指定されているものとする。例えば、図7に示すロングテール分布における15個のクラスの各々に対応するエピソードが、画像の総数が多い順に(図7の例であれば、ラベル1だけのクラスからラベル2とラベル3のクラスまで順番に)処理対象のエピソードとして指定されているものとする。
 図9に示すように、学習端末30は、データセットDSから、処理対象のエピソードの1枚のクエリ画像xと5枚のサポート画像xとを、ランダムサンプリングする(S1)。学習端末30は、学習モデルM1に対し、処理対象のエピソードのクエリ画像xを入力する(S2)。学習端末30は、データセットDSに基づいて、学習モデルM1の実際の出力と、クエリ画像xの正解となるラベルと、に基づいて、クエリ画像xの第1損失LBCEを計算する(S3)。
 学習端末30は、学習モデルM2に対し、処理対象のエピソードの5枚のサポート画像xの各々を入力する(S4)。学習端末30は、学習モデルM1により計算されたクエリ画像xの埋め込みベクトルと、学習モデルM2により計算された5枚のサポート画像xの各々の埋め込みベクトルと、を取得する(S5)。学習端末30は、5枚のサポート画像xの埋め込みベクトルの平均値を計算する(S6)。
 学習端末30は、クエリ画像xの埋め込みベクトルと、S6で計算した平均値と、に基づいて、第2損失LCLを計算する(S7)。学習端末30は、第1損失LBCEと、第2損失LCLと、に基づいて、全体損失Ltotalを計算する(S8)。学習端末30は、全体損失Ltotalに基づいて、学習モデルM1と学習モデルM2の各々のパラメータを調整する(S9)。
 学習端末30は、全てのエピソードの処理を実行したか否かを判定する(S10)。まだ処理を実行していないエピソードが存在する場合(S10;N)、S1の処理に戻り、次のエピソードが処理対象になる。全てのエピソードについて処理を実行したと判定された場合(S10;Y)、学習端末30は、所定の回数だけ学習を繰り返したか否かを判定する(S11)。この回数は、エポックと呼ばれる回数である。
 所定の回数だけ学習を繰り返したと判定されない場合(S11;N)、学習端末30は、学習モデルM1と学習モデルM2の各々のパラメータの調整を繰り返す(S12)。S12においては、15個のエピソードの各々について、S1~S9までの処理を繰り返す。一方、所定の回数だけ学習を繰り返したと判定された場合(S11;Y)、本処理は終了する。
 実施形態の学習システムSによれば、第1損失LBCEと、第2損失LCLと、に基づいて、学習モデルMのパラメータを調整することによって、少ない訓練データで、マルチラベルのデータを認識可能な学習モデルMの精度を高めることができる。例えば、マルチラベルクロスエントロピー損失である第1損失LBCEだけを利用して学習モデルMのパラメータを調整しようとすると、膨大な訓練データを用意する必要がある。また例えば、few-shot learningベースのコントラスティブ損失である第2損失LCLだけを利用して学習モデルMのパラメータを調整しようとすると、訓練データの数を減らすことはできるが、先述した第1の問題及び第2の問題等により、マルチラベルに対応可能な学習モデルMの精度を十分に高めることができないことがある。第1損失LBCEと第2損失LCLとを併用することによって、訓練データの減少と、学習モデルMの精度向上と、を両立できる。発明者達の独自の研究によれば、ロングテール分布における画像の総数が比較的少ないラベル(図6におけるラベル0,4,5,6)のラベリング精度が特に向上することが確認された。また、訓練データの減少を実現することで、学習モデルMの作成時のユーザの手間を省くことができる。
 また、学習システムSは、クエリ画像xの埋め込みベクトルと、少なくとも1つのラベルが同じであるサポート画像xの埋め込みベクトルと、の違いが大きいほど、第2損失LCLが大きくなるように、第2損失LCLを計算することによって、似た画像同士の特徴を学習モデルMに学習させることができる。例えば、クエリ画像xの埋め込みベクトルと、サポート画像xの埋め込みベクトルと、が近づくように、学習モデルMのパラメータを調整することによって、学習モデルMの精度を高めることができる。
 また、学習システムSは、クエリ画像xの埋め込みベクトルと、複数のサポート画像xの各々の埋め込みベクトルの平均値と、に基づいて、第2損失LCLを取得することによって、サポート画像xの数を増やし、学習モデルMの精度を効果的に高めることができる。即ち、サポート画像xの枚数を増やした場合にも第2損失LCLを正確に計算できる。また、複数のサポート画像xの埋め込みベクトルを1つの平均値にまとめることにより、1つの第2損失LCLを計算すればよく、多数の第2損失LCLを計算する必要がなくなるので、学習端末30の処理負荷を軽減し、学習を高速化できる。
 また、学習システムSは、第1損失LBCEと、第2損失LCLと、に基づいて、全体損失Ltotalを計算してパラメータを調整することによって、第1損失LBCEと第2損失LCLとを総合的に考慮した1つの指標を利用して、学習モデルMの精度を効果的に高めることができる。また、第1損失LBCEと第2損失LCLとを1つの全体損失Ltotalにまとめることによって、学習時に必要な処理を簡易化できる。即ち、2つの損失を1つにまとめることで、学習の処理も1つにまとめることができる。その結果、学習端末30の処理負荷を軽減し、学習を高速化できる。
 また、学習システムSは、ラベルの組み合わせごとに(即ち、エピソードごとに)、クエリ画像xとサポート画像xとを含む画像セットが存在し、ラベルの組み合わせごとに計算された第1損失LBCEと第2損失LCLとに基づいて、学習モデルMのパラメータを調整することによって、種々のラベルの組み合わせの特徴を学習モデルMに学習させ、学習モデルMの精度を高めることができる。また、マルチラベルにおけるラベルの組み合わせが多い場合にも、その組み合わせを認識可能な学習モデルMを作成できる。
 また、学習システムSは、学習モデルM1にクエリ画像xを入力し、学習モデルM2にサポート画像xを入力することによって、埋め込みベクトルの計算を並行して実行することができ、学習処理を高速化できる。
 また、学習システムSは、学習システムSは、マルチラベルにおけるロングテール分布を有するデータ群の中から、クエリ画像xと、サポート画像xと、を取得することによって、学習モデルMの処理対象となる母集団がロングテール分布を有していたとしても、訓練データを減らし、学習モデルMの精度を最大限に高めることができる。例えば、画像の総数が多いクラスと、画像の総数が少ないクラスと、で学習に利用する画像の数(1エピソードに含まれる画像の数)を同じにすることで、全てのクラスの特徴を学習モデルMに万遍なく学習させることができる。
 また、学習システムSは、学習モデルMは、認識対象の複数のラベル以外の他のラベルが学習されたモデルの最後のレイヤが、複数のラベルに応じたレイヤに代えられることによって、学習の開始時にある程度の精度を有する学習モデルMを用意し、最終的に得られる学習モデルMの精度も高めることができる。例えば、一般的なResNet50を利用して事前学習を実行した場合、事前学習で得られた学習モデルMは、一般的なオブジェクトの特徴をある程度認識できる。即ち、この学習モデルMは、画像内のどこに着目すれば、オブジェクトを分類可能であるかをある程度認識できる。そのような学習モデルMを利用して、本実施形態のような学習を行うことにより、より高精度の学習モデルMを得ることができる。また、ある程度の精度を有する学習モデルMを得るまでに必要な学習の実行回数を減らし、学習端末30の処理負荷を軽減し、学習を高速化できる。
 また、学習システムSは、学習モデルMの処理対象のデータを画像とすることで、少ない訓練データで、マルチラベルの画像を認識可能な学習モデルMの精度を高めることができる。
[5.変形例]
 なお、本開示は、以上に説明した実施の形態に限定されるものではない。本開示の趣旨を逸脱しない範囲で、適宜変更可能である。
 (1)例えば、調整部305は、第1損失LBCE、第2損失LCL、及びユーザにより指定された重み係数に基づいて、全体損失Ltotalを計算してもよい。ユーザは、第1損失LBCEと第2損失LCLとの少なくとも一方の重み係数を指定可能である。ユーザは、これらの両方の重み係数を指定してもよいし、何れか一方のみの重み係数を指定してもよい。ユーザにより指定された重み係数は、データ記憶部300に記憶される。調整部305は、第1損失LBCE第2損失LCLの各々に重み係数を乗じたうえで加算した値を、全体損失Ltotalとして取得する。全体損失Ltotalが取得された後の調整部305の処理は、実施形態と同様である。
 変形例(1)によれば、第1損失LBCE、第2損失LCL、及び作成者により指定された重み係数に基づいて、全体損失Ltotalを計算することによって、学習モデルMの精度を効果的に高めることができる。例えば、ロングテール分布におけるメジャーなクラスを優先して学習させたい場合には、第1損失LBCEの重み係数を高くして、ロングテール分布におけるマイナーなクラスを優先して学習させたい場合には、第2損失LCLの重み係数を高くする、といったように、ユーザの目的に応じて重み係数を使い分けることができる。
 (2)また例えば、第2計算部304は、クエリ画像xの埋め込みベクトル、サポート画像xの埋め込みベクトル、及びクエリ画像xとサポート画像xとの間のラベルの類似性に応じた係数に基づいて、第2損失LCLを取得してもよい。ラベルの類似性とは、同じラベルの数又は割合である。同じラベルの数又は割合が多い又は高いほど、ラベルの類似性が高いことを意味する。
 実施形態では、クエリ画像xのラベルと、サポート画像xのラベルと、が完全一致する場合(クエリ画像xのクラスとサポート画像xのクラスとが同じ場合)を説明したが、本変形例では、クエリ画像xのラベルと、サポート画像xのラベルと、が完全一致せずに部分一致する場合(クエリ画像xのクラスとサポート画像xのクラスとが類似する場合)を説明する。
 例えば、クエリ画像xがラベル1、ラベル2、及びラベル4の3つのラベルに属するマルチラベルの画像だったとする。サポート画像xがラベル1、ラベル3、及びラベル4の3つのラベルに属するマルチラベルの画像だったとする。この場合、クエリ画像xとサポート画像xとの間で、3つのラベルのうちの2つが一致しているので、類似性に応じた係数は、0.67とする。第2計算部304は、この係数を数式4に乗じることによって、第2損失LCLを計算する。
 クエリ画像xとサポート画像xとの間で同じラベルの数又は割合が多い又は高いほど、係数は大きくなる。ラベルの数又は割合と係数との関係は、予め数式又はテーブル等のデータに定めておけばよい。第2計算部304は、あるエピソードにおける第2損失LCLを計算する場合に、そのエピソードのクエリ画像xとサポート画像xとの間で同じラベルの数又は割合を特定し、その数又は割合に応じた係数を取得する。第2計算部304は、その係数に基づいて、第2損失LCLを計算する。
 変形例(2)によれば、クエリ画像xとサポート画像xとの間のラベルの類似性に応じた係数に基づいて、第2損失LCLを取得することによって、より少ない訓練データで、学習モデルMの精度を効果的に高めることができる。例えば、ある画像と全く同じラベルの他の画像を探すのは難しいことがあり、類似するラベルの画像であれば容易に入手できることがある。この場合、ラベルの類似性に応じた係数に基づいて、第2損失LCLを取得することによって、全く同じラベルの他の画像を入手できなくても済むようになり、ユーザの手間を省くことができる。
 (3)また例えば、上記変形例を組み合わせてもよい。
 また例えば、複数のサポート画像xの各々の埋め込みベクトルの平均値を取ることなく、パラメータの調整が実行されてもよい。この場合、調整部305は、サポート画像xごとに、クエリ画像xの第1損失LBCEと、そのサポート画像xの第2損失LCLと、に基づいて、全体損失Ltotalを計算し、パラメータの調整を実行してもよい。
 また例えば、図4では、2つの学習モデルM1,M2について説明したが、学習モデルMは、1つだけであってもよい。この場合、1つの学習モデルMに対し、クエリ画像xとサポート画像xとの各々が入力される。他にも例えば、学習モデルMは、3つ以上であってもよい。この場合、N枚のサポート画像xごとに学習モデルMが用意されていてもよい。なお、学習モデルMが3つ以上の場合にも、パラメータが共有されるものとする。
 また例えば、第1損失LBCEと、第2損失LCLと、に基づいて、学習モデルMのパラメータが調整される場合を説明したが、学習システムSは、第1損失LBCEを計算せずに、第2損失LCLだけに基づいて、学習モデルMのパラメータを調整してもよい。これとは逆に、学習システムSは、第2損失LCLを計算せずに、第1損失LBCEだけに基づいて、学習モデルMのパラメータを調整してもよい。このようにすることでも、ある程度の精度の学習モデルMを作成できることがあるからである。
 また例えば、学習モデルMの認識対象は、画像に含まれる任意のオブジェクトであってよく、デジタルテキスト等に限られない。例えば、学習モデルMは、犬や猫などの複数のオブジェクトが写されたマルチラベルの画像を認識してもよい。即ち、学習モデルMによりラベリングされるラベルは、デジタルテキスト等に限られず、画像内の被写体であってもよい。ラベルは、画像内のオブジェクトの何らかの分類であればよい。
 また例えば、学習モデルMに入力されるデータは、画像に限られない。即ち、学習システムSは、画像認識以外の認識を行う学習モデルMにも適用可能である。例えば、学習システムSは、音声認識を行う学習モデルMであってもよい。この場合、学習モデルMに入力されるデータは、音声データである。また例えば、学習システムSは、自然言語処理における学習モデルMにも適用可能である。この場合、学習モデルMに入力されるデータは、文書データである。他にも例えば、人間の行動又は自然界の現象といった種々の認識を行う学習モデルMにも学習システムSを適用可能である。学習モデルMに入力されるデータは、学習モデルMの用途に応じたデータであればよい。
 また例えば、学習端末30に含まれる機能の全部又は一部は、他のコンピュータで実現されてもよい。例えば、データ取得部301、第1計算部302、特徴量取得部303、第2計算部304、及び調整部305の各々がサーバ10に含まれてもよい。この場合、これらの各機能は、制御部11を主として実現される。他にも例えば、これらの各機能が複数のコンピュータで分担されてもよい。学習システムSには、1台のコンピュータだけが含まれてもよい。また例えば、データ記憶部100,300に記憶されるものとして説明したデータは、サーバ10又は学習端末30とは異なる他のコンピュータ又は情報記憶媒体に記憶されていてもよい。

Claims (13)

  1.  マルチラベルのクエリデータが学習モデルに入力された場合に、前記学習モデルの出力と、目標となる出力と、に基づいて、第1損失を計算する第1計算手段と、
     前記学習モデルのパラメータに基づいて計算された、前記クエリデータの特徴量と、前記クエリデータに対応するサポートデータの特徴量と、を取得する特徴量取得手段と、
     前記クエリデータの特徴量と、前記サポートデータの特徴量と、に基づいて、第2損失を計算する第2計算手段と、
     前記第1損失と、前記第2損失と、に基づいて、前記パラメータを調整する調整手段と、
     を含む学習システム。
  2.  前記クエリデータと、前記サポートデータと、は少なくとも1つのラベルが同じであり、
     前記第2計算手段は、前記クエリデータの特徴量と前記サポートデータの特徴量との違いが大きいほど、前記第2損失が大きくなるように、前記第2損失を計算する、
     請求項1に記載の学習システム。
  3.  前記特徴量取得手段は、複数の前記サポートデータの各々の特徴量を取得し、
     前記第2計算手段は、前記複数の前記サポートデータの各々の特徴量に基づいて、平均特徴量を計算し、前記クエリデータの特徴量と、前記平均特徴量と、に基づいて、前記第2損失を取得する、
     請求項1又は2に記載の学習システム。
  4.  前記調整手段は、前記第1損失と、前記第2損失と、に基づいて、全体損失を計算し、前記全体損失に基づいて、前記パラメータを調整する、
     請求項1~3の何れかに記載の学習システム。
  5.  前記調整手段は、前記第1損失、前記第2損失、及び作成者により指定された重み係数に基づいて、前記全体損失を計算する、
     請求項4に記載の学習システム。
  6.  前記学習モデルは、3以上のラベルを認識可能であり、
     前記ラベルの組み合わせごとに、前記クエリデータと前記サポートデータとを含むデータセットが存在し、
     前記第1計算手段は、前記ラベルの組み合わせごとに、当該組み合わせに対応する前記クエリデータに基づいて、前記第1損失を計算し、
     前記特徴量取得手段は、前記ラベルの組み合わせごとに、当該組み合わせに対応する前記クエリデータの特徴量と、当該組み合わせに対応する前記サポートデータの特徴量と、を取得し、
     前記第2計算手段は、前記ラベルの組み合わせごとに、当該組み合わせに対応する前記クエリデータの特徴量と、当該組み合わせに対応する前記サポートデータの特徴量と、に基づいて、前記第2損失を計算し、
     前記調整手段は、前記ラベルの組み合わせごとに計算された前記第1損失と前記第2損失とに基づいて、前記パラメータを調整する、
     請求項1~5の何れかに記載の学習システム。
  7.  前記クエリデータは、第1の学習モデルに入力され、
     前記サポートデータは、第2の学習モデルに入力され、
     前記第1の学習モデルの前記パラメータと、前記第2の学習モデルの前記パラメータと、は共有されており、
     前記第1計算手段は、前記第1の学習モデルの前記パラメータに基づいて、前記第1損失を計算し、
     前記特徴量取得手段は、前記第1の学習モデルの前記パラメータに基づいて計算された前記クエリデータの特徴量と、前記第2の学習モデルの前記パラメータに基づいて計算された前記サポートデータの特徴量と、を取得し、
     前記調整手段は、前記第1の学習モデルの前記パラメータと、前記第2の学習モデルの前記パラメータと、の各々を調整する、
     請求項1~6の何れかに記載の学習システム。
  8.  前記クエリデータと、前記サポートデータと、は少なくとも1つのラベルが同じであり、
     前記第2計算手段は、前記クエリデータの特徴量、前記サポートデータの特徴量、及び前記クエリデータと前記サポートデータとの間のラベルの類似性に応じた係数に基づいて、前記第2損失を取得する、
     請求項1~7の何れかに記載の学習システム。
  9.  前記学習システムは、マルチラベルにおけるロングテール分布を有するデータ群の中から、前記クエリデータと、前記サポートデータと、を取得するデータ取得手段を更に含む、
     請求項1~8の何れかに記載の学習システム。
  10.  前記学習モデルは、認識対象の複数のラベル以外の他のラベルが学習されたモデルの最後のレイヤが、前記複数のラベルに応じたレイヤに代えられており、
     前記第1計算手段は、前記複数のラベルに応じたレイヤに代えられた前記学習モデルの出力と、前記目標となる出力と、に基づいて、前記第1損失を計算する、
     請求項1~9の何れかに記載の学習システム。
  11.  前記学習モデルは、画像に含まれるオブジェクトを認識するモデルであり、
     前記クエリデータは、マルチラベルのクエリ画像であり、
     前記サポートデータは、前記クエリ画像に対応するサポート画像である、
     請求項1~10の何れかに記載の学習システム。
  12.  マルチラベルのクエリデータが学習モデルに入力された場合に、前記学習モデルの出力と、目標となる出力と、に基づいて、第1損失を計算する第1計算ステップと、
     前記学習モデルのパラメータに基づいて計算された、前記クエリデータの特徴量と、前記クエリデータに対応するサポートデータの特徴量と、を取得する特徴量取得ステップと、
     前記クエリデータの特徴量と、前記サポートデータの特徴量と、に基づいて、第2損失を計算する第2計算ステップと、
     前記第1損失と、前記第2損失と、に基づいて、前記パラメータを調整する調整ステップと、
     を含む学習方法。
  13.  マルチラベルのクエリデータが学習モデルに入力された場合に、前記学習モデルの出力と、目標となる出力と、に基づいて、第1損失を計算する第1計算手段、
     前記学習モデルのパラメータに基づいて計算された、前記クエリデータの特徴量と、前記クエリデータに対応するサポートデータの特徴量と、を取得する特徴量取得手段、
     前記クエリデータの特徴量と、前記サポートデータの特徴量と、に基づいて、第2損失を計算する第2計算手段、
     前記第1損失と、前記第2損失と、に基づいて、前記パラメータを調整する調整手段、
     としてコンピュータを機能させるためのプログラム。
PCT/JP2020/045416 2020-12-07 2020-12-07 学習システム、学習方法、及びプログラム WO2022123619A1 (ja)

Priority Applications (6)

Application Number Priority Date Filing Date Title
EP20938500.4A EP4040346A1 (en) 2020-12-07 2020-12-07 Learning system, learning method, and program
JP2021563294A JP6995262B1 (ja) 2020-12-07 2020-12-07 学習システム、学習方法、及びプログラム
CN202080041868.XA CN114916238A (zh) 2020-12-07 2020-12-07 学习系统、学习方法和程序
PCT/JP2020/045416 WO2022123619A1 (ja) 2020-12-07 2020-12-07 学習システム、学習方法、及びプログラム
US17/616,674 US20220398504A1 (en) 2020-12-07 2020-12-07 Learning system, learning method and program
TW110145679A TWI804090B (zh) 2020-12-07 2021-12-07 學習系統、學習方法及程式產品

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2020/045416 WO2022123619A1 (ja) 2020-12-07 2020-12-07 学習システム、学習方法、及びプログラム

Publications (1)

Publication Number Publication Date
WO2022123619A1 true WO2022123619A1 (ja) 2022-06-16

Family

ID=80448007

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/045416 WO2022123619A1 (ja) 2020-12-07 2020-12-07 学習システム、学習方法、及びプログラム

Country Status (6)

Country Link
US (1) US20220398504A1 (ja)
EP (1) EP4040346A1 (ja)
JP (1) JP6995262B1 (ja)
CN (1) CN114916238A (ja)
TW (1) TWI804090B (ja)
WO (1) WO2022123619A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114691886A (zh) * 2022-03-16 2022-07-01 华中科技大学 一种关系增强的知识图谱嵌入方法及系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102459381B1 (ko) * 2018-02-23 2022-10-26 에이에스엠엘 네델란즈 비.브이. 컴퓨테이션 리소그래피를 위한 머신 러닝 모델을 트레이닝시키기 위한 방법
CN111985581B (zh) * 2020-09-09 2022-07-05 福州大学 一种基于样本级注意力网络的少样本学习方法

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
KARLINSKY, LEONID ET AL.: "RepMet: Representative- based metric learning for classification and few- shot object detection", ARXIV, 18 November 2018 (2018-11-18), Retrieved from the Internet <URL:https://arxiv.org/pdf/1806.04728v3.pdf> [retrieved on 20210219] *
RIOS, ANTHONY ET AL.: "Few-Shot and Zero-Shot Multi- Label Learning for Structured Label Spaces, 2018 Conference on Empirical Methods in Natural Language Processing", ACL ANTHOLOGY, 2018, pages 3132 - 3142, Retrieved from the Internet <URL:https://www.aclweb.org/anthology/D18-1352.pdf> [retrieved on 20210219] *
WANG, YAQING ET AL.: "Generalizing from a Few Examples: A Survey on Few-Shot Learning", ARXIV, 29 March 2020 (2020-03-29), Retrieved from the Internet <URL:https://arxiv.org/pdf/1904.05046v3.pdf> [retrieved on 20210219] *

Also Published As

Publication number Publication date
CN114916238A (zh) 2022-08-16
TWI804090B (zh) 2023-06-01
EP4040346A4 (en) 2022-08-10
US20220398504A1 (en) 2022-12-15
TW202232388A (zh) 2022-08-16
JPWO2022123619A1 (ja) 2022-06-16
JP6995262B1 (ja) 2022-01-14
EP4040346A1 (en) 2022-08-10

Similar Documents

Publication Publication Date Title
US11657602B2 (en) Font identification from imagery
US11508169B2 (en) System and method for synthetic image generation with localized editing
Kodirov et al. Semantic autoencoder for zero-shot learning
US20200193552A1 (en) Sparse learning for computer vision
Avila et al. Pooling in image representation: The visual codeword point of view
US20190258925A1 (en) Performing attribute-aware based tasks via an attention-controlled neural network
Olivas et al. Handbook of research on machine learning applications and trends: Algorithms, methods, and techniques: Algorithms, methods, and techniques
Xie et al. Learning sparse frame models for natural image patterns
CN105354248A (zh) 基于灰度的分布式图像底层特征识别方法及系统
Bargshady et al. The modeling of human facial pain intensity based on Temporal Convolutional Networks trained with video frames in HSV color space
Georgopoulos et al. Modeling of facial aging and kinship: A survey
CN113657087B (zh) 信息的匹配方法及装置
Jiang et al. Consensus style centralizing auto-encoder for weak style classification
CN110889718B (zh) 方案筛选方法、方案筛选装置、介质以及电子设备
Meena et al. Facial expression recognition using graph signal processing on HOG
JP6995262B1 (ja) 学習システム、学習方法、及びプログラム
Bouguila On multivariate binary data clustering and feature weighting
Puthenputhussery et al. Sparse representation based complete kernel marginal fisher analysis framework for computational art painting categorization
CN116383419A (zh) 一种本地相册儿童照片智能筛选和时间线整理方法及系统
Tian et al. A multitask convolutional neural network for artwork appreciation
Pflüger et al. Sifting through visual arts collections
Barcic et al. Convolutional Neural Networks for Face Recognition: A Systematic Literature Review
Li Special character recognition using deep learning
Wu et al. A unified framework for age invariant face recognition and age estimation
Mao et al. A Transfer Learning Method with Multi-feature Calibration for Building Identification

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021563294

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2020938500

Country of ref document: EP

Effective date: 20211206

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

Ref document number: 20938500

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE