A legal document quality adversarial inspection method based on logical game

By constructing a multi-round adversarial graph and calculating the confidence decay, the problem of dynamically simulating adversarial arguments in legal documents in existing technologies is solved. This enables interpretable, traceable, and quantifiable evaluation of the quality of legal documents and quantifies the impact of local defects on the overall conclusion.

CN122154660APending Publication Date: 2026-06-05SUYUAN TECHNOLOGY (HUNAN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUYUAN TECHNOLOGY (HUNAN) CO LTD
Filing Date
2026-03-06
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies are unable to dynamically simulate the adversarial argumentation process of legal documents, lack the ability to model the attenuation behavior of conclusion confidence under multiple rounds of perturbation, and cannot quantify the cumulative impact of local defects on the global conclusion through a hierarchical propagation mechanism.

Method used

Collect full-text data of legal documents, extract fact triples, evidence citation fragments and legal provision numbers, and generate a structured argument set; construct a directed heterogeneous graph, identify logical breakpoints and contradiction patterns, iteratively construct a multi-round adversarial graph, calculate confidence decay, generate a global vulnerability index for legal documents, and assess logical integrity, argument consistency and conclusion robustness.

Benefits of technology

It enables dynamic stability modeling of legal arguments under disturbances, quantifies the transmission from local defects to global risks, and provides interpretable, traceable, and quantifiable intelligent verification capabilities for legal document quality assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122154660A_ABST
    Figure CN122154660A_ABST
Patent Text Reader

Abstract

The application discloses a kind of legal document quality confrontation test method based on logic game, it is related to legal artificial intelligence technical field, including, collection legal document full-text data, and extract fact triple, evidence citation fragment, law article number and conclusion claim, generate structured argumentation set;Based on the confidence attenuation sequence of multiple rounds of game, in combination with the vulnerability propagation coefficient corresponding to different types of edges in directed heterogenous graph, carry out path vulnerability contribution value calculation, and generate legal document global vulnerability index by stratified accumulation;Based on logic breakpoint list, contradiction conflict list and legal document global vulnerability index, comprehensive evaluation legal document's logic integrity, argumentation consistency and conclusion robustness, generate structured check report.The application provides a complete and feasible implementation path for the automatic check of legal documents combined with natural language processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of legal artificial intelligence technology, and in particular to an adversarial method for testing the quality of legal documents based on logical game theory. Background Technology

[0002] The adversarial quality testing technology for legal documents based on logical game theory occupies a crucial position in the fields of judicial intelligence and legal technology today. Its core lies in integrating natural language processing, graph structure modeling, and logical reasoning mechanisms to formally represent and quantitatively evaluate the argumentative structure of legal documents. Existing technologies typically rely on natural language processing methods to extract elements and identify relationships in legal texts, and use graph construction technology to organize facts, evidence, legal provisions, and conclusions into a structured argumentative model, thereby supporting the preliminary analysis of the logical consistency of documents.

[0003] In the field of adversarial testing of legal document quality based on logical game theory, traditional adversarial testing methods for legal document quality are difficult to dynamically simulate the adversarial argumentation process and lack the ability to model the attenuation behavior of conclusion confidence under multiple rounds of perturbation. At the same time, existing methods mostly use static rules or single-layer aggregation strategies to assess document vulnerability, and cannot quantify the cumulative impact of local defects on the global conclusion through a hierarchical propagation mechanism. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a method for adversarial testing of legal document quality based on logical game theory to solve the problem that existing technologies are unable to dynamically simulate adversarial arguments and quantify the propagation of layered vulnerabilities.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a method for adversarial quality testing of legal documents based on logical game theory. The method includes: collecting full-text data of the legal document and extracting fact triples, evidence citation fragments, legal provision numbers, and conclusion claims to generate a structured argument set; constructing a directed heterogeneous graph based on the structured argument set, traversing the topological structure to detect logical breakpoints and matching contradictory pattern subgraphs to identify conflicting facts, obtaining an initial argument chain graph, a list of logical breakpoints, and a list of contradictions and conflicts; selecting key fact nodes from the initial argument chain graph, generating adversarial factual hypotheses by combining them with a legal dispute focus template library, iteratively constructing a multi-round adversarial graph, calculating and accumulating confidence decay in each round, terminating the iteration when a convergence condition is met, and generating a multi-round game confidence decay sequence; calculating the path vulnerability contribution value based on the multi-round game confidence decay sequence, combined with the vulnerability propagation coefficients corresponding to different types of edges in the directed heterogeneous graph, and generating a global vulnerability index for the legal document through hierarchical accumulation; and comprehensively evaluating the logical integrity, argument consistency, and conclusion robustness of the legal document based on the list of logical breakpoints, the list of contradictions and conflicts, and the global vulnerability index of the legal document, generating a structured verification report.

[0007] As a preferred embodiment of the adversarial testing method for legal document quality based on logical game theory described in this invention, the steps for generating the structured argument set are as follows: Identify and extract subject entities, action verbs, object entities, and time expressions from the full text data of legal documents, and combine them into fact triples; Identify evidence citation text fragments from the full text data of legal documents, and establish the association relationship between evidence citation text fragments and fact triples through a coreference resolution algorithm to obtain evidence citation fragments; Based on the full text data of legal documents, the legal citation patterns are matched and verified in conjunction with the legal knowledge base to generate legal citation numbers. The conclusions and claims are extracted by locating the concluding paragraph markers. The factual triples, evidence citations, legal provisions, and conclusions are integrated to generate a structured set of arguments.

[0008] As a preferred embodiment of the adversarial testing method for legal document quality based on logical game theory described in this invention, the specific steps for constructing the directed heterogeneous graph are as follows: The fact triples in the structured argument set are used as fact nodes, the evidence citation fragments are used as evidence nodes, the legal provision numbers are used as legal provision nodes, and the conclusion claims are used as conclusion nodes. Based on the structured argument set, support edges are created between evidence nodes and fact nodes, applicable edges are created between legal provision nodes and fact nodes, and derivation edges are created between fact nodes, legal provision nodes, and conclusion nodes, thus constructing a directed heterogeneous graph.

[0009] As a preferred embodiment of the adversarial testing method for legal document quality based on logical game theory described in this invention, the specific steps for obtaining the initial argument chain diagram, the list of logical breakpoints, and the list of contradictions and conflicts are as follows: Using the directed heterogeneous graph as the initial argument chain graph, the topology of the directed heterogeneous graph is traversed to detect conclusion nodes with zero in-degree, fact nodes with zero in-degree, and evidence nodes with zero out-degree, and a list of logical breakpoints is generated. Match contradictory pattern subgraphs in a directed heterogeneous graph, identify directly contradictory fact pairs and paths of inconsistent reasoning premises, and generate a list of contradictions and conflicts.

[0010] As a preferred embodiment of the adversarial testing method for legal document quality based on logical game theory described in this invention, the specific steps for selecting key fact nodes in the initial argument chain graph are as follows: Based on the initial argument chain graph, the path confidence and the overall confidence of the conclusion node are calculated. The overall confidence of the conclusion node in the initial argument chain graph is obtained and used as the overall confidence of the conclusion node in the previous round of adversarial graph. Using the initial argument chain graph as the current adversarial graph, calculate the centrality of each fact node, and select fact nodes with a centrality greater than the threshold as key fact nodes.

[0011] As a preferred embodiment of the adversarial quality testing method for legal documents based on logical game theory described in this invention, the specific steps for iteratively constructing a multi-round adversarial graph are as follows: Based on the fact triples corresponding to key fact nodes, and combined with the legal dispute focus template library, semantic matching retrieval and element perturbation operations are performed to generate adversarial factual hypotheses; Add adversarial factual assumptions as new factual nodes to the current adversarial graph, and establish supporting edges, applicable edges, and derivation edges based on the new factual nodes, evidence nodes, legal provisions nodes, and conclusion nodes to construct the current round of adversarial graph.

[0012] As a preferred embodiment of the adversarial testing method for legal document quality based on logical game theory described in this invention, the specific steps for generating the multi-round game confidence decay sequence are as follows: Based on the current round adversarial graph, calculate the path confidence of each reasoning path and the comprehensive confidence of the conclusion node to obtain the comprehensive confidence of the conclusion node in the current round adversarial graph; Based on the overall confidence of the conclusion nodes in the previous round of adversarial graph and the overall confidence of the conclusion nodes in the current round of adversarial graph, calculate the confidence decay in the current round; When the absolute value of the difference between the confidence decay amounts in two consecutive rounds is less than the convergence threshold, the iteration terminates and a multi-round game confidence decay sequence is generated.

[0013] As a preferred embodiment of the adversarial quality testing method for legal documents based on logical game theory described in this invention, the calculation of path vulnerability contribution values ​​based on the confidence decay sequence of multi-round game theory, combined with the vulnerability propagation coefficients corresponding to different types of edges in a directed heterogeneous graph, is carried out in the following specific steps: The strength of fundamental vulnerability is calculated based on the confidence decay sequence of multi-round game; Traverse all reasoning paths from evidence nodes, fact nodes, and legal provision nodes to conclusion nodes in the directed heterogeneous graph, and generate a set of reasoning paths; Identify the supporting edges, applicable edges, and derivation edges in the inference path set. Based on the vulnerability propagation coefficients corresponding to the supporting edges, applicable edges, and derivation edges, calculate the path propagation coefficient of each inference path in the inference path set. Based on the basic vulnerability strength and the path propagation coefficient of each inference path in the inference path set, the path vulnerability contribution value is calculated, and the path vulnerability contribution value set is obtained.

[0014] As a preferred embodiment of the adversarial testing method for legal document quality based on logical game theory described in this invention, the specific steps for generating a global vulnerability index for legal documents through hierarchical accumulation are as follows: The first layer of accumulation is performed based on the path vulnerability contribution value set and the directed heterogeneous graph, and the node vulnerability value set is calculated. Based on the set of node vulnerability values, a second-level cumulative calculation is performed to obtain the global vulnerability index of legal documents.

[0015] As a preferred embodiment of the adversarial verification method for legal document quality based on logical game theory described in this invention, the specific steps for generating the structured verification report are as follows: Based on the list of logical breakpoints and the initial argument chain diagram, the number of logical breakpoints and the total number of nodes are calculated, and a logical integrity score is generated based on the ratio of the difference between the total number of nodes and the number of logical breakpoints to the total number of nodes. Based on the list of contradictions and conflicts and the directed heterogeneous graph, the number of contradictions and conflicts and the total number of reasoning paths are calculated. An argument consistency score is generated based on the ratio of the difference between the total number of reasoning paths and the number of contradictions and conflicts to the total number of reasoning paths. Based on the global vulnerability index of legal documents, a robustness score for the conclusion is generated through reverse mapping. The logical integrity score, the argument consistency score, and the conclusion robustness score are graded and aggregated to generate a structured verification report.

[0016] The beneficial effects of this invention are as follows: by constructing a multi-round adversarial graph and calculating the confidence decay, the dynamic stability model of legal arguments under perturbation is realized, effectively supporting the adversarial testing mechanism driven by natural language processing; by generating a global vulnerability index for legal documents, the quantitative transmission from local defects to global risks is realized; and the quality assessment of legal documents is made to have interpretable, traceable and quantifiable intelligent verification capabilities, providing a complete and feasible implementation path for the automatic verification of legal documents that integrates natural language processing. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of an adversarial method for testing the quality of legal documents based on logical game theory.

[0019] Figure 2 A flowchart for constructing and detecting directional heterogeneous spectra.

[0020] Figure 3 A flowchart for generating a multi-round game confidence decay sequence.

[0021] Figure 4 A flowchart for generating a structured verification report. Detailed Implementation

[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0024] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0025] Reference Figures 1-4As one embodiment of the present invention, this embodiment provides a method for adversarial testing of legal document quality based on logical game theory, comprising the following steps: S1: Collect the full text data of legal documents and extract fact triples, evidence citation fragments, legal provision numbers and conclusions to generate a set of structured arguments; S1.1: The full text data of legal documents includes the preamble, party information, claims, facts and reasons, list of evidence, facts ascertained by the court, the court's opinion, legal citations, main text of the judgment, allocation of litigation costs, notification of the right to appeal, and closing information; Specifically, after collecting the full text data of the legal document, the text paragraphs corresponding to the following are identified in sequence: the preamble, party information, litigation claims, facts and reasons, list of evidence, facts ascertained by the court, the court's opinion, legal citations, main text of the judgment, allocation of litigation costs, notification of the right to appeal, and the closing information. The content of each paragraph is then extracted as the preamble, party information, litigation claims, facts and reasons, list of evidence, facts ascertained by the court, the court's opinion, legal citations, main text of the judgment, allocation of litigation costs, notification of the right to appeal, and closing information.

