Training method and related device for enterprise violation risk prediction model
By expanding and optimizing enterprise contract data, using the adversarial network generated by the dual discriminator and the neural network model optimized by multi-dimensional sonic bats, the problem of low prediction accuracy of enterprise violation risk prediction models in the existing technology is solved, and high-accuracy violation risk prediction is achieved.
Patent Information
- Application Number
- CN202510147438.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-02-11
AI Technical Summary
Existing deep learning-based enterprise violation risk prediction models are limited by the scale and quality of training data, making it difficult to fully explore the complex semantics and logical associations in contract terms, resulting in low prediction accuracy.
An adversarial network algorithm model based on dual discriminator generation is used to expand corporate contract data, and feature extraction is performed through a neural network model optimized by multi-dimensional sonic bats to improve the scale and quality of training data, and then train the corporate violation risk prediction model.
It improves the prediction accuracy of the enterprise violation risk prediction model, can fully explore the complex semantics and logical associations in the contract terms, and achieve highly accurate violation risk judgment.
Smart Images

Figure CN119622525B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to a training method and related device for an enterprise violation risk prediction model. Background Art
[0002] With increasingly stringent corporate compliance requirements, contract management has become a crucial component of business operations. During the contract signing process, companies must comprehensively assess the compliance of contract terms to mitigate potential legal risks and operational losses. Traditional contract compliance reviews rely on manual processes, which are time-consuming and susceptible to subjective factors. This makes it difficult to address hidden risk clauses and potential violations within contracts.
[0003] In existing technologies, detection methods based on deep learning are constrained by the scale and quality of training data, making it difficult to fully explore the complex semantics and logical associations in contract terms. The trained enterprise violation risk prediction model has low prediction accuracy. Summary of the Invention
[0004] An embodiment of the present invention provides a training method and related devices for an enterprise violation risk prediction model to solve the problem that existing deep learning-based detection methods are restricted by the scale and quality of training data, making it difficult to fully explore the complex semantics and logical associations in contract terms, and the trained enterprise violation risk prediction model has low prediction accuracy.
[0005] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:
[0006] In a first aspect, an embodiment of the present invention provides a method for training an enterprise violation risk prediction model, comprising:
[0007] Acquiring enterprise contract data, and inputting the enterprise contract data into a pre-trained enterprise contract data expansion model to obtain expanded contract data;
[0008] Combining the enterprise contract data with the expanded contract data to obtain a first contract sample set;
[0009] Using a pre-trained feature extraction model to extract features from the first contract sample set, obtaining contract features for each contract sample in the first contract sample set; labeling the contract features according to the risk type of the contract sample, and combining all the labeled contract features to obtain a training feature set;
[0010] The classification model is trained using the training feature set to obtain an enterprise violation risk prediction model;
[0011] Among them: the enterprise contract data expansion model is obtained by training based on an adversarial network algorithm model generated based on a dual discriminator; the feature extraction model is obtained by training based on a neural network model optimized by multi-dimensional sonic bats.
[0012] Optionally, the training process of the enterprise contract data expansion model includes:
[0013] After completing the first round of training iteration for the adversarial network algorithm model, in each round of training iteration, the noise vector of the current round of training iteration is corrected according to the contract data generated by the adversarial network algorithm model that completed the previous round of training iteration.
[0014] Optionally, in the adversarial network algorithm model, one discriminator is used to judge the authenticity of the contract data generated by the adversarial network algorithm model, and another discriminator is used to judge the category distribution of the contract data generated by the adversarial network algorithm model.
[0015] Optionally, each time a training iteration is completed for the adversarial network algorithm model, it is verified whether the total number of current training iterations exceeds a preset iteration number threshold, and a verification result is obtained;
[0016] If the verification result indicates that the total number of current training iterations is less than the iteration number threshold, continue to perform the next round of training iterations on the adversarial network algorithm model;
[0017] If the verification result indicates that the total number of current training iterations is greater than or equal to the iteration number threshold, the next round of iterative training is stopped, and the adversarial network algorithm model after this training iteration is used as the enterprise contract data expansion model.
[0018] Optionally, the feature extraction model training method includes:
[0019] After completing one training iteration for each pair of the neural network models, determining whether the neural network models after this training iteration meet the convergence conditions, and obtaining a determination result;
[0020] If the judgment result indicates that the convergence condition is not met, continuing to perform the next round of training iteration on the neural network model;
[0021] If the judgment result indicates that the convergence condition is met, stopping the next round of iterative training, and using the neural network model after this training iteration as the feature extraction model;
[0022] The convergence condition is expressed as follows:
[0023]
[0024] Where, is the maximum value of all parameter and bias updates in the neural network model; is the convergence threshold hyperparameter.
[0025] Optionally, the feature extraction model training method includes:
[0026] In the multidimensional sound wave modulation step, the sound wave properties of each parameter in the neural network are modified based on the performance of the neural network after the most recent training iteration.
[0027] The expression of the correction process is as follows:
[0028]
[0029] Where, is the parameter of the neural network in the The frequency of the iteration; is the parameter of the neural network in the The frequency of the iteration; is the partial derivative of the loss function of the neural network with respect to the weight parameter; is the loss function of the neural network; is the frequency regulation rate; is the parameter of the neural network in the The frequency update increment for each iteration.
[0030] In a second aspect, an embodiment of the present invention provides a training device for an enterprise violation risk prediction model, comprising:
[0031] An expansion module, configured to obtain enterprise contract data and input the enterprise contract data into a pre-trained enterprise contract data expansion model to obtain expanded contract data;
[0032] a combining module, configured to combine the enterprise contract data and the extended contract data to obtain a first contract sample set;
[0033] a feature extraction module configured to extract features from the first contract sample set using a pre-trained feature extraction model to obtain contract features for each contract sample in the first contract sample set; label the contract features according to the risk type of the contract sample; and combine all the labeled contract features to obtain a training feature set;
[0034] A training module is used to train the classification model using a training feature set to obtain an enterprise violation risk prediction model;
[0035] Among them: the enterprise contract data expansion model is obtained by training based on an adversarial network algorithm model generated based on a dual discriminator; the feature extraction model is obtained by training based on a neural network model optimized by multi-dimensional sonic bats.
[0036] In a third aspect, an embodiment of the present invention provides an electronic device comprising a processor, a memory, and a program or instruction stored on the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps in the method for training an enterprise violation risk prediction model as described in any one of the first aspects.
[0037] In a fourth aspect, an embodiment of the present invention provides a readable storage medium storing a program or instruction, which, when executed by a processor, implements the steps in the method for training an enterprise violation risk prediction model as described in any one of the first aspects.
[0038] In a fifth aspect, an embodiment of the present invention provides a computer program product comprising computer instructions, which, when executed by a processor, implement the steps of the method for training an enterprise violation risk prediction model as described in any one of the first aspects.
[0039] In an embodiment of the present invention, the enterprise contract data is obtained and input into a pre-trained enterprise contract data expansion model to obtain the expanded contract data; the enterprise contract data and the expanded contract data are combined to obtain a first contract sample set; the pre-trained feature extraction model is used to extract features from the first contract sample set to obtain the contract features of each contract sample in the first contract sample set; the contract features are labeled according to the risk type of the contract sample, and all the labeled contract features are combined to obtain a training feature set; the classification model is trained using the training feature set to obtain an enterprise violation risk prediction model; wherein: the enterprise contract data expansion model is trained based on an adversarial network algorithm model generated based on a dual discriminator; the feature extraction model is trained based on a neural network model optimized by a multi-dimensional sonic bat It is found that the enterprise contract data expansion model obtained by training according to the adversarial network algorithm model generated based on the dual discriminator realizes the expansion of enterprise contract data and increases the scale of training data; and, the feature extraction model obtained by training according to the neural network model optimized by multi-dimensional sonic bats is used to extract features of the first contract sample set, and the training feature set is obtained by labeling based on the extracted contract features, thereby improving the quality of the training data (i.e., the training feature set) used to train the classification model, and thus improving the classification model's recognition accuracy of the sample features. The trained enterprise violation risk prediction model can fully explore the complex semantics and logical associations in the contract terms, and thus obtain accurate violation risk prediction results. The present invention can train an enterprise violation risk prediction model that can make high-accuracy judgments on enterprise contract risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0041] Figure 1 Schematic diagram of the process of training a model for predicting enterprise violation risks according to an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of the principle of a deep learning-based enterprise compliance violation prediction and early warning method;
[0043] Figure 3 This is a block diagram of the principle of the training device for the enterprise violation risk prediction model;
[0044] Figure 4 This is a principle block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0046] The terms "first", "second", etc. in the embodiments of the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "or" in the embodiments of the present invention represents at least one of the connected objects. For example, "A or B" covers three options, namely, Option 1: including A but not including B; Option 2: including B but not including A; Option 3: including both A and B. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0047] In the technical solutions of the embodiments of the present invention, words such as “connect”, “couple” or “connected” are not limited to physical or mechanical connections, but may include electrical connections.
[0048] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0049] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, and storage of personal information involved in the technical solutions of the embodiments of the present invention all comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken with respect to personal information to prevent unauthorized access to personal information data and maintain personal information security and network security.
[0050] The embodiment of the present invention provides a training method for an enterprise violation risk prediction model, see Figure 1 As shown, Figure 1 The following is a flow chart of a method for training an enterprise violation risk prediction model according to an embodiment of the present invention, including:
[0051] Step 11: Obtain enterprise contract data and input the enterprise contract data into the pre-trained enterprise contract data expansion model to obtain expanded contract data;
[0052] Step 12: Combine the enterprise contract data and the expanded contract data to obtain a first contract sample set;
[0053] Step 13: Use the pre-trained feature extraction model to extract features from the first contract sample set to obtain contract features for each contract sample in the first contract sample set; label the contract features according to the risk type of the contract sample, and combine all the labeled contract features to obtain a training feature set;
[0054] Step 14: Use the training feature set to train the classification model to obtain an enterprise violation risk prediction model;
[0055] Among them: the enterprise contract data expansion model is trained based on the adversarial network algorithm model generated by the dual discriminator; the feature extraction model is trained based on the neural network model optimized by multi-dimensional sonic bats.
[0056] In the embodiment of the present invention, the enterprise contract data is real contract data that is collected, and the enterprise contract data can be obtained from a storage medium that stores the enterprise contract data.
[0057] In this embodiment of the present invention, contract risk types can include at least one of the following: contract violation terms, risk clause identification, asymmetry between obligations and rights, and normality. Each type of labeling is defined by compliance experts based on current laws, regulations, and industry standards, and a multi-level review mechanism is implemented to ensure the accuracy and consistency of the labeled data.
[0058] It can be understood that the classification model in the embodiment of the present invention is a multi-classification model.
[0059] It should be noted that the structure of the dual discriminator generative adversarial network includes the following core components:
[0060] ① Generator
[0061] Input: Noise vector.
[0062] Structure: 5-layer fully connected neural network, activation function is LeakyReLU activation function.
[0063] Function: Map noise vector to synthetic contract data.
[0064] ②The first discriminator (authenticity discriminator)
[0065] Input: real contract data or generated data.
[0066] Structure: 4-layer convolutional neural network, the activation function is LeakyReLU activation function, and the output is a scalar probability value.
[0067] Function: Determine whether the input data is real data or generated data.
[0068] ③The second discriminator (category distribution discriminator)
[0069] Input: real contract data or generated data.
[0070] Structure: The first three convolutional layers are shared with the first discriminator, and the last layer is replaced by a fully connected layer and a Softmax function, and the output is a category probability distribution.
[0071] Function: Predict the risk category distribution of input data and constrain the category rationality of generated data.
[0072] In some embodiments of the present invention, optionally, the training process of the enterprise contract data expansion model includes:
[0073] 1) Initialize the network parameters of the generator and discriminator of the generative adversarial network to solve the initial weight and bias setting problem of the model and ensure the effectiveness and stability of subsequent training. are the initial parameters of the generator, are the initial parameters of the discriminator, which are initialized randomly and follow a normal distribution with a mean of 0 and a variance of the unit matrix.
[0074] 2) Adaptively adjust the input noise. The discriminator dynamically corrects the noise vector by monitoring the quality of the enterprise contract data generated in the previous iteration (starting from the second iteration). This solves the problem that the generator is prone to falling into local optimality and the lack of diversity in enterprise contract data. The quality of the generated enterprise contract data is continuously improved during the training process, which can be expressed as:
[0075]
[0076] Furthermore, the noise vector is updated according to the gradient, and the calculation method is expressed as:
[0077]
[0078] Where, is the gradient calculation function of the discriminator loss with respect to the noise vector, For the The noise vector at the iteration. The noise vector is a set of random numbers input to the generator in the generative adversarial network, which is used to guide the generator to create diverse synthetic data that is similar to the distribution of real data; are the parameters of the discriminator, For the The noise vector at the iteration, is the learning rate for the noise vector update, is the discriminator function, is the generator function, The loss function for the discriminator to distinguish the authenticity of real and generated enterprise contract data, is the symbol of partial derivative, is a binary classification label (the real enterprise contract data label is 1, and the generated enterprise contract data label is 0). Set to 0.3.
[0079] 3) The generated enterprise contract data is mixed with the real enterprise contract data. By setting the mixing ratio, the problem of category imbalance during model training and the problem of model overfitting caused by a single enterprise contract data source are solved. This allows for more comprehensive and balanced training of the discriminator and improves the discriminator's accuracy. The calculation method is expressed as:
[0080]
[0081] Where, For mixed enterprise contract data, Enterprise contract data generated by the generator, For real enterprise contract data, is a mixing ratio parameter. In some embodiments, preferably, Set to 0.3.
[0082] 4) Analyze and verify the topological characteristics of the generated enterprise contract data. By adopting a topological enterprise contract data analysis method, the consistency problem of high-dimensional enterprise contract data in the real topological structure is solved, making the internal structure of the enterprise contract data more similar to the real enterprise contract data. The topological enterprise contract data analysis method calculates the topological loss function based on the Wasserstein distance, and calculates the minimum cost required to convert the probability distribution of the enterprise contract data generated by the generator into the probability distribution of the real enterprise contract data. In other words, it finds the optimal mapping between the distribution of the enterprise contract data generated by the generator and the real enterprise contract data. The calculation method is expressed as:
[0083]
[0084] Furthermore, the generator is updated in combination with the topological loss, and the update method is expressed as:
[0085]
[0086] Where, is the function for calculating Wasserstein distance, It is the probability density function, which is used to characterize the distribution of generated data and real data. Specifically, it estimates the probability density of the distribution by performing kernel density estimation (KDE) on the data samples. is the topological loss, To balance the hyperparameters of the general quality and topological quality of generated enterprise contract data, For the The parameters of the generator at the iteration, For the The parameters of the generator at the iteration, represents the gradient with respect to the generator parameters, is the learning rate updated by the generator, is the authenticity loss function of the generator. Preferably, Set to 0.3, Set to 0.01.
[0087] 5) A dual discrimination process is implemented using two discriminators. The first discriminator determines the authenticity of the enterprise contract data, while the second discriminator determines the category distribution of the enterprise contract data. The KL divergence is used to measure the difference between the true category distribution and the generated enterprise contract data category distribution. This solves the problem of the model being unable to strike a balance between the authenticity and category accuracy of the generated enterprise contract data. The calculation method is expressed as:
[0088]
[0089] Furthermore, the KL divergence of the category distribution is used to improve the discrimination effect. The calculation method is expressed as:
[0090]
[0091] Where, is the loss function of the discriminator regarding the authenticity of enterprise contract data, is the discriminator balance coefficient, is the loss function of the discriminator for category discrimination, is the total number of categories, is a positive integer, is the true category distribution in The probability of the categories, Predict the category distribution for the discriminator in The probability of each category. Preferably, Set to 0.3.
[0092] 6) A feature matching constraint is used in the generator’s loss function to ensure that the generated enterprise contract data is consistent with the real enterprise contract data in the learnable feature space. This solves the problem of pattern collapse that may result from relying solely on the discriminator’s authenticity judgment, and improves the authenticity and diversity of enterprise contract data at the feature level. The calculation method is expressed as:
[0093]
[0094] Where, is the authenticity loss function of the generator, The middle layer of the generator is used to extract the intermediate features of enterprise contract data; is the L2 norm, which is used to measure the degree of feature difference.
[0095] 7) Based on the feedback from the dual discriminator, the training strategies of the generator and discriminator are dynamically optimized to solve the problem of difficult selection of learning rate and loss function weights during model training. The weight parameters are dynamically adjusted for different training stages to improve the overall convergence speed and accuracy. The discriminator parameters are updated based on the monitoring of the discriminator's authenticity and category loss. The calculation method is expressed as:
[0096]
[0097] Where, are the discriminator parameters, is the number of iterations, is the learning rate updated by the discriminator, is the gradient of the loss function with respect to the discriminator parameters, For the The parameters of the discriminator at the iteration, For the The parameters of the discriminator at the iteration. Preferably, Set to 0.3.
[0098] 8) Repeat the above steps until a preset stop iteration condition is met, indicating that the model training is complete. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.
[0099] After the enterprise contract data expansion model is trained, the trained enterprise contract data expansion model is used to increase the number of samples. In some optional embodiments, assuming that the original collected samples are 800 and the enterprise contract data expansion model generates 200 samples through expansion, the expanded enterprise contract data set will contain 1000 samples.
[0100] The deep learning model unit automatically identifies potential violations in contracts through deep learning models.
[0101] The present invention adopts a 5-layer fully connected neural network (i.e., the neural network model in the embodiment of the present invention) as a deep learning model to perform feature extraction of enterprise contract data (i.e., feature extraction of the first contract sample set in the embodiment of the present invention). Compared with the traditional few-layer (less than 3 layers) neural network design, the multi-layer (more than 3 layers) neural network structure is more conducive to capturing the complex features of enterprise contract data, such as the hierarchical nature of contract terms and the implicit associations between clauses. However, deep networks may encounter problems such as gradient vanishing, gradient exploding, or falling into local optimal solutions, affecting the stability of training and model performance.
[0102] In the existing technology, the back propagation neural network is often optimized based on the bat algorithm, and the bat optimization algorithm is used to optimize the neural network parameters, thereby realizing the neural network model to process enterprise contract data;
[0103] However, traditional bat algorithms, which rely on a single acoustic wave attribute (such as frequency) for search, struggle to adapt to the optimization requirements of high-dimensional and complex parameter spaces. The present invention proposes a neural network algorithm based on multidimensional acoustic bat optimization (i.e., a feature extraction model trained using a multidimensional acoustic bat optimization neural network model) to extract features from enterprise contract data. During neural network training, a multidimensional acoustic wave dynamic modulation method is used to expand acoustic wave attributes into four dimensions: frequency, amplitude, wavelength, and phase. These attributes are dynamically adjusted to achieve a more refined search, enhancing the algorithm's search flexibility in high-dimensional parameter spaces. This avoids the problem of traditional algorithms being trapped in local optimality due to a single search strategy. When extracting features from high-dimensional, highly heterogeneous samples such as enterprise contract data, the accuracy and efficiency of feature extraction can be effectively improved. Furthermore, the present invention utilizes a global resonance detection mechanism to compensate for the traditional bat algorithm's lack of perception of global coupling effects. By analyzing the phase and wavelength relationship between parameters, the algorithm enhances its optimization capability for global objectives, further improving search stability and efficiency.
[0104] In some embodiments of the present invention, optionally, the training process of the feature extraction model is as follows:
[0105] A1. Randomly initialize each parameter and bias in the neural network and equip each parameter with a multidimensional acoustic wave model to support subsequent dynamic modulation of multidimensional attributes, effectively cover the initial search space, and address the local optimal trap that may occur in the feature extraction of enterprise contract data. The initialization method is expressed as follows:
[0106]
[0107]
[0108] Where, is the value of the neural network weight parameter at the initial moment; is the value of the neural network bias parameter at the initial moment; is the variance hyperparameter of the neural network parameters; Indicates that it obeys a specific distribution; The mean is 0 and the variance is Normal distribution; represents a normal distribution. Preferably, Set to 0.1.
[0109] Furthermore, in order to track and update the multidimensional acoustic wave features of each parameter during the neural network training process, the acoustic wave feature vector is initialized and expressed as:
[0110]
[0111] Where, is the acoustic wave feature vector of the neural network parameters; is the initial frequency; is the initial amplitude, is the initial wavelength, is the initial phase. Preferably, the initial values of the acoustic wave feature vectors of the neural network parameters are all from a mean of 0 and a variance of is obtained from the normal distribution of .
[0112] A2. In the multi-dimensional sound wave modulation phase, the sound wave properties of each parameter are dynamically adjusted based on the current performance feedback of the neural network to solve the problem of fine control of the search direction and range by the bat algorithm, which is expressed as:
[0113]
[0114] Where, is the neural network parameter in The frequency of the iteration; is the neural network parameter in The frequency of the iteration; is the partial derivative of the loss function of the neural network with respect to the weight parameters; is the loss function of the neural network; is the frequency regulation rate; is the weight parameter of the neural network; is the neural network parameter in The frequency update increment is updated at each iteration. Preferably, the loss function of the neural network adopts cross-entropy loss, and the class probability is calculated for the enterprise contract data feature vector extracted by the neural network using a preset Softmax function, and then the cross-entropy loss function is used to calculate the loss function. The loss function measures the ability of the neural network model to extract contract data features. For example, when the enterprise contract data feature vector is extracted by the neural network using the preset Softmax function, the loss function calculates the degree of inconsistency between the extracted features and the actual category labels. During the training process, the optimization algorithm adjusts the model parameters according to the gradient of the loss function, gradually reducing the gap between the prediction and the actual, thereby extracting contract data features that better meet the semantic requirements.
[0115] Furthermore, the calculation of the frequency adjustment rate depends on the gradient of the current loss function, and the calculation method is expressed as:
[0116]
[0117] Where, is a hyperparameter that controls the slope of the curve. Preferably, Set to 0.1.
[0118] Furthermore, in order to link the amplitude, wavelength, and phase of the modulated sound wave so that the search process can balance global and local exploration, the update method is expressed as:
[0119]
[0120]
[0121]
[0122] Where, is the neural network parameter in The amplitude at the iteration; is the neural network parameter in The amplitude at the iteration; is the neural network parameter in The amplitude update increment at the iteration; is the neural network parameter in The wavelength at the iteration; is the neural network parameter in The wavelength at the iteration; is the neural network parameter in The phase at the iteration; is the neural network parameter in The phase at the iteration; is a symbolic function; is the modulation rate of the amplitude; is the wavelength modulation rate; is the modulation rate of the phase. Preferably, Set to 0.1, Set to 0.2, Set to 0.1.
[0123] Furthermore, an adaptive spectrum decomposition method is used in the multi-dimensional sound wave modulation process to dynamically decompose and reconstruct the spectrum characteristics of the sound wave signal to avoid the neural network parameters from falling into the local optimum. Based on the decomposition and reconstruction of the sound wave spectrum, a refined search is achieved. The calculation method is expressed as:
[0124]
[0125] Where, is the spectrum decomposition function of the current frequency and amplitude of the neural network parameters; is the number of decomposed sub-bands; For the The frequency of the sub-band, For the The amplitude of each sub-band, is a positive integer; is the frequency parameter of the bat algorithm; is the index of the sub-band; is the amplitude parameter of the bat algorithm.
[0126] Furthermore, the decomposition results are adaptively weighted and integrated to calculate the updated increments of frequency and amplitude. The calculation method is expressed as:
[0127]
[0128]
[0129] Where, The frequency parameter is The weight of each sub-band, is a positive integer; The amplitude parameter is The weight of each sub-band.
[0130] Furthermore, the frequency and amplitude parameters have an important influence on the The weights of the sub-bands are used to adaptively weigh The effectiveness of the sub-band in the loss function constraint is calculated as follows:
[0131]
[0132]
[0133] Where, The frequency parameter is The influence of the weight of each sub-band on the hyperparameter, is a positive integer; The amplitude parameter is The influence of the weight of each sub-band on the hyperparameter; is a natural exponential function. Preferably, Set to 0.1, Set to 0.5.
[0134] A3. In the global resonance detection phase, the interaction strength between parameters is evaluated and adjusted so that each parameter can fully utilize the global coupling effect brought about by phase interaction during the search process, perceive the overall distribution of the parameter set, and improve search stability. The global resonance detection mechanism can compensate for the shortcomings of traditional neural network algorithms in perceiving global coupling effects and enhance the collaborative optimization capabilities of neural network parameters. For example, by analyzing the interactions between various features in enterprise contract data, neural networks can more accurately extract the implicit semantics and logical structure in enterprise contract data, ensure search flexibility in high-dimensional complex spaces, and make the model's representation of contract data more refined. The calculation method is expressed as:
[0135]
[0136] Where, is the phase parameter of the bat algorithm; is the resonance adjustment term of the neural network parameters; is the phase parameter of the bat algorithm of the previous iteration; A factor to weight the relative distance for parameter adjustment; is the wavelength parameter of the bat algorithm; is the wavelength parameter of the Bat Algorithm of the previous iteration. Preferably, the wavelength parameter of the Bat Algorithm is the same as the index of the iteration number.
[0137] Furthermore, the factor that weights the relative distance of parameter adjustment is adjusted based on the relative position and performance impact of the parameters during the iterative training process, and is calculated as follows:
[0138]
[0139] Where, is the L2 norm; is the weight parameter of the neural network; is the weight parameter of the previous iteration of the neural network; is the attenuation scale parameter. Preferably, Set to 0.95.
[0140] A4. In the echo intensity evaluation phase, the quality of parameter configuration is evaluated by mapping the relationship between the sound wave amplitude and the loss function value. This solves the problem of objectively measuring the current search status and directly confirms the quality of parameters based on the sound wave reflection intensity. The calculation method is expressed as:
[0141]
[0142] Where, is the echo loss; is the neural network parameter in The amplitude at the iteration; Indicates the maximum value among all current amplitudes.
[0143] A5. In the parameter resonance tuning phase, the coordination of related parameters is enhanced according to the resonance detection results to fully utilize the synergy between parameters and improve the search efficiency, so as to achieve rapid convergence in the local area. The calculation method is expressed as:
[0144]
[0145]
[0146] Where, For the neural network The weight parameter at the iteration, For the neural network Bias parameter at iteration; is the first hyperparameter of the tuning step; is the second hyperparameter of the tuning step size; Update the influence term for the bias parameters of the neural network; is the resonance adjustment term of the neural network parameters; is the global and local exploration function. Preferably, Set to 0.05, Set to 0.3.
[0147] A6. In the dynamic position update and multi-channel exploration phase, the position of the parameters is updated simultaneously in multiple directions, and additional displacement is provided by combining the characteristics of the sound wave. By calculating the update influence terms of the neural network weights and biases, a full search for potential optimal solutions is achieved in the high-dimensional space, taking into account both global and local exploration in the complex parameter space. The calculation method is expressed as:
[0148]
[0149]
[0150] Where, is the gradient of the echo loss with respect to the neural network weights; is the gradient of the echo loss with respect to the bias of the neural network; is the learning rate for updating based on the echo loss, The step size for updating the acoustic wave characteristics; is the additional update amount for the neural network weights; is the additional update amount of the neural network bias. Preferably, Set to 0.001, Set to 0.01.
[0151] Furthermore, the calculation method of the additional update amount of the neural network weight and the additional update amount of the neural network bias is expressed as:
[0152]
[0153]
[0154] Where, is the step size for this additional displacement, preferably, Set to 0.01. is the amplitude parameter of the bat algorithm; is the wavelength parameter of the bat algorithm; is the phase parameter of the bat algorithm.
[0155] A7. Determine whether the search has reached convergence by monitoring the parameter update amplitude. If the neural network training reaches convergence, stop the iteration. Determine the convergence state of the training by monitoring the parameter update amplitude and set the convergence threshold hyperparameter. This ensures that the model can converge stably and efficiently in scenarios with heterogeneous enterprise contract data and high noise. The convergence condition is expressed as:
[0156]
[0157] Where, is the maximum value of all parameter and bias updates; is the convergence threshold hyperparameter, preferably, Set to .
[0158] After the neural network training is completed, the trained neural network is used to extract features from the enterprise contract data. Furthermore, the feature-extracted data is input into the preset Softmax function to calculate the class probability, and the class with the largest class probability is taken as the final prediction class, such as: contract violation words, risk clause identification, asymmetry of obligations and rights, and normal class.
[0159] In an embodiment of the present invention, the enterprise contract data is obtained and input into a pre-trained enterprise contract data expansion model to obtain the expanded contract data; the enterprise contract data and the expanded contract data are combined to obtain a first contract sample set; the pre-trained feature extraction model is used to extract features from the first contract sample set to obtain the contract features of each contract sample in the first contract sample set; the contract features are labeled according to the risk type of the contract sample, and all the labeled contract features are combined to obtain a training feature set; the classification model is trained using the training feature set to obtain an enterprise violation risk prediction model; wherein: the enterprise contract data expansion model is trained based on an adversarial network algorithm model generated based on a dual discriminator; the feature extraction model is trained based on a neural network model optimized by a multi-dimensional sonic bat It is found that the enterprise contract data expansion model obtained by training according to the adversarial network algorithm model generated based on the dual discriminator realizes the expansion of enterprise contract data and increases the scale of training data; and, the feature extraction model obtained by training according to the neural network model optimized by multi-dimensional sonic bats is used to extract features of the first contract sample set, and the training feature set is obtained by labeling based on the extracted contract features, thereby improving the quality of the training data (i.e., the training feature set) used to train the classification model, and thus improving the classification model's recognition accuracy of the sample features. The trained enterprise violation risk prediction model can fully explore the complex semantics and logical associations in the contract terms, and thus obtain accurate violation risk prediction results. The present invention can train an enterprise violation risk prediction model that can make high-accuracy judgments on enterprise contract risks.
[0160] In some embodiments of the present invention, optionally, the training process of the enterprise contract data expansion model includes:
[0161] After the first round of training iteration of the adversarial network algorithm model is completed, in each round of training iteration, the noise vector of the current training iteration is corrected according to the contract data generated by the adversarial network algorithm model that completed the previous round of training iteration.
[0162] It should be noted that the noise vector is a set of random numbers input to the generator in the generative adversarial network, which is used to guide the generator to create diverse synthetic data that is similar to the distribution of real data.
[0163] After the first training iteration of the adversarial network algorithm model is completed, in each training iteration, that is, in each training iteration starting from the second training iteration, it is understandable that for the first training iteration, there is no previous training iteration.
[0164] To illustrate with a specific example, as described above, the training process of the enterprise contract data expansion model includes:
[0165] 2) Adaptively adjust the input noise. By monitoring the quality of the enterprise contract data generated in the previous iteration (starting from the second iteration), the noise vector is dynamically corrected to address the problems of the generator easily falling into local optimality and insufficient diversity of enterprise contract data. The quality of the generated enterprise contract data is continuously improved during the training process, which can be expressed as:
[0166]
[0167] Furthermore, the noise vector is updated according to the gradient, and the calculation method is expressed as:
[0168]
[0169] Where, is the gradient calculation function of the discriminator loss with respect to the noise vector, For the The noise vector at the iteration, are the parameters of the discriminator, For the The noise vector at the iteration, is the learning rate for the noise vector update, is the discriminator function, is the generator function, The loss function for the discriminator to distinguish the authenticity of real and generated enterprise contract data, is a binary classification label (the real enterprise contract data label is 1, and the generated enterprise contract data label is 0). Set to 0.3.
[0170] In an embodiment of the present invention, after completing the first round of training iterations of the adversarial network algorithm model, in each round of training iterations, the noise vector of the current round of training iterations is corrected according to the contract data generated by the adversarial network algorithm model that completed the previous round of training iterations, thereby guiding the training process, effectively avoiding the problem of the generator easily falling into local optimality during the training process, and ensuring that the enterprise contract data expansion model obtained through training can be expanded to obtain diverse expanded contract data.
[0171] In some embodiments of the present invention, optionally, in the adversarial network algorithm model, one discriminator is used to determine the authenticity of the contract data generated by the adversarial network algorithm model, and another discriminator is used to determine the category distribution of the contract data generated by the adversarial network algorithm model.
[0172] In the embodiment of the present invention, in the above-mentioned adversarial network algorithm model, one discriminator is used to determine the authenticity of the contract data generated by the adversarial network algorithm model, and another discriminator is used to determine the category distribution of the contract data generated by the adversarial network algorithm model. In this embodiment of the present invention, the KL divergence is further used to measure the difference between the true category distribution and the category distribution of the generated enterprise contract data, thereby solving the problem that the model is difficult to balance between the authenticity and category accuracy of the generated enterprise contract data. The calculation method is expressed as follows:
[0173]
[0174] Furthermore, the KL divergence of the category distribution is used to improve the discrimination effect. The calculation method is expressed as:
[0175]
[0176] Where, is the loss function of the discriminator regarding the authenticity of enterprise contract data, is the discriminator balance coefficient, is the loss function of the discriminator for category discrimination, is the total number of categories, is a positive integer, is the true category distribution in The probability of the categories, Predict the category distribution for the discriminator in The probability of each category. Preferably, Set to 0.3.
[0177] In some embodiments of the present invention, optionally, each pair of adversarial network algorithm models completes one training iteration, and checks whether the total number of current training iterations exceeds a preset iteration number threshold to obtain a verification result;
[0178] If the verification result indicates that the total number of current training iterations is less than the iteration number threshold, the adversarial network algorithm model will continue to undergo the next round of training iterations.
[0179] If the verification result indicates that the total number of current training iterations is greater than or equal to the iteration threshold, the next round of iterative training is stopped, and the adversarial network algorithm model after this training iteration is used as the enterprise contract data expansion model.
[0180] It should be noted that the iteration threshold is set by the user based on actual needs. In the embodiment of the present invention, by setting the iteration threshold and completing one training iteration for each pair of adversarial network algorithm models, verifying whether the total number of training iterations exceeds the preset iteration threshold, and obtaining a verification result; if the verification result indicates that the total number of training iterations is less than the iteration threshold, the adversarial network algorithm model continues to undergo the next round of training iterations; if the verification result indicates that the total number of training iterations is greater than or equal to the iteration threshold, the next round of training iterations is stopped, and the adversarial network algorithm model after the current training iteration is used as the enterprise contract data expansion model. This embodiment of the present invention achieves control over model training iterations, avoids excessive training repetition, and is conducive to improving training efficiency.
[0181] In some embodiments of the present invention, optionally, the feature extraction model training method includes:
[0182] Each pair of neural network models completes one training iteration, and determines whether the neural network model after this training iteration meets the convergence conditions, and obtains the judgment result;
[0183] If the judgment result indicates that the convergence condition is not met, the neural network model is continued to be trained for the next round of iterations;
[0184] If the judgment result indicates that the convergence condition is met, the next round of iterative training is stopped, and the neural network model after this training iteration is used as the feature extraction model;
[0185] The expression of the convergence condition is as follows:
[0186]
[0187] Where, is the maximum value of all parameter and bias updates in the neural network model; is the convergence threshold hyperparameter.
[0188] In an embodiment of the present invention, a training iteration is completed for each pair of neural network models, and whether the neural network model after this training iteration meets the convergence condition is judged to obtain a judgment result; if the judgment result indicates that the convergence condition is not met, the neural network model continues to be trained for the next round of iterations; if the judgment result indicates that the convergence condition is met, the next round of iterative training is stopped, and the neural network model after this training iteration is used as the feature extraction model; the embodiment of the present invention realizes the control of model training iteration, can avoid excessive repetition of training, and is conducive to improving training efficiency.
[0189] In some embodiments of the present invention, optionally, the feature extraction model training method includes:
[0190] In the multi-dimensional sound wave modulation phase, the sound wave properties of each parameter in the neural network are modified based on the performance of the neural network after the most recent training iteration.
[0191] The expression for the correction processing is as follows:
[0192]
[0193] Where, is the parameter in the neural network The frequency of the iteration; is the parameter in the neural network The frequency of the iteration; is the partial derivative of the loss function of the neural network with respect to the weight parameters; is the loss function of the neural network; is the frequency regulation rate; is the parameter in the neural network The frequency update increment for each iteration.
[0194] Specifically in the embodiment of the present invention, the sound wave attribute includes frequency.
[0195] In some embodiments of the present invention, optionally, the loss function of the neural network adopts cross-entropy loss, and the class probability calculation is performed on the enterprise contract data feature vector extracted by the neural network through a preset Softmax function, and then the cross-entropy loss function is used to calculate. The loss function measures the ability of the neural network model to extract contract data features. For example, when the enterprise contract data feature vector (i.e., the contract feature in the embodiment of the present invention) is extracted by the neural network using the preset Softmax function, the loss function calculates the degree of inconsistency between the extracted feature and the actual category label. During the training process, the optimization algorithm adjusts the model parameters according to the gradient of the loss function, gradually reducing the gap between the prediction and the actual, thereby extracting contract data features that are more in line with semantic requirements (i.e., the contract feature in the embodiment of the present invention).
[0196] The following is described with reference to specific embodiments:
[0197] See also Figure 2 As shown, Figure 2 The following is a schematic diagram of the principle of a deep learning-based enterprise compliance violation prediction and early warning method, where:
[0198] B1. User interface unit
[0199] The user interface unit provides an interactive interface between users and the system, which is used for enterprises to upload contracts, initiate violation detection and view results. It accepts contract files in multiple formats (such as PDF, Word, TXT). Users can trigger the detection process by clicking a button and call the back-end API to achieve enterprise compliance and violation prediction and early warning.
[0200] B2. Data acquisition and preprocessing unit
[0201] The data collection and preprocessing unit parses, cleans, and formats the contracts uploaded by the user for subsequent processing and analysis. In one embodiment, the contract content is extracted into text using open source tools (such as PyPDF2 for parsing PDFs and python-docx for parsing Word documents).
[0202] In one embodiment, data collection originates from the enterprise's contract document library, which mainly includes various contract texts, attachments, and related documents generated during the contract execution process.
[0203] Furthermore, irrelevant information such as blank lines and special characters is removed from the extracted text, which is achieved using regular expressions and text processing libraries (such as Python's re and nltk).
[0204] Furthermore, the contract content is divided into chapters and sections to provide standardized input for the detection module, segmented according to the contract format (such as "Article 3" or "Title of Strategic Cooperation Contract Terms"), and stored as structured data.
[0205] B3. Illegal vocabulary and rule management unit
[0206] The violation vocabulary and rule management unit maintains the system's violation vocabulary and rule library, providing basic reference information for model optimization. This unit stores common risk vocabulary (such as "Force majeure liability is entirely borne by Party A") and supports hierarchical labeling.
[0207] In one embodiment, as shown in Table 1, the annotated categories include: contract violation terms, risk clause identification, asymmetry categories of obligations and rights, and normal categories. Each type of annotation is defined by compliance experts based on current laws, regulations, and industry standards, and a multi-level review mechanism is used to ensure the accuracy and consistency of the annotated data.
[0208] Table 1 Comparison table of annotation categories
[0209] Example of a contract paragraph Annotation category "Party A must pay Party B 30% of the total contract amount within three days after the project starts." Risk clause identification "Party B has the right to adjust the contract price based on market conditions." Contract Violation Words "Party A and Party B shall jointly bear the losses caused by force majeure." Asymmetric categories of obligations and rights "The contract shall come into effect on the date both parties sign and seal it." Normal category "If Party B fails to deliver the results as scheduled, it shall pay liquidated damages." Risk clause identification
[0210] Furthermore, the collected data is vectorized. The present invention adopts the Word2Vec algorithm to vectorize the text. The Word2Vec algorithm is a commonly used vectorization algorithm in this field. It scans the texts to be vectorized based on a preset large-scale corpus and represents each word as a one-hot encoded vector. The dimension of the one-hot encoded vector is equal to the size of the vocabulary in the corpus.
[0211] Furthermore, a database (such as MySQL) is used to store the collected vectorized data and annotated content, and the violation vocabulary is regularly expanded based on detection results and user feedback.
[0212] In the task of predicting and warning corporate compliance violations, the rule matching method has insufficient coverage when detecting violations in complex contract texts, and the deep learning model has limited ability to identify fine-grained violation clauses. The present invention combines rule matching based on a violation vocabulary with contract analysis based on a deep learning model, giving priority to matching clear rules and calling deep learning models to predict complex violation clauses that cannot be matched.
[0213] B4. Training sample expansion unit
[0214] It is understandable that in the task of the present invention, the collection, acquisition, labeling and preprocessing of enterprise contract training data are time-consuming and labor-intensive, and insufficient training samples can easily lead to poor model generalization ability and affect the accuracy of the model.
[0215] The present invention adopts a generative adversarial network based on a dual discriminator to generate samples, thereby realizing the expansion of enterprise contract data and improving the diversity, quality and topological consistency of generated enterprise contract data in high-dimensional space.
[0216] Specifically, the training process of the generative adversarial network algorithm based on the dual discriminator can be found in the training process of the enterprise contract data expansion model above (steps 1) to 8) and will not be repeated here.
[0217] Enterprise contract data usually has problems such as insufficient sample size and category imbalance, which affects the generalization ability of deep learning models. This paper adopts a generative adversarial network based on a dual discriminator for sample expansion, and uses the generative adversarial network with a dual discriminator to generate high-quality contract samples. By adjusting the noise vector, the proportion of mixed data, the topological feature consistency optimization and the KL divergence constraint, the authenticity of the generated samples and the rationality of the category distribution are ensured.
[0218] B5. Deep Learning Model Unit
[0219] The deep learning model unit automatically identifies potential violations in contracts through deep learning models.
[0220] The samples of the training sample expansion unit are input into the deep learning model unit. The present invention adopts a 5-layer fully connected neural network as a deep learning model to extract the features of enterprise contract data.
[0221] Compared with traditional neural network designs with fewer than three layers, multi-layer (more than three layers) neural network structures are more conducive to capturing the complex characteristics of corporate contract data, such as the hierarchical nature of contract terms and the implicit connections between clauses. However, deep networks may encounter problems such as gradient vanishing, gradient exploding, or falling into local optimal solutions, affecting training stability and model performance.
[0222] The existing technology is based on the bat algorithm to optimize the back propagation neural network binocular vision calibration, and uses the bat optimization algorithm to optimize the neural network parameters, thereby realizing the neural network model to process enterprise contract data;
[0223] However, traditional bat algorithms use a single acoustic wave attribute (such as frequency) as the core for search, making it difficult to adapt to the optimization requirements of high-dimensional and complex parameter spaces. The present invention proposes a neural network algorithm based on multidimensional acoustic wave bat optimization to extract features from corporate contract data. During the training process of the neural network, a multidimensional acoustic wave dynamic modulation method is used to expand the acoustic wave attributes to four dimensions: frequency, amplitude, wavelength, and phase. These attributes are dynamically adjusted to achieve more refined searches, enhancing the algorithm's search flexibility in high-dimensional parameter spaces. This avoids the problem of traditional algorithms falling into local optimality due to a single search strategy. When extracting features from high-dimensional, highly heterogeneous samples such as corporate contract data, the accuracy and efficiency of feature extraction can be effectively improved. In addition, the present invention also uses a global resonance detection mechanism to compensate for the traditional bat algorithm's lack of perception of global coupling effects. By analyzing the phase and wavelength relationship between parameters, the optimization capability of the global target is enhanced, further improving the stability and efficiency of the search.
[0224] Specifically, the training process of the neural network algorithm based on multi-dimensional sonic bat optimization can be found in the training process of the feature extraction model above (steps A1 to A7), which will not be repeated here.
[0225] The hierarchical nature of contract terms and the implicit associations between clauses are relatively complex. Traditional optimization algorithms cannot efficiently extract the complex features of contract data. The present invention adopts a multi-dimensional sonic bat optimization algorithm to dynamically adjust the frequency, amplitude, wavelength and phase of the deep neural network parameters used for feature extraction of enterprise contract data, enhance the flexibility of parameter search, and combine global resonance detection and adaptive spectrum decomposition to improve the feature extraction capability of high-dimensional contract data.
[0226] B6. Violation Detection Unit
[0227] The violation detection unit combines a violation vocabulary and a deep learning model to analyze the contract content one by one and mark the violations. Specifically, the contract text is first divided into sentences or short paragraphs as analysis units, and then the sentence segmentation function of nltk or spaCy is used to achieve this.
[0228] During detection, for rule matching, priority is given to matching based on the violation vocabulary and rule library; for content that cannot be matched, the deep learning model is called for prediction.
[0229] The test results are stored in the database to support subsequent query and analysis.
[0230] B7. Result Feedback and Report Generation Unit
[0231] The result feedback and report generation unit feeds back the test results to the user in a clear manner and generates a detailed report.
[0232] In the task of predicting and warning corporate compliance violations, contracts are mostly unstructured data. Traditional tools are inconvenient to process and it is difficult to quickly feedback the detection results. The present invention proposes a user interface unit that supports uploading contracts in multiple formats, data structured processing and visual feedback of results. The data preprocessing tool extracts the text in segments and stores it in chapters according to the contract format to generate a clear detection report.
[0233] The embodiment of the present invention provides a training device for an enterprise violation risk prediction model, see Figure 3 As shown, Figure 3 The following is a block diagram of a training device for an enterprise violation risk prediction model. The training device 30 for an enterprise violation risk prediction model includes:
[0234] An expansion module 31 is used to obtain enterprise contract data and input the enterprise contract data into a pre-trained enterprise contract data expansion model to obtain expanded contract data;
[0235] a combining module 32, configured to combine the enterprise contract data and the extended contract data to obtain a first contract sample set;
[0236] The feature extraction module 33 is configured to extract features from the first contract sample set using a pre-trained feature extraction model to obtain contract features of each contract sample in the first contract sample set; label the contract features according to the risk type of the contract sample; and combine all the labeled contract features to obtain a training feature set;
[0237] A training module 34 is used to train the classification model using the training feature set to obtain an enterprise violation risk prediction model;
[0238] Among them: the enterprise contract data expansion model is obtained by training based on an adversarial network algorithm model generated based on a dual discriminator; the feature extraction model is obtained by training based on a neural network model optimized by multi-dimensional sonic bats.
[0239] In some embodiments of the present invention, optionally, the expansion module 31 is also used to, after completing the first round of training iteration of the adversarial network algorithm model, correct the noise vector of the current round of training iteration in each round of training iteration based on the contract data generated by the adversarial network algorithm model that completed the previous round of training iteration.
[0240] In some embodiments of the present invention, optionally, in the adversarial network algorithm model, one discriminator is used to judge the authenticity of the contract data generated by the adversarial network algorithm model, and another discriminator is used to judge the category distribution of the contract data generated by the adversarial network algorithm model.
[0241] In some embodiments of the present invention, optionally, the expansion module 31 is further configured to complete one training iteration for each pair of the adversarial network algorithm model, verify whether the total number of current training iterations exceeds a preset iteration number threshold, and obtain a verification result;
[0242] The expansion module 31 is further configured to continue to perform the next round of training iterations on the adversarial network algorithm model if the verification result indicates that the total number of current training iterations is less than the iteration number threshold;
[0243] The expansion module 31 is also used to stop the next round of iterative training if the verification result indicates that the total number of current training iterations is greater than or equal to the iteration number threshold, and use the adversarial network algorithm model after this training iteration as the enterprise contract data expansion model.
[0244] In some embodiments of the present invention, optionally, the feature extraction module 33 is further configured to complete one training iteration for each pair of the neural network models, determine whether the neural network model after this training iteration meets a convergence condition, and obtain a determination result;
[0245] The feature extraction module 33 is further configured to continue to perform the next round of training iteration on the neural network model if the judgment result indicates that the convergence condition is not met;
[0246] The feature extraction module 33 is further configured to stop the next round of iterative training if the judgment result indicates that the convergence condition is satisfied, and use the neural network model after the current training iteration as the feature extraction model;
[0247] The convergence condition is expressed as follows:
[0248]
[0249] Where, is the maximum value of all parameter and bias updates in the neural network model; is the convergence threshold hyperparameter.
[0250] In some embodiments of the present invention, optionally, the feature extraction module 33 is further configured to, in the multidimensional sound wave modulation link, modify the sound wave attribute of each parameter in the neural network according to the performance of the neural network after the most recent training iteration from the current moment;
[0251] The expression of the correction process is as follows:
[0252]
[0253] Where, is the parameter of the neural network in the The frequency of the iteration; is the parameter of the neural network in the The frequency of the iteration; is the partial derivative of the loss function of the neural network with respect to the weight parameter; is the loss function of the neural network; is the frequency regulation rate; is the parameter of the neural network in the The frequency update increment for each iteration.
[0254] The training device of the enterprise violation risk prediction model provided by the embodiment of the present invention can achieve Figures 1 to 2 The various processes implemented by the method embodiment achieve the same technical effect and are not described here again to avoid repetition.
[0255] An embodiment of the present invention provides an electronic device 40, see Figure 4 As shown, Figure 4 This is a principle block diagram of an electronic device 40 according to an embodiment of the present invention, including a processor 41, a memory 42, and a program or instruction stored in the memory 42 and executable on the processor 41. When the program or instruction is executed by the processor, the steps in the training method of any enterprise violation risk prediction model according to the present invention are implemented.
[0256] An embodiment of the present invention provides a readable storage medium, which stores programs or instructions. When the program or instructions are executed by a processor, the various processes of the embodiment of the training method of the enterprise violation risk prediction model as described above are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be described here.
[0257] The readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. In some examples, the readable storage medium may be a non-transitory readable storage medium.
[0258] An embodiment of the present invention also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the various processes of any of the above-mentioned embodiments of the training method for the enterprise violation risk prediction model are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be repeated here.
[0259] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.
Claims
1. A training method for an enterprise violation risk prediction model, characterized in that: include: Acquiring enterprise contract data, and inputting the enterprise contract data into a pre-trained enterprise contract data expansion model to obtain expanded contract data; Combining the enterprise contract data with the expanded contract data to obtain a first contract sample set; Using a pre-trained feature extraction model to perform feature extraction on the first contract sample set to obtain contract features of each contract sample in the first contract sample set; According to the risk type of the contract sample, the contract features are marked accordingly, and all the marked contract features are combined to obtain a training feature set; The classification model is trained using the training feature set to obtain an enterprise violation risk prediction model; Wherein: the enterprise contract data expansion model is obtained by training based on the adversarial network algorithm model generated by the dual discriminator; the feature extraction model is obtained by training based on the neural network model optimized by multi-dimensional sonic bats; The training method of the feature extraction model includes: In the multidimensional sound wave modulation step, the sound wave properties of each parameter in the neural network are modified based on the performance of the neural network after the most recent training iteration. The expression of the correction process is as follows: Where, is the parameter of the neural network in the The frequency of the iteration; is the parameter of the neural network in the The frequency of the iteration; is the partial derivative of the loss function of the neural network with respect to the weight parameter; is the loss function of the neural network; is the frequency regulation rate; is the parameter of the neural network in the The frequency update increment at the iteration; The training process of the enterprise contract data expansion model includes: 1) Initialize the network parameters of the generator and discriminator of the generative adversarial network, set are the initial parameters of the generator, are the initial parameters of the discriminator, which are initialized randomly and follow a normal distribution with a mean of 0 and a variance of the unit matrix. 2) Adaptively adjust the input noise. Starting from the second iteration, the discriminator dynamically corrects the noise vector by monitoring the quality of the enterprise contract data generated in the previous iteration, which can be expressed as: The noise vector is updated based on the gradient, and the calculation method is expressed as: Where, is the gradient calculation function of the discriminator loss with respect to the noise vector, For the The noise vector at the iteration. The noise vector is a set of random numbers input to the generator in the generative adversarial network, which is used to guide the generator to create diverse synthetic data that is similar to the distribution of real data; are the parameters of the discriminator, For the The noise vector at the iteration, is the learning rate for the noise vector update, is the discriminator function, is the generator function, The loss function for the discriminator to distinguish the authenticity of real and generated enterprise contract data, is the symbol of partial derivative, It is a binary classification label. The real enterprise contract data label is 1, and the generated enterprise contract data label is 0. Set to 0.3; 3) Mix the generated enterprise contract data with the real enterprise contract data. The calculation method is expressed as follows: Where, For mixed enterprise contract data, Enterprise contract data generated by the generator, For real enterprise contract data, is the mixing ratio parameter, Set to 0.3; 4) Analyze and verify the topological characteristics of the generated enterprise contract data. The topological enterprise contract data analysis method calculates the topological loss function based on the Wasserstein distance, and calculates the minimum cost required to transform the probability distribution of the enterprise contract data generated by the generator into the probability distribution of the real enterprise contract data. In other words, it finds the optimal mapping between the enterprise contract data generated by the generator and the distribution of the real enterprise contract data. The calculation method is expressed as: The generator is updated in combination with the topological loss, and the update method is expressed as: Where, is the function for calculating Wasserstein distance, The Probability Density Function is used to characterize the distribution of generated data and real data. Specifically, the probability density of the distribution is estimated by performing kernel density estimation (KDE) on the data samples. is the topological loss, To balance the hyperparameters of the general quality and topological quality of generated enterprise contract data, For the The parameters of the generator at the iteration, For the The parameters of the generator at the iteration, represents the gradient with respect to the generator parameters, is the learning rate updated by the generator, is the authenticity loss function of the generator, Set to 0.3, Set to 0.01; 5) Two discriminators are used to implement a double discrimination process. The first discriminator determines the authenticity of the enterprise contract data, and the second discriminator determines the category distribution of the enterprise contract data. The KL divergence is used to measure the difference between the true category distribution and the generated enterprise contract data category distribution. The calculation method is expressed as: The KL divergence based on the category distribution improves the discrimination effect, and the calculation method is expressed as: Where, is the loss function of the discriminator regarding the authenticity of enterprise contract data, is the discriminator balance coefficient, is the loss function of the discriminator for category discrimination, is the total number of categories, is a positive integer, is the true category distribution in The probability of the categories, Predict the category distribution for the discriminator in The probability of the categories, Set to 0.3; 6) The feature matching constraint is used in the generator’s loss function, and the calculation method is expressed as: Where, is the authenticity loss function of the generator, The middle layer of the generator is used to extract the intermediate features of enterprise contract data; is the L2 norm, which is used to measure the degree of feature difference; 7) Based on the feedback from the dual discriminator, the training strategies of the generator and discriminator are dynamically optimized. The discriminator parameters are updated based on the monitoring of the discriminator's authenticity and category loss. The calculation method is expressed as: Where, are the discriminator parameters, is the number of iterations, is the learning rate updated by the discriminator, is the gradient of the loss function with respect to the discriminator parameters, For the The parameters of the discriminator at the iteration, For the The parameters of the discriminator at the iteration, Set to 0.3; 8) Repeat the above steps until the preset stopping condition is met, which means the model training is completed. The preset stopping condition is to reach the preset maximum number of iterations, which is set to 1000 times.
2. The training method of the enterprise violation risk prediction model according to claim 1 is characterized in that: The training process of the enterprise contract data expansion model includes: After completing the first round of training iteration for the adversarial network algorithm model, in each round of training iteration, the noise vector of the current round of training iteration is corrected according to the contract data generated by the adversarial network algorithm model that completed the previous round of training iteration.
3. The training method of the enterprise violation risk prediction model according to claim 2 is characterized in that: In the adversarial network algorithm model, one discriminator is used to judge the authenticity of the contract data generated by the adversarial network algorithm model, and the other discriminator is used to judge the category distribution of the contract data generated by the adversarial network algorithm model.
4. The training method of the enterprise violation risk prediction model according to claim 3 is characterized in that: Each time the adversarial network algorithm model completes a training iteration, checking whether the total number of current training iterations exceeds a preset iteration number threshold, and obtaining a verification result; If the verification result indicates that the total number of current training iterations is less than the iteration number threshold, continue to perform the next round of training iterations on the adversarial network algorithm model; If the verification result indicates that the total number of current training iterations is greater than or equal to the iteration number threshold, the next round of iterative training is stopped, and the adversarial network algorithm model after this training iteration is used as the enterprise contract data expansion model.
5. The training method of the enterprise violation risk prediction model according to claim 1 is characterized in that: The training method of the feature extraction model includes: After completing one training iteration for each pair of the neural network models, determining whether the neural network models after this training iteration meet the convergence conditions, and obtaining a determination result; If the judgment result indicates that the convergence condition is not met, continuing to perform the next round of training iteration on the neural network model; If the judgment result indicates that the convergence condition is met, stopping the next round of iterative training, and using the neural network model after this training iteration as the feature extraction model; The convergence condition is expressed as follows: Where, is the maximum value of all parameter and bias updates in the neural network model; is the convergence threshold hyperparameter.
6. A training device for an enterprise violation risk prediction model, applied to the method according to any one of claims 1 to 5, characterized in that: include: Training process of enterprise contract data expansion model An expansion module, configured to obtain enterprise contract data and input the enterprise contract data into a pre-trained enterprise contract data expansion model to obtain expanded contract data; a combining module, configured to combine the enterprise contract data and the extended contract data to obtain a first contract sample set; a feature extraction module, configured to extract features from the first contract sample set using a pre-trained feature extraction model to obtain contract features of each contract sample in the first contract sample set; According to the risk type of the contract sample, the contract features are marked accordingly, and all the marked contract features are combined to obtain a training feature set; A training module is used to train the classification model using a training feature set to obtain an enterprise violation risk prediction model; Wherein: the enterprise contract data expansion model is obtained by training the adversarial network algorithm model generated based on the dual discriminator; The feature extraction model is obtained by training a neural network model optimized by multi-dimensional sonic bats.
7. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps in the training method of the enterprise violation risk prediction model as described in any one of claims 1 to 5 are implemented.
8. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, which, when executed by a processor, implements the steps in the training method of the enterprise violation risk prediction model as described in any one of claims 1 to 5.
9. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method for training an enterprise violation risk prediction model as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Contract classification method and system based on deep learning and related equipment
CN115905535A