Manuscript Offprint

arXiv:2610.37937

You Don't Need Aligned Representations: Knowledge Distillation via Random Prototype Spaces

Hamza Etcibasi, Ramazan Gokberk Cinbis

Abstract

A widely held assumption in knowledge distillation is that teacher and student representations must occupy a compatible or explicitly aligned feature space. We propose RPKD (Random Prototype Knowledge Distillation), which discards this assumption by comparing both networks against a shared bank of randomly initialized, frozen prototype vectors. Alignment is therefore carried out in an external reference space rather than in the teacher's native feature coordinates: the teacher side is projected by fixed random maps that carry no trainable parameters, and only the student adapts. Two branches handle the transfer: a logit branch aligning global prototype similarity distributions and a feature branch matching spatially-resolved prototype activation maps. Both operate within the same fixed prototype space, which can be interpreted as a random feature embedding that approximately preserves inter-sample similarity structure, so the prototype bank and the distillation objective stay unchanged across teacher–student pairs while only the input projections are instantiated per architecture. In low-category settings, decoupling the prototype vocabulary from the task label space yields richer supervision than the label space alone, an advantage absent from logit-based methods, whose supervisory signal collapses as class count shrinks. This advantage is especially relevant in real-world scenarios where the label space is typically constrained. Extensive experiments demonstrate the effectiveness of RPKD, achieving a maximum gain of +7.98% over OFA on CIFAR-100, +12.44% on ImageNet-100, and +1.28% on ImageNet-1K. Source code is available at https://github.com/HamzaEtcibasi/RPKD.

1 Introduction

Knowledge distillation (KD) [1, 2] transfers the predictive behavior of a large teacher network into a compact student, serving as a practical compression technique alongside pruning, quantization, and low-rank decomposition in standard training pipelines. Hinton et al. [1] align student and teacher output distributions via temperature-scaled softmax logits, whose soft targets encode inter-class similarity structure (the so-called dark knowledge) that hard labels discard.

The literature has since diverged into two directions. Logit-based methods [3–9] revisit output-level objectives, showing that iterative, collaborative, or standardized soft-target losses can match feature-level transfer with far less overhead. Feature-based methods [10–23] transfer intermediate representations—hints, attention maps, activation boundaries, relational structures, and contrastive embeddings—providing supervisory signal richer than soft labels alone. The strongest results come from combining both [24, 25].

Nearly all these methods assume teacher and student belong to the same architectural family. This assumption is frequently violated in practice. Modern visual recognition spans convolutional net-

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

works [26–28], vision transformers [29–31], and MLP-based models [32, 33], each with different inductive biases, feature dimensionalities, and spatial representations. Distilling across these boundaries is not a niche scenario: an organization deploying a large pretrained ViT often has no same-family teacher for its target CNN student, making cross-architecture KD the only path short of retraining from scratch. The obstacle is geometric. Heterogeneous feature spaces differ in dimensionality, spatial structure, and statistical properties, so standard feature-based KD is inapplicable without alignment modules that add parameters and risk introducing misalignment rather than resolving it.

Existing methods address this through learned alignment [34, 25, 35, 36]. OFA [25] maps student features into the class logit space via learned stage-wise projectors; subsequent work refines this direction through redundancy suppression [35] or representation fusion before transfer [36]. Despite their effectiveness, these approaches share a structural limitation: alignment modules are architecture-specific and pair-dependent, and methods tied to the class logit space suffer supervisory signal collapse as the number of task classes shrinks.

We ask a more fundamental question: does the shared alignment space itself need to be learned, or can a fixed random space suffice? We propose RPKD (Random Prototype Knowledge Distillation), which transfers knowledge through a shared set of randomly initialized, frozen prototype vectors entirely decoupled from class semantics. Both teacher and student are projected into this fixed random prototype space independently: the teacher via frozen random linear projectors that require no training, the student via a learnable MLP that adapts to match the teacher's fixed prototype similarity patterns. Because the shared space and all teacher-side projections are fixed at initialization, the student faces a stable, well-defined alignment target throughout training with no joint teacher–student optimization required, and the shared space has fixed dimension MM regardless of the number of task classes, avoiding the supervisory collapse that plagues class-logit-based methods in low-category settings. Distillation proceeds through two complementary branches: a logit branch that aligns global prototype similarity distributions, and a feature branch that matches spatially-resolved prototype activation maps, jointly transferring semantic and structural knowledge within the same random space.

