Long-tail image recognition method based on neural network multi-expert hierarchical logic fusion
Through the multi-expert hierarchical logical fusion method of neural network, combined with multi-branch feature extraction and multi-expert hierarchical logical fusion module, the problem of recognition performance degradation under long-tail distribution is solved, and efficient recognition and recognition of long-tail image data sets are achieved. Improvement of model generalization ability.
Patent Information
- Application Number
- CN202410853770.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-28
AI Technical Summary
When existing technologies deal with long-tail distribution image recognition tasks, the recognition performance of standard neural network models declines. Existing methods fail to fully utilize the inherent hierarchical structure of data and the correlation between categories, and multi-model integration methods fail to be effective. Integrating the knowledge of classifiers results in limited performance improvement in long-tail scenarios.
A multi-expert hierarchical logical fusion method based on neural networks is adopted. Through the collaborative work of the shared backbone network and expert network, combined with multi-branch feature extraction and multi-expert hierarchical logical fusion modules, mutual learning is used to improve the model's recognition ability of long-tail images. , and promote the collaborative update of shallow and deep parameters.
It effectively enhances the network's ability to recognize minority class images in the long-tail image data set, improves the recognition performance of the long-tail image data set, and enhances the model's generalization ability and prediction accuracy for tail class images.
Smart Images

