Risk prediction method, computing device and computer readable storage medium

Through the two-layer generative adversarial network and transfer learning technology, the optimization of feature selection and model training is solved, and the efficiency and accuracy of existing tax risk prediction technologies in complex environments is achieved, and efficient and flexible risk prediction capabilities are achieved.

CN119273154APending Publication Date: 2025-01-07ZHONGKE YUNGU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411384814.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Existing tax risk prediction technologies have shortcomings in processing large-scale data and capturing complex patterns, and are difficult to meet the needs of efficiency, accuracy and adaptability in complex tax environments.

Method used

A two-layer generative adversarial network is used to generate initial and optimize virtual data sets, optimize feature selection through the adversarial process of generators and discriminators, build a risk prediction model, and use transfer learning technology to adapt to different environments to achieve risk prediction.

Benefits of technology

Improves the accuracy and efficiency of risk prediction, enables the identification of potential risk patterns in complex environments, and maintains high prediction accuracy and flexibility in different environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273154A_ABST
    Figure CN119273154A_ABST
Patent Text Reader

Abstract

The invention discloses a risk prediction method, which comprises the following steps of: acquiring a key feature set associated with risk information from a reference data set so as to generate an initial virtual data set through a first-layer generator, and generating an optimized virtual data set according to the initial virtual data set through a second-layer generator; obtaining a first classification result of classification of the initial virtual data set and the reference data set through a first discriminator, and obtaining a second classification result of classification of the optimized virtual data set and the reference data set through a second discriminator; according to the first classification result and the second classification result, optimizing the first layer generator and the second layer generator to obtain a final virtual data set; and based on the final virtual data set, optimizing the risk prediction model to obtain an optimized risk prediction model so as to obtain a risk prediction result. The invention further provides a computing device and a storage medium capable of achieving the method. According to the invention, risk prediction can be accurately and efficiently carried out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a risk prediction method, a computing device and a computer-readable storage medium. Background Art

[0002] With the explosive growth of data volume and the complexity of the data environment, traditional methods are unable to handle large-scale data and capture complex patterns.

[0003] For example, existing tax risk prediction technologies have significant deficiencies in special extraction, model training and optimization, and are unable to meet the needs for efficiency, accuracy and adaptability of tax risk prediction in the current complex tax environment.

[0004] Therefore, there is an urgent need for a method that can accurately and efficiently predict risks. Summary of the invention

[0005] The purpose of this application is to provide a risk prediction method, computing device and readable storage medium to accurately and efficiently perform risk prediction.

[0006] To achieve the above objectives:

[0007] In a first aspect, an embodiment of the present application provides a risk prediction method, comprising: obtaining a key feature set associated with risk information from a reference data set; generating an initial virtual data set based on the key feature set by a first layer generator, and generating an optimized virtual data set based on the initial virtual data set by a second layer generator; classifying the initial virtual data set and the reference data set by a first discriminator to obtain a first classification result, and classifying the optimized virtual data set and the reference data set by a second discriminator to obtain a second classification result; optimizing the first layer generator and the second layer generator based on the first classification result and the second classification result to obtain a final virtual data set; optimizing the risk prediction model based on the final virtual data set to obtain an optimized risk prediction model; and obtaining a risk prediction result based on the optimized risk prediction model.

[0008] In one embodiment, the step of generating a preliminary virtual data set according to the key feature set by the first layer generator comprises: generating the preliminary virtual data set according to the key feature set by the first layer generator based on a generating function of the first layer generator of formula (1): Where z1 is the first noise vector sampled from the standard normal distribution, σ1 is the first nonlinear activation function, W1 is the weight matrix of the first layer generator, T1 is the transpose of the weight matrix of the first layer generator, b1 is the first bias vector, α iis the key feature k′ in the key feature set i The relevant weight coefficient, r is the number of the key features in the key feature set, i is the serial number of the key feature; and / or the step of generating an optimized virtual data set according to the preliminary virtual data set by the second layer generator, comprising: the second layer generator generates the optimized virtual data set according to the preliminary virtual data set based on the generating function of the second layer generator of formula (2): Where Z1 is the second noise vector sampled from the standard normal distribution, σ2 is the second nonlinear activation function, W2 is the weight matrix of the second layer generator, T2 is the transpose of the weight matrix of the second layer generator, b2 is the bias vector of the second layer generator, β j is the weight coefficient associated with the preliminary dummy data, v i,j represents the data in the initial virtual data set, s1 is the number of data in the initial virtual data set, and j is the sequence number of the data in the initial virtual data set.