Crucially, the entire teacher-side construction reduces to just two lightweight frozen random linear projectors—one for global features and one for spatial features—requiring no training whatsoever; only the student's MLP adapter is optimized. This minimal footprint makes RPKD immediately applicable to a new teacher–student pair: neither the objective nor the prototype space has to be redesigned, and the teacher side needs no training at all. A notable practical advantage of this design emerges in low-category settings: because the prototype vocabulary is decoupled from the number of task classes, it provides consistently rich supervisory signal even when few class labels are available, a condition common in domain-specific and real-world deployment scenarios. Our contributions are:

  • RPKD: a cross-architecture distillation framework using a frozen random prototype space, in which the shared space and all teacher-side projections are fixed at initialization and no design choice depends on the number of task classes.
  • Dual-path objective: a logit branch over global prototype similarities and a feature branch over spatial activation maps, transferring both semantic and structural knowledge within a single shared space.
  • Low-category robustness: an empirical and theoretical motivation for why prototype spaces provide richer, more stable supervision than the task label space when class counts are small.
  • State-of-the-art results: up to +7.98% over OFA on CIFAR-100, up to +12.44% on ImageNet-100, and +1.28% on ImageNet-1K, with consistent gains across CNN and ViT architectural families and few-class subsets.

References (47)

  • Distilling the Knowledge in a Neural Network
  • Knowledge distillation: A survey
  • Born again neural networks
  • Deep mutual learning
  • Knowledge distillation via route constrained optimization
  • Densely guided knowledge distillation using multiple teacher assistants
  • Knowledge distillation from a stronger teacher
  • Decoupled knowledge distillation
  • Logit standardization in knowledge distillation
  • Fitnets: Hints for thin deep nets
  • Paying More Attention to Attention: Improving the Performance of Convolutional Neural Networks via Attention Transfer
  • A gift from knowledge distillation: Fast optimization, network minimization and transfer learning
  • Knowledge transfer via distillation of activation boundaries formed by hidden neurons
  • A comprehensive overhaul of feature distillation
  • Like what you like: Knowledge distill via neuron selectivity transfer (opens arXiv in a new tab)
  • Correlation congruence for knowledge distillation
  • Relational knowledge distillation
  • Knowledge distillation via instance relationship graph
  • Contrastive representation distillation (opens arXiv in a new tab)
  • Variational information distillation for knowledge transfer
  • Knowledge distillation via the target-aware transformer
  • Knowledge distillation with the reused teacher classifier
  • Task-oriented feature distillation
  • Distilling knowledge via knowledge review
  • One-for-all: Bridge the gap between heterogeneous architectures in knowledge distillation
  • Deep residual learning for image recognition
  • Mobilenetv2: Inverted residuals and linear bottlenecks
  • A convnet for the 2020s
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Swin transformer: Hierarchical vision transformer using shifted windows
  • Training data-efficient image transformers & distillation through attention
  • An all-mlp architecture for vision
  • Feedforward networks for image classification with data-efficient training
  • Cross-architecture knowledge distillation
  • Cross-architecture distillation made simple with redundancy suppression
  • Fuse before transfer: Knowledge fusion for heterogeneous distillation
  • Attention is all you need
  • End-to-end object detection with transformers
  • Segformer: Simple and efficient design for semantic segmentation with transformers
  • Scalable diffusion models with transformers
  • Dearkd: data-efficient early knowledge distillation for vision transformers
  • Locality guidance for improving vision transformers on tiny datasets
  • Extensions of Lipschitz mappings into a Hilbert space
  • An elementary proof of a theorem of Johnson and Lindenstrauss
  • Learning multiple layers of features from tiny images
  • An imperative style, high-performance deep learning library
  • Contrastive multiview coding