[0026] All of the above content has been agreed to by the user and is used for legitimate purposes.

[0027] S1.2: Identify and extract subject entities, action verbs, object entities, and time expressions from the full text data of legal documents, and combine them into fact triples; Specifically, named entity recognition is performed on the full-text data of legal documents to extract subject entities, object entities, and time expressions; part-of-speech tagging is performed on the full-text data of legal documents to identify verbs and select action verbs with legal action semantics; a dependency syntax tree is constructed based on the full-text data of legal documents, and the dependency relationship arcs in the dependency syntax tree are traversed to identify the subject-predicate dependency relationship between subject entities and action verbs, as well as the verb-object dependency relationship between action verbs and object entities; according to the subject-predicate dependency relationship and the verb-object dependency relationship, the subject entities, action verbs, and object entities are associated according to the dependency path, and the time expression is attached to the time modification position corresponding to the action verb to form fact triples.

[0028] S1.3: Identify evidence citation text fragments from the full text data of legal documents, establish the association between evidence citation text fragments and fact triples through the coreference resolution algorithm, and obtain evidence citation fragments; Specifically, sentences containing keywords such as "evidence," "presentation," "submission," "examination," "investigation," and "verification" are identified from the full text of legal documents and used as candidate evidence citation text fragments. The candidate evidence citation text fragments undergo referential resolution to identify the specific fact triples pointed to by personal pronouns, demonstrative pronouns, and noun phrases within them. A coreference resolution algorithm is used to calculate the semantic coreference score between each candidate evidence citation text fragment and each fact triple. The semantic coreference score is obtained by weighted summation of entity overlap, predicate similarity, and context vector cosine similarity. Fact triples with semantic coreference scores greater than a coreference threshold are selected as the associated objects of the candidate evidence citation text fragments. The candidate evidence citation text fragments that have completed the association are then used as evidence citation fragments.

