Distillation for logistic regression is the process of training an inherently interpretable logistic regression model to mimic the predictive behavior of a complex, high-performance teacher model. Instead of learning from hard ground-truth labels, the student is trained on the teacher's soft targets—a probability distribution over classes that encodes rich inter-class similarity information known as dark knowledge.
Glossary
Distillation for Logistic Regression

What is Distillation for Logistic Regression?
A technique for creating a globally interpretable linear model by training a logistic regression student on the soft probabilistic outputs of a complex black-box teacher model.
The resulting student model is a globally transparent linear classifier whose learned weights directly quantify the contribution of each input feature to the prediction. By matching the teacher's calibrated probability estimates using a composite loss function, often combining Kullback-Leibler divergence with cross-entropy, the logistic regression student achieves higher fidelity and better-calibrated probabilities than one trained solely on the original dataset.
Key Characteristics
Distilling a complex model into a logistic regression student creates a globally interpretable linear model that retains calibrated probability estimates from the teacher's dark knowledge.
Global Linear Surrogate
The logistic regression student serves as a global surrogate model, approximating the teacher's entire decision boundary with a single linear equation. Unlike local explanation methods that explain one prediction at a time, this approach provides a complete, transparent model that can be inspected, validated, and deployed independently.
- Each feature receives a single coefficient representing its global importance
- The decision boundary is a simple hyperplane in the feature space
- Perfect for regulated industries requiring fully auditable models
- Can be expressed as a simple scorecard or formula
Soft Target Training
Instead of training on hard binary labels, the logistic regression student learns from the teacher's soft targets—probability distributions over classes. These softened outputs, controlled by a temperature parameter in the teacher's softmax, encode rich information about class similarities and decision boundary confidence.
- Soft targets reveal which classes the teacher considers plausible alternatives
- A high temperature smooths the distribution, exposing more dark knowledge
- The student learns not just what the teacher predicts, but how confidently
- Results in better-calibrated probability estimates than direct training on labels
Distillation Loss Function
The training objective combines two components: the Kullback-Leibler (KL) divergence between teacher and student soft targets, and the standard cross-entropy loss against ground-truth labels. A weighting parameter α balances these two signals.
- KL divergence term: Aligns student probabilities with teacher soft targets
- Cross-entropy term: Ensures the student remains grounded in actual labels
- Typical α values range from 0.1 to 0.5, favoring the distillation signal
- The combined loss produces students that often outperform those trained on labels alone
Calibrated Probability Outputs
A key advantage of distillation to logistic regression is the production of well-calibrated probability estimates. The soft targets from the teacher encode uncertainty information that helps the linear student avoid overconfident predictions on ambiguous inputs.
- Student probabilities better reflect true empirical likelihoods
- Reduces the need for post-hoc calibration like Platt scaling
- Critical for risk-sensitive applications in finance and healthcare
- Maintains interpretability while improving reliability of confidence scores
Feature Importance Extraction
Once trained, the logistic regression coefficients provide direct, quantitative feature importance scores. Each coefficient represents the change in log-odds for a unit increase in the corresponding feature, making the model's reasoning completely transparent.
- Positive coefficients indicate features that increase the predicted probability
- Negative coefficients indicate features that decrease it
- Coefficient magnitudes reflect relative importance after standardization
- Can be directly presented to regulators or used in adverse action notices
Fidelity-Evaluated Performance
The student model is evaluated primarily on fidelity—how closely its predictions match the teacher's—rather than accuracy against ground truth alone. A high-fidelity logistic regression student successfully captures the teacher's learned decision logic in a transparent form.
- Fidelity measured by agreement rate or KL divergence on held-out data
- High fidelity indicates the teacher's behavior is largely linear in the feature space
- Low fidelity suggests the teacher relies on non-linear interactions the student cannot capture
- Guides decisions about whether a linear explanation is sufficient for the use case
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.
Frequently Asked Questions
Answers to the most common technical questions about using knowledge distillation to train a globally interpretable logistic regression student model that mimics a complex black-box teacher.
Distillation for logistic regression is a post-hoc interpretability technique where a complex, black-box teacher model's soft targets are used to train a transparent logistic regression student. The process works by first passing training data through the teacher to generate a probability distribution over classes for each instance, typically softened using a high temperature scaling parameter. These soft targets encode rich dark knowledge about inter-class similarities that hard labels lack. The logistic regression student is then trained to minimize the Kullback-Leibler divergence between its own output probabilities and the teacher's soft targets, rather than fitting the original ground-truth labels directly. The result is a globally interpretable linear model whose coefficients directly quantify each feature's average influence on the prediction, while retaining calibrated probability estimates that closely approximate the teacher's decision boundary.
Related Terms
Master the core concepts surrounding the transfer of knowledge from a complex teacher model to an interpretable logistic regression student for calibrated, globally explainable predictions.
Soft Targets
The probability distributions over classes produced by a teacher model, typically smoothed by a high temperature parameter. Unlike hard labels (0 or 1), soft targets reveal the teacher's 'dark knowledge' about inter-class similarities. For a logistic regression student, these targets provide a richer, more nuanced training signal than ground-truth labels alone, enabling the linear model to learn a decision boundary that better approximates the complex teacher's generalization.
Temperature Scaling
A hyperparameter T applied to the softmax function that controls the softness of the output probability distribution. As T increases, the distribution flattens, revealing the dark knowledge of the teacher's internal representations. For logistic regression distillation, a well-tuned temperature is critical: it prevents the student from simply memorizing the teacher's overconfident predictions and instead exposes the relative similarity structure between classes that a linear model can capture.
Distillation Loss
A composite objective function that combines the Kullback-Leibler (KL) divergence between teacher and student soft targets with the standard cross-entropy loss against ground-truth labels. For a logistic regression student, this dual loss ensures the model remains faithful to the teacher's knowledge while still being grounded in reality. The mixing ratio between these two losses is a key hyperparameter that balances fidelity to the teacher against accuracy on the original task.
Kullback-Leibler Divergence
A statistical measure of how one probability distribution diverges from a second, reference distribution. In distillation, it quantifies the difference between the teacher's soft targets and the student's predicted probabilities. Minimizing the KL divergence forces the logistic regression student to replicate the teacher's output distribution, effectively transferring the complex model's knowledge into a globally interpretable linear form.
Linear Proxy Model
A simple linear model, such as LASSO or logistic regression, trained to mimic a complex model's predictions locally or globally. As a student in distillation, it provides global feature-level importance scores through its learned coefficients. Each weight directly quantifies the contribution of a feature to the prediction, offering a transparent, auditable explanation of the teacher's decision logic that satisfies regulatory and compliance requirements.
Fidelity-Evaluated Student
A student model whose quality is measured by its fidelity—the degree to which its predictions match those of the teacher model on unseen data, rather than solely by accuracy on ground-truth labels. For a distilled logistic regression, high fidelity means the linear model faithfully reproduces the teacher's decision boundary. This metric is crucial for ensuring the interpretable surrogate is a trustworthy proxy for the original black-box model.

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