Dual-tree genetic programming method for processing long-tail image classification problem

By constructing data augmentation trees and feature extraction trees, combined with a phased sampling strategy, the problem of sample imbalance in long-tail image classification is solved, improving feature diversity and classification accuracy, and enabling automatic adaptation to different long-tail tasks.

CN121884003APending Publication Date: 2026-04-17SUZHOU UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202610306095.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-13
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies for long-tail image classification suffer from insufficient feature representation due to imbalanced sample size and the inability of traditional data augmentation strategies to adapt to the needs of tail categories. The dual-tree genetic programming method lacks clear functional division, leading to evolutionary bias towards head categories.

Method used

We construct data augmentation trees and feature extraction trees, and adopt a staged sampling strategy. The data augmentation tree adaptively augments the duplicated samples generated by oversampling, and the feature extraction tree performs feature extraction and classifier selection. The model is optimized through a multi-generational evolution process.

Benefits of technology

It improves the diversity of feature representation and classification accuracy, achieves balance and generalization ability in long-tail scenarios, and adapts automatically to different long-tail tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121884003A_ABST
    Figure CN121884003A_ABST
Patent Text Reader

Abstract

The invention discloses a dual-tree genetic programming method for processing a long-tail image classification problem, and the method comprises the following steps: constructing a dual-tree genetic programming individual which comprises a data enhancement tree and a feature extraction tree; setting a staged sampler; performing a multi-generation evolution process, wherein each generation comprises population initialization, individual fitness evaluation, selection, crossover and mutation operation; after the evolution is finished, outputting a dual-tree individual with the highest fitness as a final classification model for classifying a new image; the method is simple and efficient in model deployment and has practical value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer graphics processing technology, and more specifically to a dual-tree genetic programming method for processing long-tailed image classification problems. Background Technology

[0002] Long-tail image classification is an important research direction in the field of computer vision. Currently, traditional long-tail image classification methods suffer from significant performance limitations when the number of training samples is limited, and often require complex hyperparameter tuning. The fundamental reason is that DNNs heavily rely on large-scale balanced data for effective representation learning, and when samples in the tail category are extremely scarce, it is difficult to learn robust and discriminative feature representations.

[0003] On the other hand, although data augmentation is widely used to alleviate the problem of insufficient samples, mainstream augmentation methods also have certain drawbacks. For example, the Auto Augment method relies on a fixed combination obtained through offline search on the source dataset and assumes that the augmentation strategy has cross-task generalization ability. However, in long-tail scenarios, the data distribution, semantic complexity, and sensitivity to augmentation of head and tail categories differ significantly, making it difficult for this general strategy to adapt to the special needs of tail categories. Therefore, the static nature of Auto Augmentation limits its effectiveness and transferability in long-tail tasks. Traditional GP methods for image classification: Most existing image processing GP methods are based on balanced data levels. In imbalanced problems, these methods struggle to effectively balance the importance weights of different categories (especially the tail category with few samples), leading to an evolutionary bias towards the head category. GP with dual-tree representation can utilize multi-tree GP to construct multiple features for classification tasks. Compared to single-tree representation, the former usually has stronger search capabilities and can improve feature expression under conditions of few samples. However, current dual-tree representations typically use the same or similar function sets (such as DTGPN, where dual trees use a consistent structure), lacking clear functional division, resulting in limited feature diversity. Limitations of existing imbalanced learning strategies in generalization algorithms (GP): GP has been successfully applied to imbalanced classification tasks, and various fitness functions have been used to address class imbalance. However, long-tail learning presents a more extreme and different scenario: it involves a significantly larger number of classes, with a large number of classes having extremely small sample sizes. On such a small tail of classes, common imbalanced fitness functions (e.g., macro-average F1 score, class-balanced accuracy) exhibit high instability. Furthermore, GP research for imbalanced data primarily focuses on tabular data, lacking specific designs tailored to the characteristics of image data, meaning that the potential of GP in the specific scenario of long-tail image classification has not been fully explored. Summary of the Invention

