A generative adversarial classification method combined with triplets and pellison regularization

CN122906414APending Publication Date: 2026-10-13XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610826073.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-09
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0005]鉴于此,本发明提出了一种联合三元组与皮尔森正则化的生成对抗分类方法,旨在解决当前技术中生成对抗分类方法在图像分类任务中存在特征判别性不足、特征维度耦合以及训练稳定性差的问题

Benefits of technology

[0014]与现有技术相比,本发明的有益效果在于:通过构建包含生成器、判别器和分类器的生成对抗网络模型,并基于生成器生成伪造样本与真实样本共同进行博弈训练,能够有效扩充训练数据分布。由此带来的有益效果是,显著提升了分类器在有限标签样本条件下的泛化能力,减少了模型对大规模标注数据的依赖,同时增强了模型对数据分布变化的鲁棒性。其次,在博弈训练过程中引入三元组损失函数对分类器的特征提取层进行约束,拉近同类样本的特征距离并推远异类样本的特征距离。该技术的有益效果在于,显式优化了特征空间的类内紧凑性和类间可分性,使得同类样本在特征空间中聚集更紧密,异类样本的边界更清晰,从而大幅提高分类精度,尤其适用于细粒度分类和类别不平衡等复杂场景。再次,在分类器的全连接层引入皮尔森相关系数正则化项,通过最小化特征维度间的相关性实现特征空间的解耦。其有益效果表现在,能够有效降低特征维度之间的冗余信息,促使各特征维度学习到彼此独立的判别属性,提升特征表达的多样性和可解释性,同时增强模型对输入扰动的抵抗能力,改善泛化性能。最后,联合优化生成对抗网络的目标损失函数、三元组损失函数以及皮尔森正则化项,对模型参数进行迭代更新直至收敛。这一机制的有益效果在于,将生成对抗训练、判别性特征约束与特征解耦正则化有机结合,形成相互促进的协同优化过程,能够在提升分类性能的同时保持训练过程的稳定性,避免模式崩塌和特征退化问题,从而保证模型在图像分类任务中的高精度、高鲁棒性与良好的可迁移性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122906414A_ABST
    Figure CN122906414A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of generative adversarial network and discloses a generative adversarial classification method combined with triplets and Pearson regularization, which comprises the following steps: constructing a generative adversarial network model comprising a generator, a discriminator and a classifier; generating fake samples based on the generator, combining real samples in a training data set to jointly input the discriminator for game training; introducing a triplet loss function to constrain a feature extraction layer of the classifier, narrowing the feature distance of similar samples and widening the feature distance of different samples; introducing a Pearson correlation coefficient regularization term in a full connection layer of the classifier, realizing decoupling of a feature space by minimizing the correlation between feature dimensions; and iteratively updating model parameters by using a target loss function of the generative adversarial network, the triplet loss function and the Pearson regularization term. The application effectively improves the classification performance and feature expression capability of the generative adversarial classification method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of generative adversarial networks (GANs), and more specifically, to a generative adversarial classification method that combines triples and Pearson regularization. Background Technology

[0002] Existing applications of generative adversarial networks (GANs) in image classification tasks typically require generators to produce fake samples to expand the training set, and then using a game between the discriminator and the generator to improve the classifier's generalization ability. However, the discriminator in traditional GANs often only outputs the probability of being true or false, lacking effective mining of class-discriminating features. During feature extraction, the feature distribution of samples of the same class is relatively scattered, while the feature boundaries of samples of different classes are blurred, resulting in limited classification accuracy. Furthermore, the feature discrimination between samples of different classes is insufficient, making it prone to recognition errors in fine-grained classification or imbalanced data scenarios.

[0003] Currently, most mainstream methods employ cross-entropy loss function for supervised training of classifiers and utilize generated samples for data augmentation. However, this approach is prone to problems in generative adversarial training, such as excessively large intra-class distances and excessively small inter-class distances in the feature space, making it difficult to explicitly constrain the feature distribution of samples. Furthermore, strong redundancy and correlation often exist between feature dimensions, causing feature representation coupling and reducing the model's generalization ability and robustness. As the number of training data categories increases or image complexity rises, classification performance significantly degrades, affecting the model's practical effectiveness. Moreover, existing generative adversarial networks lack effective regularization methods for feature decoupling during training, often requiring repeated manual adjustments to the network structure and hyperparameters to maintain stable classification performance.

