Method for reducing large model illusion of question-answering system based on knowledge graph representation learning

By using Ricci curvature calculation and geometric interaction methods in knowledge graphs, entities and relationships are embedded into multiple geometric spaces, and the curvature is dynamically adjusted to optimize knowledge representation. This solves the problem of hallucination generation in question-answering systems and achieves more accurate knowledge embedding and answer consistency.

CN120632046APending Publication Date: 2025-09-12BEIFANG UNIV OF NATITIES

Patent Information

Application Number
CN202510791508.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing large models of question-answering systems have the problem of generating hallucinatory content in knowledge graph representation learning, especially when modeling complex relationships. Existing methods find it difficult to fully capture hierarchical and cyclical semantic features, and the lack of a dynamic weight allocation mechanism leads to loss of geometric information.

Method used

Ricci curvature calculation is used to embed entities and relationships into Euclidean, hyperbolic and hyperspherical spaces. Through geometric interaction and dynamic curvature adaptive adjustment strategy, the contribution ratio of different geometric spaces is optimized. Combined with the attention mechanism, multi-space fusion is performed to generate a more accurate knowledge embedding representation.

Benefits of technology

It significantly reduces the risk of hallucinations in large models in complex reasoning tasks, improves the robustness and accuracy of knowledge graph embedding, and ensures the reliability of answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632046A_ABST
    Figure CN120632046A_ABST
Patent Text Reader

Abstract

The invention discloses a method for reducing large model illusion of a question answering system based on knowledge graph representation learning, which comprises the following steps of: firstly, based on Ollivier-Ricci curvature calculation, embedding different structures in a knowledge graph into a plurality of approximate geometric spaces so as to analyze geometric patterns in data; secondly, generating a new entity representation by aggregating neighbor information, and transmitting and fusing information in different geometric spaces by using indexes; and finally, a dynamic curvature adaptive adjustment strategy is adopted to promote cooperative training and efficient fusion of multi-geometric space representation. According to the method, a complex semantic relationship is accurately described by combining geometric space and knowledge graph representation learning, geometric distortion in an embedding process is effectively reduced, and a structured knowledge system is constructed. According to the method, the accuracy and credibility of a large model in knowledge reasoning are improved, the illusion problem caused by incomplete or contradictory knowledge representation is solved, and powerful support is provided for a question and answer system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of geometrically interactive knowledge graph embedding representation, and in particular to a method for reducing large model hallucinations in question-answering systems based on knowledge graph representation learning. Background Art

[0002] With the rapid development of artificial intelligence (AI), knowledge graphs (KGs), as a structured knowledge representation, have been widely used in fields such as question-answering systems, recommender systems, intelligent search, and semantic analysis. However, due to the limitations of knowledge graph representation learning, large models in question-answering systems often generate hallucinatory content that is inconsistent with the facts when generating answers, seriously affecting the reliability of the systems. Early knowledge graph embedding methods were mostly based on Euclidean space, which models entities and relationships through its linear geometric properties. While they perform well for symmetric and simple relationships, they lack the ability to model hierarchical structures and cyclic dependencies, making them prone to logical errors and hallucinatory content in the reasoning generated by large models. To overcome these problems, researchers have proposed complex space embedding methods. Complex space enhances the representation of symmetric and antisymmetric relationships through algebraic operations and improves the modeling of relationship changes. However, complex space cannot fully adapt to the complex semantics and relationship diversity in knowledge graphs, and performance bottlenecks remain, especially when modeling hierarchical and cyclic relationships. Furthermore, complex space can exacerbate the overgeneralization of complex relationships in large models, increasing the risk of hallucinations. To further enhance modeling capabilities, non-Euclidean embedding methods have been introduced. These methods leverage the geometric properties of hyperbolic and hyperspherical spaces to significantly improve the representation of complex relationships in knowledge graphs. Hyperbolic space leverages its exponential volume growth to better capture hierarchical structures, while hyperspherical space is particularly effective in handling cyclic dependencies. However, single non-Euclidean embeddings have limited performance when dealing with knowledge graphs with mixed geometric features and struggle to fully capture different types of relationships. Furthermore, these methods may exacerbate the risk of large model hallucinations due to the loss of geometric structure information in high-dimensional semantic spaces.

[0003] To solve the above problems, the geometric interaction embedding method proposed in recent years realizes collaborative reasoning through a dynamic interaction mechanism. This method can fully capture the hierarchical and cyclical semantic features in the knowledge graph, and performs well in tasks such as long-tail entity prediction, complex relationship reasoning, and cross-domain knowledge transfer. However, existing methods generally rely on tangent space approximation technology, which leads to the loss of some geometric structure information. In addition, the lack of a dynamic weight distribution mechanism makes it difficult to adjust the contribution ratio of different geometric spaces according to specific semantic requirements, which limits its application in complex scenarios. In response to the above problems, this patent proposes an optimization method based on knowledge graph representation learning to improve geometric interaction embedding, dynamically balance the contribution ratio of different geometric spaces, and reduce the loss of geometric information, thereby effectively reducing the risk of hallucinations in large models of question-answering systems. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings and deficiencies of the existing technology and propose a method for reducing the hallucination of large models in question-answering systems based on knowledge graph representation learning. The method can capture richer and more refined hierarchical and cyclical semantic features, achieve low-distortion multi-geometric space fusion embedding representation, and effectively constrain the logical reasoning path of large models through geometric interactive embedding representation learning methods, thereby significantly reducing the hallucination problems caused by them in complex reasoning tasks.

