NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Knowledge Transfer via Distillation of Activation Boundaries Formed by Hidden Neurons

Byeongho Heo, Minsik Lee, Sangdoo Yun, Jin Young Choi

Abstract

An activation boundary for a neuron refers to a separating hyperplane that determines whether the neuron is activated or deactivated. It has been long considered in neural networks that the activations of neurons, rather than their exact output values, play the most important role in forming classification friendly partitions of the hidden feature space. However, as far as we know, this aspect of neural networks has not been considered in the literature of knowledge transfer. In this paper, we propose a knowledge transfer method via distillation of activation boundaries formed by hidden neurons. For the distillation, we propose an activation transfer loss that has the minimum value when the boundaries generated by the student coincide with those by the teacher. Since the activation transfer loss is not differentiable, we design a piecewise differentiable loss approximating the activation transfer loss. By the proposed method, the student learns a separating boundary between activation region and deactivation region formed by each neuron in the teacher. Through the experiments in various aspects of knowledge transfer, it is verified that the proposed method outperforms the current state-of-the-art.

Introduction

In the field of deep learning, Knowledge Transfer (or Distillation) typically involves a large, pre-trained "teacher" network guiding the training of a smaller, more efficient "student" network. Traditional techniques often focus on minimizing the Mean Squared Error (MSE) between the teacher’s and student’s hidden features. However, this approach has a significant drawback: MSE is inherently biased toward large activation values. When a teacher neuron exhibits a strong response, the student network prioritizes mimicking that magnitude, often at the expense of neurons with weaker responses.

This paper argues that the most critical information for classification in ReLU-based networks is not the exact magnitude of a neuron's output, but rather its activation boundary—the hyperplane in the feature space where a neuron transitions from "off" (zero) to "on" (positive). These boundaries collectively partition the feature space into decision regions. If a student network fails to replicate these boundaries, it cannot effectively reproduce the teacher's underlying decision logic.

Methodology: Activation Transfer Loss

The core contribution of this work is the Activation Transfer Loss, designed to align the activation boundaries of the student with those of the teacher.

Comparison of MSE-based transfer versus the proposed activation-based transfer. The proposed method focuses on the geometry of decision boundaries rather than raw magnitudes.

The Differentiability Challenge

The ideal objective is to match an indicator function $\rho(x)$, which returns 1 if a neuron is active ($x > 0$) and 0 otherwise. However, because this function is discrete and non-differentiable, it cannot be used directly with gradient descent. To overcome this, the authors propose a piecewise differentiable alternative inspired by the hinge loss used in Support Vector Machines (SVMs):

  • Active Teacher: If the teacher neuron is active, the loss penalizes the student if its response falls below a positive margin ($\mu$).
  • Deactivated Teacher: If the teacher neuron is deactivated, the loss penalizes the student if its response exceeds a negative margin ($-\mu$).
  • Aligned States: If both networks are on the same side of the boundary and beyond the margin, the loss is zero.

To handle architectural differences, such as varying layer shapes or neuron counts, "connector functions" (typically $1 \times 1$ convolutions) are employed to map student features to the teacher's dimensionality during distillation.

Experimental Results

The researchers evaluated the proposed method across several benchmarks, including CIFAR-10, MIT Scenes, CUB 2011, and ImageNet. The results consistently demonstrate that distilling boundaries is more effective than mimicking magnitudes, particularly when training data is scarce.

Learning Speed and Efficiency

One of the most striking results is the improvement in learning speed. On the CIFAR-10 dataset, the proposed method achieved significantly lower error rates with minimal training compared to existing state-of-the-art techniques.

Error rates (%) on CIFAR-10 for different training epoch configurations. The proposed method shows superior performance even with very limited training (e.g., 1+1 epochs).

As shown in the table above, with only 1 epoch of initialization and 1 epoch of training, the proposed method reached a 16.39% error rate, vastly outperforming the next best method, Jacobian matching, which stood at 38.46%.

Transfer Learning and Small Data

The method also excels in low-data regimes. When trained on only 0.1% of CIFAR-10 data, the proposed method achieved a 50.32% error, compared to 74.62% for standard Knowledge Distillation. In transfer learning tasks like MIT Scenes (with only 5 samples per class), the method reached 43.36% accuracy, significantly higher than the 32.39% achieved by a standard ImageNet pre-trained network.

Conclusion

By shifting the focus from output magnitudes to activation boundaries, this research provides a more robust framework for knowledge distillation. The proposed method not only achieves state-of-the-art performance in model compression but also demonstrates exceptional data efficiency and transferability. While the current approach is optimized for ReLU activations, future work may explore similar boundary-focused strategies for other activation functions or as a general-purpose initialization scheme.

Summary updated

BibTeX
@inproceedings{heo2019knowledge,
  author = {Byeongho Heo and Minsik Lee and Sangdoo Yun and Jin Young Choi},
  title = {{Knowledge Transfer via Distillation of Activation Boundaries Formed by Hidden Neurons}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.1609/aaai.v33i01.33013779},
}
Figure