Coarse-grained pre-training model-based fine-grained legal argument pair extraction method and system
Through the fine-grained legal argument pair extraction method based on coarse-grained pre-trained model, and the feedforward neural network is used to calculate the matching score and divergence targets, the problems of poor accuracy and high cost of legal argument pair extraction in the existing technology are solved, and the problem of poor accuracy and high cost of legal argument pair extraction is achieved. Efficient legal arguments to draw.
Patent Information
- Application Number
- CN202410848926.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-11-08
AI Technical Summary
Existing legal arguments are poorly accurate and costly for extraction methods, relying on large quantities of high-quality labeled data and ignoring complex relationships in unlabeled litigation-defense pairs.
Using a fine-grained legal argument pair extraction method based on coarse-grained pre-trained model, the context information of litigation and defense arguments is captured through pre-trained language models, and the matching score and divergence targets are calculated using a feedforward neural network to achieve matching litigation and defense arguments. and diversified matching relationship construction.
Improves the accuracy of legal arguments for extraction, reduces the workload of manual annotation, and requires only a small amount of annotation data to achieve or exceed the performance under a fully supervised setting.
Smart Images

Figure CN118916440A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a method and system for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model. Background Art
[0002] Legal argument pair extraction aims to identify interactive arguments with the same theme from the statements of the plaintiff and the defendant. During the trial, the plaintiff and the defendant should present their arguments in designated documents, namely the lawsuit and the defense documents respectively. An interactive argument pair is defined as two arguments on the same theme - one from the lawsuit and the other from the defense. The arguments in an interactive argument pair may be consistent, emphasizing similar points, or they may be opposite, providing opposing views to each other.
[0003] As attached Figure 2 As shown in the figure, the figure shows an example of a private loan case, where both the plaintiff and the defendant agree on the actual facts of the loan transaction. However, they have significant disagreements on other aspects such as guarantors, interest payments, and penalties. Legal argument pair extraction is designed to facilitate the alignment of arguments presented in litigation and defense documents. This task can help legal professionals, especially judges, highlight key factual disputes that require focused attention and provide a roadmap for subsequent investigation or analysis. In essence, legal argument pair extraction is an important tool in the legal assistant system, which aims to improve the work efficiency of judges.
[0004] The task of argument pair extraction has attracted increasing attention recently, especially in the context of mining opinion interactions from conversational arguments. Most existing works formalize it as a sentence pair classification problem, however, these methods heavily rely on a large amount of high-quality labeled data, which requires time-consuming and labor-intensive manual annotation. In addition, these models usually ignore the complex relationships in unlabeled plaintiff-defense pairs, resulting in their suboptimal ability to extract legal argument pairs. Summary of the invention
[0005] The present invention provides a method and system for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model, so as to solve the problems of poor extraction accuracy and high cost of existing legal argument pairs.
[0006] The present invention provides a method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model, which comprises: Obtain litigation and defense documents; Extracting litigation arguments and defense arguments based on the litigation documents and defense documents through a pre-trained argument pair extraction model, and forming preliminary argument pairs based on the litigation arguments and defense arguments; Matching litigation arguments with defense arguments in multiple preliminary argument pairs, and identifying litigation arguments and defense arguments with the highest matching degree; Divergence target matching is performed based on the litigation arguments and defense arguments with the highest matching degree, so that each defense argument finds at least one corresponding litigation argument, and the matching relationships of the litigation arguments are different to form diversified matching relationships, thereby completing the extraction of the final argument pair.
[0007] According to a method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model provided by the present invention, the litigation arguments and defense arguments are matched in a plurality of preliminary argument pairs to confirm the litigation arguments and defense arguments with the highest matching degree, specifically including: Connecting the preliminary argument pairs consisting of the litigation arguments and the defense arguments with special tags to form a sequence, and inputting the sequence into a pre-trained language model; The pre-trained language model generates hidden representations for the input sequence, capturing contextual information of litigation arguments and defense arguments in the preliminary argument pairs; Based on the contextual information of the litigation arguments and the defense arguments, a matching score is calculated through a feed-forward neural network to quantify the correlation or contrast between the litigation arguments and the defense arguments.
[0008] According to a method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model provided by the present invention, the matching score calculation is performed through a feedforward neural network based on the contextual information of the litigation argument and the defense argument to quantify the correlation or comparison degree between the litigation argument and the defense argument, specifically including: Based on the given litigation arguments, the corresponding defense arguments are regarded as a positive example bag, in which there is at least one positive interaction argument. These arguments are greedily matched by applying the maximum value operation to arguments with the same topic, and the positive matching score is calculated; based on the positive matching score, the model is trained through a preset contrastive learning mechanism, and negative defense arguments are randomly sampled from other cases. The model is trained through the contrastive learning mechanism to correctly match litigation arguments and defense arguments from the same case, and the litigation-defense matching target is determined; Based on the litigation-defense matching goal, related arguments are given higher scores than unrelated argument pairs, and the litigation arguments and defense arguments with the highest matching degree are identified.
[0009] According to a method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model provided by the present invention, after calculating the matching score based on the contextual information of the litigation argument and the defense argument through a feedforward neural network and quantifying the correlation or contrast between the litigation argument and the defense argument, the method further includes: Eliminate arguments that do not discuss specific facts to avoid false negatives.
[0010] According to a method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model provided by the present invention, the divergence target matching is performed based on the litigation argument and the defense argument with the highest matching degree, so that each defense argument finds at least one corresponding litigation argument, and the matching relationships of the litigation arguments are different to form diversified matching relationships, and the final argument pair extraction is completed, which specifically includes: Sample two litigation arguments from the same document, and calculate two matching distributions of defense arguments based on the two litigation arguments by standardization; The difference between the two matching distributions is measured by divergence calculation, and the matching divergence target is calculated; Different litigation arguments are matched with different defense arguments based on the matching divergence goal.
[0011] According to a method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model provided by the present invention, the matching relationships of litigation arguments are different to form diversified matching relationships, and the extraction of final argument pairs is completed, specifically including: the relationship between litigation arguments and defense arguments is a bidirectional relationship, and for each defense argument, at least one corresponding litigation argument can be found, and the matching relationships of litigation arguments are also different; By forming diversified matching relationships, the final argument pair is extracted.
[0012] The present invention also provides a fine-grained legal argument pair extraction system based on a coarse-grained pre-training model, the system comprising: Document acquisition module, used to acquire litigation documents and defense documents; An argument pair construction module, used for extracting litigation arguments and defense arguments based on the litigation documents and defense documents through a pre-trained argument pair extraction model, and forming preliminary argument pairs based on the litigation arguments and defense arguments; A litigation and defense matching module, used to match litigation arguments with defense arguments among multiple preliminary argument pairs, and to identify litigation arguments and defense arguments with the highest matching degree; The matching divergence module is used to perform divergence target matching based on the litigation arguments and defense arguments with the highest matching degree, so that each defense argument finds at least one corresponding litigation argument, and the matching relationships of the litigation arguments are different to form diversified matching relationships, thereby completing the extraction of the final argument pair. The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model as described above is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model as described above.
[0014] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model.
[0015] The present invention provides a method and system for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model. By using coarse-grained litigation-defense data to train an encoder, two pre-training tasks are proposed. In this setting, only a small amount of labeled data is needed to achieve or exceed the performance of a fully supervised setting, which can achieve better results in the legal argument extraction task and greatly reduce the workload of manual labeling. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flowchart of the method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model provided by the present invention.
[0018] Figure 2 It is a schematic diagram of a legal argument pair extraction task case provided by the prior art.
[0019] Figure 3 It is a schematic diagram of the model architecture and pre-training tasks provided by the present invention.
[0020] Figure 4 It is a schematic diagram of module connections of a fine-grained legal argument pair extraction system based on a coarse-grained pre-training model provided by the present invention.
[0021] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention.
[0022] Figure numerals: 110: document acquisition module; 120: argument pair construction module; 130: litigation defense matching module; 140: matching divergence module; 510: processor; 520: communication interface; 530: memory; 540: communication bus. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] Combine the following Figure 1 A method for extracting fine-grained legal argument pairs based on a coarse-grained pre-trained model of the present invention is described, comprising: Step 100: Obtain litigation documents and defense documents.
[0025] In this paper, we introduce an argument-oriented pre-training framework based on litigation documents and defense documents for legal argument pair extraction. This framework utilizes large-scale coarse-grained litigation-defense pairs and uses the following two self-supervisory objectives inspired by the following observations.
[0026] For many litigation arguments, there usually exists at least one corresponding defense argument to resolve them. Therefore, we adopt a contrastive learning strategy. For each litigation argument, the defense argument with the highest matching score in the corresponding defense is considered as a positive example. Meanwhile, arguments from irrelevant cases are considered as negative examples. This goal encourages each litigation argument to be closely aligned with at least one defense argument.
[0027] In a document, different litigation arguments are usually addressed by different defense arguments. Therefore, we aim to ensure that the matching distribution of defense arguments is different when comparing different litigation arguments, and encourage that different litigation arguments should not be associated with the same defense arguments.
[0028] The pre-training framework of the present invention is independent of manually labeled data and can therefore be applied to large-scale self-supervised pre-training. After the pre-training phase, the model can play two roles: as an unsupervised tool capable of directly extracting argument pairs (unsupervised), or as a base model that can be further fine-tuned with limited manually labeled data to improve its performance in a supervised manner (supervised).
[0029] Step 200: extract litigation arguments and defense arguments based on the litigation documents and defense documents through a pre-trained argument pair extraction model, and compose preliminary argument pairs based on the litigation arguments and defense arguments.
[0030] In the present invention, BERT (pre-trained language model) is used as the basic encoder for extracting argument pair representations, such as Figure 3When provided with an argument pair (q, p) consisting of one argument from the lawsuit and another argument from the defense, they are concatenated with special tokens. Then, the sequence {[CLS], q, [SEP], p, [SEP]} is input into the BERT encoder, which processes this input sequence and generates a set of hidden representations, where the final hidden representation of the [CLS] token is denoted as h c captures the contextual information of the two arguments in the pair (q, p). To determine the matching score between two arguments q and p, we denote this [CLS] by h c It is passed through a feed-forward neural network and the output is used as a matching score, which quantifies the degree of relevance or contrast between the two arguments in question.
[0031] S(q, p) = Wh c +b.
[0032] Where W and b are trainable parameters, and a higher score indicates a higher probability that two arguments discuss the same topic.
[0033] In BERT, [CLS] corresponds to the word vector of the first word in the input text, and the first neuron in the output layer is usually used to predict the category of the text. [SEP] is the abbreviation of "separator", which usually indicates the end of a sentence or document. In BERT, [SEP] corresponds to the word vector Q of the last word in the input text, and its function is to separate different sentences. For example, when processing sentence pairs in BERT, a [SEP] is usually inserted between two sentences to indicate their dividing point.
[0034] Step 300: Match litigation arguments with defense arguments in multiple preliminary argument pairs, and identify litigation arguments and defense arguments with the highest matching degree.
[0035] Specifically, it includes: connecting the preliminary argument pairs consisting of the litigation arguments and the defense arguments with special tags to form a sequence, and inputting the sequence into a pre-trained language model; The pre-trained language model generates hidden representations for the input sequence, capturing contextual information of litigation arguments and defense arguments in the preliminary argument pairs; Based on the contextual information of the litigation arguments and the defense arguments, a matching score is calculated through a feed-forward neural network to quantify the correlation or contrast between the litigation arguments and the defense arguments.
[0036] Among them, a matching score is calculated based on the contextual information of the litigation arguments and the defense arguments through a feedforward neural network to quantify the correlation or contrast between the litigation arguments and the defense arguments, including: Based on the given litigation arguments, the corresponding defense arguments are regarded as a positive example bag, in which there is at least one positive interaction argument. These arguments are greedily matched by applying the maximum value operation to arguments with the same topic, and the positive matching score is calculated; based on the positive matching score, the model is trained through a preset contrastive learning mechanism, and negative defense arguments are randomly sampled from other cases. The model is trained through the contrastive learning mechanism to correctly match litigation arguments and defense arguments from the same case, and the litigation-defense matching target is determined; Based on the litigation-defense matching goal, related arguments are given higher scores than unrelated argument pairs, and the litigation arguments and defense arguments with the highest matching degree are identified.
[0037] Specifically, the goal of argument pair extraction is to match arguments about the same topic. Each litigation argument must be responded to, and the argument pair must come from the litigation and defense of the same case, which can provide weak supervision for the argument pair extraction task. Inspired by the strategy in distant supervision relation extraction, after a litigation argument is given, the corresponding defense is regarded as a positive bag, in which there is at least one positive interaction argument. These arguments are greedily matched by applying the maximum operation to arguments with the same topic. Specifically, given a litigation argument q∈c, the positive matching score is calculated as follows.
[0038]
[0039] where d + is the corresponding defense of the same case as c. Intuitively, the defense argument with the highest matching score is regarded as a positive example in further contrastive learning. In order to force the model to assign high scores to related argument pairs, the model is trained using a contrastive learning mechanism. Negative defense arguments are randomly sampled from other cases, and the model is required to correctly match litigation arguments and defense arguments from the same case. Specifically, given a litigation argument q∈c and a related defense d recorded in the same case + , first randomly select N irrelevant defense arguments from other cases as negative candidate sets The litigation-defense matching objective is defined as follows.
[0040]
[0041] This goal encourages related arguments to have higher scores than unrelated argument pairs. In addition, previous studies have demonstrated the need for hard negative examples to promote better training, so negative examples are sampled from the same cases, which often involve similar events and disputes. Hard negative examples can help the model compare argument pairs in detail. It is worth noting that although arguments from the same case may be similar, they are usually different in case details. The present invention also removes arguments that do not discuss specific facts, such as "there is no opposing opinion" and "requires the judge to reject all appeals" to avoid the false negative problem.
[0042] Step 400: Perform divergence target matching based on the litigation arguments and defense arguments with the highest matching degree, so that each defense argument finds at least one corresponding litigation argument, and the matching relationships of the litigation arguments are different to form diversified matching relationships, thereby completing the extraction of the final argument pair.
[0043] Specifically, it includes: sampling two litigation arguments from the same document, and calculating two matching distributions of defense arguments based on the two litigation arguments through standardization; The difference between the two matching distributions is measured by divergence calculation, and the matching divergence target is calculated; Different litigation arguments are matched with different defense arguments based on the matching divergence goal.
[0044] Among them, making the matching relationships of litigation arguments different, forming diversified matching relationships, and completing the extraction of the final argument pairs specifically includes: The relationship between litigation arguments and defense arguments is a two-way relationship. For each defense argument, at least one corresponding litigation argument can be found, and the matching relationship between litigation arguments is also different. By forming diversified matching relationships, the final argument pair is extracted.
[0045] Specifically, the lawsuit-defense matching objective exploits supervision from the lawsuit-defense pair hierarchy, which enables the model to be trained on an unlabeled dataset; however, this may cause the model to learn shortcuts by sampling arguments from other cases as negative examples; thus, the model may be trained to give high scores to all defense arguments in the same case, which may cause it to only recognize entities such as names, locations, and times, rather than topics and details in the arguments.
[0046] To solve this problem, the present invention proposes a matching divergence target, that is, different litigation arguments tend to match different defense arguments. Therefore, the model should not give high scores to all argument pairs in the same case. Specifically, the matching divergence target encourages the matching distribution between litigation arguments and defense arguments to be diverse. For each training iteration, two litigation arguments are first sampled from the same document, q i and ql Then, softmax normalization is used to calculate the defense argument d = {p i , ..., p m}'s matching distribution.
[0047] P_q(p_j)=softmax(s(q, p_j)), (p_j∈d, q=q_i, q_l).
[0048] Use Jensen-Shannon divergence to measure the difference between two matching distributions, and calculate the matching divergence target as: , this goal encourages two distributions and Different, that is, different litigation arguments should match different defense arguments. In summary, for each iteration, we sample two litigation arguments from the same document, and the final loss is calculated as the sum of contrastive matching loss and divergence loss: L c =L1+λL2, where λ is a hyperparameter. Since the relationship between litigation arguments and defense arguments is a two-way relationship, the two assumptions are also valid for defense arguments, that is, for each defense argument, at least one corresponding litigation argument can be found, and the matching relationship for litigation arguments should be different. Therefore, as L c The same definition can be used to define the defense loss function L d It is also the sum of the two objectives. The final pre-training loss function is L = L c +L d .
[0049] The present invention provides a fine-grained legal argument pair extraction method based on a coarse-grained pre-training model, and proposes two pre-training tasks by using coarse-grained litigation-defense data to train the encoder. In this setting, only a small amount of labeled data is needed to achieve or exceed the performance of the fully supervised setting, which can achieve better results in the legal argument extraction task, while greatly reducing the workload of manual labeling.
[0050] refer to Figure 4 The present invention also discloses a fine-grained legal argument pair extraction system based on a coarse-grained pre-training model, the system comprising: The document acquisition module 110 is used to acquire litigation documents and defense documents; An argument pair construction module 120 is used to extract litigation arguments and defense arguments based on the litigation documents and defense documents through a pre-trained argument pair extraction model, and to form preliminary argument pairs based on the litigation arguments and defense arguments; A litigation defense matching module 130 is used to match litigation arguments with defense arguments in a plurality of preliminary argument pairs, and to identify litigation arguments and defense arguments with the highest matching degree; The matching divergence module 140 is used to perform divergence target matching based on the litigation arguments and defense arguments with the highest matching degree, so that each defense argument finds at least one corresponding litigation argument, and the matching relationships of the litigation arguments are different to form diversified matching relationships, thereby completing the extraction of the final argument pair.
[0051] Among them, the litigation arguments and defense arguments are matched in multiple preliminary argument pairs, and the litigation arguments and defense arguments with the highest matching degree are confirmed, including: Connecting the preliminary argument pairs consisting of the litigation arguments and the defense arguments with special tags to form a sequence, and inputting the sequence into a pre-trained language model; The pre-trained language model generates hidden representations for the input sequence, capturing contextual information of litigation arguments and defense arguments in the preliminary argument pairs; Based on the contextual information of the litigation arguments and the defense arguments, a matching score is calculated through a feed-forward neural network to quantify the correlation or contrast between the litigation arguments and the defense arguments.
[0052] Based on the contextual information of the litigation arguments and the defense arguments, a matching score is calculated through a feed-forward neural network to quantify the relevance or contrast between the litigation arguments and the defense arguments, including: Based on the given litigation arguments, the corresponding defense arguments are regarded as a positive example bag, in which there is at least one positive interaction argument. These arguments are greedily matched by applying the maximum value operation to arguments with the same topic, and the positive matching score is calculated; based on the positive matching score, the model is trained through a preset contrastive learning mechanism, and negative defense arguments are randomly sampled from other cases. The model is trained through the contrastive learning mechanism to correctly match litigation arguments and defense arguments from the same case, and the litigation-defense matching target is determined; Based on the litigation-defense matching goal, related arguments are given higher scores than unrelated argument pairs, and the litigation arguments and defense arguments with the highest matching degree are identified.
[0053] Based on the contextual information of the litigation arguments and the defense arguments, a matching score is calculated through a feed-forward neural network to quantify the relevance or contrast between the litigation arguments and the defense arguments. It also includes: Eliminate arguments that do not discuss specific facts to avoid false negatives.
[0054] Divergence target matching is performed based on the litigation arguments and defense arguments with the highest matching degree, so that each defense argument finds at least one corresponding litigation argument, and the matching relationships of the litigation arguments are different to form diversified matching relationships, and the final argument pair is extracted, which specifically includes: Sample two litigation arguments from the same document, and calculate two matching distributions of defense arguments based on the two litigation arguments by standardization; The difference between the two matching distributions is measured by divergence calculation, and the matching divergence target is calculated; Different litigation arguments are matched with different defense arguments based on the matching divergence goal.
[0055] Make the matching relationships of litigation arguments different, form diversified matching relationships, and complete the extraction of the final argument pairs, specifically including: The relationship between litigation arguments and defense arguments is a two-way relationship. For each defense argument, at least one corresponding litigation argument can be found, and the matching relationship between litigation arguments is also different. By forming diversified matching relationships, the final argument pair is extracted.
[0056] The fine-grained legal argument extraction system based on the coarse-grained pre-training model provided by the present invention proposes two pre-training tasks by using coarse-grained litigation-defense data to train the encoder. In this setting, only a small amount of labeled data is needed to achieve or exceed the performance of the fully supervised setting, which can achieve better results in the legal argument extraction task and greatly reduce the workload of manual labeling.
[0057] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute a fine-grained legal argument pair extraction method based on a coarse-grained pre-trained model, the method comprising: obtaining litigation documents and defense documents; extracting litigation arguments and defense arguments based on the litigation documents and defense documents through a pre-trained argument pair extraction model, and forming preliminary argument pairs based on the litigation arguments and defense arguments; matching litigation arguments with defense arguments in multiple preliminary argument pairs, and confirming litigation arguments and defense arguments with the highest matching degree; performing divergence target matching based on litigation arguments and defense arguments with the highest matching degree, so that each defense argument finds at least one corresponding litigation argument, and makes the matching relationship of litigation arguments different, forming a diversified matching relationship, and completing the extraction of final argument pairs.
[0058] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0059] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the fine-grained legal argument pair extraction method based on the coarse-grained pre-trained model provided by the above-mentioned methods, and the method includes: obtaining litigation documents and defense documents; extracting litigation arguments and defense arguments based on the litigation documents and defense documents through a pre-trained argument pair extraction model, and forming preliminary argument pairs based on the litigation arguments and defense arguments; matching the litigation arguments with the defense arguments in multiple preliminary argument pairs, and confirming the litigation arguments and defense arguments with the highest matching degree; performing divergence target matching based on the litigation arguments and defense arguments with the highest matching degree, so that each defense argument finds at least one corresponding litigation argument, and makes the matching relationship of the litigation arguments different to form a diversified matching relationship, and completes the extraction of the final argument pairs.
[0060] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the fine-grained legal argument pair extraction method based on the coarse-grained pre-trained model provided by the above-mentioned methods, the method comprising: obtaining litigation documents and defense documents; extracting litigation arguments and defense arguments based on the litigation documents and defense documents through a pre-trained argument pair extraction model, and forming preliminary argument pairs based on the litigation arguments and defense arguments; matching the litigation arguments with the defense arguments in multiple preliminary argument pairs, and confirming the litigation arguments and defense arguments with the highest matching degree; performing divergence target matching based on the litigation arguments and defense arguments with the highest matching degree, so that each defense argument finds at least one corresponding litigation argument, and makes the matching relationships of the litigation arguments different to form diversified matching relationships, and completes the extraction of the final argument pairs.
[0061] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0062] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0063] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model, characterized in that: include: Obtain litigation and defense documents; Extracting litigation arguments and defense arguments based on the litigation documents and defense documents through a pre-trained argument pair extraction model, and forming preliminary argument pairs based on the litigation arguments and defense arguments; Matching litigation arguments with defense arguments in multiple preliminary argument pairs, and identifying litigation arguments and defense arguments with the highest matching degree; Divergence target matching is performed based on the litigation arguments and defense arguments with the highest matching degree, so that each defense argument finds at least one corresponding litigation argument, and the matching relationships of the litigation arguments are different to form diversified matching relationships, thereby completing the extraction of the final argument pair.
2. According to claim 1, the method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model is characterized in that: The litigation arguments and defense arguments are matched in the multiple preliminary argument pairs to confirm the litigation arguments and defense arguments with the highest matching degree, specifically including: Connecting the preliminary argument pairs consisting of the litigation arguments and the defense arguments with special tags to form a sequence, and inputting the sequence into a pre-trained language model; The pre-trained language model generates hidden representations for the input sequence, capturing contextual information of litigation arguments and defense arguments in the preliminary argument pairs; Based on the contextual information of the litigation arguments and the defense arguments, a matching score is calculated through a feed-forward neural network to quantify the correlation or contrast between the litigation arguments and the defense arguments.
3. The method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model according to claim 2 is characterized in that: The matching score calculation based on the contextual information of the litigation arguments and the defense arguments is performed through a feedforward neural network to quantify the relevance or contrast between the litigation arguments and the defense arguments, specifically including: Based on the given litigation arguments, the corresponding defense arguments are regarded as a positive example bag, in which there is at least one positive interaction argument. These arguments are greedily matched by applying the maximum value operation to arguments with the same topic, and the positive matching score is calculated; based on the positive matching score, the model is trained through a preset contrastive learning mechanism, and negative defense arguments are randomly sampled from other cases. The model is trained through the contrastive learning mechanism to correctly match litigation arguments and defense arguments from the same case, and the litigation-defense matching target is determined; Based on the litigation-defense matching goal, related arguments are given higher scores than unrelated argument pairs, and the litigation arguments and defense arguments with the highest matching degree are identified.
4. The method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model according to claim 2, characterized in that: After calculating the matching score based on the context information of the litigation arguments and the defense arguments through a feedforward neural network and quantifying the relevance or contrast between the litigation arguments and the defense arguments, the method further includes: Eliminate arguments that do not discuss specific facts to avoid false negatives.
5. The method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model according to claim 1, characterized in that: The divergence target matching is performed based on the litigation arguments and defense arguments with the highest matching degree, so that each defense argument finds at least one corresponding litigation argument, and the matching relationships of the litigation arguments are different to form diversified matching relationships, and the final argument pair extraction is completed, specifically including: Sample two litigation arguments from the same document, and calculate two matching distributions of defense arguments based on the two litigation arguments by standardization; The difference between the two matching distributions is measured by divergence calculation, and the matching divergence target is calculated; Different litigation arguments are matched with different defense arguments based on the matching divergence goal.
6. The method for extracting fine-grained legal argument pairs based on a coarse-grained pre-training model according to claim 5, characterized in that: The method of making the matching relationships of litigation arguments different, forming diversified matching relationships, and completing the extraction of the final argument pair specifically includes: The relationship between litigation arguments and defense arguments is a two-way relationship. For each defense argument, at least one corresponding litigation argument can be found, and the matching relationship between litigation arguments is also different. By forming diversified matching relationships, the final argument pair is extracted.
7. A fine-grained legal argument pair extraction system based on a coarse-grained pre-trained model, characterized in that: The system includes: a document acquisition module for acquiring litigation documents and defense documents; An argument pair construction module, used for extracting litigation arguments and defense arguments based on the litigation documents and defense documents through a pre-trained argument pair extraction model, and forming preliminary argument pairs based on the litigation arguments and defense arguments; A litigation and defense matching module, used to match litigation arguments with defense arguments among multiple preliminary argument pairs, and to identify litigation arguments and defense arguments with the highest matching degree; The matching divergence module is used to perform divergence target matching based on the litigation arguments and defense arguments with the highest matching degree, so that each defense argument can find at least one corresponding litigation argument, and the matching relationships of the litigation arguments are different to form diversified matching relationships, thereby completing the extraction of the final argument pair.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements the fine-grained legal argument pair extraction method based on the coarse-grained pre-training model as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the fine-grained legal argument pair extraction method based on the coarse-grained pre-training model as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the fine-grained legal argument pair extraction method based on the coarse-grained pre-training model as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Fine-grained emotion element extraction method and system
CN117892719A
