Prediction-Only Distillation in Linear and Logistic Regression

Hien Dang, Pratik Patil, Alessandro Rinaldo

TL;DR

This paper introduces Prediction-Mixed Self-Distillation (PMSD), a framework for improving a fixed model using only fresh, unlabeled data—even when the original training set is lost to history. By combining the teacher’s predictions with those of a student trained on pseudo-labels via an affine mixing weight, the authors prove that you can almost always achieve strictly better generalization in both ridge and logistic regression.

What Problem Does This Paper Address?

Self-distillation (SD) is a popular technique where a model is retrained on its own predictions to improve performance. Traditionally, this requires access to the original labeled training data. However, in real-world deployments, that data is often unavailable due to privacy regulations (like GDPR), safety constraints, or massive storage costs.

We are often left in a "prediction-only" regime: we have a trained "teacher" model and a stream of new, unlabeled "fresh-X" data. While one could train a "pure-distilled" (PD) student on this new data using the teacher's pseudo-labels, there is no guarantee the student will be better; in fact, it often performs worse. The authors ask: Can we use this fresh, potentially out-of-distribution (OOD) unlabeled data to improve a fixed predictor when the original data is gone?

Methods

The authors propose a two-step scheme illustrated in Figure 1:

  1. Pure Distillation (PD): Query the available teacher model on fresh unlabeled data $\tilde{X}$ to generate pseudo-labels $\hat{y}$. Train a student model $f_{pd}$ on this $(\tilde{X}, \hat{y})$ pair.
  2. Prediction Mixing (PMSD): Instead of replacing the teacher with the student, create a final predictor $f_{pmsd}$ that is an affine combination of both: $$f_{pmsd}(x) := (1 - \xi)f(x) + \xi f_{pd}(x)$$
Figure 1: Schematic of the prediction-only setting and fresh-X prediction-mixed SD. Solid arrows indicate training steps; dashed arrows indicate other information flows.

The core of the paper involves a high-dimensional asymptotic analysis (where the number of features $p$ and samples $n$ both go to infinity) to derive "deterministic equivalents" for the risk. They also introduce a post-hoc calibration step using a very small independent labeled set to estimate the optimal mixing weight $\xi^*$, as this weight cannot be identified from unlabeled data alone.

Datasets

The researchers validated their theory using a mix of synthetic simulations and real-world benchmarks:

  • Regression: UCI Blog Feedback, UCI Communities and Crime, UCI Airfoil, and CIFAR-10 (using ResNet-18 features).
  • Classification (Linear Probing): Caltech-101, Caltech-256, and CIFAR-100. These experiments involved training linear layers on top of frozen ResNet-34 features pretrained on ImageNet.

Key Insights and Ideas

  • The Power of Affine Mixing: The optimal mixing weight $\xi^*$ is rarely between 0 and 1. It often lies outside this range, meaning the combination is not "convex." This allows the model to extrapolate beyond the student's predictions to correct for teacher bias.
  • Strict Improvement is Generic: In ridge regression, the PMSD student strictly outperforms the teacher for almost any choice of regularization, even if the fresh unlabeled data is OOD or isotropic.
  • The "More Data" Paradox: In the fresh-X setting, the risk is not always monotone. Surprisingly, adding more unlabeled data can sometimes temporarily increase the optimal PMSD risk before it improves again (a unimodal risk profile), a phenomenon absent in standard same-data distillation.
  • Classification Breakthrough: In logistic regression with high label noise ($\rho > 0.5$), both the teacher and the PD student can fall to 0% accuracy. Remarkably, the authors prove that PMSD can still achieve 100% population accuracy by amplifying the corrective signal through the mixing weight.

Key Results

  • Theoretical Accuracy: The derived deterministic equivalents for risk perfectly match empirical results across various Signal-to-Noise Ratios (SNR), as shown in Figure 3.
  • Empirical Gains: On the Blog Feedback dataset, PMSD consistently achieves lower squared prediction risk than both the teacher and the PD student across a wide range of ridge penalties (see Figure 2).
  • Calibration Efficiency: Theorem 5.1 proves that a small calibration set is sufficient for consistent estimation of the optimal weight. In practice, using just a few hundred labeled samples allowed PMSD to outperform the teacher on complex datasets like CIFAR-100 (Table 1).
