Automatic theorem proving method based on neural network guidance and quantum optimization

By using neural network guidance and quantum optimization, a quadratic unconstrained binary optimization model is constructed, which solves the problems of search space explosion and blind rule selection in automatic theorem proving, and realizes efficient proof path reconstruction for complex logical reasoning.

CN121684070BActive Publication Date: 2026-05-08NANJING ARTIFICIAL INTELLIGENCE CHIPS RES INST OF AUTOMATION CHINESE ACAD OF SCI +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING ARTIFICIAL INTELLIGENCE CHIPS RES INST OF AUTOMATION CHINESE ACAD OF SCI
Filing Date
2026-02-11
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing automated theorem proving techniques suffer from problems such as search space explosion and blind rule selection when faced with complex logical reasoning problems. They are unable to handle dynamic multi-step derivation and lack the energy guidance force to transform artificial intelligence heuristic experience into physical solution process.

Method used

A method based on neural network guidance and quantum optimization is adopted. By obtaining the logical structure feature vector, a quadratic unconstrained binary optimization model is constructed. Quantum computing is used to optimize and reshape the energy landscape of the solution space. Combined with the rule applicability weight, the logical proof path is efficiently reconstructed.

Benefits of technology

It effectively solves the efficiency and scalability problems of traditional methods in complex logic proofs, and achieves efficient logical reasoning and accurate proof path reconstruction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121684070B_ABST
    Figure CN121684070B_ABST
Patent Text Reader

Abstract

The application discloses an automatic theorem proving method based on neural network guidance and quantum optimization, comprising the following steps: extracting the logical structure features of a propositional logic task, and predicting the applicability weight of natural deduction rules by using a preconfigured neural network; performing a forward reasoning iteration process, dynamically identifying potential intermediate conclusions to determine a variable space, and constructing a quadratic unconstrained binary optimization (QUBO) model according to the variable space; in the construction process, the applicability weight is used to adjust the penalty coefficient of the rule constraint term, and the energy topography of the solution space is reshaped; according to the problem size, the computing resources are adaptively scheduled, the model is mapped to a coherent Ising machine or a classical simulation backend for solving, and the proof path is reconstructed through double verification. The application effectively solves the problems that the traditional method is blind in rule selection and the static optimization model is difficult to handle dynamic multi-step reasoning, and the efficiency and scalability of the proof are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of artificial intelligence and quantum computing, especially the automatic theorem proof method based on neural network guidance and quantum optimization. Background Technology

[0002] Automated Theorem Proving (ATP), as a cornerstone of formal methods, provides rigorous mathematical guarantees for computer science, integrated circuit design, and artificial intelligence. By automatically deriving logical conclusions through algorithms, ATP can verify the security of operating system kernels, identify logical vulnerabilities in chip designs, and support complex reasoning in intelligent systems. With the increasing complexity of software systems and hardware architectures, the industry's demand for efficient proof techniques capable of handling large-scale propositional logic is becoming increasingly urgent.

[0003] Current mainstream techniques for automated theorem proving primarily rely on symbolic reasoning based on resolution principles and SAT solvers based on DPLL / CDCL (Conflict-Driven Clause Learning) algorithms. The former resolves clauses by continuously applying logical rules, while the latter finds satisfying assignments through depth-first search combined with conflict learning strategies. Furthermore, early optimization methods attempted to transform logical problems into constraint satisfaction problems (CSP) or simple Boolean satisfiability problems, solving them using traditional heuristic algorithms or early simulated annealing algorithms. Existing research largely focuses on optimizing single symbolic search strategies or improving underlying variable branching heuristic rules.

[0004] Specifically, traditional symbolic reasoning lacks a global intuition about the solution space, leading to blind rule selection and exponentially ineffective searches. Existing optimization-based methods (such as static QUBO encoding) cannot adapt to the dynamic nature of logical reasoning and struggle to handle chain-like problems requiring multiple derivations to generate new intermediate conclusions. Current technologies lack a mechanism to pre-map the dynamic process of logical reasoning to a static physical energy model, and lack effective means to transform the heuristic experience of artificial intelligence into energy-guiding forces in the physical solution process. Consequently, existing quantum or classical optimization methods often fail to converge when faced with problems requiring deep logical deduction due to unclear variable space definitions or a loss of search direction. Summary of the Invention

[0005] The purpose of this invention is to provide an automated theorem-proving method based on neural network guidance and quantum optimization, in order to solve at least one of the aforementioned problems in the prior art.

[0006] According to one aspect of this application, an automated theorem proving method based on neural network guidance and quantum optimization includes:

[0007] Obtain a propositional logic proof task containing the target propositional formula and axiom set to be proved, and extract the logical structure feature vector that reflects the propositional logic proof task;

[0008] Input the logical structure feature vector into the pre-configured rule selection model to generate rule applicability weights for the natural deduction rule set;

[0009] Based on the objective proposition formula, axiom set, and rule applicability weights, a quadratic unconstrained binary optimization model is constructed. The quadratic unconstrained binary optimization model includes rule constraint terms, and the rule applicability weights are configured to adjust the penalty coefficients of the rule constraint terms in order to reshape the energy landscape of the solution space.

[0010] The quadratic unconstrained binary optimization model is mapped to the computational solution backend to perform quantum computing optimization, resulting in binary variable assignments that minimize the model energy;

[0011] Verify the validity of binary variable assignments, and reconstruct the logical proof path from the set of axioms to the target proposition formula based on valid binary variable assignments.

[0012] Beneficial effects: This invention effectively solves the problems of blind rule selection in traditional methods and the difficulty of static optimization models in handling dynamic multi-step reasoning, thereby improving proof efficiency and scalability. Attached Figure Description

[0013] Figure 1 This is a schematic diagram of the overall process of an automated theorem proof method based on neural network guidance and quantum optimization.

[0014] Figure 2 A schematic diagram of the process for constructing a quadratic unconstrained binary optimization model.

[0015] Figure 3 A schematic diagram illustrating the process of calculating multi-dimensional logical features to form a logical structure feature vector.

[0016] Figure 4 A schematic diagram of the process for implementing a hierarchical verification strategy. Detailed Implementation

[0017] Example 1 describes the overall technical framework that combines quantum optimization, deep learning prediction, and classical logical reasoning, such as... Figure 1 As shown, this paper addresses how to overcome the search space explosion problem of traditional symbolic reasoning when facing complex propositional logic proof tasks, and utilizes the heuristic capabilities of neural networks to guide quantum computing hardware to solve the problem efficiently.

[0018] Step 101: Obtain the propositional logic proof task. The propositional logic proof task includes the target propositional formula and axiom set to be proved, and extract the logical structure feature vector that reflects the propositional logic proof task.

[0019] In this embodiment, the input to the propositional logic proof task is typically in a structured data format, such as a JSON file or a standardized command-line argument string. The axiom set can contain multiple logical formulas that are pre-set to be true, such as system specifications in formal verification, netlist connections in circuit design, or fact entries in a knowledge base. The target propositional formula is the conclusion that needs to be verified as logically derived from the axiom set. Specifically, the input received by the system may be in the form of: the axiom set is {P, P->Q, Q->R} (P, Q, R are propositional variables, -> indicates implication), and the target propositional formula is R. At this time, the system first uses a recursive descent parser or other syntax analysis tools to convert the above text-based logical formula into a computer-processable abstract syntax tree (AST). The system traverses the AST, statistically calculates and combines numerical features that reflect the problem size, complexity, and potential reasoning paths into a fixed-dimensional vector, i.e., a logical structure feature vector. For example, this feature vector may contain the number of axioms, the total number of variables involved, and the frequency of occurrence of predetermined logical operators (such as implication symbols). This step transforms unstructured symbolic logic problems into structured numerical features, providing a standardized input interface for subsequent neural network processing.

[0020] In some optional implementations, to further improve the system's flexibility and processing efficiency, a hybrid proof mode selection module can be configured before performing the above steps. This module first quickly calculates the complexity index of the input problem, such as the sum of the number of variables and the number of clauses. If this complexity index is lower than a preset symbolic inference threshold, such as 10 variables, the system can preferentially call a traditional symbolic inference engine (such as Z3 or Vampire) for fast solution; only when the complexity index exceeds the threshold or the symbolic inference fails to return a result within a predetermined time will the system enter the neural network-guided quantum optimization process of this embodiment. This design can fully utilize the accuracy advantage of traditional methods on small-scale problems, while leveraging the search advantage of this method on large-scale problems.

[0021] Step 102: Input the logical structure feature vector into the pre-configured rule selection model to generate rule applicability weights for the natural deduction rule set.

[0022] In this embodiment, a pre-configured rule selection model acts as an intuitive guide in the proof process. This model typically employs a deep neural network architecture, such as a multilayer perceptron (MLP) or a residual network (ResNe). Its input layer dimension matches the dimension of the aforementioned logical structure feature vector, while its output layer dimension corresponds to the total number of natural deduction rules supported by the system. The natural deduction rule set is the set of fundamental operations for logical reasoning, specifically including rules such as the affirmative antecedent law (ModusPonens), the negative consequent law (ModusTollens), conjunction introduction, and double negation elimination. The rule applicability weights output by the model are a continuous numerical vector, where each element corresponds to the degree of recommendation for a rule. Higher values ​​indicate a greater likelihood that the rule will be successfully applied in the current proof task. For example, if the input axiom contains a large number of implications (P->Q), the model might predict a weight of 0.9 for the affirmative antecedent law, while other rules might have lower weights.

[0023] Step 103: Based on the target proposition formula, axiom set and rule applicability weights, construct a quadratic unconstrained binary optimization model; wherein, the quadratic unconstrained binary optimization model contains several (one or more) rule constraint terms, and the rule applicability weights are configured to adjust the penalty coefficients of the rule constraint terms in order to reshape the energy landscape of the solution space.

[0024] In this step, the system transforms the logical proof problem into a physical energy minimization problem, i.e., constructing a quadratic unconstrained binary optimization (QUBO) model. The QUBO model is constructed by creating a Hamiltonian function H. This function consists of several parts: axiomatic constraints and objective constraints, which enforce certain truth values ​​(usually true) for the axiomatic and objective variables; structural constraints, used to ensure the semantic correctness of logical operators; and rule constraints, corresponding to the logical implication of natural deduction rules. When a set of variables violates a rule (e.g., satisfying the premise but not the conclusion), this constraint contributes a positive energy penalty. This step uses the rule applicability weights generated in the previous step to dynamically adjust the coefficients of these penalty terms. Specifically, if a rule has a high weight, the system assigns a larger penalty coefficient to its corresponding rule constraint. Thus, in the energy landscape, states that violate high-weight rules will have high energy and be excluded by the quantum optimization process; while states that conform to high-weight rules will form energy troughs, guiding the system to prioritize exploring more likely reasoning paths. Through this method, the prediction results of the neural network directly and physically change the solution structure of the optimization problem.

