Graph network infringement behavior classification method based on text expansion and label information fusion

By employing text augmentation and label information fusion methods within a graph network model, the problems of high computational complexity and insufficient semantic information in civil tort classification are addressed, enabling more efficient tort identification and classification and supporting accurate determination of legal texts.

CN119046461APending Publication Date: 2024-11-29UNIV OF ELECTRONICS SCI & TECH OF CHINA

Patent Information

Application Number
CN202410876244.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

Existing technologies for classifying civil torts suffer from problems such as large computational load, data sparsity, underutilization of feature information due to data sparsity, and insufficient semantic information in short texts, making it particularly difficult to effectively identify tort characteristics in legal texts.

Method used

We employ a graph network-based approach, which involves word embedding and global graph information construction, dual graph attention extraction, data pooling, and text feature augmentation and enhancement. By combining the NVDM-GSM model and the TF-IWF algorithm, we perform text augmentation and label information fusion to improve the efficiency of text feature representation and classification.

Benefits of technology

It improves the efficiency and accuracy of classifying civil torts, enabling better identification and categorization of tort characteristics in legal texts, and supporting efficient judgments in judicial practice.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046461A_ABST
    Figure CN119046461A_ABST
Patent Text Reader

Abstract

The invention provides a graph network infringement behavior classification method based on text expansion and label information fusion. The method comprises the following steps: performing global graph information construction on input text data in a word embedding and global graph information construction module; performing graph attention extraction on the word level and the sentence level in a double graph attention extraction module; main feature information of each word is extracted in a data pooling module; the short text is effectively expanded and enriched in the text feature expansion module; the text feature enhancement module is used for enhancing text features by making a thermodynamic diagram; and performing text classification by using the enhanced text features in a text classification module. According to the method, core words are extracted through the topic model and the TF-IWF, the core word bank is constructed, and text feature information is expanded and enriched. At the same time, words with obvious category orientation in the feature vectors after maximum pooling are extracted through a graph attention mechanism; in addition, according to the method, labels are vectorized through a word embedding technology and fused with text vectors, text feature enhancement is carried out, and then the civil infringement behavior classification precision and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a graph network infringement classification method based on text expansion and label information fusion, and belongs to the field of natural language processing. Background Art

[0002] As a core concept in legal theory and practice, civil tort refers to those behaviors that violate the provisions of current laws and regulations, infringe upon the legitimate rights and interests of citizens, legal persons and various civil subjects, and therefore must bear corresponding civil legal liabilities in accordance with the law. In legal documents, statements involving civil torts are often presented in a "subject-predicate-object" structure, but relying solely on basic analysis of sentence structure and extraction of key statutory element information is not enough to achieve comprehensive mining and accurate identification of semantic feature information of torts. When processing civil litigation texts, it is far from enough to complete basic sentence classification. It is necessary to conduct in-depth information extraction and semantic analysis of the litigation content, and then classify these short texts containing tort characteristics into the corresponding tort category within the legal system. To this end, the present invention aims to transform this problem into a single-label classification task, in order to provide more accurate and efficient tort determination support in judicial practice, especially in the case trial process.

[0003] At present, there are two main algorithmic approaches for single-label text classification, text representation and feature extraction. However, the current mainstream text representation methods all have a drawback, which is that a corpus needs to be built, which not only increases the amount of calculation, but also causes data sparseness due to the large size of the corpus, and only uses 0 and 1 to represent sentences and documents respectively, ignoring the words in the text. Feature extraction mainly includes two methods based on neural networks and graph representation learning methods. The difference between the two is whether the data is obtained from the Euclidean space, but the actual application scenario-legal text data is generated from non-Euclidean space, so the graph representation-based method is more suitable for the classification of legal texts. In the existing SLTC (single label classification) task based on hierarchical GAT, there are problems such as important word information in the sentence is easily ignored due to the 0 and 1 labeling problem, the feature information of the label is not fully utilized, and the semantic information that can be extracted from the short text is less that is helpful for label classification. Therefore, in order to solve the above problems, the present invention proposes a graph network infringement classification method based on text expansion and label information fusion for the single label classification task of civil infringement. Summary of the invention

[0004] This paper proposes a graph network infringement classification method based on text expansion and label information fusion, aiming to improve the efficiency of civil infringement classification. The steps of the method are as follows:

[0005] (1) In the word embedding and global graph information construction module, global graph information is constructed for the input text data

[0006] (2) Perform graph attention extraction on word level and sentence level in the dual graph attention extraction module

[0007] (3) Extract the main feature information of each word in the data pooling module

[0008] (4) Effectively expand and enrich short texts in the text feature expansion module

[0009] (5) In the text feature enhancement module, the text features are enhanced by making a heat map.

[0010] (6) Use the enhanced text features to perform text classification in the text classification module BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 This is the overall framework diagram of the graph network infringement classification based on text expansion and label information fusion adopted by the present invention.

[0012] Figure 2 This is a diagram of the graph attention network architecture used in the present invention.

[0013] Figure 3 This is a schematic diagram of similarity calculation between two words used in the present invention.

[0014] Figure 4 This is a schematic diagram of the tag information fusion adopted by the present invention. DETAILED DESCRIPTION

[0015] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0016] like Figure 1 As shown, the present invention is mainly based on the graph network model framework, and adds a text expansion layer and a text enhancement layer, and improves the graph attention layer to vectorize words and sentences. It is mainly composed of six parts: word embedding and global graph information construction module, dual graph attention extraction module, data pooling module, text feature expansion module, text feature enhancement module and text classification module. The specific implementation is as follows:

[0017] Step 1: Word embedding and global graph information construction

[0018] In this module, the pre-trained Glove word vector model is used to initialize the vector representation of the text content and words in the label. k , First, it is converted into a vector matrix H with lower dimension and higher density through the word embedding layer, whose size is V max ×d, where V maxRepresents the total number of words in the text, and d represents the vector dimension corresponding to each word. Similarly, the label is also converted into a word embedding vector matrix l = {l1,l2,…,l n ,…,l N},l n ∈R 1×d To express.

[0019] When processing unstructured text data, the first task is to effectively model it to capture its inherent sequentiality, structure, and semantic meaning. The starting point of the method of this patent is to regard each sentence in the text as an edge in the graph structure, and ensure that the words within the sentence (regarded as nodes) are accurately connected according to the original grammatical structure, so as to faithfully maintain the sequential characteristics and hierarchical relationships of the text. To further enhance the understanding of the semantic level, this module still uses the previously proposed NVDM-GSM (Gaussian-Softmax) topic model. The model aims to extract potential topics T from the text, and reflect these topics as an additional abstract layer in the graph structure, expressed as new edge elements.

[0020] Step 2: Double-layer graph attention extraction

[0021] The dual graph attention extraction module in this module includes word-level and sentence-level graph attention extraction network modules. It is worth noting that GAT is a neural network model that innovatively integrates the attention mechanism into the graph structure space domain. Its uniqueness lies in that it can effectively iterate the features of the central node itself by relying solely on the first-order neighborhood feature information of the directly adjacent nodes in the graph.

[0022] (1) Word-level graph attention extraction module

[0023] When dealing with text classification problems, considering that different keywords in a sentence contribute differently to achieving the classification goal, this patent uses a graph attention model to assign different attention scores to each keyword when constructing a word-level graph attention network. The model first randomly sets an initial target vector u w , and gradually reveal and strengthen the keyword weights that have a greater impact on the classification task in subsequent training iterations.

[0024] Furthermore, in the specific application of the word-level attention mechanism, it not only depends on the pre-set target vector u w , combined with an innovative strategy: for each sentence s j , extract its core features with the help of the maximum pooling operation, thereby generating a unique targeted target vector u' for the sentence wjThe generation of this special target vector follows a specific mathematical model, and its calculation steps are defined by formulas (1) and (2). Ultimately, by integrating these weighted keyword information, the model will generate a vector expression that can fully reflect the meaning of the sentence and is suitable for classification tasks.

[0025]

[0026] Where h represents sentence s j The value of the dth dimension of the i-th word vector in, Represents the maximum eigenvalue of each dimension, d represents the word vector dimension, d∈[1,M].

[0027] After obtaining two different target vectors, the next step is to use the Graph Attention Network (GAT) architecture, such as Figure 3 As shown, to process the adjacency matrix A ij And the attribute feature H corresponding to the word node. In this process, this patent will calculate the similarity between each word node and the two target vectors respectively, and normalize them to generate the corresponding attention weight distribution for each target vector. Specifically, this calculation process includes how to determine the attention of the target vector and the word node features on the classification task based on the correlation between them. The specific calculation process is shown in the following formula:

[0028]

[0029]

[0030] In the above formula, W1 represents the weight matrix, and the node features of the previous layer are expressed by Indicates that both are activated by the nonlinear activation function LeakyReLU. For each topic edge j, the weight of the kth key node is defined as z jk , and z p represents the sum of all keyword node weights, and e j represents the jth edge, and α′ jk and α″ jk They represent the normalized weight coefficients of keyword node k relative to the topic edge.