[0004] Purpose of the Invention: The main purpose of this invention is to provide a dual-tree genetic programming method for handling long-tail image classification problems. By constructing a GP individual that integrates data augmentation, feature extraction, and classifier selection, and combining it with a phased sampling strategy, this invention addresses the limitation of Auto Augment, which, due to its static and fixed strategy, cannot adapt to the need for head-tail category differentiation enhancement in long-tail scenarios. By employing two trees with clearly defined functions for data augmentation and feature extraction, this invention solves the problem of insufficient feature diversity and evolutionary bias towards the head caused by the homogeneity of the dual-tree structure in existing GP methods.

[0005] Technical solution: The present invention provides a dual-tree genetic programming method for handling long-tailed image classification problems, comprising the following steps:

[0006] (1) Construct a dual-tree genetic programming individual, including a data augmentation tree and a feature extraction tree, wherein the data augmentation tree is used to perform adaptive data augmentation on the oversampled duplicate samples; the feature extraction tree is used to extract features from the original samples and the augmented duplicate samples and select a classifier;

[0007] (2) Set up a phased sampler, using the original long-tailed distribution training data in the first half of the evolution process, and oversampling a few classes in the second half to construct a class-balanced training subset;

[0008] (3) A multi-generation evolution process is carried out. Each generation includes population initialization, individual fitness assessment, selection, crossover and mutation operations. The fitness assessment is based on the training subset constructed by the stage sampler and is processed and the classification accuracy is calculated using dual-tree individuals.

[0009] (4) After the evolution is complete, the individual with the highest fitness in the two trees is output as the final classification model, which is used to classify new images.

[0010] Furthermore, in step (1), the data augmentation tree contains multiple image augmentation operation function nodes, each node with an evolvable application probability and intensity level parameter, and the augmentation operation is enabled only for oversampled duplicate samples, while the augmentation is skipped directly for the original training samples.

[0011] Furthermore, the enhancement operations of the data augmentation tree include one or more of the following: rotation, cutting, translation, brightness adjustment, contrast adjustment, color adjustment, sharpening, exposure adjustment, tone splitting, histogram equalization, color inversion, and cropping, and the actual parameters of each enhancement operation are randomly sampled within the range corresponding to its intensity level.

[0012] Furthermore, in step (1), the function nodes of the feature extraction tree include visual feature extraction operators and image processing operations, and the top layer is a classifier selection layer, which is used to select a classifier from support vector machine, random forest, logistic regression and extreme random tree.

[0013] Furthermore, in step (2), the phased sampler oversamples the number of samples of all categories to the same level as the category with the most samples in the second half of the evolution. The oversampling method is to randomly copy the original image.

[0014] Furthermore, in step (3), the fitness evaluation specifically involves: dividing the training set into K-fold partitions; constructing a training subset using the current generation sampler; determining whether each image in the training subset should be processed by a data augmentation tree based on whether it is a duplicate sample; inputting all images into a feature extraction tree to extract features and determine a classifier; training the model in the feature space using the selected classifier and calculating the classification accuracy on the validation fold; and using the average of the accuracy of each fold as the individual fitness.

[0015] Furthermore, in step (3), crossover and mutation operations are applied to the data augmentation tree and the feature extraction tree, respectively, and an elite retention strategy is adopted to directly retain the individual with the highest fitness in each generation to the next generation.

[0016] Furthermore, in step (4), during the model deployment stage, the original training set is oversampled to obtain a balanced training set. The duplicated sample is enhanced by the optimal data augmentation tree and then input into the feature extraction tree along with the original sample for feature extraction and classifier training. For the test image, the feature extraction tree is used directly to extract features and input into the trained classifier to obtain the prediction result.

[0017] An electronic device according to the present invention includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the methods described herein.

[0018] The present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the methods described herein.

[0019] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:

[0020] 1. Dual-tree co-evolution with clear functional division of labor, enhancing feature representation diversity: This invention constructs two functionally independent but collaborative program trees—the Data Augmentation Tree and the Feature Extraction Tree—to achieve fully automated evolution from data augmentation and feature extraction to classifier selection. The two trees undertake different tasks, avoiding the structural homogenization problem of traditional multi-tree GP methods and improving feature diversity and expressive power under limited sample conditions.