[0004] In summary, existing technologies are still insufficient to effectively address issues such as insufficient feature discriminativeness, feature dimensional coupling, and poor training stability in generative adversarial classification tasks. In particular, they lack a joint optimization mechanism for intra-class compactness constraints and dimensional decoupling regularization of the feature space. Therefore, there is an urgent need to propose a novel generative adversarial classification method to improve the classifier's discriminative ability and the degree of decoupling of feature representation during the feature extraction stage, thereby meeting the requirements of high accuracy and high generalization performance for complex image classification tasks. Summary of the Invention

[0005] In view of this, the present invention proposes a generative adversarial classification method that combines triples and Pearson regularization, aiming to solve the problems of insufficient feature discriminativeness, feature dimension coupling and poor training stability of current generative adversarial classification methods in image classification tasks.

[0006] This invention proposes a generative adversarial classification method combining triples and Pearson regularization, comprising the following steps: Construct a generative adversarial network model, which includes a generator, a discriminator, and a classifier; Construct a training dataset, which includes labeled sample data; The generator generates fake samples, which are then combined with real samples from the training dataset and input into the discriminator for game training. During the game training process, a triplet loss function is introduced to constrain the feature extraction layer of the classifier, so as to bring the feature distance of similar samples closer and push the feature distance of dissimilar samples further apart. A Pearson correlation coefficient regularization term is introduced into the fully connected layer of the classifier to decouple the feature space by minimizing the correlation between feature dimensions. The target loss function, the triplet loss function, and the Pearson regularization term of the generative adversarial network are jointly optimized, and the model parameters are iteratively updated until the model converges.

[0007] Furthermore, the construction process of the triplet loss function is as follows: in each batch of training data, an anchor sample, a positive sample, and a negative sample are randomly selected, the Euclidean distance between the anchor and the positive sample, and the Euclidean distance between the anchor and the negative sample are calculated, and the sample feature distribution is optimized by forcing the difference between the two distances to be greater than a preset marginal threshold.

[0008] Furthermore, the formula for calculating the regularization term of the Pearson correlation coefficient is as follows: in, and These represent the first and second features in the classifier's feature vector, respectively. The first dimension and the first One dimension, Describing covariance, It represents the standard deviation.

[0009] Furthermore, the target loss function of the generative adversarial network adopts the WGAN-GP gradient penalty mechanism to improve the stability of the generative adversarial process.

[0010] Furthermore, the formula for calculating the optimization objective function of the classifier is as follows: in, and These are preset weighted hyperparameters, used to balance the contributions of triplet constraints and decoupling regularization, respectively. This represents the original objective loss function of the generative adversarial network. This represents the triplet loss function.

[0011] Furthermore, the generator employs a deep convolutional network structure and introduces an attention mechanism module. The generator is used to learn the distribution characteristics of real samples and generate high-quality fake samples.

[0012] Furthermore, the discriminator and the classifier share a portion of the basic feature extraction network, and the classifier is connected to the output of the shared feature extraction network.

[0013] Furthermore, during the game training process, an alternating training strategy is adopted for the discriminator and the classifier. That is, under the premise of fixed generator parameters, the discriminator and the classifier are first subjected to supervised pre-training, and then jointly fine-tuned.

