---
title: 'EKDC-Net: Compact Ensemble Distillation'
url: https://www.emergentmind.com/topics/ekdc-net-architecture
type: topic
---

# EKDC-Net: Compact Ensemble Distillation

EKDC-Net (Ensemble Knowledge Distillation Compact Network) is a convolutional neural network framework for learning compact student models with improved classification accuracy and generalization, designed to transfer ensemble knowledge from multiple teacher networks. It achieves the dual goal of leveraging ensemble teacher supervision while maintaining high efficiency through parallel student branches. EKDC-Net is characterized by a student architecture comprising multiple parallel branches, a precise ensembling strategy, and a multi-term training objective that combines classification and knowledge distillation losses, supporting efficient inference and robust learning in settings such as image classification [1909.08097].

## 1. Student Network Architecture

The EKDC-Net student (“CompNet”) is constructed as a sum-ensemble of $N_s$ parallel branches. Each branch processes the input $x \in \mathbb{R}^{H \times W \times 3}$ independently using a fixed sequence of convolutional and residual layers. For CIFAR experiments ($H=W=32$), each branch computes as follows:

- **Initial convolutional layer**: $3 \times 3$ kernel, $C$ output channels (typ. $C=16$), BatchNorm, ReLU.
- **Three residual blocks**: Each block contains two $3\times3$ convolutions (with BN and ReLU), a skip (identity) connection, and a $2\times2$ pooling with stride $2$. The typical feature map sizes across the spatially downsampled sequence are $32\times32\times16$, $16\times16\times16$, $8\times8\times16$, $4\times4\times16$.
- **Global Average Pooling (GAP)**: Compresses spatial dimensions, yielding a $1\times C$ feature vector.
- **Fully connected (FC) output**: $Q_i^{s} = Y_i W^s + B^s \in \mathbb{R}^{1 \times K}$ for $K$ classes.

All $N_s$ branch logits are summed to obtain the student ensemble logit vector:
$$
P_s = \sum_{i=1}^{N_s} Q_i^s
$$
A softmax operation on $P_s$ yields the final class probabilities. No additional weighting per branch is used, ensuring each branch’s equal contribution in both training and inference. The architecture omits dropout and applies BatchNorm after every convolution.

## 2. Ensembling and Branch Coupling Strategy

EKDC-Net’s design uses explicit ensembling at the logit level by summing the outputs from all student branches (Eq. 1). This is performed for every forward pass, both during training and inference, with the final prediction computed as:
$$
\hat{y} = \text{SoftMax}(P_s)
$$
All branches are architecturally identical and independently process the same input. The branch outputs are not directly coupled via explicit loss terms; rather, coupling is induced implicitly through the knowledge distillation losses that involve both individual branches and their sum, promoting both diverse (per-branch) and collaborative (ensemble) learning.

## 3. Training Objective and Loss Terms

EKDC-Net utilizes a multi-term loss integrating hard-label supervision and knowledge distillation from an ensemble of $N_t$ teacher networks. Each teacher $j$ yields its own output $Q_j^t \in \mathbb{R}^{1 \times K}$; these logits are summed to form the teacher ensemble logit $P_t = \sum_{j=1}^{N_t} Q_j^t$. The overall training loss is:

$$
\mathcal{L}_{train} = \alpha\,\mathcal{L}_{CE}(P_t, y) + \beta\,\mathcal{L}_{CE}(P_s, y) + \gamma\,\mathcal{L}_{KD}
$$

where $y$ is the ground-truth label, and $\alpha$, $\beta$, $\gamma$ balance the loss terms (in practice: $\alpha=0.5$, $\beta=0.5$, $\gamma=0.6$). The terms are defined as:

- **Classification loss**:
  $$
  \mathcal{L}_{CE}(P,y) = -\sum_{k=1}^K 1\{k=y\}\,\log \sigma_k(P)
  $$
  applied to both $P_s$ (student) and $P_t$ (teacher ensemble) versus $y$.

