Data-driven sample model training method and system
By constructing a composite feature tensor and a sliding window to monitor loss changes, and combining adversarial training and feature resampling, the problems of inconsistency and feature coupling in the generator network training process are solved, achieving adaptive convergence and efficient training of the generative model, and improving the quality and stability of the generated samples.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FUZHOU UNIV
- Filing Date
- 2026-04-14
- Publication Date
- 2026-06-26
AI Technical Summary
Existing generator networks are prone to inconsistencies between generated samples and training samples during training, leading to difficulties in model convergence and unstable output sample quality. Furthermore, existing methods struggle to accurately reflect the spatial coupling and interdependence between different features, and training convergence judgment relies on preset iteration rounds or a single loss threshold, lacking an adaptive monitoring mechanism.
By obtaining an initial sample set and noise vector input to the generator network, a composite feature tensor is constructed. The trajectory of the generator's total loss is monitored, and a sliding window is used to determine training convergence. In adversarial training, a weighted sum of adversarial loss and regularization loss is introduced to update the parameters of the generator and discriminator networks. Combined with a feature resampling mechanism, autonomous training termination is achieved.
It achieves adaptive convergence determination of generator networks in high-dimensional non-convex optimization scenarios, improves the generalization stability and convergence efficiency of the generative model, and can actively learn high-order implicit dependencies between features, getting rid of the dependence on fixed iteration rounds and empirical weights.
Smart Images

