A strategy-oriented knowledge graph enhanced generation of a compilable evidence path retrieval method

By constructing a three-dimensional authorization granularity and hierarchical strategy execution architecture of query-user-path, the dynamic authorization problem of multi-hop evidence paths in knowledge graphs is solved, achieving accurate determination of path-level visibility and security of the retrieval process, blocking the leakage of unauthorized evidence and side-channel attacks, and improving the system's security protection capabilities in sensitive scenarios.

CN123158677APending Publication Date: 2026-11-24SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611364969.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing knowledge graph access control technologies cannot effectively address the dynamic, fine-grained, and context-sensitive authorization requirements of multi-hop evidence paths, leading to the leakage of unauthorized evidence due to semantic relevance and side-channel attacks. There is a lack of dynamic alignment mechanisms between natural language query intent and path-level security policies.

Method used

We construct a three-dimensional fine-grained authorization system encompassing query, user, and path, employing a graph-expanded pre-constraint mechanism and a hierarchical strategy execution architecture. Through compilable authorization predicates and residual strategies, we achieve path-level visibility determination and hard blocking, ensuring the security and efficiency of the retrieval process.

Benefits of technology

It achieves accurate path-level visibility determination, blocks retrieval leakage and side-channel attacks, improves the data security protection capability of the knowledge graph enhancement generation system in sensitive scenarios, and ensures the compliance and interpretability of the system at the topology level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123158677A_ABST
    Figure CN123158677A_ABST
Patent Text Reader

Abstract

This invention discloses a method for retrieving policy-compilable evidence paths for knowledge graph augmentation generation. The method includes constructing a query-user authorization profile based on query and user authorization information; starting from the authorization seed entity, hard-constrained expansion of edges, nodes, and partial paths in the graph based on a compilation policy executable during the retrieval phase; semantic relevance scoring only for policy-feasible evidence paths; secondary verification of residual policies requiring runtime judgment; and providing the top k verified evidence paths to the language model. This invention substantially improves the data security protection capabilities of knowledge graph augmentation generation systems from three levels: authorization granularity, execution blocking, and architectural layering, while ensuring retrieval accuracy and response efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information retrieval technology, and in particular to a strategy-compilable evidence path retrieval method for knowledge graph augmentation generation. Background Technology

[0002] Knowledge Graph Augmented Generation (KAG) technology has demonstrated significant advantages in knowledge-intensive natural language processing tasks in recent years. This technology transforms user natural language queries into structured retrieval operations on a graph database, extracts entities, relations, subgraphs, and multi-hop paths from the knowledge graph as structured evidence, and fuses this evidence with the context of a language model, thereby improving the factual accuracy and interpretability of the answers.

[0003] Existing graph database access control typically targets user-submitted Cypher, SPARQL, or path queries; document-level security retrieval typically filters documents, slices, or tenants; and filtered approximate nearest neighbor retrieval typically targets metadata predicates of a single vector.

[0004] In the field of document retrieval, commonly used security retrieval strategies include inverted index filtering based on document-level permissions, partitioned storage based on tenant identifiers, and access control lists (ACLs) based on metadata tags. These methods rely on coarse-grained isolation at the document, chunk, or tenant level, and their security determination objects are static document units, rather than dynamically related sequences of entities in a graph structure. Similarly, in vector retrieval scenarios, filtered approximate nearest neighbor (ANN) retrieval allows scalar metadata predicates to be applied to candidate results before or after vector similarity searches, thereby achieving security constraints. However, this type of metadata filtering can only operate on document fragments corresponding to a single vector, and cannot express path-level authorization rules involving multi-hop relation sequences, let alone handle new sensitive information derived from path combinations during the query process.

[0005] The aforementioned technical limitations have led to the following pressing problems that need to be addressed: First, there is a lack of effective computational models for determining the authorization of dynamically generated evidence paths. When a language model extracts multi-hop paths from a knowledge graph as evidence based on the user's question intent, the visibility of each path depends not only on whether the nodes and edges constituting the path are authorized, but also on the combined semantics of these elements in a specific topological order. Existing systems typically use security constraints as ranking penalties during the retrieval phase, but such soft constraints cannot guarantee that unauthorized paths are completely excluded. Especially when the semantic matching score is significantly higher than that of authorized paths, unauthorized evidence may still enter the subsequent language model context, leading to the leakage of sensitive information.

[0006] Second, the "tunneling effect" inherent in graph structures leads to side-channel risks in access patterns. Even if permission checks are performed on each complete path before the retrieval results are returned, attackers can still infer the existence of unauthorized nodes or edges and their relationships by constructing specific multi-step queries and observing changes in response latency, number of results, or sorting for different combinations of intermediate nodes. For example, although an unauthorized intermediate node may not be in the final returned path, if it is located on a necessary path of a highly relevant path, the implicit access to that node during path exploration may be captured by timing analysis, forming a side-channel. Existing query-pattern-based access control cannot prevent this type of information leakage caused by the internal traversal behavior of the retrieval algorithm.

[0007] Third, there is a lack of mechanisms to dynamically align natural language query intent with path-level security policies. Entities and relationships in user queries often contain semantic ambiguities, requiring retrieval systems to generate multiple candidate paths and select the most relevant evidence. During this process, the authorization status of each candidate path may change with the context—for example, in a query involving "kinship," the path "A-father-B-doctor-C" might be an authorized path for the query "A's health risks," but not for "B's medical records." Existing technologies either employ fixed "all-or-nothing" subgraph permissions or rely on post-event filtering, neither of which can dynamically adjust the visibility determination criteria of paths based on semantic context during retrieval execution.

[0008] In summary, existing knowledge graph access control, document-level secure retrieval, and filtering vector retrieval technologies are insufficient to effectively address the dynamic, fine-grained, and context-sensitive authorization requirements for multi-hop evidence paths in knowledge graph augmentation generation scenarios. The leakage of unauthorized evidence to the language model due to semantic relevance, and side-channel attacks resulting from graph tunneling through unauthorized intermediate nodes, constitute significant security vulnerabilities in the current system's practical deployment. Summary of the Invention

[0009] To overcome the aforementioned problems in the existing technology, this invention proposes a strategy-compilable evidence path retrieval method for knowledge graph enhancement generation.

[0010] The technical solution adopted by this invention to solve its technical problem is: a strategy-compilable evidence path retrieval method for knowledge graph enhancement generation, comprising the following steps: Step 1, Authorization Profile Construction: Obtain the natural language query q, user u, knowledge graph G with node and edge security labels, and user authorization rules to construct a query-user authorization profile. ; Step 2, Obtaining the Authorization Seed: Retrieve from the authorization seed view any predicates that satisfy compileable authorization. The seed nodes are used to initialize the partial path front set F only with the above seed nodes, and the candidate set C is initialized to empty; Step 3, Constrained Expansion: Maintain a set of partial evidence path fronts, and expand starting from the seed node. Before each expansion, verify whether the edges, nodes, and partial paths to be added satisfy the constraints. , and If the condition is not met, skip the expansion. Step 4, Semantic Scoring and Residual Verification: Calculate the semantic relevance score between the query and the path only for candidate evidence paths that pass the compileable authorization verification, and verify the residual authorization predicates that require runtime judgment. Perform verification; Step 5, Evidence Output: Return the top k evidence paths with the highest relevance scores from the candidate evidence paths that have passed the residual verification to the language model; wherein, unauthorized nodes and edges shall not be read, expanded, routed, returned, referenced or passed to the language model.

[0011] The aforementioned strategy for compiling evidence path retrieval based on knowledge graph augmentation, wherein step 1 specifically includes: the knowledge graph is... Nodes or edges It has content features, search features and security tags. Candidate evidence paths are represented as Generate an authorization profile for query q and user u. The complete authorization predicate Decomposed into compilable authorization predicates and residual authorization predicate Stable tenant, domain, subject, validity period, or security level tags are prioritized for compilation as extended constraints; temporary authorizations, purpose verification, manual adjudication, and uncertain tags are retained as residual checks.

[0012] The aforementioned compilable evidence path retrieval method for knowledge graph augmentation generation, wherein the compilable authorization predicate... Hard constraints used during map expansion, the residual authorization predicate Used for runtime verification after candidate paths are generated.

[0013] The aforementioned strategy-compilable evidence path retrieval method for knowledge graph augmentation generation, wherein the compilable authorization predicate satisfies at least one of the following conditions: the strategy label is stable or can be locally updated during the index lifecycle; the strategy can be determined by object attributes on nodes, edges, or bounded path states; adding user authorization does not reduce the set of visible graph objects; the query-user authorization profile can be projected into executable constraints before retrieval; and the strategy can determine whether some extended paths are still feasible.

[0014] The aforementioned strategy-based compilable evidence path retrieval method for knowledge graph augmentation specifically includes residual verification in step 4: [The text abruptly ends here, likely due to an incomplete sentence or missing information.] Execute each path in Runtime check, retain Instead of forcibly assigning authorization or prohibition labels to ambiguous paths, they are marked and then handed over to the domain adjudication module.

[0015] The aforementioned strategy-compilable evidence path retrieval method for knowledge graph augmentation generation also includes performance analysis: performance analysis is performed using constrained total retrieval cost, wherein the constrained total retrieval cost... Represented as: ; in, For the candidate set that passes the compilation filter, when When the value is smaller than the unconstrained candidate set, the residual verification cost can be reduced. For the time consumed by the constrained search, , The residual verification time for a single candidate path; The time required to generate the answer .

[0016] The beneficial effects of this invention are: (i) it constructs a three-dimensional fine-grained authorization system of "query-user-path," accurately overcoming the problem of misjudgment of path-level visibility. This invention breaks through the limitations of existing graph databases that only perform atomic-level permission determination for nodes, edges, or static subgraphs, innovatively using natural language query semantics, user identity credentials, and dynamically generated multi-hop evidence paths as the authorization determination objects. Thus, the system can identify that even if every entity node and basic relationship constituting the path is within the user's authorization scope, the overall sequence combination of the path may still be judged as invisible due to violation of higher-order association constraints. This mechanism fundamentally avoids the technical inertia of erroneously generalizing node-level or edge-level visibility to path-level visibility, effectively solving the problem of not being able to predefine static authorization patterns due to sensitive information derived from path combinations in dynamic query scenarios, and ensuring the compliance of retrieval evidence at the topological structure level.

[0017] (II) Employing a graph expansion pre-constraint blocking mechanism to fundamentally prevent retrieval leakage and graph tunneling side-channel attacks. Unlike existing soft constraint schemes that treat security constraints as ranking penalties, this invention performs a strict permission pre-check on all adjacent branches of the current node before each hop of the graph expansion operation in the evidence path. Once a branch is determined to pass through an unauthorized node or relation sequence, the system removes it from the current retrieval routing space through hard blocking, ensuring it never becomes an intermediate routing point. On one hand, this hard constraint mechanism ensures that unauthorized evidence will not enter the candidate set throughout the entire process, and even if its semantic relevance is significantly higher than authorized evidence, it cannot be obtained by the language model, thus completely eliminating the risk of retrieval layer evidence leakage. On the other hand, since unauthorized nodes are not allowed as intermediate jump nodes in the retrieval path, attackers cannot use multi-step queries to observe the system's response differences to intermediate nodes, thereby effectively blocking graph tunneling access mode side-channel attacks caused by the traversal behavior within the retrieval algorithm.

[0018] (III) Constructing a layered execution architecture of compilable and residual policies to achieve synergistic optimization of retrieval efficiency, dynamic adaptability, and security auditability. This invention divides path authorization rules into a compilable static policy layer and a residual policy layer oriented towards real-time context. The compilable policy pre-compiles and indexes high-frequency, deterministic permission rules, ensuring high graph traversal efficiency even when applying security constraints during the retrieval phase. The residual policy layer handles low-frequency / complex authorization scenarios involving contextual semantics, time validity periods, or dynamic attributes, making dynamic decisions during execution. This layered mechanism not only overcomes the shortcomings of single static filtering in adapting to dynamic changes in query intent but also provides security auditors with clear and traceable decision-making basis through explicit policy layer boundaries and execution log recording, ensuring that the system security boundary is verifiable and explainable in highly sensitive business deployments.

[0019] In summary, this invention, while ensuring retrieval accuracy and response efficiency, substantially improves the data security protection capabilities of the knowledge graph enhancement generation system in sensitive scenarios such as medical, legal, and cross-tenant applications from three levels: authorization granularity, execution blocking, and architectural layering. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the strategy compilable evidence path retrieval stage in an embodiment of the present invention; Figure 2 This is a schematic diagram of the path authorization boundary and evidence output process in an embodiment of the present invention. Detailed Implementation

[0021] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] like Figure 1-2 As shown, this embodiment discloses a strategy-compilable evidence path retrieval method for knowledge graph augmentation generation. This embodiment includes a query party, a strategy engine, a knowledge graph storage, an evidence path retrieval unit, a residual validator, and a language model. The query party submits a natural language question q and a user identifier u; the strategy engine generates a path based on user attributes, tenant, data domain, validity period, and path combination rules. The nodes and edges in the knowledge graph store content features, retrieval vectors, and security tags, respectively.

[0023] Step 1, Input and Policy Modeling: Let the knowledge graph be... Nodes or edges It has content features, search features and security tags. Candidate evidence paths are represented as .

[0024] Step 2, Decomposition of Authorization Strategy: Generate authorization profiles for query q and user u. Full authorization determination Decomposed into compilable parts and the remaining parts Stable tenant, domain, subject, validity period, or security level tags are prioritized for compilation as extended constraints; temporary authorizations, purpose verification, manual adjudication, and uncertain tags are retained for residual checks.

[0025] Step 3, Authorized Seed Retrieval: Obtain from the Authorized Seed View Based solely on the above The node initialization partial path front set and the candidate set Initialize to empty.

[0026] Step 4, Compile constraint extension: From Extract the next partial path according to the relevance priority rule. For each outgoing edge-node pair at its endpoint Only when , and Only then will the extended path be added. and Simultaneously calculate semantic scores .

[0027] Step 5, Residual Strategy Check: For Execute each path in Runtime check, retain Instead of forcibly assigning authorization or prohibition labels to ambiguous paths, they are marked and then handed over to the domain adjudication module.

[0028] Step Six, Output of Security Evidence: According to right Sort and return the previous The returned content includes the path nodes, relationships, and necessary evidence used to answer the question, but excludes unauthorized nodes, edges, or paths.

[0029] Step 7, Performance Analysis: The total cost of constrained retrieval can be expressed as: ; in, For the candidate set that passes the compilation filter, when When the value is smaller than the unconstrained candidate set, the residual verification cost can be reduced. For the time consumed by the constrained search, , The residual verification time for a single candidate path; The time required to generate the answer .

[0030] Security and usability are evaluated simultaneously by metrics such as authorized path recall rate, unauthorized evidence rate, and over-filtering rate, avoiding the trade-off of rejecting all paths for a superficial zero leakage.

[0031] To facilitate the verification of the above indicators, a synthetic knowledge graph benchmark containing 100 query-user pairs was constructed in a reproducible experimental example. Each query-user pair was assigned 4 authorized gold standard paths, 4 prohibited but relevant paths, and several other safe paths, with k=10. Ambiguous paths were marked separately and not included in the binary statistics of authorized or prohibited paths. For five processing methods—unconstrained retrieval, node / edge filtering, post-retrieval path filtering, PC-EPR, and all rejections—the return results were statistically analyzed under the same candidate paths and the same k value.

[0032] Table 1 presents the statistical results for each method. APR@10 is calculated by dividing the number of authorized path hits by the total number of authorized paths; UER@10 is calculated by dividing the number of prohibited but relevant paths in the returned results by the total number of returned paths; and OFR@10 is calculated by dividing the number of authorized paths that were not returned by the total number of authorized paths.

[0033] Table 1 With all rejections, the number of returned paths is zero, and UER@10 is recorded as 0 according to the zero-leakage auditing convention. However, APR@10 is 0 and OFR@10 is 100%, indicating that simply rejecting all paths cannot achieve a superficial zero-leakage result. The above data is demonstration data based on fixed synthetic benchmarks and deterministic counting procedures, and does not replace performance tests in real knowledge graphs, real policies, and actual deployment environments; formal performance claims can be replaced with actual runtime log statistics according to the same metric definitions.

[0034] For each policy, we check its stability, object locality, monotonicity, efficient projection, and path-level decidability. If a policy depends on object labels or bounded path states, and can determine the feasibility of a partial path before expansion, then we compile it into... If the strategy relies on temporary session risks, usage, manual approval, or incomplete labeling, then it will be retained. Or mark it as an ambiguous strategy.

[0035] The retrieval system first acquires authorized seeds, ignoring unauthorized seeds. It then maintains a frontier queue sorted by semantic relevance, popping partial paths at each step and examining edges, nodes, and newly formed partial paths level by level. Only paths that pass all checks can be further expanded or added to the candidate set. After residual checks are completed, the retrieval system outputs authorized evidence paths and uses them as the language model context.

[0036] This embodiment employs a strict no-use model: unauthorized nodes and edges cannot be read, expanded, routed, returned, referenced, or passed to the language model. This constraint differs from the non-disclosure routing model, which only prohibits eventual disclosure; it does not allow graph connectivity to be preserved through unauthorized objects as connectors. This security boundary may reduce recall but provides clear retrieval layer security guarantees.

[0037] Authorized paths, prohibited but relevant paths, and ambiguous paths are constructed using query-user pairs as samples. User profiles may include clinical staff, billing auditors, researchers, tenant administrators, and external support staff; path rules may include prohibiting non-clinical users from accessing diagnostic paths, prohibiting cross-tenant paths, and prohibiting the combination of identity and protected attributes. Authorized path recall rate is defined as the ratio of returned authorized paths to the total number of authorized paths, unauthorized evidence rate is defined as the ratio of returned prohibited paths to the total number of returned paths, and over-filtering rate is used to measure the proportion of authorized paths that are not returned.

[0038] This embodiment assumes that the data owner or trusted policy engine provides object-level security labels and is not responsible for automatically inferring or correcting security labels from the original text. For missing labels and label noise, ambiguous samples are not forcibly included in the binary security truth value through separate robustness experiments and manual auditing analysis. The method addresses the evidence provided by the retrieval layer to the language model and does not claim to prevent the language model from generating sensitive content not provided by the retrieval layer from its pre-trained memory.

[0039] In one embodiment, the policy engine projects stable object attributes such as tenant identifier, data domain, security level, and validity period into node-level or edge-level filtering conditions, and compiles relationship sequences and bounded path combination rules into partial path states; the retrieval engine completes the condition judgment before generating the next hop.

[0040] In another embodiment, provisional authorization, purpose verification, and manual approval are handled as residual policies. The retriever only submits candidate paths that have passed authentication to the residual validator, which returns a pass, reject, or ambiguous result before outputting evidence; ambiguous results are not included in the authorization or prohibition set of the binary security metric.

[0041] When multiple users have the same natural language query but different authorization profiles, the retrieval engine generates authorization seeds and partial path fronts for each query-user pair, thus yielding different sets of evidence paths for the same query. Semantic ranking is only performed within authorized feasible paths and cannot be used to offset authorization failures with high relevance.

[0042] Under the strict no-use model, the retriever does not tunnel through unauthorized nodes or edges, nor does it use unauthorized objects as routing connectors; when there are insufficient available paths, the system returns less evidence after authorization screening or a rejection result, and records over-filtering and residual verification costs for auditing.

[0043] The above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art can make various modifications or equivalent substitutions to the present invention within its scope and spirit, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of the present invention.

Claims

1. A strategy-compilable evidence path retrieval method for knowledge graph augmentation generation, characterized in that, Includes the following steps: Step 1, Authorization Profile Construction: Obtain the natural language query q, user u, knowledge graph G with node and edge security labels, and user authorization rules to construct a query-user authorization profile. ; Step 2, Obtaining the Authorization Seed: Retrieve from the authorization seed view any predicates that satisfy compileable authorization. The seed nodes are used to initialize the partial path front set F only with the above seed nodes, and the candidate set C is initialized to empty; Step 3, Constrained Expansion: Maintain a set of partial evidence path fronts, and expand starting from the seed node. Before each expansion, verify whether the edges, nodes, and partial paths to be added satisfy the constraints. , and If the condition is not met, skip the expansion. Step 4, Semantic Scoring and Residual Verification: Calculate the semantic relevance score between the query and the path only for candidate evidence paths that pass the compileable authorization verification, and verify the residual authorization predicates that require runtime judgment. Perform verification; Step 5, Evidence Output: Return the top k evidence paths with the highest relevance scores from the candidate evidence paths that have passed the residual verification to the language model; wherein, unauthorized nodes and edges shall not be read, expanded, routed, returned, referenced or passed to the language model.

2. The strategy-compilable evidence path retrieval method for knowledge graph augmentation generation according to claim 1, characterized in that, Step 1 specifically includes: the knowledge graph is... Nodes or edges It has content features, search features and security tags. Candidate evidence paths are represented as Generate an authorization profile for query q and user u. The complete authorization predicate Decomposed into compilable authorization predicates and residual authorization predicate Stable tenant, domain, subject, validity period, or security level tags are prioritized for compilation as extended constraints; temporary authorizations, purpose verification, manual adjudication, and uncertain tags are retained as residual checks.

3. The strategy-compilable evidence path retrieval method for knowledge graph augmentation generation according to claim 1, characterized in that, The compilable authorization predicate Hard constraints used during map expansion, the residual authorization predicate Used for runtime verification after candidate paths are generated.

4. The strategy-compilable evidence path retrieval method for knowledge graph augmentation generation according to claim 1, characterized in that, The compilable authorization predicate satisfies at least one of the following conditions: the policy label is stable or can be locally updated during the index lifecycle; the policy can be determined by object attributes on nodes, edges, or bounded path states; adding user authorization does not reduce the set of visible graph objects; the query-user authorization profile can be projected into executable constraints before retrieval; and the policy can determine whether some extended paths are still feasible.

5. The strategy-compilable evidence path retrieval method for knowledge graph enhancement generation according to claim 1, characterized in that, The residual verification in step 4 specifically involves: processing the candidate set... Execute each path in Runtime check, retain Instead of forcibly assigning authorization or prohibition labels to ambiguous paths, they are marked and then handed over to the domain adjudication module.

6. The strategy-compilable evidence path retrieval method for knowledge graph augmentation generation according to claim 1, characterized in that, It also includes performance analysis: performance analysis is performed using the constrained total retrieval cost, where the constrained total retrieval cost... Represented as: ; in, For the candidate set that passes the compilation filter, when When the value is smaller than the unconstrained candidate set, the residual verification cost can be reduced. For the time consumed by the constrained search, , The residual verification time for a single candidate path; The time required to generate the answer .