[0009] In one embodiment, the step of classifying the preliminary virtual data set and the reference data set by a first discriminator to obtain a first classification result includes: obtaining the first classification result by the first discriminator based on formula (3): Wherein, D1(x1) is the first classification result, x1 is virtual data in the preliminary virtual data set, or reference data in the reference data set, is the weight matrix of the first discriminator, is the bias vector of the first discriminator, σ3 is the third nonlinear activation function; and / or the step of classifying the optimized virtual data set and the reference data set by a second discriminator to obtain a second classification result comprises: obtaining the second classification result by the second discriminator based on formula (4): Wherein, D2(x2) is the second classification result, x2 is the data in the optimized virtual data set, or the data in the reference data set, is the weight matrix of the second discriminator, is the bias vector of the second discriminator, and σ4 is the fourth nonlinear activation function.

[0010] In one embodiment, the step of optimizing the first layer generator and the second layer generator according to the first classification result and the second classification result to obtain a final virtual data set includes: calculating the loss function of the first layer generator and the second layer generator according to the first classification result and the second classification result; optimizing the first layer generator and the second layer generator by minimizing the loss function of the first layer generator and the second layer generator to obtain an optimized first layer generator and an optimized second layer generator; and obtaining the final virtual data set based on the optimized first layer generator and the optimized second layer generator.

[0011] In one embodiment, the step of optimizing the first layer generator and the second layer generator by minimizing the loss function of the first layer generator and the second layer generator to obtain an optimized first layer generator and an optimized second layer generator comprises: optimizing the first layer generator and the second layer generator by minimizing the loss function of the first layer generator and the second layer generator based on formula (5) to obtain an optimized first layer generator and an optimized second layer generator: in, and are the optimized first layer generator and the optimized second layer generator respectively, G1 is the first layer generator, G2 is the second layer generator, is the loss function of the first layer generator, is the loss function of the second layer generator.

[0012] In one embodiment, the step of optimizing the risk prediction model based on the final virtual data set includes at least one of the following: constructing the risk prediction model based on the key feature set; initializing the risk prediction model for training;

[0013] Based on the final virtual data set, adversarial training is performed on the risk prediction model after initialization training to obtain an optimized risk prediction model.

[0014] In one embodiment, the step of obtaining a risk prediction result based on the optimized risk prediction model includes: using transfer learning technology to map the new feature set to the optimized risk prediction model to obtain a transfer learning loss function; adjusting the optimized risk prediction model by minimizing the transfer learning loss function to obtain a final risk prediction model; and obtaining the risk prediction result based on the final risk prediction model.

[0015] In one embodiment, the step of obtaining the risk prediction result according to the final risk prediction model includes: obtaining multiple high-risk scenarios through the final risk prediction model; performing simulation analysis on each of the high-risk scenarios to obtain simulation analysis results; and obtaining a risk assessment report in the risk prediction result based on the simulation analysis results.

[0016] In a second aspect, an embodiment of the present application provides a computing device, comprising: a processor and a memory storing a computer program, and when the processor runs the computer program, the above-mentioned risk prediction method is implemented.

[0017] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the risk prediction method described above is implemented.

[0018] The risk prediction method, computing device and computer-readable storage medium provided by the embodiment of the present application include obtaining a key feature set associated with risk information from a reference data set; generating an initial virtual data set according to the key feature set by a first-layer generator, and generating an optimized virtual data set according to the initial virtual data set by a second-layer generator; classifying the initial virtual data set and the reference data set by a first discriminator to obtain a first classification result, and classifying the optimized virtual data set and the reference data set by a second discriminator to obtain a second classification result; optimizing the first-layer generator and the second-layer generator according to the first classification result and the second classification result to obtain a final virtual data set; optimizing the risk prediction model based on the final virtual data set to obtain an optimized risk prediction model; and obtaining a risk prediction result based on the optimized risk prediction model. Therefore, the present application adopts a two-layer generative adversarial network (i.e., a first-layer generator, a second-layer generator, a first discriminator and a second discriminator) to generate an initial virtual data set and an optimized virtual data set, so as to effectively improve the accuracy and effectiveness of feature selection, and thus can achieve accurate and efficient risk prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of a risk prediction method according to an embodiment of the present invention;

[0020] Figure 2 A schematic diagram of the structure of a computing device provided in one embodiment of the present invention. DETAILED DESCRIPTION

[0021] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0022] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.

[0023] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at the time of..." or "when..." or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising", "including" indicate that there are described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Thus, “A, B, or C” or “A, B and / or C” means “any of the following: A; B; C; A and B; A and C; B and C; A, B, and C.” An exception to this definition will occur only when a combination of elements, functions, steps, or operations are inherently mutually exclusive in some manner.

[0024] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0025] It should be noted that, in this article, step codes such as S10, S11, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S11 first and then S10, etc., but these should all be within the scope of protection of this application.

[0026] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0027] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.