[0025] Step 104: Map the quadratic unconstrained binary optimization model to the computational solution backend to perform quantum computing optimization, and assign binary variable values ​​that minimize the model energy.

[0026] In this embodiment, the computational backend can be either real Coherent Ising Machine (COSEM) physical hardware or a COSEM simulator based on classical hardware, such as CPU-based dynamic equation solving or GPU-based parallel bifurcation simulation algorithms. The mapping process involves assigning logical variables from the QUBO model to the physical bits (pulses) or simulated spin units of the computational backend. After mapping, the computational backend performs a physical evolution or numerical simulation process, gradually evolving the system from an unstable state to a steady state, eventually freezing in a state that minimizes (or nearly minimizes) the overall energy. This state corresponds to a set of values ​​for all binary variables, i.e., binary variable assignment.

[0027] Step 105: Verify the validity of the binary variable assignment, and reconstruct the logical proof path from the set of axioms to the target proposition formula based on the valid binary variable assignment.

[0028] Because quantum optimization processes are stochastic and prone to getting trapped in local optima, the solutions must be verified. The verification process first checks whether the total energy of the returned binary variable assignments, substituted into the Hamiltonian, is zero, or close to zero within the allowable numerical error range. If the energy is zero, it means the assignment satisfies all axioms, objectives, structural, and rule constraints, making it a valid proof. If the energy is greater than zero, in some implementations, a semantic model-based backup verification mechanism can be triggered, using deterministic methods such as truth table enumeration for verification. For verified assignments, auxiliary variables with a value of 1 (true) are further analyzed. Since each auxiliary variable corresponds to a specific logical derivation step, such as using the MP rule to derive Q from P, the system can connect the true variables to form a chain starting from an axiom, passing through several intermediate conclusions, and finally reaching the target formula. This chain is the final output logical proof path, which can be presented to the user in the form of a text list or a graphical tree structure, intuitively demonstrating the machine's reasoning process.

[0029] Example 2: A detailed description of how to transform symbolic logical formulas into numerical features that a neural network can understand, as well as the specific structure and training method of the neural network.

[0030] Step 201, the step of extracting the logical structure feature vector reflecting the propositional logic proof task, includes calculating multi-dimensional logical features to form the logical structure feature vector. For example... Figure 3As shown, the calculation process specifically includes calculating basic statistical characteristics, including the number of axioms, the total number of variables, and the depth of the formula tree in the axiom set; calculating operator distribution characteristics, including the frequency of occurrence of implication operators, negation operators, conjunction operators, and disjunction operators in the axiom set and the target propositional formula; calculating inference pattern matching characteristics, generating affirmative antecedent potential and negative consequent potential indicators by detecting whether there are clause structures in the axiom set that satisfy the premises of the inference rules; and calculating variable association characteristics, including the variable overlap ratio and the number of isolated variables between the axiom set and the target propositional formula.

[0031] In this embodiment, in order to quantify the structure of the logical problem, the system first parses the input axioms and objectives into an abstract syntax tree (AST). The node types in the AST typically include atomic variable nodes (Atom), negation nodes (Not), conjunction nodes (And), disjunction nodes (Or), and implication nodes (Imply). Based on this structure, the system extracts a total of 32-dimensional logical structure feature vectors. Specifically, the first 5 dimensions of this feature vector correspond to basic statistical features, such as f[0] being the number of axioms, f[1] being the total number of duplicate atomic variables involved, f[2] being the sum of all AST nodes (reflecting scale), and f[3] and f[4] being the maximum and average depths of the formula tree (reflecting the complexity of logical nesting), respectively. The next 10 dimensions correspond to operator distribution features, respectively counting the number of various logical operators in the axiom set and the objective formula, such as f[5] being the number of implied operators in the axioms, and f

[10] being the number of implied operators in the objective.

[0032] Furthermore, reasoning pattern matching features (e.g., f

[18] to f

[25] ) aim to capture the potential logical connections between formulas. For example, the affirmative antecedent potential index (f

[18] ) is calculated by traversing the set of axioms and counting the number of implications of the form P->Q, where the antecedent P also exists as an independent formula in the set of axioms. The existence of this structure suggests the applicability of the affirmative antecedent law ModusPonens' rule. Similarly, the negative consequent potential index (f

[19] ) counts the number of implications of the form P->Q, where the negative consequent ~Q also exists in the set of axioms. Variable association features (e.g., f

[26] to f

[31] ) quantify the correlation between premises and conclusions. For example, the variable overlap ratio (f

[26] ) is calculated as the intersection of the set of axiom variables and the set of target variables divided by the union. If this ratio is too low, it may indicate that the target is unrelated to the axioms, making the proof more difficult. The number of isolated variables (f

[30] ) is a statistic that counts variables that appear only once in all formulas, often noise or dead ends in the proof. Through 32-dimensional features, neural networks can obtain rich information about the problem's topology.

[0033] Step 202: The pre-configured rule selection model is obtained through supervised learning pre-training. Its training objective is to minimize the difference between the predicted weight distribution and the actual application of rules in historical successful proof paths. The loss function L during training is defined as follows:

[0034] L=-Σ i Σ r [y i,r ·log(w i,r )+(1-y i,r )·log(1-w i,r )];

[0035] Where i represents the i-th proof task sample in the training dataset, and the training dataset consists of pre-collected labeled data of historical proof task samples and their successful proof paths. Optionally, the training dataset contains N historical proof task samples, each sample including an axiom set, target proposition, and rule labels used in the successful proof path; r represents the r-th rule in the natural deduction rule set; y i,r The label is a binary label, with a value of 1 when the success proof path of the i-th task uses the r-th rule, and a value of 0 otherwise; i,r Let L be the applicability weight of the r-th rule predicted by the model for the i-th task; during the training process, the model parameters are updated through the backpropagation algorithm until the loss function L converges.

[0036] In this embodiment, the specific architecture of the rule selection model can be a deep residual network. For example, the input layer receives the aforementioned 32-dimensional feature vector, which is then projected onto a 128-dimensional hidden space through a fully connected layer. Two residual blocks are connected, each containing two linear layers and a ReLU activation function, and skip connections are introduced to prevent gradient vanishing, enabling the network to learn deep nonlinear feature interactions. The output layer contains 12 neurons, corresponding to the 12 natural deduction rules supported by the system, and the output is restricted to the (0,1) interval by a Sigmoid activation function, serving as the rule applicability weight w. i,r .

[0037] To train this model, a training dataset containing problem feature-successful rule pairs needs to be constructed. This can be obtained by running existing automated theorem provers (such as E-prover EProver) on a large database of logic problems. For each successfully proven problem, the system backtracks its proof path, recording which inference rules were actually used. If rule r was used, then label y. i,rSet to 1 otherwise to 0. The loss function uses binary cross-entropy loss, as shown in the formula. This loss function penalizes the model for predicting low weights for rules that are actually used, or predicting high weights for rules that are not used. By minimizing this loss through a backpropagation algorithm (such as the Adam optimizer), the neural network gradually learns to identify from the 32-dimensional features of the problem which reasoning strategy is usually needed for this type of problem, and provides accurate heuristic suggestions for new, unseen problems.

[0038] Example 3 describes how to predetermine the solution boundary of the problem using a classic symbolic algorithm before constructing a static QUBO model.

[0039] The steps to construct a quadratic unconstrained binary optimization model are as follows: Figure 2 As shown, the process specifically includes executing a forward inference iterative process to determine the set of variables required by the model: initializing the current knowledge base containing the set of axioms; traversing the set of natural deduction rules to check whether the combination of propositions in the current knowledge base satisfies the preconditions of the predetermined rules; if the preconditions are satisfied, deriving intermediate propositional conclusions based on the predetermined rules and adding the intermediate propositional conclusions to the current knowledge base; repeating the detection and derivation steps until the current knowledge base no longer expands or already contains the target propositional formula; mapping all accumulated propositions in the current knowledge base to QUBO variables, and constructing corresponding rule constraint terms for each pair of derivation relations established during the forward inference iterative process.

[0040] In this embodiment, the system first establishes a dynamic list as the current knowledge base. Initially, this list only contains the input axioms. For example, for the axiom set {A, A->B, B->C}, the initial content of the knowledge base is three formulas. The system enters an iterative loop. In each iteration, the system uses each rule in the natural deduction rule set as a matching template and searches the current knowledge base for a combination of propositions that satisfy the premise of that rule. Taking the affirmative antecedent law ModusPonens as an example, the premise pattern is that there exists a proposition P and there exists a proposition P->Q. The system scans the knowledge base. If it finds A and A->B, the match is successful, and the intermediate propositional conclusion B is derived. At this time, the system checks whether B already exists in the knowledge base. If it does not exist, it adds it. Similarly, in the next iteration, using the newly added B and the existing B->C, the system matches again and derives C. This process continues until no new conclusions are generated (fixed point state) or the target propositional formula (e.g., C) appears in the knowledge base.

[0041] In some preferred embodiments, to prevent the inference space from expanding indefinitely, a maximum iteration depth threshold can be set, such as 10 layers. If the target is not found after exceeding this depth, the expansion stops. After completing the iteration, the system maps all atomic propositions (such as A, B, C) and compound propositions (such as A->B, B->C) collected in the knowledge base into independent binary variables.

[0042] Specifically, the system maintains a variable mapping table, for example: x _0 Corresponding to A, x _1 Corresponding to B, x _2 Corresponding to C, x _3 Corresponding to A->B, x _4 This corresponds to B->C. For each logical chain generated during the derivation process, such as A, A->B leading to B, the system records this derivation relationship and, when subsequently constructing the QUBO model, records it for the variable (x). _0 ,x _3 ,x _1 Add corresponding rule constraints. The on-demand mapping strategy ensures that the generated QUBO matrix is ​​minimized, containing only variables potentially relevant to the proof path, and can handle more complex logical problems with limited qubit resources. As an alternative, the system can also adopt a bidirectional search strategy, that is, simultaneously deriving backwards from the axioms and backwards from the goal (reverse linking), stopping when the two search wavefronts meet, further reducing the variable space.