[0005] To achieve the above objectives, the present invention provides a technical solution: a method for reducing large model hallucinations in question-answering systems based on knowledge graph representation learning, comprising the following steps:

[0006] S1: We analyze the local geometric properties of relationships between nodes in a knowledge graph by calculating Ricci curvature. A knowledge graph is a semantic network that uses entity-relationship-entity triplets to structure knowledge. Ricci curvature is an important tool for describing the geometric shape and spatial curvature of a manifold. It reflects local geometric properties and the connectivity between pairs of points. We then approximate embedding of entities and relationships into three geometric spaces: Euclidean, hyperbolic, and hyperspherical. We generate embedded representations of entities and relationships in these different geometric spaces, unraveling the geometric patterns contained in the knowledge graph and independently learning the geometric properties of entities in each space.

[0007] S2: In Euclidean and hyperbolic spaces, geometric transformations between entities are modeled using special orthogonal groups and special Euclidean groups. Special orthogonal groups are used to describe rotational transformations between entities, while special Euclidean groups combine rotations and translations. In hyperspherical space, polar coordinate operators are used to simulate rotation operations to capture complex geometric relationships between entities.

[0008] S3: Aggregate entity information from different neighbors in three geometric spaces to generate new entity representations. Project the embedding representation in the hyperbolic space to the tangent space, which is the local Euclidean approximation space of the manifold at a certain point, through a logarithmic mapping, to generate the corresponding embedding representation in the tangent space. In the hyperspherical space, convert the polar coordinate representation of the entity relationship into a Cartesian coordinate representation. Use the attention mechanism to fuse the embedding representations in the Euclidean space, the tangent space, and the hyperspherical space, effectively integrating information from different geometric spaces in the tangent space.

[0009] S4: The embedded representation integrated in the tangent space is mapped back to Euclidean space, hyperbolic space, and hyperspherical space through exponential mapping, generating embedded representations that adapt to different geometric spaces. At the same time, a dynamic curvature adaptive adjustment strategy is introduced, which flexibly adjusts the curvature of the target space based on the continuity of the chain structure, the tree-like characteristics of the hierarchical structure, and the closed-loop characteristics of the cyclic structure in the knowledge graph. This dynamic curvature adaptive adjustment strategy optimizes the accuracy and adaptability of the embedded representation in capturing the different structural features of the knowledge graph, and lays the foundation for subsequent multi-space collaborative verification and knowledge system construction.

[0010] S5: Utilize the embedded representations generated by Euclidean space, hyperbolic space, and hyperspherical space to construct a geometrically optimized structured knowledge system, thereby generating implicit knowledge through the chain structure, hierarchical structure, and cyclic structure contained in the knowledge graph. Implicit knowledge is integrated into the question-answering system as contextual information, providing a reliable factual basis for the large model of the question-answering system, preventing it from fabricating answers when knowledge is missing, and ensuring that the answers generated by the large model are consistent with real knowledge.

[0011] Furthermore, in step S1, Ollivier Ricci curvature calculation is used to map the entities in the knowledge graph to Euclidean space, hyperbolic space, and hyperspherical space, generating Euclidean embedding representation, hyperbolic embedding representation, and hyperspherical embedding representation, respectively. The hyperbolic space mapping adopts the Poincaré sphere model, and the hyperspherical space mapping adopts the positive curvature manifold model.

[0012] Furthermore, in step S2, geometric transformation modeling is performed on the relationship between entities based on special orthogonal groups and special Euclidean groups in Euclidean space and hyperbolic space, and reflection, translation, and rotation operations are used to model the complex interactions between entities and relationships. Polar coordinate operators are introduced in the hypersphere space to simulate rotation operations. In the vector transformation function, entity and relationship operations are converted as input into entity-relationship embeddings, the original Cartesian coordinate form is converted into polar coordinate form, and the converted polar coordinates are used to simulate rotation operations. For each angular coordinate, the polar coordinates of the entity and relationship are added, and the modulus is taken to ensure that the result is within a certain range. Finally, the polar coordinate form is converted into the Cartesian coordinate form according to the transformation formula of the d-dimensional sphere. The expression is as follows:

[0013]

