On-Off Pattern Encoding and Path-Count Encoding as Deep Neural Network Representations

Euna Jung, Jaekeol Choi, EungGu Yun, Wonjong RheearXiv 2024 · DOI

Abstract

This paper investigates the necessity of high-precision floating-point activations in Deep Neural Networks (DNNs). By introducing binary On-Off patterns and PathCount encodings, the authors demonstrate that structural firing patterns in deeper layers retain sufficient information for classification and can enhance model interpretability. Experiments across MNIST, CIFAR10, and ImageNet reveal that binary representations often match the performance of full-precision activations in final layers, suggesting that network topology is a primary carrier of information.

Introduction

Despite the success of DNNs, the internal mechanisms of their activations remain opaque. Researchers typically analyze numerical outputs to interpret model behavior, but it is unclear if the specific magnitude of these values is the critical factor. This study explores two alternative representations: On-Off patterns (binary firing states) and PathCounts (the number of active signal paths from input to neuron). The goal is to determine how much information is preserved when precise floating-point values are discarded in favor of these structural properties.

Methodology

The researchers investigated two primary encodings to represent neuron activity:

  1. On-Off Pattern: A binary representation indicating whether a ReLU neuron is active (>0) or inactive (0).
  2. PathCount: A measure of the total number of "active paths"—sequences of non-zero activations—connecting the input to a specific neuron.
Figure 1: Schematic representation of On-Off patterns and PathCount encoding within a standard convolutional neural network.

To evaluate these, the authors used Activation Replacement, where pre-trained models (e.g., VGG16, ResNet18) had their standard ReLU activations replaced with these encodings during inference. To handle the computational complexity of counting paths in deep networks, a gradient-based approximation was developed by setting weights to constants. Additionally, modified Class Activation Maps (CAMs) were created to test if these structural encodings could improve model interpretability.

Experimental Results

The study utilized standard benchmarks including MNIST, CIFAR10, and ImageNet, alongside a custom "Tiled-ImageNet" dataset for interpretability testing.

Information Preservation in Deep Layers

A key finding is that binary On-Off patterns in the final layers of a network contain nearly all the information required for classification. As shown in Figure 2, the "On-Off accuracy" tends to converge toward the original "Test accuracy" as the signal progresses through deeper layers.

Figure 2: Performance of On-Off and PathCount encodings across different architectures (VGG16, GoogLeNet, ResNet18) and datasets (MNIST, CIFAR10, ImageNet).

The PathCount Paradox

While PathCount correlates strongly with activation magnitude on simple datasets like MNIST, this correlation vanishes on complex datasets like ImageNet. This suggests that in sophisticated models, the intensity of a signal and the number of paths contributing to it represent distinct types of information.

Interpretability and Structure

Surprisingly, binary patterns often provide "cleaner" explanations than raw activations. In the Tiled-ImageNet experiment, OnOff-CAM outperformed standard Act-CAM in target-matching accuracy (e.g., 0.9744 vs. 0.9699 for VGG16). This indicates that the binary firing state is a more reliable indicator of network focus than noisy floating-point magnitudes.

Discussion and Limitations

While the results are promising for model compression and interpretability, the current framework is specific to ReLU activations due to their hard zero-threshold. Future work is needed to adapt these findings to smooth activations like GELU or Swish, common in modern Transformer architectures. Additionally, calculating PathCount currently requires specific architectural constraints (e.g., bypassing bias terms), which may limit immediate application to all off-the-shelf models.

Conclusion

This research demonstrates that the structural topology of a neural network—which neurons fire and how many paths lead there—is a primary carrier of information. The ability of binary On-Off patterns to maintain high inference accuracy in deep layers opens new avenues for efficient model design and robust black-box explanation tools.

Summary updated

BibTeX
@misc{jung2024off,
  author = {Euna Jung and Jaekeol Choi and EungGu Yun and Wonjong Rhee},
  title = {{On-Off Pattern Encoding and Path-Count Encoding as Deep Neural Network Representations}},
  year = {2024},
  eprint = {2401.09518},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.09518},
}
Figure