Research
Learning Task-Agnostic Representations through Multi-Teacher Distillation
Overview Research area: Machine learning — knowledge distillation, representation learning, and multimodal embedding models. Technical level: Intermediate (assumes familiarity with embeddings, knowled
- arXiv
- 2510.18680
- Published
- 2025-10-21
- Authors
- Philippe Formont, Maxime Darrin, Banafsheh Karimian, Jackie CK Cheung, Eric Granger, Ismail Ben Ayed, Mohammadhadi Shateri, Pablo Piantanida
AI summary
Overview
- Research area: Machine learning — knowledge distillation, representation learning, and multimodal embedding models.
- Technical level: Intermediate (assumes familiarity with embeddings, knowledge distillation, and basic information theory; the core idea is intuitive even where the math is not).
- Scope: A single unified, task-agnostic distillation framework, validated across text, molecular, and image modalities.
What This Paper Is About
Different pretrained embedding models capture different aspects of the same input because they differ in architecture, training objective, modality, and data. The paper asks how to compress the knowledge of many such teachers into one smaller student embedder that produces a single, general-purpose representation, without being told in advance what downstream task the representation will be used for. Existing multi-teacher distillation methods are typically tied to a specific task, so they must be retrained for every new problem; this work removes that dependency.
Key Contributions
- A task-enabling formulation of multi-teacher distillation. The authors frame the goal as making the student's Bayes-optimal predictor agree with the Bayes-optimal predictors of every teacher, averaged over teachers — effectively a "majority vote" objective.
- A task-agnostic upper bound. They prove that the probability of the student's Bayes classifier disagreeing with a teacher's is bounded by the conditional entropy of the teacher's embedding given the student's. Since this bound contains no task variable, optimizing it improves agreement on any downstream task.
- A tractable loss. They convert the bound into a practical training objective by estimating the conditional distribution of teacher embeddings given student embeddings with learnable Gaussian kernels (mean and covariance networks), yielding a negative log-likelihood (NLL) loss that is differentiable and end-to-end trainable.
- Released state-of-the-art efficient embedders. Trained students for NLP, molecular modeling, and vision are released, with competitive results on classification, regression, clustering, and sentence similarity benchmarks.
Main Findings
- Information-theoretic link: Minimizing the proposed loss is equivalent to maximizing the mutual information between the student's embeddings and each teacher's embeddings, since each teacher's marginal entropy is constant with respect to the student.
- NLP results (MTEB benchmark): Distilled snowflake students (22M–335M parameters) rank first among models of comparable size on most classification tasks. The 109M student outperforms models three times larger; the small students gain roughly 2 points over the previous best efficient GIST-based embedders.
- NLL beats MSE distillation: On all three modalities, training with the Gaussian-kernel likelihood loss consistently outperforms mean-squared-error and cosine-similarity distillation, mirroring findings from reinforcement learning that distributional/interval estimation is more stable than pointwise regression.
- Molecular modeling: With eight teachers spanning SMILES text, 2D graphs, and 3D point clouds, the student achieves the best average rank across TDC ADMET classification and regression tasks, beating its own teachers and MSE, cosine, and CompRess baselines.
- More teachers help: Training with one, two, then eight teachers shows steady improvement, with a small exception on the Blood-Brain Barrier task, whose data distribution differs most from the training set.
- Vision: A 3.7M-parameter PVTv2 student sits on the Pareto frontier of accuracy versus model size across CIFAR10, SVHN, STL10, DTD, FGVCAircraft, and CUB, performing comparably to ViT teachers roughly 20× larger.
- Low overhead: Adding a teacher costs about 1.57 ms per training step, under 1% of total runtime, because teacher embeddings are precomputed and stored (about 100 GB for the largest text teacher).
- Structural limitation: Because mutual information is invariant under invertible transformations, the objective does not shape the geometry of the embedding space. Gains are therefore stronger on classification (which trains a small head on top) and more modest on clustering and semantic textual similarity (which rely on embedding dot products).
Methodology in Plain English
The researchers start from a simple intuition: if the student's representation is informative enough that a classifier built on it would make the same predictions as classifiers built on the teachers' representations, then the student has captured what the teachers know.
They formalize this as minimizing the probability that the student's best-possible classifier disagrees with any teacher's best-possible classifier. Using a known bound, this probability is controlled by how much uncertainty remains about a teacher's embedding once you know the student's embedding. That quantity — a conditional entropy — does not involve any task label, which is exactly what makes the method task-agnostic.
To actually compute it, for each teacher they attach a small network that takes the student's embedding and outputs a Gaussian mean and covariance. The loss is the negative log-likelihood of the real teacher embedding under that Gaussian. The student and all these Gaussian-kernel heads are trained jointly, then the heads are thrown away and only the student embedder is kept. Teacher embeddings are precomputed once and cached, so training batches are just sampled from those stored vectors, keeping the multi-teacher cost near-constant.
Evaluation follows a standard frozen-backbone protocol: for each modality and benchmark, the student's weights are frozen and a small feed-forward network or linear classifier is trained on its embeddings for a task the student never saw during distillation.
Why This Matters
This is one of the few works to make multi-teacher feature distillation genuinely task-agnostic, which matters because modern embedding models are large, expensive, and often specialized. The paper turns a library of diverse pretrained teachers into a single small generalist embedder that can serve many tasks — an economically and computationally meaningful shift for anyone deploying embeddings at scale.
Real-world applications:
- Retrieval and search: compact, general-purpose text embedders for semantic search, retrieval-augmented generation, and document ranking under tight latency or memory budgets.
- Drug discovery and cheminformatics: molecular descriptors distilled from text, graph, and 3D teachers that predict ADMET properties without dedicated models per property.
- Edge and mobile vision: small vision backbones matching far larger transformers for fine-grained classification on devices with limited compute.
- Data analysis pipelines: general-purpose embeddings for classification, clustering, and regression across heterogeneous, unlabeled datasets.
Industry relevance: the paper directly targets the size/performance Pareto frontier, which is the operating regime for production systems. Its release of trained models, its sub-1% per-teacher overhead, and its drop-in replacement of MSE loss make it practically appealing for teams already running distillation pipelines.
Future Directions
- Cross-modal distillation: the authors explicitly propose extending the framework so a student can absorb task-agnostic information across modalities, not just within one.
- Structuring the embedding space: since mutual information is invariant to invertible transforms, adding geometric or contrastive regularizers could close the remaining gap on clustering and similarity tasks.
- Teacher selection and weighting: the current loss weights all teachers uniformly, so handling teachers of very different quality or relevance more intelligently (e.g., learned weights) is an open problem, especially given the observed variability on out-of-distribution tasks like BBB.
- Scaling and continual updates: questions remain about how the approach behaves with dozens of teachers, how to add or swap teachers without full retraining, and how to reduce the storage cost of cached teacher embeddings.
Target Audience
Machine learning researchers working on knowledge distillation, representation learning, or embedding models; practitioners building efficient retrieval, vision, or molecular property prediction systems; and graduate students with some background in information theory who want a concrete example of turning a mutual-information objective into a trainable loss. Readers looking for a purely architectural innovation or a task-specific benchmark leaderboard entry will find less here — the contribution is a principled objective and its empirical validation across modalities.
Authors’ abstract
Casting complex inputs into tractable representations is a critical step across various fields. Diverse embedding models emerge from differences in architectures, loss functions, input modalities and datasets, each capturing unique aspects of the input. Multi-teacher distillation leverages this diversity to enrich representations but often remains tailored to specific tasks. In this paper, we introduce a task-agnostic framework based on a ``majority vote" objective function. We demonstrate that this function is bounded by the mutual information between student and teachers' embeddings, leading to a task-agnostic distillation loss that eliminates dependence on task-specific labels or prior knowledge. Our evaluations across text, vision models, and molecular modeling show that our method effectively leverages teacher diversity, resulting in representations enabling better performance for a wide range of downstream tasks such as classification, clustering, or regression. Additionally, we train and release state-of-the-art embedding models, enhancing downstream performance in various modalities.