[0043] Example 4 describes how to accurately convert logical semantics into mathematical energy functions, and provides a complete method for constructing penalty functions, enabling those skilled in the art to reproduce the conversion process from logic gates to physical energy terms.

[0044] The energy function H of the quadratic unconstrained binary optimization model is constructed as follows:

[0045] H=H axiom +H goal +H structure +λ rule ∑ r w r ·C r ;

[0046] Among them, H axiom For axiom constraints that force the variables corresponding to the set of axioms to take the value of true; H goal H is a target constraint term that forces the variable corresponding to the target proposition formula to take the value of true; structure The structural constraint term to ensure the semantic consistency of logical operators; λ rule Basic rule penalty coefficient; w r C represents the weight value corresponding to the r-th rule in the rule applicability weights. rFor the rule constraint term corresponding to the r-th rule, it is configured to contribute non-zero penalty energy if and only if the premise variable of the rule is true and the conclusion variable is false.

[0047] In this embodiment, the total Hamiltonian H is a linear superposition of all sub-constraint terms. For the axiom constraint term H... axiom Assume the axiom corresponds to the variable x _A Then its penalty function is designed as λ axiom ·(1-x _A Obviously, when x _A When λ = 1, the energy is 0; otherwise, it is a positive value λ. axiom . Usually λ axiom Set it to a large constant (e.g., 100.0) to ensure the axiom is a true hard constraint. For the objective constraint term H... goal Its form is similar, and it is λ. goal ·(1-x _G Force the target variable x _G True. Basic rule penalty coefficient λ rule The baseline strength for all rule terms is typically set to a small value, such as 10.0 to 20.0. The weights w for neural network prediction... r (Values ​​ranging from 0 to 1) are used as multiplication factors to fine-tune the constraint strength of different rules. For example, if the neural network believes that the affirmative antecedent law is more likely to be applied in the current step, then the weight w of the affirmative antecedent law... MP A value close to 1 makes the corresponding energy penalty significant, forcing the system to satisfy the rule; conversely, if the weight w of the consequent law is denied... MT If the value is close to 0, even if the negation consequent law is violated, the energy cost is relatively small, allowing the system to temporarily ignore the path in the early stages of the search.

[0048] Rule constraint C r Includes constraints C for the affirmative antecedent law ModusPonens MP and the constraint C on ModusTollens's law of negation of consequent. MT The calculation formulas are as follows:

[0049] C MP =x P ·x P->Q ·(1-x Q );

[0050] C MT =x P->Q ·x ~Q ·(1-x ~P );

[0051] Where, x P x is the binary variable corresponding to the antecedent proposition P in the rule premise;P->Q x is the binary variable corresponding to the proposition P->Q; Q x is the binary variable corresponding to the consequent proposition Q in the rule conclusion; ~Q x is a binary variable corresponding to the negation form ~Q of the consequent proposition; x~P is a binary variable corresponding to the negation form ~P of the antecedent proposition; the constraint is configured to produce an energy penalty of 1 if and only if the truth value combination of the relevant propositions violates the logical reasoning rules.

[0052] Alternatively, other commonly used QUBO encoding methods for natural deduction rules, such as the conjunctive introduction rule (P,Q|-P∧Q, |- denotes derivation), have the corresponding constraint term: C And-Intro =x P ·x Q ·(1-x P∧Q ), indicating that a penalty is imposed when both P and Q are true but the conjunction P∧Q is false.

[0053] For the double negation elimination rule (~~P|-P), its constraint term is: C DN =x ~~P ·(1-x P ).

[0054] For the resolution rule (A∨P, B∨~P|-A∨B), its constraint term is: C Res =x A∨P ·x B∨~P ·(1-x A∨B ).

[0055] The design logic of the above formulas follows the same principle: ;

[0056] Among them, C rule This is a penalty item (constraint item). The product of variables that are given the premise. The variables are conditions for the conclusion.

[0057] Structural constraint term H structure Includes semantic consistency constraints on auxiliary variables introduced for logical operators, and for negation, conjunction, and implication operations in propositional logic, the structural penalty function C corresponding to the structural constraint terms. struct The constructions are as follows:

[0058] C ~P =(x ~P +x P -1) 2 ;

[0059] C P∧Q =(x P∧Q -x P ·xQ ) 2 ;

[0060] C P->Q =(x P->Q -1+x P -x P ·x Q ) 2 .

[0061] Where, x P x Q These are the binary variables corresponding to atomic propositions P and Q, respectively; x ~P x is an auxiliary binary variable corresponding to the negation proposition ~P; P∧Q x is an auxiliary binary variable corresponding to the conjunction proposition P∧Q; P->Q For the auxiliary binary variable corresponding to the proposition P->Q; the structure penalty function is configured to generate a positive energy penalty when the value of the auxiliary binary variable is inconsistent with the truth table definition of the logical operator, so as to force the auxiliary binary variable to maintain semantic correctness in the energy-minimizing state.

[0062] In this embodiment, the structural constraint term serves to connect atomic variables and composite variables. Because in the QUBO model, x... P and x P->Q These are two independent bits, physically unrelated, and must be connected via H. structure Forcibly binding their logical relationships. For example, for the implication relation P->Q, its truth table stipulates that P->Q is false (0) only when P is true and Q is false, and true (1) in all other cases. Formula (x P->Q -(1-x P +x P ·x Q )) 2 This is the algebraic expression of the truth table. To fit the quadratic form format of QUBO, the above formula will be expanded to x. _i x _j In the form of the negation operator, C... ~P =x ~P 2 +x P 2 +1+2x ~P x P -2x ~P -2x P Because the binary variable satisfies x 2 =x, which can be simplified to a combination of linear terms and quadratic coupling terms, ultimately corresponding to the values ​​of the diagonal and off-diagonal elements of the QUBO matrix Q. Rigorous mathematical definitions ensure that the solved ground state is not merely the lowest energy point, but also a logically self-consistent truth assignment.

[0063] Example 5 describes how to implement a pure mathematical model on limited physical computing resources, especially adapting and optimizing it for the characteristics of the Coherent Ising machine and its simulation architecture.

[0064] Step 501, mapping the quadratic unconstrained binary optimization model to the computational solution backend, specifically includes adaptively scheduling heterogeneous computing resources based on the scale of model variables: counting the total number N of binary variables in the quadratic unconstrained binary optimization model; if N is less than a first preset threshold, mapping the model to a classic coherent Ising machine simulator based on a CPU, and solving the dynamic equations using a numerical integration algorithm; if N is greater than the first preset threshold and less than a second preset threshold, mapping the model to a parallel coherent Ising machine simulator based on a GPU, and performing large-scale parallel evolution using a single instruction multiple data stream architecture; if N is greater than the second preset threshold, mapping the model to quantum solution hardware—a coherent Ising machine, naturally mapping the QUBO model to an equivalent Ising model.

[0065] In this embodiment, to balance computational cost and solution efficiency, the system employs a hierarchical scheduling strategy. Specifically, the first preset threshold can be configured to have 20 to 50 variables. For small-scale verification problems smaller than this threshold, the system invokes a CIM simulation library (based on solving coupled differential equations) running on a multi-core CPU. This library utilizes OpenMP (Open Multiprocessing) to achieve multi-threaded parallelism, sufficient to find the globally optimal solution or a high-quality solution within milliseconds. The second preset threshold can be configured to have 500 to 1000 variables. For medium-scale problems between the first and second thresholds, the system invokes a high-performance coherent Ising machine CIM simulation library (e.g., based on simulated bifurcation algorithms) running on a CUDA (Unified Computing Device Architecture) GPU. This leverages the thousands of stream processors on the GPU to simultaneously maintain multiple independent spin evolution trajectories, significantly accelerating the system's bifurcation and energy relaxation processes. For large-scale problems exceeding the second threshold (e.g., over 1000 variables), the system submits the problem to a real coherent Ising machine in the cloud via an application programming interface (API) to achieve efficient solution using real physical evolution processes.

[0066] Step 502: Before mapping the model to the computational solution backend, a global memory resource optimization strategy is used to manage the storage of the coupling matrix Q of the quadratic unconstrained binary optimization model. The strategy includes storing the non-zero elements of the coupling matrix Q in a compressed sparse row (CSR) format, which reduces the storage space complexity S. mem The following relationship must be satisfied:

[0067] ;

[0068] Where N is the total number of binary variables in the model, N nzThe number of non-zero elements in the coupling matrix Q is given. The calculation backend is configured with a memory pool reuse mechanism to maintain and reuse the allocated sparse matrix memory blocks between multiple sampling tasks, avoiding the overhead of repeated memory allocation and release.

[0069] In this embodiment, because the QUBO matrix generated by propositional logic has high sparsity—meaning that most variables do not have direct logical constraints—using a traditional two-dimensional array for storage would lead to significant memory waste. For example, for a problem with 10,000 variables, the entire matrix would require approximately 800MB of memory, while the sparse matrix might only require a few MB. The system uses a CSR format, storing only three arrays: a non-zero value array, a column index array, and a row offset array. Furthermore, when processing a large number of proof requests in batches, the system allocates a fixed-size memory pool in either video memory or main memory. When a proof task finishes, the CSR data structure it occupies is not immediately destroyed but marked as free. When the next task arrives, the system directly overwrites the new data on the allocated memory block. This mechanism avoids frequent memory allocation and reclamation (malloc / free) at the operating system level, reduces memory fragmentation, and improves system throughput in high-concurrency scenarios.

[0070] Example 6 illustrates how to perform rigorous post-processing verification after obtaining the original binary data returned by the quantum solver, and how to restore the physical bit state to human-readable logical proof steps, thereby solving the probabilistic error problem that may exist in quantum computing and ensuring the mathematical rigor of the final proof result.

[0071] The steps to verify the validity of binary variable assignments are as follows: Figure 4 As shown, the implementation includes a hierarchical verification strategy: Energy constraint verification is performed, calculating the total energy value of binary variable assignments under a quadratic unconstrained binary optimization model. If the total energy value is equal to zero, the verification is considered successful; if the total energy value is greater than zero, the energy constraint verification is considered unsuccessful, and a backup verification process based on a semantic model is triggered. The backup verification process includes: traversing all possible truth value assignments of the variables involved in the target proposition formula, constructing a set M of truth value assignment models that makes all propositions in the axiom set true, and checking whether the target proposition formula is true under each truth value assignment model in the model set M; if so, the verification is considered successful; otherwise, the verification is considered unsuccessful.

[0072] In this embodiment, the verification process is designed as a funnel-style screening mechanism, from fast to slow. The first stage is energy constraint verification, which is the step with the lowest computational cost. The system receives the candidate solution vector x returned by the solver. * For example, [1,0,1,1,…], substitute it into the Hamiltonian formula H(x). Since the construction logic of the QUBO model is to violate the constraints, i.e., increase the energy, then only when H(x)… *=0 (or within the allowable range of floating-point error, such as less than 10) -6 Only when this condition is met can it be confirmed that the solution satisfies all constraints of the axioms, objectives, structure, and rules. Ideally, a quantum solver should be able to find the ground state with high probability over a sufficiently long optimization time.

[0073] However, in practical applications, due to hardware noise or insufficient optimization time, the solver may get stuck in a local optimum, returning a solution with energy slightly greater than zero, for example, violating a constraint of an auxiliary structure. In this case, the system does not directly discard the solution but proceeds to a second-level backup verification. Specifically, the system extracts the portion of the solution vector corresponding to the atomic propositional variables (ignoring auxiliary variables) and verifies it based on the model checking principle in classical logic. The system constructs a set of truth-assignment models M, which contains all variable assignment combinations that make the axiom set true. For example, if the axiom is A∨B, then M contains {(A=1,B=0),(A=0,B=1),(A=1,B=1)}. The system iterates through each model in M, checking whether the objective formula G is also true under that model. According to the definition of semantic implication (A->G if and only if M(A) is a subset of M(G), -> indicates implication), if all models support the objective G, the proof still holds. The hybrid verification strategy described above takes advantage of the speed of quantum computing while retaining the completeness of classical verification as a fallback.

[0074] In some optional implementations, the process of reconstructing the proof path based on valid binary variable assignments specifically includes: the system first filters out all rule auxiliary variables assigned a value of 1, such as x. _MP_1 ,x _MT_2 (x) _MP_1 Indicates the confidence or activation state of the first application of the ModusPonens rule, x _MT_2 Variables such as the confidence level or whether the Modus Tollens rule is enabled for the second application represent the activated inference steps. The system reconstructs these variables into logical operation triples (Premise, Rule, Conclusion) based on the mapping relationships recorded in the forward inference iterations. The system uses graph theory algorithms (such as topological sorting) to connect these triples into a directed acyclic graph (DAG), where the root node represents an axiom and the leaf nodes represent the objective formula. The system outputs a linearized textual description of the DAG, for example: Step 1: Apply the affirmative antecedent law to derive Q from axiom P and P->Q; Step 2: Apply the affirmative antecedent law to derive R from Q and Q->R (objective proven).

[0075] Example 7: A detailed description of the specific application of the method of the present invention in the field of practical industrial technology.

[0076] Scenario 1: Formal verification of critical software systems. In the development of operating system kernels or blockchain smart contracts, code correctness is paramount. The method in this embodiment can be integrated into static code analysis tools. Specifically, the system first uses control flow analysis techniques to convert the source code fragment to be verified into logical expressions (axioms), and converts security attributes (such as the absence of deadlocks or non-negative balances) into target propositions. Using feature extraction and neural network prediction, the system quickly identifies the key inference rules required to verify the code, such as inductive rules for loop invariants. Finally, using a quantum optimization process, it searches for counterexamples or proof paths in parallel on a quantum cloud platform.

[0077] Compared to traditional SAT solvers, this method can leverage quantum oscillations to escape local search traps more quickly and provide verification results in a shorter time when dealing with long code paths containing complex logical dependencies.

[0078] Scenario 2: Performing equivalence checks on Very Large Scale Integration (VLSI). In the chip design process, it's necessary to verify whether the register-transfer level (RTL) design and the synthesized gate-level netlist are logically consistent. This is a significant propositional logic proof problem. The method in this embodiment uses the XOR result of the two circuit designs as the target formula to be proven false. Because the circuit netlist has highly structured features, its 32-dimensional logical structure can accurately capture the topological features of circuit modules such as adders and multipliers, guiding the neural network to assign the most suitable inference rule weights to these modules, for example, assigning high-weight resolution rules to arithmetic logic units. Through sparse matrix storage optimization and quantum hardware scheduling, this method can handle large-scale circuit module verification tasks that traditional binary decision graph (BDD) methods cannot handle due to memory explosion.

[0079] This invention proposes a proof method for propositional logic based on quantum computing and neural network rule guidance (NQATP), aiming to address the prominent problems of existing automatic theorem proving systems, such as search space explosion, blind rule selection, and high computational complexity. This method encodes the logic proof problem as a quadratic unconstrained binary optimization QUBO problem, utilizes a coherent Ising machine (CIM) or a simulated quantum optimizer for efficient search, and combines this with neural network prediction of the optimal inference rule, achieving a synergistic improvement in proof efficiency, scalability, and accuracy. Its key steps and mathematical principles are as follows:

[0080] 7.1 Perform logical formula parsing and state encoding.

[0081] This method accepts propositional logic formulas as input and supports the standard syntactic representation of natural deductive systems. Input includes:

[0082] Axiom set: A = {A1, A2, ..., A} n}, where each A i This is a propositional logic formula.

[0083] Proof target: G, the propositional logic formula to be proved.

[0084] The formula syntax supports the following logical operators:

[0085] Negation: ~P; Conjunction: P∧Q; Disjunction: P∨Q; Implication: P->Q; Equivalence: P<->Q.

[0086] A recursive descent parser is used to transform the input formula into an Abstract Syntax Tree (AST), where each node corresponds to a logical operator or atomic proposition. The AST structure is defined as follows:

[0087] Expr:=Var(name) # Atomic propositional variable

[0088] |Not(operand)#Negative

[0089] |And(left,right)#Combination

[0090] |Or(left,right)#Disjoint

[0091] |Imply(antecedent,consequent)#implication

[0092] |Iff(left,right) is equivalent to |Iff(left,right)#

[0093] The parsing process ensures correct operator precedence: negation > conjunction > disjunction > implication > equivalence.

[0094] To support neural network rule selection, the system extracts a 32-dimensional feature vector f∈R from the formula structure. 32 ,include:

[0095] Basic statistical characteristics (dimensions 0-4):

[0096] f[0]: the number of axioms |A|;

[0097] f[1]: Total number of variables |V|;

[0098] f[2]: Total size of the formula (number of nodes);

[0099] f[3]: Maximum formula depth;

[0100] f[4]: Average formula depth.

[0101] Operator statistical features (dimensions 5-14):

[0102] f[5-9]: The quantity of implications, negations, conjunctions, disjunctions, and equivalences in the axioms;

[0103] f[10-14]: The number of implied, negated, conjunctive, disjunctive, and equivalent elements in the objective.

[0104] Target features (dimensions 15-17):

[0105] f

[15] : Size of the target formula;

[0106] f

[16] : Depth of the target formula;

[0107] f

[17] : Whether the target is an atomic formula (0 / 1).

[0108] Pattern matching features (dimensions 18-25):

[0109] f

[18] : Whether the antecedent of the implication in the ModusPonens potential-statistic axiom is in the axiom set;

[0110] f

[19] : Whether the negation of the consequent of a ModusTollens potential-statistical implication is in the axiom set;

[0111] f

[20] : Conjunction elimination potential - Statistical count of conjunctions;

[0112] f

[21] : Disjunction introduces potential - check if the objective is a disjunctive expression and its branches are in the axiom;

[0113] f

[22] : Double negation potential - Statistical count of double negations;

[0114] f

[23] : Reasoning chain potential - Detecting whether there is chain implication (e.g., P->Q, Q->R);

[0115] f

[24] : Contradictory potential - detects whether there are contradictory pairs (P and ~P);

[0116] f

[25] : Whether the target is in the axiom (0 / 1).

[0117] Variable relationship characteristics (dimensions 26-31):

[0118] f

[26] : Variable overlap ratio |V axiom ∩V goal | / |V axiom ∪V goal |(V) axiom V represents the set of all propositional variables (or logical atoms) appearing in the axiom set. goal(represents the set of all propositional variables appearing in the objective formula).

[0119] f

[27] : Coverage of target variable |V axiom ∩V goal | / |V goal |;

[0120] f

[28] : average frequency of variable;

[0121] f

[29] : Maximum frequency of variable;

[0122] f

[30] : Number of isolated variables (variables that appear only once);

[0123] f

[31] : Number of shared variables (variables that appear multiple times).

[0124] 7.2 Perform QUBO encoding construction.

[0125] The system encodes each logical formula as a QUBO binary variable, establishing a correspondence between logical semantics and optimization variables:

[0126] Atomic propositional variables: Propositional variable P is directly mapped to QUBO variable x. P ∈{0,1}, where 1 represents true and 0 represents false.

[0127] Compound formula encoding: For compound formulas, the system creates auxiliary QUBO variables and adds structural constraints to ensure semantic consistency.

[0128] Negation formula: ~P is encoded as auxiliary variable x ~P The constraint is: x ~P +x P =1;

[0129] QUBO penalty items: (x ~P +x P -1) 2 ;

[0130] Conjunctive formula: P∧Q is encoded as auxiliary variable x _And_PQ The constraint is: x _And_PQ =x P ·x Q ;

[0131] QUBO penalty items: (x _And_PQ -x P ·x Q ) 2 Expanded using linearization techniques, it can be summarized as follows:

[0132] 3·x _And_PQ +x P ·x Q -2·x_And_PQ ·x P -2·x _And_PQ ·x Q ;

[0133] Disjunction formula: P∨Q is encoded as auxiliary variable x _Or_PQ The constraint is: x _Or_PQ =x P +x Q -x P ·x Q ;

[0134] QUBO penalty items: (x _Or_PQ -x P -x Q +x P ·x Q ) 2 ;

[0135] Implied formula: P->Q is encoded as auxiliary variable x _Imp_PQ The constraint is: x _Imp_PQ =1-x P +x P ·x Q ;

[0136] QUBO penalty items: (x _Imp_PQ -1+x P -x P ·x Q ) 2 ;

[0137] Equivalent formula: P<->Q is encoded as auxiliary variable x _Iff_PQ The constraint is: x _Iff_PQ =1-x P -x Q +2·x P ·x Q ;

[0138] QUBO penalty items: (x _Iff_PQ -1+x P +x Q -2·x P ·x Q ) 2 .

[0139] The system constructs a Hamiltonian H as the QUBO optimization objective, which includes four types of constraints:

[0140] Axiom constraint: forces all axioms to be true.

[0141] H axiom =λ axiom ·Σ i (1-x _Ai);

[0142] Where λ axiom x is the axiom penalty coefficient (default 100.0). _Ai For axiom A i The corresponding QUBO variable.

[0143] Goal constraint: Forces proof that the goal is true.

[0144] H goal =λ goal ·(1-x _G );

[0145] Where λ goal x is the target penalty coefficient (default 100.0). _G Let G be the QUBO variable corresponding to the target G.

[0146] Structural constraints: ensure the semantic correctness of logical operators.

[0147] H structure =λ structure ·Σ j C j ;

[0148] Where C j λ is the QUBO penalty term for the j-th structural constraint. structure This is the structural penalty coefficient (default 100.0).

[0149] Inference rule constraints: Encoding the application of natural deduction rules.

[0150] The system supports 12 inference rules, including:

[0151] -ModusPonens: P,P->Q|-Q; where |- indicates derivation.

[0152] -ModusTollens:P->Q,~Q|-~P;

[0153] -Conjunctive introduction: P,Q|-P∧Q;

[0154] - Combinatorial elimination (left): P∧Q|-P;

[0155] - Combinatorial elimination (right): P∧Q|-Q;

[0156] -Disjunctive introduction (left): P|-P∨Q;

[0157] -Disjunctive introduction (right): Q|-P∨Q;

[0158] -Disjunction elimination: P∨Q, ~P|-Q;

[0159] - Double negation elimination: ~~P|-P;

[0160] - Reductio ad absurdum: If a contradiction is derived from assumption P, then |-~P;

[0161] -Proof of condition: If we deduce Q from assumption P, then |-P->Q;

[0162] -Reduction and resolution: A∨P, B∨~P|-A∨B.

[0163] For each rule R, check if its premise exists in the current knowledge base. If it does, add rule application constraints.

[0164] H rule =λ rule ·Σ r w r ·C r ;

[0165] Where w r Let λ be the weight of rule r (from neural network prediction). rule The base rule penalty coefficient (default 20.0), C r For the QUBO constraint term of rule r.

[0166] Rule constraint C r The specific encoding method is as follows:

[0167] The standard form of QUBO only allows quadratic terms, meaning a maximum of two variables multiplied together. The constraint expressions below are represented using logical semantics to facilitate understanding the mathematical meaning of the rules. For higher-order terms involving the multiplication of three or more variables (such as x·y·z), the system will automatically perform quadraticization during actual encoding.

[0168] Quadratic transformation principle: For a cubic term x·y·z, introduce an auxiliary variable w to replace the product of x·y, thus transforming it into an equivalent quadratic form:

[0169] Primitive cubic terms: x·y·z,

[0170] After quadratic transformation: w·z,

[0171] Auxiliary constraint: w = x·y (achieved through the penalty term 3w + xy - 2wx - 2wy).

[0172] The auxiliary constraint is 0 when w = xy; otherwise, a positive penalty is incurred. Using this method, any higher-order term can be recursively degraded into a quadratic term. This system uses the PyQUBO library, which automatically performs the quadratic transformation when the compile() method is called.

[0173] ModusPonens (affirmative antecedent): P, P->Q|-Q;

[0174] Logical semantics: If P is true and P->Q is true, then Q must be true.

[0175] QUBO constraint coding: C MP =x P ·x P->Q ·(1-x Q );

[0176] When x P =1 (P is true) and x P->Q =1 (P->Q is true) but x Q When the condition is 0 (Q is false), the constraint term takes the value of 1, and a penalty is applied; otherwise, the constraint term is 0, and no penalty is applied. This constraint guarantees that the conclusion must be true when the rule premise is satisfied.

[0177] ModusTollens (negation of consequent): P->Q, ~Q|-~P;

[0178] Logical semantics: If P->Q is true and ~Q is true, then ~P must be true.

[0179] QUBO constraint coding: C MT =x P->Q ·x ~Q ·(1-x ~P );

[0180] When x P->Q =1 and x ~Q =1 but x ~P When the value is 0, a penalty is applied.

[0181] Conjunctive introduction: P,Q|-P∧Q;

[0182] Logical semantics: If P is true and Q is true, then P∧Q must be true.

[0183] QUBO constraint coding: C And-Intro =x P ·x Q ·(1-x P∧Q );

[0184] When x P =1 and x Q =1 but x P∧Q When the value is 0, a penalty is applied.

[0185] Conjunction elimination: P∧Q|-P(left);

[0186] Logical semantics: If P∧Q is true, then P must be true.

[0187] QUBO constraint coding: C And-Elim-L =x P∧Q·(1-x P );

[0188] When x P∧Q =1 but x P When =0, a penalty is imposed. Similarly, the constraint for conjunction elimination (right) is:

[0189] C And-Elim-R =x P∧Q ·(1-x Q ).

[0190] Disjunctive introduction: P|-P∨Q (left);

[0191] Logical semantics: If P is true, then P∨Q must be true.

[0192] QUBO constraint coding: C Or-Intro-L =x P ·(1-x P∨Q );

[0193] When x P =1 but x P∨Q When =0, a penalty is imposed. Similarly, the disjunctive constraint (right) is:

[0194] C Or-Intro-R =x Q ·(1-x P∨Q ).

[0195] Disjunction elimination: P∨Q, ~P|-Q;

[0196] Logical semantics: If P∨Q is true and ~P is true, then Q must be true.

[0197] QUBO constraint coding: C Or-Elim =x P∨Q ·x ~P ·(1-x Q );

[0198] When x P∨Q =1 and x ~P =1 but x Q When the value is 0, a penalty is applied.

[0199] Double negation elimination: ~~P|-P;

[0200] Logical semantics: If ~~P is true, then P must be true.

[0201] QUBO constraint coding: C DN =x ~~P ·(1-x P );

[0202] When x ~~P =1 but xP When the value is 0, a penalty is applied.

[0203] Reductio ad absurdum (Not-Intro): If a contradiction is derived from assumption P, then |-~P;

[0204] Logical semantics: If a contradiction (⊥) can be deduced from P, then ~P must be true.

[0205] QUBO constraint encoding: This rule needs to detect contradictions, usually by checking that P and ~P are both true. In practice, when a contradiction is detected, the system will force ~P to be true. The constraint term is:

[0206] C Not-Intro =contradiction _indicator ·(1-x ~P );

[0207] Among them, contradiction _indicator This is a contradiction detection indicator; when a contradiction (x) is detected... P =1 and x ~P When =1), the contradiction indicator is... _indicator =1, otherwise 0.