[0014] Where, v i is an entity node in the knowledge graph, d is the dimension of the hypersphere, k is the curvature parameter of the geometric space, is the entity node v in the hypersphere space i In Cartesian coordinate form, Represents the entity node v in the hypersphere space iThe original vector eigenvalue of dimension d in Cartesian coordinates, is the entity node v in the hypersphere space i The polar coordinate form of Represents the entity node v in the hypersphere space i The angle represents the d-1th dimension component of the vector, rad represents the radial component of the node in the hyperspherical space, and w S is the radius of the node in the hypersphere space, is the polar form of the relationship in hyperspherical space, The angle representing the relationship in the hyperspherical space represents the d-1th dimension component of the vector, is the entity node v after rotation in the hypersphere space i The polar coordinate form of is the entity node v after rotation in the hypersphere space i In Cartesian coordinate form, is the entity node v after rotation in the hypersphere space i The d-th dimension of the Cartesian coordinates of .

[0015] Furthermore, the specific operation steps of step S3 are as follows:

[0016] S31: Geometric interaction captures information about different spatial structures through message propagation, including Euclidean space, hyperbolic space, and hyperspherical space. In these spaces with different geometric properties, the construction of the structure depends on their respective metrics. Logarithmic and exponential mappings provide a mechanism that enables geometric information to be transferred between different spaces, enabling cross-spatial interaction.

[0017] S32: Through high-order aggregation, multi-space fusion, and attention mechanisms, we integrate the geometric properties of Euclidean space, hyperbolic space, and hyperspherical space to generate a unified embedding representation. The details are as follows:

[0018] a. High-order aggregation to construct multi-spatial entity representation:

[0019] During the n-th order aggregation process, the entity representation is continuously updated through a message passing mechanism, with each layer aggregating information about neighboring entities into the current entity. Euclidean space captures distance information through linear transformations, hyperbolic space handles nonlinear growth relational structures through Möbius addition, and hyperspherical space is suitable for capturing periodic or directional information. After n-th order aggregation, the entity representation contains not only the information of first-order neighbors but also the indirect influence of higher-order neighbors, as expressed as follows:

[0020]

[0021] Where o is the reference point, is the head entity after n-dimensional aggregation in Euclidean space, is the head entity after n-dimensional aggregation in hyperbolic space, is the head entity after d-dimensional aggregation in the hyperspherical space, G l is a subgraph in the knowledge graph, h is the head entity, t is the tail entity, r is the relationship, is the relationship vector between entities and relations, It means mapping the integrated information back to the space with curvature k with o as the reference point. Indicates mapping the neighborhood head entity of the Euclidean space to the tangent space, Indicates mapping the neighborhood head entity of the hyperbolic space to the tangent space, Indicates mapping the neighborhood head entity of the hypersphere space to the tangent space, represents the tensor product operation based on curvature k, represents the representation of the neighbor head entity h in the n-1th dimension in Euclidean space, represents the representation of the neighbor head entity h in the n-1th dimension in the hyperbolic space, represents the representation of the neighbor head entity h in the d-1th dimension in the hypersphere space, represents the representation of the neighbor tail entity t in the n-1th dimension in the Euclidean space, is the vector addition operation based on curvature k, represents the representation of the neighbor tail entity t in the n-1th dimension in the hyperbolic space, represents the representation of the neighbor tail entity t in the d-1th dimension in the hypersphere space, is a relational representation in Euclidean space, is a relational representation in hyperbolic space, is a relational representation in hyperspherical space;

[0022] b. Generation of fusion representations of different spaces:

[0023] The representations generated in multiple spaces need to be further fused to integrate the characteristics of each space. Different spaces are suitable for modeling information of different structural types. Euclidean space is suitable for modeling local linear relationships, hyperbolic space is suitable for processing hierarchical and tree structures, and hyperspherical space can capture directional or periodic features. The unique geometric characteristics of each space are retained by hierarchically integrating the single-layer representations in different spaces and generating the final fused representation through splicing operations. The expression is as follows:

[0024]

[0025] Where, is the representation of the head entity after multi-dimensional aggregation in Euclidean space, is the representation of the head entity after multi-dimensional aggregation in the hyperbolic space, is the representation of the head entity after multi-dimensional aggregation in the hyperspherical space, represents the n-th dimension embedding vector generated in Euclidean space, represents the n-th dimension embedding vector generated in the hyperbolic space, represents the n-th dimension embedding vector generated in the hypersphere space;

[0026] c. Attention weight distribution across space:

[0027] By dynamically assigning weights through the attention mechanism, local and global information are fully combined to achieve cross-space geometric information propagation. The attention mechanism assigns different weights to the representations in Euclidean space, hyperbolic space, and hyperspherical space based on the feature importance of the entity, so that the contribution of each space is dynamically adjusted to better adapt to the diverse relationship modeling needs. The expression is as follows:

[0028]

[0029] Where, represents a unified embedding representation that integrates information from Euclidean space, hyperbolic space, and hyperspherical space. It means mapping the point in the hyperbolic space back to the tangent space with o as the reference point. is the attention weight in Euclidean space, is the attention weight in hyperbolic space, is the attention weight in the hypersphere space.

