Methods, systems, and program products for logical neural networks

By designing a logical neural network (LNN) and mapping neurons to logical formulas, the gap between formal logic inference and data-driven approaches in neural networks is bridged, enabling interpretable and verifiable logical inference and adaptability to big data.

CN115605877BActive Publication Date: 2025-10-31INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202180034524.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-05-13
Filing Date
2021-04-13
Publication Date
2025-10-31
Estimated Expiration
2041-04-13

AI Technical Summary

Technical Problem

In existing technologies, there is a gap between formal logic inference and data-driven neural network architectures, resulting in computational intensity, the need for extensive human configuration, and a lack of interpretability. At the same time, it is sensitive to inconsistencies and difficult to apply effectively in big data environments.

Method used

Design a logical neural network (LNN) that models weighted fuzzy or classical logical concepts by neurons and maps them one-to-one with knowledge base operations of logical formulas, enabling interpretable and verifiable inferences while leveraging big data and being resilient to inconsistencies.

Benefits of technology

It enables logical inference in any direction, is interpretable and verifiable, and can continuously differentiate between different forms, adapting to big data environments and providing sound reasoning rules and automated learning capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115605877B_ABST
    Figure CN115605877B_ABST
Patent Text Reader

Abstract

A system for configuring and using a logical neural network comprising a graph syntax tree of formulas in a represented knowledge base connected to each other via nodes representing each proposition. For each logical connection appearing in each formula, there is one neuron; additionally, for each unique proposition appearing in any formula, there is one neuron. All neurons return pairs of values ​​representing upper and lower bounds of the truth value of their corresponding sub-formulas and propositions. Neurons corresponding to logical connections receive the outputs of neurons corresponding to their operands as input and have activation functions configured to match the truth function of the connection. Neurons corresponding to propositions receive the outputs of neurons established as proofs of the proposition's truth value bounds as input and have activation functions configured to cluster such bounds most tightly. Bidirectional inference allows each occurrence of each proposition in each formula to be used as a potential proof.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure generally relates to machine learning and neural networks, as well as apparatus, systems, and methods for logical neural networks that model logic and are capable of inference in any direction. Background Technology

[0002] Neurosymbolic reasoning systems aim to bridge the gap between the most researched areas of knowledge in artificial intelligence: the principled, deductive reasoning of any of the various systems of formal logic, and data-driven, gradient-optimized neural network architectures. Both paradigms have many important advantages and disadvantages. Formal logic is interpretable, verifiable, and broadly generalizable, but it is computationally intensive, requires extensive input from domain experts, and can stray from the normal process due to even minor inconsistencies. Neural networks, on the other hand, perform well even with unprocessed and / or noisy data, require little human configuration, and can run efficiently in parallel. However, their drawbacks include their requirement for large training datasets, their vulnerability to adversarial attacks, and their uninterpretable, black-box nature. Summary of the Invention

[0003] One aspect of this disclosure is the merging of two knowledge domains of logical neural networks: 1) principled, deductive inference via any of the various systems of formal logic, and 2) a data-driven, gradient-optimized neural network architecture, and an operational method that leverages the strengths of either while mitigating their weaknesses.

[0004] One aspect of the present invention is a neural network architecture, and in particular a logical neural network (LNN) product in which neurons model concepts of weighted fuzzy or classical logic.

[0005] On the other hand, the LNN architecture is arranged to correspond one-to-one with the operations in the knowledge base (KB) of logical formulas, such that the neural network can make inferences in any direction (i.e., through normal evaluation, affirmative antecedent reasoning, compound cancellation, and all relevant inference rules).

[0006] On the other hand, LNN systems, methods, and computer program products operate to perform inferences on systems that behave equivalent to classical logic formulas (using an established set of inference rules), and at the same time, the formulas they represent are continuously differentiable so that they can vary continuously between different forms.

[0007] On the other hand, in order to satisfy the requirements of behavior equivalent to inference on a system of classical logic formulas and the continuous differentiability of the formulas it represents so that it can change continuously between different forms, LNN implements weighted fuzzy logic that provides sound inference rules and intuitive mathematical behavior, making its behavior similar to an activation function of the Modified Linear Unit (ReLU) type, which is mathematically defined as y = max(0,x).

[0008] Furthermore, LNN systems, methods, and computer program products operate through the execution of constraints and define a form of continuous classical logic suitable for automated learning that guarantees accurate representation of given classical inputs.

[0009] Furthermore, a system, method, and computer program product are provided that offer the ability to provide neural symbolic fusion: interpretable, verifiable neural networks informed by any available domain knowledge, yet resilient to inconsistencies, and capable of leveraging big data, even in its absence.

[0010] According to one embodiment, a computer-implemented method is provided, comprising: receiving an input query and an input proposition for inferring a logical truth value based on the input query at one or more hardware processors; configuring a logical neural network (LNN) structure using the one or more hardware processors according to a system of logical formulas corresponding to inference rules, the LNN structure including one or more propositional neurons representing the input proposition and one or more neurons representing logical connections; evaluating the logical inference based on the input query using the LNN structure; and, in response to the evaluation, outputting an output truth value that proves or does not prove the logical inference within aggregation bounds.

[0011] In another embodiment, a computer-implemented system is provided, comprising: one or more hardware processing units configured as a logical neural network (LNN) structure having a plurality of neurons and connections, the plurality of neurons and connections of the LNN structure corresponding one-to-one with a logical formula system, and running a method for performing logical inference, wherein: for each corresponding logical connection in each formula or sub-formula of the logical formula system, there exists one neuron among the plurality of neurons, the neuron having one or more links providing input information, the input information including operands of the logical connection, and the information also including parameters configured to implement a truth function of the logical connection, and each neuron corresponding to the logical connection having parameters for providing computation. The corresponding activation function calculates and returns a pair of values ​​indicating the upper and lower limits of the formula or subformula of the system formula, or returns the truth value of the proposition; and for the corresponding proposition of the formula or subformula of the system formula, there exists one of the plurality of neurons, and the one neuron has one or more linked edges corresponding to a formula that provides information on the limits proving the truth value of the corresponding proposition, and the information also includes parameters configured to aggregate the tightest limits; and the one or more hardware processors are configured to: receive an input query or logical inference; evaluate the logical inference based on the input query or logical inference using the LNN structure; and in response to the evaluation, output the truth value of the output logical inference, which proves or does not prove the logical inference within the aggregated tightest limits.

[0012] In another aspect, a computer program product for performing operations is provided. The computer program product includes a storage medium that can be read by processing circuitry and stores instructions executed by the processing circuitry to perform a method. This method is the same as that listed above. Attached Figure Description

[0013] The objectives, features, and advantages of this disclosure will become more apparent when described in conjunction with the accompanying drawings, wherein:

[0014] Figure 1 This is a system and method for configuring and using logical neural networks (LNNs) according to embodiments of the present invention;

[0015] Figure 2A The knowledge graph tree structure depicting use case examples of LNNs is described;

[0016] Figure 2B Show Figure 2A Backpropagation inference computation in the knowledge graph tree structure of LNN use case examples;

[0017] Figure 2C Describing for Figure 2BThe example use case shown is a backward activation function for calculating the downward traversal path and performing backward inference of the syntax tree.

[0018] Figure 3 Describing the target in Figure 2A The example LNN decomposition of the use cases described in the text is used to inject formulas and examples into the knowledge graph tree to compile queries;

[0019] Figure 4 A syntax tree representing an example first-order logical neural network (net) in the embodiment is depicted;

[0020] Figure 5 A method for evaluating predictions and bidirectional inferences of propositional LNNs and first-order logic LNNs according to an embodiment is described, wherein the recurrent neural network has neurons that correspond one-to-one with the formulas describing the system being modeled.

[0021] Figure 6A Depicting Figure 5 Example methods for forward or upward evaluation in bidirectional inference methods;

[0022] Figure 6B Described Figure 5 Example methods for backward or forward evaluation in bidirectional inference methods;

[0023] Figure 6C Depicting Figure 5 Example methods of aggregation in bidirectional inference methods;

[0024] Figure 7A This shows an example LNN structure configured to describe the syntax tree diagram structure of an example logic program;

[0025] Figure 7B An example LNN weighted logical neuron, including a logical activation function, is illustrated;

[0026] Figure 8 An exemplary embodiment of a pipelined implementation of a Deep Thinking Question Answering (DTQA) system is shown;

[0027] Figure 9 This illustrates a query-based LNN graph according to an example DTQA implementation.

[0028] Figure 10 A schematic diagram of an example computer or processing system that can be configured and implemented with a logical neural network according to embodiments herein is shown. Detailed Implementation

[0029] Symbolic logic is a way of encoding knowledge using symbols and logical operators. The central component of a symbolic system is the knowledge base (KB), which is a set of logical expressions. These expressions are represented using one of many languages ​​for representing logical knowledge; propositional logic is the simplest and least expressive, and is the most widely used first-order logic language. Logical expressions in the knowledge base, when considered as given and not derived from other expressions, are also called axioms. Axioms represent facts about certain domains of interest and the rules governing those domains. Once knowledge has been ingested into the knowledge base, it can be used to answer questions / queries by logically inferring new expressions from those expressions contained in the knowledge base. Answering a query q using the knowledge base KB is projected as proving the entailment KB╞q. That is, does the set of facts and rules in the knowledge base prove the conjecture made by the query? There are several ways to prove implication using logical inference. One of the simplest methods is called model checking. A model in symbolic logic is an assignment of truth values ​​to the symbols contained in a logical expression or formula, also called an interpretation. The model checks enumerate all possible assignments of truth values ​​to all symbols in the knowledge base and the guess, and considers the guess to be true if the guess is also true for all combinations where the knowledge base is true. The complexity of the model check grows exponentially with the number of symbols in the knowledge base, making it inefficient for large knowledge bases. The efficiency of logical inference can be improved by using theorem proofs. Here, the rules of inference are applied directly to the axioms of the knowledge base to construct a proof of the desired query, without enumerating all possible truth value assignments of all symbols. A proof refers to the chain of conclusions (derived expressions) that leads to the desired query.

[0030] This disclosure provides systems, methods, and computer program products for configuring and using logical neural networks (“LNNs”). A logical neural network (LNN) is a neural network (“net”) that has a one-to-one correspondence with a system of logical formulas, where evaluation is equivalent to logical inference. This is significant because LNNs simultaneously, for the first time, combine many key characteristics from both neural networks (learning) and symbolic logic (reasoning): providing fully differentiable, symbolically interpretable, incorporating domain knowledge, supporting compound first-order logic (FOL) formulas, and adhering to the open-world assumption. LNNs extend traditional neural network inputs by integrating both rules and facts into their graph structure.

[0031] Neural network architectures rigorously define the concepts of weighted fuzzy or classical logic to model individual neurons. Arranged in a one-to-one correspondence with the operations in the knowledge base (KB) of logical formulas, such neural networks are capable of inference in any direction (i.e., via normal evaluation, affirmative antecedent reasoning, compound cancellation, and all relevant inference rules).

[0032] The primary design goal of LNNs is that their evaluations can behave equivalently to inferences on a system of classical logic formulas (using a pre-established set of inference rules). Simultaneously, it is crucial that LNNs are continuously differentiable and that their representations can indeed vary continuously between different forms. To satisfy these seemingly incompatible requirements, the concept of a rigorously defined weighted fuzzy logic is introduced. This weighted fuzzy logic provides provably sound inference rules and intuitive mathematical behavior, behaving precisely like the Modified Linear Unit (ReLU) in modern neural network literature. Furthermore, through the enforcement of constraints, a form of continuous classical logic suitable for automated learning is defined, which also guarantees an accurate and classical representation of a given classical input.

[0033] In this embodiment, the LNN is a feedforward recurrent neural network having: a) neurons arranged as a system of matching formulas; b) constrained neural weights to ensure classical logical behavior; and c) families of neurons that share relevant weights to perform inference. Unlike other neural networks, the LNN is different because: neurons generate bounded pairs (tensors); and alternatively, there exist pairs of neurons with matched weights for any bound.

[0034] Like all neural networks, LNN systems make predictions—for example, taking input data and generating predicted outputs. The strategy used to compute these predictions differs because it is structurally forced to match the logic formulas of a system, and its computation is constrained to be equivalent to performing inferences using logic formulas. The computation is highly interpretable and is constructed to utilize inputs (e.g., expert-written knowledge, pre-existing knowledge bases) and can perform complex inferences.

[0035] Although LNNs are represented as structured graphs with nodes and interconnecting edges that establish positive and negative correlations between the truth values ​​of the nodes, and where any node can be either an input or an output, the truth values ​​of LNNs do not need to have a probabilistic interpretation and do not require expensive normalization. Special cases of LNNs can be developed that present results that do indeed have a probabilistic interpretation.

[0036] Figure 1An exemplary method 100 for configuring, training, and using a logical neural network (“LNN” or “net”) structure 150 to perform inference is illustrated. As mentioned herein, the term “inference” refers to computing the truth values ​​(boundaries) of propositions, predicates, and formulas based on knowledge of the truth values ​​(boundaries) of other propositions, predicates, and formulas. Inference performed by an LNN via multi-directional inference / reasoning is inherently iterative, and in a sense, tightening the bounds of a given truth value can make it possible to subsequently infer tighter bounds of other truth values. The LNN is configured to implement weighted real-valued logic in the form of a neural network, which can be constrained to behave equivalently to classical logic (or fuzzy logic). In one embodiment, the bounds of formula and proposition truth values ​​can be initialized based on available observations (thereby tolerating missing data) such that inference (i.e., evaluation of the neural network) produces results in the form of truth bounds computed at specific neurons.

[0037] LNN 150 computes two types of inference: forward inference and backward inference. For neuron operands or propositions A and B, forward and backward inference include, but are not limited to, the following types:

[0038] Negation, its involution: A = 1 - ~A

[0039] Conjunctions include: 1) conjunctive syllogism: (B&~(A&B))→~A; 2) transpose: A→~(B&(A&B)); and 3) tautology: A→(B→(A&B)), where “&” is the logical AND operator.

[0040] Disjunction, including disjunctive syllogisms: in It is a logical OR operator.

[0041] Implication (B) includes: affirmative antecedent reasoning: (A & (A→B)) → B

[0042] Implication (A) includes:

[0043] 1) Negation of consequent reasoning: (~B&(A→B))→~A;

[0044] 2) Transpose: A→~(~B&(A→B)); and

[0045] 3) Tautology: A→((A→B)→B).

[0046] Typically, a logical neural network 150 combines the properties of two neural networks (i.e., learning) with the properties of symbolic logic (i.e., knowledge and reasoning), and specifically is a neural network with a one-to-one correspondence to a system of logical formulas, where evaluation is equivalent to logical inference. An LNN structure is a neural network structure of nodes (or neurons) and connecting edges, where nodes are configured to receive input based on the type of inference problem being solved. Structurally, an LNN is a graph comprising a syntax tree of formulas represented in a knowledge base (KB) connected to each other via nodes added for each proposition. Specifically, for each logical connection occurring in each formula, there is one neuron; furthermore, for each unique proposition occurring in any formula, there is one neuron. All neurons return pairs of values ​​in the range [0, 1], representing the upper and lower bounds of the truth values ​​of their respective sub-formulas and propositions. Explicit graph structures are used to manage neural connections for navigation, traversal, shortest path discovery, and the use of general graph theory formulas.

[0047] Figure 7A An example LNN structure configured as a syntax tree (knowledge graph) structure 700 is shown, which describes an example logic program including the following logical statements or formulas:

[0048] A = B & C;

[0049] B = C & (~D) & E; and

[0050] D = E.

[0051] exist Figure 7A In this model, nodes labeled D and E are propositional neurons that provide input (e.g., facts about the world). Nodes labeled A and B are logical connection neurons that implement logical functions. In one embodiment, there is one neuron for each logical connection in a formula, the formula having inputs linked to neurons corresponding to the operands of that connection and having parameters configured to implement a truth function for that connection. Figure 7A As shown, each node and connection is associated with an upper and lower bound value ranging from [0, 1] (e.g., U). A ,L A U B ,L B The corresponding pair of truth values ​​for the uncertainty bounds (i.e., the bounds ∈ [0, 1]) are recursively computed in forward and backward inference passes to obtain / update the truth value or degree of uncertainty of the particular logical inference being evaluated. In an embodiment, a neuron exists for each proposition, wherein the input is linked to a neuron corresponding to the formula for the bounds that prove the truth value of the proposition, and the parameters are configured to cluster the bounds most tightly.

[0052] Figure 7BAn example LNN weighted logic neuron 710 implementing activation function 702 is depicted, which is shown as, for example, representing a logic function (e.g., a disjunctive neuron). Alternatively, the concatenation of neurons &(x)) can be expressed as f(x·w–θ), which is a logic function that receives one or more input operands x0,x1,...,x i ,..,x n Each operand has a corresponding assignment or computation weight w0, w1, ..., w representing its importance. i ,..,w n , where θ is a constraint. In an embodiment, the parameters of the activation function of each neuron are adjusted to implement (non-negative) importance weighting for the neuron's inputs (and optionally, outputs), specifically, the set of inputs involved is established as those inputs with non-zero importance weights. In an embodiment, generalization of logical properties (such as composition, associativity, and commutativity) can be used to determine the initialization and operating parameters of neurons, intentionally managing the neuron's operating functions as logic gates. Typically, neurons corresponding to logical connections accept the outputs of neurons corresponding to their operands as inputs and have activation functions configured to match the truth functions of the connections. Neurons corresponding to propositions accept the outputs of neurons establishing evidence of the proposition's truth value as inputs and have activation functions configured to cluster such boundaries most tightly. While bidirectional inference allows each occurrence of each proposition in each formula to be used as a potential proof, the proof of a proposition can be explicitly established, for example, as the head of a Horn clause. Negation is modeled as a parameterless pass-through node, canonically performing NOT(x) = 1 – x, or

[0053] return Figure 1 The LNN structure 150 is configured to include nodes (neurons), each node being configured with an attached corresponding activation function 153, used to determine how to compute the corresponding node based on whether the neuron's input is relevant to the type of prediction problem the model is trying to solve, such as whether and how a particular node is activated (or not activated). The activation function can be linear or non-linear, and the output of each neuron can be a value ranging from 1 to 0.

[0054] Further as Figure 1As shown, the LNN is configured to include inference rule 157, which is a function representing and implementing logical forms of premises, analyzing the syntax of the premises, and inferring and returning a conclusion (or multiple conclusions) from the premises. The LNN is configured as a logic theorem prover that: a) uses a family of inference rules associated with each connection; and b) focuses on proving truth values ​​at sub-formulas that appear in the network rather than at new formulas. Unlike other theorem provers, the LNN is different because: a) truth values ​​are continuous; and b) connections have weights. The comprehensive set of inference rules implemented within the LNN structure includes, but is not limited to: rules of negation (e.g., negation introduction, negation elimination, double negation introduction, double negation elimination); rules of conditional sentences (e.g., conditional introduction, affirmative antecedent reasoning (condition elimination), negative consequent reasoning); rules of conjunction (e.g., conjunction introduction, conjunction reduction); rules of disjunction (e.g., disjunctive introduction, disjunctive reduction, disjunctive syllogism); and rules of biconditional sentences (e.g., biconditional introduction, biconditional elimination).

[0055] like Figure 1 As further shown, the LNN structure 150 of the network node is configured to receive both a "trusted" formula 120 and an "untrusted" formula 130 for computation and inference. The "trusted" formula 120 has neural weights and parameters that do not need to be learned and can be used as is; the "untrusted" formula 130 comes from a non-expert source or a machine-generated source and may include information that may potentially cause contradictions. Such formulas can be a system of formulas obtained from an ontology before training (e.g., a set of rules that take truth as true describing how something works, such as from...). Ontology and knowledge base (trademarks of Cycorp). In an embodiment, the components of the logical neural network are initialized based on formulas obtained from an existing logical knowledge base. Specifically, neural inputs and parameters are selected to match the syntax and behavior of the different connections constituting the formulas borrowed from the knowledge base, and initial bounds on the truth values ​​of formulas and propositions are selected to match the borrowed facts.