[0031] (2) Sentence-level attention extraction module

[0032] After obtaining the information representation of the text sentences, the next step is to fuse these sentence information with the vector representation of the corresponding word nodes to form a comprehensive feature vector V of the word nodes based on the sentence level. jFurthermore, a sentence-level graph attention network (Sentence-level GAT) is used to learn and update the features of these word nodes vi, thereby generating a new representation of each word node The formula is shown below.

[0033]

[0034] In the formula, W2 and W3 are weight matrices, the same as W1 in (3). To evaluate the importance of a sentence, β ij represents the weight ratio between word nodes based on sentence granularity, E i Represents the set of edges connecting these word nodes.

[0035] Step 3: Data Pooling

[0036] After obtaining the enhanced text feature expression, the importance of each word in reflecting the main idea of ​​the text varies. Therefore, in this module, this patent introduces an average pooling operation to effectively extract the main feature information of each word. This process is aimed at the updated text information, and the specific calculation process is shown in the following formula:

[0037]

[0038] Where, T k represents the features of the kth text, and f is the pooling function.

[0039] Step 4: Text feature expansion

[0040] The present invention adopts a method that combines the NVDM-GSM model and the TF-IWF algorithm to systematically count the characteristic words in the text to construct the core vocabulary of the text. The specific execution steps are as follows:

[0041] (1) Perform text preprocessing operations on the text in the legal dataset, including but not limited to word segmentation, removal of insignificant stop words, and filtering irrelevant words based on part of speech to ensure that only words that have a significant impact on text classification are retained.

[0042] (2) Apply the neural topic model to extract topics from the preprocessed training set to obtain the potential topic features and topic words in the text. For each topic, a threshold is set in advance, and then the topic words are sorted according to the probability size, and the top K topic words that meet the threshold are selected.

[0043] (3) Using the TF-IWF algorithm, the weight of each word in the data set is calculated. On this basis, the feature words whose weight exceeds the threshold Y in each category of text are selected and combined into a vocabulary set with high weight features.

[0044] (4) Integrate the subject word set corresponding to each topic in the above step with the high-weight word set, thereby constructing a vocabulary resource library that comprehensively covers the core content of the training set, denoted as W = (W1, W2, ..., W T ), where T represents the total number of words in the core vocabulary

[0045] The Word2Vec model is a powerful word embedding tool. It can effectively convert words into low-dimensional real vectors by capturing the contextual relationship of words in a specific window environment of a sentence. In this way, the semantic similarity and degree of association between different words can be intuitively quantified in the mathematical vector space. In Word2Vec, evaluating the similarity between two words can be transformed into calculating the distance between the two word vectors. The smaller the calculated result, the closer the two words are in semantics. The specific process is as follows: Figure 3 shown.

[0046] After extracting the core words and calculating the similarity, the text is expanded. The specific steps are as follows:

[0047] (1) For each short text in the training set, a series of rigorous preprocessing work is first performed, including but not limited to accurate word segmentation, elimination of common stop words, and targeted filtering of words with unimportant parts of speech. Finally, only those words that play a significant role in text classification are retained, thereby constructing a feature word set N, denoted by N = (N1, N2, ..., N M ), where M represents the total number of feature words.