[0028] See also Figure 1 , which is a risk prediction method provided in an embodiment of the present application. The risk prediction method can be executed by a program management device provided in an embodiment of the present application. The program management device can be implemented in software and / or hardware, such as a computing device such as a computer or server.

[0029] In this embodiment, the execution subject of the risk prediction method is a computer as an example for explanation. The risk prediction method provided by this embodiment includes:

[0030] Step S10: Obtain a key feature set associated with risk information from a reference data set;

[0031] In one embodiment, the reference data set may be a set of actual data formed by multi-source data, for example, a set of actual data automatically collected from multiple data sources, such as financial statements, tax declaration records, and market data. m}, T = {t1, t2,, t n}, M = {m1,m2,,m k}, then D = F∪T∪M, where F is the financial statement, T is the tax return record, M is the market data, and f i represents the item of the ith financial statement, m is the total number of items in the financial statement, and t i represents the i-th tax declaration record, n is the total number of entries in the tax declaration record, m i is the ith market data entry, and k is the total number of market data entries.

[0032] In one embodiment, S10, obtaining a key feature set associated with risk information from a reference data set, may include: extracting an initial feature set associated with risk information from the reference data set; screening the initial feature set to obtain the key feature set. Specifically, in one embodiment, a correlation analysis algorithm may be used to perform correlation screening on the initial feature set to calculate the correlation coefficient between each feature in the initial feature set and a risk indicator (e.g., a tax risk indicator) in the risk information; based on the magnitude of the correlation coefficient, a feature whose absolute value of the correlation coefficient is greater than a preset correlation coefficient threshold is selected to form a key feature set. Among them, the risk indicator may be pre-stored or dynamically generated through real-time analysis and model prediction. Specifically, the tax risk indicator may utilize the historical tax data of an enterprise or industry, and extract indicators related to tax risks by analyzing relevant historical data in the past, such as tax declaration records, financial statements, and audit reports. Among them, the tax risk indicator may include features such as abnormal tax burden rate, improper use of tax incentives, and inconsistent accounts.

[0033] In addition, in one embodiment, it is also possible but not limited to remove the features in the key feature set that are highly redundant with other features, so as to update the key feature set. The key feature set can be expressed as: k_opt ={k′1,k′2,…,k′ r}, F k_opt is the key feature set, and r is the number of key features in the key feature set.

[0034] Step S11, generating an initial virtual data set according to the key feature set by the first layer generator, and generating an optimized virtual data set according to the initial virtual data set by the second layer generator;

[0035] In one embodiment, generating an initial virtual data set according to a key feature set by a first layer generator in step S11 includes:

[0036] The first layer generator generates an initial virtual data set based on the key feature set and the generation function of the first layer generator as follows:

[0037]

[0038] Where z1 is the first noise vector sampled from the standard normal distribution, σ1 is the first nonlinear activation function, W1 is the weight matrix of the first layer generator, T1 is the transpose of the weight matrix of the first layer generator, b1 is the first bias vector, α i is the key feature k′ in the key feature set i The relevant weight coefficient, r is the number of key features in the key feature set, and i is the sequence number of the key feature.

[0039] Specifically, the first noise vector is used to provide random input to the first layer generator. The first noise vector can be obtained by a random number generator or an existing library function. The weight matrix of the first layer generator is a parameter optimized by the training model, which is usually initialized to a random value by an initialization method such as Xavier, and is continuously adjusted during the training process.

[0040] In one embodiment, step S11, generating an initial virtual data set according to the key feature set by the first layer generator, may also include: generating the initial virtual data set according to the key feature set by the first layer generator based on the following formula:

[0041]

[0042] in, is the initial virtual data set, G1 is the first layer generator, v 1,i is the data in the initial virtual data set, s1 is the number of data in the initial virtual data set, and ∈1 is the added random noise term, which is used to make the generated initial virtual data set have the characteristics of preset risks, such as the characteristics of tax risks.

[0043] In one embodiment, the step S11 of generating an optimized virtual data set according to the initial virtual data set by the second layer generator includes:

[0044] The second-layer generator generates an optimized virtual dataset based on the initial virtual dataset and the following generating function of the second-layer generator:

[0045]

[0046] Where Z1 is the second noise vector sampled from the standard normal distribution, σ2 is the second nonlinear activation function, W2 is the weight matrix of the second layer generator, T2 is the transpose of the weight matrix of the second layer generator, b2 is the bias vector of the second layer generator, β j is the weight coefficient associated with the initial virtual data, v 1,j represents the data in the initial virtual data set, s1 is the number of data in the initial virtual data set, and j is the sequence number of the data in the initial virtual data set.

[0047] Step S12: classifying the initial virtual data set and the reference data set by a first discriminator to obtain a first classification result, and classifying the optimized virtual data set and the reference data set by a second discriminator to obtain a second classification result;