[0056] exist Figure 1 In the illustrated embodiment, the trusted formula 120 includes one or more expert-written formulas or inferences 125 and logical constraints 128, which are constraints specified or declared based on domain-specific knowledge and will be enforced during training. These constraints are further input as components of queries performed on the model to determine the inputs that satisfy the constraints. Furthermore, the untrusted formula 130 includes one or more non-expert formulas or inferences 135 and inputs 138 derived from an Inductive Logic Programming (ILP) / Natural Language Processing (NLP) machine. Once these sources are configured in the LNN network structure 150, the LNN is able to compute and perform calculations based on the provided inferences / formulas, and thus the LNN is used as a computational device.

[0057] Using standard neural network tools, the LNN receives training input 160 during a learning phase 140, and is further informed by a knowledge graph 145, which is derived from a knowledge base (“KB”), such as DBpedia, WordNet, or similar knowledge bases or lexical resources that provide unstructured and structured cross-domain knowledge data. The DBpedia knowledge base responds to queries by accessing a Resource Description Framework (RDF) representation of the extracted information (e.g., on the order of billions of structured RDF triples). Example training input 160 includes ground truth bounds of propositions (nodes), which comprise data presented as training facts 168 of observed ground truth statements with some annotations, and a training query 165 including a formula such that, given the training facts, knowledge, and inference rules, logical truth can be inferred by the LNN. During the training phase, an evaluation step is performed, including recursive forward and backward inference passes of an initial syntax tree programmed with initial conditions (e.g., the arrangement of logical formulas, importance weight values ​​assigned to propositions and / or predicates, given truth values, etc.). Inference evaluations are performed sequentially to obtain results, and based on these results, there exists an associated loss and a gradient measurement associated with the loss function (i.e., the set of partial derivatives of the loss function with respect to each model parameter). Based on the gradient results after each convergence (after evaluation is complete), the parameter values ​​of each individual LNN model can be updated or adjusted to improve the score. In an embodiment, when the tightest bounds of propositions are clustered, the importance weight for each occurrence of each proposition in each formula is reused as the basis for the importance weight of the corresponding proof.

[0058] The guided learning process uses a loss function 170, which is input into the LNN to establish an appropriate loss (e.g., least squared error). However, for LNN 150, logical consistency can also be used as the loss. That is, based on the knowledge graph data input, the training fact data input, and the formula, logical contradictions (i.e., upper and lower bounds of the cross) are penalized, and an error is associated with any inconsistency.

[0059] During training, to improve the measurement of LNN model performance, the model's parameters are tuned / retuned to minimize the loss function measurement of the error the model is achieving. Optimization is performed during training to minimize the loss. In this embodiment, initially, at each inference path, the truth value of the input, which is perceived as known (i.e., measured), acts as the fact (true). Unknown (UNK) values ​​still need to be updated during forward and backward tree traversals.

[0060] Once the learning / training process 140 is executed, a new LNN model 180 with optimized weights 175 that avoid contradictions is obtained and used to process queries and make inferences. Figure 1 As shown, the optimized LNN model 190 is therefore used during the inference phase 193, where the LNN model 190 receives one or more predictive inputs 180 in the form of an input predictive query 185 and input facts 188 (e.g., queries and facts received from a remote computer device 110 associated with an external user), as well as knowledge graph data 147 used with the model. The optimized LNN model 190 responds to the input query 185, input facts 188, and knowledge graph data 147 to generate inferential predicate outputs 195, such as anything the LNN predicts during the inference phase, and can be used to feed back those outputs into any system 105. The LNN model can also generate query results 198, i.e., answers to the proposed query. For example, for the proposed query "Does this picture include a cat?", the LNN model will output an answer for reception and / or presentation to the user via the computer or mobile device display 110.

[0061] Some key innovations that distinguish this LNN from other neural networks are: custom neural activation functions, which are constrained to match the truth functions of the connections they represent; the results expressed according to truth bounds to distinguish known, unknown, and contradictory states; and bidirectional inference allowing, for example, x→y to prove either y given x or y given x. The following can prove In addition, it is also evaluated based on its own merits.

[0062] As mentioned, structurally, an LNN is a graph comprising a syntax tree of all formulas in the represented KB, connected to each other via nodes added for each proposition. Specifically, for each logical connection occurring in each formula, there is one neuron; furthermore, for each unique proposition occurring in any formula, there is one neuron. All neurons return pairs of values ​​in the range [0, 1], representing the upper and lower bounds of the truth value of their respective sub-formulas and propositions. Neurons corresponding to logical connections receive the outputs of neurons corresponding to their operands as input and have activation functions configured to match the truth function of that connection.

[0063] Activation function

[0064] There are many candidate activation functions that can accommodate the classical truth functions of the corresponding connections of neurons, each differing in how it handles inputs that are strictly between 0 and 1. For example, min{x,y} is used for real-valued conjunctions. The appropriate activation function is one for x·y and max{0,x+y–1}. The choice of activation function is important because it relates to the differentiability of LNNs and various tautologies in classical logic (e.g., Whether the interaction is confirmed across the entire range [0, 1]. LNNs are typically defined to support as many such activation functions as possible, but a few requirements must be met:

[0065] Domain and range. The activation function must return a value in the range [0, 1] for inputs in the range [0, 1].

[0066] Monotonicity. The activation functions used for conjunction and disjunction must monotonically increase with respect to each operand, and the activation function used for implication must monotonically decrease with respect to the predecessor and monotonically increase with respect to the successor.

[0067] Neurons in LNNs return upper and lower bounds of the truth, rather than scalar results. This is achieved by applying the chosen activation function twice (depending on the case): conjunction and disjunction both calculate the lower bound from the lower bound of the input and the upper bound from the upper bound of the input, while implication calculates the lower bound from the upper bound of the predecessor and the lower bound of the successor, and vice versa. This simple method of limiting bounds requires the use of monotonic functions.

[0068] The following are useful but not essential properties of activation functions:

[0069] 1. De Morgan's Law. Conjunction and disjunction are related via De Morgan's Law, that is, real-valued disjunction. Should generate and Both.

[0070] 2. Implication via the residual. The implication should be the conjunction of the residuals, or specifically... The motivation for defining real-valued implication x→y in this way is to make affirmative antecedent reasoning equivalent to reasoning via... The conjunction of .

[0071] 3. Commutativity and Associativity. Conjunction and disjunction should be commutative and associative (although reconfiguration of parameters is allowed, if any) and the implied predecessors should be commutative, i.e., such that (x1→(x2→y))=(x2→(x1→y)).

[0072] Each of the above aims to preserve the intuitive inference behavior of human viewers and authors regarding the formulas used by LNNs. It has been observed that these properties do not guarantee... ((x→0)→0)=x or However, these identities are true independently of certain choices of the activation function.

[0073] Triangular norms, or t-norms, and their associated t-conorms and residuals are natural choices for LNN activation functions because they perform correctly for classical inputs and possess well-known inference properties. Logic defined according to such functions is represented as t-norm logic. Common examples of these include:

[0074]

[0075] Of these, only Lukasiewicz logic provides a familiar one. Identity, and only Godellogic provides Identity.

[0076] Weighted activation function

[0077] While the t-norm and related functions listed above satisfy the requirements of LNN activation functions, they do not provide adjustable parameters for model optimization and learning purposes. Therefore, it is of interest to introduce the concept of importance weighting, whereby neural inputs with larger (non-negative) weights have a greater influence on neural outputs, and intuitively, neural inputs with zero weights have no effect. Typically, this can take many forms.

[0078] While importance weighting is a key feature of LNNs, it does not require LNNs to be useful in a given setting. LNNs using strictly unweighted activation functions can still infer using partial confidence from their constituent formulas and can infer the truth of real values, as long as the truth of the input is anywhere in the range [0, 1]. Moreover, importantly, the differentiability of LNNs allows them to pass gradient computation from whatever system consumes their output (e.g., a loss function) to whatever system produces their input (e.g., another neural network responsible for extracting predicate data from different structured data such as images or text).

[0079] Propositional LNN Example Use Cases

[0080] Reference Figure 1 An example logical neural network 150 is formed based on the first observation and theorization phase, in which observations are recorded and facts and rules about those observations are theorized. Figure 2AIn the example use cases, during these phases, it can be observed that the entity, as a dog with a tail and whiskers, also chases. It can be observed that no other device, such as a laser pointer, is being chased by the entity. Further observation could be of an entity that is a cat with a tail and whiskers, and it chases without a laser. From these observations, it can be theorized that 1) `cat.nand.dog`, for example, the entity can be a cat or a dog, but not both; 2) `implies.cat`, for example, an entity with a tail, whiskers, and chasing, and chasing a laser implies a cat, or an entity with a tail, whiskers, and only chasing a laser implies a cat. Alternatively, a cat rule can be theorized, for example, `cat.rule: Every cat has a tail, whiskers, and only chases a laser.`

[0081] LNN construction progresses to the logic programming stage, where corresponding predicates and / or propositional elements are defined, such as dog, tail, whiskers, chases, laser (or ~laser (~laser)), etc., and logical formulas using these elements corresponding to theories or rules are proposed, such as 1) ~(cat&dog); 2) tail&whiskers&(laser→chases)→cat; 3) tail&whiskers&(laser→chases)&(chases→laser)→cat.

[0082] In the example of the theoretical cat rule, logical formulas can be designed, such as:

[0083] cat→tail&whiskers&(laser→chases)&(chases→laser).

[0084] In this embodiment, the logical neural network is constructed as a neural network program. During the programming phase, this phase also includes converting the corresponding propositional elements and proposed logical formulas into a programmed LNN structure using a programming language for graphical user interface applications. For some of the proposed implies.cat theories in the example, the Python programming language statements include the following:

[0085] g['cat.nand.dog']=Not(And('cat','dog'))

[0086] g['laser->chases']=Implies('laser','chases')

[0087] g['chases->laser']=Implies('chases','laser')

[0088] g['cat.feats']=And('tail','whiskers','laser->chases','chases->laser')

[0089] g['implies.cat']=Implies('cat.feats','cat')

[0090] Then, another LNN construction phase involves mapping the LNN's programming statements to a graph structure, such as a knowledge graph or syntax tree.

[0091] Figure 2A Example use cases of a logical neural network (“net”) 200 formed according to the methods described herein are shown. While LNNs are typically described in terms of first-order logic, the following example use cases first describe LNNs limited to propositional logic. For example... Figure 2A As shown, each logical connection or edge 212 has a neuron 210, plus a neuron 220 for each proposition / predicate 202. Each generated neuron 210 has a one-to-one correspondence with the system of logical formulas 205, 208, where evaluation is equivalent to logical inference. To generate the logical neural network, the computational system receives input (e.g., knowledge graph / predictive input data / facts) to output truth values ​​(represented by upper and lower bounds) at any neuron (e.g., a neuron typically involved in querying the formula). Neurons 210 are arranged to match the formula syntax tree, and proposition / predicate neurons 220 both provide and recursively aggregate proven truth values. Typically, negations (and first-order quantizers) are parameterless pass-through nodes. As shown, some neurons 210 give uncertainty bounds 213 for values ​​between 0 and 1. Each neuron 210 has a custom activation function 211 that computes the bounds to the truth values. Other methods employ bidirectional inference.

[0092] like Figure 2A As shown, the example use case knowledge graph (net) 200 includes a syntax tree graph structure 204, which is constructed into a corresponding logical formula 205 and shown in symbolic logic reasoning when the LNN model is created. Figure 2AThe diagram illustrates a second syntax tree structure 207, which is also constructed during model creation to correspond to the input logic formula 208. The input logic formulas 205 and 208 are rules about the world and can be written by experts or generated incidentally, such as by an ILP or NLP device. Formulas 205 and 208 can be known formulas or parts thereof (i.e., sub-formulas) and can be modified or adjusted during model creation and / or during prediction or inference time. That is, certain inputs to the formulas or inputs to the sub-formulas (e.g., operands) can be weighted based on their importance and thus assigned importance weights as part of the LNN's structure. Consequently, each operand of each connection in the formula is assigned or can be assigned importance weights, allowing modification of each formula or weight unless they are optimized.

[0093] For the use case example, for subgraph 218, the "cat" node can be weighted twice as important as "dog", and is therefore a modified version of the disjunctive "OR" join that is skewed to mean that "cat" now has a greater influence than "dog" in the formula.