[0014] Compared with existing technologies, the advantages of this invention are as follows: By constructing a generative adversarial network model that includes a generator, discriminator, and classifier, and training the model using fake samples generated by the generator in a game-like manner with real samples, the distribution of training data can be effectively expanded. This results in a significant improvement in the generalization ability of the classifier under limited labeled sample conditions, a reduction in the model's dependence on large-scale labeled data, and enhanced robustness to changes in data distribution. Secondly, by introducing a triplet loss function during the game-like training process to constrain the feature extraction layer of the classifier, the feature distance between similar samples is narrowed while the feature distance between dissimilar samples is widened. This technique explicitly optimizes the intra-class compactness and inter-class separability of the feature space, making similar samples cluster more tightly in the feature space and the boundaries of dissimilar samples clearer, thereby significantly improving classification accuracy, especially suitable for complex scenarios such as fine-grained classification and class imbalance. Thirdly, by introducing a Pearson correlation coefficient regularization term into the fully connected layer of the classifier, the feature space is decoupled by minimizing the correlation between feature dimensions. Its beneficial effects are manifested in that it can effectively reduce redundant information between feature dimensions, enabling each feature dimension to learn independent discriminative attributes, improving the diversity and interpretability of feature representation, and enhancing the model's resistance to input perturbations, thus improving generalization performance. Finally, the objective loss function, triplet loss function, and Pearson regularization term of the generative adversarial network are jointly optimized, and the model parameters are iteratively updated until convergence. The beneficial effect of this mechanism is that it organically combines generative adversarial training, discriminative feature constraints, and feature decoupling regularization to form a mutually reinforcing synergistic optimization process. This can improve classification performance while maintaining the stability of the training process, avoiding pattern collapse and feature degradation problems, thereby ensuring high accuracy, high robustness, and good transferability of the model in image classification tasks.

[0015] On the other hand, this application also provides a generative adversarial classification system combining joint triples and Pearson regularization, comprising: The data preprocessing module is used to normalize and augment the original image samples. The model architecture module is used to load the generator, discriminator, and classifier; The joint loss calculation module is used to calculate the triplet loss and Pearson regularization loss in real time; The parameter update module uses backpropagation based on the joint loss function to iteratively adjust the network weights using an optimization algorithm. Attached Figure Description

[0016] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A functional block diagram of a generative adversarial classification method combining triples and Pearson regularization provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating a generative adversarial classification method combining joint triples and Pearson regularization, provided as an embodiment of the present invention. Detailed Implementation

[0017] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0018] like Figures 1-2 As shown, in some embodiments of this application, this embodiment provides a generative adversarial classification method combining triples and Pearson regularization, including: Step S100: Construct a generative adversarial network model, which includes a generator, a discriminator, and a classifier; construct a training dataset, which includes labeled sample data.

[0019] Specifically, the generator is used to learn the distribution characteristics of real samples and generate fake samples; the discriminator is used to distinguish whether the input data is a real sample or a fake sample generated by the generator; and the classifier is used to predict the category of the input data.

[0020] Understandably, by constructing a generative adversarial network (GAN) framework comprising a generator, discriminator, and classifier, the training dataset can be expanded using forged samples generated by the generator. In traditional supervised learning, the performance of the classifier highly depends on large-scale, high-quality labeled data, which is difficult to achieve in many practical applications. The introduction of GANs allows the model to learn the underlying data distribution from limited real samples and generate diverse new samples, effectively alleviating the data scarcity problem and enhancing the classifier's robustness to changes in data distribution. Specifically, the generator continuously optimizes its network parameters to generate forged samples that are indistinguishable from real samples; the discriminator is trained to accurately distinguish between real and forged samples; and the classifier, through the combined effect of real and forged samples, learns a more generalizable decision boundary. This interplay and co-evolution among the three ultimately enables the classifier to achieve excellent classification performance even with limited labeled data.

[0021] In a specific embodiment of this application, the above steps are implemented as follows: This embodiment takes a handwritten digit recognition task as an example, using the MNIST dataset as the training dataset. First, a generative adversarial network model containing a generator, discriminator, and classifier is constructed. The generator employs a deep convolutional network structure and incorporates an attention mechanism module. Its input is a 100-dimensional random noise vector, and its output is a 28x28 pixel image of a forged handwritten digit. The discriminator uses a convolutional neural network; its input is an image, and its output is the probability that the image is a genuine sample. The classifier shares a basic feature extraction network with the discriminator. The classifier is connected to the output of the shared feature extraction network, and its output is the probability distribution of the input image belonging to the ten categories 0-9. The training dataset contains 60,000 labeled 28x28 pixel handwritten digit images. In the early stages of training, the images generated by the generator are full of noise and differ significantly from real digital images. The discriminator can easily distinguish them from real samples. The classifier is only trained with a limited number of real samples, resulting in low classification accuracy, especially for recognizing some digits with unique handwriting styles.

