Information processing method and information processing system
By training a discriminant model to align inference results from original and reduced-weight models, the method addresses inconsistencies in machine learning models on resource-constrained devices, achieving consistent performance.
Patent Information
- Application Number
- JP2021568470
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-07-29
- Filing Date
- 2020-12-17
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2040-12-17
AI Technical Summary
Existing methods for maintaining inference performance in machine learning models on devices with limited computational resources result in differences between inference results before and after weight reduction, leading to inconsistent model behavior.
An information processing method that trains a discriminant model to distinguish between inference results from original and reduced-weight models, using machine learning to adjust coefficients and reduce errors, and applies a conversion process to align the models' outputs.
The method effectively reduces differences in inference results between original and reduced-weight models, ensuring consistent performance even in environments with limited resources.
Smart Images

Figure 0007609809000001 
Figure 0007609809000002 
Figure 0007609809000003
Abstract
Description
[Technical field]
[0001] The present invention relates to an information processing method and an information processing system. [Background technology]
[0002] There is a technology that changes settings for machine learning processing based on the computational resources and performance specifications of a system (see Patent Document 1). This allows inference performance to be maintained to a certain degree even if the computational resources and performance specifications are restricted. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] US Patent Application Publication No. 2016 / 0328644 Summary of the Invention [Problem to be solved by the invention]
[0004] However, the technology disclosed in the above document has a problem in that, even if inference performance is maintained, the inference results using the inference model obtained by machine learning processing before the settings are changed may differ from the inference results using the inference model obtained by machine learning processing after the settings are changed.
[0005] Therefore, the present invention provides an information processing method that reduces the difference in inference results between two inference models. [Means for solving the problem]
[0006] An information processing method according to one aspect of the present invention is an information processing method executed by a processor using a memory, comprising the steps of: inputting first data into a first inference model to obtain a first inference result; inputting the first data into a second inference model to obtain a second inference result; inputting the first inference result into a discrimination model that outputs discrimination information that discriminates whether the input information is an output of the first inference model or an output of the second inference model to obtain first discrimination information that is the discrimination information for the input first inference result; obtaining a first error that indicates a difference between the first discrimination information and correct answer information that indicates that the information is the output of the first inference model; inputting the second inference result into the discrimination model to obtain a first error for the input second inference result. and training the second inference model by machine learning to reduce the first error and the second error. In the information processing method, second data is input to the second inference model to obtain a third inference result, and the third inference result is input to the trained discriminant model to obtain third discrimination information, which is the discrimination information for the input third inference result, and a third error is obtained that indicates the difference between the third discrimination information and correct answer information indicating that the first inference model is output.
[0007] These comprehensive or specific aspects may be realized as a system, an apparatus, an integrated circuit, a computer program, or a recording medium such as a computer-readable CD-ROM, or may be realized as any combination of a system, an apparatus, an integrated circuit, a computer program, and a recording medium. Effect of the Invention
[0008] The information processing method of the present invention can reduce the difference in inference results between two inference models. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a block diagram showing a functional configuration of a processing system according to the first embodiment. [Diagram 2] FIG. 2 is an explanatory diagram showing training of a discrimination model in the processing system according to the first embodiment. [Diagram 3] FIG. 3 is an explanatory diagram showing supervised answer information used for training a discriminant model in the processing system according to the first embodiment. [Figure 4] FIG. 4 is an explanatory diagram showing training of a discrimination model in the processing system according to the first embodiment. [Diagram 5] FIG. 5 is an explanatory diagram showing supervised answer information used for training a discrimination model in the processing system according to the first embodiment. [Figure 6] FIG. 6 is a flow diagram showing the processing executed by the processing system in the first embodiment. [Figure 7] FIG. 7 is a block diagram showing the functional configuration of the inference system in the first embodiment. [Figure 8] FIG. 8 is a flow diagram showing the processing executed by the inference system in the first embodiment. [Figure 9] FIG. 9 is a block diagram showing a functional configuration of the processing system according to the second embodiment. [Figure 10] FIG. 10 is an explanatory diagram showing training of a discrimination model in the processing system according to the second embodiment. [Figure 11] FIG. 11 is a flow chart showing the processing executed by the processing system in the second embodiment. [Figure 12] FIG. 12 is a block diagram showing a functional configuration of a processing system according to the third embodiment. [Figure 13] FIG. 13 is an explanatory diagram showing training of a discrimination model in the processing system according to the third embodiment. [Figure 14] FIG. 14 is an explanatory diagram showing supervised answer information used for training a discriminant model in the processing system according to the third embodiment. [Figure 15]FIG. 15 is an explanatory diagram showing training of a discrimination model in the processing system according to the third embodiment. [Figure 16] FIG. 16 is an explanatory diagram showing supervised answer information used for training a discrimination model in the processing system according to the third embodiment. [Figure 17] FIG. 17 is a flowchart showing the processing executed by the processing system according to the third embodiment. [Figure 18] FIG. 18 is a block diagram showing a functional configuration of a processing system according to the fourth embodiment. As shown in FIG. [Figure 19] FIG. 19 is a block diagram showing another example of the functional configuration of the processing system according to the fourth embodiment. In FIG. [Figure 20] FIG. 20 is a schematic diagram for explaining a method of adding noise by the noise adding unit according to the fourth embodiment. [Figure 21] FIG. 21 is a flow chart showing the processing executed by the processing system in the fourth embodiment. [Figure 22] FIG. 22 is a flow chart showing another example of the processing executed by the processing system according to the fourth embodiment. [Figure 23] FIG. 23 is a block diagram showing a functional configuration of a processing system according to the fifth embodiment. [Figure 24] FIG. 24 is a schematic diagram illustrating the noise added by the noise adding unit in the fifth embodiment. In FIG. [Diagram 25] FIG. 25 is a schematic diagram for explaining a method of adding noise by the noise adding unit according to the fifth embodiment. In FIG. [Figure 26] FIG. 26 is a flow chart showing the processing executed by the processing system in the fifth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] In recent years, the inference model trained by machine learning such as deep learning has been considered for incorporation into IoT devices. However, from the viewpoints of cost and privacy, the inference model is required to run on a processor on a device with limited computational resources such as computing power and memory capacity, rather than on a cloud computing environment or an environment using a GPU (Graphical Processing Unit). In order to perform inference on such a processor with limited computational resources, it is conceivable to reduce the weight of the inference model by using a technique such as quantizing the inference model.
[0011] For example, the technology disclosed in Patent Document 1 changes settings for machine learning processing based on the computational resources and performance specifications of the system, thereby maintaining inference performance to a certain extent even if the computational resources and performance specifications are restricted.
[0012] However, even if the inference performance is maintained, a difference may occur between the behavior of the inference model before and after weight reduction. In other words, a difference may occur between the inference results of the inference model before and after weight reduction.
[0013] Therefore, an information processing method according to one aspect of the present invention is an information processing method executed by a processor using a memory, comprising the steps of: inputting first data into a first inference model to obtain a first inference result; inputting the first data into a second inference model to obtain a second inference result; inputting the first inference result into a discrimination model that outputs discrimination information that discriminates whether the input information is an output of the first inference model or an output of the second inference model to obtain first discrimination information that is the discrimination information for the input first inference result; obtaining a first error that indicates the difference between the first discrimination information and correct answer information that indicates that the information is the output of the first inference model; inputting the second inference result into the discrimination model to obtain a first error that indicates the difference between the first discrimination information and correct answer information that indicates that the information is the output of the first inference model; an information processing method for acquiring second discrimination information, which is the discrimination information about the input third inference result, acquiring a second error indicating a difference between the second discrimination information and correct answer information indicating that the input third inference model is an output of the first inference model, training the discrimination model by machine learning to reduce the first error and the second error, inputting second data into the second inference model to acquire a third inference result, inputting the third inference result into the trained discrimination model to acquire third discrimination information, which is the discrimination information about the input third inference result, acquiring a third error indicating a difference between the third discrimination information and correct answer information indicating that the output of the first inference model is an output of the first inference model, and training the second inference model by machine learning to reduce the third error.
[0014] According to the above aspect, the information processing method trains a discrimination model capable of appropriately discriminating between the first inference result and the second inference result, and then trains a second inference model so that the second inference result is discriminated to be the first inference result using the trained discrimination model. As a result, the second inference model is trained to output the same inference result as the first inference model. That is, the information processing method can reduce the difference in the inference result occurring between the first inference model and the second inference model. Therefore, the difference in the inference result occurring between the two inference models can be reduced. Specifically, the difference in the inference result that may occur when a new second inference model is obtained based on the first inference model can be reduced. In this way, the information processing method can reduce the difference in the inference result that may occur when a new inference model is obtained based on an inference model.
[0015] For example, another set of second data may be input into the trained second inference model to obtain another set of third inference results, and the second inference model may be further trained based on the obtained set of third inference results.
[0016] According to the above aspect, the trained second inference model is further trained using new first data (in other words, the training is repeated recursively), so that it is possible to further reduce the difference in inference results that may occur when a new second inference model is obtained based on the first inference model. Thus, the above information processing method can further reduce the difference in inference results that occur between two inference models.
[0017] Moreover, an information processing method according to one aspect of the present invention is an information processing method executed by a processor using a memory, comprising the steps of: inputting first data into a first inference model to obtain a first inference result; inputting the first data into a second inference model to obtain a second inference result; inputting the first inference result into a discrimination model that outputs discrimination information that discriminates whether the input information is an output of the first inference model or an output of the second inference model to obtain first discrimination information that is the discrimination information for the input first inference result; obtaining a first error that indicates a difference between the first discrimination information and correct answer information that indicates that the information is the output of the first inference model; inputting the second inference result into the discrimination model to obtain second discrimination information that is the discrimination information for the input second inference result. an information processing method for updating the second inference model by a conversion process that converts the trained third inference model, obtaining a second error indicating the difference between the second discrimination information and correct answer information indicating that the information is the output of the second inference model, training the discrimination model by machine learning to reduce the first error and the second error, inputting second data into the second inference model to obtain a third inference result, inputting the third inference result into the trained discrimination model to obtain third discrimination information which is the discrimination information about the input third inference result, obtaining a third error indicating the difference between the third discrimination information and correct answer information indicating that the information is the output of the first inference model, training the third inference model by machine learning to reduce the third error, and updating the second inference model by a conversion process that converts the trained third inference model.
[0018] According to the above aspect, the information processing method trains a discrimination model capable of appropriately discriminating between the first inference result and the second inference result, and then trains a third inference model so that the second inference result is discriminated to be the first inference result using the trained discrimination model. Then, the second inference model is obtained from the trained third inference model by a conversion process, thereby updating the second inference model. As a result, the second inference model is trained to output the same inference result as the first inference model. That is, the information processing method can reduce the difference in the inference result occurring between the first inference model and the second inference model. Therefore, the difference in the inference result occurring between the two inference models can be reduced. Specifically, the difference in the inference result that may occur when a new second inference model is obtained based on the first inference model can be reduced. In this way, the information processing method can reduce the difference in the inference result that may occur when a new inference model is obtained based on an inference model.
[0019] For example, another second data may be input into the updated second model to obtain another third inference result, and based on the obtained other third inference result, the third inference model may be further trained by machine learning, and the second inference model may be further updated by the conversion process of the further trained third inference model.
[0020] According to the above aspect, the trained third inference model is further trained using new first data to obtain a second inference model (in other words, the training is repeated recursively), so that it is possible to further reduce the difference in inference results that may occur when a new second inference model is obtained based on the first inference model. Therefore, the above information processing method can further reduce the difference in inference results that occur between two inference models.
[0021] For example, the first inference model, the second inference model, and the third inference model may be neural network models, and the conversion process may include a process of reducing the weight of the neural network model.
[0022] According to the above aspect, the second inference model is obtained by reducing the weight of the neural network model, which is the third inference model. Therefore, it is possible to reduce the difference in inference results that may occur when a new lightweight second inference model is obtained based on the first inference model. Therefore, the above information processing method can reduce the difference between the two inference models when a new lightweight inference model is obtained based on an inference model. Therefore, even in an environment with limited computational resources such as an IoT device, it is possible to apply a second inference model that is close to the behavior of the first inference model while maintaining inference performance.
[0023] For example, the weight reduction process may include a process of quantizing the neural network model.
[0024] According to the above aspect, the second inference model is obtained by quantizing the neural network model, which is the third inference model. Therefore, the neural network model can be made lighter without changing the network structure, and the fluctuation of the inference performance and the inference result (behavior) before and after the lightening can be suppressed.
[0025] For example, the quantizing process may include converting coefficients of the neural network model from floating point format to fixed point format.
[0026] According to the above aspect, the second inference model is obtained by converting the coefficients (weights) of the neural network model, which is the third inference model, from floating-point format to fixed-point format. Therefore, it is possible to adapt the second inference model to a general embedded environment while suppressing fluctuations in inference performance and inference results (behavior).
[0027] For example, the weight reduction process may include a process of reducing nodes in the neural network model, or a process of reducing connections between nodes in the neural network model.
[0028] According to the above aspect, the second inference model is obtained by reducing the number of nodes or the number of node connections of the neural network model, which is the third inference model. Therefore, since the reduction in the number of nodes and the number of node connections directly leads to a reduction in the amount of calculation, the second inference model can be adapted to an environment with severe constraints on calculation resources.
[0029] For example, a feature obtained by inputting the first data into the first inference model may be input into the discriminant model to obtain a fourth inference result, and in training the discriminant model, a fourth error indicating the difference between the first inference result and the fourth inference result may be further used to train the discriminant model by machine learning.
[0030] According to the above aspect, the discriminant model is trained by further using the difference between the first inference result and the inference result (fourth inference result) by the discriminant model for the feature obtained from the first inference model. This reduces the difference between the inference result of the discriminant model and the inference result of the first inference model, thereby making it possible to further reduce the difference in inference results that may occur when a new second inference model is obtained based on the first inference model. Therefore, the above information processing method can further reduce the difference in inference results that occur between two inference models.
[0031] For example, noise may be further added to the second inference result, and in obtaining the second discrimination information, the second inference result with the noise added thereto may be input to the discrimination model to obtain the second discrimination information.
[0032] According to the above aspect, it is possible to prevent the discriminant model from being able to easily distinguish between the first inference result and the second inference result. As the training of the discriminant model progresses, it becomes easier to distinguish between the first inference result and the second inference result, and training of the second inference model using the discrimination information may stagnate. However, according to the above aspect, noise is added to at least the second inference result, making it difficult for the discriminant model to make a distinction. As a result, it is possible to prevent training of the second inference model from stagnation.
[0033] For example, the noise may be determined based on a discrete width of the second inference result.
[0034] According to the above aspect, it is possible to prevent the discriminant model from discriminating the inference result using the discrete range of the inference result as a feature, while retaining the characteristics of the inference result.
[0035] For example, the noise may include Gaussian noise, and an amplitude of a distribution of the Gaussian noise may be determined based on a standard deviation of the Gaussian noise and a discrete width of the second inference result.
[0036] According to the above aspect, it is possible to control the range of the discrete width covered by the Gaussian noise. Therefore, it is possible to determine the Gaussian noise to an extent that the discrimination model cannot discriminate, and it is possible to suppress excess or deficiency of noise.
[0037] For example, the amplitude of the Gaussian noise distribution may be determined for each predetermined range of element components of the second inference result.
[0038] For example, the amplitude of the Gaussian noise distribution may be determined for each predetermined range of channel components of the second inference result.
[0039] According to the above aspect, since the amplitude is determined for each predetermined range of each component, it is possible to determine the noise for each predetermined range of each component. Therefore, it is possible to add noise for each predetermined range of each component that makes it difficult for the discrimination model to discriminate.
[0040] For example, the noise may be added to a portion of the second inference result having a predetermined element component.
[0041] For example, the noise may be added to a portion of the second inference result having a predetermined channel component.
[0042] According to the above aspect, it is possible to add noise to each of the predetermined ranges of each component such that the discrimination model is difficult to discriminate.
[0043] For example, further, noise may be added to the second inference result, and in obtaining the second discrimination information, the second inference result with the noise added thereto may be input to the discrimination model to obtain the second discrimination information, the noise may include Gaussian noise, the Gaussian noise may be determined based on a discrete width of the second inference result, and the discrete width may be determined based on a conversion setting in the conversion process.
[0044] According to the above aspect, since the discrete width is determined in consideration of the content of the conversion and the noise is determined based on the discrete width, it is possible to add noise suitable for the inference result output by the converted inference model. Therefore, it is possible to effectively suppress the influence of the discretization of the inference result caused by the conversion of the inference model on the discrimination process of the discrimination model.
[0045] For example, the first data and the second data may be image data.
[0046] According to the above aspect, when a new inference model is obtained based on an inference model used for inference on image data, the difference in inference results between the two inference models can be reduced.
[0047] Moreover, an information processing system according to one aspect of the present invention includes an acquisition unit that acquires third data, and an inference unit that inputs the third data acquired by the acquisition unit into a second inference model, and acquires and outputs a second inference result, wherein the second inference model inputs first data into the first inference model to acquire a first inference result, inputs the first data into the second inference model to acquire a second inference result, inputs the first inference result into a discrimination model that outputs discrimination information that discriminates whether input information is an output of the first inference model or an output of the second inference model, inputs the first inference result to acquire first discrimination information that is the discrimination information about the input first inference result, acquires a first error that indicates a difference between the first discrimination information and correct answer information that indicates that the information is an output of the first inference model, and inputs the second inference result to the discrimination model. and acquiring second discrimination information, which is the discrimination information about the input second inference result, acquiring a second error indicating a difference between the second discrimination information and correct answer information indicating that the result is the output of the second inference model, training the discrimination model by machine learning to reduce the first error and the second error, inputting second data into the second inference model to acquire a third inference result, inputting the third inference result into the trained discrimination model to acquire third discrimination information, which is the discrimination information about the input third inference result, acquiring a third error indicating a difference between the second discrimination information and correct answer information indicating that the result is the output of the first inference model, and training the second inference model by machine learning to reduce the third error.
[0048] According to the above aspect, the information processing system can perform inference processing using a new inference model generated based on an existing inference model so as to reduce the difference in inference results, and output the inference results.
[0049] Moreover, an information processing system according to one aspect of the present invention includes an acquisition unit that acquires third data, and an inference unit that inputs the third data acquired by the acquisition unit into a second inference model, and acquires and outputs a second inference result, wherein the second inference model inputs first data into the first inference model to acquire a first inference result, inputs the first data into the second inference model to acquire a second inference result, inputs the first inference result into a discrimination model that outputs discrimination information that discriminates whether the input information is an output of the first inference model or an output of the second inference model, acquires first discrimination information which is the discrimination information about the input first inference result, acquires a first error indicating a difference between the first discrimination information and correct answer information indicating that the information is the output of the first inference model, inputs the second inference result into the discrimination model, and outputs a second inference result. and training the discriminant model by machine learning to reduce the first error and the second error, inputting second data into the second inference model to obtain a third inference result, inputting the third inference result into the trained discriminant model to obtain third discrimination information which is the discrimination information for the input third inference result, obtaining a third error which indicates the difference between the third discrimination information and correct answer information which indicates the output of the first inference model, training the third inference model by machine learning to reduce the third error, and updating the second inference model by a conversion process that converts the trained third inference model.
[0050] According to the above aspect, the information processing system can perform inference processing using a new inference model generated based on an existing inference model so as to reduce the difference in inference results, and output the inference results.
[0051] These comprehensive or specific aspects may be realized as a system, an apparatus, an integrated circuit, a computer program, or a recording medium such as a computer-readable CD-ROM, or may be realized as any combination of a system, an apparatus, an integrated circuit, a computer program, or a recording medium.
[0052] Hereinafter, the embodiment will be specifically described with reference to the drawings.
[0053] The embodiments described below are all comprehensive or specific examples. The numerical values, shapes, materials, components, component arrangement and connection forms, steps, and order of steps shown in the following embodiments are merely examples and are not intended to limit the present invention. Furthermore, among the components in the following embodiments, components that are not described in an independent claim showing a top concept are described as optional components.
[0054] (Embodiment 1) In this embodiment, an information processing method and an information processing system are described that reduce the difference in inference results that may occur when obtaining a new inference model based on an inference model. Hereinafter, the information processing method is also simply referred to as a processing method, and the information processing system is also simply referred to as a processing system.
[0055] 1 is a block diagram showing the functional configuration of a processing system 10 according to the present embodiment. The processing system 10 is a system for obtaining a new inference model configured to output the same inference result as an existing inference model.
[0056] 1, processing system 10 includes a recognition unit 11, a discrimination unit 12, a calculation unit 13, a discrimination training unit 14, and a discrimination training unit 15. Each functional unit included in processing system 10 can be realized by a processor (e.g., a CPU (Central Processing Unit)) (not shown) executing a predetermined program using a memory. Note that processing system 10 may be realized as a single device, or may be realized by multiple devices capable of communicating with each other.
[0057] The identification unit 11 is a functional unit that identifies input data (also referred to as input data) using an identification model, which is an inference model. The identification model is, for example, a neural network model. The input data is, for example, image data, and this case will be described as an example, but the input data may be any sensing data from which correct answer data can be obtained, such as voice data output from a microphone, point cloud data output from a radar such as LiDAR (Light Detection and Ranging), pressure data output from a pressure sensor, temperature data or humidity data output from a temperature sensor or humidity sensor, or scent data output from a scent sensor. The input data corresponds to the first data and the second data.
[0058] The discrimination unit 11 acquires networks A and B as neural networks used in a discrimination model for discriminating input data. More specifically, the discrimination unit 11 acquires coefficients included in each of networks A and B. The discrimination model using network A corresponds to an "existing inference model" and is also referred to as a first inference model. The discrimination model using network B corresponds to a new inference model configured to output the same inference result as the existing inference model and is also referred to as a second inference model. The discrimination model using network B is trained by the discrimination training unit 15 so as to output the same discrimination result as the discrimination model using network A (described later).
[0059] The discrimination unit 11 outputs a discrimination result (also referred to as a first inference result) indicating the result of discriminating the input data with a discrimination model using network A. The discrimination unit 11 also outputs a discrimination result (also referred to as a second inference result) indicating the result of discriminating the input data with network B. The discrimination unit 11 also outputs a discrimination result (also referred to as a third inference result) indicating the result of discriminating the input data with a discrimination model using network B, which has been trained by the discrimination training unit 15.
[0060] The classification result is information indicating the result of classifying image data, which is input data, and includes, for example, information indicating objects or situations shown in the image data, or attributes thereof. The classification result may also include feature amounts, which are information indicating characteristics of the input data. The classification result may also be intermediate data in the processing of a classification model, and the feature amounts may be intermediate data.
[0061] The discrimination unit 12 is a functional unit that acquires the discrimination result by the discrimination unit 11 and discriminates whether the acquired discrimination information is a result of discrimination using a discrimination model using network A or a discrimination model using network B. The discrimination unit 12 performs the above discrimination using an inference model (also called a discrimination model). The discrimination model is, for example, a neural network model.
[0062] The discrimination unit 12 acquires from the discrimination unit 11 a result of discrimination using a discrimination model using network A (also referred to as a discrimination result by network A) and a result of discrimination using a discrimination model using network B (also referred to as a discrimination result by network B). The discrimination unit 12 inputs the discrimination result obtained from the discrimination unit 11 to the discrimination model and acquires discrimination information on the input discrimination result. The discrimination information is information indicating whether the input discrimination result is a discrimination result by network A or a discrimination result by network B, for example, information probabilistically indicating whether the discrimination result is a discrimination result by network A or a discrimination result by network B.
[0063] The calculation unit 13 is a functional unit that calculates an error between the discrimination information output by the discrimination unit 12 and the correct answer information. The calculation unit 13 acquires discrimination information indicating the result of discrimination made by the discrimination unit 12 with respect to the discrimination result by the network A, and error information (also referred to as a first error) indicating the difference from the correct answer information. Here, the correct answer information is information indicating that the discrimination information is the discrimination result by the network A. In addition, the error information is calculated by using the discrimination information and the correct answer information and performing an operation according to a loss function held by the calculation unit 13. The loss function is, for example, a function that utilizes a squared sum error of the probabilities included in the discrimination information and the correct answer information, and although this case will be described as an example, the present invention is not limited to this.
[0064] The calculation unit 13 also acquires discrimination information indicating the result of discrimination made by the discrimination unit 12 with respect to the discrimination result by network B, and error information (also referred to as a second error) indicating the difference from the correct answer information. Here, the correct answer information is information indicating that the discrimination information is the discrimination result by network B. The error information is the same as in the case where network A is used.
[0065] The calculation unit 13 also acquires discrimination information indicating the result of discrimination made by the discrimination unit 12 with respect to the discrimination result (corresponding to the third inference result) by the trained network B, and error information (also referred to as a third error) indicating the difference between the discrimination information and the correct answer information. Here, the correct answer information is information indicating that the discrimination information is the discrimination result by the network A.
[0066] The discrimination training unit 14 is a functional unit that trains the discrimination model by machine learning. The discrimination training unit 14 acquires the first error and the second error calculated by the calculation unit 13, and trains the discrimination model by machine learning so as to reduce the first error and the second error. The discrimination training unit 14 refers to the loss function held by the calculation unit 13, determines how to adjust the coefficients included in the discrimination model to reduce the first error and the second error, and updates the coefficients included in the discrimination model so as to reduce the first error and the second error. For the loss function, a well-known technique such as a method using a squared sum error can be adopted.
[0067] The discrimination training unit 15 is a functional unit that trains the discrimination model using network B by machine learning. The discrimination training unit 15 acquires the third error calculated by the calculation unit 13, and trains the discrimination model using network B by machine learning so as to reduce the third error. The discrimination training unit 15 refers to the loss function held by the calculation unit 13, determines how to adjust the coefficients included in network B to reduce the third error, and updates the coefficients included in network B so as to reduce the third error. At this time, the discrimination training unit 15 fixes the coefficients included in the discriminant model without changing them. Network B trained by updating the coefficients is input to the discrimination unit 11.
[0068] Furthermore, classification unit 11 obtains a new classification result by inputting new input data into the classification model using network B updated by classification training unit 15. Then, by using the obtained classification result as the classification information, discrimination unit 12, calculation unit 13, classification training unit 14, and classification training unit 15 execute the same processing as described above, so that processing system 10 further trains network B.
[0069] Below, an overview of updating network B by the processing system 10 will be described. Network B is updated by repeatedly training a discriminant model and training a discriminant model using network B. Below, (1) training of the discriminant model and (2) training of the discriminant model using network B will be described.
[0070] (1) Training the discriminant model Fig. 2 is an explanatory diagram showing training of a discrimination model in the processing system 10 in this embodiment. Fig. 3 is an explanatory diagram showing correct answer information used for training of a discrimination model in the processing system 10 in this embodiment.
[0071] When an input image is input, the classification unit 11 executes a classification process for classifying the image using a classification model using network A and a classification model using network B, and outputs a classification result. The classification result is, for example, information such as "dog: 70%, cat: 30%". The above classification result means that there is a 70% probability that the subject shown in the input image is a dog, and a 30% probability that the subject is a cat. The same applies hereinafter. The classification result output by the classification unit 11 is provided to the discrimination unit 12.
[0072] The discrimination unit 12 discriminates whether the discrimination result provided from the discrimination unit 11 is a discrimination result discriminated by a discrimination model using network A or a discrimination result discriminated by a discrimination model using network B, using a discrimination model using network D. The discrimination information is, for example, information such as "A: 70%, B: 30%". This means that there is a 70% probability that the discrimination result is a discrimination result discriminated by a discrimination model using network A, and a 30% probability that the discrimination result is a discrimination result discriminated by a discrimination model using network B.
[0073] The calculation unit 13 calculates the error between the discrimination information output by the discrimination unit 12 and the correct answer information for network A. Specifically, when the calculation unit 13 obtains discrimination information of "A: 70%, B: 30%" as the discrimination result for the discrimination result in the discrimination model using network A, the calculation unit 13 compares this discrimination information with the correct answer information "A: 100%, B: 0%" indicating the discrimination result in the discrimination model using network A (see FIG. 3). Then, the calculation unit 13 obtains an error calculated from 0.09, which is the square of the difference (1-0.7) in the probability related to network A between the discrimination information and the correct answer information.
[0074] Similarly, the calculation unit 13 calculates the error between the discrimination information output by the discrimination unit 12 and the correct answer information for network B in the same manner as described above. That is, when the calculation unit 13 obtains discrimination information of "A: 70%, B: 30%" as the discrimination result for the discrimination result in the discrimination model using network B, the calculation unit 13 compares it with the correct answer information "A: 0%, B: 100%" indicating the discrimination result in the discrimination model using network B (see FIG. 3). Then, the calculation unit 13 obtains the error calculated from 0.49, which is the square of the difference (1-0.3) in the probability related to network B between the discrimination information and the correct answer information.
[0075] Discrimination training unit 14 adjusts the coefficients included in network D so as to reduce the error calculated by calculation unit 13. At this time, discrimination training unit 14 refers to the loss function and adjusts the coefficients so that the error is reduced by adjusting the coefficients. In this manner, discrimination training unit 14 updates network D by adjusting the coefficients of network D.
[0076] (2) Training a classification model using Network B Fig. 4 is an explanatory diagram showing training of a discrimination model in the processing system 10 in this embodiment. Fig. 5 is an explanatory diagram showing correct answer information used for training of a discrimination model in the processing system 10 in this embodiment.
[0077] 4, when an input image is input to the classification unit 11, the classification unit 11 executes a classification process for classifying the image by a classification model using the network B, and outputs a classification result. The classification result is, for example, information such as "dog: 80%, cat: 20%." The classification result output by the classification unit 11 is provided to the discrimination unit 12.
[0078] The discrimination unit 12 discriminates whether the discrimination result provided from the discrimination unit 11 is a discrimination result obtained by a discrimination model using network A or a discrimination result obtained by a discrimination model using network B, using a discrimination model using network D. The discrimination result is obtained as discrimination information such as "A: 20%, B: 80%", for example.
[0079] The calculation unit 13 calculates the difference between the discrimination information output by the discrimination unit 12 and the correct answer information. Specifically, when the calculation unit 13 obtains discrimination information of "A: 20%, B: 80%" as the discrimination result for the discrimination result in the discrimination model using network B, the calculation unit 13 compares it with the correct answer information "A: 100%, B: 0%" indicating the discrimination result in the discrimination model using network A (see FIG. 5). Then, the calculation unit 13 obtains an error calculated from 0.64, which is the square of the difference (1-0.2) in the probability related to network A between the discrimination information and the correct answer information.
[0080] Then, discrimination training unit 15 adjusts the coefficients included in network B so as to reduce the error calculated by calculation unit 13. At this time, discrimination training unit 15 leaves the coefficients included in network D fixed and unchanged.
[0081] When discriminative training unit 15 adjusts the coefficients included in network B, it refers to the loss function and adjusts the coefficients so as to reduce the error by adjusting the coefficients. In this way, discriminative training unit 15 updates network B by adjusting the coefficients of network B.
[0082] The processing executed by the processing system 10 configured as above will be described.
[0083] FIG. 6 is a flow diagram showing the processing (also called a processing method) executed by the processing system 10 in this embodiment.
[0084] In step S101, the classification unit 11 inputs input data to a classification model using network A, and obtains a classification result by network A.
[0085] In step S102, the classification unit 11 inputs input data to a classification model using network B, and obtains a classification result by network B.
[0086] In step S103, the discrimination unit 12 acquires discrimination information by inputting the discrimination result by network A acquired by the identification unit 11 in step S101 to a discrimination model. In addition, the calculation unit 13 calculates an error between the discrimination information acquired by the discrimination unit 12 and correct answer information. The correct answer information is information indicating that the input discrimination result is a discrimination result by network A.
[0087] In step S104, the discrimination unit 12 acquires discrimination information by inputting the discrimination result by network B acquired by the discrimination unit 11 in step S102 to a discrimination model. In addition, the calculation unit 13 calculates an error between the discrimination information acquired by the discrimination unit 12 and the correct answer information. The correct answer information is information indicating that the input discrimination result is the discrimination result by network B.
[0088] In step S105, the discrimination training unit 14 uses the errors calculated in steps S103 and S104 to update the network coefficients of the discrimination model so that the discrimination model can correctly discriminate whether the discrimination result input to the discrimination model is the discrimination result of network A or B. In this way, the discrimination model is trained.
[0089] In step S106, the classification unit 11 inputs the input data to a classification model using network B, and obtains a classification result by network B.
[0090] In step S107, the discrimination unit 12 acquires discrimination information by inputting the discrimination result by network B acquired by the identification unit 11 in step S106 to the discrimination model. In addition, the calculation unit 13 calculates the error between the discrimination information acquired by the discrimination unit 12 and the correct answer information. The correct answer information is information indicating that the input discrimination result is the discrimination result by network A.
[0091] In step S108, discrimination training unit 15 updates the coefficients of network B using the error calculated in step S107 so that discrimination unit 12 discriminates that the discrimination result of network B is the discrimination result of network A.
[0092] Through the above series of processes, the processing system 10 trains a discrimination model that can appropriately distinguish between a discrimination result by network A and a discrimination result by network B, and then uses the trained discrimination model to update the coefficients of network B so that a discrimination result by network B can be distinguished as a discrimination result by network A, thereby training a discrimination model using network B. As a result, the discrimination model using network B is trained to output the same inference result as the discrimination model using network A. In this way, the processing system 10 can reduce differences in discrimination results that may occur when a discrimination model using network B is obtained based on a discrimination model using network A.
[0093] Next, a description will be given of an inference system 20 that uses the network B obtained by the processing system 10. The inference system is also called an information processing system.
[0094] FIG. 7 is a block diagram showing the functional configuration of the inference system 20 in this embodiment.
[0095] 7, the inference system 20 includes an acquisition unit 21 and an inference unit 22. Each functional unit included in the inference system 20 can be realized by a processor (e.g., a CPU) (not shown) executing a predetermined program using a memory.
[0096] The acquisition unit 21 is a functional unit that acquires input data (also referred to as input data). The input data is, for example, image data, similar to the data input to the processing system 10. The acquisition unit 21 provides the acquired input data to the inference unit 22. The input data corresponds to third data.
[0097] The inference unit 22 is a functional unit that inputs the input data acquired by the acquisition unit 21 into an inference model (corresponding to a second inference model), acquires an inference result, and outputs it. The inference model used by the inference unit 22 to obtain an inference result is a discrimination model using network B trained by the processing system 10.
[0098] FIG. 8 is a flow diagram showing the processing executed by the inference system 20 in this embodiment.
[0099] As shown in FIG. 8, in step S201, the acquiring unit 21 acquires input data.
[0100] In step S202, the inference unit 22 inputs the input data acquired by the acquisition unit 21 into an inference model, and acquires and outputs an inference result.
[0101] In this way, the inference system 20 can perform inference processing using a new inference model generated based on an existing inference model to reduce the difference in inference results, and output the inference results.
[0102] As described above, the information processing method of the present embodiment trains a discrimination model capable of appropriately discriminating between the first inference result and the second inference result, and then trains the second inference model so that the second inference result is discriminated to be the first inference result using the trained discrimination model. As a result, the second inference model is trained to output the same inference result as the first inference model. That is, the information processing method can reduce the difference in the inference result occurring between the first inference model and the second inference model. Therefore, the difference in the inference result occurring between the two inference models can be reduced. Specifically, the difference in the inference result that may occur when a new second inference model is obtained based on the first inference model can be reduced. In this way, the information processing method can reduce the difference in the inference result that may occur when a new inference model is obtained based on an inference model.
[0103] Furthermore, since the trained second inference model is further trained using new first data (in other words, the training is repeated recursively), it is possible to further reduce the difference in inference results that may occur when a new second inference model is obtained based on the first inference model. Therefore, the above information processing method can further reduce the difference in inference results that occur between two inference models.
[0104] In addition, when a new inference model is obtained based on an inference model used for inference on image data, the difference in inference results between the two inference models can be reduced.
[0105] In addition, the information processing system can execute inference processing using a new inference model that is generated based on an existing inference model so as to reduce the difference in inference results, and output the inference results.
[0106] (Embodiment 2) In this embodiment, an information processing method and an information processing system that reduce the difference in inference results that may occur when a new inference model is obtained based on an inference model will be described, with a configuration different from that in embodiment 1. Note that the same components as those in embodiment 1 are given the same reference numerals, and detailed descriptions will be omitted.
[0107] 9 is a block diagram showing the functional configuration of a processing system 10A according to the present embodiment. The processing system 10A according to the present embodiment is a system for obtaining a new inference model configured to output the same inference result as an existing inference model.
[0108] Here, the format of the existing inference model is different from the format of the new inference model. Specifically, the coefficients of the network constituting the existing inference model are expressed in floating-point format, and the coefficients of the network constituting the new inference model are expressed in fixed-point format. In this case, the processing system 10A can be said to be a system for obtaining a new network expressed in fixed-point format by quantizing the existing inference model expressed in floating-point format.
[0109] 9, processing system 10A includes a recognition unit 11, a discrimination unit 12, a calculation unit 13, a discrimination training unit 14, a discrimination training unit 15A, and a conversion unit 16. As in the first embodiment, each functional unit included in processing system 10A can be realized by a processor (e.g., a CPU) (not shown) executing a predetermined program using a memory.
[0110] Among the components of processing system 10A, recognition unit 11, discrimination unit 12, calculation unit 13, and discrimination training unit 14 are the same as those in processing system 10 of embodiment 1. Discrimination training unit 15A and conversion unit 16 will be described in detail below.
[0111] The discrimination training unit 15A is a functional unit that trains the discrimination model using the network B1 by machine learning. The discrimination training unit 15A acquires the third error calculated by the calculation unit 13, and trains the discrimination model using the network B1 by machine learning so as to reduce the third error. The discrimination training unit 15A refers to the loss function held by the calculation unit 13, determines how to adjust the coefficients included in the network B1 to reduce the third error, and updates the coefficients included in the network B1 so as to reduce the third error. At this time, the discrimination training unit 15A fixes the coefficients included in the discriminant model without changing them. The discrimination training unit 15A provides the trained network B1 to the conversion unit 16.
[0112] Conversion unit 16 is a functional unit that performs conversion processing on the coefficients of network B1 to obtain network B. Conversion unit 16 acquires network B1 trained by discriminative training unit 15A, and updates network B by performing a predetermined conversion processing on the coefficients of network B1.
[0113] Furthermore, classification unit 11 obtains a new classification result by inputting new input data into the updated classification model using network B. Then, by using the obtained classification result as the above-mentioned classification information, discrimination unit 12, calculation unit 13, discrimination training unit 14, discrimination training unit 15A, and conversion unit 16 execute the same processes as those described above, so that processing system 10A further updates network B.
[0114] The conversion process includes, for example, a process of reducing the weight of the network B1. The reduction process includes, for example, a process of quantizing the network B1. For example, if the network B1 is a neural network model, the quantization process may include a process of converting coefficients of the neural network model from a floating-point format to a fixed-point format. The reduction process may also include a process of reducing nodes of the neural network model, or a process of reducing connections of nodes of the neural network model.
[0115] FIG. 10 is an explanatory diagram showing training of a discrimination model in the processing system 10A in this embodiment.
[0116] The process from when an input image is input to the discrimination unit 11 until when the calculation unit 13 calculates the error is the same as that in the processing system 10 in the first embodiment.
[0117] After the error is calculated by calculation unit 13, discrimination training unit 15A adjusts the coefficients included in network B1 so as to reduce the error calculated by calculation unit 13. At this time, discrimination training unit 15A fixes the coefficients included in network D without changing them.
[0118] When discriminative training unit 15A adjusts the coefficients included in network B1, it refers to the loss function and adjusts the coefficients so as to reduce the error by adjusting the coefficients. In this way, discriminative training unit 15A updates network B1 by adjusting the coefficients of network B1.
[0119] Conversion unit 16 obtains network B1 trained by discriminative training unit 15A, and performs conversion processing on the coefficients of network B1 to obtain a new network B.
[0120] The processing executed by the processing system 10A configured as above will be described.
[0121] FIG. 11 is a flow diagram showing a process (also called a processing method) executed by the processing system 10A in this embodiment.
[0122] The processes included in steps S101 to S107 shown in FIG. 11 are the same as those of the processing system 10 in the first embodiment (see FIG. 6).
[0123] In step S121, discrimination training unit 15A updates the coefficients of network B1 using the error calculated in step S107 so that discrimination unit 12 discriminates that the discrimination result of network B is the discrimination result of network A.
[0124] In step S122, conversion unit 16 acquires network B1 whose coefficients have been updated by discriminative training unit 15A in step S121, and acquires network B by converting the coefficients of network B1.
[0125] In step S123, the conversion unit 16 updates the network B input to the identification unit 11 with the network B acquired in step S122.
[0126] Through the above series of processes, the processing system 10A trains a discrimination model that can appropriately distinguish between a discrimination result by network A and a discrimination result by network B, and then uses the trained discrimination model to update the coefficients of network B1 so that a discrimination result by network B can be distinguished as a discrimination result by network A, thereby training a discrimination model using network B1. Furthermore, the discrimination model using network B is updated by obtaining network B from the updated network B1 through a conversion process. As a result, the discrimination model using network B is trained to output the same inference result as the discrimination model using network A. In this way, the processing system 10A can reduce the difference in discrimination results that may occur when obtaining a discrimination model using network B based on a discrimination model using network A.
[0127] As described above, the information processing method of the present embodiment trains a discrimination model capable of appropriately discriminating between the first inference result and the second inference result, and then trains a third inference model so that the second inference result is discriminated to be the first inference result using the trained discrimination model. Then, the second inference model is obtained from the trained third inference model by a conversion process, thereby updating the second inference model. As a result, the second inference model is trained to output the same inference result as the first inference model. That is, the information processing method can reduce the difference in the inference result that occurs between the first inference model and the second inference model. Therefore, the difference in the inference result that occurs between the two inference models can be reduced. Specifically, the difference in the inference result that may occur when a new second inference model is obtained based on the first inference model can be reduced. In this way, the information processing method can reduce the difference in the inference result that may occur when a new inference model is obtained based on an inference model.
[0128] Furthermore, the trained third inference model is further trained using new first data to obtain a second inference model (in other words, the training is repeated recursively), which can further reduce the difference in inference results that may occur when a new second inference model is obtained based on the first inference model. Therefore, the above information processing method can further reduce the difference in inference results that occur between two inference models.
[0129] Also, the second inference model is obtained by reducing the weight of the neural network model, which is the third inference model. Thus, it is possible to reduce the difference in inference results that may occur when a new lightweight second inference model is obtained based on the first inference model. Thus, the above information processing method can reduce the difference between the two inference models when a new lightweight inference model is obtained based on an inference model. Therefore, even in an environment with limited computational resources, such as an IoT device, it is possible to apply a second inference model that is close to the behavior of the first inference model while maintaining inference performance.
[0130] In addition, the second inference model is obtained by quantizing the neural network model, which is the third inference model. Therefore, the neural network model can be made lighter without changing the network structure, and the fluctuations in inference performance and inference results (behavior) before and after the reduction in weight can be suppressed.
[0131] In addition, the coefficients of the neural network model, which is the third inference model, are converted from floating-point format to fixed-point format to obtain the second inference model. This makes it possible to adapt the model to a general embedded environment while suppressing fluctuations in inference performance and inference results (behavior).
[0132] In addition, the second inference model is obtained by reducing the number of nodes or the number of node connections of the neural network model, which is the third inference model. Therefore, since the reduction in the number of nodes and the number of node connections directly leads to a reduction in the amount of calculation, the second inference model can be adapted to environments with severe constraints on calculation resources.
[0133] (Embodiment 3) In this embodiment, an information processing method and an information processing system that reduce the difference in inference results that may occur when a new inference model is obtained based on an inference model will be described, with a configuration different from that in embodiment 1. Note that the same components as those in embodiment 1 are given the same reference numerals, and detailed descriptions will be omitted.
[0134] 12 is a block diagram showing the functional configuration of a processing system 10B in this embodiment. The processing system 10B in this embodiment is a system for obtaining a new inference model that refers to an existing inference model and outputs the same inference result as the existing inference model.
[0135] FIG. 12 is a block diagram showing the functional configuration of a processing system 10B according to the present embodiment.
[0136] 12, the processing system 10B includes a recognition unit 11B, a discrimination unit 12B, a first calculation unit 13B, a discrimination training unit 14B, a discrimination training unit 15B, and a second calculation unit 18. Each functional unit included in the processing system 10B can be realized by a processor (e.g., a CPU) (not shown) executing a predetermined program using a memory. Note that the processing system 10B may be realized as a single device, or may be realized by multiple devices capable of communicating with each other.
[0137] Similar to the identification unit 11 of embodiment 1, the identification unit 11B is a functional unit that identifies input data using an identification model, which is an inference model, and outputs the identification results of networks A and B (i.e., the first inference result, the second inference result and the third inference result).
[0138] Furthermore, the classification unit 11B provides the classification result by network A (that is, the first inference result) to the second calculation unit 18, and outputs the feature map obtained as the classification result by network A to the discrimination unit 12B.
[0139] Similar to the discrimination unit 12 in the first embodiment, the discrimination unit 12B inputs the classification result obtained from the classification unit 11B to a discrimination model and acquires discrimination information on the input classification result. In addition, the discrimination unit 12B acquires the feature map output by the classification unit 11B, and outputs the classification result output by inputting the feature map to the discrimination model to the second calculation unit 18.
[0140] The first calculation unit 13B has the same function as the calculation unit 13 in the first embodiment.
[0141] The second calculation unit 18 acquires the classification result by the network A from the classification unit 11B, and also acquires the classification result by a discriminant model that uses the feature map as an input. Then, the second calculation unit 18 calculates the error (corresponding to the fourth error) between the two acquired classification results.
[0142] Discrimination training unit 14B is a functional unit that trains the discrimination model by machine learning, similar to discrimination training unit 14 in embodiment 1. Discrimination training unit 14B acquires the first error and the second error calculated by calculation unit 13, and also acquires the third error calculated by second calculation unit 18. Then, discrimination training unit 14B trains the discrimination model by machine learning so as to reduce the first error, the second error, and the third error.
[0143] Discrimination training unit 15B is a functional unit that trains a discrimination model by machine learning, similar to discrimination training unit 15 in embodiment 1. Discrimination training unit 15B acquires the third error calculated by first calculation unit 13B, and also acquires the fourth error calculated by second calculation unit 18. Then, discrimination training unit 15B trains the discrimination model using network B by machine learning so as to reduce the third error and the fourth error.
[0144] Below, an overview of updating network B by processing system 10B will be described. Network B is updated by repeatedly training a discriminant model and training a discrimination model using network B. Below, (1) training of the discriminant model and (2) training of the discrimination model using network B will be described.
[0145] (1) Training the discriminant model Fig. 13 is an explanatory diagram showing training of a discrimination model in the processing system 10B in this embodiment. Fig. 14 is an explanatory diagram showing correct answer information used for training of a discrimination model in the processing system 10B in this embodiment.
[0146] Similar to the classification unit 11 in the first embodiment, when an input image is input, the classification unit 11B executes a classification process for classifying the image using a classification model using network A and a classification model using network B, and outputs a classification result. Furthermore, the classification unit 11B provides a feature map obtained as a result of classifying the input data using network A to the discrimination unit 12B.
[0147] Similarly to the discrimination unit 12 in the first embodiment, the discrimination unit 12B discriminates whether the discrimination result provided from the discrimination unit 11B is a discrimination result obtained by a discrimination model using the network A or a discrimination result obtained by a discrimination model using the network B, using a discrimination model using the network D, and provides discrimination information indicating the discrimination result to the first calculation unit 13B. Furthermore, the discrimination unit 12B provides the discrimination result obtained by inputting the feature map provided from the discrimination unit 11B to the discrimination model to the second calculation unit 18. The discrimination result is information indicating the result of discriminating the input feature map, and includes, for example, information indicating objects or situations reflected in the image data that is the input data from which the feature map is generated, or their attributes.
[0148] The first calculation unit 13B calculates the difference (first error and second error) between the discrimination information output by the discrimination unit 12 and the correct answer information, similarly to the calculation unit 13 in the first embodiment.
[0149] The second calculation unit 18 acquires the classification result by the network A from the classification unit 11B, and also acquires the classification result by the discriminant model for the feature map from the discrimination unit 12B. Then, the second calculation unit 18 calculates the error (corresponding to the fourth error) between the two acquired classification results. If the classification result by the network A is information such as "dog: 90%, cat: 10%" and the classification result by the discriminant model is information such as "dog: 80%, cat: 20%", the error calculated from 0.01, which is the square of (0.9-0.8), is obtained. The classification result by the network A is treated as correct answer information for training the discriminant model (see FIG. 14).
[0150] Discrimination training unit 14B is a functional unit that trains the discrimination model by machine learning. Discrimination training unit 14B adjusts the coefficients included in network D so as to reduce the errors (first error, second error, fourth error) calculated by first calculation unit 13B and second calculation unit 18. At this time, discrimination training unit 14B refers to a loss function and adjusts the coefficients so as to reduce the errors by adjusting the coefficients. In this way, discrimination training unit 14B trains the discrimination model by updating by adjusting the coefficients of network D.
[0151] (2) Training a classification model using Network B Fig. 15 is an explanatory diagram showing training of a discrimination model in the processing system 10B in this embodiment. Fig. 16 is an explanatory diagram showing correct answer information used for training of a discrimination model in the processing system 10B in this embodiment.
[0152] When an input image is input, the classification unit 11B executes a classification process for classifying the image by a classification model using the network B, and outputs a classification result. The classification result is, for example, information such as "dog: 80%, cat: 20%." The classification result output by the classification unit 11B is provided to the discrimination unit 12B.
[0153] Similar to the discrimination unit 11 in the first embodiment, the discrimination unit 12B discriminates whether the discrimination result provided from the discrimination unit 11B is a discrimination result obtained by a discrimination model using the network A or a discrimination result obtained by a discrimination model using the network B, using a discrimination model using the network D. In addition, the discrimination unit 12B provides the second calculation unit 18 with the discrimination result obtained by inputting the feature map provided from the discrimination unit 11B to the discrimination model.
[0154] The first calculation unit 13B calculates a difference (third error) between the discrimination information output by the discrimination unit 12 and the correct answer information.
[0155] The second calculation unit 18 acquires the classification result by network A from the classification unit 11B, and also acquires the classification result by the discriminant model that uses the feature map as an input from the discrimination unit 12B. Then, the second calculation unit 18 calculates the error (corresponding to the fourth error) between the two acquired classification results. If the classification result by network A is information such as "dog: 90%, cat: 10%" and the classification result by the discriminant model is information such as "dog: 80%, cat: 20%", the error calculated from 0.01, which is the square of (0.9-0.8), is obtained. The classification result by network A is treated as correct answer information for training network B (see FIG. 16).
[0156] Discrimination training unit 15B adjusts the coefficients included in network B so as to reduce the errors (third error, fourth error) calculated by first calculation unit 13B and second calculation unit 18. At this time, discrimination training unit 15B fixes the coefficients included in network D without changing them.
[0157] When discriminative training unit 15B adjusts the coefficients included in network B, it refers to the loss function and adjusts the coefficients so as to reduce the error by adjusting the coefficients. In this way, discriminative training unit 15B updates network B by adjusting the coefficients of network B.
[0158] The processing executed by the processing system 10B configured as above will be described.
[0159] FIG. 17 is a flow diagram showing the processing executed by the processing system 10B in this embodiment.
[0160] The processes included in steps S101 to S104 shown in FIG. 17 are the same as those of the processing system 10 in the first embodiment (see FIG. 6).
[0161] In step S141, the classification unit 11B acquires a feature map as a classification result by the network A.
[0162] In step S142, the discrimination unit 12B inputs the feature map to the discrimination model and acquires a discrimination result of the feature map using the discrimination model.
[0163] In step S143, the second calculation unit 18 calculates the error between the classification result by network A and the classification result by the feature map.
[0164] In step S105A, discrimination training unit 14B updates the network coefficients of the discrimination model so that discrimination results can be correctly determined as to whether they are due to network A or network B, and so that the discrimination model performs the same discrimination as network A.
[0165] The processes in steps S106 and S107 are the same as those in the processing system 10 in the first embodiment (see FIG. 6).
[0166] In step S151, the classification unit 11B acquires a feature map as a classification result by the network A.
[0167] In step S152, the discrimination unit 12B inputs the feature map to the discrimination model and acquires a discrimination result of the feature map using the discrimination model.
[0168] In step S153, the second calculation unit 18 calculates the error between the classification result by the network A and the classification result by the feature map.
[0169] In step S108A, discrimination training unit 15B updates the coefficients of network B so that the discrimination result by network B is discriminated to be the discrimination result of network A and so that the discrimination model makes the same discrimination as network A.
[0170] The processing system 10B of this embodiment may further include the conversion unit 16 of the second embodiment.
[0171] As described above, the information processing method of this embodiment further trains the discriminant model using the difference between the inference result (fourth inference result) by the discriminant model for the feature obtained from the first inference model and the first inference result. This reduces the difference between the inference result of the discriminant model and the inference result of the first inference model, thereby making it possible to further reduce the difference in inference results that may occur when a new second inference model is obtained based on the first inference model. Therefore, the above information processing method can further reduce the difference in inference results that occur between two inference models.
[0172] In the training of the discrimination model using network B in the above-mentioned third embodiment, the discrimination model using network A is used, but the form of training is not limited to this. For example, a discrimination model using network B may be trained without a discrimination model using network A. In this case, the processing configuration is substantially the same as that of the training of the discrimination model using network B in the second embodiment. The discrimination model is trained using the discrimination result of the discrimination model using network A.
[0173] (Embodiment 4) In this embodiment, an information processing method and an information processing system that reduce the difference in inference results that may occur when a new inference model is obtained based on an inference model will be described, with a configuration different from that in embodiments 1 to 3. Note that the same components as those in the configurations in embodiments 1 to 3 are given the same reference numerals, and detailed description will be omitted.
[0174] 18 and 19 are block diagrams showing the functional configuration of a processing system 10C according to this embodiment. The processing system 10C includes a noise adding unit 19 in addition to a recognition unit 11, a discrimination unit 12, a calculation unit 13, a discrimination training unit 14, and a discrimination training unit 15.
[0175] The noise adding unit 19 adds noise to the inference result. For example, as shown in FIG. 18, the noise adding unit 19 adds noise to the identification result of the identification model using network A and the identification result of the identification model using network B. For example, when the weight reduction process is a quantization process, the noise may be Gaussian noise. Also, for example, when the weight reduction process is a process of reducing nodes or reducing node connections, the noise may be noise generated by restoring a part of the weight connected to the deleted node or the weight related to the deleted connection. The type of noise is not limited to this. The identification result to which noise has been added is input to the discrimination unit 12.
[0176] Note that the noise adding unit 19 may add noise only to the second inference result. For example, as shown in Fig. 19, the noise adding unit 19 adds noise to the classification result of the classification model using network B. The classification result to which noise has been added is input to the discrimination unit 12. In this case, the first inference result, i.e., the classification result of the classification model using network A, is input to the discrimination unit 12 as is without adding noise.
[0177] Next, a method of adding noise when the inference result is a feature amount (feature map) will be described with reference to Fig. 20. Fig. 20 is a schematic diagram for explaining a method of adding noise added by the noise adding unit 19 in this embodiment.
[0178] The noise adding unit 19 adds noise to the entire inference result. For example, as shown in P1 of Fig. 20, noise is added to all element components and channel components of the inference result. In Fig. 20, the element component is indicated by element E, the height component and width component of the element are indicated by height H and width W, and the channel component is indicated by channel C.
[0179] The noise adding unit 19 may add noise to a part of the inference result. Specifically, the noise adding unit 19 may add noise to a part of the inference result having a predetermined element component. For example, as shown in P2 of FIG. 20, noise is added to a part of the inference result that corresponds to a predetermined element component of the inference result. The predetermined element component may be determined randomly.
[0180] The noise adding unit 19 may also add noise to a part of the inference result having a predetermined channel component. For example, as shown in P3 of Fig. 20, noise is added to a part of the inference result that corresponds to the predetermined channel component of the inference result. The predetermined channel component may be determined randomly.
[0181] The processing executed by the processing system 10C configured as above will be described.
[0182] FIG. 21 is a flow diagram showing the processing executed by the processing system 10C in this embodiment.
[0183] The processing in steps S101 to S108 shown in Fig. 21 is the same as the processing in the processing system 10 in the first embodiment (see Fig. 6). New steps S161 and S162 are added between steps S102 and S103.
[0184] In step S161, the noise adding unit 19 adds noise to the classification result of the classification model using the network A.
[0185] In step S162, the noise adding unit 19 adds noise to the classification result of the classification model using network B.
[0186] When noise is added only to the classification result of the classification model using network B, step S161 may be omitted, as shown in FIG.
[0187] As described above, in the information processing method of this embodiment, noise is added to the second inference result, and in acquiring the second discrimination information, the second inference result to which noise has been added is input to the discrimination model to acquire the second discrimination information. This makes it possible to prevent the discrimination model from being able to easily distinguish between the first inference result and the second inference result. As the training of the discrimination model progresses, it becomes easier to distinguish between the first inference result and the second inference result, and training of the second inference model using the discrimination information may stagnate. However, according to this embodiment, since noise is added to at least the second inference result, discrimination by the discrimination model becomes difficult. As a result, it is possible to prevent training of the second inference model from stagnation.
[0188] (Embodiment 5) In this embodiment, an information processing method and an information processing system that reduce the difference in inference results that may occur when a new inference model is obtained based on an inference model will be described, with a configuration different from that in embodiments 1 to 4. Note that the same components as those in the configurations in embodiments 1 to 4 are given the same symbols, and detailed descriptions will be omitted.
[0189] 23 is a block diagram showing the functional configuration of a processing system 10D according to the present embodiment. The processing system 10D includes a recognition unit 11, a discrimination unit 12, a calculation unit 13, a discrimination training unit 14, a discrimination training unit 15A, a conversion unit 16, and a noise adding unit 19D.
[0190] The noise adding unit 19D adds noise to the second inference result. The noise adding unit 19D determines the noise to be added based on the discrete width of the second inference result. Specifically, the noise adding unit 19D determines the amplitude of the distribution of the Gaussian noise based on the standard deviation and discrete width of the Gaussian noise. For example, the noise adding unit 19D determines the amplitude of the distribution of the Gaussian noise so that the width of the value equivalent to twice the standard deviation of the Gaussian noise is equal to or greater than the discrete width of the second inference result. Details will be described with reference to FIG. 24. FIG. 24 is a schematic diagram for explaining the noise added by the noise adding unit 19D in this embodiment.
[0191] FIG. 24 shows the values of the second inference result and the distribution of Gaussian noise for each of the values. In FIG. 24, the horizontal axis is the value of the second inference result, and the vertical axis is the number of values (in other words, the frequency of occurrence of the value). The distance between the values is the discrete width Δ. The amplitude of the distribution of the Gaussian noise is, for example, 2σ. If the width of the values corresponding to the amplitude is expressed by the amplitude, the noise adding unit 19D determines the Gaussian noise so that, for example, 2σ≧Δ. Note that the above amplitude is an example, and is not limited to this value as long as the discrimination model can make it difficult to distinguish between the first inference result and the second inference result.
[0192] Furthermore, a method for determining the amplitude of the distribution of Gaussian noise when the inference result is a feature amount (feature map) will be described with reference to Fig. 25. Fig. 25 is a schematic diagram for explaining a method for adding noise added by the noise adding unit 19D in this embodiment.
[0193] The noise adding unit 19D determines the amplitude for the entire inference result. For example, the amplitude is uniquely determined for all element components and channel components of the inference result, and noise is added using the determined amplitude as shown in P4 of Fig. 25. In Fig. 25, as in Fig. 20, the element component is indicated by element E, the height component and width component of the element are indicated by height H and width W, and the channel component is indicated by channel C.
[0194] The noise adding unit 19D may determine the amplitude for each part of the inference result. Specifically, the noise adding unit 19D may determine the amplitude for each predetermined range of the element component of the inference result. For example, using the amplitude determined for each predetermined range of the element component of the inference result, Gaussian noise with a different distribution is added to each predetermined range of the element component as shown in P5 of FIG. 25.
[0195] The noise adding unit 19D may also determine the amplitude for each predetermined range of the channel component of the inference result. For example, using the amplitude determined for each predetermined range of the channel component of the inference result, Gaussian noise with a different distribution is added to each predetermined range of the channel component, as shown in P6 of FIG.
[0196] Moreover, the noise determined based on the discrete width may be a noise other than Gaussian noise. Specifically, it may be a noise generated by restoring a part of the weights connected to a deleted node or weights related to a deleted connection, as described above.
[0197] If the discrete width of the first inference result can be acquired, the noise adding unit 19D may add noise to the first inference result using the above method. Furthermore, the noise added to the first inference result may be noise that is determined regardless of the discrete width (for example, Gaussian noise with a preset amplitude).
[0198] Furthermore, the range to which noise is added may be the entire inference result as in embodiment 4, or it may be a part of the inference result having a specified element component, or it may be a part of the inference result having a specified channel component.
[0199] Furthermore, the noise adding unit 19D determines the discrete width based on the conversion setting in the conversion process of the conversion unit 16. Specifically, the noise adding unit 19D determines the discrete width based on the weight reduction setting in the weight reduction process. For example, in the case of the quantization process, the discrete width is determined based on the number of bits after quantization. In addition, in the case of the process of reducing nodes or reducing node connections, the discrete width is determined based on which node in the identification model has been reduced.
[0200] The processing executed by the processing system 10D configured as above will be described.
[0201] FIG. 26 is a flow diagram showing the processing executed by the processing system 10D in this embodiment.
[0202] 26 are the same as those of the processing system 10A in the second embodiment (see FIG. 11). A new step S171 is added between steps S102 and S103, and a new step S172 is added between steps S121 and S122.
[0203] In step S171, the noise adding unit 19D adds noise of the determined amplitude to the classification result of the classification model using network B. If the amplitude determination process described below has not yet been performed, noise of an initially set amplitude is added.
[0204] Note that, as in step S161 of the flowchart in FIG. 18 of the fourth embodiment, noise may be added to the classification result of the classification model using network A.
[0205] In step S172, the noise adding unit 19D determines the discrete width of the coefficient conversion and the amplitude of the noise. Specifically, the noise adding unit 19D determines the discrete width based on the conversion setting of the conversion unit 16. The noise adding unit 19D also determines the amplitude of the noise based on the determined discrete width. In this way, the amplitude of the noise determined in step S172 is used as the amplitude of the noise added in step S171.
[0206] As described above, in the information processing method of this embodiment, the discrete width of the inference result is determined based on the conversion setting in the conversion process. As a result, the discrete width is determined taking into account the content of the conversion, and the noise is determined based on the discrete width, so that noise suitable for the inference result output by the converted inference model can be added. Therefore, the influence of the discretization of the inference result caused by the conversion of the inference model on the discrimination process of the discrimination model can be effectively suppressed.
[0207] The discrete width may be estimated from the inference result. For example, the noise adding unit 19D analyzes the distribution of data in the second inference result and estimates the discrete width based on the distribution. In this case, even if the conversion setting is not available, the noise can be determined based on the discrete width of the inference result.
[0208] In the above embodiment, each component may be configured with dedicated hardware, or may be realized by executing a software program suitable for each component. Each component may be realized by a program execution unit such as a CPU or a processor reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory. Here, the software for realizing the information processing device of the above embodiment and the above modified example is a program such as the following.
[0209] That is, this program is an information processing method executed by a processor on a computer using a memory, the method comprising: inputting first data into a first inference model to obtain a first inference result; inputting the first data into a second inference model to obtain a second inference result; inputting the first inference result into a discrimination model that outputs discrimination information that discriminates whether the input information is the output of the first inference model or the output of the second inference model to obtain first discrimination information that is the discrimination information about the input first inference result; obtaining a first error that indicates the difference between the first discrimination information and correct answer information that indicates that the information is the output of the first inference model; inputting the second inference result into the discrimination model to obtain a first error about the input second inference result. The program executes an information processing method of acquiring second discrimination information, which is the discrimination information, acquiring a second error indicating the difference between the second discrimination information and correct answer information indicating that the information is the output of the second inference model, training the discrimination model by machine learning to reduce the first error and the second error, inputting second data into the second inference model to acquire a third inference result, inputting the third inference result into the trained discrimination model to acquire third discrimination information, which is the discrimination information about the input third inference result, acquiring a third error indicating the difference between the third discrimination information and correct answer information indicating that the information is the output of the first inference model, and training the second inference model by machine learning to reduce the third error.
[0210] Moreover, this program is an information processing method executed by a processor using a memory on a computer, the method including: inputting first data into a first inference model to obtain a first inference result; inputting the first data into a second inference model to obtain a second inference result; inputting the first inference result into a discrimination model that outputs discrimination information that discriminates whether the input information is an output of the first inference model or an output of the second inference model to obtain first discrimination information that is the discrimination information for the input first inference result; obtaining a first error that indicates a difference between the first discrimination information and correct answer information that indicates that the information is the output of the first inference model; inputting the second inference result into the discrimination model to obtain second discrimination information that is the discrimination information for the input second inference result; The program executes an information processing method for updating the second inference model by obtaining a second error indicating the difference between the second discrimination information and correct answer information indicating that the information is the output of the second inference model, training the discrimination model by machine learning to reduce the first error and the second error, inputting second data into the second inference model to obtain a third inference result, inputting the third inference result into the trained discrimination model to obtain third discrimination information, which is the discrimination information about the input third inference result, obtaining a third error indicating the difference between the third discrimination information and correct answer information indicating that the information is the output of the first inference model, training the third inference model by machine learning to reduce the third error, and converting the trained third inference model.
[0211] Although the information processing device according to one or more aspects has been described based on the embodiment, the present invention is not limited to this embodiment. As long as it does not deviate from the spirit of the present invention, various modifications conceived by a person skilled in the art to this embodiment and forms constructed by combining components in different embodiments may also be included within the scope of one or more aspects. [Industrial Applicability]
[0212] The present invention can be used in a system for generating a new inference model based on an existing inference model. [Explanation of symbols]
[0213] 10, 10A, 10B, 10C, 10D Processing Systems 11, 11B Identification part 12, 12B Discrimination part 13 Calculation section 13B 1st calculation section 14, 14B Discrimination Training Department 15, 15A, 15B Identification Training Department 16 Conversion section 18 Second Calculation Section 19, 19D Noise adding section 20 Inference Systems 21 Acquisition Department 22 Reasoning part A, B, B1, D Network
Claims
1. An information processing method executed by a processor using a memory, comprising: Inputting the first data into a first inference model to obtain a first inference result; inputting the first data into a second inference model to obtain a second inference result; inputting the first inference result into a discrimination model that outputs discrimination information that discriminates whether the input information is an output of the first inference model or an output of the second inference model, thereby obtaining first discrimination information that is the discrimination information about the input first inference result; obtaining a first error indicating a difference between the first discrimination information and correct answer information indicating that the first discrimination information is an output of the first inference model; inputting the second inference result into the discriminant model to obtain second discrimination information which is the discrimination information regarding the input second inference result; obtaining a second error indicating a difference between the second discrimination information and correct answer information indicating that the second discrimination information is an output of the second inference model; training the discrimination model by machine learning so as to reduce the first error and the second error; inputting second data into the second inference model to obtain a third inference result; inputting the third inference result into the trained discriminant model to obtain third discrimination information which is the discrimination information about the input third inference result; obtaining a third error indicating a difference between the third discrimination information and correct answer information indicating that the third discrimination information is an output of the first inference model; training a third inference model by machine learning so as to reduce the third error; The second inference model is updated by a transformation process that transforms the trained third inference model. Information processing methods.
2. inputting different second data into the updated second inference model to obtain different third inference results; Further training the third inference model by machine learning based on another obtained third inference result; and further updating the second inference model by the transformation process of the further trained third inference model. The information processing method according to claim 1 .
3. the first inference model, the second inference model, and the third inference model are neural network models; The conversion process includes a process of reducing the weight of the neural network model.
3. The information processing method according to claim 1 or 2.
4. The weighting process includes a process of quantizing the neural network model. The information processing method according to claim 3.
5. The quantization process includes converting coefficients of the neural network model from a floating-point format to a fixed-point format. The information processing method according to claim 4.
6. The weight reduction process includes a process of reducing nodes of the neural network model, or a process of reducing connections of nodes of the neural network model.
5. The information processing method according to claim 3.
7. moreover, inputting a feature amount obtained by inputting the first data into the first inference model into the discriminant model to obtain a fourth inference result; In the training of the discriminant model, a fourth error indicating a difference between the first inference result and the fourth inference result is further used to train the discriminant model by machine learning. The information processing method according to any one of claims 1 to 6.
8. Furthermore, adding noise to the second inference result; In acquiring the second discrimination information, the second inference result to which the noise has been added is input to the discrimination model to acquire the second discrimination information. The information processing method according to any one of claims 1 to 7.
9. The noise is determined based on a discrete width of the second inference result. The information processing method according to claim 8.
10. the noise comprises Gaussian noise; The amplitude of the distribution of the Gaussian noise is determined based on the standard deviation of the Gaussian noise and the discrete width of the second inference result. The information processing method according to claim 9.
11. The amplitude of the Gaussian noise distribution is determined for each predetermined range of element components of the second inference result. The information processing method according to claim 10.
12. The amplitude of the Gaussian noise distribution is determined for each predetermined range of channel components of the second inference result.
12. The information processing method according to claim 10 or 11.
13. The noise is added to a part of the second inference result having a predetermined element component. The information processing method according to any one of claims 8 to 12.
14. The noise is added to a portion of the second inference result having a predetermined channel component. The information processing method according to any one of claims 8 to 13.
15. Furthermore, adding noise to the second inference result; In acquiring the second discrimination information, the second inference result to which the noise has been added is input to the discrimination model to acquire the second discrimination information; the noise comprises Gaussian noise; The Gaussian noise is determined based on a discrete width of the second inference result; The discrete width is determined based on the conversion settings in the conversion process. The information processing method according to any one of claims 1 to 6.
16. The first data and the second data are image data. The information processing method according to any one of claims 1 to 15.
17. An acquisition unit that acquires third data; an inference unit that inputs the third data acquired by the acquisition unit into a second inference model, and acquires and outputs a second inference result; The second inference model is Inputting the first data into a first inference model to obtain a first inference result; inputting the first data into a second inference model to obtain a second inference result; inputting the first inference result into a discrimination model that outputs discrimination information that discriminates whether the input information is an output of the first inference model or an output of the second inference model, thereby obtaining first discrimination information that is the discrimination information about the input first inference result; obtaining a first error indicating a difference between the first discrimination information and correct answer information indicating that the first discrimination information is an output of the first inference model; inputting the second inference result into the discriminant model to obtain second discrimination information which is the discrimination information regarding the input second inference result; obtaining a second error indicating a difference between the second discrimination information and correct answer information indicating that the second discrimination information is an output of the second inference model; training the discrimination model by machine learning so as to reduce the first error and the second error; inputting second data into the second inference model to obtain a third inference result; inputting the third inference result into the trained discriminant model to obtain third discrimination information which is the discrimination information about the input third inference result; obtaining a third error indicating a difference between the third discrimination information and correct answer information indicating that the third discrimination information is an output of the first inference model; training a third inference model by machine learning so as to reduce the third error; The second inference model is updated by a transformation process that transforms the trained third inference model. This is the second inference model obtained by Information processing system.
Citation Information
Patent Citations
Adaptive selection of artificial neural networks
US20160328644A1