[0094] Each of the syntax tree diagrams 204 and 207 in the corresponding formulas is constructed based on an initial list of input propositions 202 with defined truth values ​​(e.g., true or false), including: “whiskers” 202A, “tail” 202B, “laserpointer” 202C, “chases” 202D, “cat” 202E1, 202E2, “dog” 202F, and “pet” 202D present in the formula. Alternatively, these inputs can be predicates, such as statements whose truth values ​​depend on more than one variable. Logical formulas 205 and 208 are applied, leading to the evaluation of the corresponding inferences or implications (e.g., “Whiskers∧Tail∧(Laser pointer→Chases)),→Cat”) and the evaluation of inferences or implications (e.g., “Cat∨Dog)→Pet”). Figure 2A In the diagram, the sub-formula is shown as the corresponding sub-graph 218 (e.g., "Cat∨Dog"). Although the inference rules are not depicted, the inference based on a specific selected logic is depicted (e.g., The logic is an activation function 211 existing at a specific node 210. Activation function 211 is shown as corresponding to a specific logical connection, such as nodes 210A, 210B, and 210C existing in formulas 205 and 208. The classic propositional logical connections in the examples employ Boolean operations, including AND, OR, implication, negation, and logical equivalence, and truth values ​​as 1 or 0.

[0095] During the learning process, such as in Figure 1As described in step 140, forward inference is performed, where the expression is first evaluated to arrive at the truth value at each node. Figure 2A In the use case example, the implication is evaluated first. For the laser-implied pursuit, even though the laser is unknown, the pursuit is true (using fuzzy values, it can have a high lower bound), and this is sufficient to evaluate the "laser-implied pursuit" node to true (therefore its lower bound can be a high lower bound, e.g., 0.95). Utilizing the information that "Tail" and "Whiskers" are true will result in the cat.features node having a high lower bound, and it is pushed to the implies.cat node. Since the truth value of "cat" is unknown, it is essentially inferred to be computed as "true implies an unknown," so its truth value cannot be evaluated at that point and the computed upper and lower bounds remain loose (e.g., it cannot yet be evaluated as true or false). However, in this example, when "implies.cat" was initially given as true, the bounds do not change because the tightest bounds are maintained. Similarly, in the up (forward) pass of another part of the graph, given that "cat" is unknown and "dog" is true, the tightness of the bounds at the conjunction operation will remain unknown (lower and upper bounds) and insufficient to give a tight bound, and the bounds will remain loose at the negation operation. Therefore, at "cat.nand.dog", the computation of the bounds will be loose (lower lower bound, higher upper bound); however, given its truth value, the bounds do not need to be tightened. Thus, in the forward pass, the model has already learned that cat.features implies and laser.implies chases are true.

[0096] During backward (downward) inference propagation, a recursive depth-first traversal of the tree is performed from each root to each leaf, always tightening its upper and lower bounds while executing the inverse inference rules. In the example of backward (downward) inference propagation from the implies.cat node (= true) and assuming the system has now learned that cat.features is true in the forward propagation, then using modus pollens, the "cat" expression becomes true.

[0097] In one aspect, fuzzy logic is employed, which provides the degree of truth value ranging between 0 and 1, i.e., values ​​between 0 and 1 are a fuzzy mixture of true and false. In an embodiment, α is defined as a threshold for truth values, for example, between 0.5 < α ≤ 1. Thus, any evaluated truth value is constrained such that values ​​above α are considered "true" and any truth value less than 1 - α is considered "false".

[0098] Activation function 211 is a specific function that computes the output of each neuron 210 and is chosen to represent a specific logical operation, or a family of activation functions is chosen to represent a specific logical scheme (e.g., Logical operations that are consistent with logic. For example, as shown in sub-formula 218, the activation function is a disjunctive function that is evaluated as the summation of the inputs. Figure 2A In the example of the "unweighted" case depicted, the disjunctive activation function at node 210C provides an output clamped to a value of 0 or 1.

[0099] In this embodiment, for real-valued logical connections, the example activation function computes the truth value based on the following constraints:

[0100] For conjunction (AND):

[0101]

[0102] Where p and q are operands, the constraint is the sum of the two operand inputs minus 1, and is clamped by 0 below.

[0103] For disjunction (OR):

[0104]

[0105] That is, the sum of the two operand input values, clamped at the top by 1.

[0106] Regarding implication (→):

[0107]

[0108] That is, similar to disjunction, but one of the inputs is negated (1-p). As an example, as shown at node 210A, the activation function is a conjunction function. Figure 2A In the example of the "unweighted" case described in the text, according to The conjunction activation function of the logic is evaluated as the sum of the inputs minus the number of elements plus one (1).

[0109] In the embodiments, other activation functions based on other logic schemes may be employed. Furthermore, different logic functions may be used as activation functions in different parts of the LNN. For example, a “weighted” Lukasiewicz logic scheme for logical connections may be used, where the activation function computes the truth value as follows:

[0110] Weighted Lukasiewicz Logic

[0111] The binary and n-ary weighted Lukasiewicz t-norms for logical AND are given.

[0112]

[0113] For the input set I, in the range [0, 1], the non-negative bias term β and the non-negative weight w i And input x i According to De Morgan's law, the binary and n-ary weighted Lukasiewicz t-norm for logical OR is:

[0114]

[0115] In any case, the unweighted Lukasiewicz norm is true for all w. i = β = 1; if any of these parameters are omitted, their assumed value is 1. The exponential notation is chosen because, for integer weights k, this form of weighting is equivalent to using the corresponding unweighted norm (e.g., ...). The associated terms are repeated k times. The bias term β is written as a leading exponent to allow inline ternaries and higher norms, such as... It only requires a single bias term to be fully parameterized. β and different w were observed. i Establish relative to input x i The hyperplane is clamped to the range [0, 1]; therefore, the resulting activation function is similar to the modified linear unit (ReLU) from neural network literature.

[0116] The motivation for the bias term β is that it allows the classically equivalent formula x→y to be obtained by adjusting β. and Equivalence in weighted Lukasiewicz logic. Weighted Lukasiewicz residuals are used for logical implication to solve for...

[0117]

[0118] And give

[0119]

[0120] In each of the constraints above, β is the bias term for establishing the operation, and the weight w represents the importance, where w x It is the weight of the input operand x and w y These are the weights of the input operand y. The bias term β can be the value 1, although it can be another value. Within the clamp, it is the expression or formula for the hyperplane, that is, the weight (input) vector plus the dot product between the offsets.

[0121] Note that this is used in predecessor weights. But in subsequent weights This means that the predecessor has a weighting similar to AND (scaling its distance from 1), while the successor has a weighting similar to OR (scaling its distance from 0). The residual is most like the disjunctive method when β = 1, and when β = w y When β = w, the residual is most similar to (x→y), and when β = w x At that time, the residual is most like In other words, β = w y Just produced The residual (which has no specified bias term), and β = w x Just produced The residual.

[0122] If the weight w i With input x i If they are arranged together, then the Lukasiewicz norm is interchangeable, and if the bias term β ≤ min{1, w i If :i∈I}, then the Lukasiewicz norm is associative. Furthermore, in 1≤β≤_min{w i Given the condition :i∈I}, for classical inputs, they return classical results, i.e., the set {0,1}. This clearly requires β=1 to obtain both associative and classical behavior, although neither is a requirement of LNNs. In fact, if w i If it becomes 0, then the constraint β≤w i This is problematic because it effectively removes i from the input set I, so the constraints should no longer apply.

[0123] Parametric semantics

[0124] weight w i The sum of the weights does not need to be 1; therefore, they are best interpreted as absolute importance rather than relative importance. As mentioned above, for conjunction, increasing the weights amplifies the distance between the individual inputs from 1, while for disjunction, increasing the weights amplifies the distance between the individual inputs from 0. Decreasing the weights has the opposite effect, since inputs with zero weights have no impact on the result at all.

[0125] The bias term β is best interpreted as continuously changing the "difficulty" of satisfying the operation. In weighted Lukasiewicz logic, this is similar to transitioning from one logical connection to another, such as from logical AND to logical OR. This is imposed on β and w. i The constraints can ensure that the operation performed at each neuron matches the corresponding connection in the represented formula, for example, when assuming the input is within a given distance of 1 or 0.

[0126] Activation function for aggregation

[0127] Unlike neurons involved in connections within the set of represented formulas, neurons involving atoms require a slightly modified family of activation functions to function. Specifically, these must aggregate truth bounds found by different computations for proofs identified as atoms. For example, if Existing in the network, This can be considered a proof of y. Furthermore, the individual formula... and This can constitute further proof (and contradiction) of y.

[0128] The most straightforward way to aggregate proven truth bounds is to return the truth values ​​of the maximum lower input bound and the minimum upper input bound. On the other hand, it is also desirable to employ importance weighting in aggregation. For this purpose, weighted Lukasiewicz or weighted Godel norms can be used to aggregate the truth bounds of proven truths (however, it has been observed that the Lukasiewicz norm is very prone to amplifying many sources of weak evidence into strong evidence that is either true or false). This is done by calculating the real values ​​of the lower input bound OR and the real values ​​of the upper input bound AND. To clarify, this is where the activation function used for aggregation differs from that used for connection: while connection uses the same norm for both the upper and lower bounds, aggregation uses the opposite norm for either bound.

[0129] The weights of the different proofs involved in the aggregation can be learned in the same way as the weights of the join operands. Alternatively, the weights used in the formula used as an atomic proof can be reused as the weights of the proof itself. In one embodiment, the weights of the different proofs involved in the aggregation can be learned in the same way as the weights of the join operands. Alternatively, the weights used in the formula used as an atomic proof can be reused as the weights of the proof itself. For example, if and If the proof is for y, then the lower and upper bounds of y can be clustered separately. and For example, x i and z i The limit L calculated by affirmative antecedent reasoning for any proof. y,i and U y,i .

[0130] In principle, there exist many candidate activation functions that can accommodate the corresponding classical truth functions of neurons, each handling inputs that are strictly between 0 and 1 in a different way. The choice of activation function is important because it relates to the differentiability of LNNs and the various tautologies in classical logic (e.g., Whether the interaction is confirmed across the entire [0, 1] range.

[0131] Triangular norms or t-norms, along with their t-conorms and residuals (as thoroughly explored in the literature on fuzzy logic), are natural choices for such activation functions. These have performed correctly against classical inputs and possess well-known inference properties. However, generally, t-norms do not come with useful parameterizations that can be used as objectives for neural network optimization. Therefore, for the activation function of AND, the binary and n-ary weighted Lukasiewicz t-norms are defined as:

[0132]

[0133] For the input set I, the bias term β and the weight w i And input x i When β and all w i =1 yields the standard Lukasiewicz t-norm. The exponential notation is chosen because, for integer weights k, this form of weighting is equivalent to using the standard Lukasiewicz t-norm (e.g., ...). Repeat the associated items k times.

[0134] For the activation function of OR, the associated weighted t-conorm is:

[0135]

[0136] These are shown to be correlated and have weighted residuals (i.e., IMPLIES) under reasonable constraints of weights.

[0137]

[0138]

[0139] That is, classic tautologies exactly across the entire range [0, 1]. For LNNs, these weighted fuzzy logic schemes can be used for evaluation of use cases that employ existing knowledge bases defined according to the assumptions that are evaluated based on classic logic schemes.

[0140] Many other tautologies also directly transfer the following terms, which are preserved in unweighted fuzzy logic and classical logic: relevance (under reasonable constraints), negation. Double negation / elimination Implies tautology Preservation, De Morgan's law, etc. These operations are mathematically equivalent to double-clamped ReLU, but a smooth sigmoid function can be used instead of clamping to preserve gradient information in the clamped region.

[0141] infer

[0142] Inference refers to the entire process through which truth bounds of (sub)formulas and atoms are computed based on initial knowledge, ultimately leading to predictions made at neurons related to the queried formula or other results of interest. LNNs characterize this process with multiple iterations over the represented formulas, propagating tightening truth bounds from neuron to neuron until computation necessarily converges. Thus, in addition to the crucial upward inference propagation (where formulas compute their truth bounds based on the bounds available for their subformulas), there is downward propagation, which allows prior beliefs about the truth or falsehood of a formula to inform the truth bounds of the propositions or predicates used. In one embodiment, a fast evaluation process is implemented where computation is managed using a priority queue or similar data structure, such that the method iteratively (re)computes the truth bound of each neuron popped from the queue, and then, only when a tightening of the bounds is observed, pushes all neurons that have accepted the popped neuron as input onto the queue.

[0143] Bidirectional inference

[0144] In addition to computing the truth bounds of the outputs of each connection based on its inputs, LNNs infer the truth bounds of the inputs of each connection based on the inverses of the activation functions of the connections with respect to those inputs and the known truth bounds of the outputs of the connections and other inputs. All such inverse computations are performed during a depth-first traversal of the neurons representing the syntax tree for each formula.

[0145] Depending on the type of connection and which input is involved, such computation corresponds to familiar inference rules of classical logic. That is, in the embodiment, a bidirectional inference rule for the Lukasiewicz activation function is propagated, which is equivalent to inference rules in classical logic form, such as affirmative antecedent reasoning and related to:

[0146]

[0147]

[0148] as well as

[0149]

[0150] in, It means that it is verifiable.

[0151] The precise nature of these calculations depends on the chosen family of activation functions, such as weighted Lukasiewicz or weighted Godel logic. For example, if implication is defined as a residual, positive antecedent inference is performed via the t-norm of logic, i.e., AND. The remaining inference rules follow a similar pattern to those specified by the inverse function computed upwards.

[0152] In the following text, U and L represent the upper and lower bounds for finding neurons corresponding to the formulas indicated by their subscripts, respectively, for example, L x→y It is the lower bound truth value of the formula x→y as a whole, while U x It is the truth value of the upper bound only for x. For: The boundary calculation is trivial:

[0153]

[0154] The use of the above inequalities acknowledges that tighter bounds for each value can be obtained from other sources. For example, y and All can produce The closer of the two will apply.

[0155] Typically, bidirectional inference is used to handle uncertainty at both the facts and the formulas (rules). Truth lower and upper bounds apply to both the facts and the rules, influencing how the facts are updated or how the rules are learned to be false. Therefore, in bidirectional inference, rules can be trusted and "new" facts can be learned, or facts can be trusted and the truth of the rules can be inferred or learned. For example, rules can be learned for believed or trusted facts and may be wrong, and they can be eliminated. In addition to learning the truth of facts and rules through feedforward path inference and backpropagation inference (through upper and lower bounds), LNN systems can also learn how much to weight the facts in those rules. That is, facts can have a gradient of truth or a degree of certainty or uncertainty, and the weights associated with the backpropagation path arrows can be adjusted. Thus, in embodiments, the truth (upper and lower bounds) can be adjusted, and the weights associated with the backpropagation arrows can be adjusted. In embodiments, to complete the knowledge base used for initializing the neural network, or to discover new knowledge, refined rules and new rules inferred from observations are extracted from the trained LNN. In another embodiment of back inference, a weighted back inference method is implemented such that: if the importance weight is less than the average of all input importance weights of the neuron, the lower bound reverts to zero and the upper bound reverts to one, which is proportional to one minus the ratio of the input importance weight to the average.

[0156] Inference rules in weighted Lukasiewicz logic

[0157] In the weighted Lukasiewicz logic, for The upper limit is calculated as follows:

[0158]

[0159] The calculation of the lower bound for y (i.e., affirmative antecedent reasoning) is

[0160]

[0161] And for x (i.e., negating the consequent inference) is

[0162]

[0163] The introduced condition resolves the issues arising from the clamping used in the double-qualified ReLU in U x→y =1 and L x→y The potential discontinuity occurs at =0. To understand why this happens, it is observed that for many different values ​​of x and y, x→y can return 1; for example, in the unweighted case, whenever x≤y. Therefore, if U x→y If β = 1, then the upper limit of y or the lower limit of x cannot be deduced. The condition in the other direction is only attainable when β > 1, but it has a similar effect.

[0164] For and The upper limit calculations are as follows:

[0165]

[0166] The lower bound that is removed in conjunction syllogisms is...

[0167]

[0168] Furthermore, the lower limit of disjunctive syllogism and disjunctive cancellation is

[0169]

[0170] Note that the above downward calculation is not necessarily implemented as a series of multiple operations, but can be calculated using the form of n-ary implication or equivalently using the form of n-ary disjunction and conjunction with negation.

[0171] Recursive Algorithm and Evaluation

[0172] In an embodiment, in order to perform an inference task using an LNN, the syntax tree is traversed to obtain the truth value at a specific output node given the known truth value at the input node.

[0173] Figure 5A method 500 for evaluating propositional LNNs and first-order logic LNNs according to embodiments is described, wherein the recurrent neural network has neurons that correspond one-to-one with the formulas describing the system being modeled, and the neurons are arranged in a formula syntax tree. Method 500 governs an overall approach to prediction or bidirectional inference, wherein 503 describes a first step of initializing neurons corresponding to propositions and formula roots with initial truth bounds. This corresponds to the action of obtaining data value input from the external world to initialize the neurons with observed truth values. All neurons within the formula are initialized with unknown truth values, while other neurons belonging to the entire formula within the network may have truth values ​​that have been learned and / or assumed to be "1". For Figure 2A In example proposition 202, these initial truth values ​​can be observations, such as "whiskers" being known to be higher than 0.7, "tail" being known to be higher than 0.8, and "laser pointer" being observed to be, for example, lower than 0.2. Propositions with initial bounds represent input data.

[0174] Because LNN knowledge graph traversal is iterative, i.e., repeated in both directions, and while the system has not yet converged, forward propagation, backward propagation, and aggregation of truth evaluations are performed at propositions / predicates.

[0175] Figure 5 Step 506 describes the processing for each formula, wherein neurons are evaluated in the forward direction during the propagation from the leaves of the syntax tree to the root of each formula, while each neuron in the upward propagation is annotated with the resulting truth bounds after the logical operation is performed.

[0176] Figure 6A This is an example method 600 used to evaluate neurons along the forward direction in the forward knowledge graph transmission from leaf to root. For example... Figure 6A As shown, during the upward propagation, each node j (neuron) is evaluated. First, it is determined at 605 whether the node is an atomic node; in this case, the upper and lower bounds are evaluated and returned. Otherwise, at 608, a loop is executed where the value L is computed for each operand i. i,j and U i,j Then, given the independent variable β j ,w j ,L j U j Evaluate the activation function f j (). Corresponding to f j (β j ,w j ,L j U j The evaluated value is returned and stored for later use by the logic neural network caller. Truth value L j U jThe computation propagates upwards through the graph, and the calculated bounds are stored at each neuron. If the tightest available bound already exists from an earlier computational step, that tightest available bound is retained. That is, for a proposition that can be proven in many ways, the tightest such bound is the minimum upper bound that any computation can return and the maximum lower bound that any computation can return.

[0177] In an unweighted symbolic logic scheme using operands A and B, at each node, where each operand / operator A has Upper limit of form U A and lower limit L A The types of calculations for the upper and lower bounds of forward inference include:

[0178] negative:

[0179] L ~A =~U A

[0180] U ~A =L A

[0181] Conjunction (forward inference)

[0182] L A&B =L A &L B

[0183] U A&B =U A &U B

[0184] Disjunction (forward inference)

[0185]

[0186] Implication (forward inference)

[0187] L A→B =U A →L B

[0188] U A→B =L A →U B

[0189] When L A =U A When L = 0, the inverse function is evaluated as false, and when L = 0, the inverse function is evaluated as false. A =U A When L = 1, the inverse function evaluates to true. When the lower bound L... A The evaluation is 0 and U A When the evaluation is 1, the truth value is unknown. When L A Evaluation greater than UA When, that is, when L A >U A At that time, there was a contradiction.

[0190] Appendix A illustrates a further example of forward-backward traversal of the knowledge graph.

[0191] return Figure 5 Once the root of the formula is reached, in step 509, the system uses inverse computation to backtrack to each leaf to update the sub-formula bounds based on the stored bounds (and the initial bounds of the formula). That is, inferences based on known truth values ​​are propagated backward through the graph back to the predicate or proposition.

[0192] Figure 6B This is an example method 610 used to evaluate neurons in the backward direction during backward knowledge graph propagation from leaf to root. For example... Figure 6B As shown, during the downward pass, each node j and its current upper bound U and lower bound L are evaluated. First, it is determined at 615 whether the node is an atomic node; in this case, the upper and lower bounds are recorded. Otherwise, at 618, a loop is executed, where the value L is computed for each operand i. i,j U i,j Given the independent variable β j ,w j ,L -i,j U -i,j .,L,U, calculating the upper and lower limits is the inverse activation function. The assessment. Corresponding to The evaluation value is returned and stored for later use by the logic neural network caller.

[0193] In an unweighted symbolic logic scheme using operands A and B, at each node, where each operand / operator A has Upper limit of form U A and lower limit L A The types of backward inference upper and lower bound calculations include:

[0194] negative

[0195] L A =~U ~A

[0196] U A =~L A

[0197] Conjunction: A→(B→(A&B))

[0198] L A =U B →L A&B If L A&B >0, otherwise 0

[0199] U A =L B →U A&B

[0200] Disjunction:

[0201] if Otherwise 1

[0202] Implied (B): A&(A→B))→B

[0203] L B =L A &L A→B

[0204] U B =U A &U A→B If U A→B <1, otherwise 1

[0205] Implied (A): A→((A→B)→B)

[0206] L A =U A→B →L B If U A→B <1, otherwise 0

[0207] U A =L A→B →U B

[0208] Typically, in a backpropagation, the computation is the inverse function of the activation function computed as performed in a forward propagation, and the result is expressed using bounds.

[0209] Figure 2B It shows the relationship with Figure 2AThe example LNN 200 shown corresponds to the example recursive (bidirectional) backpropagation. Backward traversal of the knowledge graph occurs to update the truth values ​​of different propositions while the system has not yet converged. In the LNN, each path from the root node 215 to each leaf is traversed to evaluate the inverse inference rule at each node in the downward direction. In an unguided embodiment, a depth-first traversal is performed by scanning the root-to-leaf paths in the syntax tree of each formula. For example, the first path evaluated is edge 242, which attempts to refute the negation consequent based on the knowledge of "cat," and then edge 242A, which attempts to prove that "whiskers" is false (if the conjunction is false). Then, for the subexpression "laser point implies chases," etc., at node 210B, the next conjunctive syllogism evaluation can be performed at edge 242B and then at edge 242C.

[0210] In this embodiment, information is backpropagated along the following backward paths to update the inverse function calculations in tree 204: namely, the paths shown by arrows 242 and 242A, where the truth values ​​(i.e., upper and lower limits) of the whisker predicate 202A are updated by the inverse activation function calculation at conjunctive neuron 210A; the paths shown by arrows 242 and 242B, where the truth values ​​(upper and lower limits) of the tail predicate 202B are updated by the inverse activation function calculation at conjunctive neuron 210A; and the paths shown by arrows 242, 242C, and 242D, where the laser... The truth values ​​(upper and lower bounds) of pen predicate 202C are updated by computation of inverse activation functions at conjunction neuron 210A and implication neuron 210B; as shown by arrows 242, 242C, and 242E, where the truth values ​​(upper and lower bounds) of chasing predicate 202D are updated by computation of inverse activation functions at conjunction neuron 210A and implication neuron 210B; and as shown by arrow 243, where the truth values ​​(upper and lower bounds) of cat predicate 202E1 are updated by computation of inverse activation functions at implication neuron 215. Similarly, the following backward paths are traversed to perform inverse function computation in syntax tree 207: namely, the paths shown by arrows 272 and 272A, where the truth value (upper and lower bounds) of the cat predicate 202E2 is updated by inverse activation function computation at disjunctive neuron 210C; the paths shown by arrows 272 and 272B, where the truth value (upper and lower bounds) of the dog predicate 202F is updated by inverse activation function computation at disjunctive neuron 210C; and the path shown by arrow 273, where the truth value (upper and lower bounds) of the pet predicate 202G is updated by inverse activation function computation at implication neuron 225.

[0211] Appendix A describes other examples of backward navigation through the knowledge graph.

[0212] Figure 2C Describes the calculation for Figure 2B The example use case for backward inference of the syntax tree is illustrated with example inverse activation functions. For instance, the backward syntax tree traversal along paths 242, 242C, 242E updates the truth value (upper and lower bounds) of the chasing predicate 202D by performing the computation of inverse activation function 281 (with equal weights) at the root implication neuron 215 and using the tightest bounds available at each node, performing the computation of inverse activation function 282 (with equal weights) at the conjunction neuron 210A and performing the computation of inverse activation function 283 at the implication neuron 210B. Similarly, the backward syntax tree traversal along paths 272, 272A updates the truth value (upper and lower bounds) of the cat predicate 202E2 by performing the computation of inverse activation function 291 (with equal weights) at the implication neuron 225 and performing the computation of inverse activation function 292 at the disjunctive neuron 210C.

[0213] Return to reference Figure 5 Continuing to 512, the system clusters the tightest bounds computed at the leaves for each proposition / predicate. For the clustering at 512, min and max can be used to cluster the upper and lower bounds proven for each proposition, although smoothed versions of these may be preferred to spread gradient information across multiple proofs. Alternatively, when targeting classical logic, conjunction and disjunction (which may themselves be smoothed) can be used to cluster propositional bounds. When doing so, there is an opportunity to reuse proposition weights from their respective proofs to limit the proof effects where propositions play only a minor role.

[0214] Figure 6C The aggregation method 620 for atom node j is shown. As shown at 625, a FOR loop is executed to compute the proof i in the atom, its current upper bound U. j and lower limit L j tuples (L) i,j U i,j ).

[0215] Then, at 628, for node j, the tightest bound U is calculated at the leaf for each proposition according to the following formula. j ,L j The aggregation: L j= maxL j, U j= maxU j .

[0216] exist Figure 2AIn the example use case LNN 200, values ​​are aggregated at each predicate, and in this example use case, there is only one proof existing in the network besides the "cat" predicate, so aggregation is "no operation". In this example, once convergence is achieved, the cat predicates 202E1 and 202E2 are the expected results (predicates of interest) because the network provides two different means of inferring whether something is "cat". The updated "cat" predicate that provides the tightest bound is the aggregate truth output. Typically, in LNNs, wherever a predicate or proposition appears in any formula, that predicate or proposition is used as a candidate proof for the bound.

[0217] For bounds computed at the proposition, this method clusters the tightest bounds, i.e., taking the maximum lower bound and the minimum upper bound. Figure 2A In the example LNN model 200 depicted, whether something is a "cat" can be proven in two ways: for example, based on a tail, whiskers, laser pointer, or based on pets and dogs. For example, the example aggregation step can evaluate one of these proofs that something is a "cat" to a lower bound of 0.6, for example, aggregation the other proofs to a lower bound of 0.7. Using the tightest bound (e.g., the largest), the proof of the proposition "cat" associated with the aggregation value of 0.7 will be deterministic.

[0218] Therefore, given the example task of predicting whether something is a "cat," the final result is two bounds of the proposition: for example, if the lower bound is high, the object is suspected to be a cat; if the upper bound is low, the object is suspected not to be a cat; if both the lower and upper bounds are loose, a response is returned indicating that it is impossible to determine whether the object is a cat. If an intersection of the upper and lower bounds is detected, a contradictory state exists in the formula system.

[0219] In use, after all evaluations (i.e., forward and backward inference passes), there exists a set of one or more neurons in an LNN that act as outputs, which can be viewed and used when needed. The neurons that answer the task of predicting whether something is a "cat" will be... Figure 2A The final output in this use case example.

[0220] Return to reference Figure 5 Continuing to 515, when the aggregated truth value hasn't changed much—for example, everything has been proven to be verifiable based on given information, such as the change in the true bound of the previous pass relative to the current pass being less than 0.01—it is determined whether the bound has converged. In the embodiment, since the truth value is expressed in upper and lower bounds, the upper bound can decrease or the lower bound can increase due to the properties of LNN computation (the maximum lower bound is 1, and the minimum upper bound is 0). Therefore, depending on the activation function of the neuron, the aggregated truth value will converge to a fixed value or within a fixed amount ε.

[0221] If the bound has not yet converged, the method returns to step 506 to repeat the forward and backward propagation steps 506 to 512. In this embodiment, since the bound tightening is monotonic, no oscillation occurs.

[0222] Once convergence of the bounds has been detected at 512, the process proceeds to 520, where the method performs checks on the bounds calculated at specific propositions or formulas, i.e., those representing the model's predictions / queries.

[0223] As suggested at step 520, similar to what would be done with a regular neural network, a prediction is obtained by examining the output of one or more neurons. However, the difference is that different neurons can serve as inputs and results for different queries; in fact, the result of one query might be used as input for another. Furthermore, existing LNN models can be arbitrarily extended with neurons representing new formulas to be used for new queries.

[0224] Corresponding to Figure 2A-2C More complete working examples of propositional LNNs are shown in the labeled examples #1, #2 and #3 provided in Appendix A.

[0225] Bidirectional inference

[0226] Although logical formulas can be directly evaluated, they can be used to infer the truth values ​​of other related formulas and propositions. LNNs perform such inferences because they involve sub-formulas and propositions existing in the represented syntax tree. In addition to calculating the truth bounds of the output of each connection based on its different inputs, LNNs infer the truth bounds of each of the inputs of a connecting neuron based on the inverse of the activation function of the connecting neuron relative to that input and the known truth bounds of the connection's output and other inputs. Depending on the types of connections and inputs involved, such calculations correspond to familiar inference rules of classical logic, including positive antecedent reasoning (modus ponen), negative consequent reasoning (modus tollens), disjunctive syllogism, and many others.

[0227]

[0228] And observed And further observation Only the weighted forward and inverse bounds need to be computed for a single connection and negation. Throughout the text, the upper and lower bounds are denoted by variables U and L, respectively, where the formulas are associated with the bounded truth values ​​in their subscripts. The boundary calculation is:

[0229]

[0230] The forward bound calculation is:

[0231]

[0232] Inverse upper bound is similar to implication, but with As a condition:

[0233]

[0234] The inverse lower bound is similar, now with As a condition:

[0235]

[0236] The introduced condition addresses the clamping issues arising from the use of double-qualified ReLU. and The potential discontinuity occurs at this point. To understand why, it is observed that for many different values ​​of p and q, It can return 0; therefore, if Regardless of the truth value of the other, the lower bound of p or q cannot be deduced.

[0237] In one embodiment, the LNN thus infers the upper and lower bounds of each input of the neuron (or equivalently, each operand of the logical connection) based on the inverse function of the neuron's activation function relative to the input and the known bounds of the neuron's output and other inputs of the neuron.

[0238] For these examples of inverse upper and lower bound calculations, the subscripts p and q indicate which part of the formula the truth value belongs to. Therefore, if it is known... If it is false, it means that it has a low truth value and a low upper limit, i.e. Low. Although p is true, its lower bound L is low. p It is a high value. However, in the case of implication, this calculation returns a low value, i.e., q has a known low upper limit. In the case of cancellation, for example, if If true, then classically, all components p and q are true. For fuzzy truth values, a high lower bound is obtained, and for the implication in these formulas, i.e., Lq will also show a high value. If the conjunction of p∧q has an intermediate lower bound value (e.g., in the middle), then U p The knowledge of Up is useful for obtaining the value of Lq; for example, if Up is low (e.g., not close enough to 1), then Lq will have to be higher to compensate for it.

[0239] More specifically, for the example inverse upper bound, the expression (strictly less than one) is sufficient to prove that U q The conditions of anything.

[0240] Generally, LNN methods infer upper and lower bounds for each input of a neuron (or equivalently, each operand of a logical connection) based on the inverse of the neuron's activation function relative to its inputs and known bounds of the neuron's output and other inputs to that neuron. LNN methods further include using each occurrence of each proposition in each formula as a proof of the proposition's bounds, which is recursively and / or dynamically computed, as appropriate, for the output of the containing (sub)formula and each of its other inputs.

[0241] Furthermore, instead of having a true inverse relation, the bounds of the activation function and its inputs for each neuron are respectively smoothed, clamped, and / or otherwise transformed into a version of some other function and its inverse.

[0242] Furthermore, instead of the conventional minimum and maximum values, neurons corresponding to propositions use smoothed, clamped, and / or otherwise transformed versions of these functions to aggregate bounds, including but not limited to the same activation functions used to aggregate the logical connections AND and OR for the upper and lower bounds, respectively.

[0243] For any logic system (e.g., not the Lukasiewicz logic system), generally, if the conjunction is “min” and the disjunction is “max”, and it implies that there are several choices (not A or B) as candidates, then the values ​​of min, max and not A or B each have the inverse of a function (reverse inference for that logic system).

[0244] refer to Figure 2A Using example network 200 for computational purposes, a user can submit different queries to the LNN model and ask different questions to the same model 200 via a computer system. For the example network, a user might want to predict whether something is a "cat," that is, given input, "cat" is what is being proven, and neurons related to "cat" provide corresponding outputs, such as the value at that neuron. Data can be indicated for each proposition 202 as part of the prediction process for determining whether something is a "cat." However, in another embodiment using example network 200, it might be desirable to provide different outputs, such as "pet," and different sets of inputs could be provided.

[0245] Figure 3 This illustrates an LNN (such as one that injects additional formulas into an existing training) for adding formulas. Figure 2A The example implementation is shown in Example Network 200. Figure 3As shown, a new formula / sub-formula 250 for the component neurons, including conjunctive connection 251 and negation connection 252, is illustrated as adding the constraint that something cannot be both a cat and a dog. The syntactic logic added in the injected formula 250 includes the indicated truth value 253 when inserted into network 200, and the degree of truth can be a learned parameter, for example, a parameter learned during optimization iterations. In an embodiment, given a dataset of different combinations of known proposition truth values, for each training iteration on each combination, the optimization randomly selects a subset of known propositions to use as observations and uses concealed propositions as queries.

[0246] Another example of a new formula 260 is shown, comprising a conjunctive join 261 and a negation join 262 to provide further logical syntax for handling queries that were not configured to be processed by the initial LNN 200 (i.e., Is there something with a tail but a pet?). After several passes of truth values ​​through the network, the truth values ​​can be propagated to the query syntax tree representing subformula 260, which can provide a value output 263, such as a definite true, false, or indeterminate response.

[0247] exist Figure 3 In this use case example, inserting the new formula 260 into the existing LNN is the "codified query" that the LNN uses to provide its output. A query is a formula that can be asked anything and is inserted into the LNN. The query codified in this example does not have any given truth value and is added to evaluate, based on the input, whether it has been proven that a pet without a tail exists. This codified query involves inserting neurons corresponding to the specified query formula into the existing logical neural network, such that inference (i.e., evaluation of the neural network including the inserted formula) produces results at the neurons regarding the query formula in the form of computed truth bounds.

[0248] Furthermore, each node 210 in the LNN computes upper and lower bounds for its truth values. These upper and lower bound truth values ​​are continuous variables at each node and propagate around the network. These bounded truth variables are computed at the nodes during prediction or inference and are not structurally part of the initially configured LNN because they are computed based on the input and with corresponding importance weights that have already been learned. For example, network 200 could be programmed with deterministic inputs, such as something having whiskers, something having a tail, something being a pet, or something not being a dog, but it might be unknown if a laser pointer is present. Therefore, even though there might be enough input information to definitively prove that something is a "cat," LNN 200 would return that it is not certain that it is a cat.

[0249] First-order logic

[0250] According to another embodiment, LNN supports compound first-order logic (FOL) formulas that implement first-order logic connections using general and existence quantizers, such as "for all" and "exists". Thus, instead of representing propositions as pairs of values ​​(e.g., upper and lower bounds), in embodiments of LNNs implementing first-order logic processing, predicates are represented as vectors, matrices, or larger structures of value pairs, which are sparse, and the LNN inference operation takes into account data sparsity. In embodiments, a keyed table data structure of sparse matrices is used. In the case of predicates, since the LNN syntax tree involves matrix-valued neurons, the LNN inference operation performs tensor product or table join operations and returns the entire value table. For example, for activation functions at internal neurons (e.g., conjunction / disjunction), the LNN performs the join along with ordinary functions, and at each row as a result of the join, the LNN also performs its computation based on the input of that row. In the embodiments, the tables of truth bounds belonging to (sub)forms and predicates have already specified default bounds at non-existent key combinations, and typically, but not necessarily, have (sub)form default bounds that are selected to match their results given default bounds for their inputs.

[0251] First-order logistic neural network

[0252] To extend LNNs with first-order logic inference, scalar propositions are transformed into predicates, embodied as tables or equivalent neurons for each grounded tensor or copy. That is, LNNs are extended to first-order logic by replacing proposition neurons with neurons representing predicates, and introducing nodes for general and existence quantization. Instead of bound pairs, all neurons return tables uniquely keyed by groups of columns associated with unbounded variables appearing in the represented subformula or predicate. The neural activation function is then modified to perform joins on columns associated with shared logical variables, while simultaneously computing truth bounds at associated rows as before. The inverse activation function is similarly modified, but must also reduce the results on any columns associated with variables not present in the corresponding subformula of the target input to cluster the tightest bounds. In the special case where the table is keyed by consecutive integers, these computations are equivalent to element-wise broadcast operations on sparse tensors, where each tensor dimension belongs to a different logical variable. Furthermore, grounded predicates on the same variables can be linked to the same tensor structure to provide easy lookups.

[0253] First-order logic LNN processing utilizes general and existence quantizers, including but not limited to: reduction by minimum or maximum values; backward inference that propagates associated bounds downwards; and the possibility of employing other bounds via (Skolemization), where a new set of bounded keys (columns) is introduced for each quantized variable in addition to the usual FOL variable columns. In one embodiment, specialized neurons corresponding to general and existence quantization are introduced that eliminate a given key column (i.e., variable) by reducing the truth bounds used to match key combinations in other columns with minimum and maximum values, respectively. For example, in an embodiment, given tensor-shaping neurons in first-order logic LNN processing, the neuronal activation has been altered so that they perform connections. The inverse of the connection may require reduction, i.e., operations to remove columns from a table by taking the maximum of all lower bounds or the minimum of all upper bounds (or vice versa), depending on what operation is being performed. Each of these operations involves matching values ​​at a column, performing operations at the matching row, and possibly removing the column by performing reduction (e.g., marginalization) on that column.

[0254] Similar to negation, a quantizer is a parameterless pass-through node that eliminates a given key column by reducing the minimum or maximum value as appropriate. However, the inverse inference used for quantizers is more complex because it requires Scorenization: each existential quantizer broadcasts its known upper bound to all key values ​​associated with its column (i.e., the variable) and its known lower bound to a new set of key values ​​identified by each combination of key values ​​associated with any column containing a universal quantizer, and vice versa for universal quantizers.

[0255] To make aggregation operations tractable, in this embodiment, it is necessary to limit the number of key values ​​involved in the computation, leaving other key value combinations sparse, i.e., with a default bound. This is done by prioritizing computation toward smaller amounts of such content by filtering predicates where possible to include only those related to specific key values ​​referenced in the query or involved in joins with other tables. Because many truth values ​​remain uncomputed in this model, the quantizer and other reduced results may not be tight, but they are still sound. Where predicates have known truth values ​​for all key values ​​(i.e., because they make a closed-world assumption), the method uses different bounds for their sparse values ​​and for the sparse values ​​of the joins involving them, such that the sparse values ​​of the joins are a result of their sparse input values.

[0256] Even with a minimized number of key-value pairs involved in the computation, neural evaluation must be guided toward rules more likely to produce useful results. The first opportunity for this is a fast computation in cases where computation fails to produce a tighter bound than previously stored at a given neuron. Furthermore, the method leverages the neural graph structure to prioritize evaluations within rules by utilizing shorter paths to the query and to the visited rule with the most recently updated bound.

[0257] In the effort to avoid pulling in too much data in FOL LNN, a hierarchical grounding determination is implemented to minimize the effective amount of the neuron's grounding set based on its associated set operations, using the neuron's input grounding in the network. For conjunctive neurons, the number of groundings of their inputs is first counted individually, the input with the fewest groundings is selected, and then it is checked whether those groundings are contained in other inputs, in which case the groundings are preserved. For conjunctive neurons, this is done by performing hierarchical data access on the input sets, from performing counting, retrieving the groundings of an operand, and finally performing the checks.

[0258] Variable Management

[0259] Logical predicates, neurons, and quantizers each have a defined set of variables based on their number of elements, specifying the number of constants in the grounded tuple. The number of predicate elements depends on the knowledge base that provides truth values ​​to the LNN and can typically include various zero-element (propositional), unary, and binary predicates. Logical neurons collect variables from their set of input operands in the order they appear during initialization, where these operands can include predicates, neurons, and quantizers. Unless otherwise specified, variables are collected only once from operands that define the recurrence of a particular variable in more than one variable location. Logical formulas can also be defined using arbitrary variable arrangements across their constituent nodes. Variable mapping operations transform the grounding to enable truth lookups in adjacent nodes.

[0260] If partial quantization is required only for a subset of variables from the underlying operands, the quantizer may also have variables and grounds, although quantization is typically performed on a single variable to produce a propositional truth value associated with the quantizer output. For partial quantization, the maximum lower bound of the grounds from the quantized subset of variables is chosen for existence quantization and assigned to a unique ground consisting of the remaining variables, while the minimum upper bound is used for general quantization. For existence partial quantization, the true grounds for the quantized subset of variables in the form of the independent variables are stored under the grounds of the remaining subset of variables, such that satisfied grounds can be recalled.

[0261] Variable binding

[0262] Variable binding assigns specific constants to variables in predicates, neurons, or quantizers, often as part of an inference task. Variables may be bound only to a subset of their occurrences within a logical formula, although the grounding process used to generate inference typically propagates the binding to all occurrences. Therefore, even when bound, variables must be preserved to interact with other occurrences of the variable in the logical formula to perform join operations. Implicit equality can exist for constants referenced by the same identifier, although the same represented entity can also be represented by different constants.

[0263] Variable type

[0264] In typed first-order logic, variables can have types assigned to a particular use instance, such that a given variable can have different types assigned in different parts of the logical formula in another use instance. Two predicates with shared variables can each specify different expected types for the use of their variables. Types are typically identifiers of ontology classes, which allow for the identification of taxonomic and hypernymous relationships between two types, such as declaring a given type as a subtype of another type.

[0265] Type consistency in logical formulas means that a given variable has a single type for all occurrences of that variable. Even if one type assignment is a direct subtype of another, an entity correctly typed in one occurrence may be inappropriately specialized in another, thus requiring type equivalence for all mutable occurrences. Under the open-world assumption, it is generally assumed that unavailable grounds at predicates, neurons, or quantizers are unknown, where the assignment has the largest loose truth bound. However, if at least one of the ground constants has an assigned type that is not transferably a subtype of the expected variable type, then falsity can be assigned.

[0266] Equality handling in LNNs

[0267] The overall representation of equality handling in LNNs is as follows:

[0268] 1) Equality is a special predicate that interacts strongly with the family of second-order formulas; 2) Mathematically, the truth value of the equality predicate can be treated in the same way as any other truth value, but there are computational incentives specifically for treating these; 3) Appropriate treatments of the FOL function and the Scorenization follow appropriate treatments of equality.

