CN108052683A - A kind of knowledge mapping based on cosine measurement rule represents learning method - Google Patents

A kind of knowledge mapping based on cosine measurement rule represents learning method Download PDF

Info

Publication number
CN108052683A
CN108052683A CN201810058745.1A CN201810058745A CN108052683A CN 108052683 A CN108052683 A CN 108052683A CN 201810058745 A CN201810058745 A CN 201810058745A CN 108052683 A CN108052683 A CN 108052683A
Authority
CN
China
Prior art keywords
mrow
msub
entity
vector
candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810058745.1A
Other languages
Chinese (zh)
Other versions
CN108052683B (en
Inventor
常亮
饶官军
古天龙
罗义琴
祝曼丽
徐周波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guilin University of Electronic Technology
Original Assignee
Guilin University of Electronic Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guilin University of Electronic Technology filed Critical Guilin University of Electronic Technology
Priority to CN201810058745.1A priority Critical patent/CN108052683B/en
Publication of CN108052683A publication Critical patent/CN108052683A/en
Application granted granted Critical
Publication of CN108052683B publication Critical patent/CN108052683B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention discloses a kind of knowledge mapping based on cosine measurement rule and represents learning method, and the entity in knowledge mapping and relation are randomly-embedded to two vector spaces first;Secondly candidate's entity statistical rules, the corresponding triple collection of statistical correlation relation and candidate's entity vector set are utilized;Cosine similarity construction object vector and the score function of candidate's entity are reused, candidate's entity is evaluated;Candidate's entity vector of all correlativities is finally subjected to unified training with object vector using loss function, and passes through stochastic gradient descent algorithm and minimizes loss function.When reaching optimization aim, you can obtain the optimal expression of each entity vector sum relation vector in knowledge mapping, so as to contacting between better presentation-entity and relation, and can be good at being applied among large-scale knowledge mapping completion.

Description

A kind of knowledge mapping based on cosine measurement rule represents learning method
Technical field
The present invention relates to knowledge mapping technical fields, and in particular to a kind of knowledge mapping based on cosine measurement rule represents Learning method.
Background technology
With the arrival in big data epoch, the bonus of data makes artificial intelligence technology obtain unprecedented rapid development. As the knowledge engineering of main representative and represent that study obtains for association areas such as the machine learning of main representative using knowledge mapping Rapid progress.On the one hand, as expression study is to the depleted of big data bonus so that represent that learning model effect tends to Bottleneck.On the other hand, continued to bring out with this substantial amounts of knowledge mapping, and these contain this substantial amounts of mankind's priori treasure-house But the effective utilization of study is not expressed yet.Fusion knowledge mapping further improves expression learning model with representing that study becomes One of important thinking of effect.Using knowledge mapping as represent symbolicism, with represent study as representative connectionism, increasingly Depart from the track of original each independent development, go on the new road that collaboration is gone forward side by side.
Knowledge mapping is substantially a kind of semantic network, express all kinds of entities, concept and its between semantic relation.Phase For traditional knowledge representation (such as body, traditional semantic network), knowledge mapping has entity/concept coverage rate height, language The advantages such as adopted relation is various, structure is friendly (being typically expressed as RDF format) and quality is higher, so that knowledge mapping is increasingly As big data epoch and artificial intelligence epoch knowledge representation mode the most main.
Triple is a kind of general representation of knowledge mapping, the citation form of triple include (entity 1, relation, Entity 2) and (concept, attribute, property value) etc., entity is element most basic in knowledge mapping, is existed not between different entities Same relation.Concept mainly includes set, object type, things species, such as geographical, personage;Attribute refers to what object had Attributive character, characteristic, such as nationality's date of birth;Property value then refers to the value corresponding to attribute, such as China, 1993-01-12 etc.. Triple is represented usually using (head, relation, tail) (being abbreviated as (h, r, t)), and wherein r represents head entity h and tail Relation between entity t.If Paris is this knowledge of French capital, it can use that (Paris is ... first in knowledge mapping All, it is French) expression of this triple.
The expression study of knowledge mapping is intended to the entity in knowledge mapping and relation being embedded into low-dimensional vector space, by it It is expressed as dense low-dimensional real-valued vectors.Its key is the damage on true (triple (h, r, t)) in reasonable definition knowledge mapping Lose function frThe vectorization of (h, t) and two entities h, t of triple represent.Under normal conditions, when true (h, r, t) is set up When, it is expected to minimize fr(h,t).The fact that consider entire knowledge mapping, then can be by minimizing loss function come the entity that learns It is represented with the vector of relation.Different expression study can define corresponding loss function using different principle and method.When The preceding translation model using TransE models as representative is had received widespread attention with the performance that it is protruded and simple model parameter. However, existing translation model can effectively handle the simple relation of 1-1, but for 1-N, N-1, N-N complex relationship still It is restricted.This results in existing knowledge collection of illustrative plates to represent that learning method can not be advantageously applied to large-scale knowledge mapping.
The content of the invention
To be solved by this invention is that existing knowledge collection of illustrative plates represents that learning method can not handle 1-N, N-1, N-N well The problem of complex relationship, provides a kind of knowledge mapping based on cosine measurement rule and represents learning method.
To solve the above problems, the present invention is achieved by the following technical solutions:
A kind of knowledge mapping based on cosine measurement rule represents learning method, as follows including step:
Entity set in knowledge mapping and set of relations are respectively embedded in entity by step 1 using vectorial random generation method Vector space and relation vector space obtain entity vector sum relation vector;
Step 2, using candidate's entity statistical rules, obtain candidate's entity vector set of random selection triple, and according to The random generation error entity vector set of candidate's entity vector set;
Step 3 constructs the score function between object vector and candidate's entity vector, while specification using cosine similarity The value range of its functional value;
Step 4 is built using score function and distinguishes candidate's entity vector set and false entries vector set based on border Then loss function causes candidate's entity vector set to carry out unified constraint to object vector according to loss function;
Step 5 optimizes loss function value using optimization algorithm, so that the score function value of candidate's entity vector set Close to 1, the score function value of false entries vector set is represented with the optimal vector of learn entity and relation, reached close to 0 Optimization aim.
The specific sub-step of above-mentioned steps 2 is as follows:
Step 2.1 concentrates one triple of random selection from the triple of knowledge mapping;
Step 2.2, the head entity vector sum relation vector for being focused to find out in triple while matching selected triple All tail entities vector, and by the tail entity found out vector formed candidate's tail entity vector set;Meanwhile it is concentrated in triple It finds while matches all entity vectors of the tail entity vector sum relation vector of selected triple, and will be found out Head entity vector forms candidate's head entity vector set;
Step 2.3 carries out random replacement operation, generation error tail entity vector set to candidate's tail entity vector set;Meanwhile Random replacement operation, generation error head entity vector set are carried out to candidate's head entity vector set.
The score function constructed in above-mentioned steps 3 is as follows:
The score function f of candidate's tail entity vectort(gt, t) be:
The score function f of candidate's head entity vectorh(gh, h) be:
The score function f of mistake tail entity vectort′(gt, t ') be:
The score function f ' of mistake head entity vectorh(gh, h ') be:
In the above formulas, α is score function value scope standard parameter;gtIt is the object vector of tail entity, gt=h0+r0;gh It is the object vector of an entity, gh=t0-r0;h0Be selected triple head entity vector, t0It is selected triple Tail entity vector, r0It is the relation vector of selected triple;T be candidate's tail entity vector, h be candidate head entity to Amount, t ' are wrong tail entity vectors, and h ' is wrong head entity vector.
Above-mentioned score function value scope standard parameter α ∈ [0,1].
Constructed loss function L is in above-mentioned steps 4:
In formula, γ is the boundary value of setting;ft′(gt, t ') and represent the score function of wrong tail entity vector, ft(gt,t) Represent the score function of candidate's tail entity vector, f 'h(gh, h ') and represent the score function of wrong head entity vector, fh(gh, h) and table Show the score function of candidate's head entity vector;gtIt is the object vector of tail entity, gt=h0+r0;ghIt is the object vector of an entity, gh=t0-r0;h0Be selected triple head entity vector, t0Be selected triple tail entity vector, r0It is institute The relation vector of the triple of selection;T is vectorial for candidate's tail entity, tcFor candidate's tail entity vector set, t ' is wrong tail entity Vector, t 'cFor wrong tail entity vector set, h is vectorial for candidate's head entity, hcFor candidate's head entity vector set, h ' is that wrong head is real Body vector, h 'cFor wrong head entity vector set.
Optimization algorithm described in above-mentioned steps 5 is stochastic gradient descent algorithm.
Compared with prior art, the present invention has following features:
First, it is proposed that a kind of candidate's entity statistical rules, statistics obtain candidate's entity vector set of correlativity;
Second, by introducing the cosine similarity between two vectors, calculate between object vector and candidate's entity vector Cosine value is as the difference size between weighing two individuals, is not between two vectors of simple computation compared to Euclidean distance Distance, cosine similarity more focus on difference of two vectors on direction;Existing model is so solved in processing 1-N, N- 1st, deficiencies of the N-N when complex relationships enriches the ability to express of entity and relation, improves model performance on the whole;
3rd, unified constraint is formed with object vector by all candidate's entities for combining correlativity, it is real to improve candidate Body vector and object vector interactivity.
Description of the drawings
A kind of knowledge mapping based on cosine measurement rule of Fig. 1 present invention represents the flow chart of learning method.
Entity and the exemplary plot of relation triple in Fig. 2 knowledge mappings.
A kind of knowledge mapping based on cosine measurement rule of Fig. 3 present invention represents the training objective exemplary plot of learning method, Before wherein (a) is training, (b) is after training.
Specific embodiment
Understand to make the object, technical solutions and advantages of the present invention clearer, below in conjunction with specific example, and with reference to attached Figure, the present invention is described in more detail.
The invention discloses a kind of knowledge mappings based on cosine measurement rule to represent learning method, as shown in Figure 1, first Entity in knowledge mapping and relation are randomly-embedded to two vector spaces;Secondly candidate's entity statistical rules, statistics are utilized The corresponding triple collection of correlativity and candidate's entity vector set, and according to the random generation error entity of candidate's entity vector set to Quantity set;Cosine similarity construction object vector and the score function of candidate's entity are reused, candidate's entity is evaluated;Most Candidate's entity vector of all correlativities is subjected to unified training with object vector using loss function afterwards, and passes through boarding steps It spends descent algorithm and minimizes loss function.When reaching optimization aim, you can obtain each entity vector sum in knowledge mapping and close It is the optimal expression of vector, so as to contacting between better presentation-entity and relation, and can be good at being applied to extensive Knowledge mapping completion among.The present invention is trained by cosine similarity with unified, and overcoming existing model well can not be very The complex relationship problem of good processing 1-N, N-1, N-N, has stronger feasibility and good practicability.
The present invention considers the triple structured message in knowledge mapping, and using (head, relation, Tail typical triple form) carries out the representation of knowledge, and relation is for connection to entity head, tail, and portrays two Relevance between entity.Fig. 2 is the exemplary plot of typical knowledge mapping triple structure.Wherein, circle is expressed as entity section Point (such as " Tang * * ", " her * * ", " base of a fruit * * "), the company side between two entities represent relation (such as " nationality ", " president ", " female Youngster " etc.).In addition it can be seen that entity " Tang * * " between " U.S. " there are many relation, and there is " daughter ", " nationality " relation Multiple entities pair are corresponded to.
A kind of knowledge mapping based on cosine measurement rule represents learning method, using Fig. 2 knowledge mappings as training set, figure 2 include 5 entities, 4 relations, 8 triples.The specific implementation of method includes the following steps:
Entity in knowledge mapping and relation are respectively embedded in two vectors by step 1 using vectorial random generation method Space;
The entity set { " Tang * * ", " agate * " " base of a fruit * * ", " her * * ", " U.S. " } of Fig. 2 knowledge mappings is expressed as by step 11 {e1,e2,e3,e4,e5With set of relations { " wife ", " daughter ", " president ", " nationality " } be expressed as { r1,r2,r3,r4}.Fig. 2 knowledge Collection of illustrative plates includes triple collection { (e1,r1,e2), (e1,r2,e3), (e1,r2,e4), (e1,r3,e5), (e2,r2,e3), (e3,r3, e5), (e4,r3,e5), (e5,r4,e1)};
They are respectively embedded in entity vector space and relation vector space by step 12, obtain entity vector { e1,e2, e3,e4,e5And relation vector { r1,r2,r3,r4}。
Step 2, using candidate's entity statistical rules, obtain the triple collection of correlativity and candidate's entity vector set, together Shi Suiji generation error entity vector sets.
Candidate's entity statistical rules is as follows:
The first step randomly selects triple (e.g. a, (h from knowledge mapping0,r0,t0));
Step 21 obtains triple (e.g., (Tang * *, daughter, base of a fruit * *) i.e. (e by randomly selecting1,r2,e3));
Second step matches (h is included in training set respectively0,r0,) with (,r0,t0) triple collection (h0,r0,tc) with (hc,r0,t0), whereinIt is with gt=h0+r0For all candidate's tail entity sets of object vector, comprising | tc| A different tail physical quantities,It is with gh=t0-r0All candidates head entity set of object vector, comprising |hc| a different head physical quantities;
Step 22, basis ((e1,r2,) match triple collection { (e1,r2,e3), (e1,r2,e4), while obtain candidate Tail entity set { e3,e4};
Step 23, according to (,r2,e3) match triple collection { (e1,r2,e3), (e2,r2,e3), while obtain candidate's head Entity set { e1,e2};
3rd step, it is random to generate the corresponding false entries collection of candidate's entity set.In the generating process of false entries collection, meeting It is compared with generation error tail entity with candidate's entity in candidate's entity set, only when the mistake being not present in candidate's entity set Tail entity can be included into false entries collection by mistake.
Step 24, random generation error tail entity set { e5,e2And wrong head entity set { e4,e5}。
Step 3 constructs the score function between object vector and candidate's entity vector, while specification using cosine similarity The value range of its functional value, generally [0,1].
Step 31, using cosine value formula, cosine value cos < a, the b > of vectorial a and vector b are expressed as:
Step 32, based on above-mentioned cosine formula, construct score function:
According to object vector and the score function f of candidate's tail entity of the cosine similarity of candidate's tail entity vectort(gt,t) Construction is as follows:
According to object vector and the cosine similarity of candidate's head entity vector, the score function f of construction candidate's head entityh (gh, h) and it is as follows:
Wherein, α ∈ [0,1] are score function value scope standard parameters, gtIt is the object vector of tail entity, gt=h0+r0, gh It is the object vector of an entity, gh=t0-r0, t is candidate's tail entity vector, and h is candidate's head entity vector.
According to the cosine similarity of object vector and wrong tail entity vector, the score function f of the wrong tail entity of constructiont′ (gt, t ') and it is as follows:
According to the cosine similarity of object vector and wrong head entity vector, the score function f ' of the wrong head entity of constructionh (gh, h ') and it is as follows:
Wherein, α ∈ [0,1] are score function value scope standard parameters, gtIt is the object vector of tail entity, gt=h0+r0, gh It is the object vector of an entity, gh=t0-r0, t ' is wrong tail entity vector, and h ' is wrong head entity vector.
Step 4 is built using score function and distinguishes candidate's entity vector set and false entries vector set based on border Then loss function causes candidate's entity vector set to carry out unified constraint to object vector according to loss function;
Step 41, the loss function construction based on border are as follows:
Wherein, [γ+f '-f]+=max (0, γ+f '-f);γ is the boundary value of setting;ft′(gt, t ') and represent wrong tail The score function of entity vector, ft(gt, t) represent candidate's tail entity vector score function, f 'h(gh, h ') and represent that wrong head is real The score function of body vector, fh(gh, h) represent candidate head entity vector score function;gtIt is the object vector of tail entity, gt =h0+r0;ghIt is the object vector of an entity, gh=t0-r0;h0Be selected triple head entity vector, t0It is selected Triple tail entity vector, r0It is the relation vector of selected triple;T is vectorial for candidate's tail entity, tcFor candidate's tail Entity vector set, t ' are that wrong tail entity is vectorial, t 'cFor wrong tail entity vector set, h is vectorial for candidate's head entity, hcFor candidate Head entity vector set, h ' are that wrong head entity is vectorial, h 'cFor wrong head entity vector set.
Step 42, triple the collection { (e that will be obtained in step 221,r2,e3), (e2,r2,e3) and candidate's tail entity set {e3,e4, score is calculated by the score function in step 32 respectively;
Step 421, (e1,r2,e3) be scored at
Its corresponding wrong triple (e1,r2,e5) be scored at
Step 422, (e1,r2,e4) be scored at
Its corresponding wrong triple (e1,r2,e2) be scored at
Step 43, triple the collection { (e that will be obtained in step 221,r2,e3), (e2,r2,e3) and candidate's head entity set {e1,e2, score is calculated by the score function in step 32 respectively;
Step 431, (e1,r2,e3) be scored at
Its corresponding wrong triple (e4,r2,e3) be scored at
Step 432, (e2,r2,e3) be scored at
Its corresponding wrong triple (e5,r2,e2) be scored at
Step 44 substitutes into the score calculated in step 42 and step 43 in loss function L, obtains loss function value.It is logical It crosses and all candidate's entities vector of correlativity is formed by unified constraint with object vector based on the loss function on border.
Step 5 optimizes loss function value using optimization algorithm, so that the score function value of candidate's entity vector set Close to 1, the score function value of false entries vector set is represented with the optimal vector of entity and relation, reached close to 0 Optimization aim.
Step 51, optimization algorithm will use stochastic gradient descent algorithm to minimize loss function, obtain all candidate's entities The optimal score of vector so as to which the entity and the optimal vector of relation learned represent, reaches optimization aim.
Knowledge mapping of the present invention represents Principles of Translation used by learning method, and referring to Fig. 3, basic thought is:First root According to triple (h, r, t) construction training objective vector g=h+r (or g=t-r), while obtain candidate's entity vector set, such as Fig. 3 In { e1,e2,e3,e4};Secondly score is calculated using the cosine similarity between two vectors;Finally, stochastic gradient descent is utilized Algorithm changes candidate's entity vector according to loss function score, while changes direction according to the entirety of preferred entity to change mesh Mark vector.The present invention using the cosine similarity between two vectors, can preferably calculate object vector and candidate's entity to Difference size between amount is not the distance between two vectors of simple computation, cosine similarity is more focused on compared to Euclidean distance Difference of two vectors on direction.So solve deficiency of the existing model when handling 1-N, N-1, N-N when complex relationships, The ability to express of entity and relation is enriched, improves model performance on the whole.
The present invention using the cosine similarity between two vectors, can preferably calculate object vector and candidate's entity to Similitude between amount.It, using candidate's entity statistical rules, is obtained based on embedded model with relation vector using entity vector The triple collection of correlativity and candidate's entity vector set;And it is similar to the cosine of candidate's entity vector to introduce object vector Degree, enhances ability to express of the model to complex relationships such as 1-N, N-1, N-N, at the same construct object vector and candidate's entity to Measure exclusive score function.Finally construct new loss function, by gradient descent algorithm immediately optimize loss function, when up to During to optimum optimization target, it becomes possible to the optimal entity vector sum relation vector of each in knowledge mapping is obtained, so as to more preferable Entity and relation are indicated, and preserve the contact between entity and relation, it is extensive so as to be applied to well Knowledge mapping completion among.
It should be noted that although above embodiment of the present invention is illustrative, it is to the present invention that this, which is not, Limitation, therefore the invention is not limited in above-mentioned specific embodiment.Without departing from the principles of the present invention, it is every The other embodiment that those skilled in the art obtain under the enlightenment of the present invention is accordingly to be regarded as within the protection of the present invention.

Claims (6)

1. a kind of knowledge mapping based on cosine measurement rule represents learning method, it is characterized in that, it is as follows including step:
Entity set in knowledge mapping and set of relations are respectively embedded in entity vector by step 1 using vectorial random generation method Space and relation vector space obtain entity vector sum relation vector;
Step 2, using candidate's entity statistical rules, obtain candidate's entity vector set of random selection triple, and according to candidate The random generation error entity vector set of entity vector set;
Step 3 constructs the score function between object vector and candidate's entity vector using cosine similarity, while specification its letter The value range of numerical value;
Step 4 builds the loss for distinguishing candidate's entity vector set and false entries vector set based on border using score function Then function causes candidate's entity vector set to carry out unified constraint to object vector according to loss function;
Step 5 optimizes loss function value using optimization algorithm, so that the score function value of candidate's entity vector set approaches In 1, the score function value of false entries vector set is represented with the optimal vector of learn entity and relation close to 0, reaches optimization Target.
2. a kind of knowledge mapping based on cosine measurement rule according to claim 1 represents learning method, it is characterized in that, The specific sub-step of step 2 is as follows:
Step 2.1 concentrates one triple of random selection from the triple of knowledge mapping;
The institute of step 2.2, the head entity vector sum relation vector for being focused to find out in triple while matching selected triple There is tail entity vector, and the tail entity found out vector is formed into candidate's tail entity vector set;Meanwhile it is focused to find out in triple All entity vectors of the tail entity vector sum relation vector of selected triple are matched simultaneously, and the head found out is real Body vector forms candidate's head entity vector set;
Step 2.3 carries out random replacement operation, generation error tail entity vector set to candidate's tail entity vector set;Meanwhile to waiting Head entity vector set is selected to carry out random replacement operation, generation error head entity vector set.
3. a kind of knowledge mapping based on cosine measurement rule according to claim 1 or 2 represents learning method, feature It is that the score function constructed in step 3 is as follows:
The score function f of candidate's tail entity vectort(gt, t) be:
<mrow> <msub> <mi>f</mi> <mi>t</mi> </msub> <mrow> <mo>(</mo> <msub> <mi>g</mi> <mi>t</mi> </msub> <mo>,</mo> <mi>t</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>&amp;alpha;</mi> <mo>+</mo> <mrow> <mo>(</mo> <mn>1</mn> <mo>-</mo> <mi>&amp;alpha;</mi> <mo>)</mo> </mrow> <mfrac> <mrow> <msub> <mi>g</mi> <mi>t</mi> </msub> <mo>&amp;CenterDot;</mo> <mi>t</mi> </mrow> <mrow> <msqrt> <msub> <mi>g</mi> <mi>t</mi> </msub> </msqrt> <mo>*</mo> <msqrt> <mi>t</mi> </msqrt> </mrow> </mfrac> <mo>,</mo> </mrow>
The score function f of candidate's head entity vectorh(gh, h) be:
<mrow> <msub> <mi>f</mi> <mi>h</mi> </msub> <mrow> <mo>(</mo> <msub> <mi>g</mi> <mi>h</mi> </msub> <mo>,</mo> <mi>h</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>&amp;alpha;</mi> <mo>+</mo> <mrow> <mo>(</mo> <mn>1</mn> <mo>-</mo> <mi>&amp;alpha;</mi> <mo>)</mo> </mrow> <mfrac> <mrow> <msub> <mi>g</mi> <mi>h</mi> </msub> <mo>&amp;CenterDot;</mo> <mi>h</mi> </mrow> <mrow> <msqrt> <msub> <mi>g</mi> <mi>h</mi> </msub> </msqrt> <mo>*</mo> <msqrt> <mi>h</mi> </msqrt> </mrow> </mfrac> <mo>,</mo> </mrow>
The score function f of mistake tail entity vectort′(gt, t ') be:
<mrow> <msubsup> <mi>f</mi> <mi>t</mi> <mo>&amp;prime;</mo> </msubsup> <mrow> <mo>(</mo> <msub> <mi>g</mi> <mi>t</mi> </msub> <mo>,</mo> <msup> <mi>t</mi> <mo>&amp;prime;</mo> </msup> <mo>)</mo> </mrow> <mo>=</mo> <mi>&amp;alpha;</mi> <mo>+</mo> <mrow> <mo>(</mo> <mn>1</mn> <mo>-</mo> <mi>&amp;alpha;</mi> <mo>)</mo> </mrow> <mfrac> <mrow> <msub> <mi>g</mi> <mi>t</mi> </msub> <mo>&amp;CenterDot;</mo> <msup> <mi>t</mi> <mo>&amp;prime;</mo> </msup> </mrow> <mrow> <msqrt> <msub> <mi>g</mi> <mi>t</mi> </msub> </msqrt> <mo>*</mo> <msqrt> <msup> <mi>t</mi> <mo>&amp;prime;</mo> </msup> </msqrt> </mrow> </mfrac> <mo>,</mo> </mrow>
The score function f of mistake head entity vectorh′(gh, h ') be:
<mrow> <msubsup> <mi>f</mi> <mi>h</mi> <mo>&amp;prime;</mo> </msubsup> <mrow> <mo>(</mo> <msub> <mi>g</mi> <mi>h</mi> </msub> <mo>,</mo> <msup> <mi>h</mi> <mo>&amp;prime;</mo> </msup> <mo>)</mo> </mrow> <mo>=</mo> <mi>&amp;alpha;</mi> <mo>+</mo> <mrow> <mo>(</mo> <mn>1</mn> <mo>-</mo> <mi>&amp;alpha;</mi> <mo>)</mo> </mrow> <mfrac> <mrow> <msub> <mi>g</mi> <mi>h</mi> </msub> <mo>&amp;CenterDot;</mo> <msup> <mi>h</mi> <mo>&amp;prime;</mo> </msup> </mrow> <mrow> <msqrt> <msub> <mi>g</mi> <mi>h</mi> </msub> </msqrt> <mo>*</mo> <msqrt> <msup> <mi>h</mi> <mo>&amp;prime;</mo> </msup> </msqrt> </mrow> </mfrac> <mo>,</mo> </mrow>
In the above formulas, α is score function value scope standard parameter;gtIt is the object vector of tail entity, gt=h0+r0;ghIt is head The object vector of entity, gh=t0-r0;h0Be selected triple head entity vector, t0It is the tail of selected triple Entity vector, r0It is the relation vector of selected triple;T is candidate's tail entity vector, and h is that candidate's head entity is vectorial, t ' It is wrong tail entity vector, h ' is wrong head entity vector.
4. a kind of knowledge mapping based on cosine measurement rule according to claim 3 represents learning method, it is characterized in that, Score function value scope standard parameter α ∈ [0,1].
5. a kind of knowledge mapping based on cosine measurement rule according to claim 1 represents learning method, it is characterized in that, Constructed loss function L is in step 4:
<mrow> <mi>L</mi> <mo>=</mo> <munder> <mo>&amp;Sigma;</mo> <mrow> <mi>t</mi> <mo>&amp;Element;</mo> <msub> <mi>t</mi> <mi>c</mi> </msub> <mo>,</mo> <msup> <mi>t</mi> <mo>&amp;prime;</mo> </msup> <mo>&amp;Element;</mo> <msubsup> <mi>t</mi> <mi>c</mi> <mo>&amp;prime;</mo> </msubsup> </mrow> </munder> <msub> <mrow> <mo>&amp;lsqb;</mo> <mi>&amp;gamma;</mi> <mo>+</mo> <msubsup> <mi>f</mi> <mi>t</mi> <mo>&amp;prime;</mo> </msubsup> <mrow> <mo>(</mo> <msub> <mi>g</mi> <mi>t</mi> </msub> <mo>,</mo> <msup> <mi>t</mi> <mo>&amp;prime;</mo> </msup> <mo>)</mo> </mrow> <mo>-</mo> <msub> <mi>f</mi> <mi>t</mi> </msub> <mrow> <mo>(</mo> <msub> <mi>g</mi> <mi>t</mi> </msub> <mo>,</mo> <mi>t</mi> <mo>)</mo> </mrow> <mo>&amp;rsqb;</mo> </mrow> <mo>+</mo> </msub> <mo>+</mo> <munder> <mo>&amp;Sigma;</mo> <mrow> <mi>h</mi> <mo>&amp;Element;</mo> <msub> <mi>h</mi> <mi>c</mi> </msub> <mo>,</mo> <msup> <mi>h</mi> <mo>&amp;prime;</mo> </msup> <mo>&amp;Element;</mo> <msubsup> <mi>h</mi> <mi>c</mi> <mo>&amp;prime;</mo> </msubsup> </mrow> </munder> <msub> <mrow> <mo>&amp;lsqb;</mo> <mi>&amp;gamma;</mi> <mo>+</mo> <msubsup> <mi>f</mi> <mi>h</mi> <mo>&amp;prime;</mo> </msubsup> <mrow> <mo>(</mo> <msub> <mi>g</mi> <mi>h</mi> </msub> <mo>,</mo> <msup> <mi>h</mi> <mo>&amp;prime;</mo> </msup> <mo>)</mo> </mrow> <mo>-</mo> <msub> <mi>f</mi> <mi>h</mi> </msub> <mrow> <mo>(</mo> <msub> <mi>g</mi> <mi>h</mi> </msub> <mo>,</mo> <mi>h</mi> <mo>)</mo> </mrow> <mo>&amp;rsqb;</mo> </mrow> <mo>+</mo> </msub> </mrow>
In formula, γ is the boundary value of setting;ft′(gt, t ') and represent the score function of wrong tail entity vector, ft(gt, t) and it represents to wait Select the score function of tail entity vector, fh′(gh, h ') and represent the score function of wrong head entity vector, fh(gh, h) and represent candidate The score function of head entity vector;gtIt is the object vector of tail entity, gt=h0+r0;ghIt is the object vector of an entity, gh= t0-r0;h0Be selected triple head entity vector, t0Be selected triple tail entity vector, r0It is selected Triple relation vector;T is vectorial for candidate's tail entity, tcFor candidate's tail entity vector set, t ' is wrong tail entity vector, t′cFor wrong tail entity vector set, h is vectorial for candidate's head entity, hcFor candidate's head entity vector set, h ' be wrong head entity to Amount, h 'cFor wrong head entity vector set.
6. a kind of knowledge mapping based on cosine measurement rule according to claim 1 represents learning method, it is characterized in that, Optimization algorithm described in step 5 is stochastic gradient descent algorithm.
CN201810058745.1A 2018-01-22 2018-01-22 Knowledge graph representation learning method based on cosine measurement rule Active CN108052683B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810058745.1A CN108052683B (en) 2018-01-22 2018-01-22 Knowledge graph representation learning method based on cosine measurement rule

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810058745.1A CN108052683B (en) 2018-01-22 2018-01-22 Knowledge graph representation learning method based on cosine measurement rule

Publications (2)

Publication Number Publication Date
CN108052683A true CN108052683A (en) 2018-05-18
CN108052683B CN108052683B (en) 2021-08-03

Family

ID=62127689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810058745.1A Active CN108052683B (en) 2018-01-22 2018-01-22 Knowledge graph representation learning method based on cosine measurement rule

Country Status (1)

Country Link
CN (1) CN108052683B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110188147A (en) * 2019-05-22 2019-08-30 厦门无常师教育科技有限公司 The document entity relationship of knowledge based map finds method and system
CN111597276A (en) * 2020-05-07 2020-08-28 科大讯飞(苏州)科技有限公司 Entity alignment method, device and equipment
CN113360675A (en) * 2021-06-25 2021-09-07 中关村智慧城市产业技术创新战略联盟 Knowledge graph specific relation completion method based on Internet open world
CN114219089A (en) * 2021-11-11 2022-03-22 山东人才发展集团信息技术有限公司 Construction method and equipment of new-generation information technology industry knowledge graph
US20220383164A1 (en) * 2021-05-25 2022-12-01 Accenture Global Solutions Limited Methods and Systems for Generating Example-Based Explanations of Link Prediction Models in Knowledge Graphs

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160080422A1 (en) * 2014-09-12 2016-03-17 International Business Machines Corporation Transforming business policies to information technology security control terms for improved system compliance
CN106934042A (en) * 2017-03-16 2017-07-07 中国人民解放军国防科学技术大学 A kind of knowledge mapping represents model and its method
CN106951499A (en) * 2017-03-16 2017-07-14 中国人民解放军国防科学技术大学 A kind of knowledge mapping method for expressing based on translation model
CN107590139A (en) * 2017-09-21 2018-01-16 桂林电子科技大学 A kind of knowledge mapping based on circular matrix translation represents learning method
US20180060734A1 (en) * 2016-08-31 2018-03-01 International Business Machines Corporation Responding to user input based on confidence scores assigned to relationship entries in a knowledge graph

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160080422A1 (en) * 2014-09-12 2016-03-17 International Business Machines Corporation Transforming business policies to information technology security control terms for improved system compliance
US20180060734A1 (en) * 2016-08-31 2018-03-01 International Business Machines Corporation Responding to user input based on confidence scores assigned to relationship entries in a knowledge graph
CN106934042A (en) * 2017-03-16 2017-07-07 中国人民解放军国防科学技术大学 A kind of knowledge mapping represents model and its method
CN106951499A (en) * 2017-03-16 2017-07-14 中国人民解放军国防科学技术大学 A kind of knowledge mapping method for expressing based on translation model
CN107590139A (en) * 2017-09-21 2018-01-16 桂林电子科技大学 A kind of knowledge mapping based on circular matrix translation represents learning method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110188147A (en) * 2019-05-22 2019-08-30 厦门无常师教育科技有限公司 The document entity relationship of knowledge based map finds method and system
CN111597276A (en) * 2020-05-07 2020-08-28 科大讯飞(苏州)科技有限公司 Entity alignment method, device and equipment
CN111597276B (en) * 2020-05-07 2023-09-29 科大讯飞(苏州)科技有限公司 Entity alignment method, device and equipment
US20220383164A1 (en) * 2021-05-25 2022-12-01 Accenture Global Solutions Limited Methods and Systems for Generating Example-Based Explanations of Link Prediction Models in Knowledge Graphs
CN113360675A (en) * 2021-06-25 2021-09-07 中关村智慧城市产业技术创新战略联盟 Knowledge graph specific relation completion method based on Internet open world
CN113360675B (en) * 2021-06-25 2024-02-13 中关村智慧城市产业技术创新战略联盟 Knowledge graph specific relationship completion method based on Internet open world
CN114219089A (en) * 2021-11-11 2022-03-22 山东人才发展集团信息技术有限公司 Construction method and equipment of new-generation information technology industry knowledge graph

Also Published As

Publication number Publication date
CN108052683B (en) 2021-08-03

Similar Documents

Publication Publication Date Title
CN108052683A (en) A kind of knowledge mapping based on cosine measurement rule represents learning method
CN110309267B (en) Semantic retrieval method and system based on pre-training model
CN112131404B (en) Entity alignment method in four-risk one-gold domain knowledge graph
CN111198950B (en) Knowledge graph representation learning method based on semantic vector
CN110334219B (en) Knowledge graph representation learning method based on attention mechanism integrated with text semantic features
CN108492200B (en) User attribute inference method and device based on convolutional neural network
CN110069638B (en) Knowledge graph combined representation learning method combining rules and paths
CN107885760A (en) It is a kind of to represent learning method based on a variety of semantic knowledge mappings
CN108009285B (en) Forest Ecology man-machine interaction method based on natural language processing
CN110046262A (en) A kind of Context Reasoning method based on law expert&#39;s knowledge base
CN110347847A (en) Knowledge mapping complementing method neural network based
CN114036307B (en) Knowledge graph entity alignment method and device
CN112988917B (en) Entity alignment method based on multiple entity contexts
WO2024007476A1 (en) Design concept generation network construction method and automatic concept scheme generation method
CN113360621A (en) Scene text visual question-answering method based on modal inference graph neural network
CN110909172B (en) Knowledge representation learning method based on entity distance
CN112559734A (en) Presentation generation method and device, electronic equipment and computer readable storage medium
CN108427717A (en) It is a kind of based on the alphabetic class family of languages medical treatment text Relation extraction method gradually extended
CN113987203A (en) Knowledge graph reasoning method and system based on affine transformation and bias modeling
CN114911879A (en) Criminal case knowledge map relation reasoning method based on graph attention network
CN118036726A (en) Knowledge graph link prediction method based on heuristic information and graph neural network
CN107402919A (en) Machine translation data selecting method and machine translation data selection system based on figure
CN116882403A (en) Geographic naming entity multi-target matching method
Dong et al. Adapt and Align to Improve Zero-Shot Sketch-Based Image Retrieval
CN115034837A (en) Product sales prediction method, equipment and medium based on knowledge graph

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20180518

Assignee: GUANGXI XINKAI ZHIQUAN TECHNOLOGY Co.,Ltd.

Assignor: GUILIN University OF ELECTRONIC TECHNOLOGY

Contract record no.: X2023980045064

Denomination of invention: A Knowledge Graph Representation Learning Method Based on Cosine Metric Rules

Granted publication date: 20210803

License type: Common License

Record date: 20231101