[0029] It should be noted that the coreference threshold is determined based on the statistical analysis of the semantic coreference score distribution in the evidence-fact association sample set of historical legal documents, and the value ranges from 0.6 to 0.85.

[0030] Coreference resolution algorithm is a natural language processing method used to determine whether different linguistic expressions in legal documents refer to the same fact.

[0031] S1.4: Based on the full text data of legal documents, match the legal citation pattern and verify it in conjunction with the legal knowledge base, generate legal citation numbers, and extract the conclusion claims by locating the concluding paragraph markers; Specifically, based on the full-text data of legal documents, text fragments conforming to a preset regular expression for legal citation are identified. This preset regular expression is used to match continuous text containing the legal name, article number, and clause identifier. The identified text fragments are then compared with standard legal article numbers in the legal knowledge base using precise string comparison and structural consistency verification. Text fragments that pass the verification are mapped to the corresponding standard legal article numbers in the legal knowledge base, and the standard legal article numbers are output. Paragraphs beginning with phrases such as "Judgment is as follows," "Ruling is as follows," "This court holds," "In conclusion," or "Therefore" are located in the full-text data of legal documents as concluding paragraphs. All sentences are extracted from the concluding paragraphs, and the positional weight, legal keyword density, and semantic coherence with adjacent sentences of each sentence are calculated. The weighted sum of these three factors yields a key score. The sentence with the highest key score is selected as the concluding statement.

[0032] It should be noted that the regular expression for legal citation is preset based on the typical writing norms and structural characteristics (hierarchical identifier structure, identifier type, format norms, keyword and separator patterns) of legal citation in legal documents. The regular expression for legal citation covers the legal name, the hierarchical identifier of the article (including article, clause, item and sub-item) and the corresponding combination of numbers or Chinese ordinal numbers.

[0033] S1.5: Integrate factual triples, evidence citations, legal provision numbers, and conclusions to generate a structured argument set.

[0034] Specifically, fact triples, evidence citations, legal provision numbers, and conclusion claims are mapped to fact fields, evidence fields, legal provision fields, and conclusion fields in a unified data format, respectively. A unique fact identifier, unique evidence identifier, unique legal provision identifier, and unique conclusion identifier are assigned to each fact triple, evidence citation, legal provision number, and conclusion claim, respectively. Based on these unique identifiers, association mapping tables are established between fact identifiers and evidence identifiers, between fact identifiers and legal provision identifiers, and between fact identifiers and conclusion identifiers. The mapped data items and each association mapping table are encapsulated into structured data objects, and these structured data objects are serialized into a data exchange format (e.g., JSON) and stored to generate a structured argument set.