[0269] Equality formula:

[0270] Partial equality (knowledge) is a fact of fuzzy logic, but we can at least assert that (X=X)≡1 and (X=Y)≡(Y=X). Through (higher-order) meta-rules, equality is transferred to truth values:

[0271]

[0272]

[0273] All these rules have a truth value of exactly 1, and assume the operations are unweighted (but still fuzzy). Logical equivalence can be bidirectional; the truth values ​​on either side must be equal. (Including...) And may also include As a special case, it can be meaningful; These convenient preconditions, exactly in the form (X = Y), have high truth values ​​for most logic, but become quite cumbersome as the number of predicates increases. Using equality as the predicate, transitive equality is given above.

[0274]

[0275] Weakening equivalence to any implication produces:

[0276] This is sufficient to prove the former. Using a function as the predicate f(A; B) ≡ (f(A) = B), we give the definition of a functional relationship:

[0277]

[0278] We observe that f(A; f(A)) ≡ (f(A) = f(A)) ≡ 1. Similarly, using a function as the predicate, we derive the following:

[0279]

[0280] And similarly, for higher atom numbers

[0281]

[0282] For ordinary predicates, the following might be useful:

[0283] as well as

[0284]

[0285] They share the same motives and warnings.

[0286] Then, by linking to the rules above, we can find the truth value of complex constructs like Q(f(X),g(f(Y),Z)), such as in:

[0287] Q(f(X),g(f(Y),Z))

[0288] ←Q(U,V)

[0289] ←(U=f(X))

[0290] ←(V=g(W,Z))

[0291] ←(W=f(Y))

[0292] Or equivalently:

[0293] Q(f(X),g(f(Y),Z))

[0294] ←(Q(U,V)

[0295]

[0296] For example, for the same grounding result, there may be multiple intermediate grounds such as U, V, and W; typically, the tightest calculation boundaries are applied.

[0297] All of the above can be performed in two directions: known equality proves that predicate truth values ​​must match, but known mismatch proves inequality.

[0298] Function processing:

[0299] For a given ground of all the arguments of a function (i.e., assigning constants to those arguments), the function application itself can be used as a new constant to specify its return value, for example, literally f(cat123) or even g(cat123, f(dog456)), where f(dog456) is also a new constant. Therefore, when a function is called for the same constant arguments, it returns the same "value". When a function is called for different arguments that may or may not involve the same thing, its return value can be proven equal to some other return value according to the above rules of equality. Functions are actually partial: some argument configurations simply never appear; we should avoid insisting that a return value exists for all of them.

[0300] Scorenization:

[0301] Skolmenization is necessary for handling two quantizers, although for opposite bounds. Existential quantizers pass the upper bound to all possible grounded variables, but only (and necessarily) pass the lower bound to a single constant returned by a grounded function of all closed variables; the reverse applies to universal quantizers. Closed quantizers that are themselves Skolmenized are not counted as closed variables, allowing for simpler functions introduced by Skolmenization. Note that which quantizers are Skolmenized depends on which bound is computed. Another outcome is that the upper and lower bounds below the quantizer are computed with different tensor dimensions. These functions can then be handled similarly to any other way, replacing the Skolmenized variable wherever it appears. The Skolmenization function itself should be uniquely labeled for each quantizer in each formula, e.g., exists789. Then, as described above, their return values ​​are identified by applying their return values ​​to their grounded arguments (i.e., closed variables), e.g., exists789(cat123), if we have As a small caveat, even if the function result is always unique, the constant that satisfies the quantizer may not be (however, some logic includes a separate operator for "exactly one"). !). Scholomization is therefore sound, but not logically equivalent; however, it does not raise any issues with fuzzy logic or classical logic. Scholomization is only necessary for downward inference. Upward inference of an existence quantizer will utilize the maximum value to gather the lower bound, but not the upper bound, and vice versa for a universal quantizer, unless we introduce further extensions such as closed-world predicates, to which we can definitively conclude that no other ground produces truth values ​​other than 0 or 1, etc.

