Visual generation type anti-deductive learning-oriented meta-rule selection strategy learning method
By introducing a meta-rule selection strategy learning method in visual generative deductive learning, the problem of high time cost of logical deduction is solved, and more efficient logical reasoning and better quality of generated results are achieved.
Patent Information
- Application Number
- CN202411700408.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-11-26
AI Technical Summary
When the prior art deals with large-scale logical symbol sets and complex logic rules, the time cost of logical deduction is too high, limiting the application of visual generative deduction learning in complex practical scenarios.
A meta-rule selection strategy learning method is proposed, which reduces the calculation time of logical deduction through self-attention embedding representation learning of symbol instance packages, embedded representation learning of meta-rule embedding representation learning, selection of meta-rule subsets, perform logical reasoning and update meta-rule selection strategy networks.
It significantly improves the efficiency of visual generative deductive learning, reduces the time cost of logical deduction, improves the quality and logical consistency of generated results, and enhances the robustness and generalization ability of the model when dealing with complex tasks and no instances are seen.
Smart Images

Figure CN119849595A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a meta-rule selection strategy learning method for visual generative inductive learning. Background Art
[0002] In recent years, with the development of artificial intelligence, building a neural symbolic visual generation model based on logical symbols has become an important research direction. This type of model guides the visual generation process through logical rules, which not only enhances the interpretability and stability of the generated results, but also demonstrates a strong rule-based generalization ability and the potential to generate logical rules from data. In the research in this field, the AbdGen method introduced the concept of abductive learning into the visual generation task for the first time, which can simultaneously perform joint training of neural visual generators, symbolic grounded learning, and logical rule induction, and only requires a small amount of labeled data of symbols.
[0003] However, existing technologies face the problem of high time cost of logic inference when dealing with large-scale logic symbol sets and complex logic rules, which limits the application of this method in complex practical scenarios. Furthermore, previous inductive logic programming (ILP), including the logic induction part of AbdGen, usually relies on manually designed inductive preferences, which has also become a key challenge in visual generative induction learning. This manually designed preference often makes it difficult to balance versatility and efficiency when dealing with complex tasks, resulting in the model showing great limitations when dealing with diverse and complex tasks.
[0004] Therefore, in practical applications, a technical means is needed to effectively reduce the time cost of logical inference, so as to improve the overall efficiency of visual generative inference learning and ensure that it is still operational when processing complex logical tasks. Summary of the invention
[0005] The purpose of the present invention is to provide a meta-rule selection strategy learning method to address the shortcomings of the prior art visual generative inference learning in processing large-scale logic symbol sets, such as high time cost of logic inference.
[0006] The objective of the present invention is achieved through the following technical solution: a meta-rule selection strategy learning method for visual generative abductive learning (AbdGen), comprising the following steps:
[0007] (1) Self-attention embedding representation learning of symbol instance packages: feature extraction and representation learning are performed on the symbol instance packages through the attention mechanism to obtain the embedding representation of the symbol instance packages; the symbol instance packages contain a number of symbol instances, each of which is composed of symbol data and does not contain any original image input, and the symbol instance packages are divided into positive examples and negative examples for the current rule;
[0008] (2) Meta-rule embedding representation learning: convert each meta-rule in the meta-rule pool into a corresponding vector embedding representation;
[0009] (3) Selecting a meta-rule subset: Combining the feature representation of the symbolic instance package with the meta-rule embedding representation, calculating the relevance of each meta-rule with the current instance package, and selecting the meta-rule subset that best suits the current task;
[0010] (4) Performing logical reasoning: Inputting the meta-rule subset and the symbolic instance package selected in step (3) into the logical reasoning module Metagol, and performing logical reasoning in combination with the background knowledge inputted separately;
[0011] (5) Update the meta-rule selection strategy network: Evaluate the effect of meta-rule selection based on the results of logical reasoning and optimize and update the meta-rule selection strategy network;
[0012] (6) Apply pre-trained models: In visual generative inductive learning, use pre-trained policy networks to select appropriate meta-rules to guide visual generative inductive learning.
[0013] Furthermore, the step (1) is implemented by the following sub-steps:
[0014] (1.1) Self-attention calculation of positive examples: Input the positive examples in the symbolic instance bag into the self-attention mechanism, extract the associated features within the positive examples, and obtain the embedded representation of the positive examples;
[0015] (1.2) Self-attention calculation of negative examples: Input the negative examples in the symbolic instance bag into the self-attention mechanism, extract the associated features within the negative examples, and obtain the embedded representation of the negative examples;
[0016] (1.3) Concatenation of positive example embedding representation and negative example embedding representation: Concatenate the positive example and negative example embedding representation generated by the self-attention mechanism and merge them into a combined tensor;
[0017] (1.4) Self-attention calculation of combined tensors: The self-attention mechanism is applied again to the connected combined tensors to obtain a comprehensive embedding representation.
[0018] Furthermore, the step (3) is implemented by the following sub-steps:
[0019] (3.1) Calculate the relevance score between the symbol instance package and the meta-rule: Use the cross-attention mechanism to interact the symbol instance package embedding representation in step (1) with the meta-rule embedding representation in step (2), and calculate the relevance score between each meta-rule and the symbol instance package, reflecting the degree to which the meta-rule is applicable to the current rule;
[0020] (3.2) Generate meta-rule selection probability distribution: Convert the relevance score to probability distribution through the Sigmoid function to obtain the probability of each meta-rule being selected;
[0021] (3.3) Apply Bernoulli sampling to select meta-rule subsets: According to the generated probability distribution, Bernoulli sampling is performed on each meta-rule to determine whether it is selected into the meta-rule subset of the current task, thereby dynamically adapting to the needs of different symbol instance packages.
[0022] Furthermore, step (5) is implemented by the following sub-steps:
[0023] (5.1) Calculate the strategy reward signal: According to logical reasoning, the logical rules and the size of the selected meta-rule subset are summarized, and the corresponding reward signal is calculated to evaluate the effectiveness of the current meta-rule selection strategy;
[0024] (5.2) Proximal policy optimization back propagation to update policy network parameters: Using the calculated reward signal, the parameters of the meta-rule selection policy network are adjusted through the proximal policy optimization back propagation algorithm, so that it can accurately select the appropriate meta-rule subset in subsequent tasks.
[0025] Specifically, the corresponding reward signal calculated in step (5.1) is calculated based on the result of logical reasoning, and the strategy reward signal is calculated, wherein the reward function is as follows:
[0026]
[0027] Where n is the total number of meta-rules in the meta-rule pool, n s Indicates the number of meta-rules selected.
[0028] Furthermore, step (6) is implemented by the following sub-steps:
[0029] (6.1) Few-shot pre-training of visual generative inductive learning: A small amount of labeled image data is needed to perform few-shot pre-training of visual generative inductive learning in order to achieve the startup accuracy of the meta-rule selection model;
[0030] (6.2) Inputting the original image instance package: The original image instance package contains positive examples and negative examples, and is symbolized and sub-symbolized by the symbol encoder and sub-symbol encoder respectively;
[0031] (6.3) Generate pseudo ground symbol: Symbolic representation generates pseudo ground symbol through symbolic ground module;
[0032] (6.4) Select meta-rules: Use the pre-trained policy network to select the subset of meta-rules most relevant to the pseudo-ground symbol from the meta-rule pool;
[0033] (6.5) Performing logical abductive learning: Inputting the selected meta-rules and pseudo-grounding symbols into the logical abductive reasoning module, and performing logical induction in combination with background knowledge to generate logical rules and revised grounding symbols;
[0034] (6.6) Decoding to generate an image: Find the symbol representation and sub-symbol representation corresponding to the corrected grounding symbol in the VQ codebook of the symbol grounding module, connect them, and input them into the decoder to generate the final visual output image;
[0035] (6.7) Network update for visual generative inductive learning: Network update for visual generative inductive learning is performed through reconstruction loss, cross entropy loss of pseudo-ground symbols relative to the corrected symbols, discretized variational loss and inverse sub-symbol cross entropy loss.
[0036] Specifically, in the step (6.7), the network update of visual generative inductive learning is performed through reconstruction loss Recon_loss, cross entropy loss sym_loss of pseudo-ground symbols relative to corrected symbols, discrete loss VQ_loss and inverse subsymbol cross entropy loss subsym_loss, and its loss function is as follows:
[0037] Loss=Recon_loss+sym_loss+VQ_loss+w adv *subsym_loss;
[0038] Among them, the inverse sub-symbol loss is the inverse of the cross entropy loss of the pseudo ground symbol generated by the sub-symbol encoder relative to the corrected symbol, which helps decouple the sub-symbol embedding representation and the symbol embedding representation.
[0039] The beneficial effects of the present invention are as follows:
[0040] The present invention significantly improves the efficiency of visual generative inductive learning through a pre-trained meta-rule selection strategy. The pre-trained strategy network can intelligently select relevant meta-rules and reduce the computation time of logical induction, while the self-attention mechanism improves the extraction accuracy of symbolic features and enhances the quality and logical consistency of the generated results. In addition, the method improves the robustness and generalization ability of the model when dealing with complex tasks and unseen examples, and reduces the reliance on manual intervention. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flowchart of model pre-training for meta-rule selection strategy learning method for visual generative inductive learning;
[0042] Figure 2 is a flow chart of the application of the present invention in visual generative inductive learning;
[0043] Figure 3 are positive and negative examples of the original image instance in the present invention;
[0044] Figure 4 This is an example of the production effect of the present invention. DETAILED DESCRIPTION
[0045] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0046] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0047] The present invention will be described in detail below with reference to the accompanying drawings.
[0048] like Figure 1 As shown in FIG, the meta-rule selection strategy learning method for visual generative abductive learning mainly includes the following steps: embedding representation learning of symbolic instance packages containing positive and negative examples through a self-attention mechanism; converting meta-rules in a meta-rule pool into vector representations through an embedding representation generation module; calculating the correlation scores between symbolic instance packages and meta-rules using a cross-attention mechanism and selecting a meta-rule subset with the highest score; inputting the selected meta-rule subset and symbolic instances into a logic reasoning module for logical reasoning combined with background knowledge; updating the strategy network according to the reasoning results; Figure 2 As shown in the figure, the pre-trained model is applied in visual generative inductive learning to speed up the efficiency of logical induction by selecting the most relevant meta-rules, and finally generate a visual output image that conforms to the logical rules.
[0049] The following is a detailed description of each step:
[0050] (1) Self-attention embedding representation learning of symbol instance bag: A symbol instance bag contains several symbol instances. Each symbol instance consists of symbol data, does not contain any original image input, and is divided into positive and negative examples for the current rule. Taking the "right priority" rule of the Mario dataset as an example, the format of the symbol instance is f([Mario position list][target position, target type, background type]). If Mario moves to the right first and then upward, and finally stops at the target position, it is a positive example. The positive example is [f([[0,0],[1,0],[2,0],[2,1],[2,2]],[[2,2],0,3])f([[0,0],[1,0],[2,0],[2,1]],[[2,1],1,1])f([[0,1],[1,1],[2,1],[2,2]],[[2,2],0,2])] , and the negative example is [f([[0,0],[1,0],[2,0],[2,1],[2,2]],[[1,1],1,2])f([[0,0],[1,0],[1,1],[2,1],[2,2],[[2,2],0,2])f([[1,1],[1,2],[2,2]],[[2,2],1,2])]. First, the symbolic encoding representation of the positive example is input into the self-attention mechanism calculation module to extract the internal correlation features of the positive example and generate the embedding representation of the positive example. Then, the symbolic encoding representation of the negative example is also input into the self-attention mechanism calculation module to generate the embedding representation of the negative example. The embedding representations of the positive and negative examples are combined into a combined tensor through the concatenation operation (Concat), and the combined tensor is then processed by the self-attention mechanism to enhance the interactive understanding between the positive and negative examples, and finally obtain a comprehensive embedding representation. The above self-attention mechanisms are all implemented through Torch.nn.MultiheadAttention.
[0051] (2) Meta-rule embedding representation learning: Each meta-rule in the meta-rule pool is converted into a corresponding vector embedding representation through the meta-rule embedding representation generation module. The meta-rule embedding representation generation module is implemented by Torch.nn.Embedding. The generated meta-rule embedding representation is used in the subsequent meta-rule selection step. Figure 1 Shown in the upper right corner.
[0052] (3) Meta-rule subsets selected by the probability of relevance between meta-rules and symbolic instance packages: The symbolic instance package embedding representation generated in step (1) and the meta-rule embedding representation generated in step (2) are used to calculate the relevance score between each meta-rule and the symbolic instance package through a cross-attention mechanism, where the cross-attention mechanism is implemented through Torch.nn.MultiheadAttention. The relevance score is converted into a probability distribution through the Torch.nn.Sigmoid function, the probability value is limited to between 0 and 1, and the meta-rule subset that best suits the current task is selected through the Bernoulli sampling method, thereby dynamically adapting to the needs of different symbolic instance packages.
[0053] (4) Perform logical reasoning: The selected meta-rule subset and symbolic instance are input into the logical reasoning module (Metagol) and combined with background knowledge to perform logical reasoning. When the meta-rule subset is selected better, this step can summarize the logical rules that are consistent with the positive example of the current instance and inconsistent with the negative example of the current instance. When the meta-rule subset is selected worse, no logical rules can be summarized.
[0054] (5) Update the meta-rule selection strategy network: Calculate the strategy reward signal based on the logical reasoning results, where the reward function is as follows:
[0055]
[0056] Where n is the total number of meta-rules in the meta-rule pool, n s Represents the number of meta-rules selected. Then, the parameters of the policy network are back-propagated and updated through the Proximal Policy Optimization (PPO) algorithm to optimize the meta-rule selection strategy, so that it can more accurately and efficiently select the appropriate meta-rule subset in subsequent tasks.
[0057] (6) Application in visual generative inductive learning: Flowchart as follows Figure 2 As shown, the original image example is Figure 3 As shown, Figure 3The logical rule that the positive and negative examples conform to is "Mario goes right first and then up to the end". First, the symbol encoder and sub-symbol encoder are used to perform symbolization and sub-symbolization processing to generate pseudo-ground symbols. Then, the pseudo-ground symbol is generated through the symbol grounding module, and the meta-rule subset most related to the pseudo-ground symbol is selected from the meta-rule pool using the pre-trained policy network. The selected meta-rules and pseudo-ground symbols are input into the logical induction reasoning module, and logical induction is performed in combination with background knowledge to generate logical rules and corrected ground symbols. The symbol representation and sub-symbol representation corresponding to the corrected ground symbol in the VQ codebook of the symbol grounding module are found and connected, and input into the decoder to generate a visual output image. The visual generative induction learning network is updated according to the reconstruction loss Recon_loss, the cross entropy loss sym_loss of the pseudo-ground symbol relative to the corrected symbol, the discrete loss VQ_loss, and the inverse sub-symbol cross entropy loss subsym_loss. The loss function is as follows:
[0058] Loss=Recon_loss+sym_loss+VQ_loss+w adv *subsym_loss
[0059] Among them, the inverse sub-symbol loss is the inverse of the cross entropy loss of the pseudo-ground symbol generated by the sub-symbol encoder relative to the corrected symbol, which helps decouple the sub-symbol embedding representation and the symbol embedding representation. The final output image effect is as follows Figure 4 shown.
[0060] This experiment shows that through the method of the present invention, the meta-rule selection strategy significantly optimizes visual generative inductive learning. When processing large-scale logical symbol sets and complex tasks, the time cost of logical induction is greatly reduced, and the generated visual images have higher quality and logical consistency.
[0061] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the contents disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0062] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A meta-rule selection strategy learning method for visual generative abductive learning, characterized by: The following steps are involved: (1) Self-attention embedding representation learning of symbol instance packages: feature extraction and representation learning are performed on the symbol instance packages through the attention mechanism to obtain the embedding representation of the symbol instance packages; the symbol instance packages contain a number of symbol instances, each of which is composed of symbol data and does not contain any original image input, and the symbol instance packages are divided into positive examples and negative examples for the current rule; (2) Meta-rule embedding representation learning: convert each meta-rule in the meta-rule pool into a corresponding vector embedding representation; (3) Selecting a meta-rule subset: Combining the feature representation of the symbolic instance package with the meta-rule embedding representation, calculating the relevance of each meta-rule with the current instance package, and selecting the meta-rule subset that best suits the current task; (4) Performing logical reasoning: Inputting the meta-rule subset and the symbolic instance package selected in step (3) into the logical reasoning module Metagol, and performing logical reasoning in combination with the background knowledge inputted separately; (5) Update the meta-rule selection strategy network: Evaluate the effect of meta-rule selection based on the results of logical reasoning and optimize and update the meta-rule selection strategy network; (6) Apply pre-trained models: In visual generative inductive learning, use pre-trained policy networks to select appropriate meta-rules to guide visual generative inductive learning.
2. The meta-rule selection strategy learning method according to claim 1, characterized in that: The step (1) is implemented by the following sub-steps: (1.1) Self-attention calculation of positive examples: Input the positive examples in the symbolic instance bag into the self-attention mechanism, extract the associated features within the positive examples, and obtain the embedded representation of the positive examples; (1.2) Self-attention calculation of negative examples: Input the negative examples in the symbolic instance bag into the self-attention mechanism, extract the associated features within the negative examples, and obtain the embedded representation of the negative examples; (1.3) Connection between positive example embedding representation and negative example embedding representation: Concatenate the positive example and negative example embedding representation generated by the self-attention mechanism and merge them into a combined tensor; (1.4) Self-attention calculation of combined tensors: The self-attention mechanism is applied again to the connected combined tensors to obtain a comprehensive embedding representation.
3. The meta-rule selection strategy learning method according to claim 1, characterized in that: The step (3) is implemented by the following sub-steps: (3.1) Calculate the relevance score between the symbol instance package and the meta-rule: Use the cross-attention mechanism to interact the symbol instance package embedding representation in step (1) with the meta-rule embedding representation in step (2), and calculate the relevance score between each meta-rule and the symbol instance package, reflecting the degree to which the meta-rule is applicable to the current rule; (3.2) Generate meta-rule selection probability distribution: Convert the relevance score to probability distribution through the Sigmoid function to obtain the probability of each meta-rule being selected; (3.3) Apply Bernoulli sampling to select meta-rule subsets: According to the generated probability distribution, Bernoulli sampling is performed on each meta-rule to determine whether it is selected into the meta-rule subset of the current task, thereby dynamically adapting to the needs of different symbol instance packages.
4. The meta-rule selection strategy learning method according to claim 1, characterized in that: The step (5) is implemented by the following sub-steps: (5.1) Calculate the strategy reward signal: According to logical reasoning, the logical rules and the size of the selected meta-rule subset are summarized, and the corresponding reward signal is calculated to evaluate the effectiveness of the current meta-rule selection strategy; (5.2) Proximal policy optimization back propagation to update policy network parameters: Using the calculated reward signal, the parameters of the meta-rule selection policy network are adjusted through the proximal policy optimization back propagation algorithm, so that it can accurately select the appropriate meta-rule subset in subsequent tasks.
5. The meta-rule selection strategy learning method according to claim 4, characterized in that: The corresponding reward signal calculated in step (5.1) is calculated based on the result of logical reasoning, and the strategy reward signal is calculated, wherein the reward function is as follows: Where n is the total number of meta-rules in the meta-rule pool, n s Indicates the number of meta-rules selected.
6. The meta-rule selection strategy learning method according to claim 1, characterized in that: The step (6) is implemented by the following sub-steps: (6.1) Few-shot pre-training of visual generative inductive learning: A small amount of labeled image data is needed to perform few-shot pre-training of visual generative inductive learning in order to achieve the startup accuracy of the meta-rule selection model; (6.2) Inputting the original image instance package: The original image instance package contains positive examples and negative examples, and is symbolized and sub-symbolized by the symbol encoder and sub-symbol encoder respectively; (6.3) Generate pseudo ground symbol: Symbolic representation generates pseudo ground symbol through symbolic ground module; (6.4) Select meta-rules: Use the pre-trained policy network to select the subset of meta-rules most relevant to the pseudo-ground symbol from the meta-rule pool; (6.5) Performing logical abductive learning: Inputting the selected meta-rules and pseudo-grounding symbols into the logical abductive reasoning module, and performing logical induction in combination with background knowledge to generate logical rules and revised grounding symbols; (6.6) Decoding to generate an image: Find the symbol representation and sub-symbol representation corresponding to the corrected grounding symbol in the VQ codebook of the symbol grounding module, connect them, and input them into the decoder to generate the final visual output image; (6.7) Network update for visual generative inductive learning: Network update for visual generative inductive learning is performed through reconstruction loss, cross entropy loss of pseudo-ground symbols relative to the corrected symbols, discretized variational loss and inverse sub-symbol cross entropy loss.
7. The meta-rule selection strategy learning method according to claim 6, characterized in that: In the step (6.7), the network update of visual generative inductive learning is performed through reconstruction loss Recon_loss, cross entropy loss sym_loss of pseudo-ground symbols relative to corrected symbols, discrete loss VQ_loss and inverse subsymbol cross entropy loss subsym_loss, and its loss function is as follows: Loss=Recon_loss+sym_loss+VQ_loss+ω adv *subsym_loss; Among them, the inverse sub-symbol loss is the inverse of the cross entropy loss of the pseudo ground symbol generated by the sub-symbol encoder relative to the corrected symbol, which helps decouple the sub-symbol embedding representation and the symbol embedding representation.
Citation Information
Patent Citations
Decision model generation method and device
CN114861609A
Immune fixation electrophoresis image recognition method combining anti-deductive learning and deep learning
CN117612163A
Metareinforcement learning automatic control method and system based on context symbol strategy
CN117991628A
Method and apparatus for summarization of unsupervised video with efficient key frame selection reward functions
US20230281991A1
Evolutionary expert systems and methods using meta-rules matching
US7925605B1