A target-level event text classification method based on topic perception and collaborative thinking
By combining topic modeling and collaborative propagation aggregation modules with BERT methods, the problems of classifier structure insensitivity and poor interpretability in text classification are solved, achieving more accurate and interpretable text classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2026-04-14
AI Technical Summary
Existing text classification methods suffer from insensitive classifier structure, unimodality, and poor interpretability, making it difficult to effectively utilize target information and cooperative signals, resulting in inaccurate and difficult-to-interpret classification results.
Latent topics are generated using topic modeling technology LDA, a heterogeneous topic graph is constructed, and collaborative signals between text, topics and category labels are captured through a collaborative propagation aggregation module. Inference is performed using the bidirectional encoder BERT of Transformer, and a scoring module is designed to comprehensively consider semantic and collaborative information.
It improves the accuracy and interpretability of text classification, enhances classification performance, and provides better decision support.
Smart Images

Figure CN118349672B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a target-level event text classification method based on topic awareness and collaborative thinking, belonging to the fields of artificial intelligence and natural language processing technology. Background Technology
[0002] Text classification aims to use computers to automatically categorize and label text (or other entities) according to a specific classification system or standard. With the explosive growth of information, manually labeled data has become time-consuming, of low quality, and susceptible to the subjective bias of the labelers. Therefore, utilizing machines to automate text labeling has become practically significant. Assigning repetitive and tedious text labeling tasks to computers can effectively overcome these problems, while the labeled data is consistent and of high quality. Its applications are numerous, including sentiment analysis, topic classification, question answering tasks, stance detection, and rumor detection.
[0003] When people express opinions and create text, they are usually not acting out of thin air, but rather expressing their feelings in response to a specific target (person, thing, event, topic, etc.). Therefore, utilizing the implicit information contained in the target can effectively facilitate text classification. For text on social media, because the target often involves controversial topics or political figures, this allows for in-depth understanding of public opinion, tracking of emotional changes, and analysis of the spread of ideas, and is applicable to various practical tasks, including but not limited to stance detection, irony identification, and fake news detection. With the exponential growth of user-generated content, understanding individuals' stances and emotional inclinations towards various targets through text becomes increasingly important and challenging.
[0004] An event text typically refers to an event that occurs at a specific time and in a specific environment, involving several roles and exhibiting certain actions. Public events can be classified into four levels based on their nature, severity, controllability, and scope of impact: Level I (red) is particularly significant, Level II (orange) is significant, Level III (yellow) is relatively large, and Level IV (blue) is general. Accurately classifying events is crucial for governments and other public institutions to establish necessary crisis response mechanisms and take necessary measures during the emergence and development of crises. This can effectively prevent and resolve crises, restore social order, ensure normal production and life activities, protect social stability, and promote harmonious and healthy social development. Public emergencies can be mainly divided into natural disasters, accidents, public health emergencies, and social security incidents. The classification and determination of different types of events vary. The type can be considered the target corresponding to the event text. This target provides relevant background knowledge for the classification and categorization of event text levels, enabling more accurate classification and improving the social governance level and efficiency of governments and relevant departments.
[0005] In recent years, deep learning models, from recurrent neural networks (RNNs) to graph neural networks (GNNs), have reached state-of-the-art levels and have been widely applied in text classification tasks. With these advancements, the parametric softmax classifier has solidified its position as the mainstream mechanism, learning a specific set of parameters for each class: a weight vector and a bias term. The introduction of the target makes text classification tasks more challenging, as the effectiveness of the classification results largely depends on the richness of the target information. Various efforts have been made to address the lack of textual information about the target. A representative approach is to introduce external knowledge bases, such as aligning words with Wiki concepts, linking words to entities in commonsense knowledge bases, or mapping words to semantic and sentiment dictionaries. In recent years, advanced neural networks, including attention networks, have been proposed to capture the relationship between text and the target. Furthermore, alternative methods utilizing topic awareness or topic modeling techniques have been used to extract topic information and enhance the relationship between text and the target.
[0006] While existing methods have achieved some success in target-level text classification tasks, several issues remain. Furthermore, to discuss text more deeply, further considerations are needed from certain perspectives:
[0007] 1. Traditional classification methods mostly employ softmax classifiers to learn a single weight vector for each class in a fully parameterized manner. This essentially assumes that each class is unimodal and has low tolerance for differences and variations between classes. Classifiers are typically used only to enhance performance, are independent of data structure, and are insensitive to the structure and internal correlations of the data. Furthermore, because the parameters in the classification layer are abstract, this results in poor interpretability and makes it difficult to interpret naturally in a way that humans can process.
[0008] 2. When expressing opinions, users typically emphasize their attitudes toward specific topics or aspects of a target, while downplaying other potentially irrelevant topics or aspects. This observation suggests a collaborative phenomenon: texts sharing similar topics and their related targets exhibit inherent relevance. This collaborative signal can resolve subtle inter-category differences, enhancing accurate classification results and providing explanations for the decision-making process.
[0009] 3. While the introduction of external knowledge bases and attention alleviates the challenges posed by limited target information, they still cannot effectively explore the information representation of the target and benefit from collaborative phenomena. The implicit topics constructed by topic modeling techniques serve as a natural bridge between text, target, and category labels, revealing the inherent structural correlations between elements and providing a direct means of establishing global connections. This offers a natural way to organize text and targets, aligning with the goals of collaborative representation learning—namely, enhancing both text and target representations. Summary of the Invention
[0010] The purpose of this invention is to overcome the technical shortcomings of existing text classification methods, such as insensitivity to classifier structure, unimodality, and poor interpretability. It creatively proposes a target-level event text classification method based on topic awareness and collaborative thinking, which can effectively improve text classification performance. This method addresses the aforementioned problems by using topic modeling techniques and leveraging collaborative signals between text, topics, and category labels, thus providing interpretability and ultimately achieving better classification results.
[0011] The innovation of this method lies in:
[0012] First, use topic modeling technique LDA to obtain different aspects / implicit topics considered for different categories, even for the same goal.
[0013] Second, a heterogeneous topic graph was constructed to capture associations based on the implicit topics of different category labels. The collaborative propagation aggregation (CPA) module fully utilizes the collaborative signals between text, topics, and category labels, and direct supervision is applied to the heterogeneous graph to learn the representations of text, implicit topics, and category labels.
[0014] Third, a scoring module was designed that seamlessly integrates the Transformer-based bidirectional encoder representation BERT (a pre-trained language representation model) and CPA for inference, and comprehensively considers the semantic information provided by BERT and the collaborative information brought by CPA, thus fully considering the final text classification.
[0015] This invention is based on the following technical solution.
[0016] A target-level event text classification method based on topic awareness and collaborative thinking includes the following steps:
[0017] Step 1: Generate the implicit themes and their distribution of text relative to the target and category labels.
[0018] Specifically, for all texts targeting the same objective, they are divided into multiple text subsets based on category labels. Based on these text subsets, latent topics with category labels related to the objective are generated using the topic modeling method LDA. LDA ultimately yields multiple relevant or irrelevant latent topics, as well as the distribution of each text with respect to the latent topics, i.e., the probability value of a text belonging to each latent topic.
[0019] The acquired implicit themes serve as a natural bridge between text, target, and category labels. The distribution of text with respect to implicit themes provides insights and convenience for constructing associations.
[0020] Step 2: Construct a heterogeneous topic graph based on the text, category labels, and generated implicit topics.
[0021] Since the text exhibits a topic distribution, and the implicit topics belong to a certain category label and have category meaning, a heterogeneous graph with three types of nodes is constructed based on this association regarding the implicit topics.
[0022] The distribution of implicit topics in text best characterizes the relationship between text and implicit topics; that is, the distribution (probability value) is used as the weight of the edge between text nodes and topic nodes. For implicit topics and category labels, if the implicit topic is generated from a subset of text under a certain category, then an edge is constructed between the implicit topic and that category, with the weight set to 1.
[0023] Text and category labels are concrete and meaningful, while latent topics are generated by LDA and are more abstract. Therefore, text and category label nodes are initialized using BERT, while latent topic nodes are initialized randomly. These are further optimized during subsequent training to obtain the best representation.
[0024] The final result is a hierarchical heterogeneous topic graph with three types of nodes and two types of edges.
[0025] Step 3: Generate a collaborative matrix from heterogeneous topic graphs for comparative graph collaborative training.
[0026] First, the initial representations of the three types of nodes are concatenated into an embedded representation table. This table will participate in the subsequent comparative graph collaborative training process. It is continuously updated as a parameter matrix in an end-to-end manner, capturing and propagating collaborative signals on the heterogeneous graph to obtain the optimal representation of the nodes.
[0027] Then, based on the two types of edges in step 2, the two types of adjacency matrices are concatenated into a cooperative matrix, which is used to obtain cooperative signals in subsequent training processes.
[0028] Step 4: Design the Collaborative Propagation Aggregator (CPA) module to capture collaborative signals between nodes in the graph.
[0029] The connections between nodes are reciprocal; they possess natural cooperative relationships, which can be utilized to better optimize and represent nodes. To this end, this invention designs a Collaborative Propagation Aggregation (CPA) module. This module extends the message-passing architecture of Graph Neural Networks (GNNs), capturing cooperative signals along the graph structure and optimizing node embeddings.
[0030] The collaboration matrix allows us to find a node's 1-hop neighbors and then construct the collaboration information propagated from these neighboring nodes. Aggregating the collaboration information from multiple neighbors is then used to update the node's embedding representation in the embedding table.
[0031] Based on the collaboration matrix, we can also find the multi-hop neighbor nodes of a node and then aggregate the collaborative information they propagate. The difference is that a graph Laplace norm is added as a discount factor during the propagation process, because the propagation of information will attenuate as the path length increases.
[0032] Step 5: Train the neural network, using similarity loss and contrast loss as loss functions to calculate the loss value. This includes the following steps:
[0033] Step 5.1: Construct similarity loss.
[0034] The text is represented by BERT, and the cosine similarity loss between this representation and the continuously updated text node representations in the embedded representation table is calculated and regularized.
[0035] Step 5.2: Construct the contrast loss.
[0036] For each node, collaborative information from each hop neighbor is aggregated via collaborative propagation and then concatenated to obtain the node's optimized representation. Then, text nodes and their corresponding class label nodes form positive sample pairs, while other class label nodes form negative sample pairs. Finally, based on the positive and negative sample pairs, the contrastive loss between the optimized representations is calculated.
[0037] Step 5.3: Within the set number of training rounds, calculate the similarity loss and contrast loss, and optimize and adjust the entire model parameters (including BERT) through backpropagation to achieve the optimal model performance.
[0038] At this point, the model training is complete, and the optimal representation and best representation of text, topic, and category labels are obtained.
[0039] Step 6: Design a scoring module to calculate the distribution score and semantic score, which are used to obtain the final text classification results during the inference stage.
[0040] After obtaining the representation, a scoring module is designed for text classification in the subsequent reasoning stage. Its main purpose is to characterize and measure the similarity between the text and the category labels to obtain the text classification result.
[0041] Step 6.1: Calculate the semantic score.
[0042] The text is represented by a trained BERT, and a score is calculated between this representation and the continuously updated category label node representations in the embedded representation table.
[0043] Step 6.2: Calculate the distribution score.
[0044] The text is distributed with probability values obtained through LDA, and combined with the continuously updated latent topic node representations in the embedded representation table to obtain text node representations. Then, the score between the optimized representation of the node and the optimized representation of the category label node is calculated through the collaborative propagation aggregation module.
[0045] Step 6.3: The semantic score is added to the distribution score to obtain the final score. The index with the highest score is the classification result of the reasoning.
[0046] Beneficial effects
[0047] The method of the present invention has the following advantages compared with the prior art.
[0048] 1. This method overcomes the technical shortcomings of existing text classification methods, such as insensitivity to classifier structure, unimodality, and poor interpretability, and provides a new method and approach for text classification tasks.
[0049] 2. This method establishes collaborative learning among text, target, and category labels through latent topics. It is also the first attempt to effectively combine collaborative learning and BERT semantics to enhance classification performance.
[0050] 3. In this method, a Collaborative Propagation Aggregation (CPA) module is designed to capture information-rich multi-hop collaborative signals. This module is seamlessly integrated with BERT to enhance representation learning. Attached Figure Description
[0051] Figure 1 This is a flowchart of the method of the present invention.
[0052] Figure 2 This is a schematic diagram illustrating the implementation framework of the method of the present invention.
[0053] Figure 3 This is a detailed diagram of the Collaborative Propagation Aggregation (CPA) module in the method of this invention. Detailed Implementation
[0054] The method of the present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0055] Example
[0056] The dataset used in this embodiment.
[0057] From the examples, a set of targets T is selected. i sample set Each sample consists of texts. i and category label y i The task consists of a category label set L = {F, N, A}, and the target-level text classification task accepts D. tr As input, then predict the test dataset. The category label corresponding to the Chinese text. Where n tr n represents the number of samples in the training set. te This represents the number of samples in the test set, where F indicates approval, N indicates neutrality, and A indicates opposition.
[0058] like Figure 1 As shown, a target-level event text classification method based on topic awareness and collaborative thinking includes the following steps:
[0059] Step 1: Generate the implicit themes and their distribution of text relative to the target and category labels.
[0060] Among them, implicit topics can serve as a link connecting text, target, and category labels, so implicit topics are generated using the topic modeling method LDA.
[0061] Specifically, D tr The category label set L = {F, N, A} is divided into subsets F, N, and A. Each subset generates H latent topics, thus obtaining the latent topic set IT, IT = {F1, F2, ..., F...}. H ,N1,N2,…,N H A1, A2, ..., A H}, and simultaneously obtain the latent topic distribution for each text, that is, the probability of belonging to each latent topic. For example, for text s i Its implicit theme distribution Dis i ={f i1 ,f i2 ,…,f iH ,n i1 ,n i2 ,…,n iH ,a i1 ,a i2 ,…,a iH}
[0062] Step 2: Construct a heterogeneous topic graph based on the text, category labels, and generated implicit topics.
[0063] Specifically, the constructed heterogeneous topic graph G has two types of edge connections, where the adjacency matrix M1 between text and implicit topics is formed by... The adjacency matrix M2 between the text and the category label is calculated as follows:
[0064]
[0065] Among them, Y j Let L be the j-th category label. Each node in the graph also has its initial representation. For text and category labels, Bert provides the text representation sets respectively. and category label representation set Z = {zF ,z N ,z A} = BERT(L). The latent topic representation set U is generated by IT through random initialization, and is represented as in and Let F represent the representations of the 1st and Hth latent topics generated from the subset F, respectively. and Let represent the representations of the 1st and Hth latent topics generated from the subset N, respectively. and Let A and B represent the representations of the 1st and Hth implicit topics generated from subset A, respectively.
[0066] Step 3: Generate a collaboration matrix using heterogeneous topic graphs for comparison graph collaboration training.
[0067] Step 3.1: Concatenate the initial representations of the three types of nodes in the heterogeneous topic graph G into an embedded representation table, and use it as a parameter matrix. It participates in the subsequent collaborative training process of the comparison images and is continuously updated in an end-to-end manner, where e i This represents a node in the graph. Specifically, E is represented as:
[0068]
[0069] Step 3.2: Based on the two types of edges in the heterogeneous topic graph G, concatenate the adjacency matrices of the two associations into a cooperation matrix M = [M1, M2]. This cooperation matrix is used to obtain cooperation signals during subsequent training.
[0070] Step 4: Design a Collaborative Propagation Aggregation (CPA) module to capture collaborative signals between nodes in the graph.
[0071] For each node e in the embedded representation table, its 1-hop node set e i The information transmitted to it is defined as:
[0072]
[0073] Where W1 and W2 are trainable parameter matrices used to extract useful information from the propagation, and ⊙ is the element-wise product. N e , Representing node e and node e respectively i The degree.
[0074] Here, via e⊙e i Add e and e i The interaction between nodes allows for the acquisition of more information from similar nodes and emphasizes collaborative phenomena. Based on the Graph Convolutional Neural Network (GCN), the Graph Laplacian Norm... It is used as a weakening factor because information propagation decays as path length increases. Then, the information propagated from the 1-hop nodes of e, along with its own information, is aggregated to optimize the representation of e.
[0075] The 1-hop propagation aggregation characterization of e is defined as:
[0076]
[0077] Where W1 is the trainable parameter matrix, consistent with the previous example, and the activation function LReLU is used here because it can encode positive signals and small negative signals. Based on single-hop 1-hop propagation aggregation, it can be extended to multi-hop propagation aggregation to propagate and aggregate multi-hop collaborative information. The recursive formula is:
[0078]
[0079]
[0080] in, and ε is a trainable parameter matrix used for transformations between l-1-hop neighbor nodes and l-hop neighbor nodes. l The set of l-hop nodes representing e, e l The l-hop propagation aggregation embedding representation of e, and This indicates a l-hop node e from e. i The information propagated to e is thus encoded as multi-hop cooperative information. Its matrix form is represented as:
[0081]
[0082] Among them, E l The l-hop propagation aggregation embedding representation representing all nodes e incorporates the collaborative information of the l-hop nodes; E 0 Let E be the initialized embedding representation table, I be the identity matrix, and L be the Laplacian matrix of the adjusted heterogeneous topic graph G, defined as:
[0083]
[0084] Where M is the cooperation matrix, 0 is the all-zero matrix, D is the angle matrix, and T represents the matrix transpose.
[0085] According to E l We obtain l representations of node e, and aggregate the l-hop cooperation information of node e respectively. These representations are then concatenated to form the final representation of node e. e 0The embedded representation table is derived from the initialization. Through the CPA module, the embedded representation of the nodes is iteratively updated to obtain an optimized representation that integrates multi-hop collaboration information.
[0086] Step 5: Train the neural network and calculate the loss value using similarity loss and contrast loss as loss functions.
[0087] Step 5.1: Construct similarity loss. To supplement the semantic information of the text, BERT is used to obtain the text s i and its related objectives t i The representation is then used. An attention mechanism is employed to obtain the semantic representation of the text, focusing more on the semantic information in the text relevant to the target.
[0088]
[0089]
[0090] in, Represents text s i Based on the characterization after BERT Indicates target t i Based on the characterization after BERT This refers to the target-related texts obtained through the attention mechanism. i The representation of.
[0091] The regularized similarity loss is defined as:
[0092]
[0093] Among them, v i The text representations are derived from the continuously updated embedded representation table; cos_loss represents the calculation of cosine similarity loss.
[0094] Step 5.2: Construct the contrastive loss. Text nodes and their corresponding class label nodes form positive sample pairs, while other class label nodes form negative sample pairs. Based on this, the contrastive loss is calculated as follows:
[0095]
[0096] in, and By s i and y i y is obtained through the CPA module. i For text s i The corresponding category labels, where L is the set of category labels and T represents the matrix transpose.
[0097] Step 5.3: Within the set number of training epochs, calculate the similarity loss and contrast loss, combine the two, and then optimize and adjust the entire model parameters (including BERT) through backpropagation to achieve optimal model performance.
[0098] Loss = Loss con +Loss cos
[0099] At this point, the model training is complete, and the optimal representation and best representation of text, topic, and category labels have been obtained.
[0100] Step 6: Design a scoring module to calculate the distribution score and semantic score, which are used to obtain the final text classification results during the inference stage.
[0101] Step 6.1: Calculate the semantic score. It is defined as the BERT semantic representation of the text. The inner product between the category label representation and the category label representation:
[0102]
[0103] Where Z is the set of category label representations trained in the embedding representation table.
[0104] Step 6.2: Calculate the distribution score. For text s i The latent topic distribution Dis is obtained based on LDA. i Then, the distribution representation of the text is obtained:
[0105]
[0106] Where U is the set of latent topic representations trained in the embedding representation table. Then, the score of the distributed representation relative to the latent topics is calculated. First, [the score is then calculated]. and U input to CPA module to obtain and However, unlike before, the recursive formula for the CPA module has been modified as follows:
[0107]
[0108] Finally, the distribution score is calculated using the following formula:
[0109]
[0110]
[0111] in, This represents the final calculated distribution score; express The final characterization obtained after using the CPA module. express The final characterization obtained after passing through the CPA module; express The final characterization obtained after using the CPA module. express The final characterization obtained after passing through the CPA module; express The final characterization obtained after using the CPA module. express The final characterization obtained after passing through the CPA module; express The final characterization obtained after passing through the CPA module.
[0112] Step 6.3: The semantic score is added to the distribution score to obtain the final score. The index with the highest score is taken as the classification result of the reasoning.
[0113] Figure 2 This is a diagram illustrating the implementation framework of this method.
[0114] Table 1. Comparison of performance of 21 classification methods on dataset 1
[0115]
[0116] Table 2 Comparison of the performance of 12 classification methods on dataset 2
[0117]
[0118] MacF of the classification results obtained using this method avg MicF avg And F on each sub-target dataset avg As shown in the second-to-last row of Tables 1 and 2.
Claims
1. A target-level event text classification method based on topic awareness and collaborative thinking, characterized in that, Includes the following steps: Step 1: Generate the implicit themes and their distribution in the text relative to the target and category labels; In step 1, for all texts targeting the same goal, they are divided into several text subsets based on category labels; based on these text subsets, latent topics with category labels related to the goal are generated using the topic modeling method LDA; LDA ultimately obtains multiple related or unrelated latent topics, and also obtains the distribution of each text with respect to the latent topics, that is, the probability value of each text belonging to each latent topic; Step 2: Construct a heterogeneous topic graph based on the text, category labels, and generated implicit topics; In step 2, a heterogeneous graph with three types of nodes is constructed regarding the implicit topic; the distribution is used as the weight of the edges between text nodes and topic nodes; For implicit topics and category labels, if the implicit topic is generated from a subset of text under a certain category, then an edge is constructed between the implicit topic and the category, and the weight is reset to 1. For text nodes and category label nodes, BERT is used for node initialization, while hidden topic nodes are initialized randomly. The process is further optimized during subsequent training to obtain the best representation. The final result is a hierarchical heterogeneous topic graph with three types of nodes and two types of edges; Step 3: Generate a collaboration matrix using heterogeneous topic graphs for comparative graph collaboration training; In step 3, the initial representations of the three types of nodes are first spliced into an embedded representation table. This table will participate in the subsequent comparative graph collaborative training process. It is continuously updated as a parameter matrix in an end-to-end manner to capture and propagate and aggregate collaborative signals on the heterogeneous graph in order to obtain the optimal representation of the node. Then, based on the two types of edges in step 2, the two types of adjacency matrices are concatenated into a cooperation matrix, which is used to obtain cooperation signals in subsequent training processes. Step 4: Design a collaborative propagation aggregation (CPA) module to capture collaborative signals between nodes in the graph; The collaborative propagation aggregation module extends the message passing architecture of graph neural networks, captures collaborative signals along the graph structure and optimizes node embedding, finds the 1-hop neighbors of a node through the collaborative matrix, and then constructs the collaborative information propagated from the neighboring nodes. Aggregate the collaboration information of multiple neighbors to update the embedding representation of a node in the embedding representation table; Based on the collaboration matrix, we can find the multi-hop neighbor nodes of a node and then aggregate the collaboration information they propagate. During the propagation process, a graph Laplace norm is added as a discount factor; Step 5: Train the neural network, use similarity loss and contrast loss as loss functions to calculate the loss value, and obtain the optimal representation and best representation of text, topic and category labels; Step 6: Design a scoring module to calculate the distribution score and semantic score, which are used to obtain the final text classification results during the inference stage; Step 6.1: Calculate the semantic score; The text is represented by the trained Transformer-based bidirectional encoder representation Bert, and the score between this representation and the continuously updated category label node representations in the embedded representation table is calculated. Step 6.2: Calculate the distribution score; The text obtains its probability distribution value through the topic modeling method LDA, and combines it with the continuously updated latent topic node representations in the embedded representation table to obtain the text node representations. Then, the score between the optimized representation of the node and the optimized representation of the category label node is calculated through the collaborative propagation aggregation module. Step 6.3: The semantic score is added to the distribution score to obtain the final score. The index with the highest score is taken as the classification result of the reasoning.
2. The target-level event text classification method based on topic awareness and collaborative thinking as described in claim 1, characterized in that, Step 5 includes the following steps: Step 5.1: Construct the similarity loss; The text is represented by BERT, and the cosine similarity loss between the representation and the continuously updated text node representations in the embedded representation table is calculated and regularized. Step 5.2: Construct the contrast loss; For each node, after obtaining the collaborative information propagated from each hop neighbor through collaborative propagation, the optimized representation of the node is concatenated; then, the text node and its corresponding category label node form a positive sample pair, and other category label nodes form a negative sample pair; finally, based on the positive and negative sample pairs, the contrast loss between the optimized representations is calculated. Step 5.3: Within the set number of training rounds, calculate the similarity loss and contrast loss, and optimize and adjust the entire model parameters through backpropagation to achieve the optimal model performance.
3. The target-level event text classification method based on topic awareness and collaborative thinking as described in claim 1, characterized in that, In step 4, for each node in the embedded representation table Its 1-hop node set In The information transmitted to it is defined as: in, , It is a trainable parameter matrix used to extract useful information from the propagation. It is an element-wise product; , Representing nodes respectively and nodes The degree; Then, the aggregation starts from the node. Optimize the information propagated from the 1-hop node and its own information. The representation; The 1-hop propagation aggregation characterization is defined as: in, It is a trainable parameter matrix, using the LReLU activation function; Building upon single-hop propagation aggregation, this is extended to multi-hop propagation aggregation to propagate and aggregate multi-hop collaborative information. The recursive formula is as follows: in, and Is -hop neighbor nodes and -A trainable parameter matrix for switching between neighboring nodes. represent of -hop node set, Represents a node of -hop propagation aggregation embedding representation, Indicates from One -hop node spread to The information, such as multi-hop cooperation information, is encoded; its matrix form is represented as: in, Represents all nodes of -hop propagation aggregation embedding representation, which integrates -Hop node collaboration information; It is the initialized embedded representation table , It is the identity matrix. This is the adjusted heterogeneous theme image. The Laplace matrix is defined as: in, It is a collaborative matrix. It is a matrix of all zeros. It is the angle matrix, and T represents the matrix transpose; according to Get Node of Each representation aggregates nodes. of -hop collaborative information; these representations are spliced together as nodes. The final representation , It comes from the initial embedded representation table.
4. The target-level event text classification method based on topic awareness and collaborative thinking as described in claim 1, characterized in that, In step 6.1, the semantic score is the BERT semantic representation of the text. Inner product between and category label representation : in, It is the set of category label representations trained in the embedding representation table; T represents the matrix transpose; In step 6.2, for the text The latent topic distribution is obtained based on the topic modeling method LDA. Then, the distribution representation of the text is obtained. : in, It is the set of latent topic representations trained from the embedded representation table. , and They represent respectively by The first and second subsets generated A representation of an implicit theme, and They represent respectively by The first and second subsets generated A representation of an implicit theme, and They represent respectively by The first and second subsets generated A representation of an implicit topic; T represents the matrix transpose; Representing text The distribution of latent topics is then calculated; the distribution representation of the score relative to the latent topics is then calculated. Will and Enter into the CPA module to obtain and , express The final characterization obtained after using the CPA module. express The final characterization obtained after passing through the CPA module; The recursive formula for the CPA module has been changed to: in, Represents a node of -hop propagation aggregation embedding representation; LReLU is the activation function; and Is -hop neighbor nodes and -A trainable parameter matrix for switching between neighboring nodes; Finally, the distribution score is calculated using the following formula: in, , , ; This represents the final calculated distribution score; express The final characterization obtained after using the CPA module. express The final characterization obtained after passing through the CPA module; express The final characterization obtained after using the CPA module. express The final characterization obtained after passing through the CPA module; express The final characterization obtained after using the CPA module. express The final characterization obtained after passing through the CPA module; express The final characterization obtained after passing through the CPA module; In step 6.3, semantic score Add distribution score The final score is obtained, and the index with the highest score is taken as the classification result of the reasoning: .