- **Knowledge Distillation loss**:
  Using a temperature $T$ (typically $T=10$) to soften logit distributions,
  $$
  \mathcal{L}_{KD} = KL(p_s \,\|\, p_t) + MSE(P_s, P_t) + \sum_{i=1}^{N_s} \left[ KL(q_i^s \,\|\, q_i^t) + MSE(Q_i^s, Q_i^t) \right]
  $$
  where $p_t^{(k)} = \sigma_k(P_t/T)$, $p_s^{(k)} = \sigma_k(P_s/T)$, $q_j^{t(k)} = \sigma_k(Q_j^t/T)$, $q_i^{s(k)} = \sigma_k(Q_i^s/T)$, $KL$ denotes Kullback–Leibler divergence, and $MSE$ is the squared Euclidean ($\ell_2^2$) distance.

This construction jointly penalizes distinctions between the student ensemble and the teacher ensemble at the distributional and logit level (ensemble-to-ensemble), and between matching branches (branch-to-branch), the latter being performed between corresponding student-teacher pairs.

The ensemble-coupling effect emerges from the $KL(p_s \,\|\, p_t)$ and $MSE(P_s, P_t)$ terms—these encourage the aggregate of all student branches to reproduce the behavior of the teacher ensemble, thereby reducing variance among student branch outputs and promoting collaborative learning.

## 4. Teacher Ensemble and Heterogeneity

The teacher component consists of an ensemble of $N_t$ independently trained networks, each possibly varying in model depth or channel width (the paper cites e.g., ResNet14 through ResNet110 as valid choices). During student training, each teacher $j$ produces its own branch output $Q_j^t$ in an identical forward pattern and all are summed to $P_t$.

This use of a heterogeneous teacher ensemble enhances the diversity of the knowledge transferred to the student branches. Each branch in the student network learns from the corresponding teacher branch via knowledge distillation, promoting heterogeneity in learned representations. The effect is to enable the compact student model to exploit an efficient approximation to ensemble learning, yielding increased generalization and accuracy, especially in low-data regimes.

## 5. Hyperparameterization and Training Protocol

Key design and training parameters are as follows:

| Parameter                | Typical Values                                      | Notes                                     |
|--------------------------|----------------------------------------------------|-------------------------------------------|
| $N_s$ (student branches) | 1–7                                                | Accuracy increases with $N_s$; more FLOPs |
| Channel width $C$        | 16 (on CIFAR)                                      | Fixed across all branches                 |
| Per-branch depth         | 1 initial conv, 3 residual blocks                   | Each residual block ≈2 convs + skip + pool|
| $N_t$ (teacher ensemble) | Up to 7                                            | Heterogeneous ResNet depths possible      |
| Temperature $T$          | 10                                                 | For softened softmax in distillation      |
| Loss weights $\alpha,\beta,\gamma$ | 0.5, 0.5, 0.6                          | From hyperparameter search                |
| Weight decay             | $5 \times 10^{-4}$                                 | On all weights                            |
| Initialization           | Xavier/Gaussian (σ=0.01), bias=0                   | No dropout                                |
| Optimizer                | Adam, LR = 0.01, decay at 50%/75% (+0.1×), 500 epochs |                                          |

Batch Normalization is applied in every convolution layer, consistently across all branches and teachers. The optimizer is Adam with scheduled learning rate drops; no learning rate warmup is indicated. The regularization regime omits dropout entirely, relying on weight decay and architecture-intrinsic regularization.

## 6. Experimental Context and Significance

EKDC-Net was evaluated in image classification settings on CIFAR-10 and CIFAR-100. It demonstrated improved top-1 accuracy and generalization performance compared to other state-of-the-art knowledge distillation frameworks, particularly when the available labeled training data is limited. Notable gains were observed in mean accuracy on test datasets. The design allows practitioners to balance inference cost against accuracy by adjusting the number of student branches $N_s$. The integration of teacher ensemble knowledge into a compact student with parallel branches is central to the observed improvements [1909.08097].

A plausible implication is that EKDC-Net represents an effective approach for practitioners who require efficient inference with an ensemble-like performance, making strategic use of distillation from heterogeneous and potentially larger teacher ensembles without incurring their full computational cost at deployment. This architecture is modular and parameter-efficient, with design choices that are directly supported by empirical results on benchmark datasets.

Source: https://www.emergentmind.com/topics/ekdc-net-architecture