[0302] accomplish:

[0303] While mathematically correct, this requires significant computation to handle any equivalences, function applications, or quantizers (for one side of their bounds). The concept of an equality class still exists: constants connected by some path of non-zero lower bound equality edges. Not all constants in the same equality class are necessarily non-zero equal to each other; for example, (x = y) ≥ 0.5 and (y = z) ≥ 0.5 are not necessarily non-zero equal to each other. There is no tightening in the logic (x = z). It is not immediately clear whether there is a (useful) definition of an inequality class, i.e., a constant connected by some path of non-unit upper bound equality edges.

[0304] For a given equality class, there exists a fully normalized set of truth values ​​assigned to each edge, which can be found through repeated application of propagating equality. Whenever equality edges are updated by other means, it becomes necessary to (eventually) renormalize the equality class. It is observed that equality classes can be merged; proven inequalities (i.e., upper bounds less than 1) do not split them. The normalized equality class can then propagate the tightened equality truth values ​​to predicates, including function predicates. Function predicates can exhibit cyclic updates if the results of cyclic updates are fed back to equality classes that affect them, such as functions that can return their arguments; propagating equality through such cycles can be considered part of normalization.

[0305] It is important to know when to normalize and how much to normalize. Normalization can be performed as needed, after which equality classes are marked as no longer requiring updates. Similarly, predicates about equality class members can be updated as needed and marked as up-to-date for the class. As noted, with any update to the predicates of equality edges or equality class members, the corresponding set of values ​​must be marked as outdated.

[0306] First-order inference

[0307] Inference at the logic neuron involves performing associated logical connections forward or backward for a given set of grounds, while inference at the quantizer involves reducing operations and creating new grounds in the case of partial quantization. The provided grounds may be unavailable among all participating operands in the inference operation, where a retrieval attempt is made and then the previously unavailable grounds are added to operands with unknown truth values ​​under the open-world assumption. If proofs are provided to nodes for unavailable grounds, the proof aggregation will also assume a maximally loose starting bound.

[0308] Computation and memory should be considered for a large universe with many constants, where actions can be taken to avoid storing grounds with unknown boundaries. However, inference is the primary means by which grounds are propagated through logical formulas to achieve theorem proofs, although there are cases where storage can be avoided. Specifically, negation can be viewed as an operation in which inference is performed instead on the underlying operands or descendants that are not negated. Otherwise, if naively close, negation might have to fill the list of grounds from the underlying operands with all false or missing grounds, and store these as true under the closed-world assumption.

[0309] An inference context involves input operands and output operations, where the input operands are used for forward inference to compute a proof of the output, or where the input operands and outputs, except for one input operand, are used to compute a proof of the remaining inputs. If any participant in the inference context has a ground that is not unknown, then in real-valued logic, a truth value that is also not unknown can be derived in the inference context. Each participant in proof generation can thus add its ground to a set of inference grounds. A given inference ground is used as is for other participating operands that have the same variable configuration as the origin operand. In the absence of disjoint variables in an inference ground, overlapping variables are first searched for matches with all disjoint variable values ​​used in the conjunction to create an expanded set of inference grounds. If no overlapping variables exist or no match is found, overlapping variables can be assigned according to the inference grounds, while disjoint variables cover the set of all observed combinations.

[0310] The set of relevant grounds from the context of real-valued inference can become a significantly expanded set, especially in the presence of disjoint variables. However, guided inference can be used to expand the minimal set of inferred grounds that only involves grounds relevant to the goal proof. LNNs can use a combination of goal-driven backward linking and data-driven forward linking to obtain the goal proof. Backward linking is used here as a means of propagating grounds to search for known truths, which can then be used for forward linking to infer the goal. Implication-based rules typically require negative backward inference of the consequent form to propagate grounds to the predecessor via backward linking, and positive antecedent inference to perform forward linking to aid in the computation of subsequent goal proofs. This bidirectional linking process continues until the subsequent goal ground is not unknown or until the inference does not produce any more robust proofs.

[0311] acceleration

[0312] Because the tightening of the bounds is monotonic, the order of evaluation does not change the final result. Therefore, and according to conventional theorem provers, the computation may suffer a significant speedup depending on the order in which the bounds are updated.

[0313] To make such aggregation operations tractable, it is necessary to limit the number of key values ​​involved in the computation, leaving other key value combinations sparse, i.e., with default bounds. This is done by prioritizing computation toward smaller amounts of such content by filtering predicates where possible to include only those related to specific key values ​​referenced in the query or involved in joins with other tables. Because many truth values ​​remain uncomputed in this model, quantizers and other reduced results may not be tight, but they are still sound. In cases where predicates have known truth values ​​for all key values ​​(i.e., because they make a closed-world assumption), different bounds are applied to their sparse values ​​and the sparse values ​​of the joins involving them, such that the sparse value of a join is a result of the sparse values ​​of its inputs.

[0314] Even with a minimized number of key-value pairs involved in the computation, neural evaluation must be directed toward rules more likely to produce useful results. The first opportunity for this is a fast computation when computation fails to produce a tighter bound than previously stored at a given neuron. Furthermore, the neural graph structure is used to prioritize evaluations within rules by utilizing shorter paths to the query and the visited rules with the most recently updated bounds.

[0315] Although Figure 2A-3 The formulas and neurons described in [the document] act on propositions (e.g., List 202) and pass values ​​as a pair of upper and lower bounds (i.e., the values ​​are a pair of scalars), but the functionality is extended, such as [other methods]. Figure 4 As shown below, a syntax network capable of implementing first-order logical inference is presented. That is, the LNN is configured to process predicates, such as statements whose truth values ​​depend on variables, rather than propositions having values ​​as a pair of upper and lower bounds.

[0316] To process predicates, neurons receive and pass large data structures or objects as tables with upper and lower bounds (e.g., tensors). Further, the variables are primary keys or tensor dimensions. Neural activation functions perform joins, or equivalently, element-wise broadcasting. Backpropagation also involves reduction operations.

[0317] The activation function computation at the neuron is adapted to tensor operations or joins. For example, for a column in a table representing a specific variable corresponding to how a predicate is used, an operation between two sets of tables is to call the same activation function at a position in the column and at the join position in the matching row (at the join column). Therefore, activations at the neuron produce new tables that can have different dimensions; that is, the table dimension can become larger as computation continues upwards through the syntax tree graph, up to the quantizer (e.g., "for all"). Or "there exists" In this case, reduction occurs on one of these dimensions. In first-order logic processing, the "for all" quantizer works as a conjunction (AND) applied to each possible estimate of the variable, while "there exists" works as a disjunction (OR) applied to each possible estimate of the variable.

[0318] Guiding inference

[0319] In one embodiment, since the tensor can be sparse and of high order, the inference pattern of the first-order logic algorithm in first-order LNN processing is query-guided, and a backchain-style algorithm is implemented, which first examines what predicates and what constants at those predicates will be involved in answering a given query. The process then expands outward from that observation to pull in only the data necessary to continue these computations. In this way, global management or “guided inference” type processing is achieved, such that during each computation iteration, it is determined what data must be pulled in to update the tensor (table) to ensure that first-order logic is feasible in the LNN, for example, by providing mechanisms to filter out irrelevant work to save computation time and memory resources.

[0320] Specifically, for global management: the first-order logic neural network (LNN) is configured to provide computations that work to reduce the number of grounds it must load / compute to answer a query. This includes managing what constants are used in the tables and ensuring that not too much data is loaded into the tables to justify the query of interest. Guided inference is used: meta-learning and heuristics are used to configure the LNN to reduce the number of formulas accessed in each recursive evaluation, e.g., informing which formula to traverse first. For example, evaluation shortcuts are implemented, including prioritizing computations at neurons more likely to be on critical paths toward tightening the bounds at neurons of particular interest, including but not limited to considering the shortest path distance from the neuron to the neuron of interest. Thus, if a node exists on the graph that will provide an answer to the query, the shortest distance path (the edge length on the graph) is found in the LNN to be evaluated first, or concatenated in another algorithm that informs which path to evaluate next. The LNN is configured with defined predicate defaults, which allow closed-world assumptions for specific predicates without representing too much fact.

[0321] Appendix A illustrates further use of LNNs in database semantic query languages ​​(e.g., SPARQL) applications to retrieve and manipulate data stored in Resource Description Framework (RDF) format.

[0322] Figure 4An example syntax tree representing a first-order logic neural network (net) 400 is depicted, which includes logical formulas in the form of human-created inference rules 412, 414, and 416, and implements first-order logic to answer the example use case question: “Was Natalie Portman born in the United States?”. As an example objective: the inference is a definite 'no,' even making an open-world assumption. In the illustrative embodiment, facts are obtained from DBpedia. As shown in the example syntax, the predicate “bornIn(·.·)” 402 has an atom number of 2, the predicate “partOf(·.·)” 404 has an atom number of 2, and the predicate “typeCountry(·)” 406 has an atom number of 1. The “bornIn” predicate 402 establishes a relationship between a person and the city they were born in and is obtained from DBpedia; the “partOf” predicate 404 is used to establish a more general relationship for a hierarchy, such as which state or country a city is located in or which state a country is located in; and the “typeCountry” predicate 406 is a general type predicate, such as something being a country. In this example, the further predicate "equals" is simply used to indicate whether the constant is the same as another.

[0323] In this example, the `bornIn()` predicate illustrates the open-world assumption because it relates everyone and all places. However, specific predicates (e.g., "astronauts of the Apollo 13 mission") are closed-world predicates.

[0324] Initially, the variables A, B, and X appearing in the formulas and nodes can take any value, including US, Israel, Jerusalem, etc., but may also include other possible values ​​not mentioned. Figure 4 Each inference step shown selects a specific formula and computes different sets of candidate values ​​for A, B, and X (if they exist). Given a query providing clues (Natalie Portman and US) and a "bornIn" relationship, one can directly query bornIn(Natalie Portman, US), but since it's not in the database (and therefore not real), it returns nothing. Other candidate solutions could first query bornIn(Natalie Portman, anywhere) or bornIn(anyone, US). These sets can be one-dimensional, but a more detailed description of their assignment follows:

[0325] exist Figure 4In the first-order logic processing described, a global management algorithm is invoked to provide inference guidance (e.g., a heuristic) instructing the query to be run first with the minimum possible fill, for example, bornIn(Natalie Portman, anywhere) in this use case example. That is, the first observation is made by pulling data on Natalie Portman from a knowledge base (e.g., DBpedia) to determine which city Natalie Portman was born in. Example fact data 403 is found that the person Natalie Portman was born in the city of Jerusalem, and everything else is sparse for the bornIn() predicate. Under this observation, the next operation is performed for the part of() predicate for all possible hits that may have been selected for Jerusalem. Thus, in the second observation, the knowledge base lookup results in finding data 405 related to the country where the city of Jerusalem is located. Therefore, in use case example 400, the method first considers: X = Natalie Portman, A = Jerusalem, and B = country Israel.

[0326] First, inference rule 414 is provided to computationally evaluate the logic (b(X,A)∧p(A,B))→b(X,B), stating that if Natalie Portman was born in the first place (country A), and the first place (country A) is part of the second place (country B), then Natalie Portman was born in the second place (country B). Given rule 414, the corresponding LNN syntax tree 424 is traversed, i.e., processed in the reverse direction as indicated by arrows 423 and 427, to computationally prove that Natalie Portman was born in Israel, i.e., by implementing the logic that evaluates predicate data 403 "bornIn(Natalie Portman,Jerusalem)" and predicate data 405 "partOf(Jerusalem,Israel)", thereby producing the resulting predicate 425 as "bornIn(Natalie Portman,Israel)".

[0327] However, an additional step is needed to prove that Natalie Portman was not born in the United States as requested in the original query. Therefore, the method next considers both A∈{Israel, US} and B∈{Israel, US}, computing the result at each combination of these values. Considering multiple combinations makes it possible to prove both that the United States is not part of Israel and that Israel is not part of the United States. That is, inference rule 416 is provided to computationally evaluate the logic (c(A)∧c(B)∧p(A,B))→(A=B), which states that if A is a country and B is a country and one of them is part of the other, then they must be the same (i.e., A=B). Given rule 416, the corresponding LNN syntax tree 426 is traversed in the reverse direction shown by arrows 430, 433, and 436, which allows explicit proof that the country represented by the predicate typecountry(US) is equal to typecountry(Israel). In other words, by implementing the logic for evaluating predicate data 407 "typecountry(US)" and predicate data 409 "typecountry(Israel)" and the proposition 435 representing Israel ≠ US, predicate 444 will be generated. and 445

[0328] Finally, the method considers X = Natalie Portman and A, B ∈ {Israel, US}, and the results of the calculation at each combination of values. When A = B, the inference shows nothing useful because the country is understood as part of itself, making the formula necessarily true, but both cases are A ≠ B (i.e., A = Israel and B = US, or A = US and B = Israel), which is sufficient to prove... In these calculations, inference rule 412 is provided to computationally evaluate the logic (b(X,A)∧b(X,B))→(p(A,B)∨p(B,A)), which states that if Natalie Portman was born in location 1 (country A) and Natalie Portman was born in location 2 (country B), then location 1 is included in location 2, or vice versa. Therefore, given rule 412, traversing the corresponding programming syntax tree 422 in the reverse directions indicated by arrows 450, 453, and 456 allows for the definitive proof that Natalie Portman was not born in the United States. That is, by implementing the evaluation of predicate data 444... Data 445 The logic, and given the evaluation predicate 425 "bornIn(Natalie Portman, Israel)", will produce a deterministic result. This result is the answer to the processed query "Was Natalie Portman born in the United States?".

[0329] As in Figure 4 The inference pattern depicted in Example First-Order Logical Network Use Case 400 does not assume that the knowledge base dataset is closed-world; that is, just because it may not be explicitly found in the knowledge base set that Natalie Portman was born in the United States does not mean that Natalie Portman was not born in the United States. Therefore, the inference paths configured as rules 412, 414, and 416 are programmed as corresponding syntax trees in a first-order LNN such that their traversal in response to a query will computationally prove that Natalie Portman was born somewhere other than the United States.

[0330] The computational pattern in LNNs is similar to that of feedforward neural networks, where the input layer passes input to one or more inner or hidden layers, which compute based on the corresponding input and their outputs are passed to the final output. However, LNN structures are implemented as recurrent neural networks, where, in addition to the traditional feedforward neural network pattern, some outputs are looped back to become input for the next pass, thus providing a bidirectional inference structure. For example, in Figure 4 In the example first-order logic network use case 400, predicate input information or knowledge graph data 402, 404, 406 (e.g., provided by DBpedia) undergoes a feedforward pass (upward traversal of the tree) for evaluation until the corresponding formulas 412, 414, 416 are reached. At this point, the result of the computed feedforward path is the new truth value of the formula, and in this example, all results are assumed to be true (tighter bounds) before traversing in the backward direction of inference. In the backward pass, the result value of the feedforward path or the learned parameters (e.g., new information values) are passed backward from the root to each leaf. In bidirectional inference, each edge of the knowledge graph (syntax tree) has both forward and backward computation. The backward pass of computation is equivalent to many different inference rules employed in classical and fuzzy logic.

[0331] Typically, in LNNs, wherever a predicate or proposition appears in any formula, that predicate or proposition is used as a bound candidate proof. Figure 4 Example use case 400 is complex in the sense that the predicates “bornIn(·.·)”402 and “partOf(·.·)”404 ​​are each used simultaneously in many different places (with many uses), and therefore there are ways to provide an increasing number of values ​​for those predicates.

[0332] for Figure 4An example use case is implemented in the backward traversal of the syntax tree 424, which represents Formula 414 as a backward information flow step 423, 427, to implement the classic "affirmative antecedent" inference rule. The learned facts b(X,A) and p(A,B) and their conjunction provide the hypothetical truth for the entire formula; that is, the structure provides the truth value b(X,B) – an affirmative antecedent inference. Given the first-order logic processing, the LNN conjunction of nodes 403 and 405 of b(X,A) and p(A,B), the method performs joins where variables are matched (e.g., inner product or inner join), and for unmatched variables (outer join), all combinations are obtained. Thus, for each X, A, B, a truth value is obtained indicating whether someone was born in one place and whether that place is part of another place, which is a very sparse and fairly large three-dimensional tensor (when implemented without any guidance). This provides computational guidance to indicate interest only in some of these combinations, and some values ​​may remain in an undecided state (e.g., a loose state, since these may not affect the robustness of the system). Further, in the second inference step, as shown in Equation 416... Figure 4 The example LNN syntax tree 426's backward traversal, information flow steps 430, 433, and 436 implement the "negation consequent" inference rule and the subsequent conjunction syllogistic inference rule: that is, firstly, the method proves that the entire conjunction c(Israel)∧c(US)∧p(Israel,US) is false (as well as the conjunction after the exchange of Israel and the United States), and then, since c(Israel) and c(US) are both true, this proves that p(Israel,US) and p(US,Israel) are both false. Finally, in the third inference step, with the addition of the following steps at formula 412... Figure 4 The example LNN syntax tree 422 is traversed backwards. Information flow steps 450, 453, and 456 implement the example negation consequent inference rule, followed by the conjunction syllogism inference rule: that is, first prove that the conjunction b(Natalie Portman, Israel) ∧ b(Natalie Portman, US) is false, and then because b(Natalie Portman, Israel) is true, b(Natalie Portman, US) is false.

[0333] As described, the down-inference used for down-propagating bounds is modified in the first-order logic processing of LNNs. For example, for existence quantizers, the upper bound is propagated down, while for general quantizers, the lower bound is propagated down. For existence quantizers, Scorenization is required to propagate the lower bound down, and for general quantizers, to propagate the upper bound down. Figure 4In the example use case scenario, new candidate constants are added to the universe, for example, Portman, Jerusalem, and the United States, and a specific Scorenization rule is adopted: for example, for all people, there exists a location x such that the person is born at that location. In this example, for Natalie Portman, there exists a location x for the rule, and this (for Natalie Portman, for the rule, is x) is introduced as a constant that can be proven to be equal to some other constant.

[0334] Global Management

[0335] For bidirectional inference, the evaluation order is determined by the "global management" method, and in this embodiment, depends on what is known from the query. Figure 4 In the example use case, first, given the initial query (e.g., Natalie Portman was born in the United States), the syntax tree 424 is traversed, and then... Figure 4 In Example 400, syntax tree 426 is evaluated in this order and syntax tree 422 is evaluated last.

[0336] Furthermore, for bidirectional inference, LNNs can be further programmed to provide a backward evaluation pattern, which includes efficient update iterations (e.g., traversing all neurons of the network and returning to all neurons). In one embodiment, global management provides a mechanism for controlling the inference depth (i.e., the number of backward passes on the network). The "global management" approach further provides the ability to computationally determine whether a particular formula needs to be evaluated, for example, based on whether there is something to learn from evaluating that formula. This is because the LNN structure knows what constants are currently being acted upon and what predicates need to be known about those constants. Given the LNN structure, specific formulas can be queued for evaluation to enhance learning.

[0337] study

