Dialogue-level text emotion recognition method based on graph pooling representation learning

By introducing graph pooling and anti-pooling layers into the graph network, the time window problem is solved, long-distance statement information in the conversation is retained, and the accuracy of dialogue-level text emotion recognition is improved, especially on dialogue data sets of different lengths.

CN120407799APending Publication Date: 2025-08-01TIANJIN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410118812.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-29
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing graph-based network method has time window problems when building graph networks, resulting in weakening of long-distance statement information and unable to effectively model the context information of the conversation.

Method used

The graph pooling layer and anti-pooling layer are used to build a graph network from a fully connected graph, filter edges and nodes through the graph pooling layer, retain long-distance statement information, and upsample through the anti-pooling layer to ensure that the graph network captures context dependencies in the conversation.

Benefits of technology

The long-distance statement information in the conversation is effectively retained, improving the accuracy of dialogue-level text emotion recognition, especially in the case of longer or shorter dialogue lengths, 2.1% and 0.6% performance improvements are achieved on the IEMOCAP and MELD datasets respectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407799A_ABST
    Figure CN120407799A_ABST
Patent Text Reader

Abstract

The invention discloses a dialogue-level text emotion recognition method based on graph pooling representation learning, which aims at the problem of weakening remote statement information during graph construction, uses a pre-training model to extract context-independent statement features, and uses a graph network to complete modeling of context information. Most previous models based on a graph network method adopt a time window method during graph construction, so that long-distance statement information in a long dialogue is weakened. In order to solve the problem, a graph pooling layer and an anti-pooling layer are adopted, a graph network is constructed from a fully connected graph to screen edges and nodes, and dependence of long-distance statements is better utilized when context information is modeled. According to the method provided by the invention, a contrast experiment is carried out on IEMOCAP and MELD data sets, the method is obviously improved compared with a baseline method, ablation research is carried out on the method provided by the invention, and the effectiveness of each module is proved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of conversation text emotion recognition, and specifically relates to a conversation-level text emotion recognition method based on graph pooling representation learning. Background Art

[0002] In today's era where everyone can take out their mobile phones and speak freely on social media, the text conversation data on online social media platforms has exploded, making conversation-level text emotion recognition an important research topic. Early methods based on rules and sentiment dictionaries, as well as methods based on deep learning models, can largely learn the emotional information within sentences. However, for conversations, these methods lack consideration of contextual information modeling. For current actual conversation scenarios, these methods are no longer sufficient to meet the needs. Models based on graph network methods model contextual information through graph networks. When constructing graphs using a time window approach, the role of long-distance sentence information is weakened, resulting in insufficient contextual information modeling. Therefore, the present invention proposes a conversation-level text emotion recognition method based on graph pooling representation learning. The graph network can capture contextual information while retaining long-distance sentence information. The use of graph pooling alleviates the time window problem that exists in the original graph network-based model when constructing the graph network. Summary of the Invention

[0003] The present invention provides a conversation-level text emotion recognition method based on graph pooling representation learning, which alleviates the time window problem existing in the original graph network-based model when constructing the graph network. Graph pooling layers and unpooling layers are used to construct a graph network from a fully connected graph to filter edges and nodes, making better use of the dependencies of long-distance sentences when modeling contextual information.

[0004] The main technical solutions adopted in the present invention are:

[0005] A method for conversation-level text emotion recognition based on graph pooling representation learning, comprising:

[0006] In the sequential context encoder, the present invention uses the pre-trained model RoBERTa to extract sentence-level representations.

[0007] At the speaker-level encoder, this invention converts sentence-level representations into a conversational form and employs graph pooling to construct a graph network, which captures the contextual dependencies between sentences in the conversation. In the graph network, each sentence is considered a node in the graph, and the relationships between sentences are considered edges. To address the temporal window problem, this invention utilizes graph pooling to preserve key information, leveraging information about distant sentences and the overall conversational topic and atmosphere.

[0008] In the sentiment classifier, the sentence-level representation and the interlocutor-level sentence representation are concatenated as the input of the classifier to obtain the sentiment label of each sentence.

[0009] Furthermore, the task definition specifically includes:

[0010] The task of dialogue-level text emotion recognition is to identify the emotion of each sentence in the dialogue from a set of predefined emotion categories after given the dialogue script and the information of the speaker corresponding to each sentence. Specifically, given a dialogue sentence sequence consisting of N sentences [(u1, p1), (u2, p2), ..., (u N , p N )], where for statement u i ={u i,1 ,u i,2 ,……u i,T ,}by speaker p i T words spoken i,j The task of dialogue-level text emotion recognition is to predict each sentence u i The emotional category label e i In conversation-level text emotion recognition, the sentences constituting the conversation are classified into appropriate emotion categories.

[0011] Furthermore, the graph construction module specifically includes:

[0012] A directed graph It consists of a conversation with N sentences, where each node represents a sentence and the node Directed edge e i,j ∈ε. Relation Indicates g i With g j The types of edges between them. In the dialogue level encoder, when there are two speakers in the dialogue and both past and future information are considered, there are eight types of edges. i,j ∈[0, 1] is a directed edge e i,j The weight of i, j∈[1, 2,…, N].

[0013] Furthermore, the sequential context encoder module specifically includes:

[0014] This module mainly completes the feature extraction operation at the sentence level without context information. The pre-trained model RoBERTa is used as the feature extractor, which has a series of optimizations based on BERT to improve the performance of the model. Similar to other pre-trained models such as BERT, the pre-trained weights of RoBERTa can be fine-tuned on specific tasks to adapt to different fields and applications. This module takes the following sentence sequence as the input of RoBERTa:

[0015] [CLS]S i : U i [SEP]

[0016] For each sentence u in the dialogue i , where the [CLS] label is used as the output position label of the pre-trained model to obtain the sentence-level representation h of the sentence i , and the [SEP] label is used as the boundary label between two sentences.

[0017] Furthermore, the interlocutor-level encoder module specifically includes:

[0018] This module mainly includes three operations: graph convolution, graph pooling, and graph unpooling.

[0019] Furthermore, the calculation method of the graph convolution layer specifically includes:

[0020] First, the model constructs a fully connected graph from the sentence-level representations h1, h2,..., h N in the order of the dialogue. Each sentence in the dialogue is represented as a node in the graph where the node representation g i (i ∈ [1, 2,..., N]) is calculated through the sentence-level representation h i . The graph convolution (GCN) operation of the interlocutor-level encoder is calculated as follows:

[0021] for j = 1, 2,..., N

[0022] for j = 1, 2,..., N

[0023] for j = 1, 2,..., N

[0024] where a i,j is the weight of the directed edge between nodes i and j, and for each vertex, the total weight of the incoming edge set is 1. In the formula, C i,r is a learnable normalization parameter for a specific problem, σ is the activation function, and They are learnable parameters. The graph convolution operation can effectively enable the statement nodes to receive information from each neighbor node, ensuring the effective utilization of context information.

[0025] Furthermore, the calculation method of the graph pooling layer specifically includes:

[0026] Different from the previous method of using time windows to connect edges between nodes, this module uses a graph pooling layer. By training a trainable projection vector p, scores are calculated for each node, and the top k nodes with the largest scores are selected. In the next graph convolution operation, graph convolution calculations are only performed on the sparse subgraph composed of the selected k nodes. The purpose of this module is to better focus on sentence nodes that are farther away and the complete topic information during context information modeling, rather than just focusing on the context information within a certain time window. The calculation method of the graph pooling layer is as follows:

[0027]

[0028] idx = rank(y, k),

[0029]

[0030]

[0031] A l+1 = A l (idx, idx),

[0032]

[0033] where C is the dimension of the node feature vector, k is the number of nodes selected to enter the next layer, rank(y, k) is an operation to sort the nodes, and it returns the k nodes with the largest scores among the nodes in this layer. A l (idx, idx) and X l (idx, :) are operations to extract rows and columns in the matrix to obtain the adjacency matrix A l+1 and the feature matrix X l+1 . y(idx) obtains the value of the score y using the calculated index, and then performs a sigmoid operation. ⊙ represents matrix multiplication.

[0034] Furthermore, the calculation method of the inverse graph pooling layer specifically includes:

[0035] The role of the graph pooling layer is mainly to retain the information of key sentence nodes, and a sparse subgraph is formed through the pooling operation. At the same time, in order to prevent overfitting and enable the subsequent graph convolutional layer to utilize more global context information, upsampling calculation needs to be used in the subsequent calculations. To perform upsampling operations in the graph network, this module records the positions of the nodes selected in the graph pooling layer calculation, and uses this node position information to place the nodes back to their original positions in the graph. The calculation method of the graph unpooling layer is as follows:

