Dynamic Class Weighting for Neural Network Training
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Neural networks trained on imbalanced datasets tend to focus more on classes with numerous samples, leading to lower accuracy in classification tasks for classes with fewer samples, due to disparities in the number of training instances across different classes.
Innovation Solution
Implementing a dynamic class weighting approach during training, where weights are adjusted based on the number of samples per class, using an algorithm that updates weights iteratively to ensure the model pays equal attention to all classes, thereby reducing the impact of sample size disparities.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If standard training is performed on imbalanced datasets, then the network can be trained efficiently using available data, but the classification accuracy for minority classes deteriorates due to focus on majority classes
Solution Approach 1:
The patent implements dynamic class weighting where the weights for different classes are adjusted iteratively during training based on the current loss values. The weight for each class is updated using a momentum-based approach: weight[c] = weight[c] * momentum + normalized_loss[c] / min(normalized_loss). This dynamic adjustment allows the training process to adapt to the imbalanced data distribution, progressively increasing attention to minority classes while maintaining overall training stability.
Solution Approach 2:
The patent introduces a feedback mechanism where the loss for each class is monitored and used to update the class weights. The normalized loss per class feeds back into the weight calculation, creating a closed-loop control system that automatically balances the contribution of different classes to the overall training objective. This feedback ensures that classes with higher loss (typically minority classes) receive increased weighting in subsequent training iterations.
2Measurement precision
If class weights are increased for minority classes to improve their classification, then the precision for those classes improves, but the overall training loss may increase due to rebalancing
Solution Approach 1:
The patent changes the parameter of class weights dynamically during training rather than using fixed weights. The weight for each class is modified based on the normalized loss and momentum parameter, allowing the system to adapt the weighting scheme as training progresses. This parameter change enables the model to achieve better precision for minority classes while managing the overall training loss through progressive adaptation.
Solution Approach 2:
The class weight updates are performed periodically at specific training intervals (e.g., at the end of each epoch or after a certain number of batches) rather than continuously. This periodic adjustment allows the training process to stabilize between updates while still incorporating feedback from minority class performance, balancing the trade-off between improving minority class precision and maintaining overall training efficiency.
Data Source
AI summary
Apparatuses, systems, and techniques are presented to train neural networks and use those neural networks for inferencing tasks. In at least one embodiment, one or more neural networks are caused to be trained using weight parameters based, at least in part, on an amount of training data used to train the one or more neural networks.