[0208] Conditional proof (Imply-Intro): If we derive Q from hypothesis P, then |-P->Q;

[0209] Logical semantics: If Q can be deduced from P, then P->Q must be true.

[0210] QUBO constraint coding: This rule needs to detect derivation relationships, and the constraint terms are:

[0211] C Imply-Intro =derivation _indicator ·(1-x P->Q );

[0212] Among them, derivation _indicator This indicates that Q can be derived from P, and the derivation relationship is automatically detected through symbol search (forward reasoning).

[0213] Resolution: A∨P, B∨~P|-A∨B;

[0214] Logical semantics: If A∨P is true and B∨~P is true, then A∨B must be true.

[0215] QUBO constraint coding: C Res =x A∨P ·x B∨~P ·(1-x A∨B );

[0216] When x A∨P =1 and x B∨~P =1 but x A∨B When the value is 0, a penalty is applied.

[0217] Total Hamiltonian: H = H axiom +H goal +H structure +H rule .

[0218] To handle multi-step reasoning problems, such as hypothetical syllogisms, the system implements a forward reasoning iterative mechanism:

[0219] Initial knowledge base: K0 = A (axiom set);

[0220] Iterative extension: For each inference rule R, check whether its premises are in K. i If the condition is met, then the conclusion is added to K. i+1 ;

