Model Adaptation Device
The model adaptation device enhances deep learning model accuracy in changing environments by optimizing parameters to maximize prediction confidence and feature vector information, addressing reliability issues in conventional methods.
Patent Information
- Application Number
- JP2025082966
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2026-11-27
AI Technical Summary
Conventional techniques for adapting deep learning models to changing operating environments suffer from decreased reliability and accuracy due to significant environmental changes and noise, despite parameter updates aimed at maximizing confidence levels.
A model adaptation device that updates deep learning model parameters to maximize both the confidence level of prediction results and the information content of feature vectors, using a loss function that combines confidence level and information entropy to optimize parameter adjustments.
Improves the accuracy of deep learning models in varying operating environments by enhancing the reliability and information retention of feature vectors, thereby improving prediction accuracy.
Smart Images

Figure 2026185683000001_ABST
Abstract
Description
[Technical Field]
[0001] This invention relates to a model adaptation device for adapting a trained deep learning model to an operating environment. [Background technology]
[0002] In deep learning, the accuracy of a model can decrease if the distribution of input data changes between the training and operation phases of the model. For example, if the distribution of input data for a classification model changes between the training and operation phases of a classification model, the classification accuracy of the classification model may decrease.
[0003] To prevent such a decrease in accuracy, there is a technique to adapt a trained model to the operating environment through unsupervised learning using data from the model's operating environment. In this technique, for example, the model's parameters are updated to maximize the confidence level of the model's predictive output (e.g., the predicted probability of each class) in the operating environment (Non-Patent Literature 1).
[0004] For example, as shown in Figure 1, the parameters of the deep learning model are updated to maximize the confidence level of the prediction probabilities output by the deep learning model in the operational environment (for example, to lower the entropy of the prediction probability distribution). This improves the prediction accuracy of the deep learning model in the operational environment. [Prior art documents] [Non-patent literature]
[0005] [Non-Patent Document 1] Wang Dequan, et al., TENT:FULLY TEST-TIME ADAPTATION BY ENTROPY MINIMIZATION, International Conference on Learning Representations. 2020. [Overview of the Initiative] [Problems that the invention aims to solve]
[0006] However, the conventional techniques described above suffer from a problem where the reliability of the model's confidence level itself decreases if there are significant changes in the operating environment or if a large amount of information is lost from the input data due to strong noise. As a result, even if the parameters are updated to maximize the model's confidence level, it does not lead to an improvement in the model's accuracy.
[0007] For example, consider the case where the distribution of prediction probabilities for each class of a deep learning model in the operating environment is the distribution shown by symbol 201, as shown in Figure 2. In this case, updating the parameters to maximize the confidence level of the deep learning model's prediction probabilities may decrease the prediction accuracy of the deep learning model (see the distribution of prediction probabilities shown by symbol 202).
[0008] Therefore, the present invention aims to solve the aforementioned problems and improve the accuracy of the model in the operating environment. [Means for solving the problem]
[0009] To solve the aforementioned problems, the present invention is characterized by comprising: a data acquisition unit that inputs data obtained from the operating environment of the deep learning model to the trained deep learning model; a calculation unit that calculates the confidence level of the prediction result of the data output from the deep learning model and the amount of information contained in the feature vector of the data output from the intermediate layer of the deep learning model; and a parameter update unit that updates the parameters of the deep learning model so that the confidence level of the prediction result of the data output from the deep learning model is as high as possible and the amount of information contained in the feature vector of the data is as large as possible. [Effects of the Invention]
[0010] According to the present invention, the accuracy of the model in the operating environment can be improved. [Brief explanation of the drawing]
[0011] [Figure 1] FIG. 1 is a diagram illustrating an example of a distribution of prediction probabilities when parameters are updated to maximize the confidence of prediction probabilities output by a deep learning model in an operating environment. [Figure 2] FIG. 2 is a diagram illustrating an example of a distribution of prediction probabilities when parameters are updated to maximize the confidence of prediction probabilities output by a deep learning model in an operating environment. [Figure 3] FIG. 3 is a diagram illustrating an example of a distribution of feature vector groups. [Figure 4] FIG. 4 is a diagram illustrating a configuration example of a model adaptation device. [Figure 5] FIG. 5 is a diagram illustrating an example of a processing procedure executed by the model adaptation device. [Figure 6] FIG. 6 is a diagram for explaining zero-shot classification by CLIP. [Figure 7] FIG. 7 is a diagram illustrating ImageNet-C. [Figure 8] FIG. 8 is a diagram illustrating evaluation results of classification accuracy of CLIP whose parameters have been updated by the model adaptation device. [Figure 9] FIG. 9 is a diagram illustrating an example of a computer that executes a model adaptation program. [Mode for Carrying out the Invention]
[0012] Hereinafter, embodiments for carrying out the present invention (embodiments) will be described with reference to the drawings. The present invention is not limited to the present embodiments. Note that, as an example, a case will be described where the model targeted for adaptation by the model adaptation device of the present embodiment is a deep learning model that outputs a prediction result of a class to which input data belongs.
[0013] [Overview] An overview of the model adaptation device of the present embodiment will be described. The model adaptation device performs the following processing to adapt a trained deep learning model to the operating environment of the deep learning model.
[0014] First, the model adaptation device inputs data from the operating environment into a pre-trained deep learning model. Then, the model adaptation device obtains the feature vectors output from the hidden layers of the deep learning model and the prediction results output from the deep learning model. Subsequently, the model adaptation device updates the parameters of the deep learning model using the feature vectors and the confidence level of the prediction results output by the deep learning model.
[0015] For example, the model adaptation device updates the parameters of the deep learning model to maximize the confidence level of the prediction results output by the deep learning model, and to maximize the amount of information contained in the feature vectors (the amount of information from the input data preserved by the feature vectors).
[0016] As a result, the model adaptation device can improve the accuracy of deep learning models even when it is difficult to improve the accuracy of deep learning models solely by maximizing the confidence level of the deep learning models in the operating environment.
[0017] Here, the model adaptation device calculates the amount of information contained in the feature vectors mentioned above, for example, by the uniformity of the distribution of the feature vector group output from the intermediate layer of the deep learning model. This is because if the feature vector group output from the intermediate layer (feature extractor) of the deep learning model, which is input with data from the operating environment, is distributed broadly and without bias, it can be assumed that each feature vector holds a lot of information from the input data of the operating environment.
[0018] For example, a group of feature vectors with a uniform distribution, as shown by symbol 302 in Figure 3, is thought to retain more information about the operating environment in each feature vector than a group of feature vectors with a biased distribution, as shown by symbol 301 in Figure 3.
[0019] Therefore, the model adaptation device updates the parameters of the deep learning model not only to maximize the confidence level of the deep learning model in the operating environment, but also to maximize the uniformity of the distribution of feature vectors output from the intermediate layers of the deep learning model. This allows the model adaptation device to update the parameters of the deep learning model so that the intermediate layers output feature vectors that contain more information about the operating environment. As a result, the model adaptation device can improve the accuracy of the deep learning model in the operating environment.
[0020] Such a model adaptation device can improve the accuracy of a deep learning model even when it is difficult to improve the accuracy of the deep learning model solely by maximizing the confidence level of the deep learning model in the operating environment.
[0021] [Example Configuration] Next, an example configuration of the model adaptation device 10 will be explained using Figure 4. The model adaptation device 10 comprises a data acquisition unit 11, a deep learning model 12, a model adaptation unit 13, and a storage unit 14. This model adaptation device 10 can be implemented by a computer equipped with, for example, an input / output interface, a communication interface, an auxiliary storage unit, a main memory, a CPU, etc.
[0022] [Data Acquisition Unit] The data acquisition unit 11 acquires data from the operating environment of the deep learning model 12. Then, it inputs the acquired data into the deep learning model 12.
[0023] [Deep Learning Models] The deep learning model 12 is a deep learning model trained to output prediction results for input data. In this embodiment, the deep learning model 12 is described as being located inside the model adaptation device 10, but it may also be located outside the model adaptation device 10. The deep learning model 12 comprises a feature extraction unit 121 and a prediction unit 122.
[0024] The feature extraction unit 121 extracts feature vectors from the data acquired by the data acquisition unit 11. For example, the feature extraction unit 121 calculates feature vectors in the intermediate layers of the deep learning model 12. The prediction unit 122 inputs the feature vectors calculated by the feature extraction unit 121 to subsequent layers of the deep learning model 12 and outputs the prediction result.
[0025] [Model adaptation unit, memory unit] The model adaptation unit 13 adapts the deep learning model 12 to the operating environment. The model adaptation unit 13 includes a feature vector acquisition unit 131, a loss calculation unit 132, and a parameter update unit 133. The storage unit 14 stores the parameters of the deep learning model 12, various settings of the model adaptation device 10, and so on.
[0026] [Feature vector acquisition unit] The feature vector acquisition unit 131 acquires the feature vectors extracted by the feature extraction unit 121 and inputs them to the loss calculation unit 132.
[0027] [Loss calculation section] The loss calculation unit 132 calculates a loss function (L) corresponding to the confidence level of the prediction result by the prediction unit 122 and the amount of information contained in the feature vector extracted by the feature extraction unit 121. conf , L info Calculate the value of ).
[0028] The loss function (L) of the confidence level of the prediction result by the prediction unit 122 conf ) is a loss function defined such that the loss value decreases as the confidence level of the prediction result increases. In addition, the loss function (L) is the information content of the feature vector extracted by the feature extraction unit 121. info ) is a loss function defined such that the loss value decreases as the amount of information contained in the feature vector increases. conf , L info Further details will be provided later.
[0029] The confidence level of the prediction result is calculated based on factors such as the low entropy of the prediction probability distribution, the maximum probability, and the margin (the difference between the maximum probability and the second-highest probability).
[0030] For example, when the loss calculation unit 132 uses, as the confidence of the prediction result, the entropy of the distribution of the prediction probability of each class for the input data, L conf is calculated by the following equation (1). In equation (1), B is the batch size, C is the number of classes, p^ i,c indicates the prediction probability of class c for input data i.
[0031] [Equation]
[0032] Further, the amount of information held by the feature vector is calculated based on the entropy level, degree of variance, uniformity of distribution, etc. of the feature vector group extracted by the feature extraction unit 121. This is because, as described above, it is considered that the higher the diversity (wider distribution) of the feature vector group extracted by the feature extraction unit 121, the more information about the operating environment is retained in the feature vectors.
[0033] For example, when the loss calculation unit 132 uses, as the amount of information held by the feature vector, the uniformity of the distribution of the feature vector group extracted by the feature extraction unit 121, L info is calculated by the following equation (2). In equation (2), B is the batch size, C is the number of classes, z i and z j represent feature vectors of input data in the batch.
[0034] [Equation]
[0035] [Parameter Update Unit] The parameter update unit 133 updates the parameters of the deep learning model 12 so that the confidence level of the prediction results by the deep learning model 12 is as high as possible, and the amount of information contained in the feature vectors obtained from the intermediate layers of the deep learning model 12 is as large as possible. For example, the parameter update unit 133 updates the parameters of the deep learning model 12 so that the confidence level of the prediction results by the deep learning model 12 is as high as possible, and the amount of information contained in the feature vectors obtained from the intermediate layers of the deep learning model 12 is as high as possible. conf and L info The parameters of the deep learning model 12 are updated to minimize the sum of the two values.
[0036] For example, the parameter update unit 133 updates each parameter θ of the deep learning model 12 based on the following equation (3). Note that w1 and w2 in equation (3) are L conf and L info These are the weights assigned to each element.
[0037]
number
[0038] The parameter update unit 133 may adjust w1 and w2 in equation (3) above according to the operating environment. For example, when data from the operating environment is input to the deep learning model 12, the parameter update unit 133 calculates the mutual information I(z;y) between the feature vector z output by the hidden layer of the deep learning model 12 and the output y of the deep learning model 12. The parameter update unit 133 may then adjust w1 and w2 based on the mutual information I(z;y) (see equation (4) below).
[0039]
number
[0040] The parameter update unit 133 adjusts w1 and w2 in equation (3) according to equation (4) above, and when the mutual information I(z;y) between the feature vector z and the output y is large (for example, it exceeds a preset threshold I0), in the parameter update, L confMinimizing is prioritized. Also, when the mutual information I(z;y) between the feature vector z and the output y is small (for example, less than or equal to the threshold I0), L is used in the parameter update. info Minimizing this is the priority.
[0041] This means that if the deep learning model 12 is able to extract feature vectors that allow for successful classification of the input data, L conf The parameter can be updated prioritizing the minimization of L, otherwise L info The parameters can be updated prioritizing minimization.
[0042] The parameter update unit 133 adjusts w1 and w2 based on the mutual information I(z;y) between the feature vector z and the output y, but is not limited to this.
[0043] For example, the parameter update unit 133 may adjust w1 and w2 in equation (3) based on the degree of correlation between the feature vector z and the output y (e.g., the high correlation coefficient between the feature vector z and the output y, the low HSIC (Hilbert-Schmidt Independence Criterion) between the feature vector z and the output y, etc.).
[0044] For example, if the correlation between the feature vector z and the output y is higher than a predetermined threshold, the parameter update unit 133 increases the value of w1 and decreases the value of w2 in equation (3). In other words, the parameter update unit 133 L info Rather than minimizing L conf Prioritize minimizing the parameter when updating it.
[0045] On the other hand, if the correlation between the feature vector z and the output y is below a predetermined threshold, the parameter update unit 133 decreases the value of w1 in equation (3) and increases the value of w2. In other words, the parameter update unit 133, conf Rather than minimizing L info Prioritize minimizing the parameter when updating it.
[0046] With such a model adaptation device 10, the deep learning model 12 can be adapted to the operating environment, thereby improving the accuracy of the deep learning model 12 in the operating environment.
[0047] [Example of processing procedure] Next, an example of a processing procedure performed by the model adaptation device 10 will be explained using Figure 5.
[0048] First, the data acquisition unit 11 of the model adaptation device 10 acquires data from the operating environment (S1: data acquisition). Then, the data acquisition unit 11 inputs the acquired data into the deep learning model 12. Subsequently, the feature extraction unit 121 of the deep learning model 12 extracts feature vectors from the input data (S2: feature extraction). Then, the prediction unit 122 inputs the feature vectors extracted by the feature extraction unit 121 into subsequent layers of the deep learning model 12 and outputs the data prediction result (S3: prediction).
[0049] The feature vector acquisition unit 131 acquires the feature vectors extracted by the feature extraction unit 121 in S2. Then, the loss calculation unit 132 acquires the feature vectors from the feature vector acquisition unit 131 and the prediction results from the prediction unit 122. After that, the loss calculation unit 132 calculates the loss function (L) of the confidence level of the prediction results. conf The value of ) and the loss function (L) of the information content of the feature vector. info Calculate the value of (S4: Loss Calculation).
[0050] Subsequently, the parameter update unit 133 calculates the loss function (L) calculated in S4. conf Li nfo The parameters of the deep learning model 12 are updated to minimize the sum of the values of (S5: parameter update). For example, the parameter update unit 133 updates the parameters of the deep learning model 12 based on the above equation (3).
[0051] The model adaptation device 10 performs the above processing to improve the accuracy of the deep learning model 12 in the operating environment.
[0052] [Experimental Results] Next, we will explain the evaluation results of the deep learning model adapted to the operating environment by the model adaptation device 10. The deep learning model to be adapted was a zero-shot classification model using CLIP (Contrastive Language-Image Pretraining), a Vision-language based model.
[0053] CLIP is a model trained on paired data of image and text data. CLIP allows for the unified handling of image and text data by encoding them into a common feature space. Semantically similar data are mapped to similar vectors in the feature space.
[0054] For example, when a user of the model adaptation device 10 creates a text prompt for a class they want to classify (e.g., "A photo of a ~") and inputs it into CLIP, CLIP uses a text encoder to convert the text prompts for each class into feature vectors. CLIP also receives input of an image to be classified and uses a vision encoder to convert the image into a feature vector. CLIP then classifies each image based on the similarity (distance) between the image's feature vector and the text's feature vector.
[0055] For example, as shown in Figure 6, the feature vector of image 601 is close to the feature vector of "A photo of an airplane" in the feature space, so CLIP classifies image 601 as an airplane image. Similarly, the feature vector of image 602 is close to the feature vector of "A photo of a clock" in the feature space, so CLIP classifies image 602 as a clock image.
[0056] In this experiment, the model adaptation device 10 adapted CLIP to ImageNet-C (see Figure 7). The model adaptation device 10 uses L to update the CLIP parameters. info As shown in equation (1), L info Using Lconf As shown in equation (2), L conf The above equations (3) and (4) were used. In addition, the model adaptation device 10 updated the CLIP Vision encoder parameters using the above equations (3) and (4).
[0057] Then, ImageNet-C was input to CLIP after the parameter update, and the accuracy (%) of zero-shot classification was evaluated for each type of noise. The evaluation results are shown in Figure 8. The comparative example shows the results of zero-shot classification using CLIP without adaptation to ImageNet-C.
[0058] As shown in Figure 8, the model adaptation device 10 of this embodiment was found to improve the accuracy of classification against various types of noise in zero-shot classification using CLIP. From this, it was confirmed that the model adaptation device 10 of this embodiment can improve the accuracy of the model in the operating environment.
[0059] [System configuration, etc.] Furthermore, the components of each part shown in the diagram are functional concepts and do not necessarily need to be physically configured as shown. In other words, the specific forms of distribution and integration of each device are not limited to those shown in the diagram, and all or part of them can be functionally or physically distributed and integrated in any unit according to various loads and usage conditions. Moreover, all or any part of the processing functions performed by each device can be realized by a CPU and the program executed on that CPU, or by hardware using wired logic.
[0060] Furthermore, among the processes described in the embodiments described above, all or part of the processes described as being performed automatically can be performed manually, or all or part of the processes described as being performed manually can be performed automatically by known methods. In addition, the processing procedures, control procedures, specific names, and information including various data and parameters shown in the above document and drawings can be arbitrarily changed unless otherwise specified.
[0061] [program] The aforementioned model adaptation device 10 can be implemented by installing a program (model adaptation program) as packaged software or online software on a desired computer. For example, by running the above program on a computer, the computer can be made to function as the model adaptation device 10. The information processing device referred to here includes mobile communication terminals such as smartphones, mobile phones and PHS (Personal Handyphone System), as well as terminals such as PDA (Personal Digital Assistant).
[0062] Figure 9 shows an example of a computer running a model adaptation program. Computer 1000 has, for example, memory 1010 and a CPU 1020. Computer 1000 also has a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These components are connected by a bus 1080.
[0063] Memory 1010 includes ROM (Read Only Memory) 1011 and RAM (Random Access Memory) 1012. ROM 1011 stores, for example, a boot program such as BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to the hard disk drive 1090. The disk drive interface 1040 is connected to the disk drive 1100. For example, a removable storage medium such as a magnetic disk or optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to, for example, a mouse 1110 and a keyboard 1120. The video adapter 1060 is connected to, for example, a display 1130.
[0064] The hard disk drive 1090 stores, for example, the OS 1091, application program 1092, program module 1093, and program data 1094. That is, the program that defines each process executed by the model adaptation device 10 is implemented as a program module 1093 in which executable code for a computer is written. The program module 1093 is stored, for example, in the hard disk drive 1090. For example, a program module 1093 for executing a process similar to the functional configuration in the model adaptation device 10 is stored in the hard disk drive 1090. Note that the hard disk drive 1090 may be replaced by an SSD (Solid State Drive).
[0065] Furthermore, the data used in the processing of the above-described embodiment is stored as program data 1094 in, for example, memory 1010 or hard disk drive 1090. The CPU 1020 then reads the program module 1093 and program data 1094 stored in memory 1010 or hard disk drive 1090 into RAM 1012 as needed and executes them.
[0066] Furthermore, the program module 1093 and program data 1094 are not limited to being stored in the hard disk drive 1090; for example, they may be stored in a removable storage medium and read by the CPU 1020 via a disk drive 1100 or the like. Alternatively, the program module 1093 and program data 1094 may be stored in another computer connected via a network (LAN (Local Area Network), WAN (Wide Area Network), etc.). The program module 1093 and program data 1094 may then be read by the CPU 1020 from the other computer via a network interface 1070.
[0067] The functions of the elements disclosed herein may be implemented using circuits or processing circuitry that include general-purpose processors, special-purpose processors, integrated circuits, ASICs (Application Specific Integrated Circuits), FPGAs (Field Programmable Gate Arrays), conventional circuits, and / or combinations thereof, which are programmed using one or more programs stored in one or more memories, or otherwise configured to perform the disclosed functions.
[0068] A processor is considered processing circuitry or circuitry because it includes transistors and other circuits. A processor may be a programmed processor that executes a program stored in memory. In this disclosure, a circuit, unit, or means is hardware that performs the enumerated functions, or hardware programmed to perform the enumerated functions. Hardware may be any hardware disclosed herein that is programmed or configured to perform the enumerated functions.
[0069] There is memory for storing a computer program that includes computer instructions. These computer instructions provide logic and routines that enable hardware (e.g., processing circuitry or circuitry) to perform the methods disclosed herein. This computer program can be implemented in commonly known forms, such as computer-readable storage media, computer program products, memory devices, recording media such as CD-ROMs and DVDs, and / or memory in FPGAs and ASICs. [Explanation of Symbols]
[0070] 10 Model Adaptation Devices 11 Data Acquisition Unit 12 Deep Learning Models 13 Model Adaptation Section 121 Feature Extraction Unit 122 Prediction Section 131 Feature Vector Acquisition Unit 132 Loss calculation section 133 Parameter update section
Claims
1. A data acquisition unit that inputs data obtained from the operating environment of the deep learning model to the trained deep learning model, A calculation unit that calculates the confidence level of the prediction result of the data output from the deep learning model and the amount of information contained in the feature vector of the data output from the intermediate layer of the deep learning model, A parameter update unit updates the parameters of the deep learning model so that the confidence level of the prediction results of the data output from the deep learning model is as high as possible, and the amount of information contained in the feature vectors of the data is as large as possible. A model adaptation device characterized by comprising the following features.
2. The parameter update unit, Determine whether the correlation between the feature vector of the data and the prediction result of the data is below a predetermined threshold. If it is determined that the correlation value is below a predetermined threshold, the parameters of the deep learning model are updated prioritizing maximizing the amount of information contained in the feature vector of the data. If the correlation exceeds a predetermined threshold, the parameters of the deep learning model are updated, prioritizing the highest possible confidence in the prediction results of the data. The model adaptation device according to feature 1.
3. The calculation unit, The magnitude of the information contained in the feature vector of the aforementioned data is calculated based on the entropy height, variance height, or uniformity of the distribution of the multiple feature vectors output from the intermediate layer of the deep learning model. The model adaptation device according to feature 1.
4. The parameter update unit, The correlation value used is the mutual information between the feature vector of the data and the prediction result of the data. The model adaptation device according to feature 2.