Figure CN122021741B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of model training technology, specifically to a data-driven sample model training method and system. Background Technology
[0002] In machine learning applications, conditional generative networks are widely used to handle the generation of multidimensional data, such as time-series data, text data, or simulated data with complex features. For these applications, the input data typically includes label information, spatial or temporal encoding, and related auxiliary parameters. The generator network transforms low-dimensional noise and conditional information into high-dimensional sample outputs through multiple layers of nonlinear mapping. By quantitatively evaluating the differences between the generated samples and the training samples in the feature space, the generator network can be guided to optimize its output, achieving a realistic reproduction of samples on a specific feature distribution. This type of method enables artificial intelligence inference, prediction, or simulation tasks in computer systems.
[0003] In existing technologies, adversarial training methods based on generators and discriminators have several problems. First, traditional generative networks are prone to inconsistencies between generated samples and training samples in the feature space during training, leading to difficulties in model convergence and unstable output sample quality. Second, existing methods often rely on empirical weights or manually set regularization strategies under multi-dimensional feature constraints, making it difficult for the model to actively capture and accurately reflect the spatial coupling and interdependence between different features. This makes it difficult for the model to fully learn the complex relationships between samples. At the same time, the judgment of training convergence usually depends on the preset maximum number of iterations or a single loss threshold, lacking an adaptive sliding window monitoring mechanism based on the fluctuation amplitude of the loss change sequence, which easily leads to underfitting or overfitting. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a data-driven sample model training method and system, which solves the problems in the background technology.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] The first aspect is a data-driven sample model training method, which includes the following steps:
[0007] Obtain an initial sample set and input it along with a noise vector into the generator network to generate initial prediction samples;
[0008] Based on the initial sample set, a composite feature tensor is constructed. The feature difference between the initial predicted sample output by the generator and the reference sample label in the feature space of the discriminator is used in each round of training. The change trajectory of the generator's total loss is monitored. When the fluctuation of the loss change sequence within the sliding window is lower than the convergence tolerance threshold, the training is determined to be converged, the iterative training termination instruction is triggered, and the training termination condition tensor is output.
[0009] The training termination condition tensor is used as a conditional constraint and input into the generator network. Combined with the conditional generator network model, the initial prediction samples are updated. The updated initial prediction samples and the initial sample set are input into the discriminator network to perform adversarial training. In adversarial training, the total loss of the generator is the weighted sum of the adversarial loss and the regularization loss. The network parameters of the generator network and the discriminator network are updated by backpropagation based on the total loss. The network parameters include at least the convolution kernel weights, bias terms, and normalization parameters.
[0010] During the continuous updating of network parameters, feature resampling is triggered to update the training data, and when the difference between two consecutive training rounds reaches the convergence threshold, the trained generator network is output.
[0011] Secondly, a data-driven sample model training system includes a generator initial generation module, a training pre-convergence module, a loss analysis module, and a generator output module.
[0012] The generator initial generation module is used to obtain the initial sample set and input it along with the noise vector into the generator network to generate the initial prediction samples.
[0013] The training pre-convergence module is used to construct a composite feature tensor based on the initial sample set, and to monitor the change trajectory of the generator's total loss based on the feature difference between the initial predicted sample output by the generator and the reference sample label in the discriminator's feature space in each round of training. When the fluctuation of the loss change sequence within the sliding window is lower than the convergence tolerance threshold, the training is determined to be converged, triggering the iterative training termination instruction and outputting the training termination condition tensor.
[0014] The loss analysis module is used to input the training termination condition tensor as a conditional constraint into the input of the generator network, and combine it with the conditional generator network model to update the initial prediction samples. The updated initial prediction samples and the initial sample set are then input into the discriminator network to perform adversarial training. In adversarial training, the total loss of the generator is a weighted sum of the adversarial loss and the regularization loss. The network parameters of the generator network and the discriminator network are updated by backpropagation based on the total loss. The network parameters include at least the convolution kernel weights, bias terms, and normalization parameters.
[0015] The generator output module is used to trigger feature resampling to update the training data during the continuous updating of network parameters, and output the trained generator network when the difference between two consecutive training rounds reaches the convergence threshold.
[0016] The above-described solution of the present invention has at least the following beneficial effects:
[0017] By jointly monitoring the sliding window stability of the generator's adversarial loss and the statistical deviation of generated samples from multi-class reference anchors in the discriminator's feature space, a two-layer adaptive convergence criterion of macroscopic optimization dynamics and microscopic manifold alignment is constructed. At the same time, independent information components are selectively screened based on the semantic relevance between sample labels and combined with spatial encoding and local neighborhood statistics to form a composite tensor, enabling the generator to autonomously learn high-order implicit dependencies between features. This scheme eliminates the dependence on fixed iteration rounds, empirical weights, or preset regularization terms, and achieves robustness in training termination judgment, self-consistency in multi-source feature representation, and active correction capability for data distribution bias. It significantly improves the generalization stability and convergence efficiency of the generative model in high-dimensional non-convex optimization scenarios. Attached Figure Description
[0018] Figure 1 This is a flowchart of the method of the present invention;
[0019] Figure 2 This is a system structure diagram of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] like Figure 1 As shown, embodiments of the present invention provide a data-driven sample model training method, including the following steps:
[0022] S100: Obtain the initial sample set and input it along with the noise vector into the generator network to generate the initial prediction samples;
[0023] The noise vector is a randomly generated sequence of numbers, such as a string of decimals sampled from a standard normal distribution. Its purpose is to make the generator's output random, so as to avoid generating the exact same result every time.
[0024] S200: Constructs a composite feature tensor based on the initial sample set, and monitors the feature differences between the initial predicted samples output by the generator and the reference sample labels in the discriminator's feature space in each round of training, and monitors the change trajectory of the generator's total loss. When the fluctuation amplitude of the loss change sequence within the sliding window is lower than the convergence tolerance threshold, it determines that the training has converged, triggers the iterative training termination instruction, and outputs the training termination condition tensor; the reference sample labels are the real feature anchors for comparison in the discriminator's feature space.
[0025] S300: The training termination condition tensor is used as a conditional constraint and input into the generator network. Combined with the conditional generator network model, the initial prediction samples are updated. The updated initial prediction samples and the initial sample set are input into the discriminator network to perform adversarial training. In adversarial training, the total loss of the generator is the weighted sum of the adversarial loss and the regularization loss. The network parameters of the generator network and the discriminator network are updated by backpropagation based on the total loss. The network parameters include at least the convolution kernel weights, bias terms, and normalization parameters.
[0026] S400: During the continuous updating of network parameters, feature resampling is triggered to update the training data, and when the difference between two consecutive training rounds reaches the convergence threshold, the trained generator network is output.
[0027] In practice, the generator is fed with the initial sample set and the noise vector to generate the initial prediction sample. Then, a composite feature tensor is constructed and the difference between the prediction sample and the reference label in the discriminator feature space is jointly monitored, as well as the fluctuation of the generator's total loss within the sliding window. This achieves the adaptive determination of the training convergence state and the active output of the termination condition tensor.
[0028] Building upon this, the termination condition tensor is fed back as a constraint to the generator input, driving the conditional generation network to update predicted samples. In adversarial training, a weighted total loss consisting of adversarial and regularization losses is introduced for backpropagation to update network parameters. Simultaneously, during the continuous iteration of network parameters, a feature resampling mechanism based on the convergence threshold of the difference between two consecutive training rounds is triggered, forming a closed-loop correction. Compared to existing technologies that rely on fixed rounds or a single loss threshold, this invention enables the model to autonomously perceive the stability of the optimization process and the alignment of the feature space, effectively avoiding misjudgments caused by oscillating noise or local minima. Furthermore, it dynamically updates the training data distribution when local deviations exceed the global tolerance, thereby significantly improving convergence efficiency and generalization stability in high-dimensional non-convex scenarios.
[0029] For example, in time series data modeling, this method allows the generator to autonomously generate simulated trend sequences that conform to statistical laws based on historical fluctuation characteristics and conditional labels, such as market state codes. Training automatically stops when the loss fluctuations converge, saving computational resources and ensuring a high degree of consistency between the generated samples and real data in local fluctuation patterns. The entire training process requires no manual intervention; the model actively reflects the interdependencies between different feature dimensions, and the final generator network has stronger generalization ability and better prediction accuracy.
[0030] In a preferred embodiment of the present invention, the process of obtaining the initial prediction sample includes S101 to S102, specifically: S101: obtaining an initial sample set, wherein the initial sample set includes at least sample labels, spatial location codes associated with the sample labels, and local stress amplitudes, which serve as conditions and true values.
[0031] The sample labels include the aggregate orientation angle, principal stress direction angle, principal surface texture direction angle, and initial crack direction angle at each location; the spatial location encoding is the location index of each feature.
[0032] The aggregate orientation angle is used to describe the arrangement direction of aggregate particles in the microstructure of a material, reflecting the internal orientation characteristics. The main orientation of aggregate arrangement can be obtained by performing local gray-scale gradient analysis on high-magnification microscopic images and using the structural tensor method to find the direction of the principal eigenvector.
[0033] The principal stress direction angle is the direction of the principal stress of a material under stress. It can be obtained by analyzing the principal axis direction of the deflection curve by calling the dynamic response signal of the falling weight deflectometer.
[0034] The principal orientation angle of the surface texture represents the orientation of the rough texture of the road surface. The direction of the main frequency component extracted by performing a two-dimensional Fourier transform on the surface elevation matrix is the principal orientation angle of the surface texture.
[0035] The initial direction angle of the crack is used to reflect the dominant direction of the initial crack propagation. By using feature data, text data within the target area is obtained. A three-dimensional structure is constructed from the text data, the skeleton centerline is analyzed, and the centerline coordinate sequence is taken in the neighborhood of the starting point. Then, a straight line is fitted using linear regression, and the direction angle corresponding to the slope is taken to obtain the initial direction angle of the crack.
[0036] All four types of angular quantities are expressed in radians and recorded within the range of [0,π), thereby obtaining the directional parameter field of pavement aggregate, stress, texture and cracks in a unified coordinate domain, laying the foundation for subsequent data fusion.
[0037] S102: The initial sample set and noise vector are converted into an input tensor and sequentially transformed through the generator network's fully connected layers, convolutional layers, upsampling layers, and activation layers. Each layer performs a weighted summation and nonlinear mapping on the input tensor, gradually changing its shape and numerical distribution. The output layer then generates a multidimensional floating-point tensor as the initial prediction sample. The shape of this tensor corresponds to the sampling grid of the target region, and each value in the input tensor represents the predicted attribute value of each sampling point. The initial prediction sample refers to the initial multidimensional feature tensor output by the generator, used for subsequent discrimination and constraints.
[0038] In practical implementation, by unifying four types of angular quantities—aggregate orientation angle, principal stress direction angle, principal surface texture direction angle, and initial crack direction angle—into the same coordinate domain and constructing a directional parameter field in radians, the organic integration of multi-source heterogeneous features such as material microstructure, mechanical state, surface texture, and existing cracks at the input of the generation model was achieved for the first time. Combined with spatial position encoding and local stress amplitude, the generator can actively learn the spatial coupling and physical synergy between different features, rather than passively relying on empirical weights.
[0039] Compared to existing technologies that use only simple labels or single features as conditions, this invention significantly improves the richness and physical consistency of condition constraints, making the initial predicted samples more closely resemble the behavior of real materials in terms of local attribute distribution. For example, in predicting the fatigue life of metals or road surfaces, this method can simultaneously use grain orientation (similar to aggregate orientation), the principal stress direction of the load, the surface roughness direction, and the initial microcrack direction as condition inputs. The predicted stress field output by the generator naturally satisfies the mechanical compatibility between these directions, thereby significantly improving the reliability of fatigue crack propagation simulation. The entire acquisition process does not require the manual design of complex regularization terms; the model autonomously extracts the inherent dependencies of cross-domain features from the data, exhibiting strong generalization ability and engineering practical value.
[0040] In a preferred embodiment of the present invention, the construction process of the composite feature tensor includes S201 to S208, specifically as follows: S201: Based on the semantic correlation between sample labels, combined with spatial location encoding and local stress amplitude, a difference feature set is constructed and generated for each sample; the difference feature set refers to the difference between sample labels, which is used to quantify the directional deviation relationship between each layer, and the feature data is used to reflect each directional angle.
[0041] Semantic relevance is used to reflect the physical coupling characteristics between sample labels, namely the directional correlation between the internal orientation of the material, the action of external stress, and the surface texture morphology; material refers to the actual medium material in the pavement structure layer that participates in stress and crack formation.
[0042] The local stress amplitude is calculated by calling the original records of the falling weight deflectometer, extracting the maximum displacement difference of deflection at each sampling point, and combining it with the loading radius and resilient modulus of the corresponding sampling point.
[0043] To reflect the local stress state of a material, it is necessary to deduce the local stress amplitude from the collected deflection stiffness and material density information. Specifically, this is done by accessing the original records of a falling weight deflectometer, extracting the maximum deflection displacement difference at each sampling point, and combining this with the loading radius and resilient modulus of the corresponding sampling point to obtain the local stress amplitude. An approximate inversion process is then obtained by simplifying the small deformation linear elastic inversion formula. , Local stress amplitude represents the peak stress or stress variation range per unit area in the pavement material caused by external loading, such as drop hammer impact. It reflects the mechanical response strength of the material under load.
[0044] The resilient modulus represents the longitudinal stiffness of the material at that location, and is obtained by inversion of the multi-point deflection curves of a falling weight deflectometer. The maximum deflection displacement difference represents the difference between the maximum vertical displacement (deflection) measured after drop hammer impact loading and the displacement before loading. It is obtained by measuring the vertical displacement at each point. The loading radius represents the contact area radius of the drop hammer loading device;
[0045] S202: The differences between sample labels include the differences between the first sample labels, the second sample labels, and the third sample labels; where the difference between the first sample labels refers to the difference between aggregate orientation and the principal stress direction, used to describe the consistency between internal arrangement and stress direction; the difference between the second sample labels refers to the difference between texture direction and crack initial direction, used to characterize the correlation between crack propagation and surface texture; the difference between the third sample labels refers to the difference between aggregate orientation and texture direction, used to reflect the coupling relationship between internal structure and surface morphology;
[0046] S203: Following the principle of minimum included angle, the features within the differential feature set are recalculated to ensure the uniformity and non-directionality of the angular relationship;
[0047] S204: By transforming the cosine value of the difference between the first sample labels, the first feature vector is obtained. Then, a convolution operation is applied to the local stress amplitude, i.e., a spatial difference operation is applied, and the feature gradient is obtained point by point to calculate the magnitude of the feature gradient; whereby the formula is used... Obtain the first feature vector. The first eigenvector is used to characterize the orientational correspondence between the two directional lines at the same spatial location, by using the cosine function. This relationship of being on the same line but in different directions can be identified, ensuring that the modeling of the continuity of the crack direction in space is physically reasonable.
[0048] The difference between aggregate orientation and principal stress direction is used to calculate the stress gradient vector point by point by applying spatial difference operations to the local stress amplitude. ,in, The characteristic gradient is a vector reflecting the changing trend of stress distribution around that point. and These represent the spatial rates of change of stress in the x and y directions, respectively. This refers to the local stress amplitude.
[0049] Calculate the magnitude of the feature gradient; ,in, The magnitude of the characteristic gradient is used to characterize the degree of spatial variation in stress distribution;
[0050] S205: By combining the first feature vector, the magnitude of the feature gradient, and the sample labels according to the same spatial index, a local feature matrix is formed. ;in, This is a local feature matrix. At each spatial location, the matrix fully records three types of information: the internal orientation of the material, the direction of force, and the spatial variation of stress, which constitute the local data basis of the aggregate-force relationship in the system. The principal stress direction angle;
[0051] S206: The second feature vector is obtained by transforming the cosine value of the difference between the labels of the third samples. ,in, This is the second feature vector, used to record the orientation correspondence between aggregate orientation and the main direction of surface texture at the corresponding spatial location. The difference between aggregate orientation and texture direction is used to extract key points from each sample in the initial sample set to obtain a key point set.
[0052] S207: A laser 3D scanner is used to acquire the surface elevation matrix in the global coordinate domain. A local neighborhood with a fixed radius is established in the feature space, centered on each keypoint. This neighborhood contains several discrete coordinate points. The similarity sequence of spatial location codes within the local neighborhood is read, and neighborhood averaging is performed to obtain the local feature density parameters corresponding to each keypoint. The calculation formula is as follows: ,in This is a local feature density parameter used to reflect the local surface texture density at key points. Let i be the i-th key point, such as the crack initiation point, where i is the key point number; Let x and y represent the k-th local neighborhood, where k is the local neighborhood number and x and y are the horizontal and vertical coordinates, respectively. The similarity is encoded by spatial location, representing the gradient magnitude of surface elevation, which reflects the rate of change of surface roughness;
[0053] The similarity sequence of spatial location encoding within a local neighborhood is the magnitude of the surface elevation gradient within the neighborhood, which is used to calculate the local texture density;
[0054] The difference between the texture direction and the initial crack direction at the same key point is read synchronously to form a feature coupling matrix. The calculation formula is as follows: ;in, is the feature coupling matrix, which is used to construct the composite feature tensor; This is the difference between the texture direction at the key point and the initial direction of the crack;
[0055] S208: Combine the feature coupling matrix with the local feature matrix to form a composite feature tensor, the expression of which is: ,in, This is a composite feature tensor, which is used to spatially couple and evaluate the orientation consistency of multiple types of directional parameters and mechanical parameters at various locations. coordinates The local feature density parameter at the key point reflects the roughness distribution and texture concentration of the surface layer at the key point; coordinates The difference between the texture direction and the initial direction of the crack at that location;
[0056] The three types of features in the difference feature set were chosen because the features are independent of each other, have complete coverage and no information redundancy. For example, the difference between aggregate orientation and crack initial direction, although calculable, is highly correlated with the difference between texture direction and crack initial direction and the difference between aggregate orientation and texture direction in the physical transmission chain. It is equivalent to repeatedly expressing the same constraint, so it was intentionally discarded to ensure model stability and physical interpretability.
[0057] In specific implementation, during the construction of the composite feature tensor of the present invention, by introducing semantic relevance and differentially selecting three independent angle differences, spatial decoupling and physical synergy between material micro-orientation, mechanical response and surface morphology are realized at the input end of the generated model.
[0058] Simultaneously, by combining the spatial difference gradient magnitude of local stress amplitude with the surface elevation similarity sequence in the neighborhood of key points, a composite feature tensor is constructed that simultaneously includes directional consistency, the degree of stress change, and local texture density. Compared to existing technologies that simply splice multidimensional features or rely on empirical weighting, this invention actively filters out independent and non-redundant directional deviation terms in the physical transmission chain. Thus, while ensuring model stability, it allows the generator to autonomously distinguish between two different types of physical constraints: internal structure and force direction, and surface morphology and crack propagation. Furthermore, it uses cosine transform and neighborhood averaging to unify angular deviations and stress gradients into the same feature space.
[0059] For example, in the prediction of fatigue life of composite materials, this tensor allows the generator to simultaneously understand the degree to which the fiber orientation deviates from the principal stress, the angle between the surface roughness direction and the existing microcrack direction, and the gradient strength of the local stress concentration area. As a result, the generated stress and strain fields naturally satisfy the spatial compatibility between these physical quantities, avoiding prediction results that violate the common sense of mechanics, such as the fiber being completely perpendicular to the principal stress but without stress concentration.
[0060] By constructing a semantic relevance matrix among sample labels and selectively filtering out independent information components, a composite tensor reflecting the implicit coupling between features is formed by combining spatial encoding and local neighborhood statistics. This tensor projects the original features onto a unified manifold using a nonlinear mapping and extracts feature distribution patterns around each sampling point through similarity aggregation operations within local neighborhoods. This establishes a joint representation space at the generator input that combines local structural sensitivity with global synergy. This representation method eliminates the need for manually designed prior constraints, enabling the generator to autonomously learn higher-order dependencies between different feature dimensions and improving the model's intrinsic fitting ability to complex data structures.
[0061] In a preferred embodiment of the present invention, the process of triggering the iterative training termination instruction includes S209 to S211, specifically as follows: S209: For each initial predicted sample output by the generator network, the feature difference between it and the reference sample label in the feature space of the discriminator network is calculated to obtain multiple sets of feature distances. By calculating the statistics based on each type of feature distance, a consistency index is formed; wherein, the multiple sets of feature distances are calculated by respectively calculating the feature differences of aggregate orientation angle, stress principal direction angle, and surface texture principal direction angle between the initial predicted sample and the reference sample label in the feature space of the discriminator network, which are used to quantify the directional deviation between the generated sample and the reference label to form a consistency index;
[0062] Since the initial direction of the crack is physically an initial value of the generation direction, rather than a reference direction used to determine the consistency of other directions, if it is used as a reference at the same time, it will lead to self-comparison between directions, thereby destroying the equivalence between sets. Therefore, there is no characteristic difference calculation between the initial direction angle of the crack here.
[0063] The characteristic difference calculation follows the principle of minimum included angle, that is, if the difference between two angles is greater than half of a semicircle (i.e., 90° or π / 2 radians), it is converted to the range by supplementary angle, so that all differences are kept in [0, π / 2]. By calculating the absolute value of the sine of each type of angle difference, a consistency index is formed to reflect the geometric magnitude of the angle difference.
[0064] Since the sine value of any angle difference is only related to the included angle and not to the direction, and the sine value increases monotonically with the angle in the interval [0, π / 2], it can directly reflect the deviation. By taking the absolute value of the sine, the influence of the direction order can be further eliminated, so that the result purely represents the magnitude of the geometric angle difference. If the value of a certain type of angle difference is smaller, it means that the direction is closer and the geometric consistency is higher; conversely, the larger the value, the greater the deviation and the lower the geometric consistency.
[0065] S210: By recording the change trajectory of the generator's adversarial loss in each training round, a loss change sequence is obtained. In practice, before training begins, an empty array or list is created to store the generator's loss value at the end of each training round. This container will be gradually filled during training. The size of the container is preset to the maximum number of training rounds or dynamically expanded. A storage location is added for each round recorded.
[0066] After each round of training is completed, that is, after the generator and discriminator have completed one or more alternating updates in that round, the system calculates the loss value of the generator in the current round. This loss value refers to the adversarial loss, which comes from the discriminator's discrimination result on the generated samples.
[0067] Next, after calculating the loss value for the current round, the system appends this value to the end of the loss record container created in the first step. Assuming the current training round is t, then the t-th position in the container stores the generator loss value for round t. At this point, the entire container contains the sequence of loss values from round 1 to round t.
[0068] If the sliding window size is set to 10, for example, if only the loss changes in the most recent 10 rounds are considered, then after adding a new loss value, it is checked whether the number of records in the container exceeds 10. If it does, the earliest loss value is removed, so that the container always contains the loss values of the most recent 10 rounds. In this way, the loss change sequence always contains only the loss data of the most recent few rounds, which is used for subsequent convergence judgment.
[0069] After the above steps, a loss value sequence arranged in chronological order is obtained, which is the loss change sequence. This sequence can be used for subsequent steps, such as calculating the difference between the maximum and minimum values in the sequence, determining whether the loss tends to stabilize, or plotting loss curves for the monitoring system to view.
[0070] S211: Centered on the current training round, set a sliding window and give a convergence tolerance threshold. Combined with the loss change sequence, define a convergence judgment function to judge whether the training has converged and trigger the iterative training termination instruction.
[0071] The convergence judgment function is based on the logic of outputting a Boolean value based on whether the loss fluctuation within the sliding window is lower than the threshold; in essence, it is an indicator function.
[0072] The process of constructing the training termination condition tensor includes S212 to S214, specifically: S212: If the fluctuation amplitude of the loss change sequence within the sliding window is lower than the convergence tolerance threshold, then the training is determined to have reached the convergence state, and the output of the convergence judgment function is set to 1 to obtain the convergence confirmation flag.
[0073] In practice, taking the current training round as the center, the system first sets a sliding window of a fixed size, for example, a window width of five rounds. Then, it extracts all loss values from the loss change sequence, tracing back five rounds from the current round as the endpoint. Next, the system calculates the difference between the maximum and minimum values in this set of loss values and compares this difference with a pre-given convergence tolerance threshold. If the difference is less than the convergence tolerance threshold, it is determined that the loss sequence has become stable within the current window, and the convergence judgment function outputs true; otherwise, it outputs false. When the convergence judgment function outputs true for a preset number of consecutive times, such as three consecutive rounds, the system triggers an iterative training termination command. At this time, the system sets the output value of the convergence judgment function to 1 and stops subsequent training rounds. This output value is recorded as a convergence confirmation flag for subsequent termination command triggering. If the convergence condition is not met, the next round of training continues, and the above judgment process is repeated.
[0074] S213: Extract the maximum value of the consistency index as the final consistency index of the current training round, and then perform verification on the final consistency index based on the convergence confirmation flag to obtain the convergence judgment result of each training round. This result is used to determine the convergence status of the current round and is included in the termination condition for the construction of the composite feature tensor.
[0075] In practice, the system first obtains a set of consistency index values calculated for each initial prediction sample in the current training round. Then, it extracts the maximum value from this set of values as the final consistency index for the current round. Next, the system reads the previously obtained convergence confirmation flag, which indicates whether the loss change sequence has stabilized within the sliding window, and determines whether the flag is valid (e.g., a value of 1). If the convergence confirmation flag is valid, the final consistency index is compared with a preset consistency threshold. If the final consistency index is lower than the threshold, the current training round is considered to have converged, and the convergence determination result is output as converged. If the convergence confirmation flag is invalid or the final consistency index is not lower than the threshold, it is considered not converged. This convergence determination result is used to trigger a training termination command or continue the next round of training.
[0076] S214: Incorporate the convergence determination results of each training round into the composite feature tensor to form the training termination condition tensor. This tensor is a composite tensor containing the convergence determination results, used to constrain the generator input and trigger training termination.
[0077] In practical implementation, this invention achieves autonomous perception and closed-loop feedback of training convergence by using a two-dimensional adaptive criterion during the process of triggering the iterative training termination instruction: the fluctuation amplitude of the sliding window of the generator's adversarial loss and the consistency index of the predicted sample relative to multiple reference directions in the discriminator's feature space.
[0078] Specifically, the sliding window monitoring of the loss change sequence ensures the stability of the macroscopic optimization process, while the consistency index calculated based on the minimum angle principle and the absolute value of the sine quantifies the deviation magnitude of the generated samples in the orientation field from a microscopic geometric perspective. Both are jointly verified by the convergence confirmation flag and the maximum value of the consistency index to form a convergence judgment logic, and the judgment result is re-injected into the composite feature tensor in tensor form, constituting the training termination condition tensor. Compared to existing technologies that rely solely on empirical rounds or a single loss threshold, this invention can proactively identify complex conditions such as loss stabilization but directional consistency not yet met, or directional consistency but loss still oscillating, avoiding underfitting or overfitting. This invention is applicable to multiple application scenarios. For example, in the simulation of residual stress fields in thermal barrier coatings of aero-turbine blades, this method can monitor the angular deviation between the principal stress direction output by the generator and the orientation of the coating's microstructure in real time, while simultaneously observing the convergence curve against the loss. When both satisfy their respective thresholds, training is automatically terminated, ensuring that the generated samples conform to both mechanical equilibrium and material texture constraints, thus improving the physical reliability and engineering practicality of the simulation results.
[0079] In a preferred embodiment of the present invention, the training termination condition tensor is used as a conditional constraint and input to the input of the generator network, combined with the conditional generator network model, to update the initial prediction samples; the updated initial prediction samples and the initial sample set are input to the discriminator network to perform adversarial training, including S301 to S308, the specific contents of which are as follows:
[0080] S301: The training termination condition tensor and the noise vector are combined to form the input condition for adversarial training, which is synchronously loaded into the input of the generator network. The generator network adopts a conditional generation network structure based on stacked convolutional layers. The network structure includes several convolutional layers, upsampling layers and nonlinear activation layers. In each convolutional layer, a mapping relationship from low-dimensional noise space to high-dimensional feature space is established through local convolution, feature fusion and conditional normalization operations, so as to output a new predicted sample at the output end. This sample is the updated output tensor of the generator, which is used for discrimination and regularization constraints.
[0081] The conditional generative network (GZN) structure based on stacked convolutional layers is a conditional generator system built within the framework of generative adversarial networks (GANs). It primarily utilizes a stacked combination of multiple convolutional layers, upsampling layers, and nonlinear activation layers. Specifically, the system first concatenates the training termination condition tensor with a Gaussian noise vector that follows zero mean and unit variance along the channel dimension to form a composite input, serving as the generator's initial features. Then, the generator expands its features layer by layer through a stacked convolutional layer structure. Each convolutional layer performs convolution operations within its local receptive field to capture local spatial features such as crack direction, texture density, and stress gradient. Batch normalization is introduced after each convolutional layer to stabilize the feature distribution, and a nonlinear activation function is combined to enhance the nonlinear expressive power of the generated results.
[0082] The subsequent upsampling layer is used to gradually restore the spatial resolution, restoring the feature map from the low-dimensional latent space to a high-dimensional space size consistent with the feature data. Throughout the stacking process, the physical features in the training termination condition tensor, such as the orientation angle field, stress distribution and texture parameters, are injected into each convolutional layer through the conditional normalization layer. This ensures that the network is modulated by physical constraint information in each level of feature transformation, thereby guaranteeing the controllability of the new predicted sample in terms of geometric shape and mechanical consistency.
[0083] Finally, the output is processed through a nonlinear mapping layer, such as a tanh activation layer, to obtain a new predicted sample with a spatial resolution consistent with the feature data.
[0084] S302: Based on the summation of the absolute values of feature distances and normalization according to the feature dimensions, the total feature difference index is obtained. This index is used to represent the degree of deviation of the global average directional difference.
[0085] Specifically, in order to maintain physical consistency, the orientation distribution of the crack structure in the new prediction sample is analyzed to obtain the predicted crack orientation field; and the principal stress orientation angles under the same index are read from the training termination condition tensor, and the feature distance is constructed by calculating the difference between the angle and the predicted crack orientation point by point. ,in, This is a characteristic distance value used to measure the relative difference between the predicted crack direction and the measured stress direction at that point. To predict the crack direction, i.e., the principal direction angle of the crack at the corresponding position in the new prediction sample; To train the principal stress direction angles at the corresponding positions in the termination condition tensor. This is a sine function used to maintain the symmetry of the angle difference within the interval [-1, 1], and also facilitates subsequent integration operations on the global statistics; when = When sin(0) = 0, and When perpendicular, sin(π / 2) = 1; when the two directions are opposite, sin(π) = 0.
[0086] The sine function is used to preserve the angle difference. Symmetry within the range [-1, 1]. The system stores the absolute value of the function point by point under the same spatial index for subsequent global statistics. The system then sums the absolute values of the characteristic distances of all spatial sampling points and normalizes them across the entire spatial domain to obtain the total characteristic difference index. The difference between the predicted crack direction and the principal stress direction angle is a result of crack evolution, not a prerequisite; therefore, the total characteristic difference index is quantified here to quantitatively represent the overall difference between the new predicted sample and the measured mechanical direction.
[0087] The predicted crack orientation field reflects the main extension direction of the crack structure at each spatial location in the new prediction sample. It is a quantitative expression of the crack orientation pattern automatically learned by the generated crack after training. The specific acquisition method is as follows: first, edge detection of the crack region is performed on the new prediction sample, such as Sobel, Canny or gradient direction extraction based on the structural tensor method. Then, local orientation estimation is performed on the detected crack skeleton points, and the tangent direction of the crack line at each point is calculated. This tangent direction is the predicted crack orientation. After summarizing, the predicted crack orientation field is obtained.
[0088] Crack skeleton points are the set of central sampling points extracted by performing morphological refinement or structural tensor method on the crack region in the new prediction sample, and are used to represent the main extension path of the crack line.
[0089] S303: Identify the set of key points in the new prediction sample, and calculate the local change rate of spatial location encoding in the fixed radius neighborhood of each key point to obtain the local feature density parameters of each key point. Also calculate the difference between the predicted features at the same key point to obtain the key point bias.
[0090] The key point set consists of key locations in the sample that require focused analysis, used for local density and bias calculations.
[0091] The local feature density parameter is the mean of the texture density in the neighborhood of the key point, reflecting the local roughness.
[0092] Keypoint bias is the difference between the predicted and true features at the same point, used to quantify the prediction offset;
[0093] S304: Based on the initial sample set and the keypoint set in the new predicted samples, keypoint pairs are constructed. According to the local feature density parameters and keypoint biases of each keypoint, the variation parameter difference and bias difference are calculated for each keypoint pair. These variation parameter differences and bias differences are then mapped to the global coordinate domain according to their respective spatial indices. During the mapping process, linear interpolation is used to form a continuous field for uncovered feature points to generate a feature difference field. Gradient calculation is performed on the feature difference field to obtain the feature space gradient magnitude, the formula of which is: , is the feature space gradient magnitude, used to quantify the degree of fluctuation in directional consistency in space, to identify regions where the predicted data differs drastically from the real data, changes abruptly, and has poor stability. These regions often indicate that the generative features of the adversarial model are out of touch with physical laws, or that gradient imbalance has occurred during training. Therefore, the smaller its value, the smoother the directional field and the more stable the directional relationship in that region; T is the feature difference field. , The feature difference field represents the comprehensive difference between the predicted features and the true features at each spatial sampling point coordinate (x,y). It is a two-dimensional distribution function that reflects the spatial difference distribution between crack prediction data and true crack data at the physical parameter level. It is used to mark inconsistencies. The sign of the partial derivative; For the difference in varying parameters, The difference in bias;
[0094] and These represent the rates of change of the difference values in the x and y directions, respectively; the set of keypoints in the new prediction sample includes multiple keypoints.
[0095] Keypoint pairs are starting point pairs obtained by combining the initial sample set and the keypoints in the new prediction sample at the same spatial location under the same spatial index.
[0096] The variation parameter difference refers to the difference in local feature density parameters between key point pairs, which reflects the density difference of the generated result under the real surface texture roughness distribution. The bias difference refers to the difference in the angle between the surface texture direction and the crack direction in the real and new prediction samples, which reflects the orientation shift of the predicted crack direction relative to the real crack direction.
[0097] Existing data-driven models typically rely solely on statistical features or representative data for fitting during training, lacking modeling constraints on the internal structure of road materials and their mechanical mechanisms. This leads to deviations between the model's learning process and actual physical laws. While the model can output predictions, its internal parameters lack physical consistency, easily resulting in unstable predictions, unreasonable stress evolution directions, and mismatches between defect spatial distribution and structural characteristics. This reduces the model's generalization ability and practical application value.
[0098] S305: Input the new predicted samples and the initial sample set into the discriminator network. The discriminator network includes at least a fully connected layer, multiple convolutional layers and an upsampling layer. Perform convolution operations in each convolutional layer to extract feature maps, and generate a discriminant probability matrix in the output layer to represent the confidence distribution of the input data being judged as feature data in each local region. The larger the matrix element, the closer the region is to the initial sample set.
[0099] S306: In each training batch, based on the discrimination probability matrix, the adversarial loss functions corresponding to the generator network and the discriminator network are obtained respectively. This function is used to drive the generator and the discriminator to form a game optimization relationship during the training process. By maximizing the discriminator's ability to identify real data and minimizing the probability difference of the generator being discriminated, the crack data location is realistically reconstructed in terms of overall texture, orientation field and mechanical consistency.
[0100] Specifically, the adversarial loss functions for the generator and discriminator are as follows: ; ;
[0101] in, This is the adversarial loss function corresponding to the generator, i.e., the adversarial loss of the generator. The smaller the value, the more the generated samples can deceive the discriminator.
[0102] For batch size, For sample index, It is the natural logarithm;
[0103] For the generator under conditions Below, due to noise The output of the first One new prediction sample;
[0104] For the discriminator under conditions Next, the first The probability that a new predicted sample is true;
[0105] The generator aims to make the log-likelihood of a new predicted sample being true close to 0, meaning the probability of it being true is close to 1. For the first The training termination condition tensor corresponding to each sample.
[0106] This is the adversarial loss function corresponding to the discriminator, that is, the loss value of the discriminator on the current training batch, which is used to train the discriminator so that it can accurately distinguish between the initial sample set and the new predicted samples output by the generator.
[0107] For the first An initial sample set, For the discriminator to perform under given conditions Next, judge The probability of the initial sample;
[0108] For the first A noise vector, typically sampled from a Gaussian or uniform distribution;
[0109] The discriminant aims for the log-likelihood of classifying a new predicted sample as false to be close to 0. Close to 1;
[0110] The loss term for the initial samples is smaller as the probability output by the discriminator for the initial samples is closer to 1.
[0111] For the loss term of the new predicted sample, the closer the probability output by the discriminator for the new predicted sample is to 0, the smaller the absolute value of this term; the discriminator minimizes this value. To improve the ability to distinguish between real and fake samples.
[0112] S307: Based on the regularization loss composed of the total feature difference index and the feature space gradient magnitude, and combined with the adversarial loss function corresponding to the generator network, obtain the total loss function of the generator network.
[0113] S308: Based on the total loss function of the generator network and the adversarial loss function corresponding to the discriminator network, the backpropagation algorithm is used to calculate the gradient of each loss function with respect to the network parameters, and the network parameters of the generator network and the discriminator network are updated respectively along the gradient descent direction.
[0114] The network parameters include at least the convolution kernel weights, bias terms, and normalization parameters.
[0115] The formula for calculating the generator's total loss function is: ,in The total loss function of the generator reflects the comprehensive loss of the generator in the current training batch, which takes into account both the realism of appearance and the consistency of physical laws. It is used for backpropagation to update the generator parameters. The smaller the value, the more difficult it is for the new predicted samples generated by the generator to be distinguished from the real samples, with less adversarial loss. It also conforms to physical laws in terms of mechanical direction and spatial continuity, with less physical loss.
[0116] The total characteristic difference index, with a value range of The larger the value, the greater the deviation between the crack direction and the principal stress direction, reflecting a violation of mechanical laws and an unreasonable crack orientation. The average value of the feature space gradient modulus reflects the average rate of change of spatial differences in the entire region. Its value range is greater than 0. The larger the value, the more drastic the change of the feature difference field and the more discontinuous the local area. It reflects the abrupt change of texture density or orientation angle in adjacent regions, which does not conform to the actual gradual change characteristics of the road surface. and These are the weighting coefficients, specifically obtained using an adaptive weighting method.
[0117] The regularization loss term, reflecting the physical consistency loss, is used to incorporate the physical laws governing road surface cracks as a quantifiable optimization objective. This is directly embedded into the generator's training process, forcing the generator to actively adhere to these physical laws when generating samples. The introduction of this formula allows the generator to actively learn physical laws during training, thus distinguishing it from traditional generative adversarial networks that rely solely on adversarial losses.
[0118] In its implementation, this invention jointly inputs the training termination condition tensor and the noise vector into the generator, and introduces a regularization loss consisting of the total feature difference index and the feature space gradient modulus during adversarial training. This allows the generator to be driven by both adversarial game theory and physical consistency constraints during the optimization process. Specifically, the total feature difference index quantifies the point-by-point deviation between the crack direction and the principal stress direction angle using a sine function, enabling the generator to actively avoid directions that violate mechanical laws. The feature space gradient modulus, by analyzing the spatial change rate of the feature difference field, forces the generator to maintain continuous smoothness in texture density and direction angle between adjacent regions, avoiding local abrupt changes. Both are embedded into the generator's total loss with adaptive weights, forming a differentiable physical regularization term, thereby allowing the model to internalize the coupling mechanism between internal stress transmission and surface morphology evolution while learning the sample distribution. Compared to existing technologies that rely solely on discriminator feedback or simple statistical constraints, this invention enables the generator to distinguish between statistically similar but physically contradictory pseudo-reasonable samples. For example, in fatigue crack simulation of composite materials, this method can ensure that the crack propagation path generated by the generator is not only consistent with the texture distribution of the training sample, but also that its local extension direction always maintains mechanical compatibility with the principal stress direction, that is, the sine value of the included angle approaches zero. At the same time, the crack density is distributed gradually rather than in a jump in space, thereby improving the credibility and generalization performance of the generated sample in engineering simulation.
[0119] In a preferred embodiment of the present invention, S400 includes S401 to S403, specifically including: S401: combining the total feature difference index and the feature space gradient magnitude to obtain a difference evaluation set, and scanning the difference evaluation set point by point by triggering a training state evaluation command. The specific logic is as follows: the technical goal is to maintain the physical consistency of the entire orientation field. When the local difference in a certain region far exceeds the global average difference, it indicates that the orientation of the corresponding region is disordered, which may be due to abnormal texture extraction, excessive aggregate orientation detection error, discontinuous surface texture orientation, or other problems. Under adversarial training semantics, this can lead to the generator learning incorrect orientation mappings. Therefore, the relative degree of deviation is reflected by comparing the feature space gradient magnitude with the total feature difference index.
[0120] When the feature space gradient magnitude of a corresponding sampling point is greater than the total feature difference index, it indicates a significant discontinuity or abrupt change between the predicted result and the actual physical field in that region, suggesting that the model may not have learned local patterns. Therefore, triggering resampling is a targeted correction of these abnormal regions. This identifies the neighborhood of the corresponding sampling point as a high-discrepancy region and triggers a feature resampling command to re-extract local feature data, thereby achieving dynamic feedback and correction of training consistency. The local feature data includes aggregate orientation angle and surface texture main direction angle.
[0121] In this invention, all parameters are dimensionless by using dimensionless processing technology to remove their dimensions, and all types of thresholds can be obtained by the mean-standard deviation method.
[0122] S402: Based on the local feature data, update the corresponding features in the initial sample set, and re-execute S100 to S400 to obtain a new difference evaluation set.
[0123] S403: By subtracting the new difference evaluation set from the previous round of difference evaluation set item by item, the training state feedback set is obtained. If the difference between the total feature difference index and the local feature difference field average reach the convergence threshold in two consecutive rounds of training, the adversarial training is determined to be stable, and the training termination instruction is triggered to stop the training job, save the final network parameter set, and complete the closed-loop training and archiving.
[0124] The difference in the total feature difference index is used to reflect whether the overall directional consistency is still changing; the local feature difference field is the result of the difference in the gradient magnitude of the feature space in two consecutive training rounds, used to reflect whether the local abnormal region is still evolving.
[0125] The training state feedback set serves as the input condition for the next iteration, driving the system to continue executing subsequent reestimation and resampling steps, thereby maintaining iterative consistency and dynamic updates of the data within the same coordinate domain.
[0126] The final network parameter set refers to all network parameters in the current round. In subsequent running phases, this parameter set is invoked to perform crack state re-prediction, data augmentation, and model validation operations.
[0127] In its specific implementation, this invention constructs a difference evaluation set and compares the spatial gradient magnitude of features with the total feature difference index point by point. For the first time, it introduces an adaptive resampling mechanism based on local and global difference comparison in the training process of generative adversarial networks: when the spatial gradient magnitude of a certain feature point exceeds the overall difference index, the system automatically identifies the region as a high difference region and triggers feature resampling to correct local features such as aggregate orientation angle and surface texture main direction angle, thereby realizing dynamic feedback and correction of abnormal learning regions.
[0128] Furthermore, by performing item-by-item differencing on two consecutive rounds of difference evaluation sets, a training state feedback set is obtained. The changes in the total feature difference index and the evolution trend of the local feature difference field are jointly monitored. Only when both converge to a preset threshold is a training termination command triggered and closed-loop archiving completed. Compared to the passive approach of using a fixed resampling period or relying on manual screening of abnormal samples in existing technologies, this invention enables the model to actively perceive the spatial inconsistency between its prediction results and the physical field, and can adaptively correct the data distribution during training, forming a closed loop of evaluation, resampling, retraining, and convergence determination. For example, in the simulation of residual stress fields in metal matrix composites, if the generator repeatedly generates orientation fields that are severely deviated from the principal stress direction in a certain local region, causing the gradient modulus at that location to remain higher than the global mean, the system will automatically resample the micro-orientation data of that region and update the initial sample set. After several iterations, the orientation deviation in that region is significantly reduced, and finally, when both the total feature difference index and the local difference field are stable, the model parameters are automatically saved. This mechanism improves the generator's ability to fit local abrupt changes in complex physical fields, avoids situations where the overall loss is stable but local physical contradictions still exist, and reduces human intervention and ineffective training rounds.
[0129] like Figure 2 As shown, embodiments of the present invention also provide a data-driven sample model training system, comprising:
[0130] The generator initial generation module is used to obtain the initial sample set and input it along with the noise vector into the generator network to generate the initial prediction samples.
[0131] The training pre-convergence module is used to construct a composite feature tensor based on the initial sample set, and to monitor the change trajectory of the generator's total loss based on the feature difference between the initial predicted sample output by the generator and the reference sample label in the discriminator's feature space in each round of training. When the fluctuation of the loss change sequence within the sliding window is lower than the convergence tolerance threshold, the training is determined to be converged, triggering the iterative training termination instruction and outputting the training termination condition tensor.
[0132] The loss analysis module is used to input the training termination condition tensor as a conditional constraint into the input of the generator network, and combine it with the conditional generator network model to update the initial prediction samples. The updated initial prediction samples and the initial sample set are then input into the discriminator network to perform adversarial training. In adversarial training, the total loss of the generator is a weighted sum of the adversarial loss and the regularization loss. The network parameters of the generator network and the discriminator network are updated by backpropagation based on the total loss. The network parameters include at least the convolution kernel weights, bias terms, and normalization parameters.
[0133] The generator output module is used to trigger feature resampling to update the training data during the continuous updating of network parameters, and output the trained generator network when the difference between two consecutive training rounds reaches the convergence threshold.
[0134] It should be noted that this system is a system corresponding to the above method. All implementation methods in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0135] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A data-driven sample model training method, characterized in that, The method includes: An initial sample set is obtained and input along with a noise vector into a generator network to generate initial prediction samples. The initial sample set includes sample labels, spatial location codes associated with the sample labels, and local stress amplitudes. Based on the semantic correlation between sample labels, combined with spatial location encoding and local stress amplitude, a difference feature set is constructed and generated for each sample, where the difference feature set refers to the difference between sample labels; Based on the differential feature set, a composite feature tensor is obtained by combining spatial encoding and local neighborhood statistics. For each initial predicted sample output by the generator network, the feature difference between it and the reference sample label in the feature space of the discriminator network is calculated to obtain multiple sets of feature distances. By calculating the statistics based on each type of feature distance, a consistency index is formed. By recording the trajectory of the generator's adversarial loss during each round of training, a loss change sequence is obtained; If the fluctuation of the loss change sequence within the sliding window is lower than the convergence tolerance threshold, the training is determined to have reached the convergence state and an iterative training termination instruction is triggered. The convergence determination results of each training round are obtained by combining the consistency index. The convergence determination results of each training round are incorporated into the composite feature tensor to form the training termination condition tensor. The training termination condition tensor and the noise vector are combined to form the input condition for adversarial training, which is synchronously loaded into the input of the generator network and a new predicted sample is output at the output. The total feature difference index is obtained by summing the absolute values of feature distances and normalizing them according to the feature dimensions. Identify the set of key points in the new prediction sample, and calculate the local change rate of spatial location encoding in the fixed radius neighborhood of each key point to obtain the local feature density parameters of each key point. Also calculate the difference between the predicted features at the same key point to obtain the key point bias. Construct keypoint pairs, and calculate the difference in variation parameters and the difference in bias for each keypoint pair based on the local feature density parameters and keypoint biases to generate a feature difference field. Perform gradient calculation on the feature difference field to obtain the feature space gradient modulus. The updated initial prediction samples and the initial sample set are input into the discriminator network to perform adversarial training. The generator's total loss function is a weighted sum of the adversarial loss and the regularization loss, and the regularization loss is composed of the total feature difference index and the feature space gradient magnitude. Based on the total loss function of the generator network and the adversarial loss function of the discriminator network, backpropagation is used to update the network parameters of the generator network and the discriminator network. The network parameters include at least the convolution kernel weights, bias terms and normalization parameters. During the continuous updating of network parameters, the total feature difference index and the feature space gradient magnitude are combined to obtain the difference evaluation set. When the feature point satisfies that the feature space gradient magnitude is greater than the total feature difference index, feature resampling is triggered to re-extract local feature data and obtain a new difference evaluation set. The new difference evaluation set is then differentially analyzed with the previous difference evaluation set, and when the difference reaches the convergence threshold after two consecutive training rounds, the trained generator network is output.
2. The data-driven sample model training method according to claim 1, characterized in that, The process of obtaining the initial prediction sample includes: Obtain the initial sample set; The initial sample set and noise vector are converted into input tensors and then transformed layer by layer through the fully connected layer, convolutional layer, upsampling layer and activation layer of the generator network. Each layer performs weighted summation and nonlinear mapping on the input tensor, gradually changing the shape and numerical distribution of the input tensor. Finally, the output layer generates a multidimensional floating-point tensor as the initial prediction sample.
3. The data-driven sample model training method according to claim 2, characterized in that, The construction process of composite feature tensors includes: The differences between sample labels include the differences between the first sample labels, the differences between the second sample labels, and the differences between the third sample labels; The first feature vector is obtained by transforming the difference between the first sample labels with a cosine value. Then, a convolution operation is applied to the local stress amplitude, and the feature gradient is obtained point by point to calculate the magnitude of the feature gradient. A local feature matrix is formed by combining the first feature vector, the magnitude of the feature gradient, and the sample labels according to the same spatial index; By transforming the cosine value of the difference between the labels of the third sample, the second feature vector is obtained, and key points are extracted from each sample in the initial sample set to obtain the key point set. With each key point as the center, a local neighborhood with a fixed radius is established in the feature space. The similarity sequence of spatial location encoding within the local neighborhood is read, and the neighborhood averaging operation is performed to obtain the local feature density parameters corresponding to each key point, so as to form a feature coupling matrix. The feature coupling matrix and the local feature matrix are merged to form a composite feature tensor.
4. The data-driven sample model training method according to claim 3, characterized in that, The process of constructing the training termination condition tensor includes: If the fluctuation range of the loss change sequence within the sliding window is lower than the convergence tolerance threshold, the training is determined to have reached the convergence state, and the output of the convergence judgment function is set to 1 to obtain the convergence confirmation flag. The maximum value of the consistency index is extracted as the final consistency index for the current training round. Then, the final consistency index is verified based on the convergence confirmation flag to obtain the convergence judgment result for each training round. The convergence determination results of each training round are incorporated into the composite feature tensor to form the training termination condition tensor.
5. The data-driven sample model training method according to claim 4, characterized in that, The updated initial predicted samples and the initial sample set are input into the discriminator network to perform adversarial training, and the network parameters are updated, including: The new predicted samples and the initial sample set are input into the discriminator network, which includes at least a fully connected layer, multiple convolutional layers and an upsampling layer. Convolution operations are performed in each convolutional layer to extract feature maps, and a discriminant probability matrix is generated in the output layer. In each training batch, the adversarial loss functions corresponding to the generator network and the discriminator network are obtained based on the discriminant probability matrix. Based on the regularization loss composed of the total feature difference index and the feature space gradient magnitude, and combined with the adversarial loss function corresponding to the generator network, the total loss function of the generator network is obtained. Based on the total loss function of the generator network and the adversarial loss function of the discriminator network, the backpropagation algorithm is used to calculate the gradient of each loss function with respect to the network parameters, and the network parameters of the generator network and the discriminator network are updated along the gradient descent direction respectively.
6. The data-driven sample model training method according to claim 5, characterized in that, The new difference evaluation set is differentially evaluated item by item with the previous difference evaluation set. When the difference reaches a convergence threshold after two consecutive training rounds, the trained generator network is output, including: By subtracting the new difference evaluation set from the previous round of difference evaluation set item by item, a training state feedback set is obtained. If the difference between the total feature difference index and the feature space gradient magnitude in two consecutive rounds of training both reach the convergence threshold, the adversarial training is determined to be stable, and a training termination instruction is triggered to stop the training job, save the final network parameter set, and complete the closed-loop training and archiving.
7. A data-driven sample model training system for implementing the data-driven sample model training method according to any one of claims 1 to 6, characterized in that, include: The generator initial generation module is used to obtain the initial sample set and input it along with the noise vector into the generator network to generate the initial prediction samples. The training pre-convergence module is used to construct a composite feature tensor based on the initial sample set, and to monitor the change trajectory of the generator's total loss based on the feature difference between the initial predicted sample output by the generator and the reference sample label in the discriminator's feature space in each round of training. When the fluctuation of the loss change sequence within the sliding window is lower than the convergence tolerance threshold, the training is determined to be converged, triggering the iterative training termination instruction and outputting the training termination condition tensor. The loss analysis module is used to input the training termination condition tensor as a conditional constraint into the input of the generator network, and combine it with the conditional generator network model to update the initial prediction samples. The updated initial prediction samples and the initial sample set are input into the discriminator network to perform adversarial training. In adversarial training, the total loss of the generator is the weighted sum of the adversarial loss and the regularization loss. The network parameters of the generator network and the discriminator network are updated by backpropagation based on the total loss. The network parameters include at least the convolution kernel weights, bias terms, and normalization parameters. The generator output module is used to trigger feature resampling to update the training data during the continuous updating of network parameters, and output the trained generator network when the difference between two consecutive training rounds reaches the convergence threshold.