[0021] 2. Adaptive data augmentation strategy to specifically improve the quality of tail samples: The data augmentation tree only enables augmentation operations on the duplicate samples generated by oversampling, and has evolvable application probability and intensity parameters. It can automatically adjust the augmentation strategy according to the evolution process, which solves the problem that the static strategy of the traditional Auto Augment method is difficult to adapt to the special needs of the tail category. It enhances the diversity of samples while preserving the true distribution of the original samples.

[0022] 3. Staged sampling strategy to balance evolutionary process and class distribution: By using the original long-tailed distribution data in the first half of the evolution and oversampling a few classes in the second half to build a balanced subset, the staged sampler effectively guides the model to learn global features in the early stage and focus on tail classes in the later stage, avoiding the evolutionary process from being biased towards head classes, and improving the model's balance and generalization ability across classes.

[0023] 4. End-to-end evolutionary framework, automatically adapting to different long-tail tasks: This invention integrates data augmentation, feature extraction and classifier selection into an evolutionary dual-tree structure. No manual design of augmentation strategies or feature engineering is required. It can automatically evolve an adapted overall solution according to different datasets and long-tail distributions, and has good task adaptability and transferability. Attached Figure Description

[0024] Figure 1 This is a flowchart of the present invention. Detailed Implementation

[0025] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0026] This invention provides a dual-tree genetic programming method for long-tail image classification, combining a dynamic sampling mechanism with an adaptive data augmentation strategy, including the following steps:

[0027] S1: Construct a dual-tree genetic programming individual representation; S2: Set up a phased sampler; S3: Execute a multi-generation evolution process, with each generation including initialization, evaluation, selection, crossover and mutation operations; S4: Output the optimal dual-tree program as the final classification model.

[0028] Specifically:

[0029] S1: Constructing a dual-tree genetic programming individual representation: Each individual consists of two independent but cooperating program trees:

[0030] The first tree (DataAugTree): Used to implement an improved version of Auto Augment, with a conditional activation mechanism. Its set of function nodes contains the basic image processing operations defined in Auto Augment, including Rotate, ShearX, ShearY, TranslateX, TranslateY, Brightness, Contrast, Color, Sharpness, Solarize, Posterize, Equalize, Invert, Cutout, etc. Each function node carries two evolvable parameters:

[0031] The application probability p∈[0,1] determines whether the enhancement operation is activated during execution;

[0032] Enhancement intensity level s∈{0,1,…,9}: corresponds to a continuous intensity range (e.g., Rotate intensity 5 indicates a rotation angle in [0,1,…,9}). ∘ +6 ∘ (Uniform random sampling within the tree). The tree height is limited to between 1 and 5 layers to ensure that each augmentation path consists of 1–5 consecutive augmentation operations.

[0033] DataAugTree is only enabled for oversampled duplicate samples; for samples in the original training set, regardless of the DataAugTree structure, augmentation is skipped directly, and the input is the output. This mechanism ensures that the original data maintains its true distribution, avoids introducing noise into the original samples of scarce tail classes, and at the same time uses augmentation to improve the diversity of duplicate samples.

[0034] The second tree (FeatureTree) is used for feature extraction and classifier selection. Its terminal nodes receive images (whether original or enhanced) as input; intermediate function nodes include classic visual feature operators (such as HOG, LBP, SIFT) and basic image processing operations; the top layer is fixed as the classifier selection layer, encoding four classifiers—SVM, Random Forest, Logistic Regression, and Extremely Randomized Trees—as four selectable function nodes. The tree height is limited to between 4 and 10 layers. During execution, the image is first processed by the DataAugTree (if it is a duplicate sample), then uniformly input into the FeatureTree, which automatically performs feature extraction and outputs the selected classifier type.

[0035] S2: Configure the staged sampler

[0036] Define the total number of generations ngen (default is 50);