[0022] The above scenarios are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0023] Step S200: Generate fake samples based on the generator, and input them together with real samples in the training dataset into the discriminator for game training.

[0024] Understandably, the alternating iterative training between the generator and discriminator creates a dynamic game. The generator aims to maximize the probability that the discriminator will classify its generated fake samples as real, while the discriminator aims to minimize its error rate in distinguishing between real and fake samples. This adversarial mechanism drives the generator to continuously improve its generation strategy to produce higher-quality, more faithful fake samples; simultaneously, the discriminator continuously improves its discrimination ability. Ultimately, when the two reach a Nash equilibrium, the generator can generate fake samples that are almost indistinguishable from the real sample distribution, providing a rich and diverse source of data augmentation for the classifier's training.

[0025] In a specific embodiment of this application, the above steps are implemented as follows: Continuing from the specific embodiment in step S100, during training, forged images generated by the generator are mixed with real images randomly sampled from the MNIST training set and input into the discriminator. The discriminator outputs a true / false probability for each input image. The generator's optimization goal is to maximize the probability that the discriminator classifies its generated images as real, while the discriminator's optimization goal is to improve the accuracy of classifying real images as real and forged images as fake. In the early stages of training, the images generated by the generator are of poor quality, and the discriminator's accuracy in distinguishing between real and fake images quickly rises to over 90%. As training progresses, the generator learns how to adjust its network weights through backpropagation, and the generated images gradually become clearer, with the outlines of the numbers beginning to appear. After a certain number of training iterations, the discriminator's accuracy in distinguishing between real and fake images drops to around 60%, indicating that the generator has been able to generate high-quality forged samples sufficient to confuse the discriminator. At this point, the generated images are visually almost indistinguishable from real handwritten digits. These high-quality forged samples are used to expand the training set of the classifier.

[0026] The above scenarios are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0027] Step S300: During the game training process, a triplet loss function is introduced to constrain the feature extraction layer of the classifier, so as to narrow the feature distance of similar samples and widen the feature distance of dissimilar samples.

[0028] Specifically, the construction process of the triplet loss function is as follows: in each batch of training data, an anchor sample, a positive sample and a negative sample are randomly selected, the Euclidean distance between the anchor and the positive sample and the Euclidean distance between the anchor and the negative sample are calculated, and the sample feature distribution is optimized by forcing the difference between the two distances to be greater than a preset marginal threshold.

[0029] Understandably, traditional generative adversarial networks (GANs) typically rely solely on cross-entropy loss when training classifiers. This loss function focuses on predicting the correct class label for each sample but does not explicitly constrain the distribution structure of samples in the feature space. This can lead to loosely distributed features for samples of the same class and blurred feature boundaries for samples of different classes. The triplet loss function is introduced precisely to address this problem. By imposing constraints on the feature vectors output by the feature extraction layer, it forces anchor samples to minimize the distance between them and positive samples (of the same class) while maximizing the distance between them and negative samples (of different classes), with the difference between the two exceeding a preset marginal threshold. This explicit distance metric learning effectively reshapes the feature space into a compact intra-class and separable inter-class form. This is particularly beneficial for fine-grained classification tasks (such as distinguishing different breeds of dogs) or imbalanced data scenarios because it forces the model to focus on subtle, discriminative features rather than being dominated by global, volatile features.

[0030] In a specific embodiment of this application, the above steps are implemented as follows: Continuing from the specific embodiment in step S200, a triplet loss function is introduced after the feature extraction layer of the classifier (i.e., the feature map output by the last convolutional layer after the shared feature extraction network, which is then global pooled to form a feature vector). In a training batch, a handwritten image of the digit "3" is randomly selected as the anchor sample, another image of the digit "3" is selected as the positive sample, and an image of the digit "8" is selected as the negative sample. The Euclidean distance between the anchor feature and the positive sample feature is calculated to be 0.35, and the Euclidean distance between the anchor feature and the negative sample feature is calculated to be 0.6. The preset marginal threshold is 0.2. The current difference between the positive and negative sample distances is 0.25, which is greater than the marginal threshold of 0.2, therefore this triplet does not generate loss. In another batch, the anchor point is the digit "5", the positive sample is a different "5" with a completely different writing style, and the negative sample is the digit "6". The calculated positive distance is 0.55, the negative distance is 0.6, and the difference is 0.05, which is less than the marginal threshold of 0.2. At this point, the triplet loss function is activated, producing a large loss value. Through backpropagation, the optimizer adjusts the weights of the feature extraction layer, so that the feature distance between the anchor point and the positive sample is reduced (e.g., from 0.55 to 0.4), and the feature distance between the anchor point and the negative sample is increased (e.g., from 0.6 to 0.8). After a large number of such iterative trainings, images of the same digit in the feature space form tight clusters, and clusters of different digits are clearly separated by boundaries.

