A bearing small sample data expansion method and system based on a variational autoencoder
By combining variational autoencoders with dimensionality reduction and dimensionality increase techniques, the problems of feature ambiguity and distortion in small sample bearing data were solved, generating high-quality bearing defect data and improving the model's generation capability and data diversity.
Patent Information
- Application Number
- CN202510255506.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-03-05
AI Technical Summary
Existing generative models suffer from feature ambiguity and distortion in small sample data of bearings, resulting in poor dataset quality. Furthermore, Gaussian mixture models have complex covariance matrix estimation when processing high-dimensional data, leading to inaccurate generated data.
We employ variational autoencoders combined with uniform manifold approximation and projection algorithms for data dimensionality reduction, Gaussian mixture models optimized with regularization and particle swarm optimization for data augmentation, and radial basis functions for dimensionality increase to ensure high-quality data restoration.
It generates high-quality bearing defect data with integrated features, improves the model's generalization ability and the diversity of generated data, avoids artifacts and overfitting problems, and outperforms existing algorithms.
Smart Images

Figure CN120180084B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of deep learning and data augmentation, and in particular, to a bearing small sample data expansion method and system based on a variational autoencoder. BACKGROUND
[0002] In the field of mechanical engineering and industrial manufacturing, bearings are critical mechanical components, and the detection of surface defects is crucial for ensuring the operational efficiency and service life of equipment. Traditional defect detection methods such as manual inspection and image processing, while widely used, have many limitations in terms of efficiency, accuracy, and stability. In recent years, deep learning technology, especially deep convolutional neural networks, has made significant progress in image recognition and object detection tasks. However, these models usually rely on a large amount of labeled data for training, while in actual industrial applications, it is difficult to obtain enough defect samples, resulting in limited data sample size and unbalanced sample distribution. This limits the full learning of defect features by the model, affecting the accuracy of detection and the generalization ability of the model.
[0003] In the field of small sample learning, various generative model methods have been proposed to address the problem of data scarcity. Goodfellow et al. (2020) proposed a generative adversarial network (GAN) to expand the data set by generating new samples. Ruyu Wang (2022) further proposed Defect Transfer GAN (DT-GAN) to generate diverse synthetic defect samples in the case of limited defect samples, effectively alleviating the overfitting problem of GAN on small sample data sets. However, the GAN architecture has high hardware requirements, the training process is unstable, and it needs to reach Nash equilibrium, which makes it perform poorly in the task of generating bearing small sample data.
[0004] As an unsupervised learning neural network, autoencoder (AE) reconstructs input data through an encoder and a decoder to learn the latent representation. Compared with GAN, the training process of AE is more stable, and it is more adaptable to data. Variational autoencoder (VAE) proposed by Kingma et al. (2013) is an improved version of AE, which generates the latent representation of data through variational inference and samples to generate new data. Chen Z et al. (2017) proposed a bearing fault diagnosis method combining sparse autoencoder and deep belief network for VAE, which collects and statistics signals through multiple accelerometers to identify fault signals. Chadebec C et al. (2021) proposed a novel sampling method based on the geometric structure of latent space, which integrates Riemannian geometric elements into VAE and explores the latent space through a random walk algorithm to generate new data points. Experimental results on the OASIS database show that this method can significantly improve the balance accuracy. VQ-VAE (van den Oord et al., 2017) effectively utilizes the latent space to model data features by learning discrete latent representations.
[0005] However, existing VAE networks still face challenges when dealing with high-dimensional small sample bearing defect data sets. Because the features of bearing data overlap and have no obvious rules, the generated samples by VAE often present a scattered and overlapping distribution in the latent space, and there are multiple extreme data points, resulting in artifacts and unrealistic situations in the generated data. Gaussian mixture model (GMM) has unique advantages in modeling and sampling scattered data. GMM not only can perform soft clustering analysis on data, but also can fit the distribution based on existing data to sample new data points that conform to the probability distribution. However, when dealing with high-dimensional data, especially in the case of small sample size, the covariance matrix estimation of GMM becomes complex, and VAE is prone to blur and distortion in high-resolution data generation, affecting the quality of generated defects.
[0006] Therefore, it is necessary to efficiently reduce and restore the data to retain the key features of the data and reduce the dimensionality of the data. Current dimensionality reduction algorithms include PCA (Abdi, H, et al., 2010), t-SNE (van der Maaten L J P, et al., 2008) and UMAP (McInnes L, et al., 2018). As a linear dimensionality reduction method, PCA can achieve dimensionality reduction and restoration, but its effect on complex data sets is limited. While t-SNE and UMAP, as nonlinear dimensionality reduction techniques, perform well in data visualization, but do not support reverse restoration. SUMMARY
[0007] The technical problem to be solved by the present application is:
[0008] In order to solve the limitation of the traditional generation model in bearing small sample data, the characteristics are easy to be blurred and distorted, and the quality of the data set is poor.
[0009] The technical scheme adopted by the present application to solve the above technical problems is:
[0010] The present application provides a bearing small sample data expansion method based on a variational autoencoder, comprising the following steps:
[0011] S100, map the input high-dimensional data to the latent space through the encoder to obtain the latent representation;
[0012] S200, data dimension reduction, in the latent space, use uniform manifold approximation and projection algorithm to reduce the dimension of the data and maintain the topological structure of the data; that is, through the data dimension reduction module, the high-dimensional data generated by the encoder is reduced in dimension, while preserving the high-dimensional feature similarity, and is converted to a low-dimensional space;
[0013] S300, data expansion, use the Gaussian mixture model optimized by combining regularization and particle swarm algorithm to expand the data reduced in step S200 to generate new data points; that is, through the data expansion module, new meaningful data points are generated in the low-dimensional space to solve the problem of overfitting caused by data scarcity and the problem of extreme value and abnormal value caused by uneven data distribution;
[0014] S400, data dimension increase, use radial basis function to increase the dimension of the data expanded in step S300 to accurately map it back to the high-dimensional space; that is, through the data dimension increase module, the expanded low-dimensional data is mapped back to the high-dimensional space;
[0015] S500, reconstruct high-quality defect data with fused features through the decoder.
[0016] Further, in step S200, specifically comprising,
[0017] S210, pre-process the high-dimensional data h i generated by the encoder in a D-dimensional space; by calculating the distance between these data points and based on the preset number of nearest neighbors, adjust the connection number of each data point to determine its nearest neighbor data point, construct a high-dimensional adjacency graph based on similarity calculation, and the edge in the adjacency graph represents the similarity between data points; the similarity s ij is calculated as follows:
[0018]
[0019] In the formula, d(h i ,h j ) is the high-dimensional data point h iand h j is the distance between h i and h i is the distance between h i and the nearest neighbor of h ij is a smooth parameter to adjust the similarity weight;
[0020] S220, mapping the high-dimensional data to an initial low-dimensional space by spectral embedding; first, calculate the similarity ws k between high-dimensional data points, and construct the similarity matrix W, then calculate the degree matrix D, and combine the unit matrix I to construct the Laplacian matrix La:
[0021]
[0022] Eigenvalue decomposition of the Laplacian matrix La, get the eigenvectors v k and its corresponding eigenvalues λ d , select the eigenvectors corresponding to the first d smallest non-zero eigenvalues to form the matrix V i ; in the low-dimensional space, the representation of the initial data point l d is represented by the i-th row of V k matrix:
[0023] Lav k v k , V d = [v1, v2..., v d ], l i = V d [i, : ] (3)
[0024] S230, in the low-dimensional space, construct the low-dimensional adjacency graph by calculating the similarity between data points; the similarity between low-dimensional data points l i and l j is represented as:
[0025] u ij = (1 + a·d(l i , l j ) 2b ) -1 (4)
[0026] In the formula, a and b are positive hyperparameters, and d(l i , l j ) is the distance between l i and l j in the low-dimensional space;
[0027] S240, optimization by minimizing the cross-entropy of high-dimensional and low-dimensional similarity, the objective function L is:
[0028]
[0029] S250, in the optimization process, using the stochastic gradient descent method to minimize the loss function, so as to adjust the low-dimensional embedding, get the optimal low-dimensional data set Wherein, d is the dimension after data dimension reduction, in order to better reflect the structural characteristics of high-dimensional data.
[0030] Further, in step S300, specifically includes,
[0031] S310, in the training process of Gaussian mixture model, set the starting point of model parameters, including mean μ j , mixing weight φ j And covariance matrix Cov j , and add a small regularization term when initializing the covariance matrix;
[0032] The probability that the data point belongs to each component, i.e. the responsibility w ij Is expressed as:
[0033]
[0034] In the formula, the data point l i The responsibility of the jth component is w ij , the multivariate Gaussian distribution probability density function under the mean μ j And the covariance matrix Cov j Is N(l i | μ j , Cov j ), the initial mixing weight is K is the total number of Gaussian components;
[0035] S320, the mean μ generated by the expectation step is optimized, and the particle swarm optimization algorithm is used to search for the optimal mean in the parameter space, and the optimization function is shown in the following formula (7):
[0036]
[0037] S330, by the maximization step, update the model parameters to maximize the data likelihood, and the update formula is as follows:
[0038]
[0039] By iteratively executing the expectation step, PSO and the maximization step, until the iteration termination condition is met, the model is fitted;
[0040] S340, according to the mixing weight, select the Gaussian distribution, and randomly sample new data points from the distribution, expressed as:
[0041] l n ~N(μ j ,Σ j )(10)
[0042] using the known n d-dimensional original data sets to estimate the parameters of the GMM, which are subsequently used to generate m interpolated d-dimensional low-dimensional data sets
[0043] Further, in step S400, specifically includes,
[0044] S410, calculate the Euclidean distance between each point to be interpolated l ni to each known low-dimensional data point l j , get a m x n distance matrix D = [d ij ], where d ij = ||l ni -l j ||;
[0045] S420, the distance matrix obtained in step S410 is sent to the radial basis function for processing, to get a m x n weight matrix R = [r ij ], where, θ is the shape parameter set;
[0046] S430, the weight matrix is normalized so that the sum of each row is 1, to get the normalized weight matrix R n = [r nij ], where,
[0047] S440, multiply the normalized weight matrix with the original high-dimensional data to get the final interpolated data, represented as a m x D matrix H n = [h ni ], where,
[0048] Further, in step S100, the input high-dimensional data is processed by an encoder; the encoder is implemented using a convolutional neural network, including multiple convolutional layers and batch normalization layers, and the activation function is GELU; the encoder maps the input data to the latent space to obtain the latent representation; the input data is a 512 x 512 x 3 RGB image, the encoder contains five convolutional layers and batch normalization layers, the number of convolutional kernels is 32, 64, 128, 256, 512 in turn, the convolutional kernel size is 3 x 3, the step is 2, and the padding is 1, and finally the latent space data is output through a fully connected layer, and the latent space dimension is 100.
[0049] Further, in step S500, the input of the corresponding encoder and decoder is the latent representation with a size of 100, which is expanded to a feature map with a size of 1024*8*8 through a reshape layer; then, the feature map is processed through five deconvolution layers and batch normalization layers, the number of convolution kernels is 1024, 512, 256, 128, 64 and 32 in sequence, the convolution kernel size is 3*3, the step is 2, the padding is 1, and the activation function is GELU, and finally, a reconstructed image with a size of 512*512*3 is output by using a Sigmoid activation function.
[0050] A bearing small sample data expansion system based on a variational autoencoder, which has program modules corresponding to the above steps, and executes the steps of the bearing small sample data expansion method based on the variational autoencoder.
[0051] A computer readable storage medium stores a computer program, which is configured to realize the steps of the bearing small sample data expansion method based on the variational autoencoder when called by a processor.
[0052] Compared with the prior art, the beneficial effects of the present application are:
[0053] The present application successfully solves the small sample data set generation problem by comprehensively utilizing VAE, UMAP, Gaussian mixture model and RBF, and generates high-quality, feature-fused and realistic bearing defect data;
[0054] For the generation of small sample bearing defect images, a model based on a variational autoencoder (VAE) network framework is proposed; by designing a deeper network structure and an efficient activation function, the generation quality of high-resolution bearing images is improved, and blurring and missing details are avoided;
[0055] For the high-dimensional data feature learning problem, a latent space dimension reduction module based on UMAP is proposed, which integrates the dimension reduction capability of UMAP in the latent space of VAE, effectively reduces the gap between the dimension and the number of samples, enhances the model's ability to extract effective defect information, and excludes redundant information;
[0056] In order to expand the rich defect features in the scattered data, a latent space expansion module based on Gaussian mixture model (GMM) is proposed; the mean value in GMM is optimized by particle swarm optimization (PSO), and a small regularization term is added to solve the data anomaly and overfitting problem, so as to generate new data fused with multiple features;
[0057] In order to ensure the complete restoration of the data after dimension reduction, a dimension increasing module based on radial basis function (RBF) is proposed, which embeds RBF in the decoder of VAE, realizes the accurate restoration and diversity recovery of features, generates more realistic data and reduces the occurrence of artifacts.
[0058] Compared with a plurality of existing generation algorithms, the model performs better in FID, KID, IS, perceptual similarity and PRD and the like, proves high matching degree of the generated data and the real data and high quality and diversity of the generated images, in addition, the comparison experiment of the dimension reduction and dimension increase modules further verifies the effectiveness of the algorithm, the public data set also verifies the universality of the model, and the overfitting experiment result shows that when the ratio of the real data and the synthetic data is 1:3, overfitting can be effectively prevented and the generalization ability and data diversity of the model can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0059] Figure 1 A flow chart of a bearing small sample data expansion method based on a variational autoencoder in an embodiment of the application;
[0060] Figure 2 A structural schematic diagram of a data dimension reduction module in an embodiment of the application;
[0061] Figure 3 A structural schematic diagram of a data expansion module in an embodiment of the application;
[0062] Figure 4 A structural schematic diagram of a data dimension increase module in an embodiment of the application;
[0063] Figure 5 A bearing defect data legend in an embodiment of the application;
[0064] Figure 6 A generation algorithm comparison graph in an embodiment of the application;
[0065] Figure 7 A dimension reduction method comparison result graph in an embodiment of the application;
[0066] Figure 8 A dimension reduction effect FID index result box plot in an embodiment of the application;
[0067] Figure 9 A dimension reduction effect IS index result box plot in an embodiment of the application;
[0068] Figure 10 A dimension increase function comparison result graph in an embodiment of the application;
[0069] Figure 11 A dimension increase function test result graph in an embodiment of the application;
[0070] Figure 12 A public data set defect deduction generation graph in an embodiment of the application;
[0071] Figure 13 A training accuracy rate curve comparison graph under different ratios in an embodiment of the application. DETAILED DESCRIPTION
[0072] In order to make the above objectives, characteristics and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0073] Specific implementation scheme one: combination Figures 1 to 4 As shown in the combination, the present application provides a bearing small sample data expansion method based on a variational autoencoder, comprising the following steps:
[0074] S100, mapping the input high-dimensional data into a latent space by an encoder to obtain a latent representation;
[0075] The input high-dimensional data is first processed by the encoder; the encoder is implemented by a convolutional neural network, including multiple convolutional layers and batch normalization layers, and the activation function is GELU; the encoder maps the input data into a latent space to obtain a latent representation; for example, for an RGB image with a size of 512x512x3, the encoder contains five convolutional layers and batch normalization layers, the number of convolutional kernels is 32, 64, 128, 256, and 512 in turn, the convolutional kernel size is 3x3, the step is 2, and the padding is 1; finally, the latent space data is output through a fully connected layer, and the latent space dimension is 100;
[0076] Let the high-dimensional data set be: Wherein, n is the number of data points in the data set, and D is the dimension output by the decoder;
[0077] S200, combination Figure 2 As shown in the combination, in the latent space, a uniform manifold approximation and projection (UMAP) technology is used to reduce the dimension of the data and maintain the topological structure of the data; that is, the high-dimensional data generated by the encoder is effectively reduced in dimension by a data dimension reduction module, while preserving the similarity of high-dimensional features, and is converted to a low-dimensional space; UMAP constructs a high-dimensional adjacency graph by calculating the similarity between data points, and maps the data to a low-dimensional space by spectral embedding; for example, the high-dimensional data generated by the encoder is placed in a D-dimensional space for preprocessing, the connection number of each data point is adjusted based on the preset number of nearest neighbors to determine its nearest neighbor data points by calculating the distance between data points;
[0078] This process significantly reduces the data dimension, reduces the interference of redundant background information, enhances the feature discrimination, and thus improves the learning efficiency of the model; the dimension reduction also provides an efficient basis for the subsequent data expansion step, making the expansion process more accurate and efficient; specifically including,
[0079] S210, placing the high-dimensional data h iThe data points are placed in a D-dimensional space for preprocessing; the number of connections of each data point is adjusted by calculating the distance between the data points and based on a preset number of nearest neighbors to determine its nearest neighbor, a high-dimensional adjacency graph is constructed based on similarity calculation, and the edges in the adjacency graph represent the similarity between the data points; the similarity s ij is calculated as follows:
[0080]
[0081] where d(h i ,h j ) is the distance between the high-dimensional data points h i and h j , p i is the distance from the point h i to the nearest neighbor, and s i is a smoothing parameter for adjusting the similarity weight;
[0082] S220, map the high-dimensional data to an initial low-dimensional space by spectral embedding; first, calculate the similarity ws ij between the high-dimensional data points and construct a similarity matrix W, then calculate the degree matrix D and combine it with the unit matrix I to construct the Laplacian matrix La:
[0083]
[0084] Perform eigenvalue decomposition on the Laplacian matrix La to obtain the eigenvectors v k and their corresponding eigenvalues l k , select the eigenvectors corresponding to the first d smallest non-zero eigenvalues to form the matrix V d ; in the low-dimensional space, the representation of the initial data point l i is represented by the i-th row of the V d matrix as:
[0085] Lav k = l k v k , V d = [v1, v2,..., v d ], l i = V d [i, :]
[0086] S230, in the low-dimensional space, construct a low-dimensional adjacency graph by calculating the similarity between the data points; the similarity between the low-dimensional data points l i and l j can be represented as:
[0087] u ij = (1 + a · d(l i , lj ) 2b ) -1 (4)
[0088] where a and b are positive hyperparameters, d(l i , l j ) is the distance between points l i and l j in the low-dimensional space;
[0089] S240, in order to retain the structural characteristics of the high-dimensional adjacency graph as much as possible, the optimization is finally carried out by minimizing the cross-entropy of the high-dimensional and low-dimensional similarity, and the objective function L is:
[0090]
[0091] S250, in the optimization process, the loss function is minimized using the Stochastic Gradient Descent (SGD) method, so as to adjust the low-dimensional embedding, and obtain the optimal low-dimensional data set where d is the dimension after data dimension reduction, so as to better reflect the structural characteristics of the high-dimensional data;
[0092] S300, as shown in Figure 3 , the Gaussian Mixture Model (GMM) optimized by combining regularization and particle swarm algorithm is used to expand the data after dimension reduction to generate new data points; that is, through the data expansion module, new meaningful data points are generated in the low-dimensional space to solve the problems of overfitting caused by data scarcity and extreme values and outliers caused by uneven data distribution;
[0093] The traditional Gaussian Mixture Model (Gaussian Mixture Model, GMM) is unstable in dealing with these problems, so the GMM is innovatively improved: a regularization term is introduced to enhance the stability of the algorithm, prevent overfitting, and allow the covariance matrix to be singular to ensure stable operation in cases where the traditional GMM cannot cope; in addition, by combining the Particle Swarm Optimization (PSO) algorithm, a global search strategy is realized to avoid falling into local optimum, and data expansion is effectively completed;
[0094] S310, in the training process of the Gaussian Mixture Model (GMM), first set the starting point of the model parameters, including the mean μ j , the mixing weight φ j and the covariance matrix Cov j , and add a small regularization term when initializing the covariance matrix;
[0095] Then, enter the expectation step, that is, calculate the probability of the data point belonging to each component, that is, the responsibility w ijThe process can be represented as:
[0096]
[0097] where the data points l i The responsibility of the jth component is w ij The probability density function of a multivariate Gaussian distribution with mean μ j and covariance matrix Cov j is N(l i | μ j , Cov j ), and the initial mixing weights are K is the total number of Gaussian components;
[0098] S320, the mean μ generated by the expectation step is optimized, and the particle swarm optimization (PSO) algorithm is used to search for the optimal mean in the parameter space, which can avoid the problem of local mean; the optimization function is shown in the following formula (7):
[0099]
[0100] S330, by the maximization step, the model parameters are updated to maximize the likelihood of the data, and the update formula is as follows:
[0101]
[0102] By iteratively performing the expectation step, PSO and the maximization step until the iteration termination condition is met, the model can be fitted;
[0103] S340, according to the mixing weight, a Gaussian distribution is selected, and a new data point is randomly sampled from the distribution, which can be represented as:
[0104] l n ~ N(μ j , Σ j ) (10)
[0105] Through these steps, first, the known n d-dimensional original data set is used to estimate the parameters of the GMM, and these parameters are then used to generate m interpolated d-dimensional low-dimensional data sets
[0106] S400, in combination Figure 4As shown, the extended data is dimensioned by radial basis function (RBF) to accurately map back to high-dimensional space; that is, the extended low-dimensional data is mapped back to high-dimensional space by the data dimensioning module; this step is crucial to the entire data processing flow, because it solves the problem that nonlinear dimensionality reduction methods are difficult to completely restore data, while overcoming the situation that deep learning network performance is limited when data is insufficient, and the challenge that linear dimensioning technology may not work well; this module is based on radial basis function (Radial Basis Function, RBF) for interpolation dimensioning to ensure that diversified data can be accurately restored to provide the necessary data structure for the decoder to ensure the smooth progress of the decoding process and the integrity of the data; specifically including,
[0107] S410, calculate each point l to be interpolated ni to each known low-dimensional data point l j Euclidean distance, get a m*n distance matrix D = [d ij ], where d ij = ||l ni -l j ||;
[0108] S420, the distance matrix obtained in step S410 is sent to radial basis function (RBF) for processing, to obtain a m*n weight matrix R = [r ij ], where θ is the shape parameter set, which is set to 2 in the present application;
[0109] S430, normalize the weight matrix so that the sum of each row is 1, to obtain the normalized weight matrix R n = [r nij ], where,
[0110] S440, multiply the normalized weight matrix with the original high-dimensional data to obtain the final interpolation data, represented as an m*D matrix H n = [h ni ], where
[0111] S500, reconstruct high-quality defect data with fused features through the decoder;
[0112] The input of the decoder is a latent representation with a size of 100, which is expanded to a feature map with a size of 1024x8x8 through a reshape layer. Then, the feature map is processed through five deconvolutional layers and batch normalization layers, with the number of convolutional kernels being 1024, 512, 256, 128, 64, and 32, respectively, the size of the convolutional kernel being 3x3, the step being 2, the padding being 1, and the activation function being GELU. Finally, a Sigmoid activation function is used, and the output size is a reconstructed image with a size of 512x512x3.
[0113] Specific implementation two: the bearing small sample data augmentation system based on the variational autoencoder of the application has program modules corresponding to the above steps, and executes the steps in the bearing small sample data augmentation method based on the variational autoencoder.
[0114] Other combinations and connection relationships of the present embodiment are the same as those of specific implementation one.
[0115] Specific implementation three: the computer readable storage medium of the application stores a computer program, and the computer program is configured to realize the steps of the bearing small sample data augmentation method based on the variational autoencoder when called by the processor.
[0116] Other combinations and connection relationships of the present embodiment are the same as those of specific implementation one.
[0117] Simulation experiment
[0118] I. Data set and experimental configuration
[0119] In this experiment, the bearing data set produced by Harbin Bearing Group was used. The data was collected from the bearing assembly line. In order to ensure the quality of the data, the experiment was conducted in the experimental shed, so as to control the light source and reduce external interference. Figure 5 Examples of the data set are shown, and the data set contains the following types: ON (Outer Surface Normal), OR (Outer Surface Rust), OS (Outer Surface Scratch), SN (Side Surface Normal), and SS (Side Surface Scratch). In each type, 40 representative samples were selected for the experiment.
[0120] The experiment was performed on an Ubuntu 20.04 operating system, based on the PyTorch open source deep learning framework, using Torch1.8.0 and Torchvision 0.8.0 versions. The experimental configuration of the computing resources is an NVIDIA GeForce RTX1080 GPU, and is equipped with 20GB of memory. In the experiment, the data expansion number m is 40, the high dimension D is set to 100, the low dimension d is set to 50, and the total number of Gaussian components used K is 10.
[0121] II. Network comparison experiment
[0122] In order to verify the effectiveness of the model in bearing data generation, comparative experiments were conducted on various generation algorithms, including GAN (Goodfellow et al., 2020), GMVAE (Dilokthanakul et al., 2017), GVAE (Chadebec, C et al., 2021), VQVAE (van den Oord et al., 2017), RHVAE (Chadebec, C et al., 2020) and Stable Diffusion (SD, Rombach et al., 2021). Table 1 lists the evaluation index results of each generation algorithm, including FID (↓), KID (↓), IS (↑), DS (↑) Fβ (↑) and PS (↓).
[0123] Table 1 Generation algorithm test index table
[0124]
[0125] Figure 6 The visual results of different generation algorithms are shown. It can be seen that GAN and GMVAE have insufficient processing capability in the latent space, and the generation effect is not good on the high-dimensional small sample bearing data set, and there are many artifacts; GVAE although introduces Riemann geometry and random walk algorithm, but there are still too many artifacts in the generated data. The data quality generated by VQVAE and RHVAE is relatively good, but there are still blurs in the details. In contrast, the details generated by Stable Diffusion are better, but there are still problems of excessive background redrawing and shape distortion. The model of the present application is best in terms of authenticity, detail retention and artifact control.
[0126] III. Dimensionality reduction module comparison experiment
[0127] The dimensionality reduction module comparison experiment aims to evaluate the influence of different dimensionality reduction methods on the quality of generated data. Four methods of direct dimensionality reduction, PCA dimensionality reduction, t-SNE dimensionality reduction and the dimensionality reduction of the present application are used for testing, and other modules remain unchanged. Figure 7The part of data generated by different dimension reduction methods is shown, and it can be obviously seen that the data generated by the dimension reduction method of the application is clearer in details, has fewer artifacts, and has higher overall quality.
[0128] The FID and IS index evaluation results of the dimension reduction process are shown by box plots of Figure 8 and Figure 9 In the figure, the different colored scatter points represent the results of different dimension reduction methods, and the box contains 50% of the data points. The median and average of each group are also marked in the figure. The dimension reduction method of the application performs best in the median, average, and overall FID and IS, indicating that the generated data after dimension reduction using the application has higher quality and diversity. At the same time, the box height of the application algorithm in the figure is smaller, indicating that the stability and concentration of the generated data are better.
[0129] Four, comparison experiment of dimension increasing module
[0130] The comparison of the dimension increasing module tests the effects of different functions in the data dimension increasing module by ensuring the consistency of the expanded data after each dimension reduction method. Eight functions are tested, including multivariate quadratic, inverse multivariate quadratic, linear, quintic, Gaussian, thin plate spline, inverse quadratic, and cubic functions. The generated results are evaluated.
[0131] As Figure 10 showed, after the dimension reduction module of the application, some representative data generated by different dimension increasing functions were selected. It can be seen that the inverse multivariate quadratic and multivariate quadratic functions performed well in the quality of the data after dimension increasing. They not only can restore and decode the data sampled by the data expansion module with various characteristics, but also can produce defect combinations that do not exist in the original data. At the same time, the combination of these defect features looks very natural, without the chaotic situation of the thin plate spline interpolation data in the figure, and without the artifact phenomenon caused by the harsh fusion of features caused by the Gaussian function in Figure 10 These results show that the use of multivariate quadratic function has good effect on this small sample data set.
[0132] As Figure 11 showed, the FID index results of different functions of the dimension increasing module. From Figure 11 it can be obviously seen that multivariate quadratic, inverse multivariate quadratic, linear, and quintic functions all have good effects, especially the data generated by using the multivariate quadratic function for dimension increasing not only has high quality, but also can adapt to various dimension reduction methods.
[0133] Five, public data set experiment
[0134] In order to further verify the universality of the model, experiments are conducted on public data sets. Figure 12The generation results of three groups of steel surface defects in the FSC-20 large-scale small sample classification data set of Northeastern University are shown. Each category in the data set contains 200 200x200 images, and the deduction process of the defect features can be clearly observed, verifying the effectiveness of the model in generating diversified defects.
[0135] In addition, generation tests were conducted on the public data set CelebAHQ256, and compared with mainstream generation algorithms in recent years, and the results are shown in Table 2. Although the FID of the model in the VAE type network is not the lowest, it surpasses many models in recent years, and the algorithm is for small sample data set generation, which is not good for large sample data set.
[0136] Table 2 Generation algorithm test index table
[0137]
[0138]
[0139] Six, overfitting experiment
[0140] In order to analyze the influence of the mixed data of the generated data and the original data set on the classification detection performance, the following experiment is designed. Different proportions of generated data are combined with the original data to construct multiple mixed data sets, and a classifier based on ResNet18 is trained using these data sets to test its performance. The experiment is divided into five groups, each using a different ratio of virtual and real data, which are 1:0, 1:1, 1:2, 1:3 and 1:4, respectively. Where "1" represents the original data, and "n" represents the proportion of generated data.
[0141] Figure 13 The training results under different data combination ratios are shown. The horizontal axis is the training period (0 to 300), and the vertical axis is the accuracy. Each line represents the training or test accuracy of a certain ratio, where the solid line represents the training accuracy and the dashed line represents the test accuracy. With the increase of training period, the accuracy of all ratios gradually increases and tends to be stable after about 150 cycles. The difference between training and test accuracy is represented by different colors to intuitively reflect the influence of different combination ratios.
[0142] Table 3 shows the specific values of the training and test accuracy of each ratio data set under different training rounds.
[0143] Table 3 Training accuracy table
[0144]
[0145] According to the data in Table 3, the overall accuracy shows an upward trend as the training rounds increase. In particular, when the ratio of virtual to real data is 1:3, the training and testing accuracy of the classifier both perform well, and the gap between them is the smallest, indicating that this ratio effectively controls overfitting. Although the training accuracy is the highest when the ratio is 1:1 at 300 rounds of training, the training and testing accuracy of 1:0, 1:1, and 1:2 have a larger gap, indicating that these ratios have the risk of overfitting.
[0146] In contrast, the ratios of 1:3 and 1:4 effectively suppress the overfitting phenomenon. However, under the ratio of 1:4, although the testing accuracy is high, the decline in training and testing accuracy indicates that too much generated data may cause interference. In other training rounds, the ratio of 1:3 also performs stably in slowing down overfitting. Therefore, the ratio of 1:3 of virtual to real data combination is considered the optimal choice for the generated data set.
[0147] Although the present disclosure is disclosed as above, the protection scope of the present disclosure is not limited to this. Those skilled in the art can make various modifications and changes without departing from the spirit and scope of the present disclosure, and these modifications and changes shall fall within the protection scope of the present disclosure.
Claims
1. A method for augmenting small sample data of bearings based on a variational autoencoder, characterized in that, Includes the following steps: S100. The high-dimensional input data is mapped to the latent space by the encoder to obtain the latent representation; S200, Data Dimensionality Reduction: In the latent space, uniform manifold approximation and projection algorithms are used to reduce the dimensionality of the data while preserving its topological structure; that is, the high-dimensional data generated by the encoder is reduced in dimensionality by the data dimensionality reduction module, while retaining the similarity of high-dimensional features and transforming it into a low-dimensional space. S300, Data augmentation: The Gaussian mixture model optimized by combining regularization and particle swarm optimization is used to augment the data after dimensionality reduction in step S200, generating new data points; that is, the data augmentation module generates new meaningful data points in the low-dimensional space to solve the problems of overfitting caused by data scarcity and extreme values and outliers caused by uneven data distribution. Specifically, including, S310. During the training of the Gaussian mixture model, set the starting point for the model parameters, including the mean. Mixed weights and covariance matrix And a small regularization term is added while initializing the covariance matrix; Calculate the probability that a data point belongs to each component, i.e., the degree of responsibility. Represented as: (6) In the formula, data points Belongs to the The responsibility of each component is In the mean Covariance Matrix The probability density function of the multivariate Gaussian distribution is: The initial mixing weights are , The total number of Gaussian components; S320, the mean value generated by the expected step To optimize, the particle swarm optimization algorithm is used to search for the optimal mean in the parameter space. The optimization function is shown in equation (7) below: (7) S330. By maximizing the likelihood of the data, the model parameters are updated using the following formula: The model is fitted by iteratively executing the desired step, PSO, and maximization step until the iteration termination condition is met. S340. Select a Gaussian distribution based on the mixed weights, and randomly sample new data points from this distribution, as follows: Using the known n d-dimensional original datasets To estimate the parameters of the GMM, which are then used to generate a d-dimensional low-dimensional dataset with m interpolations. ; S400, Data Dimensionality Upgrading: The data expanded in step S300 is upgraded using radial basis functions to accurately map it back to the high-dimensional space; that is, the data dimensionality upgrading module maps the expanded low-dimensional data back to the high-dimensional space. Specifically, including, S410, Calculate each point to be interpolated. To each known low-dimensional data point The Euclidean distance is used to obtain an m×n distance matrix. ,in, ; S420. The distance matrix obtained in step S410 is fed into the radial basis function for processing to obtain an m×n weight matrix. ,in, , The set shape parameters; S430. Normalize the weight matrix so that the sum of each row is 1, thus obtaining the normalized weight matrix. ,in, ; S440. Multiply the normalized weight matrix by the original high-dimensional data to obtain the final interpolated data, represented as an m×D matrix. ,in, ; S500 reconstructs high-quality defect data with fusion characteristics through a decoder.
2. The bearing small sample data augmentation method based on variational autoencoder according to claim 1, characterized in that: Step S200 specifically includes, S210, Transfer the high-dimensional data generated by the encoder The data points are preprocessed in a D-dimensional space. By calculating the distances between these data points and adjusting the number of connections for each data point based on a preset number of nearest neighbors, the nearest neighbor data point is determined. A high-dimensional adjacency graph is constructed based on similarity calculations, where edges represent the similarity between data points. The calculation is as follows: In the formula, High-dimensional data points and The distance between them It is a point Distance to the nearest neighbor It is a smoothing parameter that adjusts the similarity weights; S220. High-dimensional data is mapped to an initial low-dimensional space through spectral embedding; first, the similarity between high-dimensional data points is calculated. And construct a similarity matrix Then calculate the degree matrix. And combined with the identity matrix Constructing the Laplacian matrix : Laplace matrix Perform eigenvalue decomposition to obtain eigenvectors. and its corresponding eigenvalues Select the eigenvectors corresponding to the first d smallest non-zero eigenvalues to form a matrix. ; In low-dimensional space, initial data points The representation is through The first of the matrix The row is represented as: S230. In low-dimensional space, a low-dimensional adjacency graph is constructed by calculating the similarity between data points; low-dimensional data points and The similarity between them is represented as: In the formula, and Positive hyperparameters It is the midpoint of a low-dimensional space. and The distance between them; S240. Optimization is achieved by minimizing the cross-entropy between high-dimensional and low-dimensional similarities. The objective function L is: S250. During the optimization process, stochastic gradient descent is used to minimize the loss function, thereby adjusting the low-dimensional embedding to obtain the optimal low-dimensional dataset. , where d is the dimension after dimensionality reduction of the data, in order to better reflect the structural characteristics of high-dimensional data.
3. The bearing small sample data augmentation method based on variational autoencoder according to claim 1, characterized in that: In step S100, the input high-dimensional data is processed by an encoder. The encoder is implemented using a convolutional neural network, including multiple convolutional layers and batch normalization layers, with GELU as the activation function. The encoder maps the input data into the latent space to obtain the latent representation. The input data is a 512×512×3 RGB image. The encoder contains five convolutional layers and batch normalization layers, with the number of convolutional kernels being 32, 64, 128, 256, and 512 respectively. The kernel size is 3×3, the stride is 2, and the padding is 1. Finally, the latent space data is output through a fully connected layer, with a latent space dimension of 100.
4. The bearing small sample data augmentation method based on variational autoencoder according to claim 3, characterized in that: In step S500, the input to the encoder and decoder is a latent representation of size 100, which is expanded to a feature map of size 1024×8×8 through a reshape layer; then through five deconvolution layers and batch normalization layers, the number of convolution kernels are 1024, 512, 256, 128, 64 and 32 respectively, the kernel size is 3×3, the stride is 2, the padding is 1, the activation function is GELU, and finally the sigmoid activation function is used to output a reconstructed image of size 512×512×3.
5. A bearing small-sample data augmentation system based on a variational autoencoder, characterized in that: The system has a program module corresponding to the steps of any one of the claims 1-4 above, and executes the steps in the above-described method for expanding bearing small sample data based on variational autoencoders when running.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program configured to, when invoked by a processor, implement the steps of the bearing small sample data augmentation method based on a variational autoencoder as described in any one of claims 1-4.
Citation Information
Patent Citations
Methods for prognosing mechanical systems
US20100023307A1
Multi-directional scene text recognition method and system based on multi-element attention mechanism
US20220121871A1