[0338] As described above, an existing knowledge base of rules can be transformed into a neural network. Even without subsequent training, such a network can perform inferences as specified by the rules. On the other hand, by presenting ground truth observations, constrained optimization can tune the network to become more tolerant of corner cases and noisy data. In an embodiment, constrained optimization is used to learn the parameters of each LNN neuron to minimize a given loss function while preserving the classical properties of its corresponding logical connections. Specifically, this makes the neuron corresponding to AND produce a sufficiently true output when all its participating inputs are sufficiently true, and a sufficiently false output when any of its participating inputs are sufficiently false, and vice versa for OR. In an embodiment, some of the neurons in the LNN have fixed parameters, i.e., such that the formulas corresponding to these neurons act as components of the ground truth, still participating in inference and loss, but only in learning if they influence the optimal parameter configuration of other neurons. In an embodiment, ground truth formulas (i.e., neurons with fixed parameters) can be used, which become contradictory in the event of undesirable inference behavior, thus allowing a simple loss function to support arbitrarily specific and interpretable logical requirements.

[0339] LNNs are trained using gradient-based constrained optimization methods that seek to minimize a defined loss function. Because all constraints are linear with respect to weights and biases, the Frank-Wolfe algorithm is suitable for this purpose, but other methods also apply. In Frank-Wolfe constrained optimization, the objective subject to neuron constraints M is minimized by calculating the network loss E according to the following formula:

[0340]

[0341] By borrowing the structure of an existing KB (Knowledge Base), LNNs can be constrained to adjust the parameters of inputs already involved in the formula. On the other hand, to perform rule induction, the method involves constructing a speculative network that links numerous propositions to several layers of connections across multiple formulas that can be constructed. One consequence of this constraint is that for lower values ​​of the truth threshold "α", the computation can support a small number of operands with non-zero weights, thereby limiting the rule complexity. Both borrowing the KB structure and rule induction can be used simultaneously during model training. In an embodiment, a (non-negative) slack variable and a slack penalty proportional (increasing function) to both the slack variable and the importance weights of the inputs defining the constraint are introduced for each constraint. This allows optimization to shift inputs into and out of the involvement set and further allows control over how the learned neural parameters must be classically represented.

[0342] Depending on the specific problem being solved, different loss functions can be used. For example, an LNN configured to predict binary outcomes can use MSE (mean squared error) as usual, but it should also include loss functions with si w i The scaling employs a relaxed penalty to enforce classical inference behavior, along with a contradictory penalty scaling for the degree of boundary crossing at each neuron. Alternatively, contradictory penalties can be used to construct arbitrarily complex logistic loss functions by introducing new formulas into the model that become contradictory in the case of undesirable inference behavior. Specifically, the parameters of these introduced formulas should not be tuned but should remain at their default values ​​(e.g., all 1s), so optimization cannot turn off the logistic loss function. Other loss functions of interest penalize all bounds tightening to favor inference parsimony, as well as any combination of the above.

[0343] In an embodiment, the loss function E includes terms that scale with the degree of inconsistency observed at each neuron, for example, functions that increase the upper and lower bounds of the neuron relative to the amount of calculated boundary crossings. An example loss function E is:

[0344]

[0345] Another learning paradigm supported by LNNs is task-agnostic learning, characterized by attempting to predict any input given any subset of other inputs. This is accomplished by taking a dataset of different combinations of known proposition truths, randomly selecting a subset of known propositions as observations for each pass on each combination, and then attempting to predict the hidden propositions.

[0346] constraint

[0347] The constraints on neural parameters are derived from the truth tables of the operations they are intended to model and from established ranges for "true" and "false" values. Given a truth threshold of 1 / 2 < α ≤ 1, a consecutive true value is considered true if it is greater than α, and false if it is less than 1 - α. Thus, for example, a truth table for a binary AND operation suggests a set of constraints, given:

[0348]

[0349] And corresponding to:

[0350]

[0351] More generally, an n-ary conjunction has the following constraints.

[0352]

[0353] The disjunction of an n-ary element has the following constraints.

[0354]

[0355] Intuitively, equation (1) requires that conjunctions return false if any of their inputs are false (even if their other inputs are 1, i.e., at most true); while equation (2) requires that they return true if all their inputs are true; conversely, disjunctions are true. This identity Implication is allowed to use the same constraints as disjunction, and in fact, according to De Morgan's law, the two sets of constraints are equivalent.

[0356] The result of these constraints is to ensure that LNN evaluations behave classically, i.e., producing results at each neuron within the established true and false ranges if the inputs to all neurons themselves fall within these ranges. In the embodiment, the constraints are implemented by tracing the acceptable region, and the parameters are improved by moving along the gradient direction of the loss function while projecting a component perpendicular to the cross bounds.

[0357] Slack variables

[0358] The desired input weights are to decrease to exactly 0, thus effectively removing them from I. To allow this, slack variables need to be introduced for each weight, allowing the corresponding constraints in equation (1) or equation (3) to be violated when a weight decreases to 0:

[0359]

[0360] If s i =0 or w i =0, then these remain consistent with the original constraints. One can update the training loss function to include constraints specific to s. i w i A scaling penalty term is used to incentivize optimization to select these parameterizations. The coefficients on this penalty term control how classical learning operations must be performed; if optimization reduces the penalty term to 0, the exact classical behavior is restored.

[0361] Logical consistency: Losses due to contradictions

[0362] When boundaries intersect, this means that a single truth value cannot be assigned to a neuron. The primary driver of optimization is the execution of logical consistency.

[0363] Optimization problem

[0364] The contradictory loss is similar to the hinge loss; the alternative is the squared hinge loss. Linear regularization loss can be used in addition to or instead of squared regularization weight decay.

[0365]

[0366] Depending on the specific problem being solved, different loss functions can be used. For example, an LNN configured to predict binary outcomes can use mean squared error as usual, but it should also include the aforementioned loss function for s. i w i Relaxed penalty scaling is used to enforce classical inference behavior, along with contradictory penalty scaling for the degree of boundary crossing at each neuron. Alternatively, contradictory penalties can be used to construct arbitrarily complex logistic loss functions by introducing new formulas into the model that become contradictory in the case of undesirable inference behavior. It is understood that the parameters of these introduced formulas should not be tuned but rather left at their default values ​​(e.g., all 1), so optimization cannot turn off the logistic loss function. Other loss functions of interest penalize all bounds tightening to favor inference simplicity and any combination thereof.

[0367] Another learning paradigm supported by LNNs is task-agnostic learning, characterized by attempting to predict any input given any subset of other inputs. This is accomplished by taking a dataset of different combinations of known proposition truths, randomly selecting a subset of known propositions to use as observations for each pass on each combination, and then attempting to predict the hidden propositions.

[0368] Appendix A shows another example learning use case for using LNNs in semantic tagging applications.

[0369] Gradient transparency clamping

[0370] Real-valued logic typically confines truth values ​​to a defined range, making clamping operations on the results necessary. Automatic discrimination provides clamps that can perform value clamping, but it also invalidates the associated gradients, which can disable the learning of the parameters involved. Gradient-transparent clamping addresses this problem by asserting the clamp using computations separated from the gradient tracking computation graph while preserving the original gradient information, thus fully recovering gradients outside the allowable region.

[0371] Clamping in neural networks

[0372] Smooth bounded activation

[0373] Based on sigmoid(1+e -x ) -1 and tanh(e x –e -x ) / (e x +e -xThe activation function of a neuron in a logical function ensures that the output is within a bounded range, typically [-1, 1] or [0, 1], while also ensuring differentiability across the entire domain. Bounded neuron activation ensures that the values ​​in the neural network do not grow too large and that there is a degree of interpretability at the neuron's output, such as for binary classifiers or real-valued logic.

[0374] Smooth bounded activation functions f(), similar to sigmoid and tanh, saturate on both sides, where the gradient... The vanishing gradient tends towards zero at extrema. The vanishing gradient problem affects learning using these bounded activation functions, where neurons are saturated or where chain rules in deep networks produce negligible products of small gradients. A negative effect of the vanishing gradient is that it can significantly decay gradient descent depending on the signal used for learning, effectively shutting off learning at some neurons. Residual connections are skipped layers in deep neural networks to shorten the number of interactive gradients and reduce the solution to the vanishing gradient problem. Another approach is to choose activation functions that do not have small gradients, such as ReLU.

[0375] ReLU

[0376] The Modified Linear Unit (ReLU) max(0; x) has a one-sided saturation of zero, where x < 0 has an associated gradient of 0, and otherwise has a gradient of 1. ReLU can solve the vanishing and exploding gradient problems because its gradient can only be 0 or 1. However, this activation is affected by the "dying ReLU" problem, where if the pre-activated distribution is confined to the negative domain, the input gradient never propagates through the ReLU, making it unlearnable. Leaking ReLU and different forms of parameterized ReLU have been proposed to address the lack of gradients in the negative domain.

[0377] When neurons are viewed as concept detectors, it can be useful to show the lower bound of the ReLU output, which gives the degree of presence of a feature linearly, but only as a consistent statement about the absence of a feature through correction. The ReLU lower bound can also stop relevant neurons by not propagating negative values ​​corresponding to the degree of absence of the learned features. The ability to stop signal propagation also reduces noise and the duplication of foreign information in the network.

[0378] The computational benefits of ReLU during learning are attributed to the gradient sparsity introduced by its zero gradient, meaning that gradient computation only requires operations on a subset of neurons. Furthermore, the two possible gradients of ReLU are constant scalars and do not require computation to determine their gradients.

[0379] Information and gradient descent

[0380] Neural networks are general function approximators; given sufficient capacity, a sufficiently large set of neurons, and the interconnections between them, they can represent functions of any complexity. Determining the exact capacity required for arbitrary functions can be a tractable problem, so neural networks are often given excessive capacity or grow larger over a series of hyperparameter optimizations.

[0381] Overfitting is a problem where a trained neural network fails to achieve its target performance on previously unseen data, thus making it ungeneralizable. Redundancy or excess capacity in a neural network allows overfitting, where input training data is memorized to optimize the stated objective. Various regularization methods (such as data augmentation and dropout) have been proposed to prevent overfitting, which, in the case of data augmentation, introduce random variations into the input data or randomly remove neurons during the training epoch.

[0382] Bounded activation functions that can saturate to zero output and gradient (e.g., sigmoid and ReLU) can be considered a combination of executive information and gradient deceleration. This can act as a regularization method that effectively removes capacity or disconnects certain neurons under zero saturation conditions. The empirical success of deceleration and ReLU is attributed to the regularization effect of sparsity introduced by these methods.

[0383] Gradient transparency clamping

[0384] Clamping in automatic differentiation

[0385] The lower bound of ReLU max(0, x) performed by the clamping, min, or max functions of an automatic differentiating system typically disconnects x from that node in the computational graph and replaces it with a new node with a value of 0, without attaching any previous computational history. This means that even if x is already involved in determining the clamping result, the loss gradient can still be... The gradient statement says that any change to x will keep the output unchanged, except if the update to x is large enough to bring it back into the admissible domain.

[0386] When clamping cuts off the independent variable so that it is no longer represented in the computation, it introduces inaccuracies into the interpretation of the computed gradient. If the second derivative with respect to 0 is set to a right-handed discontinuity, such that 0 gives a gradient of 1 with linearity, then it can be stated that ReLU will decrease to the negative value used for gradient descent at a linear rate. Therefore, if x = 0, given a linear gradient, the projection of gradient descent with step s = -0.1 could be x' = x + s = -0.1, but this update cannot be materialized because it has been clamped to its initial value. Thus, the provided non-zero gradient does not provide guidance on when clamping might occur, suggesting that even normal clamping applications can lead to incorrect gradient interpretations, especially when the function is assumed to be linear.

[0387] The gradients provided by the automatic distinction between the inside and outside of the clamped region are then interpreted and rely on a learning update mechanism to manage step size and momentum to navigate the irrational loss landscape introduced by the clamp. Alternatively, the clamp could inform learning with gradients indicating that the loss can be changed by updating the parameters, even if the clamp then turns on at a small parameter step. The clamp can also indicate that learning is impossible when the output is currently clamped, even if the clamp turns off to the right for small parameter steps, allowing it to actually learn.

[0388] Information rollback and gradient transparency

[0389] It can be said that bounded activation functions saturated at zero perform regularization under certain pre-activation conditions by halting the propagation of dynamic information and gradients. Information and gradient deceleration methods are particularly relevant to neural networks with redundant capacity, serving as a means of introducing sparsity to prevent overfitting and address the vanishing gradient problem.

[0390] In the case of LNNs, which function as one-to-one mappings of syntax trees for logical programs, significant differences arise compared to normal neural networks. In LNNs, hidden neurons are not necessarily related to external concepts, and the width of hidden layers can be arbitrarily set. Therefore, overfitting and handling redundancy are not primary concerns for LNNs, although logical neurons and subnetworks can be replicated to expand parameter capacity. The motivation to introduce gradient sparsity into normal neural networks through ReLU is not easily applied to LNNs.

[0391] In LNNs, for certain loss terms that can be captured at the neuron level, the vanishing gradient problem can be avoided together, allowing for shorter gradient interpretations to be computed. However, this can be more complex for combined losses with supervised, task-specific objectives computed simultaneously on different batch dimensions of alternating universes representing truth assignments. Then, even if LNNs solve the vanishing gradient problem, smooth activations should still be avoided.

[0392] Information backoff through clamping in real-valued logic is used to keep truth values ​​within the interpretable and permissible range of the logic. Lukasiewicz logic actively applies clamping to ensure logical soundness, thus requiring the output values ​​of logic operations to be bounded. However, associated gradients outside the clamped region do not necessarily need to be bounded. In fact, truncating gradients outside the clamp prevents the learning of significant portions of the operational range of logic neuron activation. Gradient-transparent clamping provides information backoff or value clamping while also leaving the gradient unaffected, making any gradient computation effectively ignore the clamp. The benefit is that the primary purpose of clamping (i.e., clamping the output value) is still satisfied, but the gradient is preserved across the entire output domain as if no clamp was applied. The "dying ReLU" problem can also be solved with gradient-transparent clamping because learning can accept gradients across the entire operational range, ensuring that gradient descent always has a direction that can be used for parameter optimization.

[0393] The perceptual error introduced will have exactly the same properties as those generated by clamping the output value. Specifically, gradients within the bounds may indicate that the output will change, even if the clamp is subsequently applied immediately to the update step, but this is not reflected in the gradient. Similarly, gradients outside the bounds, given by gradient-transparent clamping, may indicate a change in the output, but the clamping still applies after the update step. The learning optimizer should manage step size and momentum to ensure robust learning with and without gradient transparency in these scenarios.

[0394] Gradient transparency clamping

[0395] When clamping the output, nodes that would normally be cut off from computation are automatically identified and replaced with new nodes representing the applied bounds. Removing a computed node also removes its trace related to the current output, which is undesirable since it is indeed part of the computation. The idea is then to keep the input to the clamping operation as part of the resulting node in the computation graph. This requires defining a new clamping function that performs value clamping while preserving the gradient, as if no clamping were applied.

[0396] For x min The lower limit clamping at x < x min Execution value clamping to give x min The output of this can be calculated as x - min(0, x * - x). min), where x* represents a copy of x that has been separated from the computation graph and therefore does not carry history. By obtaining the disconnected value x*, value clamping can still be applied without destructive interference, which would otherwise cause destructive interference if a trace copy of the same node were used. Automatic differentiation tools generally allow the copying of the separated values, and various capabilities exist that allow value copying and reuse. The superscript (1) indicates the gradient in the unscaled clamped region, which is the opposite of the linear scaling performed by gradient substitution, which will be explained later.

[0397] min(x max ,x) (1) =x-max(0,x) * -x max ), (5)

[0398] max(x min ,x) (1) =xn(0,x * -x min ), (6)

[0399] Then, the clamp can be replaced with gradient-transparent clamping to recover the gradient across the entire output range while still providing the expected value clamp. The stipulation here is that the parameter update strategy should account for the possibility of no output change for insufficient steps, even though the gradient in the clamped region declares the output change as expected. Again, this disadvantage is similar to the gradient interpretation difficulties faced when the clamped value is close to the boundary inside the allowable region and the stepping goes outside, in which case the output change is also expected but not realized when the clamp is applied immediately.

[0400] Clamping in fuzzy logic

[0401] Real cell interval

[0402] The continuous t-norm of fuzzy logic performs binary operations representing infinite-valued logic on the real cell interval [0, 1], where the truth value can be interpreted as a fuzzy mixture between true and false. Clamping the results of fuzzy logic operations, such as those in Lukasiewicz logic, is necessary to ensure that the truth value remains within the interpretable range of [0, 1]. The min() and max() functions clamp the computed values ​​in all Lukasiewicz logic operators, otherwise the results might be outside the permissible truth range of [0, 1]. For Lukasiewicz conjunction forward inference, clamping subsequently bounds the output and provides the associated clamp gradient as follows.

[0403]

[0404] Note that for the actual input x i =1, then wi The corresponding gradient of the output is This means it doesn't even provide a way to update w when the upper limit clamp is not applied. i The gradient. Instead, the bias β must be adjusted to obtain the desired output, such as a false output when all inputs are true.

[0405] Gradient transparency clamping

[0406] Note that the gradient is non-zero only within the real unit interval, so any clamping applied typically invalidates the gradient information, preventing the learning process from receiving useful gradient information. This is problematic considering that a large portion of the operational range of logical conjunction undergoes clamping depending on the parameters. The solution to this problem is to perform value clamping only through gradient-transparent clamping, while preserving the gradient. In this case, the output gradient of β is always 1 both inside and outside the clamped region, and for w... i The output gradient is always

[0407] The parameterization of the proposed logical neuron is particularly well-performing and bounded, where 0 ≤ w i ≤1 and 0≤β≤1+∑ i w i Typically applied without functional loss. This is because any parameter configuration from these constraints allows access to the useful functional range of bounded ReLU. Therefore, the learned optimizer can be set with robust update step sizes and constrained parameter updates, meaning that the existence of transparent gradients from parameters in clamped cases requiring large update steps can be practically handled. (Contradictory loss ∑) j max(0,L j (β,W)-U j (β,W) also involves clamping, the purpose of which is only to clamp the lower limit L. j U above the upper limit j The loss term should only be activated when there is a contradiction. If there is no contradiction, we don't want to update any parameters based on this loss. Therefore, clamping can be performed so that the gradient is clamped and set to zero even when there is no contradiction. This means that normal clamping can be performed, especially for the loss term when learning should not be performed.

[0408] Backward inference

[0409] The backward inference at the weighted Lukasiewicz conjunction can be determined by first unclamping its output, which involves placing the points at the intersection of the two points into the parallels. The clamping lower limit is changed to the minimum unclamped value. And similarly, will be in The clamping limit is changed to the maximum unclamped value U = β.

[0410] The release of clamping and extension of limits, when necessary, ensures that all backward inference interpretations can be generated.

[0411]

[0412] Release clamp x' = min(x max x is only max(x',x), and similarly, for x' = max(x',x), min We take min(x',x) as the unclamping operation. Here, the values ​​of x are recalculated using gradient tracking, although they are separated during the subtraction during clamping. Note that disabling gradient tracking is unnecessary for unclamping, just as it is for clamping, because there is no subtraction that could invalidate the gradient or any destructive interference thereof. Unclamping the bounded output to its extrema can then continue to...

[0413]

[0414] The inverse of the function can then be determined using the known value of the conjunctive output and all inputs except one of the inputs i, where backward inference can then compute the value of the remaining main input j. Then, the computed proof for the target input is clamped to the real cell interval before performing proof aggregation.

[0415]

[0416] Conjunctive syllogism Logical inference is provided to determine the backward inference result, which is equivalent to the function inverse, because

[0417]

[0418] The weighted Lukasiewicz implication is typically defined as follows:

[0419]

[0420] Note that there is negation of partial conjunction, which also involves the swapping of its lower and upper bounds in the backward inference computation. The unclamped gradient obtained over the entire operating range with gradient-transparent clamping is calculated as follows:

[0421]

[0422] For weights 0 ≤ w j ≤1 < 1, all backward inference gradients and The gradient tends to increase as the weights become smaller. When performing learning updates, gradient clipping can handle these large gradients, or it can be considered to revert to clamped gradients as usual.

[0423] Gradient replacement

[0424] In the embodiments, the activation function of neurons is intentionally altered to ensure desired properties, including logical consistency, inference and learning properties (such as compositing), preservation of classical logistic gradients and non-zero gradients.

[0425] The introduction of a truth threshold α allows for non-zero gradients in regions where clamping would typically be performed. A custom piecewise linear activation function provides a range [0, 1-α] to express the logically conjunctive clamped false region, thus possessing a positive non-zero gradient associated with the classical false region. The gradient states that a positive change in the function input will result in a positive increase in the true output, even if an insufficient step size may lead to a classical false output. Adjusting the truth threshold 2 / 3 ≤ α ≤ 1 alters the gradient magnitude in the classical region, allowing for more conservative gradients for these regions, which can lead to more accurate learning updates.

[0426] Conversely, gradient transparency clamping utilizes the existing gradient of the same size as the unclamped region, thus providing a more aggressive gradient in the classical region compared to piecewise linear activation. Gradient substitution methods in gradient transparency clamping can guarantee gradient magnitudes equal to those in piecewise linear activation, but do not require support for classical symmetry in the range [α, 1] associated with true activation. The output value also does not need to relax α so that false remains only at 0 output, but can provide arbitrary gradients in the clamped region with gradient transparency clamping.

[0427] Basic gradient substitution alters the gradient-tracking value by scaling its gradient with a provided scalar *a* under specified conditions. In transparent gradient clamping, the addition of gradient substitution can scale the effective gradient to which the value clamping is applied. Bounded ReLU can then exhibit arbitrarily scaled gradients in its correction region to allow for more accurate learning updates, since smaller gradients can be chosen for the clamping region. Besides separating *x*_ from the values ​​of the computation graph of *x* used for gradient tracking, scaled gradient substitution uses indicators or Boolean conditional functions readily available in the automatic discrimination library, and the adapted gradient transparency function is thus applied as follows:

[0428] f a (x,x max )=(x≤x max )+a(x max <x),

[0429] g a (x,x min )=a(x <x min )+(x min ≤x),

[0430] min(x max ,x) (a)=(x-max(0,x) * -x max / f a (x,x max )))f a (x,x max ),