[0031] The above scenarios are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0032] Step S400: Introduce a Pearson correlation coefficient regularization term into the fully connected layer of the classifier to decouple the feature space by minimizing the correlation between feature dimensions.

[0033] Specifically, the formula for calculating the regularization term of the Pearson correlation coefficient is as follows: in, and These represent the first and second features in the classifier's feature vector, respectively. The first dimension and the first One dimension, Describing covariance, It represents the standard deviation.

[0034] Understandably, in deep neural networks, there are often strong correlations between the dimensions of feature vectors. This redundant coupling means that multiple dimensions may be describing the same or the same set of features, which not only wastes the model's expressive power but also makes the model overly sensitive to small perturbations in the input, reducing generalization ability and robustness. The Pearson correlation coefficient measures the linear correlation between two random variables; the closer its absolute value is to 1, the stronger the correlation. This step constructs a regularization term to sum the squares of the Pearson correlation coefficients between all different dimensions in the feature vector output by the fully connected layer of the classifier. During training, by minimizing this regularization term, the model is forced to reduce the correlation between feature dimensions, prompting each feature dimension to learn independent and complementary discriminative properties. The direct benefit of this feature decoupling is improved diversity and interpretability of feature representation. Each feature dimension can independently respond to a specific attribute of the input data (e.g., one dimension responds to "the roundness of the strokes" and another responds to "the tilt angle of the image"), enabling the model to represent information in a more compact and orthogonal way, thereby enhancing the model's resistance to input noise and its generalization performance on cross-domain tasks.

[0035] In a specific embodiment of this application, the above steps are implemented as follows: Continuing from the specific embodiment in step S300, after the fully connected layer of the classifier, a Pearson correlation coefficient regularization term is calculated for the output 128-dimensional feature vector. In the early stages of training, there is a high correlation between the dimensions of the feature vector; for example, the Pearson correlation coefficient between the 5th and 32nd dimension features is as high as 0.85. The calculated... The loss value is relatively large. This regularization term is jointly optimized with the target loss function and triplet loss function of the generative adversarial network. During backpropagation, the optimizer will simultaneously attempt to reduce... As training progresses, the dimensions of the feature vector gradually decouple. Further calculations revealed that the 5th feature dimension is primarily strongly correlated with the grayscale values ​​of the image's central region, while the 32nd feature dimension is primarily strongly correlated with the gradient directions at the image's edges. The correlation coefficient between the two decreased to below 0.1. The loss value decreased significantly. This decoupling allows the classifier to capture multiple attributes of the image more independently and robustly. For example, when salt-and-pepper noise is applied to the test image, the feature dimension describing "stroke structure" is less disturbed due to the decoupling of feature dimensions, and the classifier can still make the correct judgment, significantly improving the robustness of the model.

[0036] The above scenarios are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0037] Step S500: Jointly optimize the target loss function of the generative adversarial network, the triplet loss function, and the Pearson regularization term, and iteratively update the model parameters until the model converges.

[0038] Specifically, the optimization objective function of the classifier is calculated using the following formula: in, and These are preset weighted hyperparameters, used to balance the contributions of triplet constraints and decoupling regularization, respectively. This represents the original objective loss function of the generative adversarial network. This represents the triplet loss function.