[0048] Among them, in one embodiment, the first layer generator and the first discriminator can constitute the first layer of Generative Adversarial Network (GAN), the second layer generator and the second discriminator can constitute the second layer of Generative Adversarial Network, and the first layer of Generative Adversarial Network and the second layer of Generative Adversarial Network can be collectively referred to as a two-layer adversarial network. The task of the generator is to generate virtual data (also known as sample data) that looks like reference data (such as real data) from random noise, and the task of the discriminator is to distinguish between the generated sample data and the real data. The two are trained together through an adversarial process. The generator continuously improves its ability to generate data to deceive the discriminator, and the discriminator continuously improves its recognition ability to accurately distinguish between the generated sample data and the real data. Ultimately, the adversarial network can generate highly realistic data, such as images, audio, or text.

[0049] In one embodiment, the step S12 classifies the initial virtual data set and the reference data set by a first discriminator to obtain a first classification result, including:

[0050] Through the first discriminator, based on the following formula, the first classification result is obtained:

[0051]

[0052] Where D1(x1) is the first classification result, x1 is the virtual data in the initial virtual data set, or the reference data in the reference data set, σ3 is the third nonlinear activation function, is the weight matrix of the first discriminator, T3 is the transpose of the weight matrix of the first discriminator, is the bias vector of the first discriminator. Specifically, the third nonlinear activation function may be, for example, a Sigmoid activation function.

[0053] In one embodiment, the step of classifying the optimized virtual data set and the reference data set by the second discriminator to obtain a second classification result in step S12 includes: obtaining the second classification result by the second discriminator based on the following formula:

[0054]

[0055] Where D2(x2) is the second classification result, x2 is the virtual data in the optimized virtual data set, or the reference data in the reference data set. is the weight matrix of the second discriminator, T4 is the transpose of the weight matrix of the second discriminator, is the bias vector of the second discriminator, and σ4 is the fourth nonlinear activation function.

[0056] Specifically, in one embodiment, the bias vector of the first discriminator is The bias vector of the second discriminator It is a parameter that is continuously optimized during training, and its initial value is usually set to zero or a random small value.

[0057] Step S13: optimizing the first layer generator and the second layer generator according to the first classification result and the second classification result to obtain a final virtual data set;

[0058] In one embodiment, step S13, optimizing the first layer generator and the second layer generator according to the first classification result and the second classification result to obtain the final virtual data set includes:

[0059] According to the first classification result and the second classification result, respectively calculate the loss function of the first layer generator and the second layer generator;

[0060] By minimizing the loss function of the first layer generator and the second layer generator, optimizing the first layer generator and the second layer generator to obtain an optimized first layer generator and an optimized second layer generator;

[0061] Based on the optimized first-layer generator and the optimized second-layer generator, the final virtual dataset is obtained.

[0062] Specifically, the loss function of the first layer generator can be expressed as:

[0063]

[0064] in, is the loss function of the first layer generator G1. The first term in the above formula represents the generated initial virtual data set. The probability of being recognized as true by the first discriminator D1, the second term in the above formula is the penalty term used for regularization. Specifically, Represents expectation: In the loss function, the expectation is used to calculate the probability that the data in the initial virtual data set generated by the first layer generator G1 is judged as real by the first discriminator D1. The expectation is to calculate the probability that the data in the initial virtual data set V G1 It is represented by the average value of all data in the generated initial virtual data set. Its function is to calculate the difference between the data in the generated initial virtual data set and the real data. v1 represents the data in the initial virtual data set, which is obtained from the initial virtual data set V G1 A data point extracted from is used as the input of the first discriminator D1 to determine whether it is consistent with the real data.i ‖ 2 is a regularization term used to constrain the weight of the first-layer generator G1. Specifically, W1 is the weight matrix of the first-layer generator G1, k′ i is the weight coefficient related to the key features in the key feature set. Among them, the regularization term avoids overfitting by controlling the size of the weight. Its role is to limit the growth of the weight and ensure the generalization ability of the model. λ1 is a regularization parameter, which is used to control the weight of the regularization term in the loss function of the first layer generator G1. By adjusting it, a balance can be achieved between the model's fitting ability and preventing overfitting.

[0065] In one embodiment, the loss function of the second layer generator can be expressed as:

[0066]

[0067] in, is the loss function of the second layer generator G2. The first term in the above formula represents the generated optimized virtual dataset. The probability of being recognized as true by the first discriminator D1, the second term in the above formula is the penalty term used for regularization. Specifically, Represents expectation: In the loss function, the expectation is used to calculate the probability that the data in the optimized virtual dataset generated by the first layer generator G1 is judged as real by the second discriminator D2. The expectation is to optimize the virtual dataset. It is represented by the average value of all data points in the optimized virtual data set. Its function is to calculate the difference between the data in the generated optimized virtual data set and the real data. v2 represents the data in the optimized virtual data set, which is obtained from the optimized virtual data set. A data point extracted from ||W2v is used as the input of the second discriminator D2 to determine whether it is consistent with the real data. 1,j || 2 is a regularization term used to constrain the weights of the second-layer generator G2. Specifically, W2 is the weight matrix of the second-layer generator G2, v 1,j Represents the data in the initial virtual data set. Among them, the regularization term avoids overfitting by controlling the size of the weight. Its role is to limit the growth of the weight and ensure the generalization ability of the model. λ2 is a regularization parameter, which is used to control the weight of the regularization term in the loss function of the second-layer generator G1. By adjusting it, a balance can be achieved between the model's fitting ability and preventing overfitting.

[0068] Specifically, in one embodiment, the first layer generator and the second layer generator can be continuously optimized by minimizing the loss functions of the first layer generator and the second layer generator, so that the optimized first layer generator and the second layer generator can generate final virtual data that is highly similar to the data in the reference data set, thereby obtaining an optimized first layer generator and an optimized second layer generator. and The final virtual dataset generated The distribution in the feature space is the smallest difference from the distribution of the data in the reference dataset. and Able to generate data Its characteristics can capture the data in the reference data set, for example, it can capture the potential characteristics of the real tax risk data, which is manifested in the closeness of the statistical distribution of the data in the final generated virtual data set to the real tax risk data.

[0069] In one embodiment, the step of optimizing the first layer generator and the second layer generator by minimizing the loss function of the first layer generator and the second layer generator to obtain an optimized first layer generator and an optimized second layer generator includes:

[0070] Based on the following formula, the first layer generator and the second layer generator are optimized by minimizing the loss function of the first layer generator and the second layer generator to obtain the optimized first layer generator and the optimized second layer generator:

[0071]

[0072] in, and They are the optimized first layer generator and the optimized second layer generator, G1 is the first layer generator, G2 is the second layer generator, is the loss function of the first layer generator, is the loss function of the second layer generator.

[0073] Step S14: optimizing the risk prediction model based on the final virtual data set to obtain an optimized risk prediction model;

[0074] In one embodiment, the risk prediction model is a transformer model. The transformer model is characterized by its self-attention mechanism that can effectively capture global dependencies and interactions between features when processing complex sequence data and high-dimensional feature data. This feature makes it more suitable for complex data generation tasks of generative adversarial networks (GANs) than other models (such as RNN, LSTM, CNN, etc.).

[0075] In one embodiment, step S14, the step of optimizing the risk prediction model based on the final virtual data set, comprises:

[0076] Based on the key feature set, a risk prediction model is constructed;

[0077] Initialize the risk prediction model for training;

[0078] Based on the final virtual data set, adversarial training is performed on the risk prediction model after initialization training to obtain an optimized risk prediction model.

[0079] Specifically, in one embodiment, the input of the risk prediction model can be expressed as:

[0080]

[0081] Among them, X i Represents the optimized key feature k′ i The embedding representation of , σ is the activation function used to introduce nonlinear features, is the transpose of the weight matrix of the risk prediction model, b k is the bias term, γ j With other features k′ j The relevant weight coefficient, Pos(X) is the position code, which identifies the relative position of the feature in the sequence;

[0082] Specifically, in one embodiment, the step of initializing the risk prediction model includes: initializing the risk prediction model according to minimizing the prediction loss function of the risk prediction model. T It can be expressed as:

[0083]

[0084] Among them, y i represents the true label, represents the predicted probability of the model, W T is the model weight matrix, α and β are regularization parameters used to prevent overfitting, X i represents the input feature vector, ||X i -X i-1 || 2 Represents the difference between adjacent eigenvectors.

[0085] Specifically, in one embodiment, y i Represents the risk label of each reference data in the historical data, such as the real tax risk label. These labels can be marked according to the actual tax data and can usually be obtained through historical tax reports, declaration records and other data. It is the probability value predicted by the model, which indicates the risk prediction probability of the model for the input data. It is calculated by the model during the training process based on the input feature vector. Model weight matrix W T It is the weight parameter updated by the model during training through optimization algorithms such as gradient descent. At the beginning of model training, the weight matrix is ​​usually initialized to a random value (such as Xavier or He initialization), and then continuously optimized and adjusted through back propagation and minimization of the loss function. Regularization parameters α and β are manually set hyperparameters used to control the impact of regularization terms, usually determined by cross-validation or experimental tuning. The purpose of regularization is to prevent the model from overfitting and to prevent the model from fitting the training data too complexly and being unable to generalize to new data. According to experimental results, adjusting the values ​​of regularization parameters α and β can find the best balance between preventing overfitting and maintaining model complexity. The input feature vector X i By the key feature set F k_opt Generate, which can contain various important features related to risk information such as tax risk, such as tax declaration records, market data, etc. When training the model, these features will be passed as input to the risk prediction model for processing and prediction. The difference between adjacent feature vectors ‖X i -X i-1 ‖ 2 It is a measure of the difference in the input feature vectors. It is mainly used to measure the change amplitude of continuous features in the input data. By proposing this item and adding it to the loss function, it can help the model better capture the relationship between features and prevent the model from making wrong predictions when the features change drastically.

[0086] In one embodiment, based on the final virtual data set, the step of performing adversarial training on the risk prediction model after initialization training to obtain an optimized risk prediction model may include:

[0087] Based on the adversarial training loss function and the final virtual data set, the risk prediction model after initialization training is subjected to adversarial training to obtain an optimized risk prediction model.

[0088] In one embodiment, the adversarial training loss function can be expressed as:

[0089]

[0090] Among them, L adv is the adversarial training loss function, λ adv is the weight coefficient of adversarial training, T GAN is the risk prediction model, v 2,j Represents the final virtual dataset The jth data entry, y jis the expected label of the data in the final virtual dataset, γ is the smoothness adjustment parameter, H i is the hidden layer output matrix in the risk prediction model, such as the Transformer model, and T is the corresponding matrix transpose.

[0091] The optimized risk prediction model can be expressed as:

[0092]

[0093] Among them, δ is the parameter that controls the overall optimization process, A l is the attention matrix used in the multi-head attention mechanism, L represents the number of layers of the risk prediction model, is the hidden layer output matrix of the risk prediction model.

[0094] Specifically, in one embodiment, the weight parameter δ of the overall optimization process is used to balance the optimization degree of the adversarial training loss and the multi-head attention mechanism. The value of this parameter is determined by experiments and tuning, and the value that makes the optimized risk prediction model perform best can be found by trying different values ​​multiple times. l The attention matrix is ​​dynamically calculated by the self-attention mechanism during model training to capture the correlation between input features. For example, in each layer of the Transformer structure, the attention matrix is ​​updated and optimized based on the input features, so this matrix is ​​part of the training process and is optimized through backpropagation and minimization of the loss function. The hidden layer output matrix of the model is Represents the hidden layer output of the ith feature in the lth layer of the Transformer model. It is the result calculated at each layer through forward propagation, specifically including the weight matrix of the layer and the weighted and activation function output of the input features. The number of layers L of the risk prediction model is the depth of the risk prediction model. Each layer contains an attention mechanism and a hidden layer output. The number of layers is usually determined when the model architecture is designed. Generally speaking, increasing the number of layers can improve the expressiveness of the risk prediction model, but it will also increase the computational complexity. This value is also determined through risk prediction model tuning and experiments. Usually, the optimal number of layers is selected after testing the performance of the risk prediction model under different numbers of layers.

[0095] In one embodiment, the method may further include step S15, obtaining a risk prediction result based on the optimized risk prediction model.

[0096] In one embodiment, step S15, obtaining a risk prediction result based on the optimized risk prediction model may include:

[0097] Using transfer learning technology, the new feature set is mapped to the optimized risk prediction model to obtain the transfer learning loss function;

[0098] By minimizing the transfer learning loss function, the optimized risk prediction model is adjusted to obtain the final risk prediction model;

[0099] According to the final risk prediction model, the risk prediction results are obtained.

[0100] The new feature set may be a feature set extracted from a new environment (eg, a new tax environment dataset) and similar to a reference dataset in the original environment.

[0101] Specifically, the transfer learning loss function can be expressed as:

[0102]

[0103] Among them, L trans is the transfer learning loss function, is the actual label in the new environment, To predict new data for risk prediction models The prediction results, is the embedding representation of the corresponding feature in the original environment, λ5 and λ6 are the weight parameters in the transfer learning process, which are used to control the balance between model prediction and adaptation to the new environment, respectively. new is the number of new data.

[0104] In one embodiment, the step of obtaining a risk prediction result according to the final risk prediction model includes:

[0105] Through the final risk prediction model, multiple high-risk scenarios are obtained;

[0106] Conduct simulation analysis on each high-risk scenario to obtain simulation analysis results;

[0107] Based on the simulation analysis results, a risk assessment report in the risk prediction results is obtained.

[0108] Specifically, high-risk tax scenarios can include various hypothetical situations that may cause serious tax problems, such as economic recession, market fluctuations, and the implementation of new tax laws.

[0109] Specifically, the risk assessment report may include, but is not limited to, at least one of the following: risk source analysis, potential impact assessment, and response strategy recommendations. Risk source analysis is used to identify the main factors that trigger high-risk scenarios, including drastic changes in economic indicators, deterioration of market conditions, or the promulgation of new tax regulations. Potential impact assessment is used to assess the potential impact of tax risks on the financial status of enterprises or individuals under high-risk scenarios, and to analyze the increased tax liabilities, increased cash flow pressure, or increased compliance risks that may result from these risks. Response strategy recommendations are based on the assessment results and propose corresponding response strategies, including adjusting the financial structure, planning tax payments in advance, negotiating with tax authorities, or taking legal measures to reduce or avoid risks.

[0110] The risk prediction method provided by the embodiment of the present application includes obtaining a key feature set associated with risk information from a reference data set; generating an initial virtual data set according to the key feature set by a first-layer generator, and generating an optimized virtual data set according to the initial virtual data set by a second-layer generator; classifying the initial virtual data set and the reference data set by a first discriminator to obtain a first classification result, and classifying the optimized virtual data set and the reference data set by a second discriminator to obtain a second classification result; optimizing the first-layer generator and the second-layer generator according to the first classification result and the second classification result to obtain a final virtual data set; optimizing the risk prediction model based on the final virtual data set to obtain an optimized risk prediction model; and obtaining a risk prediction result based on the optimized risk prediction model. Therefore, the present application adopts a two-layer generative adversarial network (i.e., a first-layer generator, a second-layer generator, a first discriminator, and a second discriminator) to generate an initial virtual data set and an optimized virtual data set, so as to effectively improve the accuracy and effectiveness of feature selection, and thus can achieve accurate and efficient risk prediction. In addition, in one embodiment, the present application can also make full use of the final virtual data set generated by the two-layer generative adversarial network through the Transformer model, conduct multi-level deep learning analysis, capture complex time series and spatial associations, and better identify potential risk patterns in the data. And maintain a high prediction accuracy in extreme or atypical scenarios. Moreover, in one embodiment, the present application can also use transfer learning technology to enable the optimized risk prediction model to quickly adapt to different environments and data changes. By mapping the data of the new environment to the feature space of the original risk prediction model and performing fine-tuning optimization, the risk prediction model can efficiently process new data and risk scenarios in different market environments, making the risk prediction model highly flexible and scalable, and able to maintain a high prediction accuracy and risk control capabilities when dealing with a globalized and changing environment.

[0111] Based on the same inventive concept as the above embodiments, an embodiment of the present invention provides a computing device, such as Figure 2 As shown, the computing device includes: a processor 310 and a memory 311 storing a computer program; wherein, Figure 2 The processor 310 shown in the figure is not used to indicate that the number of the processor 310 is one, but is only used to indicate the positional relationship of the processor 310 relative to other devices. In actual applications, the number of the processor 310 may be one or more; similarly, Figure 2 The memory 311 shown in the figure has the same meaning, that is, it is only used to refer to the position relationship of the memory 311 relative to other devices. In practical applications, the number of memories 311 can be one or more. When the processor 310 runs the computer program, the risk prediction method described above is implemented.

[0112] The computing device may also include: at least one network interface 312. The various components in the computing device are coupled together via a bus system 313. It is understood that the bus system 313 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 313 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 313 is not used in the example above. Figure 2 Various buses are labeled as bus system 313.

[0113] The memory 311 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. The nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory may be a disk memory or a tape memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAM bus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 311 described in the embodiments of the present invention is intended to include but is not limited to these and any other suitable types of memories.

[0114] The memory 311 in the embodiment of the present invention is used to store various types of data to support the operation of the computing device. Examples of these data include: any computer program used to operate on the computing device, such as an operating system and an application; contact data; phone book data; messages; pictures; videos, etc. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application program may include various applications, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. Here, the program that implements the method of the embodiment of the present invention may be included in the application program.

[0115] Based on the same inventive concept as the above-mentioned embodiment, this embodiment further provides a computer storage medium, in which a computer program is stored. The computer storage medium may be a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM) or other memory; it may also be various devices including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc. When the computer program stored in the computer storage medium is executed by the processor, the risk prediction method described above is implemented. For the specific steps implemented when the computer program is executed by the processor, please refer to Figure 1 The description of the illustrated embodiment will not be repeated here.

[0116] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0117] In this document, the terms "comprises," "comprising," or any other variations thereof, are intended to cover a non-exclusive inclusion of elements other than those listed and may also include additional elements not expressly listed.

[0118] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A risk prediction method, characterized in that: include: From the reference dataset, obtain a set of key features associated with risk information; Generate an initial virtual data set according to the key feature set by a first-layer generator, and generate an optimized virtual data set according to the initial virtual data set by a second-layer generator; Classifying the initial virtual data set and the reference data set by a first discriminator to obtain a first classification result, and classifying the optimized virtual data set and the reference data set by a second discriminator to obtain a second classification result; According to the first classification result and the second classification result, optimizing the first layer generator and the second layer generator to obtain a final virtual data set; Based on the final virtual data set, optimizing the risk prediction model to obtain an optimized risk prediction model; Based on the optimized risk prediction model, a risk prediction result is obtained.

2. The method according to claim 1, characterized in that The step of generating an initial virtual data set according to the key feature set by the first layer generator comprises: generating the initial virtual data set according to the key feature set by the first layer generator based on the generating function of the first layer generator of formula (1): Where z1 is the first noise vector sampled from a standard normal distribution, and F k_opt is the key feature set, σ1 is the first nonlinear activation function, W1 is the weight matrix of the first layer generator, T1 is the transpose of the weight matrix of the first layer generator, b1 is the first bias vector, α i is the key feature k in the key feature set i ' is the weight coefficient associated with, r is the number of the key features in the key feature set, i is the sequence number of the key feature; and / or The step of generating an optimized virtual data set according to the initial virtual data set by the second layer generator comprises: the second layer generator generates the optimized virtual data set according to the initial virtual data set based on the generating function of the second layer generator of formula (2): where Z2 is the second noise vector sampled from a standard normal distribution, is the initial virtual data set, σ2 is the second nonlinear activation function, W2 is the weight matrix of the second layer generator, T2 is the transpose of the weight matrix of the second layer generator, b2 is the bias vector of the second layer generator, β j is the weight coefficient associated with the initial virtual data set, v 1,j represents the data in the initial virtual data set, s1 is the number of data in the initial virtual data set, and j is the sequence number of the data in the initial virtual data set.

3. The method according to claim 1, characterized in that The step of classifying the initial virtual data set and the reference data set by a first discriminator to obtain a first classification result includes: obtaining the first classification result by the first discriminator based on formula (3): Wherein, D1(x1) is the first classification result, x1 is the data in the initial virtual data set, or the data in the reference data set, σ3 is the third nonlinear activation function, is the weight matrix of the first discriminator, T3 is the transpose of the weight matrix of the first discriminator, is the bias vector of the first discriminator; and / or The step of classifying the optimized virtual data set and the reference data set by a second discriminator to obtain a second classification result includes: obtaining the second classification result by the second discriminator based on formula (4): Wherein, D2(x2) is the second classification result, x2 is the data in the optimized virtual data set, or the data in the reference data set, σ4 is the fourth nonlinear activation function, is the weight matrix of the second discriminator, T4 is the transpose of the weight matrix of the second discriminator, is the bias vector of the second discriminator.

4. The method according to claim 1, characterized in that The step of optimizing the first layer generator and the second layer generator according to the first classification result and the second classification result to obtain a final virtual data set includes: According to the first classification result and the second classification result, respectively calculating the loss function of the first layer generator and the second layer generator; Optimizing the first layer generator and the second layer generator by minimizing the loss function of the first layer generator and the second layer generator to obtain an optimized first layer generator and an optimized second layer generator; Based on the optimized first layer generator and the optimized second layer generator, the final virtual data set is obtained.

5. The method according to claim 4, characterized in that The step of optimizing the first layer generator and the second layer generator by minimizing the loss function of the first layer generator and the second layer generator to obtain an optimized first layer generator and an optimized second layer generator comprises: Based on formula (5), the first layer generator and the second layer generator are optimized by minimizing the loss function of the first layer generator and the second layer generator to obtain the optimized first layer generator and the optimized second layer generator: in, and are the optimized first layer generator and the optimized second layer generator respectively, G1 is the first layer generator, G2 is the second layer generator, is the loss function of the first layer generator, is the loss function of the second layer generator.

6. The method according to claim 1, characterized in that Based on the final virtual data set, the step of optimizing the risk prediction model comprises: Based on the key feature set, construct the risk prediction model; Initializing the risk prediction model for training; Based on the final virtual data set, adversarial training is performed on the risk prediction model after initialization training to obtain an optimized risk prediction model.

7. The method according to claim 1, characterized in that The step of obtaining a risk prediction result based on the optimized risk prediction model comprises: Using transfer learning technology, mapping the new feature set to the optimized risk prediction model to obtain a transfer learning loss function; By minimizing the transfer learning loss function, adjusting the optimized risk prediction model to obtain a final risk prediction model; The risk prediction result is obtained according to the final risk prediction model.

8. The method according to claim 7, characterized in that The step of obtaining the risk prediction result according to the final risk prediction model comprises: Through the final risk prediction model, multiple high-risk scenarios are obtained; Performing simulation analysis on each of the high-risk scenarios to obtain simulation analysis results; Based on the simulation analysis results, a risk assessment report in the risk prediction results is obtained.

9. A computing device, characterized in that include: A processor and a memory storing a computer program, wherein when the processor runs the computer program, the risk prediction method according to any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the risk prediction method according to any one of claims 1 to 8 is implemented.