[0030] Furthermore, in step S4, the characteristics of different geometric spaces can be flexibly integrated through geometric interaction to adapt to the chain structure, hierarchical structure, and cyclic structure in the knowledge graph; based on dynamic curvature adjustment, the local geometric characteristics of the space are optimized, and the expression is as follows:

[0031]

[0032] Where a is a vector in the geometric space, x is a base point in the geometric space, and b is another target node in the geometric space. It represents the point obtained from point x by the exponential mapping in the geometric space of curvature k according to the vector direction of a. As k→0, the mapping degenerates into linear addition in Euclidean space. represents a logarithmic mapping from point x to point b in a geometric space of curvature k. As k→0, the mapping degenerates into vector subtraction in Euclidean space.

[0033] For hierarchical structures, by setting negative curvature k < 0, the local structure of the embedding space is made closer to the hyperbolic space, so as to better represent the hierarchical relationship; for cyclic structures, by setting positive curvature k > 0, the embedding space is adjusted to a hyperspherical space, so as to effectively model the cyclic relationship.

[0034] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0035] 1. The present invention directly models the relationship transformation through polar coordinate rotation in the hypersphere space, avoiding the loss of geometric structure information caused by traditional tangent space approximation and achieving more accurate knowledge embedding representation.

[0036] 2. This paper designs a dynamic interaction between Euclidean, hyperbolic, and hyperspherical spaces, combined with a dynamic curvature adaptive adjustment strategy, to optimize the embedding representation of different geometric spaces and assign optimal spatial weights to different relationship types. This multi-space collaborative optimization not only enhances the robustness of knowledge representation but also identifies potential knowledge contradictions through geometric consistency checks, significantly reducing the risk of hallucinations in large models during knowledge reasoning.

[0037] In summary, the present invention effectively reduces geometric structure distortion and optimizes the embedding quality of knowledge graphs through direct modeling of hyperspherical space and adaptive multi-space interaction, thereby providing more accurate structured knowledge support for large models and significantly reducing the possibility of hallucinations during knowledge reasoning. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a framework diagram of the method of the present invention; in the figure, k is the curvature parameter of the geometric space, is a Euclidean space, is a hyperspherical space, is a hyperbolic space, is the head entity of the hyperspherical space, is the relationship of the hyperspherical space, is the tail entity of the hypersphere space, is the head entity of the hyperbolic space, is a hyperbolic space relationship, is the tail entity of the hyperbolic space, is the head entity of Euclidean space, For the relationship in Euclidean space, is the tail entity of Euclidean space, r k is the relationship in the curvature k-space, h is the head entity, log x (y) represents mapping point y on the manifold to the tangent space with x as the base point, is the tangent space at point x, For popular, is the entity node v after rotation in the hypersphere space i In Cartesian coordinate form, is the entity node v in Euclidean space i The updated representation is, is the entity node v in the hyperbolic space i The updated representation is, is the head entity of d-dimensional aggregation in the hyperspherical space, is the head entity of n-dimensional aggregation in Euclidean space, is the head entity of n-dimensional aggregation in hyperbolic space, is the attention weight in Euclidean space, is the attention weight in hyperbolic space, is the attention weight in the hypersphere space, It means mapping the integrated information back to the space with curvature k with o as the reference point. It means mapping the point in the hyperbolic space back to the tangent space with o as the reference point. DETAILED DESCRIPTION

[0039] The present invention will be described in further detail below with reference to the embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0040] like Figure 1 As shown, this embodiment discloses a method for reducing the large model hallucination of the question-answering system based on knowledge graph representation learning, which has the following characteristics:

[0041] 1) Knowledge graph structure embedding:

[0042] Using Ollivier-Ricci curvature calculations, entities and relationships in the knowledge graph are mapped to Euclidean, hyperbolic, and hyperspherical spaces, generating a variety of embedding representations. The choice of different geometric spaces allows for better adaptation to the diverse structural characteristics of the knowledge graph. Euclidean space is suitable for flat structures, hyperbolic space is well-suited for hierarchical structures, and hyperspherical space excels at modeling cyclic structures. Ollivier-Ricci curvature analyzes the geometric relationships and curvature characteristics between nodes in the graph, measuring the strength of connections between nodes and their local geometric properties. This provides an important basis for generating embedding representations, enabling a precise characterization and expression of the knowledge graph structure.

[0043] 2) Modeling the relationship between Euclidean space, hyperbolic space, and hyperspherical space:

[0044] Geometric transformations are used to model the relationships between entities based on special orthogonal groups and special Euclidean groups in Euclidean and hyperbolic spaces, and reflection, translation, and rotation operations are used to model the complex interactions between entities and relationships.

[0045] Polar coordinate operators are introduced in the hypersphere space to simulate rotation operations. In the vector transformation function, entity and relationship operations are converted into entity-relationship embeddings as input, the original Cartesian coordinates are converted into polar coordinates, and the converted polar coordinates are used to simulate rotation operations. For each angle coordinate, the polar coordinates of the entity and relationship are added, and the modulus is taken to ensure that the result is within a certain range. Finally, the polar coordinates are converted into Cartesian coordinates according to the transformation formula of the d-dimensional sphere. The expression is as follows:

[0046]

[0047]

[0048] Where, v i is an entity node in the knowledge graph, d is the dimension of the hypersphere, k is the curvature parameter of the geometric space, is the entity node v in the hypersphere space i In Cartesian coordinate form, Represents the entity node v in the hypersphere space i The original vector eigenvalue of dimension d in Cartesian coordinates, is the entity node v in the hypersphere space i The polar coordinate form of Represents the entity node v in the hypersphere space i The angle represents the d-1th dimension component of the vector, rad represents the radial component of the node in the hyperspherical space, and w S is the radius of the node in the hypersphere space, is the polar form of the relationship in hyperspherical space, The angle representing the relationship in the hyperspherical space represents the d-1th dimension component of the vector, is the entity node v after rotation in the hypersphere space i The polar coordinate form of is the entity node v after rotation in the hypersphere space i In Cartesian coordinate form, is the entity node v after rotation in the hypersphere space i The d-th dimension of the Cartesian coordinates of .

[0049] 3) Multi-space geometric interaction:

[0050] Geometric interaction captures information about different spatial structures through message propagation, including Euclidean space, hyperbolic space, and hyperspherical space. In these spaces with different geometric characteristics, the construction of the structure depends on their respective metrics. Logarithmic and exponential mappings provide a mechanism that enables geometric information to be transferred between different spaces, enabling cross-spatial interaction. Through high-order aggregation, multi-space fusion, and attention mechanisms, the geometric characteristics of Euclidean space, hyperbolic space, and hyperspherical space are integrated to generate a unified and efficient representation. The details are as follows:

[0051] a. High-order aggregation to construct multi-spatial entity representation:

[0052] During the n-th order aggregation process, the entity representation is continuously updated through a message passing mechanism, with each layer aggregating information about neighboring entities into the current entity. Euclidean space captures distance information through linear transformations, hyperbolic space handles nonlinear growth relational structures through Möbius addition, and hyperspherical space is suitable for capturing periodic or directional information. After n-th order aggregation, the entity representation contains not only the information of first-order neighbors but also the indirect influence of higher-order neighbors, as expressed as follows:

[0053]

[0054] Where o is the reference point, is the head entity after n-dimensional aggregation in Euclidean space, is the head entity after n-dimensional aggregation in hyperbolic space, is the head entity after d-dimensional aggregation in the hyperspherical space, G l is a subgraph in the knowledge graph, h is the head entity, t is the tail entity, r is the relationship, is the relationship vector between entities and relations, It means mapping the integrated information back to the space with curvature k with o as the reference point. Indicates mapping the neighborhood head entity of the Euclidean space to the tangent space, Indicates mapping the neighborhood head entity of the hyperbolic space to the tangent space, Indicates mapping the neighborhood head entity of the hypersphere space to the tangent space, represents the tensor product operation based on curvature k, represents the representation of the neighbor head entity h in the n-1th dimension in Euclidean space, represents the representation of the neighbor head entity h in the n-1th dimension in the hyperbolic space, represents the representation of the neighbor head entity h in the d-1th dimension in the hypersphere space, represents the representation of the neighbor tail entity t in the n-1th dimension in the Euclidean space, is the vector addition operation based on curvature k, represents the representation of the neighbor tail entity t in the n-1th dimension in the hyperbolic space, represents the representation of the neighbor tail entity t in the d-1th dimension in the hypersphere space, is a relational representation in Euclidean space, is a relational representation in hyperbolic space, is a relational representation in hyperspherical space;

[0055] b. Generation of fusion representations of different spaces:

[0056] The representations generated in multiple spaces need to be further fused to synthesize the characteristics of each space. By hierarchically integrating the single-layer representations in different spaces and generating the final fused representation through splicing operations, the unique geometric characteristics of each space are retained. The expression is as follows:

[0057]

[0058] Where, is the representation of the head entity after multi-dimensional aggregation in Euclidean space, is the representation of the head entity after multi-dimensional aggregation in the hyperbolic space, is the representation of the head entity after multi-dimensional aggregation in the hyperspherical space, represents the first-dimensional embedding vector generated in Euclidean space, represents the first-dimensional embedding vector generated in the hyperbolic space, Represents the first-dimensional embedding vector generated in the hypersphere space;

[0059] c. Attention weight distribution across space:

[0060] After the fusion representation, the attention mechanism dynamically assigns weights to fully combine local and global information and realize the propagation of geometric features across space. The attention mechanism assigns different weights to the representations in Euclidean space, hyperbolic space, and hyperspherical space according to the importance of entity features, so that the contribution of each space is dynamically adjusted to better adapt to the diverse relationship modeling needs. The expression is as follows:

[0061]