[0039] It is understandable that this invention organically combines loss functions with three different objectives within a unified optimization framework, forming a mutually reinforcing collaborative optimization process. (Generative Adversarial Networks) This ensures that the generator can produce high-quality fake samples, providing data support for the classifier; triple loss This focuses on the discriminative power of the feature space, ensuring compactness of similar classes and separation of dissimilar classes; Pearson regularization term This focuses on decoupling the feature dimensions to improve feature diversity and robustness. All three are indispensable; relying solely on one aspect is insufficient. With cross-entropy loss, the model is prone to producing features with insufficient discriminative power; introducing But lacking The features may still have redundant coupling; relying solely on Without learning distance metrics, it's difficult to guarantee separability between classes. This can be addressed through hyperparameters. and To balance the contributions of these three factors to the total loss, flexible adjustments can be made for different tasks. This joint optimization mechanism ensures that each iteration of the model is carried out while simultaneously pursuing three goals: generating more realistic samples, learning more discriminative features, and obtaining more decoupled feature representations. This avoids training instability problems such as pattern collapse and feature degradation, ultimately resulting in a model with high classification accuracy, strong generalization ability, and stable training process.

[0040] In a specific embodiment of this application, the above steps are implemented as follows: Continuing from the specific embodiment in step S400, the total loss function is set. ,in, A gradient penalty mechanism, WGAN-GP, is employed to improve the stability of the generative adversarial process. Within one iteration, the generator parameters are first fixed, and a batch of data containing both real and fake samples is used. Update the parameters of the discriminator to better distinguish between true and false data. Meanwhile, based on... , and The combined losses of the three parties Update the parameters of the classifier and the shared feature extraction network. Then, fix the parameters of the discriminator and classifier, based on... Update the generator's parameters to produce samples that are more likely to fool the discriminator. Repeat this alternating training process. In the early stages of training, The value is relatively high. As the number of iterations increases, the images generated by the generator become more and more realistic, and the loss of the discriminator tends to stabilize; The value gradually decreases, indicating that the intra-class distance in the feature space is constantly decreasing, while the inter-class distance is constantly increasing; The value also continuously decreases, indicating that the decoupling degree of the feature dimensions is becoming increasingly higher. When all loss function values ​​converge and stabilize within a small range, the model training is complete. Finally, the trained classifier is tested on the MNIST test set, and the classification accuracy reaches over 99.5%. For specific digit categories with scarce training samples, its recognition performance is also far superior to classifiers trained using only traditional generative adversarial networks.

[0041] The above scenarios are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0042] In the above embodiments, by constructing a generative adversarial network model including a generator, discriminator, and classifier, and using fake samples generated by the generator to train against real samples in a game, the distribution of training data can be effectively expanded. The resulting benefits are: significantly improved generalization ability of the classifier under limited labeled sample conditions, reduced model dependence on large-scale labeled data, and enhanced robustness to changes in data distribution. Secondly, a triplet loss function is introduced during the game-playing training process to constrain the feature extraction layer of the classifier, narrowing the feature distance between similar samples and widening the feature distance between dissimilar samples. This technique explicitly optimizes the intra-class compactness and inter-class separability of the feature space, making similar samples cluster more tightly in the feature space and the boundaries of dissimilar samples clearer, thereby significantly improving classification accuracy, especially suitable for complex scenarios such as fine-grained classification and class imbalance. Thirdly, a Pearson correlation coefficient regularization term is introduced into the fully connected layer of the classifier, achieving decoupling of the feature space by minimizing the correlation between feature dimensions. Its beneficial effects are manifested in that it can effectively reduce redundant information between feature dimensions, enabling each feature dimension to learn independent discriminative attributes, improving the diversity and interpretability of feature representation, and enhancing the model's resistance to input perturbations, thus improving generalization performance. Finally, the objective loss function, triplet loss function, and Pearson regularization term of the generative adversarial network are jointly optimized, and the model parameters are iteratively updated until convergence. The beneficial effect of this mechanism is that it organically combines generative adversarial training, discriminative feature constraints, and feature decoupling regularization to form a mutually reinforcing synergistic optimization process. This can improve classification performance while maintaining the stability of the training process, avoiding pattern collapse and feature degradation problems, thereby ensuring high accuracy, high robustness, and good transferability of the model in image classification tasks.

[0043] In another preferred embodiment based on the above embodiments, this implementation provides a generative adversarial classification system that combines triples and Pearson regularization, including: a data preprocessing module, a model architecture module, a joint loss calculation module, and a parameter update module.