[0037] For any category c, let the number of samples of its head category be N head , then the oversampling target quantity in its g-th generation (0 ≤ g < ngen) is determined by the staged sampling strategy:

[0038] In the first half (g < 25), no oversampling is performed, and the original long-tailed distribution dataset is used. In the second half, it is completely balanced (i.e., the number of samples of all categories = N head );

[0039] At the beginning of the second half, the sampler aligns with the category with the highest number of samples and constructs a balanced training subset: including all original samples + random copy-based oversampling of the minority classes (only copy the original images, without generating new semantic content).

[0040] S3: Execute the multi-generation evolution process, and each generation includes operations such as initialization, evaluation, selection, crossover, and mutation

[0041] Initialization: In the 0-th generation, use the ramped half-and-half method to randomly generate the initial population, and the population size is defaulted to 100;

[0042] Evaluation: Perform the following operations on each individual in the population:

[0043] (a) K-fold divide the training set into training folds and evaluation folds;

[0044] (b) Use the current generation sampler to construct a training subset for the training folds;

[0045] (c) For each image in the training subset: If it is an original sample, bypass the DataAugTree and directly send the original image into the FeatureTree; if it is a copied sample, input it into the DataAugTree of this individual: Since each node in the DataAugTree has randomness in application probability and intensity interval, even if the same copied sample passes through the same DataAugTree multiple times, different combinations of enhancement functions may be triggered, and the actual parameters corresponding to the same intensity level (such as rotation angle, translation pixels) are randomly sampled within the interval. Therefore, each enhancement result has inherent randomness and diversity, effectively alleviating the information redundancy caused by simple copying;

[0046] (d) Input all images (original or enhanced) into the FeatureTree, extract the feature vectors and output the selected classifier type;

[0047] (e) Train the model using the specified classifier in this feature space and calculate the overall classification accuracy on the evaluation folds;

[0048] (f) Use the average of the 50% accuracy as the fitness value for the individual;

[0049] Selection: A tournament selection strategy (tournament size = 5) is adopted to select parent individuals from the current population based on fitness values;

[0050] Crossover and mutation:

[0051] For the selected parent individual, perform subtree crossover independently on its DataAugTree and FeatureTree, with a crossover probability of 0.8.

[0052] The execution point mutation has a mutation probability of 0.19.

[0053] Elite individuals are retained (elite rate = 0.01), meaning that the top 1% of individuals with the highest fitness are directly copied to the next generation in each generation;

[0054] Repeat the above process until the preset ngen generation evolution is completed.

[0055] S4: Output the optimal dual-tree program as the final classification model.

[0056] After evolution is complete, the individual with the highest fitness is selected from the entire historical population as the optimal solution;

[0057] Its DataAugTree is a conditional adaptive augmentation strategy customized for this long-tail task (only used for oversampled samples).

[0058] Its FeatureTree includes both an optimized feature extraction process and a selected classifier type;

[0059] The final model training and deployment process is as follows:

[0060] (S1) Oversample (randomly copy) the original training set, aligning the number of samples in each class with the number of samples in the largest class to obtain a balanced training set;

[0061] (S2) For original samples: input directly into FeatureTree; for duplicate samples: first enhance with the optimal DataAugTree, then input into FeatureTree;

[0062] (S3) Extract all training sample features and complete the training using the classifier specified by FeatureTree;

[0063] (S4) Testing phase: For new input images, features are extracted directly from FeatureTree without going through DataAugTree, and then input into the pre-trained classifier to output the predicted category.

[0064] Experimental Procedure: Since the proposed DAGP method is based on GP, ​​as shown in Table 1, the performance of DAGP was compared with five GP-based image classification methods: FGP (Flexible GP) proposes a flexible procedural structure that combines filtering, pooling, and feature extraction layers, supporting the mixing of variable-depth filtering / pooling operations with traditional feature extraction methods, thus evolving robust features similar to multi-layer convolution and hybrid representations; FLGP focuses on efficient local feature learning and introduces a refined feature selection mechanism to improve classification performance; IDGP, based on StronglyTyped GP, designs a hierarchical procedural structure that can flexibly generate combinations of global or local descriptors (such as SIFT, uLBP, DIF), and excels at improving discriminative ability through the mixing of local / global features; COGP introduces convolution operators into GP, allowing the evolution of deep / shallow convolutional feature representations, thus having a natural advantage in the representation learning of complex images; GP-FR emphasizes end-to-end GP. The evolutionary framework directly evolves into a deployable program that can complete feature extraction and combine it with a classifier. The process is complete and easy to apply during the testing phase.