[0035] S2: Based on the structured argument set, construct a directed heterogeneous graph, traverse the topological structure to detect logical breakpoints and match contradictory pattern subgraphs to identify conflicting facts, and obtain the initial argument chain graph, logical breakpoint list and contradiction conflict list; S2.1: The fact triples in the structured argument set are used as fact nodes, the evidence citation fragments are used as evidence nodes, the legal provision numbers are used as legal provision nodes, and the conclusion claims are used as conclusion nodes; Specifically, all fact triples are read from the structured argument set, a graph node is created for each fact triple and the node type is marked as fact node; all evidence citation fragments are read from the structured argument set, a graph node is created for each evidence citation fragment and the node type is marked as evidence node; all legal provision numbers are read from the structured argument set, a graph node is created for each legal provision number and the node type is marked as legal provision node; conclusion claims are read from the structured argument set, a graph node is created for the conclusion claim and the node type is marked as conclusion node; all created graph nodes are used as the initial node set of the directed heterogeneous graph.

[0036] S2.2: Based on the structured argument set, support edges are created between evidence nodes and fact nodes, applicable edges are created between legal provision nodes and fact nodes, and derivation edges are created between fact nodes, legal provision nodes, and conclusion nodes to construct a directed heterogeneous graph. Specifically, based on the association between evidence citation fragments and fact triples in the structured argument set, each pair of associated evidence citation fragments and fact triples is traversed to obtain the corresponding evidence nodes and fact nodes. Directed edges are created between the evidence nodes and fact nodes, and the edge type is marked as a supporting edge. Based on the applicability relationship between legal provision numbers and fact triples in the structured argument set, each pair of associated legal provision numbers and fact triples is traversed to obtain the corresponding legal provision nodes and fact nodes. Directed edges are created between the legal provision nodes and fact nodes, and the edge type is marked as an applicable edge. Based on the derivation relationship between conclusion claims, fact triples, and legal provision numbers in the structured argument set, traverse each associated set of conclusion claims, fact triples, and legal provision numbers to obtain the corresponding conclusion nodes, fact nodes, and legal provision nodes. Create directed edges between fact nodes and conclusion nodes and mark the edge type as derivation edges. Create directed edges between legal provision nodes and conclusion nodes and mark the edge type as derivation edges. Integrate all created supporting edges, applicable edges, and derivation edges with fact nodes, evidence nodes, legal provision nodes, and conclusion nodes to construct a directed heterogeneous graph.

[0037] S2.3: Using the directed heterogeneous graph as the initial argument chain graph, traverse the topology of the directed heterogeneous graph, detect conclusion nodes with zero in-degree, fact nodes with zero in-degree, and evidence nodes with zero out-degree, and generate a list of logical breakpoints. Specifically, the directed heterogeneous graph is used as the initial argument chain graph; all conclusion nodes in the initial argument chain graph are traversed, the in-degree of each conclusion node is calculated, and conclusion nodes with an in-degree of zero are added to the logical breakpoint candidate set; all fact nodes in the initial argument chain graph are traversed, the in-degree of each fact node is calculated, and fact nodes with an in-degree of zero are added to the logical breakpoint candidate set; all evidence nodes in the initial argument chain graph are traversed, the out-degree of each evidence node is calculated, and evidence nodes with an out-degree of zero are added to the logical breakpoint candidate set; all nodes in the logical breakpoint candidate set are used as the logical breakpoint list.

[0038] S2.4: Match contradictory pattern subgraphs in the directed heterogeneous graph, identify directly contradictory fact pairs and inconsistent reasoning premises, and generate a list of contradictions and conflicts.

[0039] Specifically, a pre-defined contradiction pattern subgraph is matched in the directed heterogeneous graph. The pre-defined contradiction pattern subgraph includes a template of directly contradictory fact pairs and a template of inconsistent reasoning premises. The fact node pairs that conform to the template of directly contradictory fact pairs and the reasoning path pairs that conform to the template of inconsistent reasoning premises are identified. The identified fact node pairs and reasoning path pairs are used as a list of contradictions.

[0040] It should be noted that the contradiction pattern subgraph is pre-set based on the typical logical conflict patterns in legal argumentation. The construction basis includes the semantic opposition relationship commonly found in legal texts, typical contradictory situations in judicial practice, and inconsistent structures in logical reasoning rules. The contradiction pattern subgraph includes a template for directly contradictory fact pairs and a template for inconsistent reasoning premises. The template for directly contradictory fact pairs is based on the antonymous relationship of action verbs in fact triples and the definition of subject-object consistency. The template for inconsistent reasoning premises is based on the structural feature definition of multiple reasoning paths pointing to the same conclusion node that have no intersection at the fact node or legal provision node and have mutually exclusive premises.

[0041] Logical reasoning rules are the criteria used to determine whether the premises and conclusions in a legal argument satisfy formal logical validity (such as deduction, induction, and analogy) and whether there are logical errors such as contradictions, circular arguments, or insufficient premises.

[0042] S3: Select key fact nodes in the initial argument chain graph, generate adversarial factual assumptions by combining them with the legal dispute focus template library, iteratively construct a multi-round adversarial graph, calculate and accumulate the confidence decay in each round, terminate the iteration when the convergence condition is met, and generate a multi-round game confidence decay sequence. S3.1: Based on the initial argument chain graph, calculate the path confidence and the overall confidence of the conclusion node, obtain the overall confidence of the conclusion node in the initial argument chain graph, and use it as the overall confidence of the conclusion node in the previous round of adversarial graph. Specifically, based on the initial argument chain graph, the edge confidence of the supporting edge is the semantic co-reference score between the corresponding evidence citation fragment and the fact triple; the edge confidence of the applicable edge is the requirement matching degree between the corresponding legal provision number and the fact triple; and the edge confidence of the derivation edge is the logical completeness score of the conclusion claim derived from the fact triple and the legal provision node. The semantic co-reference score, requirement matching degree, and logical completeness score are all normalized to the interval [0, 1]. All reasoning paths from evidence nodes, fact nodes, and legal provision nodes to the conclusion node are traversed, and the path confidence of each reasoning path is calculated. The path confidence is equal to the product of the edge confidences corresponding to all supporting edges, applicable edges, and derivation edges in the reasoning path. The path confidence of all reasoning paths is weighted and summed, with the weight being the normalized value of the reciprocal of the length of each reasoning path, to obtain the comprehensive confidence of the conclusion node. The comprehensive confidence of the conclusion node in the initial argument chain graph is used as the comprehensive confidence of the conclusion node in the previous round of adversarial graph.

