Method and device for realizing safe anti-deductive learning for image classification task
By building a clean and unbiased verification data set and a safe deductive learning algorithm, and updating the machine learning model and knowledge base parameters, the performance degradation caused by the knowledge base error rules in the existing technology is solved, and a safe and reliable image classification task reverse is achieved Deductive learning improves the accuracy and security of image classification.
Patent Information
- Application Number
- CN202411274275.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-13
AI Technical Summary
Existing deductive learning methods for image classification tasks deteriorate when there are error rules in the knowledge base, even worse performance than purely data-driven models, and lack security and credibility.
By acquiring image classification target datasets and noise-free knowledge bases, we can build a clean and unbiased verification dataset, update the machine learning model and knowledge base parameters using a safe deductive learning algorithm, filter and refine the knowledge base rules, and ensure that the model is verifying the data The prediction performance and security on the platform can improve the accuracy of image classification.
It realizes safe and reliable deductive learning under the conditions of noise-free knowledge base, avoids performance degradation, improves the accuracy of image classification, and ensures the security of the model.
Smart Images

Figure CN119131501A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and device for realizing secure inductive learning for image classification tasks, relates to the technical fields of image classification, machine learning, and logical reasoning, and is applicable to inductive learning on image classification target data sets and knowledge bases. Background Art
[0002] Machine learning is one of the most important technologies in the field of artificial intelligence. It is committed to improving the performance of the system itself through computational means and using experience. Machine learning can assist image recognition and classification. The "data-driven" image classification based on machine learning has made great progress and produced a series of important results, but the problem of lack of security and reliability has become increasingly prominent. Due to the nature of machine learning as "probabilistic approximate correctness", the above problems are difficult to be solved under the data-driven paradigm. At the same time, although "knowledge-driven" artificial intelligence has natural inefficiency at the data utilization level, it can have a good correctness guarantee based on logical reasoning. Abudctive Learning (ABL) has established a new paradigm of artificial intelligence that integrates data-driven and knowledge-driven. It constructs pseudo-labels of intermediate symbolic concepts through abductive reasoning, thereby connecting any type of machine learning algorithm with first-order logical reasoning. Abductive learning combines the high efficiency of data utilization of machine learning models and the high accuracy of logical reasoning.
[0003] However, existing inductive learning methods for image classification tasks all assume that the logical rules contained in the knowledge base are accurate, which is an assumption that is difficult to hold in many real-world applications. When the knowledge base contains erroneous rules, existing inductive learning techniques face serious performance degradation, and may even perform worse than simple end-to-end machine learning models that are purely data-driven. Summary of the invention
[0004] Purpose of the invention: In view of the problems and shortcomings in the prior art, the present invention provides a method and device for implementing secure inductive learning for image classification tasks. The method and device proposed in the present invention can implement secure and reliable inductive learning for noisy knowledge bases, ensure that when the knowledge base contains noise, the inductive learning will not degrade in performance compared to a simple machine learning model that does not use knowledge reasoning, and can improve the accuracy of image classification.
[0005] Technical solution: A method for implementing secure inductive learning, specifically including:
[0006] 1) Obtain an image classification target data set and a knowledge base (the knowledge base does not require all knowledge to be completely correct);
[0007] 2) Obtain a small amount of clean and unbiased validation data and construct a validation dataset; the clean and unbiased dataset does not contain incorrect annotations and the data distribution is consistent with the true distribution;
[0008] 3) Obtain machine learning model and knowledge base parameters based on secure inductive learning method;
[0009] 4) Screen and refine the knowledge base rules according to the knowledge base parameters;
[0010] 5) Calculate the predictive performance and safety of the obtained model on the validation dataset;
[0011] 6) The model finally obtained by training is determined as the machine learning model for the image classification target task;
[0012] 7) The knowledge base finally screened is determined as the knowledge base for the image classification target task.
[0013] Optionally, constructing a verification data set in 2) includes:
[0014] 21) Obtain a small-scale, clean and unbiased validation dataset containing no more than 100 samples;
[0015] 22) Construct a validation dataset through bootstrap sampling.
[0016] The self-service sampling method refers to a uniform sampling with replacement.
[0017] Optionally, the prediction performance on the verification data refers to the error between the predicted value and the true labeled value of the model on all verification data, and safety refers to the difference between the prediction performance of the model and the model performance obtained using only data-driven end-to-end training on each verification data set. The larger the difference, the safer the performance.
[0018] Optionally, the knowledge base parameter assigns a learnable parameter w_i to each rule (subscript i), which represents the probability of each rule participating in inductive learning. The trained knowledge base uses a threshold setting method to distinguish each rule to achieve rule screening and refinement.
[0019] Optionally, the secure inductive learning algorithm jointly optimizes the noisy knowledge base and the machine learning model by minimizing inconsistencies when establishing a graphical model to characterize the generation process of intermediate concepts, so that the reasoning system and the machine learning system can promote each other and train collaboratively.
[0020] On the other hand, the present invention provides a device for implementing secure inductive learning, specifically comprising:
[0021] 1) An acquisition unit is used to acquire an image classification target data set and a noisy knowledge base (there are inaccurate rules in the knowledge base).
[0022] 2) Reasoning unit, used for logical reasoning on the noisy knowledge base.
[0023] 3) A training unit, used to train a machine learning model in an image classification target dataset.
[0024] 4) A verification unit, which is used to obtain a small amount of clean and unbiased verification data and verify the security of the algorithm based on the verification data.
[0025] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, wherein the computer program implements the above-mentioned method for realizing secure inverse learning when executed by one or more computing devices.
[0026] The present invention provides a system comprising one or more computing devices or one or more storage devices, on which the one or more storage devices have recorded thereon a computer program, which, when executed by the one or more computing devices, enables the one or more computing devices to implement the method for implementing secure inductive learning as described in the first aspect above.
[0027] Based on the above technical scheme, the present invention provides a method and device for implementing secure inductive learning for image classification tasks, which can obtain an image classification target data set and a noisy knowledge base, construct a clean and unbiased verification data set with the same distribution as the image classification target data set, use a secure inductive learning algorithm to update the machine learning model and knowledge base parameters, use the obtained model on the verification set to obtain the prediction results on the verification set, calculate the prediction performance and security of the model on the verification set, and refine the knowledge base according to the set threshold.
[0028] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Throughout the accompanying drawings, the same reference symbols represent the same components. In the accompanying drawings:
[0030] Figure 1 A flowchart of a method for implementing secure inductive learning for image classification tasks proposed in an embodiment of the present invention is shown;
[0031] Figure 2The diagram model for generating the intermediate concepts proposed in the embodiment of the present invention is shown;
[0032] Figure 3 A block diagram of a device for implementing secure reverse learning proposed in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0033] The present invention is further explained below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.
[0034] Deductive learning is a machine learning framework that fully retains all the capabilities of perception and logical reasoning. It focuses on studying how to process the intermediate symbolic concepts output by the perception model. These symbolic concepts provide pseudo-labels for the perception model through deductive reasoning through the knowledge base. Deductive reasoning minimizes the inconsistency between the original data and the knowledge base by searching for the most suitable modified pseudo-labels. Pseudo-labels help update the machine learning model, thereby improving perception performance.
[0035] The present invention constructs a graphical model with an adaptive reasoning process, and believes that intermediate symbolic concepts can be generated from the inductive process of logical rules and the inductive process of original data, and updates machine learning parameters and knowledge base parameters by minimizing the difference between the distributions generated by the inductive and inductive processes.
[0036] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0037] The embodiment of the present invention provides a method for implementing secure inductive learning for image classification tasks. The method can perform secure and reliable inductive learning on a target task including a training data set and a knowledge base, solving the problem of performance degradation of existing inductive learning methods when inaccurate rules exist in the knowledge base. The specific steps of the method are as follows: Figure 1 As shown, including:
[0038] 101. Obtain an image classification target dataset and a noisy knowledge base.
[0039] Among them, all data in the image classification target data set have final labels. In an embodiment of the present invention, the image classification target data set can be any data set such as a text data set, an image data set, etc. The noisy knowledge base is composed of first-order logic rules, and some rules in the knowledge base may be inaccurate.
[0040] In the embodiment of the present invention, the process of acquiring the image classification target data set can be performed according to any existing acquisition method, for example, an interface dedicated to inputting the image classification target data set can be set, and the image classification target data set can be acquired through this interface. The process of acquiring the noisy knowledge base can also be performed according to any existing acquisition method, for example, the rules are written into prolog code and saved in the form of a text file.
[0041] 102. Obtain a small amount of clean and unbiased validation data and build a validation dataset.
[0042] Among them, a small amount of unbiased validation data refers to data that is completely correctly labeled and whose data distribution is consistent with the real distribution. In practical applications, it is very costly to label a large amount of unlabeled data one by one, and it is difficult to do it directly. However, it is feasible to select a small amount of data for manual labeling, so a small amount of clean and unbiased validation data can be obtained, and a validation data set can be constructed through self-service sampling.
[0043] 103. According to the security inductive learning algorithm, the machine learning model θ and knowledge base parameter w are obtained by training in the target task.
[0044] In order to simulate the impact of inaccurate rules, the security inductive learning algorithm proposed in this embodiment constructs a graphical model to describe the reasoning process of intermediate symbolic concepts. Figure 2 The graph model is shown. The dashed edges indicate that the inference process may be inaccurate. Each edge in the graph model represents a rule r, which is provided by experts and expresses the constraint relationship in image classification. All the rules constitute the knowledge base KB. Set the parameter w for the edge in the graph model i To check each rule (r i ∈KB), which represents the accurate probability of the rule. Each rule in the knowledge base will guide the induction of the intermediate symbol concept z and the label y. The intermediate symbol concept z is the feature of each picture, such as whether the picture of a dog has a tail. Label y represents the final classification label of the image classification. Each directed edge pointing from the knowledge base represents the direction of induction. Since the induction result is random, a random factor is introduced for the selection of multiple induction results, such as the random index of the induction result list. Given a specific original input x, the machine learning model will summarize the intermediate symbol concept z, and the directed edge pointing from x represents the direction of inductive reasoning. Through the graph model established by the present invention, the probability Q of induction reasoning can be calculated, and its value is:
[0045]
[0046] Here, I is the indicator function, and Q can calculate the final value of this probability by normalization. Considering that the edge from x to z is an inductive process in the graph model, the perceptual model can be used to estimate the probability of each z. This embodiment uses a neural network to map the input x to the distribution P θ (z|x). Distribution P and Q describe the intermediate symbolic concepts of the perception and reasoning modules. Both distributions should describe the intermediate symbolic concepts as consistently as possible, so the inconsistency between them needs to be minimized. The optimization objective is as follows:
[0047]
[0048] Where θ and w are the parameters of the machine learning model and the parameters of the rules introduced above. Since all operations are differentiable, the existing known gradient descent optimization algorithm can be used to solve them.
[0049]
[0050] The Clamp(·,0,1) function clamps the parameter w t+1 The value of is limited to [0,1]. It means to find the gradient of θ. 1 and η 2 is the learning rate. t represents the number of iterations of each machine learning model training. The above formula indicates that the parameter θ is updated along the direction of the loss gradient, and the parameter w is updated along the direction of the loss gradient and limited to the range of 0 to 1.
[0051] 104. Filter and refine the knowledge base rules according to the knowledge base parameters
[0052] After training, the parameters of each rule in the knowledge base can be obtained. This embodiment distinguishes the reliability of the rules by setting a threshold δ∈[0,1]. Formally, if ω i ≥δ, the i-th rule can be considered accurate, and ω i <δ, the opposite is true. Usually the threshold is fixed at δ = 0.5. Through the above method, rule screening and refinement are achieved.
[0053] 105. Compute the predictive performance and safety of the model on the validation dataset.
[0054] Examining machine learning models on validation data The prediction performance on v represents the number of samples in the validation set, and (x, y) represents a sample pair, i.e., the original input and its corresponding label. vThat is, the data is labeled completely correctly and the data distribution is consistent with the real distribution. As shown below:
[0055]
[0056] Represents the error value between the model's predicted value and the actual label, L(x j ,y j ,θ) is the input sample pair (x j ,y j ). The security of the model on the validation dataset is as follows:
[0057]
[0058] Among them, θ 0 represents the model trained by the end-to-end learning algorithm only. L(x j ,y j ,θ 0 ) is the input sample pair (x j ,y j ) error loss. This formula represents the difference between the prediction performance of the secure inductive learning and the prediction performance of the model obtained by end-to-end learning only. The larger the difference, the safer the model obtained by inductive learning.
[0059] 106. Use the final machine learning model as the machine learning model for the target task.
[0060] The machine learning model with the highest accuracy on the above validation set is selected as the model for the target task.
[0061] 107. The knowledge base finally screened is determined as the knowledge base of the target task
[0062] The knowledge base parameters with the highest accuracy on the validation set are selected as the final parameters on the noisy knowledge base. The knowledge base obtained by screening with these parameters is used as the final refined knowledge base, which can assist image classification and improve accuracy.
[0063] Furthermore, as an implementation of the above-mentioned method for implementing secure inductive learning, this embodiment provides a device for implementing secure inductive learning for image classification tasks. The device is mainly used to implement the function of secure inductive learning for the target task and solve the unsafe and unreliable problems that arise during the inductive learning process. For ease of reading, this device embodiment will no longer repeat the details of the aforementioned method embodiment, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. The device is as follows Figure 3 As shown, specifically including:
[0064] The acquisition unit 31 is used to acquire an image classification target data set and a noisy knowledge base (containing inaccurate rules).
[0065] The reasoning unit 32 is used for logical reasoning on the noisy knowledge base.
[0066] The training unit 33 is used to train the machine learning model in the target task.
[0067] The verification unit 34 is used to obtain a small amount of clean and unbiased verification data and verify the security of the algorithm.
[0068] Furthermore, this embodiment provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, wherein the computer program implements the above-mentioned method for implementing secure inverse learning when executed by one or more computing devices.
[0069] In addition, this embodiment provides a system including one or more computing devices and one or more storage devices, on which a computer program is recorded. When the computer program is executed by the one or more computing devices, the one or more computing devices implement the above-mentioned method for implementing secure inductive learning.
[0070] In summary, the device for implementing a secure inductive learning method for image classification tasks proposed in an embodiment of the present invention can obtain an image classification target data set, obtain a small amount of clean and unbiased verification data and then construct a verification data set, and simultaneously train the machine learning model and knowledge base parameters in the target task according to the secure inductive learning algorithm; then perform rule screening and refinement on the knowledge base according to the knowledge base parameters; and calculate the prediction performance and security of the model on the verification data set; the model finally trained is determined as the model of the target task; and the knowledge base finally screened is determined as the target task knowledge base. This method can realize the function of secure inductive learning. Compared with the existing inductive learning or neural symbolic learning, which has performance degradation in the presence of inaccurate rules, the present invention can safely use the noisy knowledge base for dual-drive learning of knowledge and data, and at the same time screen and refine the knowledge base.
[0071] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0072] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description made for specific languages above is for the purpose of disclosing the best mode of the present invention.
[0073] In addition, the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0074] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0075] The present application is described with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present application. It should be understood that each flow process and / or box of the flow chart and / or block diagram, and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for the function specified in one flow chart or multiple flows and / or one box or multiple boxes of the block diagram.
[0076] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which is in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0077] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0078] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0079] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0080] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0081] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
Claims
1. A method for implementing secure inductive learning for image classification tasks, characterized in that: The method comprises: 1) Obtain an image classification target dataset and a knowledge base, wherein the knowledge base does not require all knowledge to be completely correct; 2) Obtain clean and unbiased validation data and construct a validation dataset; clean and unbiased validation data refers to data that is correctly labeled and whose data distribution is consistent with the true distribution; 3) Obtain machine learning model and knowledge base parameters based on secure inductive learning method; 4) Screen and refine the knowledge base rules according to the knowledge base parameters; 5) Calculate the predictive performance and safety of the obtained model on the validation dataset; 6) The final trained model is determined as the machine learning model for the image classification target task; 7) The knowledge base finally screened is determined as the knowledge base for the image classification target task.
2. The method for implementing secure inductive learning for image classification tasks according to claim 1, characterized in that: The construction of the validation dataset in 2) includes: 21) Obtain a small, clean and unbiased validation dataset containing no more than 100 samples; 22) Construct a validation dataset through bootstrap sampling; The self-service sampling method refers to a uniform sampling with replacement.
3. The method for implementing secure inductive learning for image classification tasks according to claim 1, characterized in that: The prediction performance on the verification data refers to the error between the predicted value of the model and the true labeled value on all verification data. Safety refers to the difference between the prediction performance of the model and the model performance obtained by using only data-driven end-to-end training on each verification data set. The larger the difference, the safer the performance.
4. The method for implementing secure inductive learning for image classification tasks according to claim 1, characterized in that: The knowledge base parameter is the learnable parameter w assigned to rule i i , which means the probability that rule i participates in inductive learning. The trained knowledge base uses the threshold setting method to distinguish each rule to achieve rule screening and refinement.
5. The method for implementing secure inductive learning for image classification tasks according to claim 1, characterized in that: The secure inductive learning algorithm establishes a graphical model to characterize the generation process of intermediate concepts, and jointly optimizes the noisy knowledge base and the machine learning model by minimizing inconsistencies, so that the reasoning system and the machine learning system can promote each other and train collaboratively.
6. A device for implementing secure inductive learning, characterized in that: include: 1) An acquisition unit, used to acquire an image classification target data set and a noisy knowledge base; 2) Reasoning unit, used for logical reasoning on noisy knowledge base; 3) A training unit, used to train a machine learning model in an image classification target dataset; 4) Verification unit, which is used to obtain a small amount of clean and unbiased verification data and verify the security of the algorithm based on the verification data.
7. A computer-readable storage medium, wherein: The computer scale storage medium stores a computer program, wherein the computer program implements the method according to any one of claims 1 to 5 when executed by one or more computing devices.
8. A system comprising one or more computing devices and one or more storage devices, wherein the one or more storage devices have a computer program recorded thereon, characterized in that: When the computer program is executed by the one or more computing devices, the one or more computing devices are caused to implement the method as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Multi-modal periodontal image recognition method and system based on deductive learning
CN115908947A
