Dynamic Hamming Code Encoding for Neural Network Classification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Neural networks face challenges in accurately distinguishing between classes with high confusability due to fixed hamming distances in one-hot encoding, leading to increased mis-prediction rates when data is not separable.

Innovation Solution

Generating hamming codes that maximize the hamming distance between confusable classes and training convolutional neural networks with these modified labels to improve classification accuracy, using a confusion matrix to determine class confusability and adjust hamming distances accordingly.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If one-hot encoding is used with fixed hamming distance, then the encoding structure is simple and easy to implement, but the model cannot effectively distinguish between confusable classes leading to increased mis-prediction rates

Engineering Contradiction:
Improveclassification accuracyVSAvoidencoding complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent changes the fixed hamming distance parameter of one-hot encoding into a dynamic parameter that varies based on class confusability. By computing a confusion matrix to identify which classes are more likely to be confused, the system assigns larger hamming distances to pairs of confusable classes and smaller distances to less confusable classes. This parameter adaptation resolves the contradiction by maintaining encoding simplicity while improving classification reliability for difficult-to-distinguish classes.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent transforms the static one-hot encoding scheme into a dynamic encoding system where the hamming distance between class labels is adjusted based on the confusability of those classes. The confusion matrix computation and subsequent dynamic distance assignment make the encoding adaptive to the specific characteristics of the dataset, allowing the system to handle confusable classes more effectively while preserving the overall simplicity of the one-hot encoding framework.

Inventive Principle:
Principle #15Dynamics

2Adaptability or versatility

If fixed hamming distance encoding is used, then the implementation is straightforward, but the model generalization capability deteriorates when data is not separable

Engineering Contradiction:
Improvemodel generalizationVSAvoidencoding process complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by computing the confusion matrix and determining optimal hamming distances before the actual training process begins. This pre-computation step analyzes the dataset characteristics and configures the encoding scheme accordingly, allowing the model to be trained with an encoding that is already optimized for the specific data distribution. This preliminary configuration improves model generalization without adding complexity during the training and inference phases.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent adapts the encoding parameters based on dataset characteristics by computing the confusion matrix and adjusting hamming distances accordingly. This parameter change approach makes the encoding scheme adaptable to different datasets and class confusability patterns, thereby improving model generalization capability while maintaining a relatively simple implementation process.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If standard one-hot encoding is used, then the computational overhead is low, but mis-prediction errors increase for confusable classes

Engineering Contradiction:
Improveprediction accuracyVSAvoidcomputational resources
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent segments the encoding process into two distinct phases: a pre-computation phase where the confusion matrix is computed and optimal hamming distances are determined, and a training phase where the model is trained with the customized encoding. This segmentation allows the system to invest computational resources in the one-time pre-computation step to improve prediction accuracy, while keeping the training and inference phases computationally efficient. The segmentation resolves the contradiction by separating the computational overhead from the ongoing prediction process.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs the computationally intensive confusion matrix computation and hamming distance optimization as a preliminary action before model training. This preliminary computation, while resource-intensive, is performed only once and enables significantly improved prediction accuracy throughout the model's operational life. The trade-off is resolved by front-loading the computational cost to achieve long-term benefits in prediction reliability.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11410043B2Hamming distance based robust output encoding for improved generalization
Publication Date: 2022.08.09 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11410043B2 patent drawing
  • US11410043B2 patent drawing
  • US11410043B2 patent drawing

AI summary

A computer-implemented method generates a hamming code based target label for each class of a dataset in which hamming distance between the target labels in the dataset is maximized and trains a convolutional neural network with the hamming codes based target label to thereby produce a trained AI model. The confusability between classes of the dataset is determined using a confusion matrix. The hamming distances of classes of the dataset that are determined to be more confusable are set to higher values than the hamming distances of classes of the dataset that are determined to be less confusable.