[0043] The expression for calculating path confidence is: ; in, Indicating the reasoning path Path confidence; This indicates a reasoning path that leads from a node of evidence, a node of fact, or a node of legal provision to a node of conclusion. Representing a path Any edge in; Representing an edge The corresponding edge confidence.

[0044] The expression for calculating the overall confidence level of the conclusion node is: ; in, Indicates the overall confidence level of the conclusion node; This represents the total number of reasoning paths leading to the conclusion node; Indicates the first One reasoning path; Indicates the first Path confidence of each inference path; Indicates the first Reasoning path Length; Indicates the first Reasoning path The length.

[0045] S3.2: Using the initial argument chain graph as the current adversarial graph, calculate the centrality of each fact node, and select fact nodes with a centrality greater than the threshold as key fact nodes; Specifically, the initial argument chain graph is used as the current adversarial graph; all fact nodes in the current adversarial graph are traversed; for each fact node, the degree in the current adversarial graph is counted; the degree of each fact node is used as the centrality of the fact node; the centrality threshold is read; the centrality of each fact node is compared with the centrality threshold; and fact nodes with a centrality greater than the centrality threshold are selected as key fact nodes.

[0046] It should be noted that the centrality threshold is preset based on the statistical distribution characteristics of the degree of fact nodes in the initial argument chain graph, and the value range is an integer greater than 1 and not exceeding the maximum degree of fact nodes in the initial argument chain graph.

[0047] S3.3: Based on the fact triples corresponding to key fact nodes and combined with the legal dispute focus template library, perform semantic matching retrieval and element perturbation operations to generate adversarial factual hypotheses; Specifically, based on the fact triples corresponding to key fact nodes, the subject entity, action verb, object entity, and time expression in the fact triples are extracted; the semantic similarity of the subject entity, action verb, object entity, and time expression with each template in the legal dispute focus template library is calculated, and the template with a semantic similarity greater than the semantic matching threshold is selected as the matching template; the positions of perturbed elements in the matching template are identified, and the perturbed elements include action verbs, object entities, and time expressions; for each perturbed element position, candidate replacements are retrieved from a legal thesaurus or antonym dictionary; the candidate replacements are sequentially replaced to the corresponding positions in the matching template to generate adversarial factual hypotheses.

[0048] It should be noted that the semantic matching threshold is determined based on the statistical analysis of the semantic similarity distribution of historical matching samples in the legal dispute focus template library, and the value ranges from 0.7 to 0.9.

[0049] S3.4: Add the adversarial factual assumptions as new fact nodes to the current adversarial graph, and establish supporting edges, applicable edges, and derivation edges based on the new fact nodes, evidence nodes, legal provisions nodes, and conclusion nodes to construct the current round of adversarial graph; Specifically, the adversarial factual assumption is added as a new fact node to the current adversarial graph; all evidence nodes in the current adversarial graph are traversed, and if the evidence citation fragment corresponding to the evidence node has a co-reference relationship with the adversarial factual assumption, a supporting edge is established between the evidence node and the new fact node; all legal provision nodes in the current adversarial graph are traversed, and if the legal provision number corresponding to the legal provision node is applicable to the legal situation described by the adversarial factual assumption, an applicable edge is established between the legal provision node and the new fact node; the conclusion nodes in the current adversarial graph are traversed, and if the conclusion claim corresponding to the conclusion node can be derived from the adversarial factual assumption, a derivation edge is established between the new fact node and the conclusion node; the graph after adding the new fact node and establishing supporting, applicable, and derivation edges is used as the current round adversarial graph.

[0050] S3.5: Based on the current round adversarial graph, calculate the path confidence of each reasoning path and the comprehensive confidence of the conclusion node, and obtain the comprehensive confidence of the conclusion node in the current round adversarial graph; Specifically, based on the current round adversarial graph, all reasoning paths from evidence nodes, fact nodes, and legal provision nodes to conclusion nodes are traversed; for each reasoning path, the product of the edge confidences corresponding to all supporting edges, applicable edges, and derivation edges in the reasoning path is calculated to obtain the path confidence of the reasoning path; the path confidences of all reasoning paths are weighted and summed, with the weight being the normalized inverse of the length of each reasoning path, to obtain the comprehensive confidence of the conclusion node; the comprehensive confidence of the conclusion node is used as the comprehensive confidence of the conclusion node in the current round adversarial graph.

[0051] S3.6: Based on the comprehensive confidence of the conclusion nodes in the previous round of adversarial graph and the comprehensive confidence of the conclusion nodes in the current round of adversarial graph, calculate the confidence decay amount in the current round; Specifically, the comprehensive confidence of the conclusion nodes stored at the end of the previous iteration is read as the comprehensive confidence of the conclusion nodes in the previous adversarial graph; the comprehensive confidence of the conclusion nodes already calculated in the current adversarial graph is read as the comprehensive confidence of the conclusion nodes in the current adversarial graph; the difference between the comprehensive confidence of the conclusion nodes in the previous adversarial graph and the comprehensive confidence of the conclusion nodes in the current adversarial graph is calculated and used as the confidence decay amount in the current round.

