Device and computer-implemented method for providing, testing, verifying, or validating fact in database structure, for learning weight for providing, testing, verifying, or validating fact in database structure with linear regression, or providing database management system with the learned weight
By using linear regression methods to learn weights and using multiple symbolic rules to predict facts, the efficiency and accuracy of providing, testing, verifying or verifying facts in database structures in the prior art is solved, and more efficient and accurate database structure fact management is achieved.
Patent Information
- Application Number
- JP2024187646
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-25
- Filing Date
- 2024-10-24
- Publication Date
- 2025-05-12
AI Technical Summary
The prior art is difficult to effectively provide, test, verify or verify facts in database structures, especially in knowledge graphs, especially due to the lack of efficient symbolic rules and weight learning methods.
The linear regression method is used to learn weights, predict the facts in the database structure through multiple symbol rules, and calculate the scores using linear functions to determine whether the facts belong to the database structure.
Improves the efficiency and accuracy of providing, testing, verifying or verifying facts in database structures, and the learning dynamics through linear function scores are better than confidence correlations based on nonlinear functions.
Smart Images

Figure 2025073114000001_ABST
Abstract
Description
[Technical field]
[0001] background This specification relates to an apparatus and computer-implemented method for providing, testing, verifying or validating facts in a database structure, a computer-implemented method for learning weights for providing, testing, verifying or validating facts in a database structure using linear regression, and a computer-implemented method for providing the learned weights to a database management system. Summary of the Invention [Means for solving the problem]
[0002] Disclosure of the Invention A computer-implemented method for providing, testing, verifying or validating facts in a database structure, in particular a knowledge graph, stored in a database using linear regression, the database structure, in particular a knowledge graph, including entities and relationships, the facts including two entities and one relationship, the method comprising: providing a plurality of symbolic rules configured to predict a fact depending on one of the two entities and the relationship or depending on the two entities, the plurality of symbolic rules being associated with respective weights; determining a score for the fact depending on the weights using a linear function for determining the score depending on the weights, the score indicating whether the fact belongs to the database structure; and providing, testing, verifying or validating the fact in the database structure depending on the score. A score depending on a linear function of the weights has better learning dynamics than a score depending on a non-linear function of confidence associated with the symbolic rules.
[0003] The method may comprise determining scores for a plurality of facts for a database structure, in particular a knowledge graph, each of the plurality of facts comprising two entities and a relationship of the database structure, the plurality of facts comprising a fact, the method comprising selecting a fact from the plurality of facts in dependence on the scores determined for the plurality of facts, the score determined for the selected fact being indicative of a higher probability that the fact belongs in the database structure or a higher probability that the fact does not belong to the database structure than a score determined for at least one other fact of the plurality of facts, in particular indicating that the probability determined for the fact of the plurality of facts is the highest.
[0004] Providing a fact may include adding the fact to the database structure, in particular if the score determined for the fact indicates that the fact belongs in the database structure. Testing, verifying or validating a fact may include searching for the fact in the database structure and, if found in the database structure, accepting the fact in the database structure, in particular if the score determined for the fact indicates that the fact belongs in the database structure, or invalidating or deleting the fact in the database structure from the database structure, in particular if the score determined for the fact indicates that the fact does not belong in the database structure.
[0005] A computer-implemented method for learning weights for providing, testing, verifying or validating facts in a database structure, particularly a knowledge graph, using linear regression, the database structure, particularly a knowledge graph, including entities and relationships, the facts including two entities and one relationship, the method including: providing a plurality of symbolic rules configured to predict a fact depending on one of the two entities and the relationship or depending on the two entities, the plurality of symbolic rules being associated with respective weights; and learning the weights depending on a loss, the loss including a linear function for determining a score depending on the weights, the score indicating whether the fact belongs to the database structure. The weights are learned directly using linear regression with a simple linear scoring function.
[0006] The method for learning may include providing a plurality of symbolic rules configured to map an entity and a relationship of a database structure to an entity of the database structure or to map two entities of the database structure to a relationship of the database structure, the symbolic rules of the plurality of symbolic rules being associated with respective weights; determining a selected symbolic rule that predicts a fact from the plurality of symbolic rules; and learning a weight associated with the selected symbolic rule in dependence on a loss, the function of the loss being dependent on the respective weight associated with the selected symbolic rule. The selected symbolic rule actually predicts the fact. The rule set including the plurality of symbolic rules is improved in dependence on the weight of the rule that actually predicts the fact. The symbolic rules that do not predict the fact are ignored.
[0007] The method for learning may include providing a criterion for at least one function in a loss, the criterion indicating whether a fact belongs to a database structure, and the loss being dependent on the criterion for the at least one function. The criterion provides supervised learning.
[0008] The loss may comprise a respective function for the multiple facts, or the method may comprise providing a measure for the multiple facts, the loss comprising a respective function for the multiple facts and dependent on the measure for the multiple facts.
[0009] A computer implemented method for providing a database management system for managing a database structure, the method for providing a database management system comprising: learning weights for providing, testing, verifying or validating facts in the database structure, in particular in a knowledge graph, using a method for learning weights for providing, testing, verifying or validating facts in the database structure, and providing in the database management system means for providing, testing, verifying or validating facts in the database structure using the learned weights and the method for providing, testing, verifying or validating facts in the database structure.
[0010] The apparatus comprises at least one processor and at least one memory, the at least one processor configured to execute instructions that, when executed by the at least one processor, cause the apparatus to perform a method for providing, testing, verifying or validating facts in a database structure, a method for learning weights for providing, testing, verifying or validating facts in a database structure, and / or a method for providing a database management system for managing a database structure, and the at least one memory storing instructions.
[0011] A database structure, particularly a knowledge graph, stored in a database includes entities and relationships and facts, where one fact includes two entities and one relationship, the database structure includes a number of symbolic rules configured to predict a fact depending on one of the two entities and the relationship or depending on the two entities, the database structure includes weights, where the number of symbolic rules is associated with respective weights, the database structure includes a loss for learning the weights, where the loss includes a linear function for determining a score depending on the weights, where the score indicates whether the fact belongs to the database structure.
[0012] A computer program includes computer readable instructions that, when executed by a computer, cause the computer to perform a method for providing, testing, verifying or validating facts in a database structure, a method for learning, and / or a method for providing a database management system.
[0013] Further embodiments can be taken from the following description and drawings. [Brief description of the drawings]
[0014] [Figure 1] FIG. 1 shows a schematic diagram of an apparatus. [Diagram 2] FIG. 2 is a diagram showing a schematic diagram of a database structure. [Diagram 3] 1 is a flowchart including method steps for providing, testing, verifying or validating facts in a database structure. [Figure 4] 1 is a flowchart including method steps for learning weights for providing, testing, verifying or validating facts in a database structure. [Diagram 5] 1 is a flowchart including steps of a method for providing a database management system. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] FIG. 1 shows a schematic diagram of an apparatus 100 .
[0016] The apparatus 100 includes at least one processor 102 and at least one memory 104 .
[0017] At least one processor 102 is configured to execute instructions.
[0018] The instructions, when executed by at least one processor 102, may cause the apparatus 100 to perform a method for providing, testing, verifying or validating facts in a database structure.
[0019] The instructions, when executed by at least one processor 102, can cause the apparatus 100 to perform a method for learning weights for providing, testing, verifying or validating facts in a database structure.
[0020] The instructions, when executed by at least one processor 102, can cause the apparatus 100 to perform a method for providing a database management system.
[0021] At least one memory 104 stores instructions.
[0022] FIG. 2 shows a schematic diagram of an example 200 of a portion of a database structure.
[0023] The database structure in Example 200 has the signature<C,P> A knowledge graph G ⊂ {p(s,o)|p∈P,s,o∈C} is a set of ground atoms or facts defined on C, where C is a constant, i.e., a set of entities, P is a set of predicates, i.e., relations, and a fact t=p(s,o) contains two entities, i.e., subject s and object o, and one relation, i.e., predicate p.
[0024] The database structure, e.g., the knowledge graph, in this example is stored in a database. At least one memory 104 in this example includes a database.
[0025] FIG. 2 illustrates a schematic of an exemplary entity 202 and relationship 204, or database structure.
[0026] 2 illustrates exemplary relationships 204 labeled citizen, born, works, city, capital, and married, and exemplary entities 202 labeled monica, paul, sarah, tom, camilla, john, switzerland, germany, austria, usa, geneva, bern, vienna, chicago, and washington. works(monica,geneva), city(geneva,switzerland), citizen(paul,switzerland), Born (Paul, Switzerland), married(paul,sarah), citizen(sarah,switzerland), Born in Sarah, Switzerland, works(sarah,bern), city(bern,switzerland), capital (bern, switzerland), works(tom,bern), works(tom,vienna), born(tom,germany), married(tom,camilla), citizen (camilla,austria), Born (Camellia, Austria), capital (Vienna, Austria), works(camilla,vienna), works(camilla,chicago), works(john,chicago), citizen(john,usa), born(john,usa), city(chicago,usa), city(washington,usa), capital (washington, usa), works(john,washington) This shows that.
[0027] The database structure may be incomplete, e.g. the knowledge graph is incomplete. In Figure 2, the dashed edges represent the following examples of cases where facts are missing: citizen(tom,austria), citizen(tom,germany), city(vienna,austria) Corresponds to.
[0028] The problem of completing knowledge graphs involves defining an automated procedure for discovering missing facts solely by analyzing the statistical distributions and regularities of a given knowledge graph.
[0029] Missing facts can be found using a query that includes one entity and one relationship, or using a query that includes two entities. In the examples described herein, a query that includes one relationship and one entity is used to find missing facts. Correspondingly, a query that includes two entities may be used.
[0030] Missing facts are found using queries p(s,?) such as, for example, citizen(tom,?) and / or using queries p(?,o) such as citizen(?,Austria), where ? is a placeholder for the missing fact entity.
[0031] The model can be used to predict answers in the form of candidate facts p(s,o), e.g., citizen(tom,germany) or citizen(tom,switzerland), and the model can assign likelihood scores to these answers. A ranking of the candidate facts can be formed, and the highest ranked candidate fact can be used as the missing fact. The model predicts scores for ranking the candidate facts, e.g., the higher the score for a candidate fact, the more likely it is to be the missing fact.
[0032] Candidate facts can be discovered based on symbolic rules R. Symbolic rules R are configured to predict candidate facts t depending on two entities 202.
[0033] A symbolic rule r∈R in this example is configured to map a first entity 202 and a relationship 204 of a database structure to a second entity 202 of the database structure. According to this example, the symbolic rule r includes a condition that maps the first entity 202 and the relationship 204 to the second entity 202 if the first entity 202, the second entity 202 and the relationship 204 satisfy the condition.
[0034] A symbolic rule r may be configured to map two entities 202 of the database structure to a relationship 202 of the database structure. A symbolic rule r may be configured to map multiple entities 202 and / or multiple relationships 204 to one entity 202. A symbolic rule r may include a condition that maps a first entity 202 and a second entity 202 to a relationship 204 if the first entity 202, the second entity 202, and the relationship 204 satisfy the condition.
[0035] The rules may be determined depending on the database structure, for example, a knowledge graph. An example of determining the rules is disclosed in "Christian Meilicke, Melisachew Wudage Chekol, Daniel Ruffinelli, and Heiner Stuckenschmidt, "Anytime bottom-up rule learning for knowledge graph completion", In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, pp. 3137-3143, Ijcai.org, 2019 (AnyBURL)". An example of determining the rules is disclosed in "Luis Galarraga, Christina Teflioudi, Katja Hose, and Fabian M Suchanek, "Fast rule mining in ontological knowledge bases with AMIE+", The VLDB Journal, 24(6):707-730, 2015 (AMIE)".
[0036] According to an example, there are four rules r1, r2, r3, and r4, namely: r1: a(X,Y)←b(X,Y) r2: a(X,Y)←c(X,A),d(A,Y) r3: a(X,Y)←c(X,A),e(A,Y) r4: a(X,Y)←f(X,A),a(A,Y) is defined, where a, b, c, d, e, and f are relations 204, and X, Y, and A are variables representing entities 202. i A rule r includes a head to the left of the ← and includes predicted facts t, which may include, for example, a first entity 202, a second entity 202, and a relationship 204. i contains a tail to the right of the ←. imaps the tail to the head such that if an entity 202 is found for a variable, the relationship in the tail will exist in the database structure.
[0037] An example of the four rules r1, , r4 for example 200 is: r1: citizen(X,Y)←born(X,Y) r2:citizen(X,Y)←works(X,A),city(A,Y) r3:citizen(X,Y)←works(X,A),capital(A,Y) r4:citizen(X,Y)←married(X,A),citizen(A,Y) where a=citizen, b=born, c=works, d=city, e=capital and f=married.
[0038] Rule r i is the rule for each i Fact t predicted by ∈R i Each confidence level c indicates whether it belongs to the database structure. i According to one example, the confidence level c i ∈[0,1] is used. Confidence c i may be defined based on a set of values other than [0,1]. i is the rule for each i Each score s indicates whether the fact predicted by belongs to the database structure. i Each fact t i Score for s i , rule r j ∈R's confidence level c j It can be determined depending on.
[0039] According to one example, rule r j Confidence in c j Let, be the training data.
number
[0040] According to this example, each fact t i Score for s i is the reliability of each j It depends on
number
number
[0041] This means that x ij c j But z=x ij c j and using a monotonically increasing function −log(−z+1) for z<1.
[0042] According to this example, the reliability c j Instead of learning weights
number
number
[0043] loss
number
number
number
number
number
[0044] loss
number
number
[0045] The loss in this example is given by the parameter
number
[0046] A model can be, for example,
number
[0047] FIG. 3 illustrates a method for providing, testing, verifying or validating a fact t within a database structure, and in particular within a knowledge graph.
[0048] The method includes step 302.
[0049] Step 302 is to find the facts {t1, . . . , t N The method includes providing a symbolic rule R for predicting {}. The symbolic rule R is determined, for example, based on a database structure, for example based on a knowledge graph, using AnyBURL or AMIE.
[0050] Each symbolic rule r i ∈R is a set of facts t∈{t1, ,t N Each symbolic rule r i ∈R is the weight of each
number
[0051] The method includes step 304.
[0052] Step 304 is to calculate each symbolic rule r i ∈R to find multiple facts {t1, ,t N} and for each fact t i For each score s i This includes determining:
[0053] Fact i Score for s i For example, the fact t i The rule that predictedj Weight of
number
number
[0054] Weights in this example
number
number
number
[0055] Score i is a fact i Indicates whether the object belongs to a database structure.
[0056] The method includes step 306 .
[0057] Step 306 involves determining whether a fact t in the database structure is based on the score. i This includes providing, testing, verifying or validating
[0058] Facti Providing a score for a fact t from multiple facts depends on the scores determined for the multiple facts. i The method may include selecting:
[0059] Fact i Providing the fact t with the highest score i The fact t may include selecting i Providing a fact t having a higher score than other facts in the plurality of facts i The fact t may include selecting i Providing the fact may include selecting a fact having a highest score or a fact having a higher score than other facts of the plurality of facts.
[0060] In this example, the score determined for the selected fact indicates a higher probability that the fact belongs within the database structure than the score determined for at least one other fact of the plurality of facts.
[0061] Providing a fact may include adding the fact to the database structure, particularly if the score determined for the fact indicates that the fact belongs therein. According to this example, the fact or facts associated with the highest score or with a higher score than other facts are added.
[0062] This example is not limited to the case where a higher probability indicates that a fact belongs to the database structure. According to one example, a higher probability may indicate that a fact does not belong to the database structure. Accordingly, one or more facts associated with the lowest score or a score lower than other facts may be added.
[0063] Testing, verifying or validating a fact may include searching for the fact in the database structure and, if found in the database structure, approving the fact in the database structure, particularly if the score determined for the fact indicates that the fact belongs to the database structure, or invalidating or deleting the fact in the database structure from the database structure, particularly if the score determined for the fact indicates that the fact does not belong to the database structure.
[0064] FIG. 4 shows weights for providing, testing, verifying or validating facts in a database structure.
number
[0065] The method includes step 402.
[0066] Step 402 involves providing a symbolic rule R.
[0067] The symbolic rules R are provided, for example, as described in step 302. The symbolic rules R are each associated with a confidence level c i Each weight that parameterizes
number
[0068] Step 402 is to calculate the score s i For each criterion y i This includes providing
[0069] Standard y i is a fact i For the fact t iIndicates whether the object belongs to a database structure.
[0070] For example, training data D is provided.
[0071] Standard y i For example, in the training data D, fact t i If y is found, i = 1, otherwise y i =0.
[0072] The method includes step 404 .
[0073] Step 404 selects a symbolic rule r that predicts a fact from the plurality of symbolic rules. j This includes determining:
[0074] The symbolic rule chosen is, for example, the binary vector x i =(x i1 ,···,x ij ,···,x iK ), where rule r j is a fact i If you predict x ij = 1, otherwise x ij =0.
[0075] The method includes step 406 .
[0076] Step 406 is the loss
number
[0077] Step 406 is the loss
number
number
[0078] The loss is the function of the selected symbolic rule r j The loss depends on the respective function associated with the selected symbolic rule r j Each weight associated with
number
[0079] Learning can be achieved by, for example,
number
number
number
[0080] FIG. 5 illustrates generally a method for providing a database management system for managing a database structure.
[0081] The method for providing a database management system includes step 502 .
[0082] Step 502 specifically involves the weight
number
number
[0083] The method for providing a database management system includes step 504 .
[0084] Step 504 is to calculate the learned weights.
number
[0085] Step 504 includes providing to the data management system a means for providing, testing, verifying or validating facts in the database structure using a method for providing, testing, verifying or validating facts in the database structure.
[0086] The means for providing, testing, verifying or validating facts in a database structure may comprise at least one processor 102 and at least one memory 104 .
Claims
1. 1. A computer implemented method for providing, testing, verifying or validating facts in a database structure, particularly in a knowledge graph, stored in a database using linear regression, comprising: said database structure, in particular said knowledge graph, comprises entities and relationships; The fact includes two entities and a relationship, The method comprises: providing (302) a plurality of symbolic rules configured to predict the fact depending on one of the two entities and the relationship or depending on the two entities, the plurality of symbolic rules being associated with respective weights; determining (304) a score for the fact depending on the weights using a linear function for determining a score depending on the weights, the score indicating whether the fact belongs to the database structure; providing, testing, verifying or validating (306) said facts in said database structure depending on said scores; The method of claim 1, further comprising:
2. The method is characterized in that it determines (304) a score for a number of facts about the database structure, in particular about the knowledge graph, each of the facts of the plurality of facts includes two entities and one relationship of the database structure; the plurality of facts includes the facts; The method includes selecting (306) the fact from the plurality of facts in dependence on the scores determined for the plurality of facts; the score determined for the selected fact indicates a higher probability that the fact belongs in the database structure or indicates a higher probability that the fact does not belong in the database structure than a score determined for at least one other fact of the plurality of facts, in particular indicating a highest probability that the fact of the plurality of facts does. The method of claim 1.
3. Providing (306) the fact includes, inter alia, adding the fact to the database structure if the score determined for the fact indicates that the fact belongs within the database structure; Or, Testing, verifying or validating (306) the facts may include: searching for said fact in said database structure; if said fact is found, accepting said fact in said database structure, in particular if said score determined for said fact indicates that said fact belongs to said database structure, or invalidating said fact in said database structure or deleting said fact from said database structure, in particular if said score determined for said fact indicates that said fact does not belong to said database structure; Including, 3. The method according to claim 1 or 2.
4. 1. A computer-implemented method for learning weights for providing, testing, verifying or validating facts in a database structure, particularly in a knowledge graph, using linear regression, comprising: said database structure, in particular said knowledge graph, comprises entities and relationships; The fact includes two entities and a relationship, The method comprises: providing (404) a plurality of symbolic rules configured to predict the fact depending on one of the two entities and the relationship or depending on the two entities, the plurality of symbolic rules being associated with respective weights (404); Learning the weights as a function of a loss (406), the loss including a linear function for determining a score as a function of the weights, the score indicating whether the fact belongs to the database structure (406); The method of claim 1, further comprising:
5. The method comprises: providing (402) a plurality of symbolic rules configured to map an entity and a relationship of the database structure to an entity of the database structure, or to map two entities of the database structure to a relationship of the database structure, each of the symbolic rules of the plurality of symbolic rules being associated with a respective weight; determining (404) a selected symbolic rule from the plurality of symbolic rules that predicts the fact; learning (406) the weights associated with the selected symbolic rules as a function of the losses, the function in the losses being dependent on the respective weights associated with the selected symbolic rules; Including, 5. The method according to claim 4 .
6. The method comprises: providing a criterion for at least one function in the loss (402), the criterion indicating whether the fact belongs to the database structure, the loss being dependent on the criterion for the at least one function (402); Including, 6. The method according to claim 4 or 5.
7. The loss includes respective functions for a number of facts, Or, The method comprises: providing a criterion for a plurality of facts, the loss including a respective function for the plurality of facts and depending on the criterion for the plurality of facts; Including, 7. The method according to claim 4, wherein the first and second electrodes are connected to a first electrode.
8. 1. A computer-implemented method for providing a database management system for managing a database structure, comprising: The method comprises: learning (502) weights for providing, testing, verifying or validating facts in a database structure, in particular in a knowledge graph, using a method for learning according to any one of claims 4 to 7; Providing (504) the learned weights to the database management system and a means for providing, testing, verifying or validating facts in a database structure using a method for providing, testing, verifying or validating facts in a database structure according to any one of claims 1 to 3; The method of claim 1, further comprising:
9. An apparatus (100), comprising: The device (100) comprises: At least one processor (102); At least one memory (104); Equipped with The at least one processor (102) is configured to execute instructions that, when executed by the at least one processor (102), cause the apparatus (100) to perform a method according to any one of claims 1 to 8; The at least one memory (104) stores the instructions.
1. An apparatus (100).
10. A database structure, in particular a knowledge graph, stored in a database, The database structure includes entities, relationships, and facts; A fact contains two entities and one relationship. the database structure includes a first symbolic rule configured to predict the fact depending on one of the two entities and the relationship or depending on the two entities; The database structure includes weights; the plurality of symbolic rules are associated with respective weights; the database structure includes losses for training the weights; The loss includes a linear function for determining a score depending on the weights, the score indicating whether the fact belongs to the database structure; 1. A database structure comprising:
11. A computer program comprising: The computer program comprises computer readable instructions which, when executed by a computer, cause the computer to carry out the method according to any one of claims 1 to 8. A computer program comprising: