Label-free data deep learning method based on auto-encoder structure
By building a dual-channel network structure and latent spatial alignment mechanism, the problems of limited potential spatial structure and insufficient feature distribution in unsupervised learning are solved, and efficient and stable label-free data feature extraction and downstream tasks are realized.
Patent Information
- Application Number
- CN202510548142.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When processing unsupervised learning methods, there are problems such as limited potential spatial structure, insufficient sample feature distribution, insufficient representation consistency and discrimination in the latent space, and lack effective latent spatial coupling and distribution alignment methods, resulting in limited improvement in model performance.
A dual-channel network structure containing variational autoencoder branches and semantic representation branches is constructed. Through the latent spatial alignment mechanism and joint optimization objectives, the latent variable representation and semantic feature representation of labelless data are extracted, and combined with reconstruction error, potential alignment loss and semantic comparison loss are combined for joint optimization.
It significantly improves the feature extraction effect of label-free data, improves the consistency of potential spatial distribution and the adaptability of unsupervised learning, enhances the stability and discriminant nature of feature expression, and is suitable for downstream tasks such as classification, clustering, retrieval and abnormal detection.
Smart Images

Figure CN120409598A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of deep learning and unsupervised learning, and particularly to a deep learning method for unlabeled data based on an autoencoder structure. Background Art
[0002] In the fields of deep learning and unsupervised learning, how to efficiently and accurately extract latent features from large-scale unlabeled data has always been an important topic in artificial intelligence research. With the continuous expansion of the data scale and the continuous increase in annotation costs, the traditional method of relying on labeled samples for supervised training has gradually become difficult to meet the actual application requirements. The utilization efficiency of unlabeled data and the feature extraction ability have become the key factors restricting the performance improvement of unsupervised learning models.
[0003] Existing unsupervised feature learning methods, such as autoencoders, variational autoencoders, and contrastive learning, have been widely applied in fields such as image recognition, natural language processing, and anomaly detection. These methods respectively improve the representation ability of unlabeled data through reconstruction loss, latent distribution modeling, or similarity measurement. However, the single-branch modeling method often faces problems such as limited latent space structure and insufficient exploration of sample feature distributions, resulting in unstable performance when dealing with complex or highly diverse unlabeled data sets. In addition, existing contrastive learning methods have certain limitations in the generation and utilization of positive and negative sample pairs in unsupervised scenarios, making it difficult to ensure the consistency and discriminability of the representations in the latent space.
[0004] In terms of multi-branch feature modeling and latent space alignment, although some studies have attempted to fuse the encoding-decoding structure and the contrastive learning mechanism, there are usually no effective means for latent space coupling and distribution alignment, resulting in poor co-modeling effects between different feature paths. At the same time, in the joint loss optimization process, the balanced design of the three types of objectives of reconstruction, contrast, and alignment also lacks systematic research, restricting the further improvement of the overall performance of the model.
[0005] Therefore, how to provide a deep learning method for unlabeled data based on an autoencoder structure is an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0006] An object of the present invention is to propose a deep learning method for unlabeled data based on an autoencoder structure. The present invention constructs a dual-path network structure including a variational autoencoder branch and a semantic representation branch, extracts the latent variable representation and semantic feature representation of unlabeled data, introduces a latent space alignment mechanism based on the corresponding relationship between the two, and constructs a joint optimization objective by combining the reconstruction error, latent alignment loss, and semantic contrast loss. Finally, the optimized feature representation is output for input to downstream tasks, with the advantages of excellent feature extraction effect, high consistency of latent space distribution, and strong adaptability to unsupervised learning.
[0007] A deep learning method for unlabeled data based on an autoencoder structure according to an embodiment of the present invention includes the following:
[0008] S1. Obtain an unlabeled data set, perform unified normalization preprocessing on each original input data in the unlabeled data set, and construct a standardized input tensor;
[0009] S2. Input the standardized input tensor into the first branch network and the second branch network respectively, extract the potential distribution characteristics of the standardized input tensor, and generate a latent variable representation. The first branch network adopts a variational autoencoder structure to encode and decode the standardized input tensor;
[0010] S3. In the second branch network, based on the same standardized input tensor, generate positive sample pairs and negative sample pairs through two different data augmentation strategies, and input the positive sample pairs and negative sample pairs into sub-encoders with the same structure and shared parameters respectively to extract their respective semantic representations;
[0011] S4. Based on the correspondence between the latent variable representation generated by the first branch network and the semantic representation generated by the second branch network, construct a latent space alignment loss to constrain the two branches to align the representation distributions in the latent space;
[0012] S5. Construct a joint loss function and jointly optimize the first branch network and the second branch network;
[0013] S6. Based on the jointly optimized first branch network and second branch network, output the feature representation of the unlabeled data for input to downstream tasks.
[0014] Optionally, the S1 specifically includes:
[0015] S11. Obtain an unlabeled data set and convert each original data sample in the unlabeled data set into a data vector with a fixed dimension;
[0016] S12. Perform normalization processing on the eigenvalue of each dimension of the data vector to map all eigenvalues to a unified numerical interval;
[0017] S13. According to the set batch size, sequentially combine the normalized data vectors into batch data and construct a three-dimensional tensor structure. The dimensions of the three-dimensional tensor structure include batch size, feature dimension, and number of channels;
[0018] S14. Use the constructed three-dimensional tensor structure as the standardized input tensor and provide it to the first branch network and the second branch network as input respectively.
[0019] Optionally, the S2 specifically includes:
[0020] S21. Guide the standardized input tensor to the modeling entrances of the first branch network and the second branch network respectively through the input scheduling process, for parallelly establishing the basic paths of the latent variable representation and the semantic representation;
[0021] S22. In the first branch network, based on the predefined variational autoencoder structure, input the standardized input tensor into the encoding path, and perform feature compression on the standardized input tensor within the encoding path to extract the corresponding mean vector and variance vector for representing the distribution information of the input data in the latent space;
[0022] S23. Based on the mean vector and variance vector, construct a latent Gaussian distribution in the standard normal form, and through the reparameterization sampling mechanism, generate a latent hidden variable tensor from the latent Gaussian distribution as the intermediate representation in the latent space;
[0023] S24. Input the latent hidden variable tensor into the decoding path dual to the encoding path structure, perform a reconstruction mapping operation to map the latent hidden variable tensor back to the tensor space to generate a reconstructed tensor;
[0024] S25. Separate the latent hidden variable tensor from the decoding path and store it as the latent variable representation output by the first branch network, and subsequently guide it to the latent space alignment mechanism to establish a representation correspondence relationship with the semantic representation generated by the second branch network;
[0025] S26. While the above first branch network is executing, synchronously route the same standardized input tensor to the second branch network as the original input basis for constructing the contrast sample and establishing the semantic representation path, maintaining the structural-level parallelism of the two branches.
[0026] Optionally, the first branch network is composed of an encoding path, a latent variable sampling path, and a decoding path, specifically including:
[0027] The encoding path includes three consecutive stacked feature compression units, and each feature compression unit sequentially includes a linear transformation layer, an activation function layer, and a normalization layer. The encoding path performs layer-by-layer feature mapping on the standardized input tensor and outputs an intermediate representation;
[0028] At the output end of the encoding path, a mean extraction branch and a variance extraction branch are provided, and the two branches are respectively composed of independent linear transformation layers for generating the mean vector and variance vector in the latent space;
[0029] The latent variable sampling path includes a standard normal perturbation generation unit and a parameter scaling unit. The sampling path constructs a latent Gaussian distribution based on the mean vector and variance vector and performs reparameterization sampling to generate a latent hidden variable tensor;
[0030] The decoding path is the dual structure of the encoding path and includes three layers of feature reconstruction units. Each feature reconstruction unit sequentially includes a linear mapping layer, an activation function layer, and a channel restoration layer. The decoding path performs an inverse feature mapping on the latent variable tensor and outputs a reconstructed tensor with the same dimension as the normalized input tensor;
[0031] A latent variable extraction interface is provided at the backend of the decoding path to directly output the latent variable representation, and the latent variable representation is connected to the latent space alignment mechanism;
[0032] The structures of the first branch network are optimized by the joint loss function during the training process. The joint loss function includes a reconstruction error term and a distribution regularization term, which are used to synchronously optimize the structural parameters in the encoding path, the sampling path, and the decoding path.
[0033] Optionally, the second branch network includes a positive and negative sample generation path and a semantic representation extraction path, specifically including:
[0034] The positive and negative sample generation path receives the normalized input tensor and generates a pair of enhanced samples through two parallel data augmentation strategies, which are respectively used as the positive sample and the negative sample for input;
[0035] The semantic representation extraction path includes two sub-encoding paths with the same structure and shared parameters. Each sub-encoding path is sequentially composed of three layers of feature extraction units. Each feature extraction unit sequentially includes a linear transformation layer, an activation function layer, and a normalization layer;
[0036] The positive sample and the negative sample are respectively input into the two sub-encoding paths. After being processed by the same structure, the corresponding semantic representation vectors are respectively generated;
[0037] The two semantic representation vectors are used as positive and negative contrast samples and are output to the contrast loss function construction path to measure the expression similarity and participate in the training optimization of the second branch network;
[0038] The representation vectors output by the semantic representation extraction path are synchronously transmitted to the latent space alignment mechanism for representation alignment processing with the latent variable representation generated by the first branch network;
[0039] The second branch network optimizes its parameters through the joint loss function during the training process.
[0040] Optionally, the S3 specifically includes:
[0041] S31: Receive the normalized input tensor and respectively guide it to the first enhancement path and the second enhancement path. The two enhancement paths respectively perform transformation processing on the normalized input tensor by using different data augmentation strategies;
[0042] S32. In the first enhancement path, perform operations of randomly cropping the image, perturbing the scale, and perturbing the color to generate a first enhanced sample;
[0043] S33. In the second enhancement path, perform operations of random occlusion, rotational perturbation, and channel permutation to generate a second enhanced sample;
[0044] S34. Take the first enhanced sample as the positive sample input and the second enhanced sample as the negative sample input, and respectively guide them to two sub-encoding paths with the same structure and shared parameters;
[0045] S35. In each sub-encoding path, perform three-layer feature extraction operations in sequence. Each feature extraction operation sequentially includes linear transformation processing, activation function transformation, and normalization processing, and map the positive and negative input samples into fixed-length semantic representation vectors;
[0046] S36. Output two fixed-length semantic representation vectors, which are respectively labeled as the positive sample semantic representation and the negative sample semantic representation.
[0047] Optionally, the S4 specifically includes:
[0048] S41. Obtain the latent variable representation generated after being processed by the encoding path and the latent variable sampling path of the first branch network, and the positive sample semantic representation and the negative sample semantic representation generated after the second branch network is processed by the data enhancement and semantic representation extraction path;
[0049] S42. Respectively perform normalization processing on the latent variable representation and the positive sample semantic representation;
[0050] S43. Calculate the Euclidean distance in the latent space between the normalized latent variable representation and the positive sample semantic representation to generate the positive alignment distance in the latent space;
[0051] S44. Perform normalization processing on the latent variable representation and the negative sample semantic representation with the same scale, and calculate the Euclidean distance between the latent variable representation and the negative sample semantic representation to generate the negative alignment distance in the latent space;
[0052] S45. Based on the difference between the above positive alignment distance and negative alignment distance, construct a latent space alignment loss function:
[0053]
[0054] Among them, z represents the latent variable representation, h - ,
[0055] ,
[0054] , , + , , ,
[0053] represents the positive sample semantic representation, h - represents the negative sample semantic representation, and m is the set alignment boundary hyperparameter.
[0055] Optionally, the combined loss function is constructed through the following process:
[0056] Obtain the reconstructed tensor and the normalized input tensor output by the first branch network respectively, and calculate the reconstruction loss function L based on the element-wise difference between the reconstructed tensor and the normalized input tensor rec :
[0057]
[0058] where x i represents the i-th sample of the normalized input tensor, represents the corresponding reconstructed tensor, and N represents the total number of samples;
[0059] Obtain the positive sample semantic representation h + and the negative sample semantic representation h - generated in the second branch network, and construct the semantic contrast loss function L con :
[0060]
[0061] where sim(h,z) represents the cosine similarity calculation between the semantic representation and the latent variable representation, and τ is the temperature coefficient hyperparameter;
[0062] Combine the above reconstruction loss function, latent space alignment loss function and semantic contrast loss function in a weighted combination manner to form a complete combined loss function L total :
[0063] L total = λ1L rec + λ2L align + λ3L con ;
[0064] where λ1, λ2, and λ3 are preset weighting coefficients.
[0065] Optionally, the S5 specifically includes:
[0066] S51. Taking the combined loss function L total as the optimization target, backpropagate the combined loss function to the encoding path, latent variable sampling path and decoding path of the first branch network, and calculate the gradient of each structural parameter in the first branch network with respect to the combined loss function;
[0067] S52. At the same time, backpropagate the combined loss function L totalBackpropagate to the data augmentation path and semantic representation extraction path of the second branch network, and calculate the gradient of each structural parameter in each path of the second branch network with respect to the joint loss function;
[0068] S53. Based on the gradients of the structural parameters of each path of the first branch network and the second branch network calculated, use the gradient descent optimization algorithm to perform parameter update to form the updated network structural parameters:
[0069]
[0070] where, θ (t) represents the set of network structural parameters at the t-th optimization iteration, and η represents the learning rate hyperparameter;
[0071] S54. Iteratively execute the above network structural parameter update operation multiple times until the joint loss function L total meets the preset convergence condition.
[0072] Optionally, the S6 specifically includes:
[0073] S61. Based on the first branch network after joint optimization, obtain the latent variable representation corresponding to the normalized input tensor;
[0074] S62. Based on the second branch network after joint optimization, obtain the semantic representation corresponding to the latent variable representation, and perform a concatenation operation on the latent variable representation and the semantic representation to generate a fused feature representation vector;
[0075] S63. Perform scale normalization processing on the fused feature representation vector and form the final feature representation with a unified dimension and scale;
[0076] S64. Use the final feature representation as the normalized output result and export it to the subsequent downstream tasks as the input data of the downstream tasks.
[0077] The beneficial effects of the present invention are:
[0078] (1) By designing the double-branch architecture of the first branch network and the second branch network, the present invention extracts the latent variable representation with the variational autoencoder structure and the semantic representation with the contrastive learning mechanism respectively, and introduces an alignment mechanism in the latent space. By calculating the Euclidean distance difference between the latent variable representation and the semantic representations of positive and negative samples to construct the alignment loss, it can effectively alleviate the problems of disordered latent space distribution and unstable feature expression in unsupervised learning, achieve an optimized balance between the expression consistency and discriminability of the extracted features, and significantly improve the feature learning quality of unlabeled data.
[0079] (2) The tagless data processing flow proposed by the present invention forms a complete closed-loop path covering feature compression, latent variable sampling, feature enhancement, and multi-channel semantic mapping, from data normalization, construction of the standardized input tensor, to generation of positive and negative sample pairs based on different enhancement strategies, and extraction of high-dimensional semantic representations through sub-encoders with shared parameters. By introducing a unified specification in the data preprocessing stage and adversarial enhancement in the feature extraction stage, the adaptability of the model to complex and heterogeneous tagless data is significantly enhanced, while the diversity and robustness of the feature distribution are improved, laying a solid feature foundation for subsequent downstream tasks.
[0080] (3) The present invention innovatively proposes an optimization strategy of fusing the reconstruction loss, latent space alignment loss, and semantic contrast loss to construct a unified joint loss function, breaking the limitation of traditional unsupervised learning that only uses reconstruction accuracy or single contrast learning as the optimization goal. By setting reasonable weighting coefficients, comprehensively measuring the reconstruction of input data, the consistency of latent distributions, and the effect of positive and negative semantic discrimination, all-round and multi-angle optimization of model training is achieved, greatly improving the stability, convergence speed, and accuracy of the final feature representation of the unsupervised learning model, providing a more efficient and systematic solution for in-depth feature mining of tagless data.
[0081] (4) In the feature output stage of the present invention, by fusing the latent variable representation generated by the first branch and the semantic representation generated by the second branch, and performing scale normalization on the fused feature vector, a standardized feature output with a unified dimension and good scale adaptability is formed, which can be directly applied to various downstream intelligent application tasks such as classification, clustering, retrieval, and anomaly detection. Compared with traditional unsupervised feature extraction methods, the features generated by the present invention not only have higher expression accuracy and discriminability, but also can maintain good generalization performance and application effects in scenarios of cross-domain migration, limited sample size, or significant changes in data distribution, having broad practical application prospects and engineering value. BRIEF DESCRIPTION OF THE DRAWINGS [[ID=~10]]
[0082] The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention and do not constitute a limitation to the present invention. In the drawings:
[0083] Figure 1 is the overall flowchart of a deep learning method for tagless data based on an autoencoder structure proposed by the present invention;
[0084] Figure 2 is the schematic diagram of the dual-branch network structure of a deep learning method for tagless data based on an autoencoder structure proposed by the present invention;
[0085] Figure 3Flowchart for constructing and optimizing the joint loss function of the latent space alignment mechanism of a deep learning method for unlabeled data based on an autoencoder structure proposed by the present invention. Detailed implementation manners
[0086] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are all simplified schematic diagrams, only illustrating the basic structure of the present invention in a schematic manner, and therefore only showing the components related to the present invention.
[0087] Refer to Figure 1 , a deep learning method for unlabeled data based on an autoencoder structure, comprising the following steps:
[0088] S1. Obtain an unlabeled data set, and perform unified normalization preprocessing on each original input data in the unlabeled data set to construct a standardized input tensor;
[0089] Optionally, S1 specifically includes:
[0090] S11. Obtain an unlabeled data set, and convert each original data sample in the unlabeled data set into a data vector with a fixed dimension;
[0091] S12. Perform normalization processing on the eigenvalue of each dimension of the data vector to map all eigenvalues to a unified numerical interval;
[0092] S13. According to the set batch size, sequentially combine the normalized data vectors into batch data, and construct a three-dimensional tensor structure, the dimensions of the three-dimensional tensor structure including the batch size, the feature dimension, and the number of channels;
[0093] S14. Use the constructed three-dimensional tensor structure as the standardized input tensor, and provide it to the first branch network and the second branch network as inputs respectively.
[0094] The present invention proposes a deep learning method for unlabeled data based on an autoencoder structure. By introducing a standardized input processing flow, the consistency and standardization of unlabeled data preprocessing are significantly improved, ensuring the unity and comparability of the input data for subsequent deep learning models. Through normalization processing, each original input data is effectively mapped to a unified numerical interval, enhancing the stability and feature expression ability of the data and reducing the modeling difficulty caused by the distribution differences of the original data. The method of constructing batch data combinations and three-dimensional tensors provides a structured input basis for the parallel modeling of subsequent branch networks, greatly improving the overall processing efficiency and the coherence of feature extraction. At the same time, through the standardized processing flow, the adverse effects of the external environment, data source heterogeneity, etc. on the feature extraction results are reduced, and the robustness and adaptability of the model are improved. Compared with traditional unsupervised learning methods, the present invention can more fully explore the potential feature space of unlabeled data, improve the data utilization rate and model performance of subsequent downstream tasks, and lay a solid foundation for the application of unlabeled data in fields such as classification, clustering, and retrieval.
[0095] S2. Input the standardized input tensors into the first branch network and the second branch network respectively to extract the potential distribution features of the standardized input tensors and generate latent variable representations. The first branch network adopts a variational autoencoder structure to encode and decode the standardized input tensors.
[0096] Optionally, S2 specifically includes:
[0097] S21. Guide the standardized input tensors to the modeling entrances of the first branch network and the second branch network respectively through the input scheduling process to establish the basic paths for parallelly generating latent variable representations and semantic representations.
[0098] S22. In the first branch network, based on the predefined variational autoencoder structure, input the standardized input tensors into the encoding path, and compress the features of the standardized input tensors within the encoding path to extract the corresponding mean vector and variance vector for representing the distribution information of the input data in the latent space.
[0099] S23. Based on the mean vector and variance vector, construct a latent Gaussian distribution in the standard normal form, and generate a latent hidden variable tensor from the latent Gaussian distribution through the reparameterization sampling mechanism as the intermediate representation in the latent space.
[0100] S24. Input the latent hidden variable tensor into the decoding path dual to the encoding path structure to perform a reconstruction mapping operation, map the latent hidden variable tensor back to the tensor space, and generate a reconstructed tensor.
[0101] S25. Detach the potential latent variable tensor from the decoding path and store it as the latent variable representation output by the first branch network, which is subsequently guided to the latent space alignment mechanism to establish a representation correspondence with the semantic representation generated by the second branch network;
[0102] S26. While the first branch network is executing, synchronously route the same normalized input tensor to the second branch network as the original input basis for constructing contrast samples and establishing the semantic representation path, maintaining structural-level parallelism between the two branches.
[0103] The first branch network consists of an encoding path, a latent variable sampling path, and a decoding path, specifically including:
[0104] The encoding path includes three consecutive stacked feature compression units. Each feature compression unit sequentially includes a linear transformation layer, an activation function layer, and a normalization layer. The encoding path performs layer-by-layer feature mapping on the normalized input tensor and outputs an intermediate representation;
[0105] At the output end of the encoding path, a mean extraction branch and a variance extraction branch are provided. The two branches are respectively composed of independent linear transformation layers and are used to generate the mean vector and variance vector of the latent space;
[0106] The latent variable sampling path includes a standard normal perturbation generation unit and a parameter scaling unit. The sampling path constructs a latent Gaussian distribution based on the mean vector and variance vector and performs reparameterized sampling to generate a latent latent variable tensor;
[0107] The decoding path is the dual structure of the encoding path and includes three feature reconstruction units. Each feature reconstruction unit sequentially includes a linear mapping layer, an activation function layer, and a channel recovery layer. The decoding path performs inverse feature mapping on the latent latent variable tensor and outputs a reconstructed tensor with the same dimension as the normalized input tensor;
[0108] At the backend of the decoding path, a latent variable extraction interface is provided to directly output the latent variable representation, and the latent variable representation is connected to the latent space alignment mechanism;
[0109] Each structure of the first branch network is optimized by a joint loss function during the training process. The joint loss function includes a reconstruction error term and a distribution regularization term, which are used to synchronously optimize the structural parameters in the encoding path, sampling path, and decoding path.
[0110] The second branch network includes a positive and negative sample generation path and a semantic representation extraction path, specifically including:
[0111] The strong samples are respectively input as positive and negative samples;
[0112] The positive and negative sample generation path of the semantic table receives a standardized input tensor and generates a pair of augmented samples through two data augmentation strategies configured in parallel. The representation extraction path includes two sub-encoding paths with the same structure and shared parameters. Each sub-encoding path is sequentially composed of three feature extraction units, and each feature extraction unit sequentially includes a linear transformation layer, an activation function layer, and a normalization layer;
[0113] The positive sample and the negative sample are respectively input into the two sub-encoding paths. After being processed by the same structure, corresponding semantic representation vectors are respectively generated;
[0114] The two semantic representation vectors are used as positive and negative contrast samples and output to the contrast loss function construction path to measure the expression similarity and participate in the training and optimization of the second branch network;
[0115] The representation vector output by the semantic representation extraction path is synchronously transmitted to the latent space alignment mechanism for representation alignment processing with the latent variable representation generated by the first branch network;
[0116] During the training process of the second branch network, parameter optimization is performed through the joint loss function.
[0117] Based on the standardized input tensor, the present invention extracts the latent variable representation and the semantic representation by respectively inputting the data into the first branch network and the second branch network, greatly improving the accuracy and expressiveness of the feature modeling of unlabeled data. By adopting an encoder-decoder structure in the first branch network, the latent distribution information of the input data can be effectively refined, and through the reconstruction and sampling of the standard normal latent space, the stability and interpretability of the latent features are enhanced. The second branch network forms multi-angle and multi-scale contrast expressions based on the semantic enhancement mechanism, thereby improving the consistency and discriminability of the feature representation. The entire process not only improves the characterization quality of the latent features, but also ensures the high correlation and complementarity between the output features of different branches through the latent space alignment strategy. Compared with traditional methods, the present invention has significant advantages in latent variable extraction and representation consistency control, effectively alleviating problems such as disordered feature space distribution and overfitting in unlabeled learning, and providing a more solid and reliable feature basis for subsequent downstream applications such as classification, clustering, and retrieval.
[0118] S3. In the second branch network, based on the same standardized input tensor, positive sample pairs and negative sample pairs are generated through two different data augmentation strategies, and the positive sample pairs and negative sample pairs are respectively input into sub-encoders with the same structure and shared parameters to extract their respective semantic representations;
[0119] Optionally, the S3 specifically includes:
[0120] S31. Receive the standardized input tensor and direct it to the first enhancement path and the second enhancement path respectively. The two enhancement paths respectively apply different data enhancement strategies to transform the standardized input tensor.
[0121] S32. In the first enhancement path, perform operations of random image cropping, scale perturbation, and color perturbation to generate the first enhanced sample.
[0122] S33. In the second enhancement path, perform operations of random occlusion, rotation perturbation, and channel permutation to generate the second enhanced sample.
[0123] S34. Take the first enhanced sample as the positive sample input and the second enhanced sample as the negative sample input, and direct them to two sub-encoding paths with the same structure and shared parameters respectively.
[0124] S35. In each sub-encoding path, perform three-layer feature extraction operations in sequence. Each feature extraction operation sequentially includes linear transformation processing, activation function transformation, and normalization processing, and map the positive and negative input samples to fixed-length semantic representation vectors.
[0125] S36. Output two fixed-length semantic representation vectors, which are respectively marked as the positive sample semantic representation and the negative sample semantic representation.
[0126] The present invention introduces a dual-path data enhancement strategy in the second branch network. By applying different enhancement methods to the standardized input tensor respectively to generate positive sample pairs and negative sample pairs, it effectively improves the contrast expression ability in the feature learning of unlabeled data. Through diverse enhancement means such as random image cropping, scale perturbation, color perturbation, random occlusion, rotation perturbation, and channel permutation, it greatly enriches the variability and diversity of samples, and enhances the robustness and generalization ability in the feature extraction process. After the positive and negative samples are processed by the sub-encoder with shared parameters, fixed-length semantic representation vectors can be generated, providing a solid foundation for subsequent latent space alignment and contrast learning. Compared with traditional single-enhancement or non-enhancement methods, the present invention improves the sensitivity of the model to potential feature differences through the positive and negative sample pair generation mechanism, effectively strengthens the discriminability of semantic feature representations, significantly improves the feature representation quality and model stability in the unlabeled learning scenario, and provides higher-quality input feature support for various downstream intelligent tasks.
[0127] S4. Based on the correspondence between the latent variable representation generated by the first branch network and the semantic representation generated by the second branch network, construct a latent space alignment loss to constrain the two branches to align the representation distributions in the latent space.
[0128] Optionally, S4 specifically includes:
[0129] S41. Obtain the latent variable representation generated after processing by the encoding path and the latent variable sampling path of the first branch network, as well as the positive sample semantic representation and the negative sample semantic representation generated after processing by the second branch network through data augmentation and semantic representation extraction path;
[0130] S42. Perform normalization processing on the latent variable representation and the positive sample semantic representation respectively;
[0131] S43. Calculate the Euclidean distance in the latent space between the normalized latent variable representation and the positive sample semantic representation to generate the positive alignment distance in the latent space;
[0132] S44. Perform normalization processing on the latent variable representation and the negative sample semantic representation at the same scale, and calculate the Euclidean distance between the latent variable representation and the negative sample semantic representation to generate the negative alignment distance in the latent space;
[0133] S45. Based on the difference between the above positive alignment distance and negative alignment distance, construct a latent space alignment loss function:
[0134]
[0135] where z represents the latent variable representation, h + represents the positive sample semantic representation, h - represents the negative sample semantic representation, and m is a set alignment boundary hyperparameter.
[0136] Through this formula, the system can accurately measure the Euclidean distance between the latent variable representation and the positive sample semantic representation, and compare it with the distance difference between the latent variable representation and the negative sample semantic representation, thereby dynamically constraining the distribution structure of the latent representation. When the latent variable representation is closer to the positive sample and farther from the negative sample, the loss function value tends to be minimized. Conversely, optimization pressure is exerted to promote the model to adjust the latent representation to meet the expected alignment requirements. The introduction of this formula effectively enhances the modeling ability of semantic consistency in the latent space, improves the discriminability and robustness of feature representation, and avoids the problems of chaotic latent feature distribution and insufficient discriminative power in traditional unsupervised methods. Through this alignment mechanism, the present invention can construct a more organized and discriminative latent feature space in the unlabeled learning scenario, provide more expressive and consistent input features for subsequent downstream tasks such as classification and clustering, and greatly improve the overall model performance and application effect.
[0137] By aligning the latent variable representations generated by the first branch network with the semantic representations generated by the second branch network in the latent space, the present invention effectively realizes the consistency modeling between different feature paths. By constructing a latent space alignment loss, it forces the distance between the latent variable representation and the positive sample semantic representation to be as close as possible, while maintaining a reasonable separation from the negative sample semantic representation, thereby ensuring that the latent space structure has better discriminability and expression consistency. This mechanism not only enhances the discriminative ability of latent features, but also effectively reduces the problems of feature aliasing and semantic ambiguity in the unsupervised learning process, improving the robustness of feature extraction and the accuracy of downstream applications. Compared with traditional methods that simply rely on reconstruction or contrast loss optimization, the present invention realizes the distribution constraint of the latent space through the alignment mechanism, greatly improving the quality and stability of the model's learning of latent representations under unlabeled data conditions, and greatly expanding the applicability and reliability of unlabeled deep learning in complex application scenarios.
[0138] S5. Construct a joint loss function and jointly optimize the first branch network and the second branch network;
[0139] Optionally, the joint loss function is constructed through the following process:
[0140] Obtain the reconstructed tensor and the normalized input tensor output by the first branch network respectively, and calculate the reconstruction loss function L based on the element-wise difference between the reconstructed tensor and the normalized input tensor rec :
[0141]
[0142] where x i represents the i-th sample of the normalized input tensor, represents the corresponding reconstructed tensor, and N represents the total number of samples;
[0143] By calculating the element-wise difference between the reconstructed tensor and the normalized input tensor output by the first branch network, the quality of the model's ability to restore the original input data is quantified. The addition of this formula can effectively constrain the information transfer process between the encoder and the decoder, prompting the latent features extracted by the encoding path to retain the key information of the input data as completely as possible while maintaining efficient compression, thereby enhancing the authenticity and reliability of the latent space representation. As a basic optimization objective, the reconstruction loss stably guides the network to learn the distribution law of the input data during the overall training process, avoiding the occurrence of information loss or deviation accumulation during the feature extraction process. Compared with traditional methods that only rely on contrast loss or alignment loss, the present invention effectively improves the stability and feature quality of the model's self-supervised learning under unlabeled conditions by introducing the reconstruction loss, provides a more accurate and interpretable feature representation basis for downstream tasks, and significantly enhances the application value and promotion ability of the model.
[0144] Obtain the positive sample semantic representation h generated in the second branch network + and the negative sample semantic representation h - , and construct a semantic contrast loss function L based on the similarity calculation between the positive sample semantic representation and the negative sample semantic representation con :
[0145]
[0146] where sim(h, z) represents the cosine similarity calculation between the semantic representation and the latent variable representation, and τ is the temperature coefficient hyperparameter;
[0147] By calculating the cosine similarity between the positive sample semantic representation and the latent variable representation and comparing it with the similarity of the negative sample semantic representation, a semantic contrast loss is constructed, effectively strengthening the model's ability to model semantic relationships. This formula can prompt positive sample pairs to be closer in the feature space, while pushing negative sample pairs farther away, enhancing the discriminability and robustness of the feature representation. Introducing the semantic contrast loss helps the model automatically learn the implicit association between latent features and semantic features under unsupervised conditions, avoid the problem of feature space aliasing, and improve the application effect of feature vectors in downstream tasks such as classification, clustering, and retrieval. Compared with the traditional method optimized only by reconstruction error, the present invention combines a semantic contrast mechanism, making the learned features not only have the ability to reconstruct the original data, but also have strong discriminability at the semantic level, significantly improving the adaptability and generalization performance of the overall system in complex data environments.
[0148] Combine the above reconstruction loss function, latent space alignment loss function, and semantic contrast loss function in a weighted combination manner to form a complete joint loss function L total :
[0149] L total =λ1L rec +λ2L align +λ3L con ;
[0150] where λ1, λ2, and λ3 are preset weighting coefficients.
[0151] Integrate the reconstruction loss, latent space alignment loss, and semantic contrast loss organically to form a unified overall optimization framework. By reasonably setting the weighting coefficients of different loss terms, a balance can be achieved among feature reconstruction, latent distribution alignment, and semantic discrimination, avoiding the performance imbalance problem caused by the model overemphasizing a single objective during training. The introduction of the joint loss function not only ensures the complete restoration of the input features, improves the consistency of each representation branch in the latent space, but also further strengthens the distinctiveness and discriminative power of the features, comprehensively enhancing the feature quality and stability of unsupervised data learning. Different from traditional methods that separately optimize the reconstruction error or contrast loss, the present invention can significantly improve the multi-dimensional performance of feature expression by comprehensively weighing various optimization metrics, showing higher accuracy, robustness, and generalization ability in downstream application tasks, providing a strong guarantee for the application of unsupervised deep learning technology in complex scenarios.
[0152] Optionally, the S5 specifically includes:
[0153] S51. Using the joint loss function L total as the optimization target, backpropagate the joint loss function to the encoding path, latent variable sampling path, and decoding path of the first branch network, and calculate the gradient of each structural parameter in each path of the first branch network with respect to the joint loss function;
[0154] S52. At the same time, backpropagate the joint loss function L total to the data augmentation path and semantic representation extraction path of the second branch network, and calculate the gradient of each structural parameter in each path of the second branch network with respect to the joint loss function;
[0155] S53. Based on the calculated gradients of the structural parameters of each path of the first branch network and the second branch network, use the gradient descent optimization algorithm to perform parameter update to form the updated network structural parameters:
[0156]
[0157] where θ (t) represents the set of network structural parameters at the t-th optimization iteration, and η represents the learning rate hyperparameter;
[0158] By adopting the gradient descent optimization algorithm, the gradient information of the overall loss function is calculated by backpropagation according to the current network parameters, and the structural parameters of each path are dynamically adjusted, so as to gradually approach the optimal solution. The introduction of this formula ensures that the model can optimize the learning process in a directional and rhythmic manner under the combined action of multiple loss objectives, avoiding the oscillation or convergence failure problems caused by improper single-step updates during the training process. At the same time, reasonably setting the learning rate parameter can improve the convergence speed while avoiding the model falling into local optima or training instability. Compared with the rough parameter update strategy in traditional unsupervised learning methods, the present invention significantly improves the overall performance of the model in multiple dimensions such as feature extraction, distribution alignment, and semantic discrimination through a refined gradient optimization mechanism, providing more efficient, stable, and reliable training guarantee for deep learning of unlabeled data.
[0159] S54. Iteratively execute the above network structure parameter update operation multiple times until the joint loss function L total meets the preset convergence condition.
[0160] The present invention takes the joint loss function as the optimization target, and respectively backpropagates the loss signal into each path of the first branch network and the second branch network, ensuring the synchronous optimization of the overall model under multi-objective constraints. By adopting a parameter update mechanism based on gradient descent, it can dynamically adjust each structural parameter in the encoding, decoding, and semantic extraction paths according to the gradient information of each branch network in different optimization directions, effectively improving the convergence speed and stability during the model training process. Through multiple rounds of parameter updates and iterative executions, the model gradually approaches the optimal state while meeting the multiple requirements of reconstruction accuracy, latent space consistency, and semantic discrimination ability. Compared with the training strategies of single branch or single optimization target in traditional unsupervised learning, the present invention not only improves the comprehensiveness and depth of feature learning through joint optimization and systematic backpropagation design, but also greatly enhances the coordination and overall performance of the network structure, laying a solid foundation for the efficient modeling and accurate feature extraction of unlabeled data, and significantly improving the adaptability and promotion value of the model in complex practical application environments.
[0161] S6. Based on the first branch network and the second branch network after joint optimization, output the feature representation of the unlabeled data for input to the downstream task.
[0162] Optionally, S6 specifically includes:
[0163] S61. Based on the first branch network after joint optimization, obtain the latent variable representation corresponding to the standardized input tensor;
[0164] S62. Based on the second branch network after joint optimization, obtain the semantic representation corresponding to the latent variable representation, and perform a concatenation operation on the latent variable representation and the semantic representation to generate a fused feature representation vector;
[0165] S63. Perform scale normalization processing on the fused feature representation vector and form a final feature representation with a unified dimension and scale;
[0166] S64. Use the final feature representation as the standardized output result and export it to subsequent downstream tasks as the input data for the downstream tasks.
[0167] After the joint optimization of the first branch network and the second branch network is completed, the present invention outputs a final standardized feature vector by fusing the latent variable representation and the semantic representation for data input in various downstream tasks. This processing flow not only effectively integrates the distribution information in the latent space and the discriminative features in the semantic space, but also ensures the unity of the final feature representation in terms of numerical range and dimension through scale normalization operations, greatly improving the compatibility and adaptability of the features for migration and application between different tasks and models. By concatenating the latent representation and the semantic representation, the fused feature vector has both rich internal structure expression ability and clear category discrimination ability, and can provide high-quality data support for subsequent applications such as classification, clustering, retrieval, and anomaly detection. Compared with the traditional unsupervised feature learning method that outputs features in a single path, the present invention improves the multi-dimensional integrity and semantic hierarchy of the features through a dual-branch fusion design, significantly enhancing the application effect and generalization ability of the system in diverse and complex environments, and providing a solid and superior technical guarantee for the efficient utilization of unlabeled data.
[0168] Embodiment:
[0169] To verify the feasibility and superiority of the present invention, the deep learning method for unlabeled data based on the autoencoder structure proposed by the present invention is applied to the intelligent quality inspection system of a large manufacturing enterprise, Group B. Due to its large business scale, Group B needs to process a huge amount of industrial production data every day. And due to the high degree of automation in the production process, most of the data is unlabeled data. Traditional quality inspection methods mainly rely on manual experience and a small amount of labeled data to train models, and cannot efficiently cover potential anomalies in the massive production data, resulting in insufficient accuracy in anomaly detection, and problems such as missed inspections and false inspections in the quality inspection process, which in turn affect the overall factory pass rate of products.
[0170] To improve the intelligent quality inspection level under unlabeled data, Group B decided to introduce the method of the present invention, conduct in-depth feature learning on the sensor signal data collected in real time from its workshop production line, and assist downstream anomaly detection tasks. During the implementation process, three production bases under Group B were first selected as pilots, including Base B1 located in Wuxi City, Jiangsu Province, Base B2 located in Foshan City, Guangdong Province, and Base B3 located in Wuhan City, Hubei Province. The data collection time span was from June 2024 to September 2024, covering production data of different seasons, different process lines, and different product batches to ensure the comprehensiveness and diversity of the sample sources.
[0171] In the data preprocessing stage, according to the processing flow of S1 of the present invention, each unlabeled sensor data sample collected was converted into a data vector in a unified format and mapped to a unified numerical interval through normalization processing. The normalized data was organized into a three-dimensional tensor with a batch size of 256, a feature dimension of 128, and a channel number of 1, and was input into the subsequent model as a standardized input tensor.
[0172] In the feature modeling stage, according to the technical solution of S2 of the present invention, the standardized input tensor was respectively fed into the first branch network and the second branch network. The first branch network adopted a variational autoencoder structure, and through encoding, latent space sampling, and decoding operations, extracted the latent variable distribution information of the input data; the second branch network generated positive and negative sample pairs respectively through two different data augmentation strategies and extracted semantic expression features. Through the joint optimization mechanism of the latent space alignment loss function and the semantic contrast loss function, the model successfully learned discriminative and consistent deep feature representations in the unlabeled scenario.
[0173] During the training process, a dynamic learning rate adjustment strategy was adopted. The initial learning rate was set to 0.001, and it decreased by 20% every 10 epochs. The total number of training epochs was 100 rounds, and an early stopping strategy was adopted to prevent overfitting. Finally, the optimal effect was achieved at about 50 rounds. The model training and inference were both deployed on the GPU server cluster owned by Group B. The single-node configuration was four NVIDIA A100 80GB GPUs and the CPU was dual Intel Xeon Platinum 8280 with 512GB of memory. To evaluate the actual application effect of the present invention, various performance indicators of the intelligent quality inspection system of Group B before and after the deployment of the present invention were compared. The specific results are shown in Table 1:
[0174] Table 1 Comparison Table of the Application Effect of the Intelligent Quality Inspection System of Group B
[0175]
[0176] As can be seen from Table 1, before the deployment of the present invention, due to the lack of effective means for unlabeled feature modeling, a large amount of production data could not be fully utilized. The accuracy of anomaly detection was less than 80%, and the false alarm rate was relatively high, resulting in a heavy quality inspection process and huge pressure on manual review. After the introduction of the present invention, the utilization rate of unlabeled data has been increased to nearly 97%. The system can effectively process nearly one million data per day. The accuracy of anomaly detection has been significantly increased to over 97%, and the false alarm rate has been significantly decreased to about 2%. The degree of automation of the quality inspection process has been significantly enhanced, and the overall quality inspection response speed has been accelerated by about 7 times.
[0177] In a specific case, in an intelligent welding production line at B1 Base in July 2024, after deploying the method of the present invention, a concealed defect problem caused by abnormal equipment temperature control was successfully detected. The traditional quality inspection process failed to detect this problem in a timely manner. If left unattended, it would directly affect the ex-factory quality of nearly two thousand sets of welded components in this batch. Through the system warning, the quality inspection team intervened in time for review, avoiding a large number of unqualified products from flowing into the market and directly saving nearly 3 million yuan in potential losses for the enterprise.
[0178] Another practical application scenario is in the precision casting workshop of B3 Base. When the system processes a large amount of temperature and pressure sensor data, through the latent variable representation and semantic comparison mechanism extracted by the present invention, a type of small but continuous equipment aging feature change is successfully identified. Such changes are almost difficult to detect under the original unsupervised model, but through the method of the present invention, the system accurately captures these abnormal changes, conducts equipment maintenance in advance, greatly extends the service life of key production equipment, and significantly reduces production downtime and maintenance costs.
[0179] The application results of multiple bases show that the present invention not only greatly improves the feature learning ability and anomaly detection performance of the intelligent quality inspection system of Group B, but also significantly reduces the dependence on manual annotation resources by efficiently using unlabeled data, improves the intelligent level and operation efficiency of the entire production system, and ultimately brings obvious economic benefits and quality assurance advantages.
[0180] Through the above data and examples, it can be clearly proved that the deep learning method for unlabeled data based on the autoencoder structure of the present invention can effectively solve the problems of low utilization rate of traditional unlabeled data, weak feature extraction ability, and poor anomaly detection performance, showing superior adaptability, scalability and practical value, and having broad application prospects in future intelligent manufacturing, Internet of Things data analysis and various unlabeled big data processing scenarios.
[0181] As described above, it is only the preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution of the present invention and its inventive concept, makes equivalent substitutions or changes, and should be covered by the protection scope of the present invention.
Claims
1. A deep learning method for unlabeled data based on the autoencoder structure, characterized in that Including the following: S1. Obtain an unlabeled dataset, perform unified normalization preprocessing on each original input data in the unlabeled dataset, and construct a standardized input tensor; S2. Input the standardized input tensor into the first branch network and the second branch network respectively, extract the potential distribution features of the standardized input tensor, and generate a latent variable representation. The first branch network adopts a variational autoencoder structure to encode and decode the standardized input tensor; S3. In the second branch network, based on the same standardized input tensor, generate positive sample pairs and negative sample pairs through two different data augmentation strategies, and input the positive sample pairs and negative sample pairs into sub-encoders with the same structure and shared parameters respectively to extract their respective semantic representations; S4. Based on the correspondence between the latent variable representation generated by the first branch network and the semantic representation generated by the second branch network, construct a latent space alignment loss to constrain the two branches to align the representation distributions in the latent space; S5. Construct a joint loss function and jointly optimize the first branch network and the second branch network; S6. Based on the jointly optimized first branch network and second branch network, output the feature representation of the unlabeled data for input to downstream tasks.
2. The deep learning method for unlabeled data based on the autoencoder structure according to claim 1, characterized in that The S1 includes: S11. Obtain an unlabeled dataset and convert each original data sample in the unlabeled dataset into a data vector with a fixed dimension; S12. Perform normalization processing on the eigenvalue of each dimension of the data vector to map all eigenvalues to a unified numerical interval; S13. According to the set batch size, sequentially combine the normalized data vectors into batch data and construct a three-dimensional tensor structure. The dimensions of the three-dimensional tensor structure include batch size, feature dimension, and number of channels; S14. Use the constructed three-dimensional tensor structure as the standardized input tensor and provide it to the first branch network and the second branch network as input respectively.
3. A deep learning method for unlabeled data based on an autoencoder structure as claimed in claim 1, characterized in that The S2 includes: S21. Through an input scheduling process, guide the standardized input tensor to the modeling entrances of the first branch network and the second branch network respectively to parallelly establish the basic paths for generating latent variable representations and semantic representations; S22. In the first branch network, based on the predefined variational autoencoder structure, input the standardized input tensor into the encoding path, and perform feature compression on the standardized input tensor within the encoding path to extract the corresponding mean vector and variance vector for representing the distribution information of the input data in the latent space; S23. Based on the mean vector and variance vector, construct a latent Gaussian distribution in the standard normal form, and through a reparameterization sampling mechanism, generate a latent hidden variable tensor from the latent Gaussian distribution as an intermediate representation in the latent space; S24. Input the latent hidden variable tensor into the decoding path dual to the encoding path structure, perform a reconstruction mapping operation, and map the latent hidden variable tensor back to the tensor space to generate a reconstructed tensor; S25. Separate the potential latent variable tensor from the decoding path and store it as the latent variable representation output by the first branch network, and then guide it to the latent space alignment mechanism to establish a representation correspondence with the semantic representation generated by the second branch network; S26. While the first branch network is executing, synchronously route the same normalized input tensor to the second branch network as the original input basis for constructing contrast samples and establishing the semantic representation path, maintaining structural-level parallelism between the two branches.
4. A deep learning method for unlabeled data based on an autoencoder structure according to claim 3, characterized in that, The first branch network consists of an encoding path, a latent variable sampling path, and a decoding path, specifically including: The encoding path includes three consecutive stacked feature compression units. Each feature compression unit sequentially includes a linear transformation layer, an activation function layer, and a normalization layer. The encoding path performs layer-by-layer feature mapping on the normalized input tensor and outputs an intermediate representation; At the output end of the encoding path, a mean extraction branch and a variance extraction branch are provided. The two branches are respectively composed of independent linear transformation layers and are used to generate the mean vector and variance vector in the latent space; The latent variable sampling path includes a standard normal perturbation generation unit and a parameter scaling unit. The sampling path constructs a latent Gaussian distribution based on the mean vector and variance vector and performs reparameterized sampling to generate a latent hidden variable tensor; The decoding path is the dual structure of the encoding path and includes three feature reconstruction units. Each feature reconstruction unit sequentially includes a linear mapping layer, an activation function layer, and a channel recovery layer. The decoding path performs inverse feature mapping on the latent hidden variable tensor and outputs a reconstructed tensor with the same dimension as the normalized input tensor; At the backend of the decoding path, a latent variable extraction interface is provided to directly output the latent variable representation, and the latent variable representation is connected to the latent space alignment mechanism; Each structure of the first branch network is optimized by a joint loss function during the training process. The joint loss function includes a reconstruction error term and a distribution regularization term, which are used to synchronously optimize the structural parameters in the encoding path, sampling path, and decoding path.
5. A deep learning method for unlabeled data based on an autoencoder structure according to claim 3, characterized in that The second branch network includes a positive and negative sample generation path and a semantic representation extraction path, specifically including: The positive and negative sample generation path receives the normalized input tensor and generates a pair of enhanced samples through two parallel data augmentation strategies, which are respectively used as the positive and negative sample inputs; The semantic representation extraction path includes two sub-encoding paths with the same structure and shared parameters. Each sub-encoding path is sequentially composed of three feature extraction units. Each feature extraction unit sequentially includes a linear transformation layer, an activation function layer, and a normalization layer; The positive sample and the negative sample are respectively input into the two sub-encoding paths. After being processed by the same structure, the corresponding semantic representation vectors are respectively generated; The two semantic representation vectors are used as positive and negative contrast samples and are output to the contrast loss function construction path to measure the expression similarity and participate in the training optimization of the second branch network; The representation vectors output by the semantic representation extraction path are synchronously transmitted to the latent space alignment mechanism for representation alignment processing with the latent variable representation generated by the first branch network; The second branch network optimizes its parameters through a joint loss function during the training process.
6. A deep learning method for unlabeled data based on an autoencoder structure according to claim 1, characterized in that, The S3 includes: S31. Receive the normalized input tensor and guide it to a first enhancement path and a second enhancement path respectively. The two enhancement paths respectively perform transformation processing on the normalized input tensor by applying different data enhancement strategies; S32. In the first enhancement path, perform operations of random image cropping, scale perturbation, and color perturbation to generate a first enhanced sample; S33. In the second enhancement path, perform operations of random occlusion, rotation perturbation, and channel permutation to generate a second enhanced sample; S34. Take the first enhanced sample as a positive sample input and the second enhanced sample as a negative sample input, and guide them to two sub-encoding paths with the same structure and shared parameters respectively; S35. In each sub-encoding path, perform three-layer feature extraction operations in sequence. Each feature extraction operation sequentially includes linear transformation processing, activation function transformation, and normalization processing, and maps the positive and negative input samples into fixed-length semantic representation vectors; S36. Output two fixed-length semantic representation vectors, which are respectively marked as the positive sample semantic representation and the negative sample semantic representation.
7. A deep learning method for unlabeled data based on an autoencoder structure according to claim 1, characterized in that, The S4 includes: S41. Obtain the latent variable representation generated after being processed by the encoding path and the latent variable sampling path of the first branch network, as well as the positive sample semantic representation and the negative sample semantic representation generated after the second branch network is processed by the data enhancement and semantic representation extraction path; S42. Perform normalization processing on the latent variable representation and the positive sample semantic representation respectively; S43. Calculate the Euclidean distance in the latent space between the normalized latent variable representation and the positive sample semantic representation to generate a positive alignment distance in the latent space; S44. Perform normalization processing on the latent variable representation and the negative sample semantic representation at the same scale, and calculate the Euclidean distance between the latent variable representation and the negative sample semantic representation to generate a negative alignment distance in the latent space; S45. Based on the difference between the above positive alignment distance and negative alignment distance, construct a latent space alignment loss function: Among them, z represents the latent variable representation, and h + represents the positive sample semantic representation, and h - represents the negative sample semantic representation, and m is the set alignment boundary hyperparameter.
8. A deep learning method for unlabeled data based on an autoencoder structure according to claim 1, characterized in that, The joint loss function is constructed through the following process: Obtain the reconstructed tensor output by the first branch network and the normalized input tensor respectively, and calculate the reconstruction loss function L based on the element-wise difference between the reconstructed tensor and the normalized input tensor rec : where x i represents the i-th sample of the normalized input tensor, represents the corresponding reconstructed tensor, and N represents the total number of samples; Obtain the positive sample semantic representation h generated in the second branch network + and the negative sample semantic representation h - , and construct a semantic contrast loss function L based on the similarity calculation between the positive sample semantic representation and the negative sample semantic representation con : where sim(h,z) represents the calculation of the cosine similarity between the semantic representation and the latent variable representation, and τ is the temperature coefficient hyperparameter; Combine the above reconstruction loss function, latent space alignment loss function, and semantic contrast loss function in a weighted combination manner to form a complete joint loss function L total : L total = λ1L rec + λ2L align + λ3L con ; where λ1, λ2, and λ3 are preset weighting coefficients.
9. A deep learning method for unlabeled data based on an autoencoder structure according to claim 1, characterized in that The S5 includes: S51. Using the combined loss function L total as the optimization objective, backpropagate the combined loss function to the encoding path, latent variable sampling path, and decoding path of the first branch network, and calculate the gradient of each structural parameter in each path of the first branch network with respect to the combined loss function; S52. At the same time, backpropagate the combined loss function L total to the data augmentation path and the semantic representation extraction path of the second branch network, and calculate the gradient of each structural parameter in each path of the second branch network with respect to the combined loss function; S53. Based on the gradients of the path structure parameters of the first branch network and the second branch network calculated, adopt the gradient descent optimization algorithm to perform parameter update to form updated network structure parameters: where, θ (t) represents the set of network structure parameters at the t-th optimization iteration, and η represents the learning rate hyperparameter; S54. Iteratively execute the above network structure parameter update operation multiple times until the combined loss function L total satisfies the preset convergence condition.
10. A deep learning method for unlabeled data based on an autoencoder structure according to claim 1, characterized in that, The S6 includes: S61. Based on the first branch network after joint optimization, obtain the latent variable representation corresponding to the normalized input tensor; S62. Based on the second branch network after joint optimization, obtain the semantic representation corresponding to the latent variable representation, and perform a concatenation operation on the latent variable representation and the semantic representation to generate a fused feature representation vector; S63. Perform scale normalization processing on the fused feature representation vector and form a final feature representation with a unified dimension and scale; S64. Export the final feature representation as a standardized output result to subsequent downstream tasks as input data for the downstream tasks.
Citation Information
Cited By
Unsupervised sentence representation learning method based on tensor norm constraint and self-distillation
CN122197908A