[0052] S3.7: When the absolute value of the difference between the confidence decay amounts of two consecutive rounds is less than the convergence threshold, the iteration is terminated and a multi-round game confidence decay sequence is generated.

[0053] Specifically, the process involves: reading the confidence decay amount in the current round; reading the confidence decay amount in the previous round; calculating the difference between the confidence decay amount in the current round and the confidence decay amount in the previous round; taking the absolute value of the difference; determining whether the absolute value is less than the convergence threshold; if the absolute value is less than the convergence threshold, terminating the iteration and arranging all calculated confidence decay amounts in the iteration order to generate a multi-round game confidence decay sequence.

[0054] It should be noted that the convergence threshold is a real number between 0.001 and 0.01, which is preset based on both the general numerical stability standard for industrial optimization and the timeliness constraint of online real-time calculation.

[0055] The multi-round game confidence decay sequence refers to the ordered numerical sequence formed by recording the decrease in the overall confidence of the conclusion node relative to the previous round (i.e., the confidence decay amount) in the iterative order after generating adversarial factual assumptions based on perturbations and constructing a new adversarial graph in each round of the adversarial testing process of this invention. The multi-round game confidence decay sequence reflects the stability change trend of legal arguments under the continuous introduction of adversarial perturbations. The faster or greater the numerical decay, the more sensitive and less robust the original document argument is to perturbations.

[0056] S4: Based on the confidence decay sequence of multi-round game, combined with the vulnerability propagation coefficients corresponding to different types of edges in the directed heterogeneous graph, the path vulnerability contribution value is calculated, and the global vulnerability index of legal documents is generated by hierarchical accumulation. S4.1: Calculate the basic vulnerability strength based on the confidence decay sequence of multi-round game; Specifically, read all confidence decay values ​​in the multi-round game confidence decay sequence; calculate the arithmetic mean of all confidence decay values; and use the arithmetic mean as the basic vulnerability strength.

[0057] The expression for calculating the basic vulnerability strength is: ; in, Indicates the strength of basic vulnerability; This represents the total amount of confidence decay in a multi-round game confidence decay sequence; In the confidence decay sequence of a multi-round game, the first... The confidence decay of the wheel.

[0058] S4.2: Traverse all reasoning paths from evidence nodes, fact nodes, and legal provision nodes to conclusion nodes in the directed heterogeneous graph, and generate a set of reasoning paths; Specifically, the conclusion node is located in the directed heterogeneous graph; starting from the evidence node, fact node, and legal provision node, all paths leading to the conclusion node are traversed forward along the directed edges; during the forward traversal, the complete node sequence from the starting node to the conclusion node and the edge sequence connecting the starting node, intermediate nodes, and the conclusion node are recorded for each path; each complete node sequence and its corresponding edge sequence are used as a reasoning path; all reasoning paths are collected to generate a set of reasoning paths.

[0059] S4.3: Identify the supporting edges, applicable edges, and derivation edges in the inference path set. Based on the vulnerability propagation coefficients corresponding to the supporting edges, applicable edges, and derivation edges, calculate the path propagation coefficient of each inference path in the inference path set. Specifically, it iterates through each inference path in the inference path set; for each inference path, it sequentially identifies the supporting edges, applicable edges, and derivation edges contained in the inference path; it reads the vulnerability propagation coefficients corresponding to the supporting edges, applicable edges, and derivation edges; it performs a product operation on the vulnerability propagation coefficients corresponding to all supporting edges, applicable edges, and derivation edges in the inference path; it uses the product operation result as the path propagation coefficient of the inference path; it stores the path propagation coefficient of the inference path; after processing all inference paths, it obtains the path propagation coefficient of each inference path in the inference path set.

[0060] It should be noted that the vulnerability propagation coefficient is a pre-defined weight parameter used to quantify the degree to which supporting edges, applicable edges, and derivation edges transmit the impact of defects in the legal argumentation graph; it takes the value of a real number between 0 and 1, and is set through legal experience or obtained based on statistical fitting of historical cases.

[0061] S4.4: Based on the basic vulnerability strength and the path propagation coefficient of each inference path in the inference path set, calculate the path vulnerability contribution value and obtain the path vulnerability contribution value set; Specifically, the basic vulnerability strength is read; each inference path in the inference path set is traversed; for each inference path, the path propagation coefficient corresponding to the inference path is read; the product of the basic vulnerability strength and the path propagation coefficient corresponding to the inference path is calculated and used as the path vulnerability contribution value of the inference path; the path vulnerability contribution value of the inference path is stored; after processing all inference paths, the set of path vulnerability contribution values ​​is obtained.

[0062] S4.5: Perform the first layer of accumulation based on the path vulnerability contribution value set and the directed heterogeneous graph, and calculate the node vulnerability value set; Specifically, the process involves traversing each node in the directed heterogeneous graph; initializing the node vulnerability value to zero for each node; traversing each inference path and its corresponding path vulnerability contribution value in the path vulnerability contribution value set; obtaining all nodes contained in each inference path; accumulating the path vulnerability contribution value of each node in the inference path to the node vulnerability value corresponding to each node in the inference path; and after completing the traversal of all inference paths, collecting the node vulnerability values ​​of all nodes in the directed heterogeneous graph to generate a node vulnerability value set.

[0063] S4.6: Based on the set of node vulnerability values, perform a second-level cumulative calculation to obtain the global vulnerability index of legal documents.

[0064] Specifically, iterate through each node vulnerability value in the set of node vulnerability values; sum the vulnerability values ​​of each node; and use the summation result as the global vulnerability index of the legal document.

[0065] S5: Based on the list of logical breakpoints, the list of contradictions and conflicts, and the global vulnerability index of legal documents, comprehensively assess the logical integrity, argument consistency, and robustness of conclusions of legal documents, and generate a structured verification report.

