In knowledge distillation, a soft target is the output probability vector from a teacher model after applying a high temperature scaling parameter to the softmax function. Unlike a one-hot hard label that only identifies the correct class, a soft target distributes probability mass across all classes, revealing the teacher's learned similarities—for example, assigning a higher probability to 'truck' than to 'apple' when the true label is 'car'. This inter-class relational information is the dark knowledge that a student model must absorb.
Glossary
Soft Targets

What is Soft Targets?
Soft targets are the class probability distributions produced by a teacher model, typically smoothed by a high temperature parameter, which provide richer information about inter-class similarities than hard labels.
The soft target serves as the supervisory signal in the distillation loss, where the Kullback-Leibler divergence between the teacher's and student's softened distributions is minimized. By matching these rich probability vectors rather than sparse ground-truth labels, the student model learns a smoother, more generalizable decision boundary that captures the teacher's inductive biases, often achieving higher accuracy with fewer parameters than training on hard targets alone.
Key Characteristics of Soft Targets
Soft targets are the probability distributions produced by a teacher model, typically softened by a high temperature parameter. Unlike hard labels, they encode rich information about inter-class similarities and the teacher's internal uncertainty.
Probability Distributions Over Classes
A soft target is a vector of probabilities over all possible classes, not just the correct one. For a three-class problem, a teacher might output [0.85, 0.12, 0.03] instead of the hard label [1, 0, 0]. The non-zero probabilities on incorrect classes encode dark knowledge—the teacher's learned similarity structure. For example, an image of a cat might have a 0.03 probability for 'dog' and 0.001 for 'airplane', revealing that cats are more similar to dogs than to airplanes. This relational information is the core value of soft targets.
Temperature Scaling
A hyperparameter T applied to the softmax function that controls the softness of the output distribution:
- T = 1: Standard softmax, producing sharp, confident distributions
- T > 1: Softens the distribution, amplifying the relative probabilities of incorrect classes
- T → ∞: Produces a uniform distribution where all classes are equally likely
The softened distribution reveals the dark knowledge hidden in the teacher's logits. A typical distillation temperature ranges from 2 to 20, depending on the complexity of the task and the capacity of the student model.
Rich Supervisory Signal
Soft targets provide significantly more information per training example than hard labels. A hard label for a 1000-class problem conveys exactly log₂(1000) ≈ 10 bits of information. In contrast, a soft target distribution conveys the full covariance structure between classes, effectively providing orders of magnitude more supervision. This is why a student model trained on soft targets can often match teacher performance with far fewer examples, and why distillation is sometimes called model compression through rich supervision.
Distillation Loss Integration
Soft targets are used in the Kullback-Leibler (KL) divergence term of the distillation loss function. The total loss is typically:
codeL = α * L_CE(student_logits, hard_labels) + (1-α) * T² * L_KL(student_softmax/T, teacher_softmax/T)
- L_CE: Standard cross-entropy with ground truth
- L_KL: KL divergence between temperature-scaled student and teacher distributions
- T² multiplier: Compensates for the gradient scaling effect of temperature
- α: Weighting hyperparameter balancing the two objectives
Ensemble Knowledge Encoding
When the teacher is an ensemble of models, soft targets encode the collective uncertainty and diversity of the ensemble members. The resulting distribution represents a Bayesian model average over the ensemble's predictions. A single student trained on these ensemble-derived soft targets can capture the generalization benefits of the entire ensemble—including reduced overfitting and calibrated uncertainty estimates—without the inference cost of running multiple models. This is one of the most powerful applications of distillation.
Gradient Information Content
The gradient of the cross-entropy loss with respect to the logits for a soft target is proportional to (p_teacher - p_student). This means the student receives a directional correction signal for every class, not just the target class. Even when the student correctly predicts the top class, it continues to learn from the teacher's relative probabilities on all other classes. This dense gradient signal explains why distillation often converges faster and to better minima than training on hard labels alone.
Frequently Asked Questions
Clear answers to common questions about the probability distributions that transfer 'dark knowledge' from teacher to student models during the distillation process.
Soft targets are the probability distributions over all possible classes produced by a teacher model's softmax layer, typically smoothed using a high temperature parameter (T > 1). Unlike hard targets—which are one-hot encoded ground-truth labels assigning 100% probability to the correct class and 0% to all others—soft targets assign non-zero probabilities to incorrect classes. These relative probabilities encode the teacher's learned similarities between classes, revealing that, for example, a handwritten '3' is more similar to an '8' than to a 'cat'. This rich inter-class relational information, termed dark knowledge, provides significantly more information per training sample than a hard label, enabling a compact student model to generalize better by learning not just the correct answer, but the structure of the teacher's errors.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Understanding soft targets requires a grasp of the broader distillation framework. These concepts define how probability distributions are generated, transferred, and utilized to create interpretable models.
Temperature Scaling
A hyperparameter T applied to the softmax function that controls the softness of the output probability distribution. High temperatures (e.g., T=20) smooth the distribution, revealing the dark knowledge of inter-class similarities, while T=1 recovers standard probabilities. This is the mechanism that creates soft targets from raw logits.
Knowledge Distillation
A model compression technique where a smaller student model is trained to replicate the behavior of a larger teacher model. The student minimizes the divergence between its own softened outputs and the teacher's soft targets, transferring generalization ability and dark knowledge that hard labels cannot convey.
Kullback-Leibler Divergence
A statistical measure of how one probability distribution diverges from a reference distribution. In distillation, D_KL(teacher || student) quantifies the information loss when the student's soft targets approximate the teacher's. It forms the primary loss component that aligns the student's internal representations with the teacher's.
Dark Knowledge
The implicit information encoded in the relative probabilities assigned to incorrect classes by a teacher model. For example, a model classifying a car may assign higher probability to 'truck' than to 'apple'. This similarity structure, revealed through soft targets, provides richer supervision than one-hot labels and is the core value transferred during distillation.
Distillation Loss
A composite objective function combining two terms:
- Soft loss: KL divergence between teacher and student soft targets, weighted by T²
- Hard loss: Standard cross-entropy with ground-truth labels This dual objective ensures the student both mimics the teacher's generalization and maintains accuracy on the original task.
Teacher-Student Architecture
A training framework where a high-capacity teacher model generates supervisory signals for a compact student model. The teacher is pre-trained and frozen; only the student's weights are updated. The student learns from both the teacher's soft targets and the original hard labels, often achieving performance superior to training on hard labels alone.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us