News stance discrimination method and system based on heterogeneous graph neural network
By combining entity and topic information from news reports with heterogeneous graph neural networks, the problem of inaccurate news stance judgment is solved, achieving higher accuracy and consistency.
Patent Information
- Application Number
- CN202210831737.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2042-07-15
AI Technical Summary
Existing methods for determining news stance fail to fully integrate the diverse elements and structural information within news reports, leading to inaccurate assessments of stance inclination.
A heterogeneous graph neural network-based approach is adopted. Entity and topic information in news is extracted through named entity recognition and LDA topic modeling to build a heterogeneous graph. The feature vectors of these nodes are then processed and fused using the heterogeneous graph neural network to make a comprehensive judgment on stance bias.
It improved the accuracy and Macro F1 score of news stance judgment, reaching 84.30% accuracy and 83.34% Macro F1 score, which is better than the existing baseline model, with improvements of 1.92% and 0.4%, respectively.
Smart Images

Figure CN115358287B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of news stance discrimination technology, and in particular to a news stance discrimination method and system based on heterogeneous graph neural networks. Background Technology
[0002] Today, news released by news media is widely disseminated on social networks, subtly influencing people's stances and opinions. Therefore, accurately identifying political bias in news is crucial. However, detecting bias in news is difficult because news content is richer, expressing stances is evident in multiple details, and the wording is more subtle than in short texts. Therefore, it is essential to filter out traditional news free from bias, enabling audiences to objectively and fairly evaluate current events.
[0003] Current research on identifying stance bias in news texts mainly focuses on content analysis and analysis based on various external information. Content-based analyses often rely heavily on the semantic information of the news text. Ahmed et al. [A. Ahmed and EPXing, “Staying informed: Supervised and semi-supervised multi-view topical analysis of ideological perspective,” EMNLP 2010-Conf. Empir. Methods Nat. Lang. Process. Proc. Conf., no. October, pp. 1140–1150, 2010.] and Bhatia et al. [S. Bhatia and DP, “Topic-Specific Sentiment Analysis Can Help Identify Political Ideology,” pp. 79–84, 2019, doi: 10.18653 / v1 / w18-6212.] have respectively modeled ideological perspectives at the topic level to infer the stance bias of news articles. Iyyer et al. [M.Iyyer, P.Enns, J.Boyd-Graber, and P.Resnik, "Political ideology detection using recursive neural networks," 52nd Annu.Meet.Assoc. Comput.Linguist.ACL 2014-Proc.Conf., vol.1, pp.1113–1122, 2014, doi: 10.3115 / v1 / p14-1105.] and Chen et al. [W.-F.Chen, K.Al Khatib, H.Wachsmuth, and B. Stein, “Analyzing Political Bias andUnfairness in News Articles at Different Levels of Granularity, pp. 149–154, 2020, doi:10.18653 / v1 / 2020.nlpcss-1.16.] both applied recurrent neural networks (RNNs) to identify sentence-level stance biases.Li et al. [C.Li and D.Goldwasser, “MEAN: Multi-head Entity AwareAttention Network for Political Perspective Detection in News Media,”pp.66–75,2021,doi:10.18653 / v1 / 2021.nlp4if-1.10.] studied the stance bias of news texts from a semantic perspective. By injecting entity information into the text model, they were able to identify differences in news narratives from different perspectives. However, the aforementioned content-based modeling methods rarely rely on the diverse information within the news and fail to consider the structural relationships among this information, leading to inaccurate determination of stance bias in news texts. Summary of the Invention
[0004] This invention addresses the problem that existing news stance identification methods do not adequately integrate the various element features and structural information in news, leading to inaccurate identification of stance in news texts. It proposes a news stance identification method and system based on heterogeneous graph neural networks. This invention can comprehensively judge the stance of news by combining important element information and the structural relationships between them, achieving a high accuracy rate.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] This invention proposes a news stance discrimination method based on heterogeneous graph neural networks, comprising:
[0007] Step 1: Use named entity recognition technology and LDA topic model to extract entity and topic information from the news, and associate them with sentences to build a heterogeneous graph;
[0008] Step 2: Process the constructed heterogeneous graph using a heterogeneous graph neural network to obtain the feature vectors of all nodes in the heterogeneous graph;
[0009] Step 3: Fuse the feature vectors of all nodes output by the heterogeneous graph neural network to comprehensively determine the stance of the news.
[0010] Further, step 1 includes:
[0011] Named entity recognition technology and LDA topic model are used to extract entity and topic information from news articles, obtain entity nodes and topic nodes, and establish a heterogeneous graph G = (V, E) by associating them with sentence nodes, where V represents the set of entity nodes, topic nodes and sentence nodes, and E represents the set of bidirectional connections between sentence nodes, bidirectional connections between topic nodes and sentence nodes, and unidirectional connections from sentence nodes to entity nodes.
[0012] Furthermore, in step 2, each node in the heterogeneous graph is projected into an implicit common space using the transformation matrices in the heterogeneous graph neural network; the transformation matrices are calculated as follows:
[0013]
[0014] Where H (l+1) Let represent the transformation matrix of the (l+1)th heterogeneous convolution in the heterogeneous graph neural network; σ(·) represents the activation function. This represents the transition matrix of a node of type τ in the (l+1)th heterogeneous convolution layer; This represents the attention transfer matrix for nodes of type τ, where the rows represent all nodes and the columns correspond to the neighboring nodes of each node of type τ. The value β in row ν and column ν' of the middle column. νν' The calculation method is as follows:
[0015] β νν' =Softmax ν' (σ(ν T ·α τ [h ν ,h ν' ])) (2)
[0016] Where, ν T In this context, ν represents the attention vector, and α... τ h represents the attention weights for nodes of type τ. v and h ν' Let ν represent the vector of the current node ν and the vector of its neighboring node ν', respectively. Softmax ν' () indicates that the Softmax function is used to normalize the neighboring nodes ν' of node ν;
[0017] α τ =Softmax τ (σ(μ τ T ·[h ν ,h τ ])) (3)
[0018] Among them, Softmax τ () indicates that the Softmax function is used for normalization across all types, μ τ The attention weights under the τ type, h ν h is the embedding representation of the current node ν. τ h is the vector of all neighbor nodes of type τ. ν' The sum of their weights.
[0019] Further, step 3 includes:
[0020] The feature vectors of each node output by the heterogeneous graph neural network are concatenated to obtain the concatenated vector H. d As the final representation of the news, it is then fed into the softmax layer for stance bias detection:
[0021] Z = softmax(W0H) d +b0) (4)
[0022] Where W0 is the parameter matrix and b0 is the linearly varying intercept.
[0023] Another aspect of this invention proposes a news stance discrimination system based on heterogeneous graph neural networks, comprising:
[0024] The heterogeneous graph building module is used to extract entity and topic information from news articles using named entity recognition technology and LDA topic model, and associate them with sentences to build a heterogeneous graph.
[0025] The feature extraction module is used to process the heterogeneous graph constructed by the heterogeneous graph neural network to obtain the feature vectors of all nodes in the heterogeneous graph;
[0026] The news stance discrimination module is used to fuse the feature vectors of all nodes output by the heterogeneous graph neural network to comprehensively judge the stance of the news.
[0027] Furthermore, the heterogeneous graph construction module is specifically used for:
[0028] Named entity recognition technology and LDA topic model are used to extract entity and topic information from news articles, obtain entity nodes and topic nodes, and establish a heterogeneous graph G = (V, E) by associating them with sentence nodes, where V represents the set of entity nodes, topic nodes and sentence nodes, and E represents the set of bidirectional connections between sentence nodes, bidirectional connections between topic nodes and sentence nodes, and unidirectional connections from sentence nodes to entity nodes.
[0029] Furthermore, in the feature extraction module, each node in the heterogeneous graph is projected into an implicit common space using the transformation matrices in the heterogeneous graph neural network; the transformation matrices are calculated as follows:
[0030]
[0031] Where H (l+1) Let represent the transformation matrix of the (l+1)th heterogeneous convolution in the heterogeneous graph neural network; σ(·) represents the activation function. This represents the transition matrix of a node of type τ in the (l+1)th heterogeneous convolution layer; This represents the attention transfer matrix for nodes of type τ, where the rows represent all nodes and the columns correspond to the neighboring nodes of each node of type τ. The value β in row ν and column ν' of the middle column. νν' The calculation method is as follows:
[0032] β νν' =Softmax ν' (σ(ν T ·α τ [h ν ,h ν' ])) (2)
[0033] Where, ν T In this context, ν represents the attention vector, and α... τ h represents the attention weights for nodes of type τ. v and h ν' Let ν represent the vector of the current node ν and the vector of its neighboring node ν', respectively. Softmax ν' () indicates that the Softmax function is used to normalize the neighboring nodes ν' of node ν;
[0034] α τ =Softmax τ (σ(μ τ T ·[h ν ,h τ ])) (3)
[0035] Among them, Softmax τ () indicates that the Softmax function is used for normalization across all types, μ τ The attention weights under the τ type, h ν h is the embedding representation of the current node ν. τ h is the vector of all neighbor nodes of type τ. ν' The sum of their weights.
[0036] Furthermore, the news stance determination module is specifically used for:
[0037] The feature vectors of each node output by the heterogeneous graph neural network are concatenated to obtain the concatenated vector H. d As the final representation of the news, it is then fed into the softmax layer for stance bias detection:
[0038] Z = softmax(W0H) d +b0) (4)
[0039] Where W0 is the parameter matrix and b0 is the linearly varying intercept.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] This invention selects diverse information related to stance in news as nodes in a heterogeneous network, enriches the representation of nodes through a heterogeneous graph neural network, and uses the fused node features to determine the stance of news downstream. Experimental results show that this invention can achieve an accuracy of 84.30% and a Macro F1 score of 83.34% on the news stance classification task. Compared with the baseline model Bert+CNN, which has the best experimental results, this invention improves the accuracy and Macro F1 score by 1.92% and 0.4%, respectively. Attached Figure Description
[0042] Figure 1 This is a flowchart illustrating a news stance discrimination method based on a heterogeneous graph neural network, according to an embodiment of the present invention.
[0043] Figure 2 These are experimental results for different numbers of subjects in embodiments of the present invention;
[0044] Figure 3 These are experimental results from heterogeneous networks with different types of nodes, as described in this embodiment of the invention.
[0045] Figure 4 The impact of node fusion on experimental results in this embodiment of the invention;
[0046] Figure 5 This is a schematic diagram of the architecture of a news stance discrimination system based on heterogeneous graph neural networks according to an embodiment of the present invention. Detailed Implementation
[0047] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:
[0048] Sentences in news articles can be broken down into multiple sentences based on symbols. Entities in news articles can be categorized into various types, such as those related to people, places, organizations, things, and locations. The theme of a news article can be obtained from a news corpus using an LDA model.
[0049] The problem of judging the stance of news can also be defined as follows: For each political news article d, the sentence S = {s1, s2, ..., s...} m}, where m represents the number of sentences in a news article, and for each sentence s n The Natural Language Toolkit (NLTK) named entity recognition technology was used to obtain entities in the news article, identifying entities in the sentence as E = {e1, e2, ..., e...}. n}, where n represents the number of entities in the sentence. Retrieve topics T = {t1, t2, ..., t} from the news corpus. K Let K be the total number of topics, and let P be the most relevant topics to each sentence. The expression of political stance can generally be distinguished by a politician's party affiliation, political institution, etc. People's political affiliations are also increasingly concentrated according to region. At the same time, the emotions expressed towards different topics often reflect different political stances. The goal is to determine the political stance y of a given news item based on the above information. According to our task, we define the stance as left-leaning, neutral, and right-leaning, i.e., y∈{0,1,2}.
[0050] like Figure 1 As shown, a news stance discrimination method based on heterogeneous graph neural networks includes:
[0051] Step 1: Use named entity recognition technology and LDA topic model to extract entity and topic information from the news, and associate them with sentences to build a heterogeneous graph;
[0052] Step 2: Process the constructed heterogeneous graph using a heterogeneous graph neural network to obtain the feature vectors of all nodes in the heterogeneous graph;
[0053] Step 3: Fuse the feature vectors of all nodes output by the heterogeneous graph neural network to comprehensively determine the stance of the news.
[0054] Further, step 1 includes:
[0055] Named entity recognition technology and LDA topic model are used to extract entity and topic information from news articles, obtain entity nodes and topic nodes, and establish a heterogeneous graph G = (V, E) by associating them with sentence nodes, where V represents the set of entity nodes, topic nodes and sentence nodes, and E represents the set of bidirectional connections between sentence nodes, bidirectional connections between topic nodes and sentence nodes, and unidirectional connections from sentence nodes to entity nodes.
[0056] Specifically, in step 1, the heterogeneous graph is constructed as follows:
[0057] The heterogeneous network of news includes three types of nodes and three types of edges:
[0058] The first type is a sentence node, which uses LSTM to encode a sentence s = {ω1, ω2, ..., ω}. m}, ω m Representing each word in the sentence, we obtain the sentence's feature vector as x. s ∈R M The second type is the topic node. The initial vector representation of topic t (t∈T) uses one-hot encoding, and its feature vector is represented as x.t ∈R K The third type is entity nodes. For entity encoding, we use a method of randomly initializing word vectors. For words appearing in the corpus, we use a fixed dictionary size, define dimensions, and randomly initialize word vectors to obtain x. e ∈R N N is the word vector dimension. This representation method will not allow entities to acquire any external knowledge.
[0059] The three types of edges are bidirectional connections between sentences, bidirectional connections between topics and sentences, and unidirectional connections from sentences to entities. Note that the unidirectional connection from a sentence to an entity differs from the bidirectional connection between a sentence and a topic because the topic provides global information about the sentence, while entities exist in different positions within the sentence. To prevent the information from entities with different positions from interfering with the meaning of different parts of a sentence, a unidirectional connection from a sentence to an entity is established here.
[0060] These three types of nodes and edges form a heterogeneous network graph of the text, namely, a heterogeneous graph G = (V, E), where V represents the set of nodes V = {S∪T∪E}. e}, where E represents the set of edges between the nodes.
[0061] Specifically, in step 2, this embodiment uses a heterogeneous graph neural network to process the constructed heterogeneous graph. The heterogeneous graph neural network model can handle nodes of different types in the graph. Considering the differences in various types of information—for example, given a specific node, neighboring nodes of different types may have different effects on it, and different neighboring nodes of the same type may also have different importance—this invention uses a two-layer attention heterogeneous graph neural network. Through heterogeneous convolution, the transformation matrices of each type of node in the heterogeneous graph are projected into an implicit common space.
[0062] The calculation method is as follows: the matrix H of the heterogeneous convolution layer l+1 (l+1) This means that different neighbor nodes are aggregated. The update is performed with the initial node vector matrix H. (0) =X, where X represents all nodes (rows) and all nodes (columns). The specific formula is:
[0063]
[0064] In the formula, σ(·) represents the activation function, and different types of nodes have different transition matrices. Transition matrix Considering different feature spaces and projecting them onto the same feature space, This represents the transition matrix of a node of type τ in the (l+1)th heterogeneous convolution. This represents the attention transfer matrix, where rows represent all nodes and columns correspond to their neighbor nodes of type τ. For example, the value of a specific element in row ν and column ν' is β. νν' The calculation method is as follows:
[0065] β νν' =Softmax ν' (σ(ν T ·α τ [h ν ,h ν' ])) (2)
[0066] ν T In this context, ν represents the attention vector, and α... τ h represents the attention weights for nodes of type τ. v and h ν' Let represent the vectors of the current node ν and its neighboring node ν', respectively. The vectors are normalized using the Softmax function across the neighboring nodes ν' of node ν.
[0067] In the aggregation of node information, the attention weight α of type τ nodes τ The calculation method is as follows:
[0068] α τ =Softmax τ (σ(μ τ T ·[h ν ,h τ ])) (3)
[0069] The Softmax function is used for normalization across all node types, μ τ The attention weights under the τ type, h ν It is the embedded representation of the current node, h τ h is the vector of all neighbor nodes of type τ. ν' The sum of weights. σ(·) above is the activation function, specifically using Leaky ReLU.
[0070] Through an L-layer heterogeneous graph neural network, we can obtain node vector representations with rich semantic and structural information.
[0071] Specifically, step 3 includes:
[0072] For all node feature vectors output by the heterogeneous graph neural network, we adopt a strategy of fusing node representations to comprehensively judge stance bias. First, for all sentence node representations output by the heterogeneous network, we obtain the sentence type node vector by averaging. Entity nodes and topic nodes are also calculated using an attention-based approach. Regarding the three types of vector representations output by the heterogeneous graph neural network, we believe that the stance bias of a news article is highly correlated with its topic, entity, and sentence. Simply relying on one type of node for stance bias judgment leads to insufficient information aggregation and affects the discrimination effect. Therefore, this paper concatenates the three types of nodes to obtain H... d As the final representation of the news, it is then fed into the softmax layer for stance bias detection:
[0073] Z = softmax(W0H) d +b0) (4)
[0074] Where W0 is the parameter matrix and b0 is the linearly varying intercept.
[0075] During model training, the cross-entropy loss function is used:
[0076]
[0077] Where Y is the number of categories, D is the set of news documents to be trained, y is the label matrix corresponding to the news stance, Θ is the model parameters, and η is the regularization factor.
[0078] It's worth noting that during training, this embodiment uses bias labels on the entire news article. While this labeling method isn't perfect, as descriptions of certain aspects within the article may not align with the overall political viewpoint, it's a reasonable approximation. It's difficult to obtain specific labels for a particular issue within a news article, but the overall narrative can convey a certain political stance. During testing, this embodiment uses an attention mechanism to aggregate nodes of the same type, enhancing certain phrases with stances or opinions. The node information is then reassembled to create a holistic representation of the news, combining the stances and opinions expressed for each interest group within the news.
[0079] To verify the effectiveness of the present invention, the following experiment was conducted:
[0080] 1. Experimental setup
[0081] (1) Dataset and Evaluation Methods
[0082] Our experiment was conducted on the ALLsides news dataset. The relevant statistical results of the dataset are as follows: The ALLsides website pushes news articles from various aspects of the political spectrum for each trending event. The website hides the source of the articles and gives a final value based on the reader's evaluation of the article's stance. This experiment used the large-scale news dataset created by Baly et al. [R.Baly, G.Da San Martino, J. Glass, and P. Nakov, “We Can Detect Your Bias: Predicting the Political Ideology of News Articles,” in Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020, pp.4982–4991, doi:10.18653 / v1 / 2020.emnlp-main.404.], which included 37,554 news articles published by 73 news media outlets on the website, covering more than one hundred topics. These news articles represent real political scenarios. It is important to note that the middle category includes articles with a centrist political ideology, rather than articles lacking political bias (such as those in sports and technology). Table 1 shows the statistical results of the dataset. For dataset partitioning, 1300 data points were used as the test set in the experiment. This is close to the partitioning ratio used by Ramy Baly et al. [T.Yang,L.Hu,C.Shi,H.Ji,X.Li,andL.Nie,“HGAT:Heterogeneous Graph Attention Networks for Semi-supervised Short Text Classification,”ACM Trans.Inf.Syst.,vol.39,no.3,2021,doi: 10.1145 / 3450352.]
[0083] Table 1: Data Statistics
[0084]
[0085] Evaluation Method: Stance bias was classified into three categories, and accuracy and Macro F1 score were used as evaluation metrics for the experimental results. This example only presents the conclusions without detailed derivations.
[0086]
[0087]
[0088] Accuracy = Micro F1 = Recall m =Precison m (8)
[0089]
[0090]
[0091] TP i This refers to a true positive of class i, meaning a positive class is classified as positive; FP i This refers to a false positive of type i, i.e., a negative class being classified as a positive class; FN i This refers to a false negative of type i, where a positive case is classified as a negative case; TN i It refers to the true negative of the i-th class, that is, the negative class is determined to be negative.
[0092] (2) Baseline Model
[0093] We compared our experimental model with several baseline methods that demonstrate superior performance in utilizing text information processing, including the following methods.
[0094] Skip Thounght treats each document as a long sentence, borrowing from the skip-gram model in word2vec. It predicts the previous and next sentences of a sentence from a given sentence, generating sentence representations in an unsupervised manner.
[0095] HLSTM (HAN): First, the document is labeled as a sentence, and then each sentence is labeled as a word. A vector representation is constructed for each sentence and document using a bidirectional LSTM at both the word and sentence levels. Self-attention is used to aggregate the hidden states at both the vocabulary and sentence levels.
[0096] FastText: The input consists of multiple words and their n-gram features, which are used to represent a single document. The document vector is obtained by averaging the word and n-gram vectors of the entire document, and then the document vector is used for classification.
[0097] TextCNN applies Convolutional Neural Networks (CNNs) to text classification tasks, using multiple convolutional kernels of different sizes to extract key information from sentences, thereby better capturing local relevance.
[0098] BERT: Sampling the structure of a transformer, the goal of the BERT model is to obtain a representation of text containing rich semantic information by training on a large-scale unlabeled corpus. Its pre-training process is performed on a large corpus using word masking and prediction of the next sentence. Through the fine-tuning process of the BERT model, it is suitable for various text tasks.
[0099] ERNIE aims to learn language representations enhanced by knowledge masking strategies. Unlike BERT, its masking strategies include entity masking and phrase masking, and it implicitly learns information about knowledge and longer semantic dependencies to guide word embedding learning.
[0100] (3) Model parameter settings
[0101] This invention uses the PyTorch deep learning framework as the development environment, an NVIDIA GV100 graphics card as the deep learning server, and NLTK for entity extraction from news articles. The experimental settings are as follows: the ALLsides dataset comes from over 100 topics, our LDA topic count is set to 100, and other relevant parameters are set as follows:
[0102] Table 2 Parameter Settings
[0103]
[0104]
[0105] 2. Experimental Results
[0106] (1) The impact of the number of topics on the experimental results
[0107] In constructing the heterogeneous network, the number of different topics associated with each sentence was compared, yielding results as shown in Figure 2. The results demonstrate that both classification accuracy and Macro F1 score initially increase and then decrease with the number of topics. The model performs well when the number of topics is 2 or 3, reaching its optimal value at 3. The model achieves a classification accuracy of 84.30% and a Macro F1 score of 83.34% for stance orientation. This may be because sentences are associated with low-probability topics, increasing noise and failing to effectively distinguish content differences using topic information. Therefore, subsequent work in this experiment will set the p-value to 3.
[0108] (2) The impact of heterogeneous networks with different node types on experimental results
[0109] In constructing the heterogeneous network for news text, to demonstrate the effectiveness of our extracted topic and entity nodes in determining stance, we separately constructed networks for sentences and topics (ST), sentences and entities (SE), and a network containing sentences, topics, and entities (STE). Using our model to determine stance, we obtained the following results when the number of topics linked to a sentence was three: Figure 3 The results are shown. From Figure 3 The results show that heterogeneous networks constructed using two types of nodes perform worse in determining stance bias than those constructed using three types of nodes. This demonstrates that simultaneously extracting entity-specific information is more suitable for stance bias determination tasks.
[0110] (3) The impact of node category fusion on experimental results
[0111] The initial node, after passing through a heterogeneous network, incorporates information from other nodes. Nodes of the same type are merged using average pooling. To determine whether a direct classification of stance bias can be performed based on a specific type of node, we conducted the following experiments: directly determining stance bias using a single type of node output from the heterogeneous network, and then performing a classification after fusing the three types of nodes. Figure 4 The results show that using a certain type of node for judgment in the process of political bias assessment of news will weaken the information of other attributes. Therefore, merging various types of nodes again will enhance the expression of the news's stance.
[0112] (4) Comparison of experimental results with baseline models
[0113] To demonstrate the effectiveness of our model, we compared the optimal model obtained from the above experiments with the baseline model. The relevant configuration parameters of the baseline model are as follows. Skip Thought and HAN used the results of the comparative experiments in [C. Li and D. Goldwasser, "MEAN: Multi-head Entity Aware Attention Network for Political Perspective Detection in News Media," pp. 66–75, 2021, doi: 10.18653 / v1 / 2021.nlp4if-1.10.]. The FastText and TextCNN model parameters were set to batchsize = 128, pad size = 512, learning rate = 1e-4, and hidden layer dimension = 256. Bert and ERNIE had a batch size of 32, pad size = 512, learning rate = 5e-5, and hidden layer dimension = 768. BertCNN added convolutional layers to the output of Bert, with kernel size (2,3,4) and 256 kernels. The experimental results are shown in Table 3. The results show that our model is better than 7 commonly used baseline models. Compared with the baseline model Bert+CNN, which has the best experimental results, our model improves accuracy and Macro F1 by 1.92% and 0.4%, respectively.
[0114] Generally, models like Skip Through, FastText, TextCNN, and HAN acquire sentence feature representations through modeling. However, the expression of political stance is more complex, and relying solely on semantic information of the sentence will fail to distinguish differences in political stance, resulting in poor experimental results. Bert, ERNIE, and Bert+CNN show significant improvements because they use dynamic word vector generation methods, adjusting word vector representations based on contextual semantic information to learn subtle political biases in news reports. Our method, while representing sentence semantic information, emphasizes the importance of topics and entities in the news report. Furthermore, modeling as a heterogeneous network enhances the interaction between information. Experimental results demonstrate that this modeling method is highly effective in determining political stance.
[0115] Table 3 Baseline Comparison Results
[0116]
[0117] This invention proposes a news stance discrimination method based on heterogeneous graph neural networks. It extracts key elements from a news article to construct a heterogeneous network, enriching the representation of the news document. For each news article, its topic and entities are extracted and a heterogeneous graph is built between them and the sentences. This allows information containing political elements to be conveyed within sentences, enabling the learning of element-rich news representations. This results in a news stance classifier, which achieves state-of-the-art classification performance on the ALLsides dataset, demonstrating the effectiveness of our method.
[0118] Based on the above embodiments, such as Figure 5 As shown, another aspect of the present invention proposes a news stance discrimination system based on heterogeneous graph neural networks, comprising:
[0119] The heterogeneous graph building module is used to extract entity and topic information from news articles using named entity recognition technology and LDA topic model, and associate them with sentences to build a heterogeneous graph.
[0120] The feature extraction module is used to process the heterogeneous graph constructed by the heterogeneous graph neural network to obtain the feature vectors of all nodes in the heterogeneous graph;
[0121] The news stance discrimination module is used to fuse the feature vectors of all nodes output by the heterogeneous graph neural network to comprehensively judge the stance of the news.
[0122] Furthermore, the heterogeneous graph construction module is specifically used for:
[0123] Named entity recognition technology and LDA topic model are used to extract entity and topic information from news articles, obtain entity nodes and topic nodes, and establish a heterogeneous graph G = (V, E) by associating them with sentence nodes, where V represents the set of entity nodes, topic nodes and sentence nodes, and E represents the set of bidirectional connections between sentence nodes, bidirectional connections between topic nodes and sentence nodes, and unidirectional connections from sentence nodes to entity nodes.
[0124] Furthermore, in the feature extraction module, each node in the heterogeneous graph is projected into an implicit common space using the transformation matrices in the heterogeneous graph neural network; the transformation matrices are calculated as follows:
[0125]
[0126] Where H (l+1) Let represent the transformation matrix of the (l+1)th heterogeneous convolution in the heterogeneous graph neural network; σ(·) represents the activation function. This represents the transition matrix of a node of type τ in the (l+1)th heterogeneous convolution layer; This represents the attention transfer matrix for nodes of type τ, where the rows represent all nodes and the columns correspond to the neighboring nodes of a node of type τ. Matrix B τ The value β in row ν and column ν' of the middle column. νν' The calculation method is as follows:
[0127] β νν' =Softmax ν' (σ(ν T ·α τ [h ν ,h ν' ])) (2)
[0128] Where ν is the attention vector, α τ h represents the attention weights for nodes of type τ. v and h ν' Let ν represent the vector of the current node ν and the vector of its neighboring node ν', respectively. Softmax ν' () indicates that the Softmax function is used to normalize the neighboring nodes ν' of node ν;
[0129] α τ =Softmax τ (σ(μ τ T ·[h ν ,h τ ])) (3)
[0130] Among them, Softmax τ () indicates that the Softmax function is used for normalization across all types, μ τ The attention weights under the τ type, h ν h is the embedding representation of the current node ν. τ h is the vector of all neighbor nodes of type τ. ν' The sum of their weights.
[0131] Furthermore, the news stance determination module is specifically used for:
[0132] The feature vectors of each node output by the heterogeneous graph neural network are concatenated to obtain H. d As the final representation of the news, it is then fed into the softmax layer for stance bias detection:
[0133] Z = softmax(W0H) d +b0) (4)
[0134] Where W0 is the parameter matrix and b0 is the linearly varying intercept.
[0135] In summary, this invention selects diverse information related to stance in news as nodes in a heterogeneous network, enriches the representation of nodes through a heterogeneous graph neural network, and uses the fused node features to determine the stance of news downstream. Experimental results show that this invention can achieve an accuracy of 84.30% and a Macro F1 score of 83.34% on the news stance classification task. Compared with the baseline model Bert+CNN, which has the best experimental results, this invention improves the accuracy and Macro F1 score by 1.92% and 0.4%, respectively.
[0136] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A news stance discrimination method based on heterogeneous graph neural networks, characterized in that, include: Step 1: Use named entity recognition technology and LDA topic model to extract entity and topic information from the news, and associate them with sentences to build a heterogeneous graph; Step 2: Process the constructed heterogeneous graph using a heterogeneous graph neural network to obtain the feature vectors of all nodes in the heterogeneous graph; Step 3: Fuse the feature vectors of all nodes output by the heterogeneous graph neural network to comprehensively determine the stance of the news. In step 2, each node in the heterogeneous graph is projected into an implicit common space using the transformation matrices in the heterogeneous graph neural network; the transformation matrices are calculated as follows: (1) in In a heterogeneous graph neural network, the first... Transformation matrix of heterogeneous convolution; Indicates the activation function; express Type node in the The transition matrix of heterogeneous convolution; express Attention transfer matrix for type nodes, where rows represent all nodes and columns correspond to... The matrix of neighboring nodes under a type node middle OK, Column values The calculation method is as follows: (2) in, middle For attention vectors, for Attention weights for type nodes and Representing the current node The vector and its neighboring nodes The vector, This indicates that the Softmax function is used across nodes. neighboring nodes Perform normalization; (3) in, This indicates that the Softmax function is used for normalization across all types. Is Attention weights by type The current node Embedded representation, Is a type Vectors of all neighboring nodes The sum of their weights.
2. The news stance discrimination method based on heterogeneous graph neural networks according to claim 1, characterized in that, Step 1 includes: Named entity recognition (NAME) technology and LDA topic model are used to extract entity and topic information from news articles, obtaining entity nodes and topic nodes, and then constructing a heterogeneous graph by associating them with sentence nodes. ,in This represents a set of entity nodes, topic nodes, and sentence nodes. This represents the set of bidirectional connections between sentence nodes, bidirectional connections between topic nodes and sentence nodes, and unidirectional connections from sentence nodes to entity nodes.
3. The news stance discrimination method based on heterogeneous graph neural networks according to claim 1, characterized in that, Step 3 includes: The feature vectors of each node output by the heterogeneous graph neural network are concatenated to obtain the concatenated vector. As the final representation of the news, it is then fed into the softmax layer for stance bias detection: (4) in It is a parameter matrix. It is the intercept that changes linearly.
4. A news stance discrimination system based on heterogeneous graph neural networks, characterized in that, include: The heterogeneous graph building module is used to extract entity and topic information from news articles using named entity recognition technology and LDA topic model, and associate them with sentences to build a heterogeneous graph. The feature extraction module is used to process the heterogeneous graph constructed by the heterogeneous graph neural network to obtain the feature vectors of all nodes in the heterogeneous graph; The news stance discrimination module is used to fuse the feature vectors of all nodes output by the heterogeneous graph neural network to comprehensively judge the stance of the news. In the feature extraction module, each node in the heterogeneous graph is projected into an implicit common space using the transformation matrices in the heterogeneous graph neural network; the transformation matrices are calculated as follows: (1) in In a heterogeneous graph neural network, the first... Transformation matrix of heterogeneous convolution; Indicates the activation function; express Type node in the The transition matrix of heterogeneous convolution; express Attention transfer matrix for type nodes, where rows represent all nodes and columns correspond to... The matrix of neighboring nodes under a type node middle OK, Column values The calculation method is as follows: (2) in, middle For attention vectors, for Attention weights for type nodes and Representing the current node The vector and its neighboring nodes The vector, This indicates that the Softmax function is used across nodes. neighboring nodes Perform normalization; (3) in, This indicates that the Softmax function is used for normalization across all types. Is Attention weights by type The current node Embedded representation, Is a type Vectors of all neighboring nodes The sum of their weights.
5. The news stance discrimination system based on heterogeneous graph neural networks according to claim 4, characterized in that, The heterogeneity graph construction module is specifically used for: Named entity recognition (NAME) technology and LDA topic model are used to extract entity and topic information from news articles, obtaining entity nodes and topic nodes, and then constructing a heterogeneous graph by associating them with sentence nodes. ,in This represents a set of entity nodes, topic nodes, and sentence nodes. This represents the set of bidirectional connections between sentence nodes, bidirectional connections between topic nodes and sentence nodes, and unidirectional connections from sentence nodes to entity nodes.
6. The news stance discrimination system based on heterogeneous graph neural networks according to claim 4, characterized in that, The news stance determination module is specifically used for: The feature vectors of each node output by the heterogeneous graph neural network are concatenated to obtain the concatenated vector. As the final representation of the news, it is then fed into the softmax layer for stance bias detection: (4) in It is a parameter matrix. It is the intercept that changes linearly.
Citation Information
Patent Citations
False news identification method based on heterogeneous graph contrast learning
CN114020928A
Standard detection method based on multi-task learning
CN114638195A