[0065] These five methods were chosen as comparison objects because they represent the main directions of GP methods for image classification problems, including flexible hierarchical features, local / global descriptor fusion, convolutional feature evolution, and end-to-end feature + classification integration. They are highly comparable to DAGP in terms of methodological paradigm and can comprehensively demonstrate the improvements that DAGP brings to long-tail classification problems after introducing conditional adaptive augmentation and staged sampling.

[0066] Parameter Settings: This invention uses the following parameter settings: population size of 100, maximum number of generations of evolution of 50; sampler switching generation is maximum number of generations of evolution * 0.5; crossover probability of 0.8, mutation probability of 0.19, and elite retention ratio of 0.01 in genetic operations; the initial depth range of feature extraction and classification tree (FeatureTree) is 4 to 10 layers, and the depth limit of data augmentation tree (DataAugTree) is 1 to 5 layers. The custom parameters for each algorithm are set according to the values ​​used in their original papers, which have proven their effectiveness. Performance Metrics: In performance evaluation for long-tail image classification tasks, this invention uses the following standardized performance metrics to comprehensively measure the method's overall performance and performance across different frequency categories:

[0067] 1. Overall classification accuracy

[0068] Top-1 Accuracy: This refers to the proportion of samples where the class predicted by the model with the highest probability matches the true label. This metric reflects the model's overall discriminative ability in single-label prediction.

[0069] 2. Grouping accuracy (based on the number of training samples)

[0070] To analyze the model's ability to handle different frequency categories under a long-tailed distribution, all categories were divided into the following three groups, and their Top-1 accuracy was calculated for each group:

[0071] Many-shot classes: Classes whose training set contains ≥ 100 images;

[0072] Medium-shot: A category containing 50–99 images in the training set;

[0073] Few-shot: A class whose training set contains < 50 images.

[0074] The accuracy rate for each group is calculated independently, using the following formula:

[0075]

[0076] Results and data analysis:

[0077] As shown in Table 1, the experiments demonstrate that DAGP exhibits a significant and stable lead across most datasets and evaluation metrics. In the table, DAGP achieves the best results in Top-1, Top-5, and medium / few-shot accuracies for multiple datasets (e.g., Top-1 for STL-LT-200 = 47.84±1.45, Top-1 for CIFAR10-LT-200 = 44.63±1.91, etc.), with generally smaller standard deviations for each result. Compared to COGP, FGP, FLGP, GP-FR, and IDGP, DAGP achieves 20 / 0 / 0, 13 / 2 / 5, 15 / 1 / 4, 11 / 3 / 6, and 15 / 1 / 4 respectively (where "+" in "+ / - / =" indicates that the comparison method lags behind DAGP in the corresponding item, "-" indicates that the comparison method leads, and "=" indicates a tie). This summary result directly quantifies DAGP's advantage and robustness across all comparison items. The joint evolution of DataAugTree and FeatureTree achieves end-to-end adaptation from data augmentation to feature extraction to classifier selection. It can automatically discover overall solutions for specific long-tail tasks, enabling good compromises and adaptability under different datasets and class frequency distributions.

[0078] Table 1 Comparison of the present invention in terms of dataset and evaluation metrics

[0079] ;

[0080] In a very small number of many-shot or certain Top-5 metrics, other methods lead the way. This mainly reflects that when the class samples are extremely abundant, some baselines that focus on deep convolutional or specific local descriptor combinations (such as COGP, IDGP, FGP) may have a slight optimization effect on certain metrics under extremely abundant samples. However, from the overall win-loss statistics in the table and the significant improvement in few / medium-shot, it can be seen that DAGP does not sacrifice head performance for tail gains, but achieves a more balanced and robust improvement in long-tail scenarios through the collaborative optimization of the data layer and the model layer.

