Abstract
Deep learning performance often relies on model ensembles, which are computationally expensive and impractical for resource-constrained environments. We propose Stochastic Self-Distillation (SSD), a method that simulates ensemble diversity using a single pre-trained teacher model. By maintaining active dropout during distillation, we generate a pool of stochastic representations. A novel Student-Guided Knowledge Distillation (SGKD) mechanism then allows the student model to filter and weight these representations based on their relevance. SSD achieves state-of-the-art results on time-series and image benchmarks, matching ensemble performance with a single-model footprint.
Introduction
Ensembling multiple models is a standard technique to improve robustness and accuracy, yet it imposes significant burdens on training time and inference memory. Self-distillation offers a more efficient path, but traditional methods often treat the teacher as a deterministic entity, failing to capture the benefits of predictive diversity.
This paper introduces Stochastic Self-Distillation (SSD). SSD bridges the gap between efficient self-distillation and powerful ensembling by leveraging "stochasticity" as a source of diversity. By using the student model to guide the selection of teacher representations, SSD avoids the pitfalls of learning from noisy stochastic outputs, leading to superior performance on tasks ranging from wearable biosignal analysis to computer vision.
Methodology
The SSD framework is built upon three core components designed to extract the most useful information from a stochastic teacher.
1. Distillation-Time (DT) Dropout
Unlike standard inference where dropout is disabled, SSD keeps dropout layers active in the pre-trained teacher model. By performing multiple forward passes for a single input, the teacher generates a set of $N$ diverse representations, $f_i^{\mathcal{T}}(x)$. This process effectively simulates an ensemble of sub-networks within the same model architecture.
2. Student-Guided Knowledge Distillation (SGKD)
To manage the noise inherent in stochastic outputs, the student model $\mathcal{S}$ (initialized with teacher weights) acts as a filter. The relevance of each teacher representation $f_i^{\mathcal{T}}(x)$ is determined by its similarity to the student's current representation $f^{\mathcal{S}}(x)$. This similarity, $\phi_i$, is used to compute attention weights $\alpha_i$ via a softmax function.
3. Filtering and Weighting
To ensure the student learns from high-quality "teacher views," the framework applies percentile masking. Representations with weights below the 90th percentile are discarded ($\hat{\alpha}_i = 0$), and the remaining weights are used to produce a weighted average teacher representation $\hat{f}_i^{\mathcal{T}}(x)$. This filtered representation serves as the target for the distillation loss $\mathcal{L}_{dist}$.
Experiments and Results
The authors evaluated SSD across several domains, with a particular focus on time-series data for wearable health monitoring.
Performance on Time-Series and Affective Computing
SSD demonstrated significant gains on datasets like Biovid Heat Pain (achieving 86.90% accuracy) and StressID. Across 12 datasets from the UCR Archive, SSD consistently improved the TS2Vec baseline, raising average accuracy from 0.8350 to 0.8441.
Efficiency vs. Ensembles
On the Human Activity Recognition (HAR) dataset, SSD matched the performance of complex weight-averaging methods like "Greedy Soup" and outperformed a 25-model ensemble. Crucially, SSD required approximately 25x fewer G-FLOPs during training compared to the ensemble and maintained the memory footprint of a single model during inference.
Ablation Studies
Ablation experiments confirmed that "Student Guidance" is critical. Without SGKD, the student model's performance degrades as it struggles to distinguish between helpful diversity and harmful noise in the stochastic teacher outputs.
Discussion and Conclusion
SSD provides a scalable method for boosting model performance without increasing deployment costs. By repurposing dropout as a diversity engine and using the student as an intelligent filter, SSD captures the essence of an ensemble within a single-model framework.
A current limitation is the dependency on architectures with dropout layers. Future research may explore alternative methods for generating stochasticity, such as feature-space perturbations, to extend SSD to a broader range of neural architectures like Vision Transformers.
Summary updated