News recommendation defense method and system based on graph anomaly perception reweighting
By constructing a bipartite graph and graph convolutional network to identify news manipulation and dynamically adjusting the training loss weights, the bottleneck of identifying organic popularity and manipulated popularity in news recommendation systems is solved, achieving efficient news recommendation defense and robustness improvement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
- Filing Date
- 2026-06-03
- Publication Date
- 2026-06-30
Smart Images

Figure CN122309855A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, specifically to a news recommendation defense method and system based on graph anomaly perception and reweighting. Background Technology
[0002] The statements in this section are provided only as background information in connection with this disclosure and may not constitute prior art.
[0003] In today's multimedia era, news recommendation systems have become a core technology for content distribution on digital platforms, widely used in social media, news aggregation platforms, and other scenarios. However, these systems face a severe algorithmic security challenge during data flow and model training—coordinated popularity manipulation. Malicious attackers typically control a large number of botnets to generate coordinated clicks on target news, artificially creating false structural popularity. Traditional news recommendation models heavily rely on collaborative filtering signals and aggregated engagement metrics, making them highly susceptible to such manipulation signals, leading to manipulated news content being incorrectly recommended to legitimate users.
[0004] Existing research primarily focuses on two directions: shhilling attack defense and popularity bias correction. Shhilling attack defense typically targets injection patterns specific to user profiles; while popularity bias correction methods assume that all popularity differences stem from structural biases in the system. However, neither of these methods can effectively address the subtle characteristics of modern collaborative manipulation—attackers aim to highly mimic organic, viral spread.
[0005] The key challenge of existing technologies lies in the fact that traditional recommendation systems and their defense mechanisms cannot accurately distinguish between "organic outbreaks" (genuine breaking news that attracts user attention) and "manipulated outbreaks" (artificially fabricated popularity). If all high popularity is treated as a deviation and downgraded, it will severely damage the recommendation quality of legitimate breaking news. In addition, existing anomaly detection and recommendation systems are usually treated as isolated tasks, lacking end-to-end collaborative optimization mechanisms, resulting in poor robustness against complex environments. Summary of the Invention
[0006] The purpose of this invention is to address the aforementioned shortcomings of existing technologies by providing a news recommendation defense method and system based on graph anomaly perception and reweighting. This aims to solve the technical problem that existing recommendation systems struggle to distinguish between the organic popularity of genuine breaking news and the false popularity generated by malicious bots, leading to the excessive exposure of manipulated news and impaired accuracy of normal recommendations.
[0007] The technical solution of the present invention is as follows: News recommendation defense methods based on graph anomaly detection and reweighting include: Step S1: Obtain news interaction data, construct a bipartite graph containing user nodes and news item nodes based on the news interaction data, and extract the degree features and time burst features of each news item node in the bipartite graph as initial features; Step S2: Using an anomaly detector built on a graph convolutional network, perform neighbor aggregation learning on the initial features based on graph structure information, and calculate the anomaly score of each news item node. The anomaly score is used to quantify the probability that the news item corresponding to the news item node is being manipulated in a coordinated manner. Step S3: Construct a robust loss function for anomaly detection. The robust loss function is used to dynamically adjust the training loss weight of positive samples in the news recommendation model by using the anomaly score as an adaptive weight coefficient, so as to reduce the gradient contribution of news items corresponding to news item nodes with high anomaly scores. Step S4: Perform alternating optimization training on the anomaly detector and the news recommendation model; the alternating optimization training includes: fixing the parameters of the news recommendation model and updating the parameters of the anomaly detector in the first stage, fixing the parameters of the anomaly detector and updating the parameters of the news recommendation model based on the robust loss function in the second stage, until the alternating optimization training converges; Step S5: In the recommendation stage, the trained anomaly detector is used to calculate the anomaly score of the news item node corresponding to each candidate news item in the candidate set, and the candidate news items corresponding to the news item node whose anomaly score exceeds the preset threshold are downweighted or filtered. Step S6: Using the trained news recommendation model, perform preference prediction on the candidate news items that have undergone weight reduction or filtering to generate a recommendation list, and output it to the target user terminal.
[0008] Further, in step S1, a bipartite graph containing user nodes and news item nodes is constructed based on the news interaction data, and the degree features of each news item node are extracted, including: Extract the set of user nodes from the news interaction data. With news project node collection As two types of heterogeneous nodes, their interaction history is represented as a set of edges. Construct a bipartite graph ; Define the original adjacency matrix Its block form is ,in An interaction matrix generated based on the interaction history, the interaction matrix By interactive elements Composition, if user node With news project nodes If there is interaction ,otherwise ; in the original adjacency matrix Adding the identity matrix to the matrix results in an adjacency matrix with self-loops. and the adjacency matrix with self-loops. Perform symmetric normalization to obtain the normalized adjacency matrix. ,in The degree matrix of the bipartite graph after introducing self-loops; For the set of news item nodes Each news item node Calculate its degree characteristics The calculation formula is:
[0009] in, Indicates news project nodes The degree in the bipartite graph; Represents a set of news item nodes The maximum degree of all news item nodes in the bipartite graph is represented by the number of news item nodes. The degree in the bipartite graph; the degree feature Used to characterize the structural popularity of news item nodes in terms of attention.
[0010] Furthermore, in step S1, the temporal burst characteristics of each news item node are extracted, including: For the set of news item nodes Each news item node Collect the set of edges The set of timestamps corresponding to all its interactive edges. ,in Represents user node With news project nodes Interaction timestamps, Indicates the corresponding interaction edge; Burst characteristics of computation time It is defined as the reciprocal of the standard deviation of the interaction timestamps, and the calculation formula is:
[0011] in, This represents the function for calculating standard deviation. To prevent division by zero smoothing constants.
[0012] Further, in step S2, the anomaly score of each news item node is calculated using an anomaly detector built based on a graph convolutional network, including: Based on the degree feature With the aforementioned time-burst characteristic Concatenate to construct node feature matrix The user node features are initialized as zero vectors, and the news item node features are represented as follows: ; A two-layer graph convolutional network structure is adopted. The first layer of graph convolution is passed through the normalized adjacency matrix. Aggregate first-order neighbor information to calculate hidden layer representation ,in The learnable weight matrix is the first layer of graph convolution. It is a non-linear activation function; The second layer of graph convolution is represented by the hidden layer. For input, output a higher-order representation ,in This is the output layer weight matrix; The higher-order representation is obtained through the Sigmoid function. Mapped to anomaly scores, i.e., news item nodes. The abnormal score is calculated as follows The abnormal score ,in This represents the Sigmoid function.
[0013] Further, in step S3, constructing the robust loss function for anomaly detection includes: The recommendation task is modeled as a binary classification problem, and the set of positive samples in the news interaction data is defined. With negative sample set ,in Represents a user node. Indicates a news project node. As an indicator variable, it is used to represent user nodes. Is it related to news project nodes? Interaction occurs; Constructing weight functions ,in To control the scaling hyperparameter of the weight reduction intensity, For the news project node Abnormal scores; Construct a robust loss function based on the weighting function. The formula is:
[0014] in, The user nodes predicted by the news recommendation model With news project nodes The probability of interaction.
[0015] Furthermore, in step S4, a composite loss function is designed in the first stage of updating the parameters of the anomaly detector. The formula for guiding the learning of anomaly detectors is:
[0016] in, For heuristic prior loss, For sparse regularization terms, To recommend feedback on losses, and Hyperparameters are used to balance the weights of each loss term.
[0017] Furthermore, the heuristic prior loss and sparse regularization term The calculation process includes: For each news item node Based on the degree feature With the aforementioned time-burst characteristic Constructing Heuristic Pseudo-tags , making And after maximum value normalization processing, ; Calculate the heuristic prior loss using mean squared error: ,in, For news project nodes Abnormal scores, This represents the total number of news project nodes. A collection of news project nodes; L1 regularization is applied to outlier scores to compute sparse regularization terms: .
[0018] Furthermore, the recommended feedback loss The calculation process includes: The news recommendation model is defined at the news item node. The average prediction loss is By stopping gradient operations Ensure that gradients are only fed back to the anomaly detector; Calculate the recommendation feedback loss: ,in For news project nodes Abnormal scores, This represents the total number of news project nodes. This is a collection of news project nodes.
[0019] Furthermore, the specific processes of steps S5 and S6 include: When generating the recommendation list during the recommendation phase, the predicted preference score of candidate news items whose abnormal scores exceed a preset threshold is multiplied by a decay coefficient. The exposure rate can be dynamically reduced, or the candidate can be removed directly. The corresponding abnormal score; For the candidate news items retained in the candidate set, the target user's preference prediction score for the candidate news items is calculated by combining the target user's historical interaction sequence with the content characteristics of the candidate news items; the preference prediction scores are then sorted in descending order, and the Top-K candidate news items are selected to form a personalized recommendation list.
[0020] This invention also proposes a news recommendation defense system based on graph anomaly perception and reweighting, comprising: The feature construction module is used to acquire news interaction data, construct a bipartite graph containing user nodes and news item nodes based on the news interaction data, and extract the degree features and time burst features of each news item node in the bipartite graph as initial features. An anomaly detection module is used to perform neighbor aggregation learning of graph structure information on the initial features using an anomaly detector built based on a graph convolutional network, and to calculate the anomaly score of each news item node. The anomaly score is used to quantify the probability that the news item corresponding to the news item node is being manipulated in a coordinated manner. A robust training module is used to construct a robust loss function for anomaly detection. The robust loss function is used to dynamically adjust the training loss weight of positive samples in the news recommendation model by using the anomaly score as an adaptive weight coefficient, so as to reduce the gradient contribution of news items corresponding to news item nodes with high anomaly scores. An alternating optimization module is used to perform alternating optimization training on the anomaly detector and the news recommendation model: in the first stage, the parameters of the news recommendation model are fixed and the parameters of the anomaly detector are updated; in the second stage, the parameters of the anomaly detector are fixed and the parameters of the news recommendation model are updated based on the robust loss function, until the alternating optimization training converges. The preprocessing and weighting module is used in the recommendation stage to calculate the anomaly score of each news item node corresponding to each candidate news item in the candidate set based on the trained anomaly detector, and to perform weighting or filtering on the candidate news items corresponding to news item nodes whose anomaly scores exceed a preset threshold. The recommendation output module is used to generate a recommendation list by predicting preferences for candidate news items that have undergone weight reduction or filtering, using the trained news recommendation model, and then outputting the list to the target user terminal.
[0021] Compared with existing technologies, the advantages of this invention are: 1. This invention overcomes the bottleneck in identifying organic popularity and manipulated popularity. By extracting the "degree features" and "temporal burst features" of news item nodes in a bipartite graph as initial node features, and combining this with the high-order neighbor aggregation capabilities of graph convolutional networks, it can accurately capture abnormal patterns of collaborative manipulation attacks in both structural and temporal dimensions. This mechanism effectively distinguishes between sudden attention from normal users and collaborative clicks from bot accounts, greatly improving the accuracy of anomaly score prediction.
[0022] 2. Achieving a perfect balance between defense mechanisms and recommendation utility. This invention innovatively introduces a robust loss function based on anomaly awareness. By using anomaly scores as adaptive weight coefficients, the gradient contribution of news item nodes with high anomaly scores in positive samples is dynamically reduced. This "reweighting" mechanism enables the news recommendation model to automatically ignore artificially coordinated signals generated by bots, forcing it to focus on normal, organic user interaction signals. This, in turn, suppresses manipulated news exposure while maintaining or even improving the accuracy of personalized recommendations for normal users.
[0023] 3. Improved stability and robustness of joint training of the model. This invention designs an alternating optimization training framework for the anomaly detector and the news recommendation model. By updating the anomaly detector in the first stage and updating the news recommendation model based on the robust loss function in the second stage, the gradient conflict problem that may be caused during end-to-end joint training is effectively avoided. This ensures that the anomaly detector can learn to accurately identify manipulation behavior before the news recommendation model overfits to anomalous data, thus improving the overall robustness of the system.
[0024] 4. A secure and controllable end-to-end news distribution closed loop has been constructed. During the recommendation inference stage, this invention directly downgrades or filters candidate news items with high abnormal scores, completely cutting off the propagation path of false popularity from the data source and distribution terminal. The purified candidate set is then combined with the user's historical interaction sequence to generate a recommendation list, providing the target user terminal with a highly secure and reliable news content distribution service. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in the embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0026] Figure 1 This is a flowchart of the news recommendation defense method based on graph anomaly perception and reweighting proposed in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating a specific exemplary embodiment of the present invention. Detailed Implementation
[0027] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0028] The features and performance of the present invention will be further described in detail below with reference to embodiments.
[0029] Example 1 Please see Figure 1 The news recommendation defense method based on graph anomaly detection and reweighting includes the following steps: Step S1: Obtain news interaction data, construct a bipartite graph containing user nodes and news item nodes based on the news interaction data, and extract the degree features and time burst features of each news item node in the bipartite graph as initial features.
[0030] Please see Figure 2 In this embodiment, step S1 specifically includes the following sub-steps: Step S11: Based on the news interaction data (i.e. Figure 2 The user-item interaction data in the news project is constructed by including user nodes and news item nodes. Figure 2 The user node set in the news interaction data is extracted from the bipartite graph (referred to as project node in the graph). With news project node collection As two types of heterogeneous nodes, their interaction history is represented as a set of edges. Construct a bipartite graph ; Define the original adjacency matrix Its block form is ,in An interaction matrix generated based on the interaction history, the interaction matrix By interactive elements Composition, if user node With news project nodes If there is interaction ,otherwise ; in the original adjacency matrix Adding the identity matrix to the matrix results in an adjacency matrix with self-loops. and the adjacency matrix with self-loops. Perform symmetric normalization to obtain the normalized adjacency matrix. ,in For the degree matrix of the bipartite graph after introducing self-loops, its diagonal elements , which represents the sum of the original degree and the self-loop degree of node i.
[0031] Step S12: Extract the degree feature of news item nodes as structural features, calculate the total number of interactions of news item nodes, and perform maximum degree normalization; specifically: For the set of news item nodes Each news item node Calculate its degree characteristics (Right now Figure 2 Structural features ), representing the total number of interactions of the news item node in the bipartite graph, calculated using the following formula:
[0032] in, Indicates news project nodes The degree in the bipartite graph, i.e. the number of user nodes connected to that node; Represents a set of news item nodes The maximum degree of all news item nodes in the bipartite graph is represented by the number of news item nodes. The degree in the bipartite graph; the degree feature Used to characterize the structural popularity of news item nodes in terms of attention; Step S13: Extract the temporal burst characteristics of news item nodes as time-series features, and calculate the time concentration index (i.e., temporal burst characteristics) based on the statistical distribution of interaction timestamps. Specifically: For the set of news item nodes Each news item node Collect the set of edges The set of timestamps corresponding to all its interactive edges. ,in Represents user node With news project nodes Interaction timestamps, Indicates the corresponding interaction edge; Burst characteristics of computation time (Right now Figure 2 Temporal characteristics in It is defined as the reciprocal of the standard deviation of the interaction timestamp, and the calculation formula is:
[0033] in, This represents the function for calculating standard deviation. To prevent division by zero smoothing constants; highly coordinated robot attacks lead to concentrated interaction times. Smaller, thus producing larger The value represents the abnormal burstiness in the time dimension.
[0034] Step S2: Using an anomaly detector built on a graph convolutional network, perform neighbor aggregation learning on the initial features based on graph structure information, and calculate the anomaly score of each news item node. The anomaly score is used to quantify the probability that the news item corresponding to the news item node is being manipulated in a coordinated manner.
[0035] In this embodiment, step S2 specifically includes the following sub-steps: Step S21: Based on the degree feature With the aforementioned time-burst characteristic Concatenate to construct node feature matrix The user node features are initialized as zero vectors, and for news item nodes... Its eigenvector is represented as The node feature matrix captures anomalous patterns in the project across structural and temporal dimensions, providing discriminative input features for graph convolutional networks. Step S22: Deploy a two-layer graph convolutional network to learn the high-order representation of news item nodes through a neighbor aggregation mechanism; details are as follows: A two-layer graph convolutional network structure is used for message passing and neighbor aggregation. The first layer, the Graph Convolutional Network (GCN), uses the normalized adjacency matrix. Aggregate first-order neighbor information to calculate hidden layer representation ,in To hide the dimension, the formula for graph convolution is: ,in The learnable weight matrix is the first layer of graph convolution. It is a non-linear activation function; The second graph convolutional GCN layer is represented by the hidden layer. For input, output a higher-order representation ,in This is the output layer weight matrix; By stacking multiple layers of graph convolutions, the model is able to capture high-order collaborative relationships between user nodes and news item nodes, and identify manipulated items with anomalous connection patterns. Step S23: Calculate the anomaly score of news item nodes based on the graph convolution output, and establish a probability output layer for anomaly detection; specifically: Based on the second-layer graph convolution output Calculate the project anomaly score matrix The output is mapped to anomaly scores using the Sigmoid activation function. For news item nodes... Its abnormal score The calculation is as follows: ,in For the Sigmoid function; outlier score Quantitative News Project Nodes The probability that a news item is being manipulated is indicated by a value closer to 1, which suggests that the news item is more likely to be the target of an attack.
[0036] Step S3: Construct a robust loss function for anomaly detection. The robust loss function is used to dynamically adjust the training loss weight of positive samples in the news recommendation model by using the anomaly score as an adaptive weight coefficient, so as to reduce the gradient contribution of news items corresponding to news item nodes with high anomaly scores. In this embodiment, step S3 specifically includes the following sub-steps: Step S31: Define the standard binary cross-entropy loss function as the basic recommendation objective; that is, model the recommendation task as a binary classification problem, and define the set of positive samples in the news interaction data. With negative sample set ,in Represents a user node. Indicates a news project node. As an indicator variable, it is used to represent user nodes. Is it related to news project nodes? Interaction occurs; the standard binary cross-entropy loss function is defined as:
[0037] in, User nodes predicted by the news recommendation model With news project nodes The probability of interaction. This loss function drives the model to fit the observed interaction data, but it can be misled by contaminated data when cooperative manipulation exists.
[0038] Step S32: Introduce an anomaly-aware weighting mechanism to dynamically adjust the loss weights of positive samples based on anomaly scores; specifically, construct the weighting function. ,in To control the scaling hyperparameter of the weight reduction intensity, For the news project node Outlier scores; for positive samples The loss weight is negatively correlated with the outlier score; that is, the higher the outlier score, the lower the weight of the sample in the loss function. Negative samples are not downweighted because the attacker's goal is to exaggerate positive interaction signals.
[0039] Step S33: Construct a robust loss function to reduce the influence of high outlier scores during training and suppress the propagation of manipulation signals; specifically, construct a robust binary cross-entropy loss function based on a weighted mechanism. By reducing the gradient weights of positive samples in items with high outlier scores, the model learns to ignore human-induced cooperative signals generated by the robot. The robust loss function is defined as:
[0040] in, The user nodes predicted by the news recommendation model With news project nodes The probability of interaction. , The prediction score matrix is the probability matrix; when As the gradient contribution of positive samples approaches 1, the news recommendation model is significantly attenuated, forcing it to focus on normal, organic user node interaction signals, thereby learning a user node embedding P (i.e., ...) that is highly robust to cooperative manipulation. Figure 2 User embedding (P) and project node embedding (Q) in the middle. Figure 2 The project is embedded in Q).
[0041] Step S4: For the anomaly detector (i.e. Figure 2 GCN in the news recommendation model (i.e.) and the news recommendation model (i.e.) Figure 2 The Rec (Recommendation Model) in the code performs alternating optimization training; please refer to [link / reference]. Figure 2 The alternating optimization training includes: Step 1: In the first stage, fix the parameters of the news recommendation model and update the parameters of the anomaly detector; Step 2: In the second stage, fix the parameters of the anomaly detector and update the parameters of the news recommendation model based on the robust loss function until the alternating optimization training converges.
[0042] In this embodiment, step S4 specifically includes the following sub-steps: Step S41: In the first stage, fix the parameters of the news recommendation model and update the parameters of the anomaly detector based on the composite loss function; specifically as follows: Freeze the parameters of the news recommendation model Only optimize the parameters of the anomaly detector. ; Design a composite loss function The loss function, which guides the anomaly detector's learning, comprises three key terms: heuristic prior loss. sparse regularization term Compared with recommendation feedback loss The composite loss function is defined as:
[0043] in and To balance the hyperparameters of the weights of each loss term, we minimize... The anomaly detector learns to identify manipulation items with high numbers and high temporal bursts. In this embodiment, specifically, the heuristic prior loss The calculations include: Based on degree features With the characteristics of explosive time Constructing Heuristic Pseudo-tags Defined as: And after maximum value normalization processing, The pseudo-label reflects the prior probability of an item being attacked; highly frequent and explosive items are assigned high pseudo-label values. The anomaly detector learns explicit statistical priors through mean squared error loss.
[0044] in For the total number of projects, The anomaly score predicted by the anomaly detector; this loss term ensures that the anomaly detector focuses on items with both structural and temporal anomalies.
[0045] In this embodiment, specifically, the sparse regularization term The calculations include: Considering that manipulated items typically constitute only a very small portion (usually less than 5%) in real-world recommendation scenarios, L1 regularization is applied to the predicted anomaly scores to prevent the anomaly detector from generating too many false positives. The sparse regularization term is defined as:
[0046] This regularization term encourages a sparse distribution of outlier scores, causing the model to tend to identify most items as normal and assign high outlier scores only to items with obvious abnormal patterns, thereby improving detection accuracy. In this embodiment, specifically, the recommendation feedback loss The calculations include: By introducing feedback signals from the news recommendation model, items that the current news recommendation model struggles to fit are more likely to be abnormal interactions that have been forcibly injected. Define the news recommendation model at the news item node. The average prediction loss is By stopping gradient operations Ensure that gradients are only fed back to the anomaly detector. The recommended feedback loss definition is:
[0047] This loss term encourages the anomaly detector to assign higher anomaly scores to items that the news recommendation model struggles to fit, thus creating a feedback mechanism between the detector and the recommender.
[0048] Step S42: In the second stage, fix the anomaly detector parameters and update the parameters of the news recommendation model based on the robust loss function; specifically as follows: Parameters of the freeze anomaly detector All current abnormal scores Treat it as a fixed constant; The news recommendation model uses these fixed outlier scores as reliable guidance to calculate a robust binary cross-entropy loss. By minimizing Update news recommendation model parameters Due to high-risk projects ( The positive interaction gradient close to 1) is significantly decayed, and the news recommendation model is forced to focus on normal, organic user node interaction signals, learning an embedding representation that is highly robust to cooperative manipulation.
[0049] Step S43: Iteratively execute steps S41 and S42 until convergence, achieving alternating collaborative optimization of the detector and recommender; specifically, alternately execute anomaly detector updates and news recommendation model updates in each global training cycle; firstly, perform a small number of warm-up training rounds on the news recommendation model using standard binary cross-entropy loss, while simultaneously using... Preheat the anomaly detector; Then, the process enters an alternating optimization phase, repeating steps S41 and S42 until the recommendation performance metrics on the validation set tend to stabilize. This alternation mechanism avoids gradient conflict issues during end-to-end joint training, ensuring that the anomaly detector learns to accurately identify manipulation behavior before the news recommendation model overfits to anomalous data.
[0050] Step S5: In the recommendation stage, the anomaly score of the news item node corresponding to the candidate news item in the candidate set is calculated based on the trained anomaly detector. The candidate news items corresponding to the news item node whose anomaly score exceeds the preset threshold are downweighted or filtered. In this embodiment, step S5 specifically includes the following sub-steps: Step S51: Calculate the anomaly scores of all news item nodes based on the trained anomaly detector, and establish an anomaly ranking for the items; specifically, input the bipartite graph into the trained anomaly detector with a two-layer graph convolutional network, and calculate the anomaly scores of all news item nodes through forward propagation; anomaly scores Quantitative News Project Nodes The probability that a news item has been manipulated for popularity is indicated by a higher score, which means that the item is more likely to be a news item whose exposure has been artificially boosted by attackers through bot accounts. Step S52: Set the anomaly score threshold ,Will News project nodes were identified as manipulated projects; abnormal scores were recorded. The projects are categorized as a collection of manipulated projects. For items identified as manipulated, their weight will be reduced in subsequent recommendations; this will be achieved by adjusting the threshold. Balancing defensive effects with normal recommended utility, ensuring that normal recommendations for organic popular items are preserved while suppressing manipulated exposure; Step S53: Dynamically reduce the exposure weight of manipulated items during the recommendation phase to suppress their recommendation to users; specifically, when generating the recommendation list, multiply the predicted score of the manipulated items by a decay coefficient. This can be achieved by implementing a soft downgrade or by directly removing manipulated items from the current user's candidate push pool, thereby outputting a cleaned recommendation list on the terminal.
[0051] Step S6: Using the trained news recommendation model, perform preference prediction on the candidate news items that have undergone weight reduction or filtering to generate a recommendation list, and output it to the target user terminal.
[0052] In this embodiment, step S6 specifically includes the following sub-steps: Step S61: Based on the purified candidate set of items, construct a news recommendation module to calculate the user's preference prediction score for the items; specifically, based on the candidate set processed in step S5, use recommendation algorithms such as neural collaborative filtering or matrix factorization to calculate the user node... For news project nodes Predicted preference score The predicted score is based on user node embedding. Embedded with news project nodes The inner product or neural network mapping is obtained, and the formula is: ;in, Represents user node The corresponding user node embedding is similar. Indicates news project nodes Embed the corresponding news item; For the interaction function, a multilayer perceptron is used for the neural collaborative filtering model, and an inner product operation is used for the matrix factorization model. Since the manipulated items have been downweighted or filtered, the predicted score reflects the user's preference for normal organic content.
[0053] Step S62: Generate a personalized recommendation list by combining user's historical interaction behavior with item content features; specifically, by combining user's historical interaction sequence with item content features (such as news titles, summaries, and categories), capture user dynamic interests through attention mechanisms or sequence models; for each target user, based on the predicted score... The purified candidate set is sorted in descending order, and the Top-K items are selected to form a personalized recommendation list. This list excludes anomalous items that have been manipulated, ensuring that the recommended content received by users reflects true popularity rather than artificially created hype. Step S63: Output the recommendation results to the target user's terminal to complete the distribution of news content after security purification. Specifically, the generated Top-K recommendation list is pushed to the target user's terminal device (such as smartphone, tablet, or PC browser) through the application interface. In the recommendation display interface, each recommended item is accompanied by its content summary, source information, and popularity index. Due to the purification process in step S5, the displayed popularity index is the true popularity after manipulation. After clicking on a recommended item, the user is redirected to the news details page to complete the content consumption. At the same time, the system records the user's feedback behavior (clicks, dwell time, sharing, and collection) for subsequent model updates, forming a safe and robust news recommendation closed loop.
[0054] Example 2 Example 2, based on the same inventive concept as Example 1, proposes a news recommendation defense system based on graph anomaly perception and reweighting, which can implement the news recommendation defense method described in Example 1, and specifically includes the following modules: A feature construction module is used to acquire news interaction data, construct a bipartite graph containing user nodes and news item nodes based on the news interaction data, and extract the degree features and temporal burst features of each news item node in the bipartite graph as initial features; the feature construction module specifically includes: Figure 2 The graph construction module and project feature extraction module in the text; An anomaly detection module is used to perform neighbor aggregation learning of graph structure information on the initial features using an anomaly detector built based on a graph convolutional network, and to calculate the anomaly score of each news item node. The anomaly score is used to quantify the probability that the news item corresponding to the news item node is being manipulated in a coordinated manner. A robust training module is used to construct a robust loss function for anomaly detection. The robust loss function is used to dynamically adjust the training loss weight of positive samples in the news recommendation model by using the anomaly score as an adaptive weight coefficient, so as to reduce the gradient contribution of news items corresponding to news item nodes with high anomaly scores. An alternating optimization module is used to perform alternating optimization training on the anomaly detector and the news recommendation model: in the first stage, the parameters of the news recommendation model are fixed and the parameters of the anomaly detector are updated; in the second stage, the parameters of the anomaly detector are fixed and the parameters of the news recommendation model are updated based on the robust loss function, until the alternating optimization training converges. The preprocessing and weighting module is used in the recommendation stage to calculate the anomaly score of each news item node corresponding to each candidate news item in the candidate set based on the trained anomaly detector, and to perform weighting or filtering on the candidate news items corresponding to news item nodes whose anomaly scores exceed a preset threshold. The recommendation output module is used to generate a recommendation list by predicting preferences for candidate news items that have undergone weight reduction or filtering, using the trained news recommendation model, and then outputting the list to the target user terminal.
[0055] The embodiments described above merely illustrate specific implementation methods of this application, and while the descriptions are detailed and specific, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the technical solution of this application, and these modifications and improvements all fall within the scope of protection of this application.
[0056] This background section is provided to generally present the context of the invention. The work of the currently named inventors, the work to the extent described in this background section, and aspects of this section that did not constitute prior art at the time of application are neither expressly nor impliedly acknowledged as prior art to the invention.
Claims
1. A news recommendation defense method based on graph anomaly detection and reweighting, characterized in that, include: Step S1: Obtain news interaction data, construct a bipartite graph containing user nodes and news item nodes based on the news interaction data, and extract the degree features and time burst features of each news item node in the bipartite graph as initial features; Step S2: Using an anomaly detector built on a graph convolutional network, perform neighbor aggregation learning on the initial features based on graph structure information, and calculate the anomaly score of each news item node. The anomaly score is used to quantify the probability that the news item corresponding to the news item node is being manipulated in a coordinated manner. Step S3: Construct a robust loss function for anomaly detection. The robust loss function is used to dynamically adjust the training loss weight of positive samples in the news recommendation model by using the anomaly score as an adaptive weight coefficient, so as to reduce the gradient contribution of news items corresponding to news item nodes with high anomaly scores. Step S4: Perform alternating optimization training on the anomaly detector and the news recommendation model; the alternating optimization training includes: fixing the parameters of the news recommendation model and updating the parameters of the anomaly detector in the first stage, fixing the parameters of the anomaly detector and updating the parameters of the news recommendation model based on the robust loss function in the second stage, until the alternating optimization training converges; Step S5: In the recommendation stage, the trained anomaly detector is used to calculate the anomaly score of the news item node corresponding to each candidate news item in the candidate set, and the candidate news items corresponding to the news item node whose anomaly score exceeds the preset threshold are downweighted or filtered. Step S6: Using the trained news recommendation model, perform preference prediction on the candidate news items that have undergone weight reduction or filtering to generate a recommendation list, and output it to the target user terminal.
2. The news recommendation defense method based on graph anomaly perception and reweighting according to claim 1, characterized in that, In step S1, a bipartite graph containing user nodes and news item nodes is constructed based on the news interaction data, and the degree features of each news item node are extracted, including: Extract the set of user nodes from the news interaction data. With news project node collection As two types of heterogeneous nodes, their interaction history is represented as a set of edges. Construct a bipartite graph ; Define the original adjacency matrix Its block form is ,in An interaction matrix generated based on the interaction history, the interaction matrix By interactive elements Composition, if user node With news project nodes If there is interaction ,otherwise ; in the original adjacency matrix Adding the identity matrix to the matrix results in an adjacency matrix with self-loops. and the adjacency matrix with self-loops. Perform symmetric normalization to obtain the normalized adjacency matrix. ,in The degree matrix of the bipartite graph after introducing self-loops; For the aforementioned news item node set Each news item node Calculate its degree characteristics The calculation formula is: in, Indicates news project nodes The degree in the bipartite graph; Represents a set of news item nodes The maximum degree of all news item nodes in the bipartite graph is represented by the number of news item nodes. The degree in the bipartite graph; the degree feature Used to characterize the structural popularity of news item nodes in terms of attention.
3. The news recommendation defense method based on graph anomaly perception and reweighting according to claim 2, characterized in that, In step S1, the temporal burst characteristics of each news item node are extracted, including: For the aforementioned news item node set Each news item node Collect the set of edges The set of timestamps corresponding to all its interactive edges. ,in Represents user node With news project nodes Interaction timestamps, Indicates the corresponding interaction edge; Burst characteristics of computation time It is defined as the reciprocal of the standard deviation of the interaction timestamps, and the calculation formula is: in, This represents the function for calculating standard deviation. To prevent division by zero smoothing constants.
4. The news recommendation defense method based on graph anomaly perception and reweighting according to claim 3, characterized in that, In step S2, the anomaly score of each news item node is calculated using an anomaly detector built based on a graph convolutional network, including: Based on the degree feature With the aforementioned time-burst characteristic Concatenate to construct node feature matrix The user node features are initialized as zero vectors, and the news item node features are represented as follows: ; A two-layer graph convolutional network structure is adopted. The first layer of graph convolution is passed through the normalized adjacency matrix. Aggregate first-order neighbor information to calculate hidden layer representation ,in The learnable weight matrix is the first layer of graph convolution. It is a non-linear activation function; The second layer of graph convolution is represented by the hidden layer. For input, output a higher-order representation ,in This is the output layer weight matrix; The higher-order representation is obtained through the Sigmoid function. Mapped to anomaly scores, i.e., news item nodes. The abnormal score is calculated as follows The abnormal score ,in This represents the Sigmoid function.
5. The news recommendation defense method based on graph anomaly perception and reweighting according to claim 1, characterized in that, In step S3, constructing a robust loss function for anomaly detection includes: The recommendation task is modeled as a binary classification problem, and the set of positive samples in the news interaction data is defined. With negative sample set ,in Represents a user node. Indicates a news project node. As an indicator variable, it is used to represent user nodes. Is it related to news project nodes? Interaction occurs; Constructing weight functions ,in To control the scaling hyperparameter of the weight reduction intensity, For the news project node Abnormal scores; Construct a robust loss function based on the weighting function. The formula is: in, The user nodes predicted by the news recommendation model With news project nodes The probability of interaction.
6. The news recommendation defense method based on graph anomaly perception and reweighting according to claim 1, characterized in that, In step S4, a composite loss function is designed during the first stage of updating the parameters of the anomaly detector. The formula for guiding the learning of anomaly detectors is: in, For heuristic prior loss, For sparse regularization terms, To recommend feedback on losses, and Hyperparameters are used to balance the weights of each loss term.
7. The news recommendation defense method based on graph anomaly perception and reweighting according to claim 6, characterized in that, The heuristic prior loss and sparse regularization term The calculation process includes: For each news item node Based on the degree feature With the aforementioned time-burst characteristic Constructing Heuristic Pseudo-tags , making And after maximum value normalization processing, ; Calculate the heuristic prior loss using mean squared error: ,in, For news project nodes Abnormal scores, This represents the total number of news project nodes. A collection of news project nodes; L1 regularization is applied to outlier scores to compute sparse regularization terms: 。 8. The news recommendation defense method based on graph anomaly perception and reweighting according to claim 6, characterized in that, The recommended feedback loss The calculation process includes: The news recommendation model is defined at the news item node. The average prediction loss is By stopping gradient operations Ensure that gradients are only fed back to the anomaly detector; Calculate the recommendation feedback loss: ,in For news project nodes Abnormal scores, This represents the total number of news project nodes. This is a collection of news project nodes.
9. The news recommendation defense method based on graph anomaly perception and reweighting according to claim 1, characterized in that, The specific processes of steps S5 and S6 include: When generating the recommendation list during the recommendation phase, the predicted preference score of candidate news items whose abnormal scores exceed a preset threshold is multiplied by a decay coefficient. The exposure rate can be dynamically reduced, or the candidate can be removed directly. The corresponding abnormal score; For the candidate news items retained in the candidate set, the target user's preference prediction score for the candidate news items is calculated by combining the target user's historical interaction sequence with the content characteristics of the candidate news items; the preference prediction scores are then sorted in descending order, and the Top-K candidate news items are selected to form a personalized recommendation list.
10. A news recommendation defense system based on graph anomaly perception and reweighting, characterized in that, include: The feature construction module is used to acquire news interaction data, construct a bipartite graph containing user nodes and news item nodes based on the news interaction data, and extract the degree features and time burst features of each news item node in the bipartite graph as initial features. An anomaly detection module is used to perform neighbor aggregation learning of graph structure information on the initial features using an anomaly detector built based on a graph convolutional network, and to calculate the anomaly score of each news item node. The anomaly score is used to quantify the probability that the news item corresponding to the news item node is being manipulated in a coordinated manner. A robust training module is used to construct a robust loss function for anomaly detection. The robust loss function is used to dynamically adjust the training loss weight of positive samples in the news recommendation model by using the anomaly score as an adaptive weight coefficient, so as to reduce the gradient contribution of news items corresponding to news item nodes with high anomaly scores. An alternating optimization module is used to perform alternating optimization training on the anomaly detector and the news recommendation model: in the first stage, the parameters of the news recommendation model are fixed and the parameters of the anomaly detector are updated; in the second stage, the parameters of the anomaly detector are fixed and the parameters of the news recommendation model are updated based on the robust loss function, until the alternating optimization training converges. The preprocessing and weighting module is used in the recommendation stage to calculate the anomaly score of each news item node corresponding to each candidate news item in the candidate set based on the trained anomaly detector, and to perform weighting or filtering on the candidate news items corresponding to news item nodes whose anomaly scores exceed a preset threshold. The recommendation output module is used to generate a recommendation list by predicting preferences for candidate news items that have undergone weight reduction or filtering, using the trained news recommendation model, and then outputting the list to the target user terminal.