arXiv:2608.23752cs.CVAug 2026

Manuscript Offprint

arXiv:2608.23752

Too much of a good thing -- when knowledge distillation promotes overfitting, and how to avoid it

Irene Trigueros-Lorca, Leonardo Concepción, Christian Wagner, Isaac Triguero, Daniel Molina

ABSTRACT

The growing size of Convolutional Neural Networks has led to increasingly large and costly models. Knowledge Distillation (KD) addresses this by transferring knowledge from a large network (teacher) to a small one (student), also reducing the training data required. KD is traditionally applied only at the network's final output. However, its behaviour when applied at intermediate network layers has received little attention. This raises the question of whether intermediate block-wise KD, which provides supervision throughout the network, could offer an advantage under specific conditions, such as few instances per class, which is common in fine-grained datasets. This work proposes a student design based on simple, homogeneous blocks mirroring those of the teacher, distilling knowledge between corresponding blocks. Across eleven datasets, we show that on classic datasets, distilling only the last block is sufficient — and often best—, whereas fine-grained, data-scarce settings benefit substantially from intermediate supervision, with even a single additional distillation point narrowing the gap considerably. We further study how this supervision should be guided, exploring configurations of varying granularity and informed by an explainability analysis based on attention maps, Centered Kernel Alignment, and Grad-CAM, alongside the impact of teacher and student fine-tuning strategies. This work shows that intermediate block-wise distillation, guided appropriately, is key to building compact data-efficient models without sacrificing accuracy.

Keywords Deep Learning · Knowledge Distillation · Convolutional Neural Networks · Block-wise Distillation · Data Scarcity · Fine-grained Classification

1 Introduction

Deep Learning (DL) [1] has revolutionised Artificial Intelligence, offering powerful models capable of performing tasks not considered possible just a few years ago. Among its most impactful domains is image processing, where Convolutional Neural Networks (CNNs) have achieved strong performance in applications such as medical imaging [2] or satellite imagery analysis [3], producing a large and diverse family of models tailored to specific tasks and constraints [4]. One reason for this versatility is that CNNs can be easily adapted to new problems by retaining their backbone and changing only the final layers, an adaptation often accelerated by Transfer Learning [5]. However, fine-tuning these models for specific domains requires great computational power to train and deploy them due to their size [6], motivating the need for smaller models.

The compression and acceleration of model training and inference is mainly tackled by four methods [6]: 1) quantization, 2) pruning, 3) decomposition, 4) knowledge distillation. The first three approaches act directly on the original network, optimizing its numerical representation, structure, or parameters to reduce computational cost during inference.

∗^{*}Corresponding author: irenetrigueros@ugr.es

A PREPRINT

Knowledge Distillation (KD) [7, 8], in contrast, adopts a different strategy: it transfers the learned knowledge into a separate, more compact network, making it particularly suitable when architectural flexibility or task specialization is required. One of the most popular KD methods is the teacher-student architecture [9]. This methodology consists of two neural networks: a large pre-trained model (teacher) and a smaller model (student), which is trained under the guidance of the teacher's output. It has been shown that this knowledge transfer during training can greatly improve the process, achieving very competitive results with the smaller model. It is also recognized that KD allows more efficient learning on datasets with scarce data [10, 11]. In particular, fine-grained datasets often face data scarcity due to the high cost of expert annotation required to label classes with subtle visual differences.

While most KD methods transfer knowledge through the teacher's final output predictions, feature-based methods instead transfer the internal representations of the teacher network, aiming to provide richer and more granular supervision signals that capture how the teacher builds its representations progressively, rather than just its final decision. This could be particularly relevant in data-scarce scenarios, where additional supervision signals along the network might help compensate for the limited availability of training examples. Furthermore, the modular structure of many popular CNN models, such as ResNet, VGG, or EfficientNet, composed of repeated homogeneous blocks of increasing complexity, could lend itself to this type of intermediate distillation, offering an additional avenue for more effective and structured knowledge transfer across the network.

However, despite its potential, intermediate feature-based distillation remains comparatively less explored. Although indicated as a possibility since the beginning [12], most proposals apply it only at the end of the model [13] or the end of the convolutional part [14]. This lack of attention is compounded by several open challenges that intermediate KD still faces. There is still no consensus on which layers or blocks should be selected for distillation, nor on whether intermediate distillation points are worth introducing and, if so, how many should be applied [7]. In fact, too few points may add little over end-point distillation, while too many may introduce redundant or conflicting supervision signals. Beyond these design questions, data scarcity itself remains comparatively underexplored from this angle: existing efforts have mostly relied on few-shot or data-free formulations, rather than examining how the distillation depth interacts with dataset complexity and size. Additionally, the diversity of existing proposals regarding what type of representation to transfer, ranging from raw activations to attention maps [15], contrastive [16], or relational knowledge [17], further reflects the lack of agreement on how intermediate knowledge should be extracted and distilled.

In this work, in order to analyse the relationship between data-scarcity and the KD process, we propose a design for a student model composed of repetitive homogeneous blocks, using the same number of blocks as the original CNN teacher model, but with a simpler internal structure. We introduce KD between corresponding blocks of the teacher and student models, where the student is trained to match the teacher's output feature maps at the end of each corresponding block. The first contribution of this paper is a systematic study of the effect of applying KD at different numbers of intermediate blocks, demonstrating that block-wise intermediate distillation substantially enhances learning efficiency, particularly in data-scarce and fine-grained settings. The second contribution is a diagnostic-then-guided design analysis of KD across intermediate blocks, using explainability to identify the conditions under which intermediate distillation provides the greatest benefit.

The main contributions of this work can be divided into the following objectives:

RQ1 To analyse the impact of different fine-tuning strategies within a block-wise KD framework, comparing fine-tuning the teacher alone, the student alone, and both jointly — a relevant consideration in practical scenarios where fine-tuning the teacher is not always possible, whether due to limited access or limited computational resources.

RQ2 To evaluate in which scenarios applying knowledge distillation at intermediate blocks achieves better results than end-point distillation, with particular focus on data-scarce and fine-grained classification settings.

RQ3 To investigate the role of data scarcity and fine-grained complexity as independent factors in block-wise KD, through controlled experiments on data augmentation and data reduction strategies.

RQ4 To explore the effect of the number of intermediate distillation points through evenly distributed distillation points.

RQ5 To examine how knowledge is effectively transferred across intermediate blocks using explainability techniques, identifying which blocks contribute most to effective distillation.

RQ6 To study intermediate block-wise distillation configurations motivated by the explainability analysis.

The remainder of this contribution is organized as follows. In Section 2, we review existing work on KD and explainability in KD. In Section 3, we present the proposed block-wise KD framework and the explainability techniques used to analyse it. In Section 4, we describe the experimental setup, including datasets, models, and training details. In

A PREPRINT

Section 5, we present and discuss the results obtained across the different experimental studies. Finally, in Section 6, we summarise the main findings and outline future work.

References (53)