[0066] S5.1: Based on the list of logical breakpoints and the initial argument chain diagram, calculate the number of logical breakpoints and the total number of nodes, and generate a logical integrity score based on the ratio of the difference between the total number of nodes and the number of logical breakpoints to the total number of nodes. Specifically, iterate through all logical breakpoints in the logical breakpoint list and count the number of logical breakpoints; iterate through all nodes in the initial argument chain graph and count the total number of nodes; calculate the difference between the total number of nodes and the number of logical breakpoints; calculate the ratio of the difference between the total number of nodes and the number of logical breakpoints to the total number of nodes; and use this as the logical integrity score.

[0067] The expression for calculating the logical integrity score is: ; in, Indicates the logical integrity score; This represents the total number of nodes in the initial argument chain graph; This indicates the number of logical breakpoints in the list of logical breakpoints.

[0068] S5.2: Based on the list of contradictions and conflicts and the directed heterogeneous graph, calculate the number of contradictions and conflicts and the total number of reasoning paths, and generate an argument consistency score based on the ratio of the difference between the total number of reasoning paths and the number of contradictions and conflicts to the total number of reasoning paths. Specifically, iterate through all conflicts in the conflict list and count the number of conflicts; iterate through all reasoning paths in the directed heterogeneous graph and count the total number of reasoning paths; calculate the difference between the total number of reasoning paths and the number of conflicts; calculate the ratio of the difference between the total number of reasoning paths and the number of conflicts to the total number of reasoning paths; and use the ratio as the consistency score of the argument.

[0069] S5.3: Based on the global vulnerability index of legal documents, a robustness score for the conclusion is generated through reverse mapping; Specifically, the global vulnerability index of legal documents is read; a preset constant is set for the fully robust benchmark value, which is greater than the maximum possible value of the global vulnerability index of legal documents; the difference between the fully robust benchmark value and the global vulnerability index of legal documents is calculated; and the difference between the fully robust benchmark value and the global vulnerability index of legal documents is used as the conclusion robustness score.

[0070] It should be noted that the fully robust benchmark value is a preset constant, which is greater than the maximum value of the global vulnerability index of legal documents under all possible conditions, so that the robustness score of the conclusion is always non-negative. The preset constant is determined based on the statistical upper bound of the global vulnerability index in the historical legal document sample, or is set to a fixed large number (such as 1000) to cover the actual value range under the unnormalized condition.

[0071] S5.4: The logical integrity score, the argument consistency score, and the conclusion robustness score are graded and aggregated to generate a structured verification report.

[0072] Specifically, the system reads the logical integrity score, the argument consistency score, and the conclusion robustness score; compares the logical integrity score with a preset logical integrity level threshold range and outputs the logical integrity level; compares the argument consistency score with a preset argument consistency level threshold range and outputs the argument consistency level; compares the conclusion robustness score with a preset conclusion robustness level threshold range and outputs the conclusion robustness level; combines the logical integrity level, argument consistency level, and conclusion robustness level into a structured data object in field order; and uses the structured data object as a structured validation report.

[0073] It should be noted that the logical integrity level threshold range is preset according to the accuracy requirements of the assessment of the structural integrity of legal document argumentation, and the value range is to divide the interval 0 and 1 into three sub-intervals: low, medium and high.

[0074] The threshold range for the consistency level of the argument is preset based on the granularity requirement for judging the internal inconsistency of legal arguments. The value range is to divide the interval 0 and 1 into three sub-intervals: low, medium, and high.

[0075] The robustness level threshold range is preset based on the quantitative differentiation requirements of the ability to refute the judgment conclusion. The value range is to divide the interval 0 and 1 into three sub-intervals: low, medium and high.

[0076] In summary, this invention achieves dynamic stability modeling of legal arguments under perturbation by constructing a multi-round adversarial graph and calculating confidence decay, effectively supporting the adversarial testing mechanism driven by natural language processing; it realizes the quantitative transmission from local defects to global risks by generating a global vulnerability index for legal documents; and it enables the quality assessment of legal documents to have interpretable, traceable, and quantifiable intelligent verification capabilities, providing a complete and feasible implementation path for the automatic verification of legal documents that integrates natural language processing.

[0077] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for adversarial testing of legal document quality based on logical game theory, characterized in that: include, Collect full text data of legal documents and extract fact triples, evidence citation fragments, legal provision numbers and conclusions to generate a set of structured arguments; Based on the structured argument set, a directed heterogeneous graph is constructed. The topological structure is traversed to detect logical breakpoints and match the contradictory pattern subgraph to identify conflicting facts, thereby obtaining the initial argument chain graph, the list of logical breakpoints, and the list of contradictions and conflicts. Key fact nodes of the initial argument chain graph are selected, adversarial factual assumptions are generated by combining the legal dispute focus template library, and a multi-round adversarial graph is iteratively constructed. The confidence decay is calculated and accumulated round by round. The iteration is terminated when the convergence condition is met, and a multi-round game confidence decay sequence is generated. Based on the confidence decay sequence of multi-round game, combined with the vulnerability propagation coefficients corresponding to different types of edges in the directed heterogeneous graph, the path vulnerability contribution value is calculated, and a global vulnerability index of legal documents is generated by hierarchical accumulation. Based on a list of logical breakpoints, a list of contradictions and conflicts, and a global vulnerability index for legal documents, the logical integrity, consistency of argumentation, and robustness of conclusions of legal documents are comprehensively evaluated, and a structured verification report is generated.

