False comment prediction method and system based on Bayesian multi-scale attention network
A method for predicting fake reviews is constructed by using a Bayesian multi-scale attention network. This method solves the problems of uncertainty quantification and result usability in fake review prediction, and achieves high-precision time-series trend prediction and probabilistic risk assessment. It is applicable to the supervision of fake reviews on e-commerce platforms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-03-13
AI Technical Summary
Existing fake review prediction technologies struggle to achieve high-precision, high-reliability time-series trend prediction and probabilistic risk assessment. They cannot quantify the uncertainty of prediction results, and the results are not easy to read or usable, making it difficult to meet the actual needs of e-commerce platforms.
A fake review prediction method based on Bayesian Multiscale Attention Network (BMSAN) is adopted. By constructing a Gaussian probability distribution of the number of fake reviews through a multi-head self-attention cross-product interaction layer and a Bayesian neural network uncertainty quantification layer, a time-series trend prediction and probabilistic risk assessment can be achieved.
It improves the accuracy and reliability of predicting fake reviews, provides a dual-dimensional reference of trends and probabilities, adapts to different business needs, meets regulatory timeliness requirements, and enhances the usability and visualization capabilities of prediction results.
Smart Images

Figure CN121658725A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of network risk prediction technology, specifically to a method and system for predicting fake comments based on Bayesian multi-scale attention networks. Background Technology
[0002] The statements in this section are merely background information relating to this disclosure and do not necessarily constitute prior art.
[0003] With the rapid development of the digital economy, e-commerce and modern logistics have become deeply integrated. Online transactions, with their advantages of being available 24 / 7, geographically independent, and highly efficient, have gradually replaced some functions of traditional offline retail, becoming a core model supporting daily consumption and driving the digital transformation of commerce. Product reviews on e-commerce platforms serve as a crucial reference for consumer decisions, directly influencing purchasing behavior. High-quality, authentic reviews not only help consumers accurately assess product quality but also contribute to building a trust system and increasing user loyalty on the platform. However, the proliferation of fake reviews poses a significant threat to this ecosystem.
[0004] In the face of fierce market competition, some merchants manipulate the review ecosystem by hiring "water armies" to publish fake positive reviews and maliciously attack competitors in order to quickly improve product rankings and cover up product defects. These behaviors are characterized by high concealment, mass generation, and concentrated timing. Therefore, accurately identifying and predicting the generation trend of fake reviews and quantifying their risk level has become an urgent need for e-commerce platform operation and management and market supervision departments to conduct precise supervision. It is also a core technical pain point in the field of online transaction ecosystem governance.
[0005] Currently, while technologies for predicting fake reviews and related risk assessments have made some progress, they still face multiple challenges due to the complexity of the problem itself and the diversity of practical application scenarios. These challenges make it difficult to meet the requirements of high accuracy, high reliability, and ease of implementation, as follows: 1. Vague prediction targets and lack of uncertainty quantification: Existing research on the definition of fake comment risk focuses on judging the authenticity of a single comment, without clarifying the prediction target from the perspective of quantitative and temporal evolution; moreover, traditional deterministic prediction models can only output point prediction results and cannot quantify the uncertainty of the prediction results, making it difficult for regulatory authorities to judge the credibility of the prediction results and carry out graded risk response.
[0006] 2. Insufficient Modeling of Multi-Dimensional Correlation Features and Complex Temporal Dependencies: The generation of fake reviews is deeply correlated with multi-dimensional information such as product transaction data, user behavior data, and review text features, and there are complex non-linear and time-lag dependencies among these factors. Existing models either focus only on single-dimensional features or struggle to capture dynamic dependencies over long time series, resulting in low accuracy in predicting the temporal trend of fake review numbers.
[0007] 3. Dual shortcomings in processing efficiency and probability prediction capability of massive data: E-commerce platforms generate massive amounts of multimodal review data every day. Traditional time series prediction models suffer from low training efficiency and poor generalization ability when processing this type of data. More importantly, these models cannot provide probability distribution predictions. In regulatory practice, the probability range of the number of fake reviews is more valuable than single-point predictions and can help prepare resources in advance.
[0008] 4. Insufficient Adaptability of Technical Solutions to Practical Applications: Existing methods for predicting fake reviews often prioritize optimal algorithm performance, failing to adequately consider the readability and usability requirements of prediction results in real-world scenarios. Regulatory and operational personnel need understandable and directly usable prediction outputs, rather than complex model parameters or raw data. Current solutions lack designs for visualizing prediction results and converting risk levels, requiring additional processing before application and reducing the practical value of the technology. Summary of the Invention
[0009] To address the aforementioned issues, this disclosure proposes a method and system for predicting fake reviews based on a Bayesian multi-scale attention network. By constructing a Bayesian multi-scale attention network and integrating the uncertainty quantification capability of Bayesian inference with the feature capture capability of multi-head attention, it achieves accurate temporal prediction and probabilistic risk assessment of the number of fake reviews. Simultaneously, it optimizes the usability of the prediction results, making it particularly suitable for predicting the temporal trend and probability distribution of the number of fake reviews, thus providing technical support for the governance of the online platform's review ecosystem.
[0010] According to some embodiments, the present disclosure adopts the following technical solutions: Methods for predicting fake reviews based on Bayesian multi-scale attention networks include: Obtain core data from online comments and preprocess it; Feature extraction and covariate design were performed on the preprocessed core data of online comments to obtain time-series comment data and covariates. The covariates and time-series comment data were then fused to form a feature matrix. The feature matrix is input into the review prediction model, and the output is the time-series prediction trend of fake reviews of products. The review prediction model includes a multi-head self-attention cross-product interaction layer and a Bayesian neural network uncertainty quantification layer. The multi-head self-attention cross-product interaction layer uses multiple attention heads to learn relationships from different perspectives and generates a context-enhanced feature vector containing cross-product information. The Bayesian neural network uncertainty quantification layer inputs the context-enhanced feature vector into the Bayesian neural network and outputs the mean and logarithmic standard deviation of the predicted number of fake reviews for each time unit. The logarithmic standard deviation is converted into a non-negative standard deviation through an activation function to construct a Gaussian probability distribution of the number of fake reviews, thereby realizing the quantification of prediction uncertainty.
[0011] According to some embodiments, the present disclosure adopts the following technical solutions: A fake review prediction system based on Bayesian multi-scale attention networks includes: The data acquisition module is used to acquire core data from online comments and perform preprocessing. The feature processing module is used to extract features and design covariates from the preprocessed core data of online comments to obtain time-series comment data and covariates, and then fuse the covariates with the time-series comment data to form a feature matrix. The prediction module is used to input the feature matrix into the review prediction model and output the time-series prediction trend of fake reviews of products. The review prediction model includes a multi-head self-attention cross-product interaction layer and a Bayesian neural network uncertainty quantification layer. The multi-head self-attention cross-product interaction layer uses multiple attention heads to learn relationships from different perspectives and generates a context-enhanced feature vector containing cross-product information. The Bayesian neural network uncertainty quantification layer inputs the context-enhanced feature vector into the Bayesian neural network and outputs the mean and logarithmic standard deviation of the predicted number of fake reviews for each time unit. The logarithmic standard deviation is converted into a non-negative standard deviation through an activation function to construct a Gaussian probability distribution of the number of fake reviews, thereby realizing the quantification of prediction uncertainty.
[0012] According to some embodiments, the present disclosure adopts the following technical solutions: A computer program product includes a computer program that, when executed by a processor, implements the aforementioned method for predicting fake reviews based on a Bayesian multi-scale attention network.
[0013] According to some embodiments, the present disclosure adopts the following technical solutions: A non-transitory computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement the aforementioned method for predicting false reviews based on a Bayesian multi-scale attention network.
[0014] According to some embodiments, the present disclosure adopts the following technical solutions: An electronic device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to perform the aforementioned method for predicting false comments based on a Bayesian multi-scale attention network.
[0015] Compared with the prior art, the beneficial effects of this disclosure are as follows: This paper discloses a method for predicting fake reviews based on Bayesian Multi-Scale Attention Networks (BMSAN). It proposes a scheme for predicting fake reviews using BMSAN, which to some extent solves the problem that traditional models cannot quantify the uncertainty of prediction. The method primarily focuses on the temporal prediction and risk boundary characterization of fake reviews on online platforms, providing a dual-dimensional reference of "trend + probability" for fake review supervision. Quantifying the number and uncertainty of fake reviews is taken as the core objective, which meets the needs of regulatory scenarios regarding risk probability and clarifies the direction of model design.
[0016] This disclosed method for predicting fake reviews based on Bayesian multi-scale attention networks constructs a multi-dimensional evaluation system adapted to fake review prediction, which to some extent solves the current problem of lacking targeted evaluation indicators for fake review prediction. This system follows the principles of "accuracy + reliability + scenario adaptation" and covers three types of indicators: regression accuracy, uncertainty quantification, and peak detection, providing important basis for objectively verifying model performance and guiding regulatory decisions.
[0017] This disclosed method for predicting fake reviews based on Bayesian multi-scale attention networks integrates LSTM temporal modeling, multi-head self-attention, and Bayesian neural networks (BNN) to construct BMSAN, effectively addressing the pain points of traditional models: it captures long-term temporal dependencies through LSTM to avoid gradient vanishing; it captures cross-product associations through multi-head self-attention to compensate for the limitations of single-product modeling; and it quantifies uncertainty through BNN, which, unlike deterministic models with no probability output, significantly improves prediction accuracy and risk reference value.
[0018] This disclosed method for predicting fake reviews based on Bayesian multi-scale attention networks has strong data adaptability through the collaborative design of multi-scale attention and Bayesian framework: the multi-scale structure can simultaneously capture short-term sudden surges in reviews (such as daily peaks) and long-term time-series trends (such as monthly cycles), while the Bayesian prior mechanism can still maintain prediction robustness in small sample scenarios (such as new product categories), solving the problems of insufficient multi-scale feature capture and poor generalization of small data in traditional models.
[0019] The disclosed method for predicting fake reviews based on Bayesian multi-scale attention networks is applicable to fake review prediction scenarios on multi-category online platforms. The model's emphasis can be flexibly adjusted according to regulatory priorities (such as peak monitoring during promotional periods and cross-category dissemination governance) to adapt to different business needs. It can simultaneously provide fake review trend prediction (mean output) and probability prediction (confidence interval), balancing data processing efficiency and risk assessment real-time performance, and meeting regulatory timeliness requirements. Attached Figure Description
[0020] The accompanying drawings, which form part of this disclosure, are used to provide a further understanding of this disclosure. The illustrative embodiments of this disclosure and their descriptions are used to explain this disclosure and do not constitute an undue limitation of this disclosure.
[0021] Figure 1 A visual description of the problem scenario and research motivation for the embodiments of this disclosure; Figure 2 This is a flowchart of a method for predicting fake reviews based on a Bayesian multi-scale attention network, according to an embodiment of this disclosure. Figure 3 This is a block diagram of the BMSAN model architecture of an embodiment of this disclosure; Figure 4 This is a framework diagram of the multi-dimensional evaluation system of this disclosure. Detailed Implementation
[0022] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.
[0023] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.
[0024] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this disclosure. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0025] Example 1 One embodiment of this disclosure provides a method for predicting fake reviews based on a Bayesian multi-scale attention network. The method includes the following steps: Step 1: Obtain core data from online comments and preprocess it; Step 2: Extract features and design covariates from the preprocessed core data of online comments to obtain time-series comment data and covariates. Then, fuse the covariates with the time-series comment data to form a feature matrix. Step 3: Input the feature matrix into the review prediction model and output the time-series prediction trend of fake product reviews; The review prediction model includes a multi-head self-attention cross-product interaction layer and a Bayesian neural network uncertainty quantification layer. The multi-head self-attention cross-product interaction layer uses multiple attention heads to learn relationships from different perspectives and generates a context-enhanced feature vector containing cross-product information. The Bayesian neural network uncertainty quantification layer inputs the context-enhanced feature vector into the Bayesian neural network and outputs the mean and logarithmic standard deviation of the predicted number of fake reviews for each time unit. The logarithmic standard deviation is converted into a non-negative standard deviation through an activation function to construct a Gaussian probability distribution of the number of fake reviews, thereby realizing the quantification of prediction uncertainty.
[0026] As one embodiment, the disclosed method for predicting fake reviews based on Bayesian multi-scale attention networks explicitly uses the number of fake reviews for a specific product within a specified time window as the core prediction object. Specifically, this includes the historical time-series sequence of fake review numbers, the predicted value of the number of fake reviews in future periods, and the probability distribution interval of the predicted value, thus addressing the problem of ambiguous prediction objects in existing research. In terms of evaluation dimensions, two core evaluation dimensions are set to ensure the reliability and practicality of fake review prediction: the prediction accuracy dimension focuses on the fit and prediction error of the time-series trend of the number of fake reviews; the uncertainty quantification dimension focuses on the probability distribution characteristics of the prediction results (such as confidence interval and coverage), providing a quantitative basis for risk classification. The specific implementation process is as follows: Step 1: Obtain core data from online comments and preprocess it; Specifically, (1) Obtaining the training dataset: Based on the publicly available dataset, three types of core data are collected. The core data of the online reviews include basic review data, product-related data, and time-series auxiliary data; The basic comment data includes comment text content, comment posting time, comment user ID, and product ID, and filters out labeled fake comment samples; the product association data includes product category, product price fluctuations, product sales trends, and historical fake comment marking records; the time-series auxiliary data includes time characteristics (such as whether it is a holiday or a promotional period) and user behavior characteristics (such as user registration duration and user comment frequency).
[0027] (2) Perform data cleaning and data supplementation preprocessing on the core data of online comments.
[0028] Specifically, the collected raw data undergoes validity processing. Invalid comments are removed (such as empty text comments, duplicate comments, and comments posted by users with low credibility); data lacking key information (such as comments missing posting time or product identifiers) is supplemented, with the supplementation method determined according to the data type (e.g., using the mode for categorical data, and the mean or median for continuous data), ensuring the validity of subsequent feature engineering and model input.
[0029] Step 2: Extract features and design covariates from the preprocessed core data of online comments to obtain time-series comment data and covariates. Then, fuse the covariates with the time-series comment data to form a feature matrix. Specifically, (1) Feature extraction: The number of fake reviews for each product is counted at a specified time granularity (e.g., daily, weekly, determined according to regulatory requirements), constructing a product-level time series of fake reviews. The time series is labeled with the historical number of fake reviews in the corresponding time unit, forming a "feature-label" correspondence. The review text is segmented and word-embedded to extract text-related features (e.g., sentiment tendency, keyword repetition rate), transforming the text information into numerical features that the model can recognize. The time series and text features are aligned by time unit to form a preliminary feature set.
[0030] Specifically, a word segmentation tool is used to segment the comment text and remove meaningless stop words; a pre-trained word embedding model is used to map the segmentation results into low-dimensional dense vectors; two types of features are calculated based on the text vectors: sentiment tendency (determining whether the text is positive, negative or neutral through a sentiment dictionary or classification model) and keyword repetition rate (statistically calculating the proportion of repetitions of high-frequency keywords in the text of fake comments). The two types of features are then converted into numerical forms and incorporated into the feature matrix.
[0031] (2) Covariate design: Variables that can help predict fake reviews (product category, time features, user behavior features) are selected from product-related data and time-series auxiliary data as model covariates. The covariates are standardized to assist in time-series prediction and eliminate scale differences between different dimensions of data (e.g., mapping continuous covariates to a specified numerical range). The standardized covariates are then fused with the feature set constructed in feature extraction to form the feature matrix of the final model input.
[0032] The covariate standardization process refers to applying the Min-Max standardization method to continuous covariates (such as commodity price fluctuations, user registration duration, and user comment frequency) to map their values to the [0,1] interval, as shown in the formula. Where x is the original value of the covariate, , These are the minimum and maximum values of the covariate, respectively; for categorical covariates, one-hot encoding or embedding encoding is used to convert them into numerical vectors that the model can recognize, ensuring that the scale of covariates of different dimensions is consistent.
[0033] Step 3: Input the feature matrix into the review prediction model and output the time-series prediction trend of fake product reviews; First, step 31: Build and train the comment prediction model; The comment prediction model adopts the BMSAN model architecture. The BMSAN model adopts a three-layer core structure of "LSTM temporal feature extraction layer - multi-head self-attention cross-product interaction layer - Bayesian neural network (BNN) uncertainty quantification layer", which includes the LSTM temporal feature extraction layer, the multi-head self-attention cross-product interaction layer and the Bayesian neural network uncertainty quantification layer.
[0034] Among them, (1) LSTM temporal feature extraction layer: input preprocessed temporal review data and covariates, learn the long-term dependency relationship of the number of fake reviews for a single product through LSTM network, and output the hidden state at each time step.
[0035] (2) Multi-head self-attention cross-product interaction layer: Project the LSTM hidden state of all products at the current time step to the query (Q), key (K), value (V) space, calculate the association weight between products by scaling dot product attention, and generate context-enhanced feature vectors that integrate cross-product information.
[0036] (3) Bayesian Neural Network (BNN) Uncertainty Quantification Layer: Construct a Bayesian neural network to assign a prior distribution to the model parameters. Through variational inference, the variational posterior distribution is used... Approximate true posterior distribution The mean of the model's final output predictions ( ) and log-standard deviation ( ), and through the activation function Convert to non-negative standard deviation ( Construct a Gaussian probability distribution .
[0037] Step 32: Design the model loss function; Traditional time series prediction losses (such as single MSE or NLL) can only optimize one dimension of the objective (such as point prediction accuracy or probability fitting), and cannot meet the multiple requirements of the BMSAN model, including high-accuracy time series prediction, reliable uncertainty quantification, and cross-product correlation adaptation. Therefore, this disclosure designs a quaternary composite loss function, which achieves multi-objective collaborative optimization by weighting and fusing point prediction accuracy loss, Bayesian parameter regularization loss, probability distribution fitting loss, and confidence interval coverage penalty. This ensures both the accuracy of the prediction of the number of fake reviews and the reliability of uncertainty quantification. The formula is as follows:
[0038] Furthermore, the design logic and functionality of each component of the loss function are explained in detail: Point prediction accuracy loss ( The core function of the mean point prediction is to optimize the fit between the model's output and the actual value, ensuring the basic prediction accuracy of the time-series trend and avoiding deviations in the probability distribution from the true data trend. While a single traditional MSE cannot quantify uncertainty, it can quickly guide the model to learn the time-series patterns of fake reviews, such as delayed growth after promotions and peak periods during holidays. Therefore, it can serve as a "basic anchor point" for the loss function. Calculation formula:
[0039] Bayesian parameter regularization loss ( Based on variational inference theory, BMSAN constrains the difference between the approximate posterior and prior distributions of model parameters such as multi-head self-attention weights, LSTM gating parameters, and BNN layer parameters to avoid overfitting while ensuring the rationality of uncertainty quantification. Since BMSAN introduces a Bayesian neural network (BNN), the parameters must satisfy probability distribution characteristics. This prevents the parameter distribution from deviating excessively from the prior, ensuring the model's generalization ability on small samples or noisy data. Calculation formula:
[0040] Probability distribution fitting loss ( Point prediction loss (PDR) is used to optimize the fit between the model's predicted Gaussian probability distribution and the actual data distribution; it is the core loss function for probabilistic prediction. Traditional point prediction loss cannot capture the randomness of the data. By calculating the negative log-likelihood of the true value in the predicted distribution, the model is guided to learn the mean. ) and standard deviation ( The co-optimization of (mean and standard deviation) aims to both closely approximate the true value and match data fluctuations. The calculation formula is:
[0041] Confidence interval coverage penalty ( This ensures that the confidence interval of the model output effectively covers the true values, addressing the issues of excessively narrow or meaningless intervals in existing probability prediction models, and enhancing the practical value of uncertainty quantification. This is achieved by setting a target coverage level. Penalize insufficient coverage to guide model adjustment. Size, balancing interval width and coverage reliability. Calculation formula:
[0042] in, The weighting hyperparameters for each loss are... N For the sample size, d For model parameter dimensions, For the first i The true value of each sample The mean of the model predictions. The standard deviation of the model prediction. For target coverage, For indicator functions, For the first i The prediction confidence interval for each sample.
[0043] Step 33: Model training optimization; This disclosure employs an end-to-end training strategy, aiming to minimize the aforementioned quaternary composite loss function. The optimizer uses the AdamW optimizer, combined with weight decay for regularization. The learning rate scheduling uses a cosine annealing strategy, coupled with periodic restarts, to dynamically adjust the learning rate during training, balancing rapid convergence in the early stages with fine-grained optimization in later stages. In addition to Dropout and weight decay, variational Dropout is introduced for regularization, enhancing the model's generalization ability. For training process control, the input feature matrix is proportionally divided into training and validation sets. Forward propagation is performed batch-wise on the training set to calculate the loss, and backpropagation updates the model parameters. After each training round, the model performance is evaluated on the validation set, and an early stopping strategy is implemented. Training is terminated when the validation set loss does not decrease for several consecutive rounds, and the optimal model parameters on the validation set are saved.
[0044] In each training batch, forward propagation is used to calculate the loss, and backpropagation is used to update the parameters. Gradient pruning is employed during training to prevent gradient explosion, and an early stopping strategy is implemented to monitor the validation set loss and save the optimal model.
[0045] The optimization logic of the loss function is to minimize it during model training using the AdamW optimizer. Synergistic effect of each loss item: Ensure that the basic predictions do not deviate from the true trend, and avoid sacrificing the accuracy of point predictions in order to fit the distribution; Constrain the parameter distribution to prevent the model from overfitting to noise (such as occasional bursts of fake reviews) in massive comment data. Make the predicted distribution closely match the fluctuations in real data to ensure the rationality of probability prediction; Ensure that confidence intervals can practically guide business operations; for example, regulatory authorities can use confidence intervals to prepare resources in advance, preventing uncertainty quantification from becoming merely a formality. Through multiple iterations, The process gradually converges, ultimately achieving the dual objectives of high-precision time series prediction and reliable uncertainty quantification.
[0046] Step 34: Model Prediction and Result Output; The first step is model prediction. The Monte Carlo sampling method is used to generate prediction results and uncertainty intervals. The process is as follows: 1. Parameter sampling: from the variational posterior distribution of the trained Bayesian neural network. In this process, S independent samplings are performed to obtain S sets of different model parameters; 2. Multiple forward propagation: Input the data to be predicted (such as covariates in a specified future time unit, historical time series features) into the S-group parameterized model, perform forward propagation, and obtain the predicted mean and standard deviation of the S-group. 3. Aggregated Prediction Distribution: Aggregate the prediction results of S groups, calculate the final prediction mean (averaging the prediction means of multiple groups to eliminate the randomness of a single parameter configuration) and the final prediction variance (combining the uncertainty of model parameters and inherent noise in the data, obtained through the variance calculation formula), including: (1) Predicted mean: The predicted mean of the S groups is averaged to eliminate the randomness of a single parameter configuration, resulting in a robust point prediction value. The calculation formula is as follows: This value can be directly used as a core trend reference for the number of fake comments in the period to be predicted.
[0047] (2) Prediction variance: Taking into account both the uncertainty of model parameters and the inherent noise of the data. The calculation formula is as follows: .
[0048] in, It is the joint squared expectation of the parameters and data noise. It is the square of the predicted mean, and the difference between the two is the total variance, which fully reflects the degree of uncertainty of the prediction results.
[0049] 4. Generate confidence intervals: based on the aggregated predicted mean. With the predicted standard deviation By combining the confidence levels set as needed (such as 95% confidence level commonly used in regulatory scenarios and 90% confidence level used in routine monitoring), the corresponding predicted confidence intervals are calculated using the quantiles of the standard normal distribution, thus clarifying the risk boundaries of the number of fake comments in different time units:
[0050] in, It is the two-sided quantile of the standard normal distribution (e.g., at 95% confidence level). At 90% confidence level The core function of this interval is to provide risk boundaries for decision-making. For example, if the 95% confidence interval for the number of fake reviews for a product in the next 7 days is [8, 15], it means that the probability of the real value falling within this interval is 95%. Regulatory authorities can use this information to plan response resources in advance.
[0051] In summary, the Monte Carlo sampling method for generating prediction results includes the following steps: performing a specified number of independent samplings from the trained BNN variational posterior distribution to obtain multiple sets of model parameters; inputting the input data to be predicted into multiple parameterized models and performing forward propagation to obtain multiple sets of prediction means and standard deviations; aggregating the multiple sets of prediction results to calculate the final prediction mean (the average of the multiple prediction means) and the final prediction variance (the variance of combined parameter uncertainty and data noise); and calculating the prediction probability interval based on the final prediction mean and variance, combined with a specified confidence level.
[0052] Furthermore, this publicly disclosed prediction target is defined with the number of fake reviews for a specific product within a specified time window as the core prediction target, specifically including three types of data: Historical time series basic data: the past performance of a certain product The sequence of the number of fake comments per time unit is denoted as . The time unit can be set according to regulatory requirements. Determined based on the amount of historical data accumulated; For product number, For the first The first item The number of real and fake comments per time unit.
[0053] Future time period prediction: The model output of the future value of this product. The predicted number of fake comments per time unit is denoted as . . Based on regulatory timeliness requirements (such as short-term forecasts and medium-term forecasts), this part of the results is the core basis for judging the trend of fake comments.
[0054] Predicted probability distribution interval: Gaussian distribution based on BNN output Calculate the confidence interval for a specified confidence level (e.g., 90% for routine supervision and 95% for key supervision). .in To predict the mean (i.e.) ), The standard deviation is used to quantify the uncertainty of the forecast results and provide a basis for risk classification.
[0055] Furthermore, this disclosure establishes a multi-dimensional evaluation system covering three dimensions: regression accuracy, uncertainty quantification, and peak detection, to avoid the problem that a single indicator cannot reflect the overall capabilities of the model. 1. Regression accuracy measures the goodness of fit between predicted and actual values, focusing on the predicted mean. Compared with the true value The bias was analyzed to verify the model's ability to capture the time-series trend of fake reviews, using three metrics: MSE, RMSE, and MAE. 2. Mean Squared Error (MSE): By amplifying the effect of extreme biases through the squared term, it is more sensitive to the prediction error of peak fake reviews (such as a surge during promotional periods), making it suitable for evaluating the model's fit to key anomalies. The formula is as follows: ,in The total number of samples in the test set. For the first The number of real and fake comments per sample This corresponds to the predicted mean; 3. Root Mean Square Error (RMSE): Taking the square root of MSE ensures that the unit of the indicator matches the true value, facilitating intuitive interpretation in business scenarios. The formula is as follows: ; 4. Mean Absolute Error (MAE): Calculates the deviation using absolute values, avoiding the excessive amplification of error by extreme values. It better reflects the overall average prediction accuracy of the model and is suitable for comparing the robustness of different models. The formula is as follows: .
[0056] 5. Uncertainty quantification metrics verify the reliability of probability predictions. These metrics are designed to leverage BMSAN's core strengths, assessing the practical value of prediction confidence intervals and avoiding the problems of overly wide intervals being meaningless or overly narrow intervals missing true values. They include three metrics: 90% Coverage, Average Prediction Interval Width (MPIW), and Directional Accuracy (DirAcc). 6. 90% Coverage: This measures the proportion of true values falling within the 90% confidence interval. Ideally, it should be close to 90% (with slight deviations allowed). If the coverage is too low, the interval cannot effectively cover the risk; if it is too high, the interval is too wide and lacks decision-making guidance. The formula is as follows: ,in This is an indicator function (the actual value is 1 if it is within the range, otherwise it is 0). The quantiles corresponding to a 90% confidence level; 7. Mean Predictive Interval Width (MPIW): Calculates the average width of the 90% confidence interval for all samples. Assuming coverage is met, a smaller width indicates more accurate uncertainty quantification (a more compact interval). The formula is as follows: ,in The interval width for a single sample is calculated by averaging to eliminate the influence of sample size. 9. Directional Accuracy (DirAcc): This evaluates the model's ability to predict the direction of the temporal trend of fake reviews. If the predicted direction matches the actual direction, it indicates that the model can capture dynamic changes, which is crucial for early warning (such as an impending surge in fake reviews). The formula is as follows: ,in Given the length of the time series, the statistical accuracy is determined by judging the sign consistency between the predicted difference and the actual difference between adjacent time steps.
[0057] 10. Peak detection metrics are adapted to key governance scenarios for fake reviews. Peak values of fake reviews are a key focus of regulation; for example, a sudden surge in the number of fake reviews due to malicious reviews by merchants at a certain time. Therefore, the prediction results need to be transformed into a classification task (peak / non-peak) to evaluate the model's adaptability to key scenarios. The 75th percentile of historical fake review counts is used as the peak threshold. ( (If peak value is specified, otherwise non-peak value is specified), including four classification metrics: accuracy, precision, recall, and F1 score. 11. Accuracy (Acc): Overall, this measures the model's correctness in classifying peak / non-peak data, reflecting the model's adaptability across all scenarios. The formula is as follows: Among them, TP (true positive) is the true peak and is predicted to be the peak, TN (true negative) is the true non-peak and is predicted to be the non-peak, FP (false positive) is the true non-peak but is predicted to be the peak, and FN (false negative) is the true peak but is predicted to be the non-peak. 12. Precision (Prec): Measures the proportion of the actual peak value among the samples predicted as the peak value. This helps avoid excessive warnings from the model, such as a high FP leading to a waste of regulatory resources. The formula is as follows: ; 13. Recall (Rec): Measures the proportion of true peak values correctly identified by the model, avoiding critical risks such as missed detections due to excessively high FN (Failure Number), which may lead to missing opportunities for combating review manipulation. The formula is as follows: ; 14. F1 Score (F1S): The harmonic mean of precision and recall, balancing the trade-off between avoiding over-warnings and avoiding missed detections. The F1 score only significantly improves when both precision and recall are high, making it a core evaluation metric for peak detection scenarios. The formula is as follows: .
[0058] As one example, the model prediction results and evaluation indicators are compiled into a visual report: showing the time-series trend of fake product reviews (historical true values, future predicted mean, and confidence interval); presenting multi-dimensional evaluation indicator results; and outputting risk classification suggestions (based on confidence intervals and peak detection results, combined with regulatory requirements to determine the risk level), providing decision support for the supervision of fake reviews on online platforms.
[0059] Step 35: Application of the trained model; The core data of online reviews is obtained, and after preprocessing and feature engineering, a feature matrix is obtained. After inputting the feature matrix into the trained review prediction model, it first enters the LSTM temporal feature extraction layer. The LSTM temporal feature extraction layer is input with the preprocessed feature matrix, and learns the long-term temporal dependency of the number of fake reviews for a single product (such as the periodic changes and lagging growth trend of fake reviews) through the gating mechanism of the LSTM network (forget gate, input gate, output gate). It outputs the product temporal hidden state corresponding to each time unit, and sets a regularization mechanism (such as Dropout) to avoid overfitting.
[0060] The multi-head self-attention cross-product interaction layer receives all product temporal hidden states from the LSTM layer output and projects the hidden states into the query, key, and value spaces. It calculates the association weights between different products by scaling dot product attention to capture the interactive impact of false reviews across products. It sets multiple attention heads to learn the association relationships from different perspectives, and then concatenates the outputs of each attention head and fuses them through a linear layer to generate a context-enhanced feature vector containing cross-product information.
[0061] The Bayesian neural network uncertainty quantification layer constructs the Bayesian neural network structure, assigning a prior distribution to the network parameters; through variational inference, the variational posterior distribution is used to approximate the true posterior distribution of the parameters; the context-enhanced feature vector is input into the Bayesian neural network, outputting the mean and logarithmic standard deviation of the predicted number of fake comments for each time unit; the logarithmic standard deviation is converted into a non-negative standard deviation through an activation function, constructing a Gaussian probability distribution of the number of fake comments, thus realizing the quantification of prediction uncertainty.
[0062] The final output presents a visual report summarizing the model's predictions and evaluation metrics: it displays the time-series trend of fake product reviews (historical true values, future predicted mean, and confidence intervals); it presents multi-dimensional evaluation metric results; and it provides risk grading recommendations (based on confidence intervals and peak detection results, combined with regulatory requirements to determine risk levels), providing decision support for the regulation of fake reviews on online platforms. This includes: organizing the prediction results into three output formats; the time-series trend report displays visual charts of historical true values, future predicted mean, and predicted probability intervals; the risk grading recommendations classify risks into low, medium, and high levels based on the predicted mean and interval width, corresponding to different regulatory response strategies; the evaluation metrics summarize the specific values of the multi-dimensional evaluation system to verify the reliability of the predictions; and the output results can be directly used for decision-making regarding the regulation of fake reviews on online platforms, including resource allocation, such as increasing review manpower for high-risk products; and early warning, i.e., pre-setting governance plans for potential peak periods. Example 2 One embodiment of this disclosure provides a fake review prediction system based on a Bayesian multi-scale attention network, comprising: The data acquisition module is used to acquire core data from online comments and perform preprocessing. The feature processing module is used to extract features and design covariates from the preprocessed core data of online comments to obtain time-series comment data and covariates, and then fuse the covariates with the time-series comment data to form a feature matrix. The prediction module is used to input the feature matrix into the review prediction model and output the time-series prediction trend of fake reviews of products. The review prediction model includes a multi-head self-attention cross-product interaction layer and a Bayesian neural network uncertainty quantification layer. The multi-head self-attention cross-product interaction layer uses multiple attention heads to learn relationships from different perspectives and generates a context-enhanced feature vector containing cross-product information. The Bayesian neural network uncertainty quantification layer inputs the context-enhanced feature vector into the Bayesian neural network and outputs the mean and logarithmic standard deviation of the predicted number of fake reviews for each time unit. The logarithmic standard deviation is converted into a non-negative standard deviation through an activation function to construct a Gaussian probability distribution of the number of fake reviews, thereby realizing the quantification of prediction uncertainty.
[0063] Example 3 One embodiment of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method for predicting fake reviews based on a Bayesian multi-scale attention network.
[0064] Example 4 One embodiment of this disclosure provides a non-transitory computer-readable storage medium for storing computer instructions. When these computer instructions are executed by a processor, they implement the aforementioned method for predicting false reviews based on a Bayesian multi-scale attention network.
[0065] Example 5 One embodiment of this disclosure provides an electronic device, including a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to perform the aforementioned method for predicting false comments based on a Bayesian multi-scale attention network.
[0066] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0067] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0068] While the specific embodiments of this disclosure have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of this disclosure. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of this disclosure are still within the scope of protection of this disclosure.
Claims
1. A method for predicting fake reviews based on Bayesian multi-scale attention networks, characterized in that, include: Obtain core data from online comments and preprocess it; Feature extraction and covariate design were performed on the preprocessed core data of online comments to obtain time-series comment data and covariates. The covariates and time-series comment data were then fused to form a feature matrix. The feature matrix is input into the review prediction model, and the output is the time-series prediction trend of fake reviews of products. The review prediction model includes a multi-head self-attention cross-product interaction layer and a Bayesian neural network uncertainty quantification layer. The multi-head self-attention cross-product interaction layer uses multiple attention heads to learn relationships from different perspectives and generates a context-enhanced feature vector containing cross-product information. The Bayesian neural network uncertainty quantification layer inputs the context-enhanced feature vector into the Bayesian neural network and outputs the mean and logarithmic standard deviation of the predicted number of fake reviews for each time unit. The logarithmic standard deviation is converted into a non-negative standard deviation through an activation function to construct a Gaussian probability distribution of the number of fake reviews, thereby realizing the quantification of prediction uncertainty.
2. The method for predicting fake reviews based on Bayesian multi-scale attention networks as described in claim 1, characterized in that, The process of acquiring and preprocessing core data from online comments includes: The core data of the online reviews includes basic review data, product-related data, and time-series auxiliary data. The basic review data includes the review text content, publication time, reviewer ID, and product ID. The product-related data includes product category, price fluctuations, sales changes, and historical records of fake review markers. The time-series auxiliary data includes time characteristics and user behavior characteristics. Data cleaning and preprocessing operations to fill in missing values are performed on the core data of online comments.
3. The method for predicting fake reviews based on Bayesian multi-scale attention networks as described in claim 1, characterized in that, The process of feature extraction and covariate design on the preprocessed core data of online comments yields time-series comment data and covariates, including: The number of fake reviews for each product is counted at a specified time granularity, constructing a product-level fake review time series. The time series is labeled with the historical fake review count labels corresponding to the time unit, forming a "feature-label" correspondence. The review text is processed by word segmentation and word embedding to extract text-related features and transform the text information into numerical features that the model can recognize. The time series and text features are aligned according to the time unit to obtain time series auxiliary data and form a preliminary feature set. Variables that can help predict fake reviews were selected from product-related data and time-series auxiliary data and used as model covariates.
4. The method for predicting fake reviews based on Bayesian multi-scale attention networks as described in claim 1, characterized in that, The comment prediction model is based on the BMSAN model architecture, which has a three-layer core structure, including an LSTM temporal feature extraction layer, a multi-head self-attention cross-product interaction layer, and a Bayesian neural network uncertainty quantification layer. After inputting the feature matrix into the review prediction model, it first enters the LSTM temporal feature extraction layer. Through the gating mechanism of the LSTM network, it learns the long-term temporal dependency of the number of fake reviews for a single product and outputs the product temporal hidden state corresponding to each time unit. At the same time, a regularization mechanism is set to avoid overfitting.
5. The method for predicting fake reviews based on Bayesian multi-scale attention networks as described in claim 1, characterized in that, The multi-head self-attention cross-product interaction layer receives all product temporal hidden states from the LSTM temporal feature extraction layer and projects the hidden states into the query, key, and value spaces. It calculates the association weights between different products through scaled dot product attention, captures the interactive impact of false reviews across products, and multiple attention heads learn the association relationships from different perspectives. The outputs of each attention head are concatenated and fused through a linear layer to generate a context-enhanced feature vector containing cross-product information.
6. The method for predicting fake reviews based on Bayesian multi-scale attention networks as described in claim 1, characterized in that, The Bayesian neural network uncertainty quantification layer constructs a Bayesian neural network structure, assigns a prior distribution to the network parameters, and approximates the true posterior distribution of the parameters with a variational posterior distribution using a variational inference method. The context-enhanced feature vector is input into the Bayesian neural network, and the mean and log standard deviation of the predicted number of fake comments for each time unit are output.
7. A fake review prediction system based on Bayesian multi-scale attention network, characterized in that, include: The data acquisition module is used to acquire core data from online comments and perform preprocessing. The feature processing module is used to extract features and design covariates from the preprocessed core data of online comments to obtain time-series comment data and covariates, and then fuse the covariates with the time-series comment data to form a feature matrix. The prediction module is used to input the feature matrix into the review prediction model and output the time-series prediction trend of fake reviews of products. The review prediction model includes a multi-head self-attention cross-product interaction layer and a Bayesian neural network uncertainty quantification layer. The multi-head self-attention cross-product interaction layer uses multiple attention heads to learn relationships from different perspectives and generates a context-enhanced feature vector containing cross-product information. The Bayesian neural network uncertainty quantification layer inputs the context-enhanced feature vector into the Bayesian neural network and outputs the mean and logarithmic standard deviation of the predicted number of fake reviews for each time unit. The logarithmic standard deviation is converted into a non-negative standard deviation through an activation function to construct a Gaussian probability distribution of the number of fake reviews, thereby realizing the quantification of prediction uncertainty.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for predicting fake reviews based on Bayesian multi-scale attention networks as described in any one of claims 1-6.
9. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store computer instructions, which, when executed by a processor, implement the fake review prediction method based on a Bayesian multi-scale attention network as described in any one of claims 1-6.
10. An electronic device, characterized in that, include: The device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to perform the method for predicting fake reviews based on a Bayesian multi-scale attention network as described in any one of claims 1-6.
Citation Information
Cited By
A specific radiation source identification method based on a Bayesian attention mechanism
CN122132972A