Deep Representation Learning with Target Coding

Shuo Yang, Ping Luo, Chen Change Loy, Kenneth W. Shum, Xiaoou TangAAAI 2015

Abstract

We consider the problem of learning deep representation when target labels are available. In this paper, we show that there exists an intrinsic relationship between target coding and feature representation learning in deep networks. Specifically, we found that distributed binary code with error-correcting capability is more capable of encouraging discriminative features, in comparison to the 1-of-K coding that is typically used in supervised deep learning. This new finding reveals additional benefits of using error-correcting code for deep model learning, apart from its well-known error-correcting property. Extensive experiments are conducted on popular visual benchmark datasets.

Introduction

In supervised deep learning, the standard practice for classification is to represent labels using 1-of-K coding, also known as one-hot encoding. While computationally simple, this approach treats every class as equally unrelated and provides minimal guidance for the network's internal feature-learning process. This paper explores whether alternative target coding schemes—specifically distributed binary codes with error-correcting properties—can induce more discriminative and robust feature representations.

The Limitations of 1-of-K Coding

One-hot encoding is often "lazy" in that it does not exploit the potential of the target space to shape the hidden layers. In complex tasks, visually similar classes (e.g., digits "8" and "9") often end up clustered too closely in the feature space, leading to high misclassification rates. The authors hypothesize that by designing better target codes, we can force the network to learn more separable features by providing a more structured training signal.

Proposed Method: Hadamard Coding

The authors propose replacing one-hot labels with Hadamard Coding, derived from error-correcting code theory. Hadamard codes possess three critical properties that aid in feature learning:

  1. Row Uniformness: Each label has an equal number of 1s and 0s, providing redundancy that helps the network recover from small prediction errors.
  2. Column Uniformness: Each bit acts as a balanced decision function, partitioning the dataset into two halves and forcing the network to learn complex, factorized features.
  3. Constant Pairwise Distance: Every class is mathematically equidistant from every other class, preventing the network from collapsing different classes into the same feature area.

To handle cases where the number of classes does not match a Hadamard matrix size, a Greedy Search method is used to select the most effective subset of codewords.

Visualizing Feature Evolution

A key finding is that target coding dictates the geometry of the hidden feature space. As shown in Figure 1, Hadamard coding naturally separates ambiguous clusters that overlap under standard 1-of-K coding.

Experimental Results

The approach was validated on MNIST variants, STL-10, CIFAR-100, and ImageNet-2012. Across all benchmarks, Hadamard coding (HC) consistently outperformed the 1-of-K baseline. For instance, on the MNIST variant, accuracy rose from 72.83% to 84.08% with HC-255. On ImageNet, a 2% absolute improvement in top-1 accuracy was observed.

Furthermore, the quality of features improves as they move through deeper layers. Figure 6 demonstrates that while features in early layers are somewhat mixed, the Hadamard-guided networks achieve much tighter and more distinct clustering in the final fully-connected layers compared to the 1-of-K baseline. Increasing the code length (e.g., from 127 to 255 bits) further refines these representations.

Conclusion

Target coding is more than just a labeling convention; it is a powerful training signal that shapes the internal representations of deep networks. By using distributed binary codes like Hadamard codes, researchers can encourage the learning of more robust and discriminative features. Future work may involve incorporating semantic prior knowledge into these codes to further enhance hierarchical representation learning.

Summary updated

BibTeX
@inproceedings{yang2015deep,
  author = {Shuo Yang and Ping Luo and Chen Change Loy and Kenneth W. Shum and Xiaoou Tang},
  title = {{Deep Representation Learning with Target Coding}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2015},
  doi = {10.1609/aaai.v29i1.9796},
}
Figure