[0221] Termination condition: When K i+1 =K i Or target G∈K i Stop at this time;

[0222] Constraint generation: Add corresponding rule constraints to all derivable formulas.

[0223] This mechanism ensures that chained reasoning (such as P->Q, Q->R|-R) can be correctly encoded and solved.

[0224] 7.3 Perform neural network rule selection.

[0225] The system uses a deep residual neural network to predict the applicable weights of each inference rule. The network structure is as follows:

[0226] Input layer: h0 = f(32-dimensional feature vector);

[0227] Input projection layer: h1=ReLU(BN(W1·h0+b1));

[0228] Where the weight matrix W1∈R 128×32 BN represents batch normalization, and b1 is the bias vector.

[0229] Residual blocks (2): For the i-th residual block (i=1,2):

[0230] h'=ReLU(BN(W i,1 ·h i +b i,1 ));

[0231] h''=BN(W i,2·h'+b i,2 );

[0232] h i+1 =ReLU(h''+h i (Residual connection);

[0233] Each residual block contains two fully connected layers, with a hidden layer dimension of 128.

[0234] Output layer: w = σ(W) _out ·h3+b _out) ;

[0235] Among them W _out ∈R 12×128 σ is the sigmoid activation function, and the output w∈[0,1] 12 This is the weight vector for the 12 inference rules.

[0236] The rule weights predicted by the neural network are w=[w1,w2,...,w 12 Used to adjust rule penalty terms in QUBO constraints:

[0237] H rule =λ rule ·Σ r w r ·C r ;

[0238] Rules with higher weights are subject to stronger constraints during the optimization process, guiding the solver to prioritize exploring the proof path corresponding to that rule, thus significantly reducing the search space.

[0239] The rule selection network is trained through supervised learning, with training data derived from a sequence of rules governing historical proof problems and their successful applications. The loss function used is cross-entropy loss.

[0240] L=-Σ i Σ r [y i,r ·log(w i,r )+(1-y i,r )·log(1-w i,r )];

[0241] Where y i,r The label is a binary label, that is, the label (0 / 1) for whether rule r in question i is used, w i,r The weights for network predictions are the applicability weights of the model to the r-th rule predicted for the i-th task.

[0242] 7.4 Perform quantum computing solutions and hardware integration.

[0243] Traditional automated theorem proving methods suffer from problems such as search space explosion and high computational complexity, which are directly related to hardware computing power.

[0244] The hardware implications of search space explosion: For propositional logic problems with n variables, exhaustive search requires checking 2... n There are several possible truth values ​​to assign; in the traditional CPU serial computing mode, the computing time increases exponentially with each additional variable; even with multi-core CPU parallel computing, the speedup is limited by Amdahl's law and it is difficult to cope with large-scale problems.

[0245] Hardware limitations of computational complexity: Symbolic reasoning methods require maintaining a large number of intermediate states and proof trees, and memory usage grows rapidly with the problem size; the search of rule application sequences requires a large number of condition judgments and backtracking operations, resulting in a high failure rate of CPU branch prediction and a low cache hit rate; for complex multi-step reasoning problems, traditional hardware architectures cannot fully utilize computing resources, leading to low computational efficiency.

[0246] This invention uses a Coherent Ising Machine (CIM) to form an Ising spin network using a decoherent optical parametric oscillator (DOPO) or time-division multiplexed pulses, and explores the solution space in parallel at the physical level. By constructing J (coupling strength) and h (local external field) couplings through measurement-feedback or optical coupling, it can directly carry the QUBO / Ising mapping. The solution process is completed in the sub-microsecond to microsecond range, which is a significant improvement in speed compared to the millisecond-level calculation speed of traditional CPUs.

[0247] Furthermore, regarding the compilation and hardware mapping of the QUBO problem, specifically: the system compiles the Hamiltonian H into standard QUBO form:

[0248] minimize:x T Qx+c T x+offset; subject to:x∈{0,1} n ;

[0249] Where Q is an n×n symmetric matrix (n is the number of QUBO variables), c is a linear term vector, and offset is a constant offset.

[0250] Mapping from QUBO to coherent Ising machine:

[0251] Variable mapping: Each QUBO variable x _i Mapped to Ising spins s _i ∈{+1,-1}, which corresponds to the phase state of a certain OPO pulse in CIM;

[0252] Coupling Mapping: Q ij Convert to Ising coupling coefficient Jij This is achieved through a measurement-feedback circuit or an optical coupling network;

[0253] Bias mapping: linear term c _i Convert to spin bias h _i Injected via amplitude modulation or feedback bias;

[0254] Normalization and quantization: J and h are scaled and quantized according to the hardware's adjustable range to ensure that they do not exceed the dynamic range of feedback / modulation.

[0255] Furthermore, the solver backend and hardware integration architecture are as follows: the system adopts a layered architecture to support multiple solver backends, achieving seamless switching from classical simulation to real hardware, and all backends are based on the operating principle of the Coherent Ising Machine (CIM) or its mathematical equivalent:

[0256] Coherent Ising machine analog backend CIM-Sim-CPU:

[0257] Hardware simulation: On a classic CPU, the coupled nonlinear differential equations describing the physical processes of CIM, such as the master equation or stochastic differential equations, are solved numerically to simulate the amplitude and phase evolution of the decoherent optical parametric oscillator (DOPO) pulses.

[0258] Computing resources:

[0259] CPU core count: Supports multi-threaded parallel computing of evolution trajectories under different initial conditions.

[0260] Memory usage: O(n 2 The space complexity is used to store the coupling matrix.

[0261] Computation time: depends on the number of steps and accuracy of solving the differential equation.

[0262] Applicable scenarios: Problem size n < 100, used for algorithm verification and accurate simulation of physical behavior.

[0263] GPU-accelerated CIM simulation backend (CIM-Sim-GPU):

[0264] Hardware simulation: An open-source solver based on simulated bifurcation algorithms or massively parallel dynamics evolution algorithms. Utilizing the parallel computing power of GPUs, it simulates the bifurcation process of thousands of spin variables in a virtual potential field.

[0265] Computational resource optimization:

[0266] GPU acceleration: Utilizes CUDA cores to update the state vectors of all spin variables in parallel.

[0267] Memory optimization: Sparse matrix storage is used to reduce memory usage.

[0268] Evolutionary strategy: The bifurcation speed is controlled by adjusting the virtual pump parameters to achieve a fast solution.

[0269] Applicable scenarios: Medium-sized problems, n<500, requiring fast solutions but not real quantum hardware.

[0270] Coherent Ising machine hardware backend:

[0271] Real hardware integration: The coupling matrix and bias are uploaded to the CIM hardware via API.

[0272] Hardware architecture integration:

[0273] Issue submission:

[0274] - Upload the converted J and h values ​​from QUBO to the CIM controller;

[0275] - Configure pump power, feedback gain, and number of runs (num) reads ) and other parameters;

[0276] - Initialize the pulse phase or start with a random phase.

[0277] Hardware execution:

[0278] - The hardware completes a pumping process in microseconds;

[0279] - Spin states evolve in parallel at the physical level, rapidly approaching low-energy states;

[0280] - By adjusting gain and suppressing noise, one can escape local optima.

[0281] Result reading:

[0282] - Read the OPO phase sign to obtain the spin values ​​{+1,-1}, and map them back to {0,1};

[0283] - Returns multiple samples and their corresponding energies;

[0284] - Perform majority voting or energy filtering on the results of multiple runs.

[0285] Hardware resource management:

[0286] - Queue Management: Maintain task queues and priorities, and schedule hardware time slots according to problem size and urgency;

[0287] - Parameter adaptation: Adjust pump power, feedback gain, and sampling number based on historical energy distribution;

[0288] - Fault tolerance: Automatically retry or fall back to the simulated backend after detecting hardware anomalies or link timeouts.

[0289] performance:

[0290] - Parallelism: Spin parallel evolution at the physical level, not limited by the number of classical threads;

[0291] -Speed: A single run is completed in the sub-microsecond to microsecond range, which is faster than CPU millisecond-level calculations;

[0292] - Scalability: Expanding the number of pulses or nodes can support larger-scale QUBO / proof problems.

[0293] Applicable scenarios: large-scale problems, n>500.

[0294] Accurate solution for the backend:

[0295] Hardware requirements: For small-scale problems, n < 20, exhaustive search is used to find the global optimum on the CPU.

[0296] Computing resources:

[0297] Time complexity: O(2^3) n This method is only suitable for small-scale problems.

[0298] Memory complexity: O(n), storing the current assignment state;

[0299] Applicable scenarios: Verifying the correctness of QUBO encoding, as a benchmark test.

[0300] Furthermore, the optimization and internal resource scheduling of computing resources specifically involves: the system implementing an intelligent resource scheduling mechanism to dynamically optimize computing resource allocation based on problem characteristics and hardware availability.

[0301] The system automatically selects the optimal solver based on the size of the QUBO problem:

[0302] if n < 20: backend = "exact" # Solve precisely, guaranteeing the optimal solution

[0303] elif n < 100:backend = "cim_cpu" # CPU-side CIM dynamics simulation

[0304] elif n < 500:backend = "cim_gpu" # GPU acceleration, medium scale

[0305] else:backend = "cim" # Real coherent Ising machine hardware, large-scale problem.

[0306] To address the need for large-scale repeated sampling (num) in quantum solution processes readsTo obtain the optimal solution through computational characteristics, this system is designed with a multi-level parallel resource scheduling mechanism, which can automatically adapt the optimal parallel strategy according to the hardware environment and task load to maximize computational throughput.

[0307] At the CPU multi-core parallel level, the system uses multi-threading technology to calculate the total number of samples (num). reads The sampling tasks are dynamically allocated to multiple CPU cores. Each core independently executes its assigned subset of sampling tasks. After computation, the main control thread aggregates the sampling results from all cores and performs unified deduplication and sorting. This method can achieve near-linear speedup when handling I / O-intensive tasks or medium-sized problems, fully exploiting the computational potential of general-purpose processors.

[0308] For GPU heterogeneous acceleration scenarios, when a system is detected to have a CUDA-enabled graphics processor and the sampling task is massive (e.g., NumPy), reads When the number of samples exceeds 1000, the system will automatically switch to the GPU backend. Leveraging the advantages of the GPU's Single Instruction Multiple Data (SIMD) architecture, the system can process hundreds or thousands of sampling threads in parallel, reducing the time required for large-scale sampling and improving solution efficiency.

[0309] At the distributed computing level, the system supports cross-node distributed sampling scheduling for ultra-large-scale verification tasks. By dividing and distributing the massive sampling task to different nodes in the computing cluster, each node performs parallel computation, and the results are then merged via network transmission. This overcomes the limitations of single-machine resources and ensures the system's scalability when handling highly complex problems.

[0310] To address the issue of soaring memory usage caused by complex logical formulas during automated theorem proofs, this system implements a three-dimensional integrated optimization strategy encompassing data storage, encoding processes, and memory management, ensuring that the system can still handle large-scale logical problems with limited resources.

[0311] To optimize sparse matrix storage, specifically given the typically high sparsity of QUBO matrices (most elements are 0), the system abandons the traditional two-dimensional array storage method and instead uses compressed sparse row (CSR) or compressed sparse column (CSC) format for storage. This strategy reduces the memory space complexity from O(n^2) to O(n^2). 2 The complexity is reduced to O(nnz) (where nnz is the number of non-zero elements), enabling the system to efficiently store and process large-scale sparse problems involving thousands of variables.

[0312] An incremental encoding strategy is implemented. Specifically, for chained reasoning or multi-step verification scenarios, the system changes the previous pattern of full re-encoding each time and introduces an incremental encoding mechanism. During reasoning, only newly added intermediate conclusions and rule constraints are encoded, and existing variable mappings and constraint structures are reused. This not only reduces the overhead of repeated computation but also effectively reduces peak memory usage.

[0313] A memory pool management mechanism is employed. Specifically, to avoid the system overhead and fragmentation issues caused by frequent memory allocation and deallocation, a dedicated memory pool is maintained internally. Memory blocks used to store QUBO matrix data and sampling results are not immediately destroyed after a task ends, but are marked as idle for reuse by subsequent tasks. This reuse mechanism improves the system's memory throughput and operational stability when processing a large number of proof requests in batches.

[0314] To address the scarcity and high cost of hardware resources such as the Coherent Ising Machine, the system has built an intelligent scheduling engine that achieves dual optimization of hardware utilization and solution quality through refined task management and adaptive parameter adjustment.

[0315] Task queue and priority management are implemented. Specifically, the system has a built-in intelligent priority queue that dynamically sorts submitted tasks based on the urgency and size of the problem. Small-scale verification tasks are prioritized to utilize fragmented time, while large-scale tasks are submitted in batches during windows when hardware resources are relatively idle, avoiding resource idleness and waste.

[0316] The parameter / gain adaptive technology is adopted. Specifically, in view of the accuracy requirements of CIM parameters, it can adjust the pump power, feedback gain and sampling time according to the real-time energy distribution, and learn the optimal gain configuration by combining historical data to avoid the degradation of results caused by oversaturation or oscillation.

[0317] Link and noise management is implemented. Specifically, by monitoring the status of optical / electronic links, calibration is automatically triggered. For noise issues, measurement bandwidth and filtering are adjusted to reduce the impact of noise on the results. In case of anomalies, the system falls back to the analog backend to ensure service availability.

[0318] Furthermore, sampling and decoding are specifically as follows:

[0319] The solver performs multiple samplings (100 by default), each sampling yielding a binary assignment vector x∈{0,1}. n The system selects the sample with the lowest energy as a candidate solution.

[0320] x * =arg min x∈samples H(x).

[0321] Post-processing of sampling results: Remove duplicate samples to reduce subsequent processing overhead; sort by energy value and prioritize processing low-energy samples; statistically analyze sample distribution to evaluate solution quality.

[0322] 7.5 Proof verification and decoding are performed.

[0323] The system performs multi-dimensional verification of candidate solutions:

[0324] Axiom Verification: Check if all axiom variables are assigned the value 1, for all A i ∈A: x _Ai =1; where forall means for all.

[0325] Target validation: Check if the target variable x has been assigned the value 1. _G =1;

[0326] Structural verification: Check whether all structural constraints are satisfied, that is, whether the QUBO penalty term of the structural constraints is zero.

[0327] When QUBO constraint verification fails, the system employs semantic verification as a backup mechanism. Semantic verification determines whether the set of axioms semantically implies the objective through truth table enumeration or model checking.

[0328] A->G<->for all M:(M->A)->(M->G); where for all means for all.

[0329] That is, the objective G is true if and only if for all assignments that make all axioms true, where M is the model of all possible truth assignments (model = a set of variable assignments). If the semantic verification passes, the proof is considered successful.

[0330] Furthermore, for the successfully verified solution, the system reconstructs the proof steps based on the QUBO variable assignments:

[0331] Identify all auxiliary variables assigned a value of 1 and their corresponding derivable intermediate formulas; based on the rule constraints, backtrack the derivation rules of each intermediate conclusion; construct a proof tree from axioms to the goal, demonstrating the complete reasoning path.

[0332] 7.6 A hybrid proof model is adopted.

[0333] The system supports three proof modes, which can be flexibly selected according to the characteristics of the problem:

[0334] QUBO mode: Pure quantum optimization solution, suitable for complex multi-step reasoning problems.

[0335] Symbolic pattern: Uses traditional symbolic reasoning (forward / backward / bidirectional search), suitable for simple problems or scenarios requiring interpretable proofs.

[0336] Hybrid mode: First attempt symbolic reasoning; if no proof is found within the time limit, switch to QUBO mode. This mode balances efficiency and completeness.

[0337] Hybrid mode employs an adaptive strategy:

[0338] if problem_complexity < threshold_1:

[0339] mode = "symbolic"

[0340] elif problem_complexity < threshold_2:

[0341] mode = "hybrid"

[0342] else:

[0343] mode = "qubo"

[0344] The problem complexity is calculated based on characteristics such as the number of axioms, the number of variables, and the depth of formulas.

[0345] In summary, this invention adopts a QUBO-neural network fusion architecture, which for the first time integrates quantum optimization coding with neural network rule guidance. By predicting the optimal inference rule through the neural network and dynamically adjusting the QUBO constraint weights, it achieves intelligent proof search and avoids the search space explosion problem caused by blind rule selection in traditional methods.

[0346] This invention employs a lightweight neural network setup and training mode, unlike the massive models used in enterprises or large projects. It uses a smaller 32-dimensional neural network and simple self-generated training data, allowing the neural network to act only as a predictor, breaking down large problems into smaller ones, and achieving high efficiency with minimal resource consumption.

[0347] This invention encodes logic proof problems as QUBO optimization problems. Leveraging the parallel search advantage of quantum optimization algorithms, multiple proof paths can be explored simultaneously, improving the efficiency of solving complex problems. Furthermore, the modular design makes the system easily expandable with new inference rules, feature extraction methods, and solver backends, providing a solid foundation for future feature enhancements. In particular, it exhibits strong adaptability to the solver backend, allowing for plug-and-play integration with various high-performance computing hardware, resulting in direct efficiency improvements.

[0348] It supports 12 natural deduction rules, including Modus Ponens, Modus Tollens, and resolution, ensuring complete coverage of propositional logic and handling proof problems ranging from simple to complex. It implements a forward inference iterative mechanism that can automatically detect and encode multi-step inference chains, such as hypothetical syllogisms, effectively solving the difficulties existing methods face when dealing with chained reasoning. It supports three proof modes: QUBO, symbolic, and hybrid, and can dynamically select the optimal strategy based on problem characteristics, achieving the best balance between efficiency and completeness.

[0349] By combining QUBO constraint verification and semantic verification, the correctness of the proof result is guaranteed. Even if there are errors in the QUBO encoding, the validity of the proof can be guaranteed through semantic verification.

[0350] In the development of safety-critical software such as operating system kernels, blockchain smart contracts, and aerospace control systems, program correctness verification is a crucial technical step. Traditional model checking methods often encounter the technical challenge of state space explosion when dealing with concurrent programs or distributed systems, making it impossible to complete verification within the time limit allowed by the project.

[0351] The method of this invention can be applied to formal verification tools for the aforementioned software systems. By transforming the program's control flow graph (CFG), data dependencies, and security properties (such as no deadlock and mutual exclusion) into propositional logic formulas, and utilizing the QUBO encoding and quantum solver of this invention for parallel search, the computational bottleneck of traditional verification methods can be overcome. This application can efficiently detect deep-seated logical vulnerabilities and concurrency errors in the code, improving the robustness and security of critical software systems.

[0352] In modern VLSI design, with the number of transistors reaching tens of billions, verifying whether the logic function of the circuit design conforms to specifications (i.e., attribute checking) and whether the synthesized netlist is consistent with the register-transfer-level (RTL) design (i.e., logic equivalence checking) have become pain points restricting chip development cycles. Existing simulation-based verification methods have low coverage, while formal verification tools based on SAT / BDD are prone to memory overflow when dealing with complex arithmetic logic units.

[0353] This invention provides a novel hardware verification path based on quantum optimization. The system can map circuit logic defined in a hardware description language (Verilog / VHDL) to a QUBO optimization model, and use quantum computing to quickly search for counterexamples that violate design specifications. This application can significantly shorten the verification cycle of high-end chips, reduce the economic risk of tape-out failures, and improve the efficiency of electronic design automation (EDA) processes.

[0354] When building intelligent question-answering systems for vertical fields such as medical diagnosis assistance, legal text consultation, or financial risk analysis, the system not only needs to understand natural language, but also needs to perform multi-step reasoning based on massive knowledge bases to generate accurate answers. Traditional rule-based inference engines suffer from high inference latency when faced with large-scale knowledge bases, making it difficult to meet the needs of real-time interaction.

[0355] This invention can be embedded as a high-performance logical reasoning engine into intelligent question-answering systems. The system utilizes a neural network module to rapidly predict reasoning paths, performs intent parsing and logical encoding of user queries, and retrieves the reasoning chain in parallel within a vast knowledge space through a quantum computing backend. This application effectively solves the reasoning timeout problem in complex logical question answering, achieving millisecond-level accurate responses to complex user questions and enhancing the decision-making support capabilities of artificial intelligence systems in specialized fields.

[0356] Example 8 proposes an automatic theorem proof method for propositional logic based on quantum optimization and neural network rule guidance, covering formula input and parsing, feature extraction, neural network rule prediction, QUBO encoding construction, quantum solution, proof verification and decoding, and result output. The specific implementation process is as follows:

[0357] This embodiment uses the syllogistic reasoning problem "P;P->Q;Q->R|-R" as an example to illustrate the complete workflow.

[0358] Step 1: Formula Input and Parsing. The system receives the set of axioms (input via `--axioms "P;P->Q;Q->R"`) and the proof objective (input via `--goal "R"`). The recursive descent parser performs lexical and syntactic analysis on the input, converting the formula string into an Abstract Syntax Tree (AST). The parser supports operators such as negation (~), conjunction (∧), disjunction (∨), implication (->), and equivalence (<->), and automatically processes them according to precedence (negation > conjunction > disjunction > implication > equivalence). In this example, the parser yields: axioms {P,P->Q,Q->R}, and objective R.

[0359] Step two involves feature extraction and neural network rule prediction. The system extracts a 32-dimensional feature vector from the AST, including: basic features (number of axioms, total number of variables, formula depth, etc.), operator distribution features (number of various logical operators), pattern matching features (ModusPonens potential, ModusTollens potential, inference chain potential, etc.), and variable relationship features (variable overlap ratio, target coverage, etc.). The feature vector is input into a pre-trained rule selection neural network (containing two residual blocks), which outputs a weight vector w∈[0,1] for 12 inference rules. 12In this embodiment, the system detected a chain-like implication structure and predicted a ModusPonens weight of 0.92 (the highest), indicating that this rule is most likely to be used.

[0360] Step 3: Construct QUBO encoding. The system creates a QUBO variable, P->x, for each atomic proposition. P ∈{0,1}, create auxiliary variables and add structural constraints for the composite formula, such as the constraint x corresponding to P->Q. Imp =1-x P +x P ·x Q The Hamiltonian includes four types of constraints: axiomatic constraints λ axiom ·(1-x _A The mandatory axiom is true; the objective constraint λ goal ·(1-x _G The objective must be true; structural constraints ensure logical semantic consistency; rule constraints H rule =λ rule ·Σw r ·C r The inference rules are encoded based on the neural network weights. Iterative forward inference is used to detect derivable intermediate conclusions (in this example, Q can be derived from P and P->Q), and corresponding constraints are added. Finally, the Hamiltonian is compiled into the standard QUBO form min:x. T Qx+c T x+offset.

[0361] Step four: Perform quantum solution. The system supports multiple solvers: simulated CIM, CIM, exact solution, etc. The QUBO problem is input into the solver and sampled multiple times (default 100 times), each time yielding a binary assignment vector x∈{0,1}. n The sample with the lowest energy is selected as the candidate solution. The solution yields: x P =1,x _Imp_PQ =1,x Q =1,x _Imp_QR =1,x r =1, energy is close to 0.

[0362] Step 5: Perform proof verification and output the results. The system performs multi-dimensional verification: axiomatic verification (checking for all A... i ∈A: x _Ai =1, for all means for all), target validation (check x) _G=1), Structural verification (checking that the constraint penalty term is zero). If QUBO verification fails, semantic verification is used as a backup mechanism. After successful verification, the system reconstructs the proof steps based on variable assignments, constructing a reasoning path from axioms to the objective. Output of this example: Axioms {P, P->Q, Q->R} are all true; intermediate derivation Q (from P, P->Q via ModusPonens); objective R is true (from Q, Q->R via ModusPonens).

[0363] Step Six: Hybrid Proof Strategy. The system supports three modes: QUBO mode (--mode qubo, pure quantum optimization, suitable for complex problems), symbolic mode (--mode symbolic, traditional symbolic reasoning, suitable for simple problems), and hybrid mode (--mode hybrid, first attempts symbolic reasoning, then switches to QUBO if timeout occurs). The system can automatically select the optimal mode based on the problem complexity.

[0364] Complete command example:

[0365] bash

[0366] python -m qubo_prover.cli --axioms "P; P->Q; Q->R" --goal "R" --use-neural --verbose

[0367] Output result:

[0368]

Axioms

[0369]

Derivation

[0370]

Objective

[0371] Conclusion: The proof was successful.

[0372] This invention constructs an efficient, robust, and scalable automated theorem proving system by cross-paradigm integration of neuro-heuristic intuition, quantum parallel search capabilities, and classical logical rigor. This system not only theoretically solves the search space explosion problem but also demonstrates excellent scalability and stability in multiple practical engineering scenarios through specific hardware adaptation and verification mechanisms.

[0373] This invention addresses the problem that static optimization models cannot handle dynamic multi-step reasoning by employing a forward inference iterative mechanism. Since logical reasoning dynamically generates new conclusions, and QUBO models require pre-defined static variable contradictions, the iterative process described in the embodiments can pre-detect all potential intermediate propositions, establishing complete variable boundaries, thus enabling chained reasoning to be fully encoded into the Hamiltonian.

[0374] The energy-terrain reshaping method guided by neural networks solves the problems of blind search and lack of directionality in traditional physical solutions. The example describes the application of neural network-predicted weights w... r Directly coupled into the rule constraint term C r In this construction, that is, the AI's intuition is physicalized as an energy trough. The above methods make the quantum solution process no longer a blind guessing game with equal probability, but tend to proceed in the direction of higher probability and logical rules, thus compressing the ineffective search space.

[0375] Furthermore, this invention also solves the problem that large-scale logic problems cannot be implemented on limited physical resources through heterogeneous hardware scheduling and sparse storage optimization.

[0376] The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all fall within the protection scope of the present invention.

Claims

1. An automated theorem proof method based on neural network guidance and quantum optimization, characterized in that, include: Obtain a propositional logic proof task containing the target propositional formula and axiom set to be proved, and extract the logical structure feature vector that reflects the propositional logic proof task; Input the logical structure feature vector into the pre-configured rule selection model to generate rule applicability weights for the natural deduction rule set; Based on the objective proposition formula, axiom set, and rule applicability weights, a quadratic unconstrained binary optimization model is constructed. The quadratic unconstrained binary optimization model includes rule constraint terms, and the rule applicability weights are configured to adjust the penalty coefficients of the rule constraint terms in order to reshape the energy landscape of the solution space. The quadratic unconstrained binary optimization model is mapped to the computational solution backend to perform quantum computing optimization, resulting in binary variable assignments that minimize the model energy; Verify the validity of binary variable assignments, and reconstruct the logical proof path from the set of axioms to the target proposition formula based on valid binary variable assignments; The energy function H of the quadratic unconstrained binary optimization model is constructed as follows: H=H axiom +H goal +H structure +λ rule ∑ r w r ·C r ; Among them, H axiom For axiom constraints that force the variables corresponding to the set of axioms to take the value of true; H goal H is a target constraint term that forces the variable corresponding to the target proposition formula to take the value of true; structure The structural constraint term to ensure the semantic consistency of logical operators; λ rule Basic rule penalty coefficient; w r C represents the weight value corresponding to the r-th rule in the rule applicability weights. r The rule constraint term corresponding to the r-th rule is configured to contribute non-zero penalty energy if and only if the premise variable of the rule is true and the conclusion variable is false.

2. The method according to claim 1, characterized in that, Construct a quadratic unconstrained binary optimization model, including: Perform a forward inference iterative process to determine the set of variables required for the model: initialize the current knowledge base containing the set of axioms; Traverse the set of natural deduction rules and check whether the combination of propositions in the current knowledge base satisfies the preconditions of the predetermined rules; if so, derive intermediate propositional conclusions based on the predetermined rules and add them to the current knowledge base. Repeat the detection and derivation steps until the current knowledge base is no longer expanded or already contains the target proposition formula; Map all accumulated propositions in the current knowledge base to QUBO variables, and construct corresponding rule constraints for each pair of derivation relations established during the forward inference iteration process.

3. The method according to claim 1, characterized in that, Rule constraint C r Includes constraint C for the affirmative antecedent law MP and constraints C on the law of negation of consequent MT The calculation formulas are as follows: C MP =x P ·x P->Q ·(1-x Q ); C MT =x P->Q ·x ~Q ·(1-x ~P ); Where, x P x is the binary variable corresponding to the antecedent proposition P in the rule premise; P->Q x is an auxiliary binary variable corresponding to the proposition P->Q; Q x is the binary variable corresponding to the consequent proposition Q in the rule conclusion; ~Q x is an auxiliary binary variable corresponding to the negation form ~Q of the consequent proposition; ~P For the auxiliary binary variable corresponding to the negation form ~P of the antecedent proposition; the constraint is configured to produce an energy penalty of 1 if and only if the truth value combination of the relevant propositions violates the logical reasoning rules.

4. The method according to claim 1, characterized in that, Mapping the quadratic unconstrained binary optimization model to the computational solution backend includes adaptively scheduling heterogeneous computing resources based on the scale of model variables: The total number of binary variables N in the quadratic unconstrained binary optimization model is calculated. If N is less than the first preset threshold, the model is mapped to a coherent Ising machine classical simulator based on a central processing unit, and the dynamic equations are solved using a numerical integration algorithm. If N is greater than the first preset threshold and less than the second preset threshold, the model is mapped to a parallel coherent Ising machine simulator based on a graphics processor, and large-scale parallel evolution is performed using a single instruction multiple data stream architecture. If N is greater than the second preset threshold, the model is mapped to the coherent Ising machine, and the QUBO model is naturally mapped to the equivalent Ising model.

5. The method according to claim 3, characterized in that, Structural constraints include semantic consistency constraints on auxiliary variables introduced for logical operators. For negation, conjunction, and implication operations in propositional logic, the corresponding structural penalty function C... struct The constructions are as follows: C ~P =(x ~P +x P -1) 2 ; C P∧Q =(x P∧Q -x P ·x Q ) 2 ; C P->Q =(x P->Q -1+x P -x P ·x Q ) 2 ; Where, x P∧Q For the auxiliary binary variable corresponding to the conjunction proposition P∧Q; The structural penalty function is configured to generate a positive energy penalty when the value of the auxiliary binary variable is inconsistent with the truth table definition of the logical operator, in order to force the auxiliary binary variable to maintain semantic correctness in a state of minimizing energy.

6. The method according to claim 4, characterized in that, Before mapping the model to the computational solution backend, a global memory resource optimization strategy is adopted to manage the storage of the coupling matrix Q of the quadratic unconstrained binary optimization model. The global memory resource optimization strategy includes storing the non-zero elements of the coupling matrix Q in a compressed sparse row format, which reduces the storage space complexity S. mem The following relationship must be satisfied: ; Where N is the total number of binary variables in the model, N nz This represents the number of non-zero elements in the coupling matrix Q; The computational solution backend is configured with a memory pool reuse mechanism to maintain and reuse allocated sparse matrix memory blocks across multiple sampling tasks.

7. The method according to claim 1, characterized in that, Extracting the logical structure feature vector that reflects the propositional logic proof task, including calculating multi-dimensional logical features to form the logical structure feature vector: Calculate basic statistical characteristics, including the number of axioms in the axiom set, the total number of variables, and the depth of the formula tree; Calculate the distribution characteristics of operators, including the frequency of occurrence of implication operators, negation operators, conjunction operators, and disjunction operators in the axiom set and the target proposition formula; The calculation of reasoning pattern matching features generates positive antecedent potential and negative consequent potential indices by detecting whether there are clause structures in the axiom set that satisfy the premises of the reasoning rules. Calculate the characteristics of variable association, including the percentage of variable overlap between the axiom set and the target proposition formula, and the number of isolated variables.

8. The method according to claim 1, characterized in that, Verify the validity of binary variable assignments, including implementing hierarchical verification strategies: Perform energy constraint verification by calculating the total energy value of the binary variable assignment under the quadratic unconstrained binary optimization model. If the total energy value is equal to zero, the verification is considered successful. If the total energy value is greater than zero, the energy constraint verification is deemed to have failed, and a backup verification process based on the semantic model is triggered. The backup verification process includes: constructing a set M of truth-valued models that makes all propositions in the axiom set true, and checking whether the target proposition formula is true under each truth-valued model in the set M; If yes, the verification is considered successful; otherwise, the verification is considered unsuccessful.

9. The method according to claim 1, characterized in that, The pre-configured rule selection model is obtained through supervised learning pre-training. The training objective is to minimize the difference between the predicted weight distribution and the actual application of rules in historical successful proof paths. The loss function L during training is defined as follows: L=-Σ i S r [y i,r ·log(w i,r )+(1-y i,r )·log(1-w i,r )]; Where i represents the i-th proof task sample in the training dataset; r represents the r-th rule in the set of natural deduction rules; y i,r The label is a binary label, with a value of 1 when the success proof path of the i-th task uses the r-th rule, and a value of 0 otherwise; i,r Let L be the applicability weight of the r-th rule predicted by the model for the i-th task; during the training process, the model parameters are updated through the backpropagation algorithm until the loss function L converges.

Citation Information

Patent Citations

  • Propositional-logic-based principle feature analysis method and system in data mining

    CN103425716A

  • Hybrid quantum computing architecture for solving quadratic unconstrained binary optimization problem

    CN114358290A