[0044] Specifically, the data preprocessing module is configured to normalize and augment the original image samples; the model architecture module is configured to load the generator, discriminator, and classifier; the joint loss calculation module is configured to calculate the triplet loss and Pearson regularization loss in real time; and the parameter update module is configured to iteratively adjust the network weights using an optimization algorithm based on backpropagation of the joint loss function.

[0045] It is understood that the generative adversarial classification system and method with joint triples and Pearson regularization in the above embodiments have the same beneficial effects, and will not be described in detail here.

[0046] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program goods. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program goods embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0047] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program goods according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0048] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0049] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0050] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A generative adversarial classification method combining triples and Pearson regularization, characterized in that, Includes the following steps: Construct a generative adversarial network model, which includes a generator, a discriminator, and a classifier; Construct a training dataset, which includes labeled sample data; The generator generates fake samples, which are then combined with real samples from the training dataset and input into the discriminator for game training. During the game training process, a triplet loss function is introduced to constrain the feature extraction layer of the classifier, so as to bring the feature distance of similar samples closer and push the feature distance of dissimilar samples further apart. A Pearson correlation coefficient regularization term is introduced into the fully connected layer of the classifier to decouple the feature space by minimizing the correlation between feature dimensions. The target loss function, the triplet loss function, and the Pearson regularization term of the generative adversarial network are jointly optimized, and the model parameters are iteratively updated until the model converges.

2. The generative adversarial classification method using joint triples and Pearson regularization as described in claim 1, characterized in that, The construction process of the triplet loss function is as follows: In each batch of training data, an anchor sample, a positive sample, and a negative sample are randomly selected. The Euclidean distance between the anchor and the positive sample, and the Euclidean distance between the anchor and the negative sample are calculated. The sample feature distribution is optimized by forcing the difference between the two distances to be greater than a preset marginal threshold.

3. The generative adversarial classification method using joint triples and Pearson regularization as described in claim 1, characterized in that, The formula for calculating the regularization term of the Pearson correlation coefficient is as follows: in, and These represent the first and second features in the classifier's feature vector, respectively. The first dimension and the first One dimension, Describing covariance, It represents the standard deviation.

4. The generative adversarial classification method using joint triples and Pearson regularization as described in claim 1, characterized in that, The target loss function of the generative adversarial network adopts the WGAN-GP gradient penalty mechanism to improve the stability of the generative adversarial process.

5. The generative adversarial classification method using joint triples and Pearson regularization as described in claim 1, characterized in that, The formula for calculating the optimization objective function of the classifier is as follows: in, and These are preset weighted hyperparameters, used to balance the contributions of triplet constraints and decoupling regularization, respectively. This represents the original objective loss function of the generative adversarial network. This represents the triplet loss function.

6. The generative adversarial classification method using joint triples and Pearson regularization as described in claim 1, characterized in that, The generator employs a deep convolutional network structure and incorporates an attention mechanism module. The generator is used to learn the distribution characteristics of real samples and generate high-quality fake samples.

7. The generative adversarial classification method based on joint triples and Pearson regularization as described in claim 1, characterized in that, The discriminator and the classifier share a portion of the basic feature extraction network, and the classifier is connected to the output of the shared feature extraction network.

8. The generative adversarial classification method based on joint triples and Pearson regularization as described in claim 1, characterized in that, During the game training process, an alternating training strategy is adopted for the discriminator and the classifier. That is, under the premise of fixed generator parameters, the discriminator and the classifier are first subjected to supervised pre-training, and then jointly fine-tuned.

9. A generative adversarial classification system combining joint triples and Pearson regularization, applicable to the generative adversarial classification method combining joint triples and Pearson regularization as described in any one of claims 1 to 8, characterized in that, include: The data preprocessing module is used to normalize and augment the original image samples. The model architecture module is used to load the generator, discriminator, and classifier; The joint loss calculation module is used to calculate the triplet loss and Pearson regularization loss in real time; The parameter update module uses backpropagation based on the joint loss function to iteratively adjust the network weights using an optimization algorithm.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the generative adversarial classification method of joint triples and Pearson regularization as described in any one of claims 1 to 8.