Claims

1. A dual-tree genetic programming method for handling long-tailed image classification problems, characterized in that, Includes the following steps: (1) Construct a dual-tree genetic programming individual, including a data augmentation tree and a feature extraction tree, wherein the data augmentation tree is used to perform adaptive data augmentation on the oversampled duplicate samples; the feature extraction tree is used to extract features from the original samples and the augmented duplicate samples and select a classifier; (2) Set up a phased sampler, using the original long-tailed distribution training data in the first half of the evolution process, and oversampling a few classes in the second half to construct a class-balanced training subset; (3) A multi-generation evolution process is carried out. Each generation includes population initialization, individual fitness assessment, selection, crossover and mutation operations. The fitness assessment is based on the training subset constructed by the stage sampler and is processed and the classification accuracy is calculated using dual-tree individuals. (4) After the evolution is complete, the individual with the highest fitness in the two trees is output as the final classification model and used to classify new images.

2. The dual-tree genetic programming method for processing long-tailed image classification problems according to claim 1, characterized in that, In step (1), the data augmentation tree contains multiple image augmentation operation function nodes, each node has an evolutionary application probability and intensity level parameter, and the augmentation operation is only enabled for the oversampled duplicate samples, while the augmentation is skipped directly for the original training samples.

3. The dual-tree genetic programming method for processing long-tailed image classification problems according to claim 2, characterized in that, The augmentation operations of the data augmentation tree include one or more of the following: rotation, cropping, translation, brightness adjustment, contrast adjustment, color adjustment, sharpening, exposure adjustment, tone splitting, histogram equalization, color inversion, and cropping. The actual parameters of each augmentation operation are randomly sampled within the range corresponding to its intensity level.

4. The dual-tree genetic programming method for processing long-tailed image classification problems according to claim 1, characterized in that, In step (1), the function nodes of the feature extraction tree include visual feature extraction operators and image processing operations. The top layer is a classifier selection layer, which is used to select a classifier from support vector machine, random forest, logistic regression and extreme random tree.

5. The dual-tree genetic programming method for processing long-tailed image classification problems according to claim 1, characterized in that, In step (2), the phased sampler oversamples the number of samples of all categories to the same level as the category with the most samples in the second half of the evolution. The oversampling method is to randomly copy the original image.

6. The dual-tree genetic programming method for processing long-tailed image classification problems according to claim 1, characterized in that, In step (3), the fitness evaluation specifically involves: dividing the training set into K-fold partitions; constructing a training subset using the current generation sampler; and determining whether each image in the training subset should be processed by a data augmentation tree based on whether it is a duplicate sample. Input all images into a feature extraction tree to extract features and determine a classifier; train the model in the feature space using the selected classifier and calculate the classification accuracy on the validation fold; use the average of the fold accuracies as the individual fitness.

7. The dual-tree genetic programming method for processing long-tailed image classification problems according to claim 1, characterized in that, In step (3), crossover and mutation operations are applied to the data augmentation tree and the feature extraction tree, respectively, and the elite retention strategy is adopted to directly retain the individual with the highest fitness in each generation to the next generation.

8. The dual-tree genetic programming method for processing long-tailed image classification problems according to claim 1, characterized in that, In step (4), during the model deployment stage, the original training set is oversampled to obtain a balanced training set. The duplicated samples are enhanced by the optimal data augmentation tree and then input together with the original samples into the feature extraction tree for feature extraction and classifier training. For the test image, the feature extraction tree is used directly to extract features and input into the trained classifier to obtain the prediction result.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Long-tail image recognition method based on self-supervision and self-distillation

    CN113837238A

  • Long-tail image recognition method based on representation data enhancement and loss rebalance

    CN116030302A

  • Long-tail image data screening method and device and storage medium

    CN116775919A

  • Long-tail image recognition method based on deep learning multi-branch logic adjustment integration

    CN118711028A