[0062] Where, represents a unified embedding representation that integrates information from Euclidean space, hyperbolic space, and hyperspherical space. It means mapping the point in the hyperbolic space back to the tangent space with o as the reference point. is the attention weight in Euclidean space, is the attention weight in hyperbolic space, is the attention weight in the hypersphere space.

[0063] 4) Adaptive Fusion:

[0064] The characteristics of different geometric spaces can be flexibly integrated through geometric interactions to adapt to the chain structure, hierarchical structure and cyclic structure in the graph. Based on dynamic curvature adjustment, the local geometric characteristics of the space can be optimized, and its expression is as follows:

[0065]

[0066] Where a is a vector in the geometric space, x is a base point in the geometric space, and b is another target node in the geometric space. represents the point obtained from point x by the exponential mapping in the geometric space of curvature k according to the vector direction of a; as k→0, the mapping degenerates into linear addition in Euclidean space, represents a logarithmic mapping from point x to point b in a geometric space of curvature k. As k→0, the mapping degenerates into vector subtraction in Euclidean space.

[0067] This paper selected three datasets widely used in knowledge graph research: WN18RR, FB15k-237, and YAGO3-10. These datasets cover symmetric, antisymmetric, and compositional relationships, effectively testing the ability of knowledge graph embedding methods to handle different types of relational structures. The WN18RR dataset contains 40,943 entities and 11 relationships; the FB15k-237 dataset contains 14,541 entities and 237 relationships; and the YAGO3-10 dataset contains 123,182 entities and 37 relationships. Each dataset is divided into training, validation, and test sets.

[0068] Finally, a scoring function is used to score the triples in the knowledge graph. Similar to previous methods, this method uses two ranking-based metrics: ① Mean Reciprocal Rank (MRR), which measures the quality of the method's ranking of correct entities; and ② Hit Rate at K (H@K, K∈{1,3,10}), which measures the proportion of correct triples among the top K triples predicted by the method.

[0069] In order to comprehensively evaluate the effectiveness of this method in knowledge-aware reasoning tasks, this paper selected a variety of knowledge graph embedding methods for comparison. These methods cover single space and multiple geometric interaction spaces, including Euclidean, complex, hyperbolic, spherical, mixed curvature and geometric interaction spaces. The experimental results are shown in Table 1. is a Euclidean space, is a complex space, is a hyperbolic space, is a spherical space, is a mixed curvature space, It is a geometric interactive space.

[0070] Table 1 Experimental results analysis table

[0071]

[0072]

[0073] The experimental results can fully demonstrate the effectiveness of the method of the present invention. The traditional Euclidean space method is mainly due to its linear topological structure, which makes it difficult to effectively capture the hierarchical structure that is prevalent in the knowledge graph; while the hyperbolic space method benefits from the natural adaptability of negative curvature geometry to the tree structure, and the effect is improved on this basis. However, a single space is still unable to effectively learn the various structures contained in the knowledge graph. The mixed curvature method enhances the structural adaptability through multi-space joint optimization, but it will produce relative information loss when mapping the representation in the non-Euclidean space to the tangent space. In contrast, the geometric interaction method innovatively adopts the explicit transformation mechanism of a single geometric space, and further optimizes the existing spatial interaction method. By introducing polar coordinate transformation in the hypersphere space, it avoids the information loss of the traditional method when projecting to the tangent space, while maintaining parameter efficiency and improving the effect.

[0074] Experimental conclusion: This method aims to solve the problems of geometric distortion and incomplete information expression caused by the embedding of knowledge graphs in non-Euclidean spaces in knowledge reasoning of large models, and proposes a method based on knowledge graph representation learning to reduce the hallucination of large models in question-answering systems. By selecting three general datasets on the knowledge graph for experimental evaluation, the results show that this method has improved the accuracy and efficiency of knowledge-aware reasoning tasks, and outperforms existing methods. In subsequent research, we will strive to build a more comprehensive and higher-quality knowledge graph embedding method to further improve the training effect and generalization ability of this method. In addition, we plan to explore higher-dimensional geometric space methods to better mine complex entity relationships and cross-level and cross-domain associations. Finally, we will expand the scope of research, focus on maintaining computational efficiency on large-scale datasets, and combine distributed computing technology to further improve the effectiveness of the method.

[0075] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.

Claims