[0036] X l+1 = distribute(0 N×C , X l , idx),

[0037] where idx contains the indices of the selected nodes in the graph pooling layer, and the calculation of distribute(0 N×C , X l , idx) distributes the feature vectors in the feature matrix X l to the feature matrix X l . In X l+1 , the row vectors in the selected indices are updated by the previous feature matrix X l , while the row vectors in other positions remain zero.

[0038] Furthermore, the calculation method of the sentiment classifier specifically includes:

[0039] The sentiment classifier module takes the concatenation of the output h i of the sequential context encoder and the output of the interlocutor-level encoder as the input. Considering the temporality of text conversations and the phenomenon of sentiment transfer in sentiment recognition of dialogue-level texts, this module uses a linear conditional random field that is more suitable for sequential data as the sentiment classifier. The dialogue sequence U = [u1, u2,..., u N , and the predicted label sequence y = [y1, y2,..., y N , where yi ∈ 1,..., K, and K is the number of sentiment labels. The calculation method of the sequence score is as follows:

[0040]

[0041] where T ∈ R K×K is the trainable state transition matrix, Q ∈ R N×K is the emission probability matrix, that is, the probability matrix of the hidden state transitioning to the observed state. p is the output h i of the sequential context encoder and the output The concatenated feature vectors. Through a linear layer and a softmax function, this module trains to maximize the log probability of the correct label sequence:

[0042]

[0043] where Y is the set of all possible label sequences. During the calculation, the Viterbi algorithm is used to calculate the maximum probability label sequence. Brief Description of the Drawings

[0044] Figure 1 is a flowchart of a method for dialogue-level text sentiment recognition based on graph pooling representation learning proposed by the present invention;

[0045] Figure 2 is a schematic diagram of the sequential context encoder module of the present invention;

[0046] Figure 3 is a schematic diagram of the interlocutor-level encoder module of the present invention;

[0047] Figure 4 is a schematic diagram of the graph pooling layer of the present invention; Detailed Embodiments

[0048] Next, in combination with the accompanying drawings in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0049] As Figure 1 shown, a method for dialogue-level text sentiment recognition based on graph pooling representation learning consists of three components, and the functions of each part are as follows:

[0050] In the sequential context encoder, the present invention uses the pre-trained model RoBERTa to extract sentence-level representations.

[0051] In the interlocutor-level encoder, the present invention transforms the sentence-level representations into the form of a dialogue, constructs a graph network using the idea of graph pooling, and uses the graph network to capture the context dependence between each sentence in the dialogue. In the graph network, each sentence is regarded as a node in the graph, and the relationship between sentences is regarded as an edge. To solve the problem of the time window, that is, to utilize the information of sentences that are far apart and the overall dialogue theme atmosphere, the present invention uses the method of graph pooling to retain the key information.

[0052] In the sentiment classifier, the sentence-level representations and the interlocutor-level sentence representations are concatenated as the input of the classifier to obtain the sentiment label of each sentence.

[0053] Furthermore, the task definition specifically includes:

[0054] The task of dialogue-level text sentiment recognition is to identify the sentiment of each statement in a dialogue from a set of predefined sentiment categories, given the dialogue script and the information of the speaker corresponding to each statement. Specifically, given a dialogue statement sequence [(u1, p1), (u2, p2), ……, (u N , p N )] that includes N statements, where for statement u i = {u i,1 , u i,2 , …… u i,T ,} consisting of T words u i spoken by speaker p i,j . The dialogue-level text sentiment recognition task is to predict the sentiment category label e i for each statement ui. In dialogue-level text sentiment recognition, the statements that make up the dialogue are classified into appropriate sentiment categories.

[0055] Furthermore, the graph construction module specifically includes:

[0056] A directed graph is composed of a dialogue with N statements, where each node represents a statement, and the node has a directed edge e i,j ∈ ε. The relationship represents the type of the edge between g i and g j . In the dialogue-level encoder, when considering both past and future information in the case of two speakers in the dialogue, there are eight types of edges. a i,j ∈ [0, 1] is the weight of the directed edge e i,j , where i, j ∈ [1, 2, …, N].[[]END]]

[0057] Furthermore, the sequential context encoder module specifically includes:

[0058] This module mainly completes the feature extraction operation at the statement level without context information. The pre-trained model RoBERTa is used as the feature extractor, which has undergone a series of optimizations based on BERT to improve the performance of the model. Similar to other pre-trained models such as BERT, the pre-trained weights of RoBERTa can be fine-tuned on specific tasks to adapt to different fields and applications. This module takes the following statement sequence as the input of RoBERTa:

[0059] [CLS]S i : U i [SEP]

[0060] For each utterance u in the dialogue i , where the [CLS] label is used as the output position label of the pre-trained model to obtain the utterance-level representation h of the utterance i , and the [SEP] label is used as the boundary label between two utterances.

[0061] Furthermore, the interlocutor-level encoder module specifically includes:

[0062] This module mainly includes three operations: graph convolution, graph pooling, and graph unpooling.

[0063] Furthermore, the calculation method of the graph convolution layer specifically includes:

[0064] First, the model constructs a fully connected graph from the utterance-level representations h1, h2,..., h N in the order of the dialogue. Each utterance in the dialogue is represented as a node in the graph where the node representation g i (i ∈ [1, 2,..., N]) is calculated through the utterance-level representation h i . The calculation method of the graph convolution (GCN) operation of the interlocutor-level encoder is as follows:

[0065] for j = 1, 2,..., N

[0066] for j = 1, 2,..., N

[0067] for j = 1, 2,..., N

[0068] where a i,j is the weight of the directed edge between nodes i and j, and for each vertex, the total weight of the incoming edge set is 1. In the formula, C i,r is a learnable normalization parameter for a specific problem, σ is the activation function, and are learnable parameters. The graph convolution operation can effectively enable the utterance nodes to receive information from each neighbor node, ensuring the effective utilization of context information.

[0069] Furthermore, the calculation method of the graph pooling layer specifically includes:

[0070] Different from the previous method of connecting edges between nodes using a time window, this module uses a graph pooling layer. By training a trainable projection vector p, scores are calculated for each node, and the top k nodes with the highest scores are selected. In the next graph convolution operation, graph convolution calculations are only performed on the sparse subgraph formed by the selected k nodes. The purpose of this module is to better focus on sentence nodes that are farther apart and complete topic information during context information modeling, rather than just focusing on context information within a certain time window. The calculation method of the graph pooling layer is as follows:

[0071]

[0072] idx = rank(y, k),

[0073]

[0074]

[0075] A l+1 = A l (idx, idx),

[0076]

[0077] where C is the dimension of the node feature vector, k is the number of nodes selected to enter the next layer, rank(y, k) is an operation to sort the nodes, and it returns the k nodes with the highest scores among the nodes in this layer. A l (idx, idx) and X l (idx, :) are operations to extract rows and columns in the matrix to obtain the adjacency matrix A l+1 and the feature matrix X l+1 in the next layer. y(idx) obtains the value of the score y using the calculated index, and then a sigmoid operation is performed. ⊙ represents matrix multiplication.

[0078] Furthermore, the calculation method of the inverse graph pooling layer specifically includes: [[ID=3⑧]]

[0079] The function of the graph pooling layer is mainly to retain the information of key sentence nodes and form a sparse subgraph through the pooling operation. At the same time, to prevent overfitting and enable the subsequent graph convolution layer to utilize more global context information, upsampling calculations need to be used in subsequent calculations. To perform upsampling operations in the graph network, this module records the positions of the nodes selected in the graph pooling layer calculation and uses this node position information to place the nodes back to their original positions in the graph. The calculation method of the graph unpooling layer is as follows:

[0080] X l+1 = distribute(0 N×C, X l , idx),

[0081] where idx contains the indices of the selected nodes in the graph pooling layer, and distribute(0 N×C , X l , idx) calculates, according to the selected indices, the distribution of the feature vectors in the feature matrix X l into the feature matrix X l . In X l+1 , the row vectors in the selected indices are updated by the previous feature matrix X l , while the row vectors in other positions remain zero.

[0082] Furthermore, the calculation method of the sentiment classifier specifically includes:

[0083] The sentiment classifier module takes the concatenation of the output h i of the sequential context encoder and the output of the interlocutor-level encoder as the input. Considering the temporal order of text conversations and the sentiment transfer phenomenon in sentiment recognition of dialogue-level texts, this module uses a linear conditional random field, which is more suitable for sequence data, as the sentiment classifier. For the dialogue sequence U = [u1, u2,..., u N , the predicted label sequence y = [y1, y2,..., y N , where yi ∈ 1,..., K and K is the number of sentiment labels. The calculation method of the sequence score is as follows:

[0084]

[0085] where T ∈ R K×K is the trainable state transition matrix, Q ∈ R N×K is the emission probability matrix, that is, the probability matrix of the hidden state transitioning to the observed state. p is the feature vector after concatenating the output h i of the sequential context encoder and the output of the interlocutor-level encoder. Through a linear layer and the softmax function, this module trains to maximize the log probability of the correct label sequence:

[0086]

[0087] where Y is the set of all possible label sequences. During the calculation process, the Viterbi algorithm is used to calculate the maximum probability label sequence.

[0088] The following further describes the present invention in combination with the experimental process and experimental results of the present invention.

[0089] Table 1 gives the detailed descriptions of two real-world open-source datasets obtained from the Internet, namely IEMOCAP and MELD.

[0090] The Interactive Emotional Dyadic Motion Capture database IEMOCAP is an important resource for the fields of emotion computing and emotion recognition. It is a multimodal English emotion database recorded by the Speech Analysis and Interpretation Laboratory at the University of Southern California. This database contains recordings of two-party interactions. This dataset involves both scripted scenarios and improvised conversations. In scripted scenarios, actors perform according to a pre-written script. In improvised performances, actors are only given a general plot direction, and the lines and performances are decided by the actors themselves. In terms of the performers, the dataset involves 10 actors (five males and five females) with different cultural backgrounds. This mixture of pre-written and improvised data makes the dataset more realistic for studying emotional expressions in different situations, which are designed to trigger a series of emotional responses in viewers. For the emotion categories, each part of the data is annotated with emotion labels. The utterances in IEMOCAP include 6 emotion categories: anger, happiness, sadness, neutral, surprise, and frustration.

[0091] The MELD database mainly contains text information, audio, and video data. This dataset includes dialogue segments from different movies and tens of thousands of utterances from the American TV series "Friends", involving multiple actors. This diversity helps to ensure the representativeness of the dataset, covering different backgrounds and expressions. Similarly, the utterances in the MELD database contain 7 emotion categories, including disgust, sadness, happiness, neutral, surprise, anger, and fear. For each data instance, the splits for the training set, validation set, and test set are 70%, 10%, and 20% respectively.

[0092] Table 1: Dataset Statistics

[0093]

[0094] To verify the effectiveness of the present invention, a comprehensive comparative evaluation was carried out for a fair comparison with the experimental results. The selected baseline methods were reproduced on the same environment and hardware platform. A total of 7 models were selected in the present invention for comparison with the proposed method. The baseline models can be divided into two types, namely models based on sequence methods and models based on graph network methods:

[0095] Models based on sequence methods: DialogueRNN, DialogueRNN+RoBERTa, and COSMIC.

[0096] Models based on graph network methods: DialogueGCN, DialogueGCN+RoBERTa, RGAT, RGAT+RoBERTa, and the method proposed in the present invention.

[0097] Table 2 shows the comparison results between the method proposed in the present invention and the baseline methods. For the IEMOCAP dataset, since the conversations in this dataset only contain two speakers and the average conversation length is relatively long (an average of 49 utterances), this means that for each speaker, there is rich context information to assist the model in identifying the sentiment category of the utterances. Therefore, when using the same pre-trained model to extract context-independent utterance-level features, the performance of the model based on the graph network method is better than that of the model based on the sequence method. This proves that in the dialogue-level text sentiment recognition, the graph network modeling method can make up for the deficiency of the sequence method in modeling long-distance context information. Similarly, the method proposed in the present invention achieved a weighted F1 score of 66.65%, obtaining a performance improvement of 2.1% and 0.4% respectively compared to the baseline model based on the sequence method and the baseline model based on the graph network method. The performance improvement is attributed to the graph pooling layer and the unpooling layer, which while ensuring the advantage that the graph network method can retain long-distance context information, also retain the influence of more distant utterances through the graph pooling layer in datasets with longer conversation lengths.

[0098] For the MELD dataset, the average conversation length of the conversations in this dataset is slightly shorter (an average of 9 utterances), resulting in less context information in the conversations. Therefore, when using the same pre-trained model to extract context-independent utterance-level features, the performance of the model based on the graph network method is worse than that of the model based on the sequence method. At the same time, it can be seen that among the methods based on the sequence model, the COSMIC model has achieved a significant performance improvement compared to the DialogueRNN. This is due to the introduction of the external knowledge graph, and through external knowledge, it is possible to better understand the short conversations written by humans or the conversations in movies and TV shows, which are often closer to people's daily communications. The method proposed in the present invention achieved a weighted F1 score of 65.57%, obtaining a performance improvement of 0.6% and 2.4% respectively compared to the baseline model based on the sequence method and the baseline model based on the graph network method.

[0099] Table 2: Comparison results on the IEMOCAP and MELD datasets. The symbol ↑ represents the proportion of performance improvement of the model compared to the baseline model based on the sequence method and the baseline model based on the graph network method respectively

[0100]

[0101] The above is only the preferred embodiment of the present invention, which is used to help understand the method and core idea of the present invention. For those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for dialogue-level text sentiment recognition based on graph pooling representation learning, characterized in that, The method includes: The overall framework idea is to construct a graph network from a fully connected graph to screen edges and nodes, and when modeling context information, better utilize the dependencies of long-distance sentences. In the sequential context encoder, the present invention uses the pre-trained model RoBERTa to extract sentence-level representations. In the interlocutor-level encoder, the present invention transforms the sentence-level representation into the form of a dialogue, constructs a graph network using the idea of graph pooling, and utilizes the graph network to capture the context dependencies between each sentence in the dialogue. In the graph network, each sentence is regarded as a node in the graph, and the relationship between sentences is regarded as an edge. To solve the problem of the time window, that is, to utilize the information of sentences that are far away and the overall dialogue theme atmosphere, the present invention uses the graph pooling method to retain key information. In the sentiment classifier, the sentence-level representation and the interlocutor-level sentence representation are concatenated as the input of the classifier to obtain the sentiment label of each sentence.

2. The method for dialogue-level text sentiment recognition based on graph pooling representation learning according to claim 1, wherein The specific task definition includes: The task of dialogue-level text sentiment recognition is to identify the sentiment of each utterance in a dialogue from a set of predefined sentiment categories, given the script of the dialogue and the information about the speaker corresponding to each utterance. Specifically, given a dialogue utterance sequence [(u1, p1), (u2, p2), ……, (u N , p N )], where for the utterance u i = {u i,1 , u i,2 , …… u i,T ,} consists of T words u i spoken by the speaker p i,j . The dialogue-level text sentiment recognition task is to predict the sentiment category label e i for each utterance u i . In dialogue-level text sentiment recognition, the utterances that make up the dialogue are classified into appropriate sentiment categories.

3. The method for dialogue-level text sentiment recognition based on graph pooling representation learning according to claim 1, wherein The specific graph construction module includes: A directed graph is composed of a conversation with N statements, where each node represents a statement, and the nodes Directed edge Relationship represents the type of the edge between g i and g j In the speaker-level encoder of the conversation, when considering both past and future information in the case of two speakers in the conversation, there are eight types of edges. a i,j ∈ [0, 1] is the weight of the directed edge e i,j where 4. The method for dialogue-level text sentiment recognition based on graph pooling representation learning according to claim 1, wherein, The specific sequential context encoder module includes: This module mainly completes the feature extraction operation at the sentence level without context information. The pre-trained model RoBERTa is used as the feature extractor, which has undergone a series of optimizations on the basis of BERT to improve the performance of the model. Similar to other pre-trained models such as BERT, the pre-trained weights of RoBERTa can be fine-tuned on specific tasks to adapt to different fields and applications. This module takes the following sentence sequence as the input of RoBERTa: [CLS]S i : U i [SEP] For each utterance u in the dialogue i , where the [CLS] tag is used as the output position tag of the pre-trained model to obtain the utterance-level representation h of the utterance i , and the [SEP] tag is used as the boundary tag between two utterances.

5. The method for dialogue-level text sentiment recognition based on graph pooling representation learning according to claim 1, wherein, The specific interlocutor-level encoder module includes: This module mainly includes three operations: graph convolution, graph pooling, and graph unpooling.

6. The method for dialogue-level text sentiment recognition based on graph pooling representation learning according to claim 4, wherein The specific calculation method of the graph convolution layer includes: First, the model represents the sentence level h1, h2, ..., h N Construct a fully connected graph according to the order of the conversation. Each sentence in the conversation is in the graph Represented as a node The node representation g i (i∈[1,2,…,N]) is represented by sentence level h i Calculation. The graph convolution (GCN) operation of the conversational level encoder is calculated as follows: where a i,j is the weight of the directed edge between nodes i and j. For each vertex, the total weight of the incoming edge set is 1. In the formula, C i,r is a normalization parameter that can be learned for a specific problem, σ is the activation function, and are parameters that can be learned. The graph convolution operation can effectively enable the statement nodes to receive information from each neighbor node, ensuring the effective utilization of context information.

7. The method for dialogue-level text sentiment recognition based on graph pooling representation learning according to claim 4, wherein The specific calculation method of the graph pooling layer includes: Different from the previous method of connecting edges between nodes using a time window, this module uses a graph pooling layer. By training a trainable projection vector p, scores are calculated for each node, and the top k nodes with the largest scores are selected. In the next graph convolution operation, only the sparse subgraph composed of the selected k nodes is used for graph convolution calculation. The purpose of this module is to better focus on sentence nodes that are far away and the complete theme information when modeling context information, rather than only focusing on the context information within a certain time window. The calculation method of the graph pooling layer is as follows: idx = rank(y, k), A l+1 = A l (idx, idx), Where C is the dimension of the node feature vector, k is the number of nodes selected to enter the next layer, rank(y, k) is the operation of sorting the nodes, and the k nodes with the largest scores among the nodes in this layer are returned. A l (idx, idx) and X l (idx, :) performs the extraction operation of rows and columns in the matrix to obtain the adjacency matrix A of the next layer l+1 and the feature matrix X l+1 . y(idx) obtains the value of the score y using the calculated index, and then performs the sigmoid operation. ⊙ represents matrix multiplication.

8. The method for dialogue-level text sentiment recognition based on graph pooling representation learning according to claim 4, characterized in that The specific calculation method of the inverse graph pooling layer includes: The function of the graph pooling layer is mainly to retain the information of key sentence nodes and form a sparse subgraph through the pooling operation. At the same time, in order to prevent overfitting and enable the subsequent graph convolution layer to utilize more global context information, upsampling calculation needs to be used in the subsequent calculation. To perform upsampling operations in the graph network, this module records the positions of the nodes selected in the graph pooling layer calculation, and uses this node position information to put the nodes back to their original positions in the graph. The calculation method of the graph unpooling layer is as follows: X l+1 = distribute(0 N×C , X l , idx), where idx contains the indices of the selected nodes in the graph pooling layer, and distribute(0 N×C , X l , idx) calculates, according to the selected indices, the distribution of the feature vectors in the feature matrix X l into the feature matrix X l . In X l+1 , the row vectors at the selected indices are updated by the previous feature matrix X l , while the row vectors at other positions remain zero.

9. The method for dialogue-level text sentiment recognition based on graph pooling representation learning according to claim 1, wherein, The specific calculation method of the sentiment classifier includes: The emotion classifier module takes the output h of the sequential context encoder i and the output of the interlocutor-level encoder after concatenation as the input. Considering the temporal order of text conversations and the emotion transfer phenomenon in emotion recognition of dialogue-level texts, this module uses a linear conditional random field, which is more suitable for sequential data, as the emotion classifier. The dialogue sequence U = [u1, u2,..., u N , predicts the label sequence y = [y1, y2,..., y N , where y i ∈ 1,..., K, and K is the number of emotion labels. The sequence score is calculated as follows: where \(T\in\mathbb{R}\) K×K is a trainable state transition matrix, \(Q\in\mathbb{R}\) N×K is an emission probability matrix, i.e., the probability matrix for the hidden state to transition to the observed state. \(p\) is the output \(h\) of the sequential context encoder i and the output of the interlocutor-level encoder concatenated feature vector. Through a linear layer and a softmax function, this module trains to maximize the log probability of the correct label sequence: Where Y is the set of all possible tag sequences, and the Viterbi algorithm is used to calculate the tag sequence with the maximum probability during the calculation process.