[0048] (2) For each feature word N in the feature word set N i (Here N i Belonging to the feature word set N), this patent will further obtain each core word W in the core word library W obtained by the joint processing of the NVDM-GSM model and the TF-IWF algorithm. j (W here j Specifically, the Word2Vec model is used to calculate the feature word N i With each core word W in the core word library j Then, based on the similarity score, select i The most similar first K words are used as feature words N i The extended phrase.

[0049] For example, the short text on the left side of Table 4-10 is expanded. First, the core word library is created with the words "beat", "fracture" and "identification" as the focus; then the similarity between the words segmented in the text sentence and the key words is calculated, and the words with high similarity are selected, such as "strike", "bone injury", "fracture damage" and "determine". Finally, the selected words are reintegrated into the original sentence (the expanded words are placed after the expanded words in parentheses) to obtain a new text. The results are shown in the right column of Table 1.

[0050] Table 1 Text expansion examples

[0051]

[0052] Step 5: Text feature enhancement

[0053] In order to more vividly demonstrate the correlation between the infringement category label and the specific content of the text, this patent selects several representative labels from the self-built data set as examples, such as "personal freedom infringement", "personal dignity infringement", "identity rights", "property rights infringement", "creditor's rights infringement", "patent infringement", and "trademark infringement". With the expanded text in Table 1 "Deng beat (hit) Huang, causing Huang's right orbital medial wall fracture (bone injury, fracture damage); right eye contusion; lung contusion, multiple soft tissue contusions. After forensic identification (confirmation, ruling), Huang's injury level is light injury." Do a heat map visualization analysis.

[0054] First, the patent initializes the vectorization of the words in the label and text respectively. Next, the attention mechanism is used to explore the mutual connection between them and present this correlation in a visual form, as shown in Figure (unspecified). It is clear from the observation of the heat map that those text fragments containing words such as "beat" and "injury" have the highest correlation with the label "personal freedom infringement".

[0055] Subsequently, the maximum pooling model and attention mechanism are used to obtain the similarity between the vectorized label and the text feature vector. In the result analysis, it can be clearly found that there is a strong correlation between the label "personal freedom infringement" and the main features of the text, which means that if this method can effectively encode the label information through the dominant features of the text, then it is expected to further enhance and enrich the expressiveness of the text features with the help of the semantic connotation of the label itself.

[0056] Based on the above visualization analysis results of labels and text features, we further adopt the interactive attention calculation method to combine all label information representations with the key feature representations of the text, so as to extract label information representations containing text semantic features.

[0057] like Figure 4 As shown in the figure, the specific process of fusing label information with text features is to first transform the text feature matrix T k Perform a dot multiplication operation with the label information matrix l to obtain the matrix M of the interaction between labels and text information nk , in the feature fusion matrix M nk In the matrix, each matrix element represents the correlation between the label and the text feature. Then, the feature fusion matrix M nk The rows and columns of are normalized to obtain the weight matrix of label information in text features. and the weight matrix β of text features in label information nk , the specific formula is shown as follows:

[0058] M nk =l⊙T k (10)

[0059] Secondly, the weight matrix β nk Each column element in is averaged to obtain the average weight matrix of label information in text features. Then the weight matrix α nk Perform a second dot multiplication operation to obtain the label information and text feature attention vector matrix γ. Finally, the attention vector matrix γ is operated with the label information matrix l to obtain the final matrix L that combines the label information and text feature information. The specific formula is shown below:

[0060] L=γ⊙l (15)

[0061] Step 6: Text Classification

[0062] Because the algorithm proposed in this patent is a single-label classification, that is, there is a mutually exclusive relationship between labels, the Softmax function is used in the text classification layer to convert the output result T into a probability, thereby completing the classification prediction of the civil tort label. The specific formula is shown in the following formula:

[0063]

[0064] Where W c represents the parameter matrix that maps the classification feature T to the output domain, b c is the deviation term, is the classification result predicted by the model.

[0065] The loss function used in this patent is the minimum cross entropy loss function, as shown in the following formula:

[0066]

Claims

1. The present invention proposes a graph network infringement classification method based on text expansion and label information fusion, the purpose of which is to improve the efficiency of civil infringement classification. The steps of the method are as follows: Step 1: Construct global graph information for input text data in the word embedding and global graph information construction module; Step 2: Perform graph attention extraction on word level and sentence level in the dual graph attention extraction module; Step 3: Extract the main feature information of each word in the data pooling module; Step 4: Effectively expand and enrich the short text in the text feature expansion module; Step 5: In the text feature enhancement module, the text features are enhanced by making a heat map; Step 6: Use the enhanced text features to perform text classification in the text classification module.

2. According to claim 1, the graph network infringement classification method based on text expansion and label information fusion is characterized in that: The NVDM-GSM (Gaussian-Softmax) topic model mentioned in step 1 specifically refers to mining potential topics K to enrich the semantics of short texts. Each topic t i =(θ1,…,θ w )(W represents vocabulary), represented by the probability distribution of words. The NVDM-GSM model uses the Bag-of-Words (BOW) representation of the document as input features. Given that the topic distribution should follow the normalization characteristics of the probability distribution, after the model samples the Gaussian random variable z representing the topic from the latent space, it also needs to normalize it to ensure that the generated topic distribution meets the requirements of the probability distribution. To this end, NVDM-GSM adopts the strategy of the Softmax function layer. By applying the Softmax operation to the sampled Gaussian variable, the extracted topic vector is effectively normalized and converted into a probabilistic topic distribution that can be used for subsequent analysis. The specific formula is as follows: z~N(μ(x),σ(x) 2 ) (1) θ=Softmax(W l T with) (2) Where W l is a L*K matrix, where L is the dimension of z and K is the number of topics. The normalized vector θ (K-dimensional) obtained is used as the topic distribution vector of the document, and the reconstructed document is obtained after being imported into the decoder P(x|z) The weight parameter ρ in the decoder K*V That is the topic-word distribution matrix. Let θ take the One-hot vector with the kth dimension as 1 and import it into the decoder to get the topic-word distribution of the kth topic.

3. According to claim 1, the graph network infringement classification method based on text expansion and label information fusion is characterized in that: The feature fusion function mentioned in step 2 specifically refers to the core problem of how to effectively integrate these three types of feature vectors and ensure that the more important features are given greater weights during the fusion process. This algorithm enables the model to fuse text and graph features pairwise and dynamically learn the importance weights of various features based on the characteristics of different data sets. The following is the calculation formula to achieve this fusion process: h’1=a*h G1 +(1-a)h G2 (3) h=a*h G3 +(1-a)h’1 (4) In the formula, It is a variable parameter that will be automatically adjusted to the optimal parameter as the model is trained.

4. According to claim 1, the graph network infringement classification method based on text expansion and label information fusion is characterized in that: The average pooling operation mentioned in step 3 specifically refers to the pooling operation on the local area on the input feature map to reduce the size of the feature map. This local area is usually called the pooling window. Average pooling calculates the average value of all pixels in the pooling window and uses this average value as the pixel value of the corresponding position on the pooled feature map. By reducing the size of the feature map, average pooling can reduce the number of parameters in the network, thereby reducing the complexity of the model and reducing the demand for computing resources. At the same time, this pooling method does not change the position of the object on the feature map, which means that the model can maintain the ability to recognize the position of the object. In addition, average pooling can improve computational efficiency, especially when processing large-scale image data.

5. According to claim 1, the graph network infringement classification method based on text expansion and label information fusion is characterized in that: The TF-IWF model mentioned in step 4 specifically refers to a variant of the TF-IDF model. In this improved version, the Inverse Word Frequency (IWF) is used instead of the original Inverse Document Frequency (IDF). This adjustment strategy aims to alleviate the excessive influence that may be brought by high-frequency words, and instead focus more on words that appear relatively few times but have greater semantic weight. Therefore, in application scenarios such as text classification, TF-IWF clearly highlights the role of low-frequency and significant words compared to traditional TF-IDF, showing higher efficiency. The calculation formula used by the TF-IWF algorithm is shown below: Where N d,t Indicates the cumulative number of times word t appears in document d, N d represents the total number of words in document d; at the same time, W c It is used to represent the total frequency of all words in the entire document set, and W c,t It specifically refers to the frequency of occurrence of word t in all words in the entire document set. Through such a definition and quantitative description, we can accurately measure the actual performance of each word in a specific document and its document set.

6. According to claim 1, the graph network infringement classification method based on text expansion and label information fusion is characterized in that: The fusion strategy mentioned in step 5 specifically refers to combining the processed label information L with the text core feature information T k They are organically combined to generate a comprehensive feature representation T that can be used for text classification. This strategy can further enhance the expressiveness of the main features of the text. The specific formula is as follows:

7. According to claim 1, the graph network infringement classification method based on text expansion and label information fusion is characterized in that: The minimum cross entropy loss function mentioned in step 6 specifically refers to a loss function in machine learning, which is mainly used to evaluate the performance of classification models. Its definition is based on the difference between the actual output and the predicted output. The smaller the value of the cross entropy loss function, the closer the model's predicted results are to the actual results, and the better the model's performance. This loss function can automatically adapt to the number of different categories, and can also give a suitable evaluation for datasets with imbalanced categories. At the same time, this function is based on probability distribution, so it can better handle uncertainty and probability problems. In addition, minimizing the cross entropy loss function can make the probability distribution predicted by the model as close as possible to the distribution of the real data, thereby improving the classification performance of the model.

Citation Information

Patent Citations

  • Graph attention web text classification model fusing ternary loss and label embedding

    CN116089618A

  • Heterogeneous graph-based text summarization method and apparatus, storage medium, and terminal

    WO2022241913A1

Cited By

  • Social work field modeling optimization method driven by multi-modal data

    CN119939482A

  • A Multimodal Data-Driven Modeling Optimization Method in the Field of Social Work

    CN119939482B

  • Text similarity retrieval method and system based on embedded model

    CN121597825A