Figure 2: Strict improvement of the PMSD student. Test squared prediction risks of the ridge teacher (R, in blue), the fresh-X pure-distilled student (Rpd, in light blue), and the optimally mixed PMSD student (Rpmsd, in olive), plotted as functions of the teacher’s ridge penalty λt. The oracle optimal mixing weight ξ⋆is shown in red. Setting: UCI Blog Feedback data with nt = 2619, ns = 5240, and p = 280. We use the representative choice λs = λt. Experiments with alternative choices of λs, including values optimally tuned over a grid, are presented in Section I.1.

Limitations and Future Work

  • Covariance Assumptions: The current theoretical proofs assume that the covariance matrices of the training and fresh data are "simultaneously diagonalizable" (i.e., they commute). While this covers many practical cases (like isotropic OOD data), it is a mathematical simplification.
  • Linearity: The theory focuses on linear and logistic regression. While the authors show success using frozen neural network features (linear probing), a full theoretical extension to deep non-linear architectures remains open.
  • Future Directions: The authors suggest exploring how to optimize the distribution of the fresh unlabeled covariates to maximize the risk reduction, potentially leading to "active" unlabeled data collection strategies.

Summary updated

Abstract

Self-distillation (SD) is typically studied when the student is retrained on the teacher's original training inputs. In many practical deployments, however, the labeled training data are no longer available, and one has access only to the trained predictor and fresh unlabeled covariates. We study SD in this prediction-only regime through a fresh-X prediction-mixed scheme: a pure-distilled student is trained on fresh covariates pseudo-labeled by the teacher, and the final predictor is an affine combination of the teacher and student predictions. For ridge regression under proportional asymptotics, we derive deterministic equivalents for the optimally mixed prediction risk under general anisotropic covariance and deterministic signal. We show that this risk is strictly smaller than the teacher risk for almost every pair of teacher and student regularization levels, including when the fresh covariates are out-of-distribution and even when their covariance is isotropic. We further show that the optimal mixing weight cannot be identified from unlabeled data alone, but can be consistently estimated in a single post-training step using a small independent labeled calibration set, without additional model fitting. Finally, for binary logistic regression, we show that prediction mixing can outperform both the teacher and the pure-distilled classifier.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Caltech-101Optimal PMSD studentTest classification accuracy72.7%split: test · linear-probe · backbone=ResNet-34
Source quote
L3595: Optimal PMSD student (%) │ 63.1 │ 65.6 │ 66.8 │ 68.3 │ 69.6 │ 68.9 │ 69.2 │ 72.7 │ 63.0
Caltech-101TeacherTest classification accuracy67.4%split: test · linear-probe · backbone=ResNet-34
Source quote
L3593: Teacher (%) │ 62.5 │ 62.6 │ 62.6 │ 62.9 │ 63.5 │ 65.3 │ 69.3 │ 67.4 │ 45.6
Caltech-101PD studentTest classification accuracy41.3%split: test · linear-probe · backbone=ResNet-34
Source quote
L3594: PD student (%) │ 62.7 │ 63.3 │ 65.2 │ 67.7 │ 69.4 │ 68.4 │ 61.6 │ 41.3 │ 26.2
CIFAR-100 · random corruptionOptimal PMSD studentTest classification accuracy49.5%split: test · linear-probe · backbone=ResNet-34
Source quote
L3690: Optimal PMSD student (%) │ 50.5 │ 50.6 │ 51.5 │ 53.3 │ 54.0 │ 53.5 │ 56.1 │ 49.5 │ 40.3
CIFAR-100 · random corruptionTeacherTest classification accuracy45.4%split: test · linear-probe · backbone=ResNet-34
Source quote
L3688: Teacher (%) │ 47.8 │ 47.9 │ 48.0 │ 48.5 │ 49.8 │ 52.7 │ 54.2 │ 45.4 │ 31.7
CIFAR-100 · random corruptionPD studentTest classification accuracy16.0%split: test · linear-probe · backbone=ResNet-34
Source quote
L3689: PD student (%) │ 48.3 │ 49.3 │ 50.6 │ 52.3 │ 54.0 │ 52.6 │ 39.9 │ 16.0 │ 2.3
BibTeX
@inproceedings{dang2026prediction,
  author = {Hien Dang and Pratik Patil and Alessandro Rinaldo},
  title = {{Prediction-Only Distillation in Linear and Logistic Regression}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=nzmFTRyjKB},
}
Figure