Figure CN118711029A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pattern recognition and computer vision, and in particular to a long-tail image recognition method based on neural network multi-expert hierarchical logic fusion. Background Art
[0002] In the field of artificial intelligence, especially in tasks such as image recognition, speech recognition, and natural language processing, neural network technology has become a mainstream method due to its excellent feature extraction and pattern recognition capabilities. However, in practical applications, data usually presents a long-tail distribution, that is, a few categories contain a large number of samples, while most categories contain only a small number of samples. The imbalance of data often leads to a decrease in the recognition performance of standard neural network models, especially when faced with classification tasks of rare events or objects.
[0003] Existing technologies mostly use resampling, cost-sensitive learning or traditional data balancing strategies to solve the long-tail distribution problem. Category resampling balances the data set by oversampling minority categories or undersampling majority categories, while cost-sensitive learning adjusts the classification loss function to give minority categories a higher misclassification cost. However, these methods often introduce additional noise or cause the model to focus too much on minority categories, thus affecting the overall performance. Some studies focus on introducing attention mechanisms, feature fusion, etc. to enhance the model's ability to recognize infrequent categories. However, these methods fail to fully utilize the intrinsic hierarchical structure of the data and the correlation between categories. Sometimes, while increasing the complexity of the model, they still fail to effectively improve the model's ability to handle long-tail data.
[0004] In addition, multi-model or ensemble learning methods propose to improve recognition performance by combining the decisions of multiple classifiers. For example, bagging and boosting algorithms reduce the variance or bias of the model by integrating multiple learners. However, existing ensemble methods often do not take into account the logical relationship between each classifier, especially when processing long-tail data, and fail to effectively integrate the knowledge of multiple classifiers to make up for the lack of data, so the performance improvement in specific long-tail scenarios is limited.
[0005] Some recent advances involve the design of expert systems, which are a series of well-trained networks, each optimized for a specific subset of data. In the long-tail recognition task, expert networks can be designed to be specialized and trained for rare categories in the long-tail distribution. However, how to integrate the knowledge of these expert networks so that they can work together is a question worth exploring. Summary of the invention
[0006] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a long-tail image recognition method based on neural network multi-expert hierarchical logic fusion, which can effectively enhance the network's recognition ability for minority images in long-tail image datasets and promote the coordinated update of shallow and deep network parameters.
[0007] To achieve the above purpose, the technical solution provided by the present invention is: a long-tail image recognition method based on multi-expert hierarchical logic fusion of neural networks, which realizes effective recognition of long-tail images based on a neural network combined with multi-expert hierarchical logic fusion technology, wherein the neural network comprises a multi-branch feature extraction network, two multi-expert hierarchical logic fusion modules and a fully connected layer as a classifier, wherein the multi-branch feature extraction network comprises a shared backbone network and three independent expert networks, wherein the shared backbone network comprises two residual convolution modules, wherein each expert network comprises only one residual convolution module, and the two multi-expert hierarchical logic fusion modules are used to fuse the shallow logic output of the shared backbone network with the deep logic output of the first two expert networks, wherein the logic fusion can effectively enhance the network's recognition ability for long-tail image data sets, and at the same time, a mutual learning method is used between the fused logic outputs of the expert networks, wherein the mutual learning method can not only promote the three expert networks to transmit information and improve each other's performance, but also promote the coordinated update of the backbone network parameters;
[0008] The specific implementation of the long-tail image recognition method based on neural network multi-expert hierarchical logic fusion includes:
[0009] The acquired long-tail image is input into the trained neural network combined with multi-expert hierarchical logic fusion technology to perform the following operations:
[0010] The long-tail image is first input into the multi-branch feature extraction network, and the first shallow feature map is generated through the first residual convolution module of the shared backbone network. Then the first shallow feature map is input into the second residual convolution module of the shared backbone network to extract the second shallow feature map. The second shallow feature map is then input into three expert networks in parallel. Each expert network generates a deep feature map through a residual convolution module.
[0011] After feature extraction is completed, the shallow logic output of the shared backbone network is fused with the deep logic output of the first two expert networks through the multi-expert hierarchical logic fusion module: first, all feature maps input to the multi-expert hierarchical logic fusion module are converted into logic outputs, the two shallow feature maps of the shared backbone network are converted into two shallow logic outputs through the fully connected layer, and the three deep feature maps of the three expert networks are converted into three deep logic outputs through the fully connected layer. Then, the first shallow logic output is fused with the deep logic output of the first expert network through the first multi-expert hierarchical logic fusion module to generate the fused logic output of the first expert network. The second shallow logic output is fused with the deep logic output of the second expert network through the second multi-expert hierarchical logic fusion module to generate the fused logic output of the second expert network. The fused logic output of the third expert network is the deep logic output of the third expert network.
[0012] After obtaining the fusion logic outputs of the three expert networks, the network's predictive reasoning is performed. In the predictive reasoning stage, the fusion logic outputs of the three expert networks are averaged to generate the final fusion logic output, that is, the prediction result of the network's long-tail image category.
[0013] Furthermore, the generation process of the shallow feature map and the deep feature map is expressed as:
[0014] F s1 =θ1(x)
[0015] F s2 =θ2(θ1(x))
[0016] F1=θ 3_1 (θ2(θ1(x)))
[0017] F2=θ 3_2 (θ2(θ1(x)))
[0018] F3=θ 3_3 (θ2(θ1(x)))
[0019] Where θ1 and θ2 represent the parameters of the first and second residual convolution modules in the shared backbone network, respectively. 3_1 ,θ 3_2 and θ 3_3 Respectively represent the parameters of the residual convolution modules in the first, second and third expert networks, x represents the input long-tail image, F s1 Represents the first shallow feature map of the shared backbone network, F s2 It represents the second shallow feature map of the shared backbone network, and F1, F2, and F3 represent the deep feature maps generated by the first, second, and third expert networks, respectively.
[0020] Furthermore, the generation process of the fusion logic output of the three expert networks is expressed as:
[0021]
[0022] In the formula, and They represent the fused logical outputs of the three expert networks respectively. α1 and α2 both represent hyperparameters. FC represents a fully connected layer, which is used to transform feature maps into logical outputs.
[0023] Furthermore, during the training phase, the performance of the three expert networks is further improved by introducing mutual learning into the loss function;
[0024] The loss function L of the neural network is expressed as follows:
[0025]
[0026] In the formula, x and y represent the input long-tail image and label respectively. and They represent the fused logic outputs of the i-th and m-th expert networks, respectively. D represents the training data set. M represents the number of experts set in the network. KL represents the function for calculating the distillation loss between the two fused logic outputs, which is used to achieve mutual learning.
[0027] In the prediction and reasoning stage, the fusion logic outputs of the three expert networks are averaged to generate the final fusion logic output, which is the prediction result of the long-tail image category of the network;
[0028] The generation process of the final fusion logic output is expressed as:
[0029]
[0030] Where output represents the final fusion logic output, that is, the prediction result of the long-tail image category of the network.
[0031] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0032] 1. Enhanced the network's adaptability to different long-tail image data distributions. In traditional neural networks, a single network may have insufficient recognition capabilities for tail-class images in long-tail image datasets due to the long-tail effect in the dataset. Multi-expert networks can adaptively specialize networks for different subsets of image data, thereby improving the overall prediction accuracy for tail-class images.
[0033] 2. The fusion strategy of shallow and deep logic output effectively solves the problem of information loss. In the present invention, the detailed information captured by the low-level network is transmitted and fused layer by layer, and can be optimized and adjusted on networks at different levels, which helps to extract deeper features in long-tail images, thereby improving the recognition ability of the network.
[0034] 3. Mutual learning among multiple expert networks improves the generalization ability of the network as a whole. Each expert network not only learns from the training data, but also corrects and optimizes its own logical output by imitating the predictions of other expert networks. The information fusion between different expert networks enables each expert network to learn knowledge from different angles from other expert networks, further enhancing the generalization ability of the network as a whole. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a structural diagram of a neural network that combines multi-expert hierarchical logic fusion technology. In the figure, ResBlock represents the residual network module, Logit Fusion represents the multi-expert hierarchical logic fusion module, and Classfier represents the classifier (also a fully connected layer), which can transform feature maps into logical outputs. and Represent the fused logical outputs of the first, second, and third expert networks, respectively.
[0036] Figure 2 It is a structural diagram of the multi-expert hierarchical logic fusion module; in the figure, deep input represents the deep feature map of the expert network, shawllow input represents the shallow feature map of the shared backbone network, Classifier represents the classifier (also a fully connected layer), which can transform the feature map into a logic output, and α is a hyperparameter for the fusion of logic outputs. It is the fusion logic output. DETAILED DESCRIPTION
[0037] The present invention will be further described below in conjunction with specific embodiments.
[0038] This embodiment discloses a long-tail image recognition method based on neural network multi-expert hierarchical logic fusion. The method is based on a neural network combined with multi-expert hierarchical logic fusion technology to achieve effective recognition of long-tail images. Figure 1As shown, the neural network includes a multi-branch feature extraction network, two multi-expert hierarchical logic fusion modules and a fully connected layer as a classifier. The multi-branch feature extraction network includes a shared backbone network and three independent expert networks. The shared backbone network includes two residual convolution modules (ResBlock) responsible for preliminarily extracting feature maps of long-tail images. Each expert network only includes one residual convolution module (ResBlock) responsible for further refining the extracted feature maps. The two multi-expert hierarchical logic fusion modules are used to fuse the shallow logic output of the shared backbone network with the deep logic output of the first two expert networks. The logic fusion can effectively enhance the network's recognition ability for long-tail image data sets. At the same time, a mutual learning method is used between the fused logic outputs of the expert networks. Mutual learning can not only promote the three expert networks to transfer information and improve each other's performance, but also promote the coordinated update of the backbone network parameters.
[0039] First, we obtain a long-tail image dataset. The typical feature of this type of dataset is that the head category has a rich amount of images, while the tail category has only a limited number of images, forming a typical long-tail distribution. This experiment uses the CIFAR-100-LT dataset, which includes versions with imbalance rates of 50 and 100.
[0040] Then, a deep learning network model was selected for the experiment. The present invention uses ResNet32 as the core basic feature extraction network, and sets up three expert networks to enhance the network's ability to learn images of the tail class. The SGD optimizer is used in the network training process, where the momentum is set to 0.9, and a weight decay of 0.0005 is applied to prevent overfitting, and the basic learning rate is set to 0.1.
[0041] After determining the long-tail data set and the basic feature extraction network, the acquired long-tail images are input into the trained neural network combined with multi-expert hierarchical logic fusion technology to perform the following operations:
[0042] a. The long-tail image is first input into the multi-branch feature extraction network based on ResNet32, and the first shallow feature map is generated through the first residual convolution module of the shared backbone network. Then the first shallow feature map is input into the second residual convolution module of the shared backbone network to extract the second shallow feature map. The second shallow feature map is then input into three expert networks in parallel. Each expert network generates a deep feature map through a residual convolution module.
[0043] The generation process of the shallow feature map and the deep feature map is expressed as:
[0044] F s1 =θ1(x)
[0045] F s2=θ2(θ1(x))
[0046] F1=θ 3_1 (θ2(θ1(x)))
[0047] F2=θ 3_2 (θ2(θ1(x)))
[0048] F3=θ 3_3 (θ2(θ1(x)))
[0049] Where θ1 and θ2 represent the parameters of the first and second residual convolution modules in the shared backbone network, respectively. 3_1 ,θ 3_2 and θ 3_3 Respectively represent the parameters of the residual convolution modules in the first, second and third expert networks, x represents the input long-tail image, F s1 Represents the first shallow feature map of the shared backbone network, F s2 It represents the second shallow feature map of the shared backbone network, and F1, F2, and F3 represent the deep feature maps generated by the first, second, and third expert networks, respectively.
[0050] b. After feature extraction, the shallow logic output of the shared backbone network is fused with the deep logic output of the first two expert networks through the multi-expert hierarchical logic fusion module: First, all feature maps input to the multi-expert hierarchical logic fusion module are converted into logic outputs. The two shallow feature maps (shawllow input) of the shared backbone network are converted into two shallow logic outputs through the fully connected layer (Classfier). The three deep feature maps (deepinput) of the three expert networks are converted into three deep logic outputs through the fully connected layer (Classfier). Then, the first shallow logic output is fused with the deep logic output of the first expert network through the first multi-expert hierarchical logic fusion module (Logit Fusion) to generate the first
[0051] The fusion logic output of the expert network The second shallow logic output is fused with the deep logic output of the second expert network through the second multi-expert hierarchical logic fusion module (LogitFusion) to generate the fused logic output of the second expert network The fusion logic input of the third expert network The output is the deep logic output of the third expert network;
[0052] The generation process of the fusion logic output of the three expert networks is expressed as:
[0053]
[0054] In the formula, and They represent the fused logical outputs of the three expert networks respectively. α1 and α2 both represent hyperparameters. FC represents a fully connected layer, which is used to transform feature maps into logical outputs.
[0055] c. After obtaining the fusion logic output of the three expert networks, the network prediction reasoning is performed. In the prediction reasoning stage, the fusion logic output of the three expert networks is averaged to generate the final fusion logic output, that is, the prediction result of the long-tail image category of the network;
[0056] The generation process of the final fusion logic output is expressed as:
[0057]
[0058] Where output represents the final fusion logic output, that is, the prediction result of the long-tail image category of the network.
[0059] Specifically, during the training phase of the neural network, the performance of the three expert networks is further improved by introducing mutual learning into the loss function. The loss function L of the neural network is expressed as follows:
[0060]
[0061] In the formula, x and y represent the input long-tail image and label respectively. and They represent the fused logic outputs of the i-th and m-th expert networks respectively, D represents the training data set, M represents the number of experts set in the network, and KL represents the function for calculating the distillation loss between the two fused logic outputs, which is used to achieve mutual learning.
[0062] In order to verify the superiority of the method of the present invention, the present invention is tested on the CIFAR-100-LT dataset. The test results are shown in Table 1.
[0063] Table 1 Image classification accuracy of each method on the CIFAR-100-LT dataset (%)
[0064]
[0065] Table 1 compares the accuracy of various long-tail learning methods on the CIFAR-100-LT dataset. Baseline is the ResNet32 basic image recognition model. LDAM_DRW and Balanced Softmax both balance the long-tail image recognition problem from the perspective of the loss function. RIDE and SADE also use multi-expert networks to solve the long-tail image recognition problem. It can be seen from the data in the figure that compared with the SADE method with the highest accuracy before, the accuracy of the present invention is improved by 0.3% on the CIFAR-100-LT dataset with an imbalance rate of 100, and the accuracy is improved by 0.5% on the CIFAR-100-LT dataset with an imbalance rate of 50.
[0066] The above-described embodiments are only preferred embodiments of the present invention and are not intended to limit the scope of implementation of the present invention. Therefore, all changes made according to the shape and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A long-tail image recognition method based on neural network multi-expert hierarchical logic fusion, characterized in that: The method realizes effective recognition of long-tail images based on a neural network combined with multi-expert hierarchical logic fusion technology. The neural network includes a multi-branch feature extraction network, two multi-expert hierarchical logic fusion modules and a fully connected layer as a classifier. The multi-branch feature extraction network includes a shared backbone network and three independent expert networks. The shared backbone network includes two residual convolution modules, and each expert network only includes one residual convolution module. The two multi-expert hierarchical logic fusion modules are used to fuse the shallow logic output of the shared backbone network with the deep logic output of the first two expert networks. Logical fusion can effectively enhance the network's recognition ability for long-tail image data sets. At the same time, a mutual learning method is used between the fused logic outputs of the expert networks. Mutual learning can not only promote the three expert networks to transfer information and improve each other's performance, but also promote the coordinated update of the backbone network parameters. The specific implementation of the long-tail image recognition method based on neural network multi-expert hierarchical logic fusion includes: The acquired long-tail image is input into the trained neural network combined with multi-expert hierarchical logic fusion technology to perform the following operations: The long-tail image is first input into the multi-branch feature extraction network, and the first shallow feature map is generated through the first residual convolution module of the shared backbone network. Then the first shallow feature map is input into the second residual convolution module of the shared backbone network to extract the second shallow feature map. The second shallow feature map is then input into three expert networks in parallel. Each expert network generates a deep feature map through a residual convolution module. After feature extraction is completed, the shallow logic output of the shared backbone network is fused with the deep logic output of the first two expert networks through the multi-expert hierarchical logic fusion module: first, all feature maps input to the multi-expert hierarchical logic fusion module are converted into logic outputs, the two shallow feature maps of the shared backbone network are converted into two shallow logic outputs through the fully connected layer, and the three deep feature maps of the three expert networks are converted into three deep logic outputs through the fully connected layer. Then, the first shallow logic output is fused with the deep logic output of the first expert network through the first multi-expert hierarchical logic fusion module to generate the fused logic output of the first expert network. The second shallow logic output is fused with the deep logic output of the second expert network through the second multi-expert hierarchical logic fusion module to generate the fused logic output of the second expert network. The fused logic output of the third expert network is the deep logic output of the third expert network. After obtaining the fusion logic outputs of the three expert networks, the network's predictive reasoning is performed. In the predictive reasoning stage, the fusion logic outputs of the three expert networks are averaged to generate the final fusion logic output, that is, the prediction result of the network's long-tail image category.
2. The long-tail image recognition method based on neural network multi-expert hierarchical logic fusion according to claim 1 is characterized in that: The generation process of the shallow feature map and the deep feature map is expressed as: F s1 =θ1(x) F s2 =θ2(θ1(x)) F1=θ 3_1 (θ2(θ1(x))) F2=θ 3_2 (θ2(θ1(x))) F3=θ 3_3 (θ2(θ1(x))) Where θ1 and θ2 represent the parameters of the first and second residual convolution modules in the shared backbone network, respectively. 3_1 ,θ 3_2 and θ 3_3 Respectively represent the parameters of the residual convolution modules in the first, second and third expert networks, x represents the input long-tail image, F s1 Represents the first shallow feature map of the shared backbone network, F s2 It represents the second shallow feature map of the shared backbone network, and F1, F2, and F3 represent the deep feature maps generated by the first, second, and third expert networks, respectively.
3. The long-tail image recognition method based on neural network multi-expert hierarchical logic fusion according to claim 2 is characterized in that: The generation process of the fusion logic output of the three expert networks is expressed as: In the formula, and They represent the fused logical outputs of the three expert networks respectively. α1 and α2 both represent hyperparameters. FC represents a fully connected layer, which is used to transform feature maps into logical outputs.
4. The long-tail image recognition method based on neural network multi-expert hierarchical logic fusion according to claim 3 is characterized in that: In the training phase, the performance of the three expert networks is further improved by introducing mutual learning into the loss function; The loss function L of the neural network is expressed as follows: In the formula, x and y represent the input long-tail image and label respectively. and They represent the fused logic outputs of the i-th and m-th expert networks, respectively. D represents the training data set. M represents the number of experts set in the network. KL represents the function for calculating the distillation loss between the two fused logic outputs, which is used to achieve mutual learning. In the prediction and reasoning stage, the fusion logic outputs of the three expert networks are averaged to generate the final fusion logic output, which is the prediction result of the long-tail image category of the network; The generation process of the final fusion logic output is expressed as: Where output represents the final fusion logic output, that is, the prediction result of the long-tail image category of the network.
Citation Information
Patent Citations
Long-tail remote sensing image target identification method based on dynamic relation distillation
CN115272881A
Method and device for establishing prediction model
CN115546576A
Long-tail learning data enhancement method based on Mosaic fusion
CN117593600A
System and method for predictive network monitoring
US20120023041A1
Cited By
Long-tail image recognition method based on deep learning branch feature map fusion
CN118711027A
Long-tail image recognition method based on deep learning branch feature map fusion
CN118711027B
Small sample target detection method and device based on mixed experts
CN119418041A
A small-sample object detection method and device based on mixture of experts
CN119418041B
Long-tail image recognition method based on hierarchical expert logarithm probability fusion
CN121582740A