2. The adversarial method for testing the quality of legal documents based on logical game theory as described in claim 1, characterized in that, The steps for generating the structured argument set are as follows: Identify and extract subject entities, action verbs, object entities, and time expressions from the full text data of legal documents, and combine them into fact triples; Identify evidence citation text fragments from the full text data of legal documents, and establish the association relationship between evidence citation text fragments and fact triples through a coreference resolution algorithm to obtain evidence citation fragments; Based on the full text data of legal documents, the legal citation patterns are matched and verified in conjunction with the legal knowledge base to generate legal citation numbers. The conclusions and claims are extracted by locating the concluding paragraph markers. The factual triples, evidence citations, legal provisions, and conclusions are integrated to generate a structured set of arguments.

3. The adversarial method for testing the quality of legal documents based on logical game theory as described in claim 2, characterized in that, The specific steps for constructing the directed heterogeneous map are as follows: The fact triples in the structured argument set are used as fact nodes, the evidence citation fragments are used as evidence nodes, the legal provision numbers are used as legal provision nodes, and the conclusion claims are used as conclusion nodes. Based on the structured argument set, support edges are created between evidence nodes and fact nodes, applicable edges are created between legal provision nodes and fact nodes, and derivation edges are created between fact nodes, legal provision nodes, and conclusion nodes, thus constructing a directed heterogeneous graph.

4. The adversarial method for testing the quality of legal documents based on logical game theory as described in claim 3, characterized in that, The specific steps for obtaining the initial argument chain diagram, the list of logical breakpoints, and the list of contradictions are as follows: Using the directed heterogeneous graph as the initial argument chain graph, the topology of the directed heterogeneous graph is traversed to detect conclusion nodes with zero in-degree, fact nodes with zero in-degree, and evidence nodes with zero out-degree, and a list of logical breakpoints is generated. Match contradictory pattern subgraphs in a directed heterogeneous graph, identify directly contradictory fact pairs and paths of inconsistent reasoning premises, and generate a list of contradictions and conflicts.

5. The adversarial method for testing the quality of legal documents based on logical game theory as described in claim 4, characterized in that, The specific steps for selecting key fact nodes in the initial argument chain graph are as follows: Based on the initial argument chain graph, the path confidence and the overall confidence of the conclusion node are calculated. The overall confidence of the conclusion node in the initial argument chain graph is obtained and used as the overall confidence of the conclusion node in the previous round of adversarial graph. Using the initial argument chain graph as the current adversarial graph, calculate the centrality of each fact node, and select fact nodes with a centrality greater than the threshold as key fact nodes.

6. The adversarial method for testing the quality of legal documents based on logical game theory as described in claim 5, characterized in that, The iterative construction of the multi-round adversarial graph involves the following steps: Based on the fact triples corresponding to key fact nodes, and combined with the legal dispute focus template library, semantic matching retrieval and element perturbation operations are performed to generate adversarial factual hypotheses; Add adversarial factual assumptions as new factual nodes to the current adversarial graph, and establish supporting edges, applicable edges, and derivation edges based on the new factual nodes, evidence nodes, legal provisions nodes, and conclusion nodes to construct the current round of adversarial graph.

7. The adversarial method for testing the quality of legal documents based on logical game theory as described in claim 6, characterized in that, The specific steps for generating the multi-round game confidence decay sequence are as follows: Based on the current round adversarial graph, calculate the path confidence of each reasoning path and the comprehensive confidence of the conclusion node to obtain the comprehensive confidence of the conclusion node in the current round adversarial graph; Based on the overall confidence of the conclusion nodes in the previous round of adversarial graph and the overall confidence of the conclusion nodes in the current round of adversarial graph, calculate the confidence decay in the current round; When the absolute value of the difference between the confidence decay amounts in two consecutive rounds is less than the convergence threshold, the iteration terminates and a multi-round game confidence decay sequence is generated.

8. The adversarial method for testing the quality of legal documents based on logical game theory as described in claim 7, characterized in that, The path vulnerability contribution value is calculated based on the confidence decay sequence from multiple rounds of game theory, combined with the vulnerability propagation coefficients corresponding to different types of edges in the directed heterogeneous graph. The specific steps are as follows: The strength of fundamental vulnerability is calculated based on the confidence decay sequence of multi-round game; Traverse all reasoning paths from evidence nodes, fact nodes, and legal provision nodes to conclusion nodes in the directed heterogeneous graph, and generate a set of reasoning paths; Identify the supporting edges, applicable edges, and derivation edges in the inference path set. Based on the vulnerability propagation coefficients corresponding to the supporting edges, applicable edges, and derivation edges, calculate the path propagation coefficient of each inference path in the inference path set. Based on the basic vulnerability strength and the path propagation coefficient of each inference path in the inference path set, the path vulnerability contribution value is calculated, and the path vulnerability contribution value set is obtained.

9. The adversarial method for testing the quality of legal documents based on logical game theory as described in claim 8, characterized in that, The specific steps for generating a global vulnerability index for legal documents through hierarchical accumulation are as follows: The first layer of accumulation is performed based on the path vulnerability contribution value set and the directed heterogeneous graph, and the node vulnerability value set is calculated. Based on the set of node vulnerability values, a second-level cumulative calculation is performed to obtain the global vulnerability index of legal documents.

10. The adversarial method for testing the quality of legal documents based on logical game theory as described in claim 9, characterized in that, The specific steps for generating the structured verification report are as follows: Based on the list of logical breakpoints and the initial argument chain diagram, the number of logical breakpoints and the total number of nodes are calculated, and a logical integrity score is generated based on the ratio of the difference between the total number of nodes and the number of logical breakpoints to the total number of nodes. Based on the list of contradictions and conflicts and the directed heterogeneous graph, the number of contradictions and conflicts and the total number of reasoning paths are calculated. An argument consistency score is generated based on the ratio of the difference between the total number of reasoning paths and the number of contradictions and conflicts to the total number of reasoning paths. Based on the global vulnerability index of legal documents, a robustness score for the conclusion is generated through reverse mapping. The logical integrity score, the argument consistency score, and the conclusion robustness score are graded and aggregated to generate a structured verification report.