1. A method for reducing large model hallucinations in question-answering systems based on knowledge graph representation learning, characterized by: The following steps are involved: S1: We analyze the local geometric properties of relationships between nodes in a knowledge graph by calculating Ricci curvature. A knowledge graph is a semantic network that uses entity-relationship-entity triplets to structure knowledge. Ricci curvature is an important tool for describing the geometric shape and spatial curvature of a manifold. It reflects local geometric properties and the connectivity between pairs of points. We then approximate embedding of entities and relationships into three geometric spaces: Euclidean, hyperbolic, and hyperspherical. We generate embedded representations of entities and relationships in these different geometric spaces, unraveling the geometric patterns contained in the knowledge graph and independently learning the geometric properties of entities in each space. S2: In Euclidean and hyperbolic spaces, geometric transformations between entities are modeled using special orthogonal groups and special Euclidean groups. Special orthogonal groups are used to describe rotational transformations between entities, while special Euclidean groups combine rotations and translations. In hyperspherical space, polar coordinate operators are used to simulate rotation operations to capture complex geometric relationships between entities. S3: Aggregate entity information from different neighbors in three geometric spaces to generate new entity representations. Project the embedding representation in the hyperbolic space to the tangent space, which is the local Euclidean approximation space of the manifold at a certain point, through a logarithmic mapping, to generate the corresponding embedding representation in the tangent space. In the hyperspherical space, convert the polar coordinate representation of the entity relationship into a Cartesian coordinate representation. Use the attention mechanism to fuse the embedding representations in the Euclidean space, the tangent space, and the hyperspherical space, effectively integrating information from different geometric spaces in the tangent space. S4: The embedded representation integrated in the tangent space is mapped back to the Euclidean space, hyperbolic space, and hyperspherical space through exponential mapping to generate embedded representations adapted to different geometric spaces; At the same time, a dynamic curvature adaptive adjustment strategy is introduced, which flexibly adjusts the curvature of the target space according to the continuity of the chain structure, the tree-like characteristics of the hierarchical structure, and the closed-loop characteristics of the cyclic structure in the knowledge graph; S5: Utilize the embedded representations generated by Euclidean space, hyperbolic space, and hyperspherical space to construct a geometrically optimized structured knowledge system, thereby generating implicit knowledge through the chain structure, hierarchical structure, and cyclic structure contained in the knowledge graph. Implicit knowledge is integrated into the question-answering system as contextual information, providing a reliable factual basis for the large model of the question-answering system, preventing it from fabricating answers when knowledge is missing, and ensuring that the answers generated by the large model are consistent with real knowledge.

2. The method for reducing large model hallucination in question answering systems based on knowledge graph representation learning according to claim 1 is characterized in that: In step S1, Ollivier-Ricci curvature calculation is used to map the entities in the knowledge graph to Euclidean space, hyperbolic space, and hyperspherical space, generating Euclidean embedding representation, hyperbolic embedding representation, and hyperspherical embedding representation, respectively. The hyperbolic space mapping adopts the Poincaré sphere model, and the hyperspherical space mapping adopts the positive curvature manifold model.

3. The method for reducing large model hallucination in question answering systems based on knowledge graph representation learning according to claim 2 is characterized in that: In step S2, geometric transformation modeling is performed on the relationships between entities based on special orthogonal groups and special Euclidean groups in Euclidean space and hyperbolic space, and reflection, translation, and rotation operations are used to model the complex interactions between entities and relationships. Polar coordinate operators are introduced in the hypersphere space to simulate rotation operations. In the vector transformation function, entity and relationship operations are converted as input into entity-relationship embeddings, the original Cartesian coordinate form is converted into polar coordinate form, and the converted polar coordinates are used to simulate rotation operations. For each angular coordinate, the polar coordinates of the entity and relationship are added, and the modulus is taken to ensure that the result is within a certain range. Finally, the polar coordinate form is converted into the Cartesian coordinate form according to the transformation formula of the d-dimensional sphere. The expression is as follows: Where, v i is an entity node in the knowledge graph, d is the dimension of the hypersphere, k is the curvature parameter of the geometric space, is the entity node v in the hypersphere space i In Cartesian coordinate form, Represents the entity node v in the hypersphere space i The original vector eigenvalue of dimension d in Cartesian coordinates, is the entity node v in the hypersphere space i The polar coordinate form of Represents the entity node v in the hypersphere space i The angle represents the d-1th dimension component of the vector, rad represents the radial component of the node in the hyperspherical space, and w S is the radius of the node in the hyperspherical space, is the polar form of the relationship in hyperspherical space, The angle representing the relationship in the hyperspherical space represents the d-1th dimension component of the vector, is the entity node v after rotation in the hypersphere space i The polar coordinate form of is the entity node v after rotation in the hypersphere space i In Cartesian coordinate form, is the entity node v after rotation in the hypersphere space i The d-th dimension of the Cartesian coordinates of .