[0431] max(x min ,x) (a) =(x-min(0,x) * -x min / g a (x, min )))g a (x,x min ).

[0432] This involves normal clamping by setting the gradient in the clamped region to zero, followed by zero-scaled transparent clamping with the gradient replaced by a gradient with a scaling factor a = 0. max ,x) (0) and max(x) min ,x) (0) Correspondingly.

[0433] Therefore, in summary, the characteristics of LNNs include: 1. It is a system that can be immediately interpreted as a logical formula; 2. Its ability to combine domain knowledge by using existing KB as seeds; 3. Its support for compound formulas in first-order logic, e.g., as opposed to only Horn clauses; 4. Its explicit adherence to the open-world assumption by tracking upper and lower bounds on truth values; 5. Its ability to assign weights to each operand of each connection in each formula, as opposed to only weighting the entire formula; 6. Its logical soundness and ability to be constrained to represent things in a classically accurate manner; 7. Its support for new neural training paradigms, including contradiction-based logical losses and learning for any task; and 8. Its tractable training and evaluation runtime compared to restricted Boltzmann machines and Markov logic networks.

[0434] In a non-restrictive implementation, LNNs can be configured as neural symbolic systems applicable to fields including data science, ontology learning, training and evaluation in simulators, cognitive learning and reasoning, models for vision and language processing, or any model that combines logical reasoning and neural learning.

[0435] Furthermore, as a versatile neural network architecture, LNNs are widely applicable to many AI tasks, including supervised and unsupervised learning. In particular, it is well-suited for natural language processing tasks because it reflects the superposition of hard syntactic rules and fuzzy word meanings in language. Accordingly, it is a suitable target representation for semantic parsing, while providing the possibility of on-the-spot inference based on the input sentence and subsequent refinement given additional information. Finally, the LNN architecture can be seamlessly integrated into existing neural solutions, thereby enhancing already highly capable machine vision and / or text processing systems with reasoning capabilities.

[0436] Figure 8 An embodiment of a Deep Thinking Question Answering (DTQA) system pipeline 800 is illustrated. The pipeline input 802 is the question text, which is first parsed using an Abstract Meaning Representation (AMR) parser module 805. An AMR is a rooted, directed acyclic graph (DAG), for example, expressing "who is doing what to whom" in a sentence. Each node in the graph represents a concept, while edges represent relationships between concepts. A typical example of an edge is a subject or object relationship between concepts. See references in this document. Figure 4 As described, the example input question text is "Was Natalie Portman born in the United States?". The output 808 of the AMR parser (i.e., the AMR DAG for each question) contains entities and frames (relationships), although these may not be mapped / linked to corresponding structures in the Knowledge Base (KB) 850.

[0437] Therefore, an entity extraction and linking module 810 and a relation extraction and linking module 812 are implemented in the pipeline. The entity extraction and linking module 810 is configured to extract entities and relations to enrich the semantic representation obtained via AMR parsing by leveraging explicit links to entities and concepts appearing in a knowledge base (e.g., DBPedia). The relation extraction and linking module 812 links those entities and relations to the knowledge base (KB). The linked entities / relationships are then mapped to their corresponding nodes in the AMR. The input to the entity extraction and linking module 810 is the AMR parsing and the question text, while the input to the relation extraction and linking module 812 is the AMR parsing using the linked entities. The output of these modules is an extended AMR (E-AMR) 820 with entities and relations linked to the KB.

[0438] Regarding the entity extraction and linking module 810, in this embodiment, to achieve high accuracy, the system jointly applies entity extraction and entity disambiguation techniques. First, a list of candidate entities is created based on: 1) entities in AMR parsing; 2) named entities and concepts extracted, for example, using the Watson Natural Language Understanding API; and 3) noun phrases constructed based on syntactic parsing. The actual link to DBpedia is based on a set of similarity-based matching algorithms or rules 860.

[0439] For each candidate entity, the DBpedia lookup API is used to identify a subset of potential matching entities (ontology classes or resources) for that candidate entity. Then, each matching rule is applied to identify more precise matches. Matching rule 860 is based on a combination of features constructed from: the input question itself (e.g., entity name, co-occurring entities), DBpedia candidate entities (e.g., entity name and aliases, attributes), and the semantic similarity of the query to the DBpedia subgraph of candidate matching entities in the common vector space.

[0440] Regarding the relation extraction and linking module 812, in an embodiment, the task is implemented to enrich the AMR representation by linking frames and edges in the graph to their corresponding (semantically equivalent) relations in the KB. When mapping frames from the AMR graph to RDF / OWL (Web Ontology Language) KB (such as DBpedia), the inherent mismatch between the n-gram independent variables used in AMR and the binary predicates in the ontology is overcome by combinatorially expanding all independent variables and then pruning less likely combinations. For example, independent variable-encoded predicates that can be linked to ontology relations can be generated from the frames. To map AMR predicates to KB relations, a parallel corpus is created, for example, using a subset of Wikipedia sentences. For each sentence, an AMR graph is generated, and KB triples from DBpedia are extracted in a weakly supervised manner. The mapping is then generated using a method inspired by statistical machine translation. Furthermore, the surrounding context of entities and relations mentioned in the question can help identify corresponding knowledge base elements. To leverage these contextual cues, a unary language model approach is employed, and a context model is built for each relation predicate. For each predicate in the knowledge base, all sentences are extracted from the underlying text corpus that mentions instances of the predicate, along with constructed unary language models. These language models are then used to calculate the probability that the predicate is mentioned in the question. The top N relations (e.g., N=5) based on these probabilities are then selected as the output of module 812.

[0441] As further illustrated in the pipeline system 800, the E-AMR 820 is then converted by the AMR-to-logic converter module 825 into a formal first-order logic representation 827. This provides greater expressiveness and allows the method to be generalized rather than being specific to a particular query language (e.g., the SPARQL RDF query language).

[0442] In this embodiment, the logical formalization used for this task is employed to create a bridge between AMR and SPARQL that can represent declarative and procedural knowledge. The formalization supports binary predicates, which are ubiquitous in linked open data, as well as higher-order functional predicates for supporting aggregation and manipulation of variable-bound sets. This formalization is not limited to the SPARQL query language. It follows the same syntactic conventions as the OpenCyc and NextKB projects, enabling support for a wide range of semantics, from standard logical operators to DBpedia predicates and functions that emulate SPARQL constructs.

[0443] AMR works exceptionally well in recognizing verb sensory and semantic roles. This provides a crucial foundation for rule-based transformations from AMR to logic. The implementation addresses the following issues: 1) identifying the target (unbounded) variables of a query, 2) identifying queries that require sorting of the variable binding set, and 3) resolving KB entity URIs to AMR variables.

[0444] The AMR representation used for interrogative and imperative sentences is used to identify the target variable. In the AMR, interrogative sentences are represented by nodes belonging to the amr-unknown class. Intuitively, if the question is converted into a fill-in-the-blank sentence, the blanks are represented by instances of the amr-unknown class. In such cases, the AMR-to-logic converter 825 replaces the amr-unknown node (or adjacent node) with an unbounded variable. For imperative sentences, the AMR-to-logic converter replaces the direct object role (ARG1) of the top-level command with an unbounded variable.

[0445] The need for sorting can be detected by the existence of a highest-level (i.e., AMR most and least classes) and a quantity Propbank framework (i.e., have-quant-91, have-degree-91). The AMR-to-logic converter 825 must determine the AMR variables corresponding to the quantity of interest and the sorting direction (ascending for "lesat" and descending for "most"). Entity and relation link results are necessary inputs to the AMR-to-logic converter 825, as they provide the required KB-specific vocabulary. However, even with accurate entity and relation link results, the granularity of entities and relations in KB and AMR representations can differ. For example, an acceptable AMR parsing for "composer of the Titanic soundtrack" might not have an edge directly connecting "composer" to "Titanic," but rather a bilateral path between them via "soundtrack." Conversely, in KB, a direct link can exist between the composer and the film. To mitigate this problem, the AMR-to-logic converter 825 generates an initial logical interpretation of the query and seeks alternative AMR variables to correspond to the entity linking results in order to minimize the number of unbounded variables in the final logical representation (and maximize the use of entity linking results).

[0446] The logical representation can then be transformed into SPARQL by the logic-to-SPARQL module 830, which queries DBPedia KB850 to obtain a response. The logic-to-SPARQL module 830 is responsible for converting the logical query generated by the AMR-to-logic module into an equivalent SPARQL query 835, which can be stored in any RDF store (e.g., triple storage 870). database ) is executed on, for use via semantic query To store and retrieve Triple group (For example, by the subject-) predicate - Data entities composed of objects. There exists a one-to-one mapping from the constructs in the logical representation to the constructs in SPARQL. The Logic to SPARQL module 830 uses rule-based transformations to convert the input logical representation into SPARQL constructs, and then uses, for example, the Jena query builder to generate the output SPARQL query 835.

[0447] According to the method described herein, the formal first-order logic representation output 827 of the AMR-to-logic converter module 825 is used to obtain a query generalized representation 839 that can be mapped to the corresponding graph syntax tree LNN 840. The LNN 840 operates to retrieve predicate grounds and perform multi-directional reasoning via its granular SPARQL integration, to answer ASK questions, for example, under the open-world assumption.

[0448] For example, using Figure 8 The pipeline system 800, taking the input text question "Was Natalie Portman born in the United States?", maps Natalie Portman from the AMR resolution to dbr:Natalie_Portman, and the United States from the AMR resolution to dbr:United_States (both named entities in DBpedia), where the prefix dbo: represents http: / / dbpedia.org / ontology / and the prefix dbr: represents http: / / dbpedia.org / reference / . "Born in" from the ARM resolution is mapped to the relation dbo:birthplace. For this specific "dispute inclusion" query, the query generalization is formed according to the following:

[0449]

[0450] This allows us to obtain the logical query expression for the example input text question:

[0451]

[0452] Its conclusion Figure 4 The LNN syntax tree.

[0453] The trainable support rule 860, used to determine whether a known object is included in the target, assumes the most specific ontology assignment.

[0454] As described in this paper, the Logistic Neural Network Architecture 840 provides neurons that model concepts of weighted fuzzy or classical first-order logic with rigorous definitions. Arranged in a one-to-one correspondence with the operations in a system of logical formulas, the LNN840 is capable of inference in any direction, i.e., via normal evaluation or backward inference, such as affirmative antecedent reasoning, negative consequent reasoning, combination cancellation, and all relevant inference rules. The LNN explicitly confirms the open-world hypothesis by tracking upper and lower bounds on the truth values. This is achieved using specialized neural activation functions and computational patterns that allow proven truth bounds to propagate from every input of the formula to every other input, where they are aggregated and used again for recursive computation. With sufficiently penalized constraints, the trained LNN model is guaranteed to converge to classical inference behavior. Under looser constraints, it is able to handle incomplete formulas, minor contradictions, and other sources of uncertainty in the ground truth.

[0455] In this embodiment, local memoronyms (e.g., isPartOf) between entity types can be used to link paths between query triples and extended entities. Such query expansion allows for a greater chance of obtaining negative answers to Boolean questions. Open-world LNNs can continue reasoning after an initial empty result by binding support axioms, for example, to check whether the obtained entity is part of the entity provided by the query.

[0456] refer to Figure 8 Given the false ASK question “Was Natalie Portman born in the United States?”, knowledge base lookup (fact request) 832 finds the following predicates (facts) 834: “bornIn(Natalie Portman,Jerusalem)”, “type(USA,Country)”, and “type(Israel,Country)”. Given Jerusalem as the place of birth, the United States as the place of birth remains unknown. A forward link with predicates of the same type as dbo:isPartOf then leads to the conclusion via the whole word relation that Jerusalem is part of Israel (“isPartOf(Jerusalem,Israel)”). Israel is a more suitable entity to answer query 880 because it has the same specialized ontology type as the United States, namely dbo:Country. Multi-directional recursive deduction then proves, via the inclusion axiom (effectively: different countries cannot contain each other), that the obtained extended place of birth (Israel) is not part of the queried object (the United States).

[0457] Figure 9 The LNN graph 900 depicts the implementation of the query based on the example DTQA system query.

[0458] Given the natural language question "Give me all actors starring in movies directed by and starring William Shatner", after AMR parsing and applying entity and relation extraction and linking logic, the following corresponding JavaScript Object Notation (JSON) code is generated:

[0459]

[0460]

[0461] Generate the following Python code to represent the logical statements used for mapping to an LNN:

[0462] Exists(And(And(('dbo:director',x,(y,'dbr:William_Shatner')),

[0463] ('dbo:starring',x,(y,'dbr:William_Shatner')),lnn=lnn),

[0464] Or(('dbo:starring',x,z)('dbp:starring',x,z),lnn=lnn)),dim=z).

[0465] like Figure 9 As shown, the resulting LNN graph 900 is a syntax tree mapping corresponding to these LNN Python inference statements. LNN 900 provides existence quantization. As the response output 950, it provides the movie actors "z" who appear in the movie "x" which has "William Shatner" as director "y" and "William Shatner" as actor. LNN900 includes logical nodes and connection edges, where node 920 is a first conjunction node and node 930 is a union (disjunction) node. Both nodes operate on predicate facts (grounded), and nodes 920 and 930 have the output fed to a second conjunction node 940, which provides the response output. 950.

[0466] To obtain global grounding, a fact request is generated as a global SPARQL statement based on the following logic:

[0467] SELECT DISTINCT*WHERE{VALUES? y dbr:William_Shatner}{{{{? x dbo:director? y}{? x dbo:starring? y}}.{{? x dbo:starring? z}UNION{? x dbp:starring? z}}}}}

[0468] When accessing DBPedia, given global ground 910 "y" = dbr:William_Shatner, the ontology relation provides the responding entity film directed by William_Shatner, which is global ground "x" = dbr:Groom_Lake_(film)". Then, in a granular sense, the following SPARQL statement obtains the predicate ground of "dbo:director" 901:

[0469] SELECT DISTINCT*WHERE{VALUES? x{dbr:Groom_Lake_(film)}VALUES? y

[0470] {dbr:William_Shatner}{? x dbo:director? y}}

[0471] Then, the following SPARQL statement obtains a predicate ground of "dbo:starring" 904: SELECT DISTINCT * WHERE {VALUES? x{dbr:Groom_Lake_(film)}VALUES? z

[0472] {dbr:William_Shatner dbr:Dan_Gauthier dbr:Tom_Towles…}{? x dbo:starring? z}}

[0473] Then, the following SPARQL statement obtains the predicate ground for "dbp:starring" 906: SELECT DISTINCT *WHERE {VALUES? x{dbr:Groom_Lake_(film)}VALUES? z

[0474] {dbr:William_Shatner dbr:Dan_Gauthier dbr:Tom_Towles…}{? x dbp:starring? z}}

[0475] And obtain the corresponding predicate grounding for representative actors “z” = dbr:William_Shatner, dbr:Dan_Gauthier and dbr:Tom_Towles, etc.

[0476] Then, forward inference propagation is performed to evaluate the logic at the nodes in the LNN graph 900 in the following order: 901, 904, 906, 920, 930, 940, 950. From the sub-grounds at the dbo:director node 901 and the dbo:starring node 904, the corresponding (x,y) values ​​902 (x = dbr:Groom_Lake_(film), y = dbr:William_Shatner) and 903 (x = dbr:Groom_Lake_(film), y = dbr:William_Shatner) are obtained, where all operators have as The upper and lower bounds. For forward inference, at conjunctive node 920, the method performs set operations, including deriving the upper and lower bounds of the set. The intersection of the upper and lower bounds (for conjunction logic).

[0477] Given conjunctive (forward inference) computation:

[0478] L A&B =L A &L B

[0479] U A&B =U A &U B

[0480] The inference equation of the logistic neural network is expressed by the formula at conjunctive node 920:

[0481] U & =f(tw A (1-U A )-w A (1-U B ))

[0482] L & =f(tw A (1-L A )-w B (1-L B ))

[0483] Therefore, the truth bound 923 at the conjunction node 920 of the LNN graph 900 is updated as follows:

[0484]

[0485] Evidence of aggregation indicators: 1) a higher lower limit; 2) a lower upper limit; and 3) monotonically tightening.

[0486] Continuing to the next disjunctive node in the forward inference pass order, from the sub-grounds at dbo:starring node 904 and dbp:starring node 906, the corresponding (x,z) values ​​905 (x = dbr:Groom_Lake_(film), z = dbr:William_Shatner) and 907 (x = dbr:Groom_Lake_(film), z = dbr:Dan_Gauthier dbr:Tom_Towles…) are obtained, where all operators have as… The upper and lower bounds. For forward inference, at disjunctive node 930, the method performs set operations, including deriving the upper and lower bounds of the set. The union of the upper and lower bounds (for disjunctive logic).

[0487] Given disjunctive (forward inference) computation:

[0488]

[0489] Evaluate the logistic neural network inference equation at disjunction node 930:

[0490]

[0491] Therefore, the truth bound 933 at the conjunctive node 930 of the LNN graph 900 is updated according to the following formula:

[0492]

[0493] Evidence of aggregation indicators: 1) a higher lower limit; 2) a lower upper limit; and 3) monotonically tightening.

[0494] Then, backward inference is performed to evaluate the logic at the nodes in the LNN graph 900 in the following order: 950, 940, 920, 930, 901, 904, 906.

[0495] The self-ground at conjunction node 920 includes x = dbr:Groom_Lake_(film), y = dbr:William_Shatner), and all operators have as The upper and lower bounds. Backward inference calculation given the conjunction:

[0496] A→(B→(A&B))

[0497] L A =U B →L A&B

[0498] U A =L B →U A$B

[0499] The backward inference equation of the logistic neural network is evaluated at node 901 of dbo:director according to the following formula:

[0500] U A =f(1-t+w) B (1-L B )+w & U & )

[0501] L A =f(1-t+w) B (1-U B )+w & L & )

[0502] The upper and lower limits are evaluated as follows:

[0503] Therefore, the backward inference of the logistic neural network at node 904 of dbo:starring (i.e., x = dbr:Groom_Lake_(film), y = dbr:William_Shatner) is also evaluated as

[0504] For proving aggregation, the truth bounds 923 at the conjunctive node 920, sub-ground node 901 (dbo:director), and sub-ground node 904 (dbo:starring) of the LNN graph 900 are updated according to the following:

[0505]

[0506] like Figure 9 As shown, Figure 9 The value in As shown in 929.

[0507] The evidence indicates the following: 1) a higher lower limit; 2) a lower upper limit; and 3) monotonic tightening.

[0508] The self-grounding at node 904 of dbo:starring includes x=dbr:Groom_Lake_(film),y=dbr:William_Shatner), and has the function of... The upper and lower bounds. Backward inference calculation given the conjunction:

[0509] B→(A→(A&B)

[0510] L B =U A →L A&B

[0511] U B =L A →U A&B

[0512] The backward inference of the logistic neural network at node 904 of dbo:starring is evaluated according to the following formula:

[0513] U B =f(1-t+w) A (1-L A )+w & U & )

[0514] L B =f(1-t+w) A (1-U A )+w & L& )

[0515] The upper and lower bounds at node 904 of dbo:starring are evaluated as follows:

[0516] For proving aggregation, the truth bound 929 at node 904 of dbo:starring is evaluated according to the following formula:

[0517]

[0518] The evidence indicates the following: 1) a higher lower limit; 2) a lower upper limit; and 3) monotonic tightening.

[0519] Continuing to the next disjunction node 930 in the backward inference pass ordering, the sub-grounds at the disjunction node include the predicates at the dbo:starring node 904 and the dbp:starring node 906, which are the corresponding (x,z) values ​​905 (x = dbr:Groom_Lake_(film), z = dbr:William_Shatner) and (x,z) values ​​907 (x = dbr:Groom_Lake_(film), z = dbr:Dan_Gauthier dbr:Tom_Towles…), where all operators have as… The upper and lower limits.

[0520] Backpropagation computation given disjunction:

[0521]

[0522] Evaluate the logistic neural network inference equation at node 904 of dbo:starring:

[0523] U A =f(tw B L B -w & (1-U & ))

[0524] L A =f(tw B U B +w & (1-L & ))

[0525] The upper and lower bounds at node 904 of dbo:starring are evaluated as follows:

[0526] Given the previous calculations from conjunctive node 920, the bounds of dbo:starring node 904 at disjunctive node are calculated as follows: The grounding at node 906 of dbp:starring is

[0527] Therefore, the truth bound at node 904 of dbo:starring in LNN graph 900 is updated according to the following formula:

[0528]

[0529] Next, given the disjunction, the backward inference is computed:

[0530]

[0531] The logistic neural network inference equation is evaluated at node 906 of dbp:starring according to the following formula:

[0532] U B =f(tw A L A -w & (1-U & ))

[0533] L B =f(tw A U A +w & (1-L & ))

[0534] Among them, the upper and lower bounds at node 906 of dbp:starring are evaluated as follows: Its update is For proving aggregation, the truth bound at node 904 of dbo:starring is evaluated according to the following formula:

[0535]

[0536] The evidence indicates the following: 1) a higher lower limit; 2) a lower upper limit; and 3) monotonic tightening.

[0537] Figure 10 A schematic diagram of an example computer or processing system that can implement one embodiment of the system is shown. The computer system is merely one example of a suitable processing system and is not intended to impose any limitation on the scope of use or functionality of the embodiments of the methods described herein. The processing system shown can operate with many other general-purpose or special-purpose computing system environments or configurations. It can be adapted to use with... Figure 10Examples of well-known computing systems, environments, and / or configurations used in conjunction with the processing systems shown may include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of the above systems or devices.

[0538] A computer system can be described within the general context of computer system executable instructions (such as program modules) executed by the computer system. Generally, program modules can include routines, programs, objects, components, logic, data structures, etc., that perform specific tasks or implement specific abstract data types. Computer systems can be implemented in distributed cloud computing environments, where tasks are performed by remote processing devices linked via communication networks. In distributed cloud computing environments, program modules can reside on local and remote computer system storage media, including memory storage devices.

[0539] The components of the computer system may include, but are not limited to, one or more processors or processing units 12, system memory 16, and a bus 14 that couples the various system components, including system memory 16, to processor 12. Processor 12 may include modules 30 that perform the methods described herein. Modules 30 may be programmed into an integrated circuit of processor 12, or loaded from memory 16, storage device 18, or network 24, or a combination thereof.

[0540] Bus 14 can represent one or more of several types of bus architectures, including memory buses or memory controllers, peripheral buses, accelerated graphics ports, and processor or local buses using any of the various bus architectures. By way of example and not limitation, such architectures include Industry Standard Architecture (ISA) buses, Micro Channel Architecture (MCA) buses, Enhanced ISA (EISA) buses, Video Electronics Standards Association (VESA) local buses, and Peripheral Component Interconnect (PCI) buses.

[0541] Computer systems may include a variety of computer system-readable media. Such media can be any available media that can be accessed by a computer system, and can include volatile and non-volatile media, removable and non-removable media.

[0542] System memory 16 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory or others. The computer system may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 18 may be provided for reading from and writing to non-removable, non-volatile magnetic media (e.g., a "hard disk drive"). Although not shown, disk drives for reading from or writing to removable non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable non-volatile optical disks (such as CD-ROMs, DVD-ROMs, or other optical media) may be provided. In such cases, each may be connected to bus 14 via one or more data media interfaces.

[0543] The computer system may also communicate with one or more external devices 26 (e.g., keyboard, pointing device, display 28, etc.); one or more devices that enable a user to interact with the computer system; and / or any device that enables the computer system to communicate with one or more other computing devices (e.g., network interface card, modem, etc.). Such communication may occur via input / output (I / O) interface 20.

[0544] Furthermore, the computer system can communicate with one or more networks 24 (such as a local area network (LAN), a general wide area network (WAN), and / or a public network (e.g., the Internet)) via network adapter 22. As shown, network adapter 22 communicates with other components of the computer system via bus 14. It should be understood that, although not shown, other hardware and / or software components may be used in conjunction with the computer system. Examples include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archiving storage systems.

[0545] This invention can be a system, method, and / or computer program product with any possible level of technical detail integration. The computer program product may include a computer-readable storage medium having computer-readable program instructions thereon for causing a processor to execute aspects of the invention.

[0546] Computer-readable storage media can be a tangible means for retaining and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital universal disk (DVD), memory sticks, floppy disks, mechanical encoding devices such as punch cards or protrusions in slots having instructions recorded thereon, and any suitable combination of the foregoing. As used herein, computer-readable storage media should not be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses passing through fiber optic cables), or electrical signals transmitted through wires.

[0547] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to a suitable computing / processing device via a network (e.g., the Internet, a local area network, a wide area network, and / or a wireless network), or to an external computer or external storage device. The network may include copper cables, optical fibers, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to a computer-readable storage medium within the suitable computing / processing device.

[0548] Computer-readable program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​(such as Smalltalk, C++, etc.) and procedural programming languages ​​(such as the "C" programming language or similar programming languages). The computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as a standalone software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN)) or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs) may execute computer-readable program instructions by utilizing state information from the computer-readable program instructions to personalize the electronic circuitry in order to perform aspects of this invention.

[0549] The present invention will now be described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0550] These computer-readable program instructions may be provided to a processor of a computer or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / actions specified in one or more blocks of a flowchart and / or block diagram. These computer-readable program instructions may also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner, such that the computer-readable storage medium storing the instructions includes an article of manufacture containing instructions that implement aspects of the functions / actions specified in one or more blocks of a flowchart and / or block diagram.

[0551] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus, or other device to produce computer-implemented processing, such that the instructions executed on the computer, other programmable apparatus, or other device perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0552] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, segment, or portion of instructions, including one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the figures. For example, two blocks shown consecutively may actually be completed as a single step, executed simultaneously, substantially simultaneously, or with partial or complete temporal overlap, or the blocks may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action or executes a combination of dedicated hardware and computer instructions.

[0553] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context explicitly indicates otherwise. As used herein, the term “or” is an inclusive operator and may mean “and / or”, unless the context explicitly or explicitly indicates otherwise. It should also be understood that, when used herein, the terms “comprising,” “including,” “containing,” and / or “having” may specify the presence of said features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or combinations thereof. As used herein, the phrase “in an embodiment” does not necessarily refer to the same embodiment, although it may refer to the same embodiment. As used herein, the phrase “in one embodiment” does not necessarily refer to the same embodiment, although it may refer to the same embodiment. As used herein, the phrase “in another embodiment” does not necessarily refer to a different embodiment, although it may refer to a different embodiment. Furthermore, embodiments and / or components of embodiments can be freely combined with each other unless they are mutually exclusive.

[0554] All the means or steps plus functional elements (if any) in the following claims are intended to include any structure, material, action, and equivalent for performing the function in combination with other claimed elements as specifically claimed. The description of the invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the forms disclosed. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the invention. Embodiments were chosen and described in order to best explain the principles and practical application of the invention, and to enable others skilled in the art to understand various embodiments of the invention with various modifications suitable for the intended particular use.

Claims

1. A computer-implemented method, comprising: Receive input queries and input propositions for inferring logical truth values ​​based on the input queries at one or more hardware processors; According to a logical formula system corresponding to the inference rules, one or more hardware processors are used to configure a logical neural network structure, the logical neural network structure including one or more propositional neurons representing the input proposition and one or more neurons representing logical connections, the one or more propositional neurons representing input predicates, the input predicates being extracted from images or text; The one or more hardware processors are used to configure corresponding activation functions at each logical connection neuron for calculating the truth value of the logical connection in the logical formula; The logical neural network structure is used to evaluate logical inferences based on the input query; as well as In response to the evaluation, output the truth value of the logical inference that proves or fails to prove it within the aggregation bound.

2. The computer-implemented method according to claim 1, wherein the logical formula system for the logical neural network is obtained from an ontology knowledge base, and configuring the logical neural network includes: Neural inputs and parameters are selected for the one or more propositional and logical connection neurons to match the syntax and behavior of the connections constituting the logical formula system from the knowledge base, and initial bounds are selected to match the formulas and propositional truth values ​​of the input facts.

3. The computer-implemented method according to claim 1, wherein the evaluation logic inference includes: The one or more hardware processors are used to perform forward inference passes to evaluate the expressions of the logical neural network structure using activation functions to compute the truth value at each neuron, the truth value indicating the upper and lower bounds of the formulas or subforms of the logical formula system.

4. The computer-implemented method according to claim 3, wherein the evaluation logic inference includes: The one or more hardware processors are used to perform backward or downward inference passes to evaluate inverse inference rules during the backward or downward inference passes; as well as During the backward inference propagation, the truth values ​​are aggregated at propositional neurons and logical connection neurons.

5. The computer-implemented method of claim 4, wherein the evaluation inverse inference rule during the backward or downward inference path comprises: The inverse activation function is computed at the logical connection neuron to update the truth value and aggregate the truth value obtained in the downward inference pass.

6. The computer-implemented method of claim 5, wherein the logical neural network structure is configured as a syntax tree, and the backward or downward inference propagation is performed using a recursive depth-first traversal of the syntax tree performed from one or more root nodes to each of the leaves of the root.

7. The computer-implemented method of claim 4, wherein aggregating the truth values ​​at the propositional neuron and the logical connection neuron comprises: The tightest upper and lower bounds are obtained by taking the maximum lower bound and minimum upper bound of the obtained truth values.

8. The computer-implemented method of claim 4, wherein the input predicate comprises an n-dimensional table or tensor representation, where n is a non-negative number, the method further comprising: Provide a truth bound table for neurons, which is uniquely keyed by a set of columns related to unbounded logical variables that appear in the corresponding subforms or predicates; as well as Modify the neural activation function to perform joins on columns related to shared variables, while simultaneously calculating truth bounds at associated rows.

9. The computer-implemented method of claim 8, wherein the evaluation logic deduction to obtain the truth value comprises: The connection between the output of the executing neuron and a table representation of known limits of the other inputs of the neuron. Calculate the truth bounds at the associated rows of the tensor representation; and Reduce any columns related to logical variables that do not exist in the corresponding sub-formula of the target input in order to gather the tightest such boundaries.

10. The computer-implemented method according to claim 1, further comprising: Initialize the parameters of the corresponding activation function for each neuron to weight the importance of the neuron's input, output, or both.

11. The computer-implemented method of claim 1, wherein the logical connection is configured according to a weighted Lukasiewicz logical scheme.

12. A computer-implemented system, comprising: One or more hardware processors are configured as a logical neural network structure with multiple neurons and connections, wherein the neurons and connections of the logical neural network structure correspond one-to-one with a logical formula system and run a method for performing logical inference. The one or more hardware processors configure the logical neural network with multiple predicate neurons, which represent predicates extracted from images or text, wherein: For each formula or sub-formula in the logical formula system, there exists one neuron among the plurality of neurons for a corresponding logical connection. This neuron has one or more connecting edges that provide input information including operands of the logical connection and information including parameters configured to implement a truth function for the logical connection. For each neuron of a corresponding logical connection, there is a corresponding activation function for providing computation. The activation function computes and returns a pair of values ​​indicating the upper and lower limits of the formula or sub-formula of the logical formula system, or returns the truth value of a proposition. For the formula or sub-formula of the logical formula system, there exists one neuron among the plurality of neurons for the corresponding proposition, and the neuron has one or more connecting edges corresponding to the formula, the one or more connecting edges providing information on the bounds proving the truth value of the corresponding proposition and also including information on parameters configured to cluster the most tightly bounds; and The one or more hardware processors are configured to: Receive input queries or logical deductions; The logical neural network structure is used to evaluate logical inference based on the input query or logical inference; and In response to the evaluation, the output truth value is determined within the tightest bound of the aggregation, proving or not proving the logical inference.

13. The computer-implemented system according to claim 12, further comprising: A logic knowledge base, comprising a collection of lexical information organized according to logical formulas or sub-formulas, wherein one or more hardware processors are further configured to: Each of the plurality of neurons is initialized using information based on logical formulas from the logical knowledge base, the initialization further comprising: Selecting input information and parameters from the logical knowledge base to match the syntax and behavior of the connections that make up the formula system; and Choose initial bounds for formulas and propositional truth values ​​to match facts from the knowledge base.

14. The computer-implemented system of claim 12, wherein the one or more hardware processors are further configured to: Based on the available observation initialization formulas and the bounds of propositional truth values, the evaluation of the neural network is output as computed truth bounds at specific neurons.

15. The computer-implemented system of claim 12, wherein the one or more hardware processors are further configured to: Additional neurons corresponding to the specified query formula are inserted into the logical neural network, such that the evaluation of the neural network is output as computed truth bounds at the neurons associated with the query formula.

16. The computer-implemented system of claim 12, wherein the one or more hardware processors are further configured to: One or more of the following: inferring upper and lower bounds for each input of a neuron, or inferring upper and lower bounds for each operand of a neuron with logical connections, the inference being based on the inverse function of the neuron's activation function relative to the inputs and known bounds of the neuron's outputs and other inputs of the neuron.

17. The computer-implemented system of claim 12, wherein the one or more hardware processors are further configured to: The logical neural network is trained using training data; and Extracting rules, new rules derived from observations from a trained logical neural network, or both rules and new rules corresponding to formulas, to complete the logical knowledge base used to initialize the neural network, or to discover new knowledge.

18. The computer-implemented system of claim 16, wherein the one or more hardware processors are further configured to: Each occurrence of each proposition in each formula or subform is used as a proof of the bounds of said proposition; and The computation is performed to recursively or dynamically evaluate the logical neural network, wherein the output of the formula or sub-formula and the bounds of each of its other inputs are first computed.

19. The computer-implemented system of claim 16, wherein each predicate neuron has an activation function, the plurality of predicate neurons being used to evaluate first-order logic, wherein each of the predicate neurons is configured to: Issue a truth bound table uniquely keyed by a set of columns related to the unbounded logical variables appearing in the corresponding formula, subformula, or predicate. Logical neural networks evaluate first-order logic by configuring one or more hardware processors to perform one or more connections at the activation function of the predicate neuron on a table column associated with a shared variable, while simultaneously computing truth bounds at the associated rows.

20. A computer program product comprising program instructions executable by one or more hardware processors running on a computer system to cause the one or more processors to perform a method comprising: One or more hardware processors are configured as a logical neural network structure with multiple neurons and connections, wherein each neuron and connection corresponds one-to-one with a logical formula system configured to perform logical inference. The one or more hardware processors configure the logical neural network with multiple predicate neurons, which represent predicates extracted from images or text, wherein: For each formula or sub-formula in the logical formula system, there exists one neuron among the plurality of neurons for a corresponding logical connection. This neuron has one or more connecting edges that provide input information including operands of the logical connection and information including parameters configured to implement a truth function for the logical connection. For each neuron of a corresponding logical connection, there is a corresponding activation function for providing computation. The activation function computes and returns a pair of values ​​indicating the upper and lower limits of the formula or sub-formula of the logical formula system, or returns the truth value of a proposition. For the formula or sub-formula of the logical formula system, there exists one neuron among the plurality of neurons for the corresponding proposition, and the neuron has one or more connecting edges corresponding to the formula, the one or more connecting edges providing information on the bounds proving the truth value of the corresponding proposition and also including information on parameters configured to cluster the most tightly bounds; the method further includes: Receive queries or logical inferences; Configure the logical neural network structure based on the query or logical inference; and Evaluate the logical neural network structure to return the output truth value of a proven or unproven proposition or logical inference within the tightest bound of aggregation.

21. The computer program product of claim 20, wherein the program instructions executable by one or more hardware processors further cause the one or more processors to perform a method comprising: Each of the plurality of neurons is initialized with information based on logical formulas from a logical knowledge base, the logical knowledge base comprising a set of lexical information organized according to logical formulas or sub-formulas, the initialization comprising: Selecting input information and parameters from the logical knowledge base to match the syntax and behavior of the connections that make up the formula system; and Choose initial bounds for the truth values ​​of formulas and propositions to match facts from the knowledge base.

22. The computer program product of claim 21, wherein the program instructions executable by one or more hardware processors further cause the one or more processors to perform a method comprising: The neural network initializes the bounds of formulas and propositional truth values ​​based on available observations, and the evaluation of the neural network outputs the results at specific neurons in the form of computed truth bounds.

23. The computer program product of claim 21, wherein the program instructions executable by one or more hardware processors further cause the one or more processors to perform a method, the method comprising: Additional neurons corresponding to the specified query formula are inserted into the logical neural network, and the evaluation of the neural network is output at the neurons related to the query formula in the form of calculated truth bounds.

24. The computer program product of claim 23, wherein the program instructions executable by one or more hardware processors further cause the one or more processors to perform a method comprising: Perform one or more of the following: infer the upper and lower bounds of each input to the neuron, or infer the upper and lower bounds of each operand of the neuron for which logical connections exist, said inference being based on the inverse function of the neuron's activation function with respect to the inputs and known bounds of the neuron's output and other inputs of the neuron.

Citation Information

Patent Citations

  • Intelligent engineering product designing method and device based on satisfiability solution

    CN107391864A

  • Accelerating machine learning inference with probabilistic predicates

    US20190378028A1