CN-117112924-B - Social network entity reasoning method based on hyperbolic geometric knowledge representation
Abstract
The invention realizes a social network entity reasoning method based on hyperbolic geometric knowledge representation. Firstly, acquiring a social network graph and a user to be recommended, inputting the social network graph and the user to be recommended into the query expression calculation module, inputting the query expression and the user entity expression into the entity reasoning module, calculating the geometric vector expression of the query obtained by calculation in the query expression calculation module, inputting the geometric vector expression of the query into the entity reasoning module, converting the geometric vector expression into a final query expression, then using the final query expression and the entity expression together for distance calculation, obtaining the distance between the query expression and the entity expression, and taking topk the user entity out from the distance to obtain a final reasoning result entity. The scheme constructs a geometric vector representation frame in hyperbolic space, and designs corresponding logical operations such as merging, intersection, complement and the like in the representation space by referring to the thought of the wien diagram. And obtaining a final reasoning result through the distance between the geometric representation and the entity representation of the query.
Inventors
- SUN QINGBIN
- LIU JUNNAN
- Fu xingcheng
- LI QIAN
- JI CHENG
- LI JIANXIN
- SUN PEIYUAN
Assignees
- 北京航空航天大学
Dates
- Publication Date
- 20260508
- Application Date
- 20230824
Claims (3)
- 1. A social network entity reasoning method based on hyperbolic geometric knowledge representation is characterized by designing a query representation calculation module and an entity reasoning module, firstly acquiring a social network graph and a user to be recommended, inputting the social network graph and the user to be recommended into the query representation calculation module, and inputting query representation and entity representation of the user into the entity reasoning module; After constructing a calculation graph and acquiring anchor entity, the social network graph and the user information to be recommended enter a calculation sub-query expression process according to a corresponding logic operator, if the calculation sub-query expression process is not finished, the calculation sub-query expression process is continuously executed, and if the calculation sub-query expression process is finished, the geometric vector expression of the query obtained by the calculation result is input into the entity reasoning module; The entity reasoning module inputs the geometric vector representation of the query, converts the geometric vector representation into a final query representation, then uses the final query representation and the entity representation together for distance calculation to obtain the distance between the query representation and the entity representation, and takes topk user entities out of the distance to obtain the final reasoning user entities; After receiving social network graphs and users to be recommended, the process of constructing calculation graphs and acquiring anchor entities firstly constructs users in a social platform and corresponding user attribute information into a user graph, performs query processing, constructs the character attribute to be considered and the character entity to be recommended into a query according to recommendation requirements, and aims at each query to be converted into a calculation graph form, wherein each node of the calculation graph represents sub-query, and each side represents a logical operator; the calculating sub-query expression process specifically includes: the representation of queries is that each query actually represents a set of entities on a social graph, a query is represented as a neighborhood of semantic centers on a hyperbolic representation space, in the form of a representation Wherein Respectively the center in the radial direction and in the arc direction, Representing the offset in the radial direction and the radian direction, wherein the center and the offset together form a region in the Poincare disk representation space, the center represents the semantics of the entity set represented by the query, the offset can intuitively represent the size of the entity set, the query representation is defined in a tangent space, the conversion between the tangent space and a hyperbolic space is realized through an exponential mapping and a logarithmic mapping, and the exponential mapping and the logarithmic mapping in the Poincare disk space are as follows: Wherein the method comprises the steps of Is a point in the tangential space which, Is a point on the poincare disk space, Is the center point of the tangential space, Is a corner-keeping factor , And Is Mobius addition and subtraction, and the query is expressed as in tangent space Can be used between them To be converted into a new one, Represents a tangential space at the center of a circle; The entity is represented as a neighborhood with zero offset and thus can be used And (2) and To represent; the realization mode of the logic operation is four, namely relation mapping Calculation of delivery And calculate Inverse operation ; Relation mapping The operation of the relationship mapping is accomplished using a multi-layer perceptron: Wherein the method comprises the steps of Is a representation of the relationship(s), Is a multi-layer sensing machine, which comprises a main body, And Is operated by the multiplication and addition of elements, Is a conversion function, and aims to make the output of the multi-layer perceptron meet the requirements of Poincare disk space, The realization form of (2) is as follows: Wherein the method comprises the steps of Is a sigmoid function; Intersection operation Computing multiple input queries Then outputs the query representation corresponding to the intersection I.e. inputting a plurality of entity sets, outputting an intersection of the input entity sets, calculating a center of the intersection by using an aggregation mechanism based on an attention mechanism, calculating an offset of the intersection by using an aggregation mechanism based on a depth set network, and calculating the center as follows: Wherein the method comprises the steps of And Is the attention parameter, and the calculation for the offset is defined as follows: Wherein the method comprises the steps of Is a deep aggregation network, and is characterized by displacement invariance, namely the input sequence has no influence on the result; And operation Is to calculate multiple input queries And then output the query representation corresponding to the intersection I.e. input multiple entity sets, output the union of the input entity sets, expressed directly by extracting the union of the queries I.e. Wherein Is that Query representations of all sub-queries prior to the operator; Negation operation The function of (a) is to find the complement of the entity set to which a query corresponds, i.e. for the entity set to be input, its complement relative to the whole entity set is input, in particular, ; Final computing to obtain final query representation And finally output, with the output also being a physical representation 。
- 2. The social network entity reasoning method based on hyperbolic geometric knowledge representation as claimed in claim 1, wherein the input of the entity reasoning module is the query representation And the entity representation The output is the inference result entity.
- 3. The social network entity reasoning method based on hyperbolic geometric knowledge representation as set forth in claim 2, wherein the entity reasoning module is implemented by first calculating And (3) with The distance between the two points is calculated from two directions of a radius direction and an arc direction, the distances in the two directions are divided into an inner distance and an outer distance, the inner distance is the distance from the center to the entity, the outer distance is the distance from the boundary of the area to the entity, the distance in the radius direction is calculated by using the Poincare radius, firstly, the representation in the tangent space is required to be mapped to the Poincare disc space, and then the calculation is carried out by using the following formula: Wherein the method comprises the steps of And Is that The boundary in the radial direction is defined by, Is a function of the calculated poincare radius difference, Is a function of maximizing the value per element, Is a function of the absolute value of the function, Is that A norm; The external distance scales the difference between angles with a sine function, because poincare discs have a guaranteed angle, so the angle on poincare discs has the same definition as the euro space: Wherein the method comprises the steps of And Is the boundary in the direction of the arc, Is the center of the arc direction indicated by the entity, Is the center of the radian direction of the query representation, Is a function of maximizing the value per element, Is a function of the calculated absolute value, Is that Norms, final distance The calculation is as follows: Wherein the method comprises the steps of Is a scaling factor, the overall distance should be small enough as long as the entity is already within the area represented by the query; And Is the equilibrium coefficient; the entities are then ranked by distance, top ranked The individual entities output as a result entity: Constructing the two modules into an integral model for joint learning, wherein the loss function is as follows: Wherein, the Is a positive example, i.e. the answer entity of the query; Is a negative example of the method, and the device, Is a boundary hyper-parameter that distinguishes between positive and negative examples, Is a sigmoid function.
Description
Social network entity reasoning method based on hyperbolic geometric knowledge representation Technical Field The invention relates to the technical field of social networks, in particular to a social network entity reasoning method based on hyperbolic geometric knowledge representation. Background With the rapid development of the mobile internet, particularly the emergence of the emerging social network media such as Twitter, facebook and microblogs, a large number of users can resonate to different degrees on some interesting topics and the same hobbies when using the social network platforms. Currently, many social software has corresponding social community functions, and the software has the function of recommending friends of interest to the user. However, many existing user recommendation technologies need to use attribute information of users, and if there is a large amount of missing attribute information of users, the accuracy and recall of recommendation will be negatively affected. The knowledge graph represents the fact existing in the real world in a structured form, and the user graph constructed by using the user attribute information can be used for recommending related users by using the related characteristics of the knowledge graph. On one hand, the knowledge graph enables the character data analysis to be faster, the problems that the social network users have large data noise and are completely unstructured can be effectively solved, on the other hand, the problem that the users have a large number of missing attributes can be relieved by reasoning based on the knowledge graph, and hidden association information among the users can be fully mined. Specifically, we convert social network user recommendation into a complex query reasoning problem on a knowledge graph, and the existing knowledge graph complex query reasoning method uniformly embeds queries, entities and relations into a representation space, and completes the reasoning task by optimizing the distance between the representation vectors. However, most of these methods do not consider the hierarchy of the complex recommendation scenario due to the deductive nature of the query, and in addition, the modeling of the logic budget by these methods still has problems, such as the inability to support all logic operations and the semantic modes of ignoring the relationships. Accordingly, there is a need for improvement and development in the art. Disclosure of Invention Firstly, designing a query expression calculation module and an entity reasoning module, firstly, acquiring a social network graph and an entity to be recommended, inputting the social network graph and a user to be recommended into the query expression calculation module, and inputting the query expression and the entity expression of the user into the entity reasoning module; After constructing a calculation graph and acquiring anchor entity, the social network graph and the user information to be recommended enter a calculation sub-query expression process according to a corresponding logic operator, if the calculation sub-query expression process is not finished, the calculation sub-query expression process is continuously executed, and if the calculation sub-query expression process is finished, the geometric vector expression of the query obtained by the calculation result is input into the entity reasoning module; The entity reasoning module inputs the geometric vector representation of the query, converts the geometric vector representation into a final query representation, then uses the final query representation and the entity representation together for distance calculation to obtain the distance between the query representation and the entity representation, and takes topk user entities from the distance to obtain a final reasoning result entity. After the process of constructing the calculation graph and acquiring the anchor entity receives the social network graph and the user to be recommended, firstly, constructing the user in the social platform and the corresponding user attribute information into a user graph, performing query processing, and constructing the character attribute to be considered and the character entity to be recommended into a query according to the recommendation requirement, for example, expressing as: Where v represents all answer entities, gradute and Friend represent graduation and friendly relationships, si and San represent entities, respectively, u represents intermediate entities, and for such a complex query, it needs to be converted into a computational graph form, each node of the computational graph represents a sub-query, and each edge represents a logical operator. The calculating sub-query expression process specifically includes: the representation of queries is that each query actually represents a set of entities on a social network graph, one query is represented as Wherein the method comprises the steps of