4. The method for reducing large model hallucination in question answering systems based on knowledge graph representation learning according to claim 3 is characterized in that: The specific steps of step S3 are as follows: S31: Geometric interaction captures information about different spatial structures through message propagation, including Euclidean space, hyperbolic space, and hyperspherical space. In these spaces with different geometric properties, the construction of the structure depends on their respective metrics. Logarithmic and exponential mappings provide a mechanism that enables geometric information to be transferred between different spaces, enabling cross-spatial interaction. S32: Through high-order aggregation, multi-space fusion, and attention mechanisms, we integrate the geometric properties of Euclidean space, hyperbolic space, and hyperspherical space to generate a unified embedding representation. The details are as follows: a. High-order aggregation to construct multi-spatial entity representation: During the n-th order aggregation process, the entity representation is continuously updated through a message passing mechanism, with each layer aggregating information about neighboring entities into the current entity. Euclidean space captures distance information through linear transformations, hyperbolic space handles nonlinear growth relational structures through Möbius addition, and hyperspherical space is suitable for capturing periodic or directional information. After n-th order aggregation, the entity representation contains not only the information of first-order neighbors but also the indirect influence of higher-order neighbors, as expressed as follows: Where o is the reference point, is the head entity after n-dimensional aggregation in Euclidean space, is the head entity after n-dimensional aggregation in hyperbolic space, is the head entity after d-dimensional aggregation in the hyperspherical space, G l is a subgraph in the knowledge graph, h is the head entity, t is the tail entity, r is the relationship, is the relationship vector between entities and relations, It means mapping the integrated information back to the space with curvature k with o as the reference point. Indicates mapping the neighborhood head entity of Euclidean space to the tangent space, Indicates mapping the neighborhood head entity of the hyperbolic space to the tangent space, Indicates mapping the neighborhood head entity of the hypersphere space to the tangent space, represents the tensor product operation based on curvature k, represents the representation of the neighbor head entity h in the n-1th dimension in Euclidean space, represents the representation of the neighbor head entity h in the n-1th dimension in the hyperbolic space, represents the representation of the neighbor head entity h in the d-1th dimension in the hypersphere space, represents the representation of the neighbor tail entity t in the n-1th dimension in the Euclidean space, is the vector addition operation based on curvature k, represents the representation of the neighbor tail entity t in the n-1th dimension in the hyperbolic space, represents the representation of the neighbor tail entity t in the d-1th dimension in the hypersphere space, is a relational representation in Euclidean space, is a relational representation in hyperbolic space, is a relational representation in hyperspherical space; b. Generation of fusion representations of different spaces: The representations generated in multiple spaces need to be further fused to integrate the characteristics of each space. Different spaces are suitable for modeling information of different structural types. Euclidean space is suitable for modeling local linear relationships, hyperbolic space is suitable for processing hierarchical and tree structures, and hyperspherical space can capture directional or periodic features. The unique geometric characteristics of each space are retained by hierarchically integrating the single-layer representations in different spaces and generating the final fused representation through splicing operations. The expression is as follows: Where, is the representation of the head entity after multi-dimensional aggregation in Euclidean space, is the representation of the head entity after multi-dimensional aggregation in the hyperbolic space, is the representation of the head entity after multi-dimensional aggregation in the hyperspherical space, represents the n-th dimension embedding vector generated in Euclidean space, represents the n-th dimension embedding vector generated in the hyperbolic space, represents the n-th dimension embedding vector generated in the hypersphere space; c. Attention weight distribution across space: By dynamically assigning weights through the attention mechanism, local and global information are fully combined to achieve cross-space geometric information propagation. The attention mechanism assigns different weights to the representations in Euclidean space, hyperbolic space, and hyperspherical space based on the feature importance of the entity, so that the contribution of each space is dynamically adjusted to better adapt to the diverse relationship modeling needs. The expression is as follows: Where, represents a unified embedding representation that integrates information from Euclidean space, hyperbolic space, and hyperspherical space. It means mapping the point in the hyperbolic space back to the tangent space with o as the reference point. is the attention weight in Euclidean space, is the attention weight in hyperbolic space, is the attention weight in the hypersphere space.

5. The method for reducing large model hallucination in question answering systems based on knowledge graph representation learning according to claim 4 is characterized in that: In step S4, the characteristics of different geometric spaces can be flexibly integrated through geometric interaction to adapt to the chain structure, hierarchical structure, and cyclic structure in the knowledge graph; based on dynamic curvature adjustment, the local geometric characteristics of the space are optimized, and the expression is as follows: Where a is a vector in the geometric space, x is a base point in the geometric space, and b is another target node in the geometric space. It represents the point obtained from point x by the exponential mapping in the geometric space of curvature k according to the vector direction of a. As k→0, the mapping degenerates into linear addition in Euclidean space. represents a logarithmic mapping from point x to point b in a geometric space of curvature k. As k→0, the mapping degenerates into vector subtraction in Euclidean space. For hierarchical structures, by setting the negative curvature k < 0, the local structure of the embedded space is made closer to the hyperbolic space, so as to better represent the hierarchical relationship; For cyclic structures, by setting the positive curvature k>0, the embedding space is adjusted to a hyperspherical space, thereby effectively modeling the cyclic relationship.

Citation Information

Patent Citations

  • Multi-space knowledge enhancement knowledge graph question and answer method and system

    CN114254093A

  • Knowledge graph geometric representation method based on multi-view information bottleneck

    CN118898288A

  • Discrete dynamic graph link prediction method based on adaptive product space

    CN119623512A

  • Multi-layer and multi-modal temporal knowledge graph construction and learning for data-driven decision support

    WO2024201125A1

Cited By

  • Large model illusion suppression training method and system fused with real-time fact library verification

    CN121257756A