Leaky Students: Membership Inference against On-Policy Distillation
Organizations: Rensselaer Polytechnic Institute
Abstract
On-policy distillation (OPD) trains a student to match a teacher's next-token distributions on student-generated trajectories. However, privileged information supplied to the teacher for OPD training may contain sensitive data. Whether the student leaks private information about the records supplied to the teacher during distillation remains poorly understood. To the best of our knowledge, we present the first systematic study of membership inference in this setting. We find that fresh student trajectories expose sparse membership signals that fixed reference-answer losses often miss. These signals are mixed with probability changes caused by training on other records. We introduce Leaky, which samples fresh trajectories from the target model and compares its token log-probabilities with the maximum across matched reference models trained without the candidate records. It applies Leaky ReLU to the resulting gaps, preserving positive gaps and downweighting negative gaps as an approximate correction for incidental positive gaps in non-members. Across fifteen targets spanning mathematics, medical question answering, and code generation, Leaky outperforms all evaluated baselines and achieves mean AUROC 0.875, compared with 0.614 for the strongest baseline on each target in the main evaluation. On the same sampled trajectories, the strongest baseline achieves mean AUROC 0.826. These results show that students trained through OPD can expose the membership of records used for teacher supervision, even when fixed reference-answer losses provide little evidence of membership.
Figures & tables
| Mathematics | Medical QA | Code generation | |||||||||||||
| Method | Q3 1.7B | Q3 4B | Q3.5 2B | Q3.5 4B | G4 E2B | Q3 1.7B | Q3 4B | Q3.5 2B | Q3.5 4B | G4 E2B | Q3 1.7B | Q3 4B | Q3.5 2B | Q3.5 4B | G4 E2B |
| AUROC | |||||||||||||||
| LOSS | .516 | .513 | .502 | .502 | .505 | .553 | .552 | .542 | .545 | .530 | .546 | .532 | .543 | .550 | .559 |
| ZLIB | .528 | .525 | .497 | .497 | .503 | .509 | .511 | .503 | .505 | .504 | .616 | .590 | .612 | .616 | .622 |
| Min-K% | .521 | .518 | .499 | .500 | .506 | .540 | .542 | .532 | .544 | .518 | .535 | .512 | .533 | .539 | .540 |
| Min-K%++ | .521 | .522 | .509 | .509 | .515 | .492 | .508 | .511 | .515 | .522 | .492 | .454 | .502 | .526 | .442 |
| Mathematics | Medical QA | Code generation | ||||
| Target model | AUROC | TPR@1% FPR | AUROC | TPR@1% FPR | AUROC | TPR@1% FPR |
| Qwen3-1.7B | .776 | .273 | .854 | .389 | .747 | .213 |
| Qwen3-4B | .796 | .289 | .691 | .211 | .687 | .146 |
| Qwen3.5-2B | .774 | .191 | .768 | .342 | .740 | .238 |
| Qwen3.5-4B | .812 | .309 | .737 | .189 | .788 | .412 |
| Gemma-4-E2B | .727 | .152 | .698 | .189 | .660 | .084 |
| Mathematics | Medical QA | Coding | |||||||
| Training | Util. | AUROC | TPR | Util. | AUROC | TPR | Util. | AUROC | TPR |
| Full fine-tuning | 0.9158 | 0.418 | 0.9665 | 0.740 | 0.8467 | 0.434 | |||
| LoRA | 0.6455 | 0.098 | 0.7868 | 0.268 | 0.6585 | 0.146 | |||
| DP-LoRA ( ) | 0.4903 | 0.014 | 0.5044 | 0.023 | 0.5097 | 0.027 | |||
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
| Student | Mathematics teacher | Medical teacher | Coding teacher |
| Qwen3-1.7B | Qwen3-8B | Qwen3-8B | Qwen3-8B |
| Qwen3-4B | Qwen3-14B | Qwen3-14B | Qwen3-14B |
| Qwen3.5-2B | Qwen3.5-27B | Qwen3.5-9B | Qwen3.5-9B |
| Qwen3.5-4B | Qwen3.5-27B | Qwen3.5-27B | Qwen3.5-27B |
| Gemma-4-E2B | Gemma-4-26B-A4B | Gemma-4-26B-A4B | Gemma-4-26B-A4B |
| Student | Interpolation weight ( ) | Learning rate | Training steps | Global batch size |
|---|---|---|---|---|
| Mathematics | ||||
| Qwen3-1.7B | 0 | 5e-6 | 126 | 32 |
| Qwen3-4B | 0 | 2e-6 | 126 | 32 |
| Qwen3.5-2B | 0.5 | 1e-6 | 126 | 32 |
| Qwen3.5-4B | 0.5 | 1e-6 | 126 | 32 |
| Gemma-4-E2B | 0 | 3e-6 | 126 | 32 |
| Student | Training steps | Base | Trained | (pp) |
|---|---|---|---|---|
| Mathematics: AIME 2024 | ||||
| Qwen3-1.7B | 126 | 47.50 | 52.50 | +5.00 |
| Qwen3-4B | 126 | 72.92 | 75.00 | +2.08 |
| Qwen3.5-2B | 126 | 31.25 | 42.50 | +11.25 |
| Qwen3.5-4B | 126 | 85.00 | 87.08 | +2.08 |
| Gemma-4-E2B | 126 | 41.93 | 45.00 | +3.07 |
| Model family | Decoding | Output tokens |
|---|---|---|
| Mathematics: reasoning enabled; 30 AIME questions | ||
| Qwen3 | , top- , no top- | 38,912 |
| Qwen3.5 | , top- , top- , presence penalty 1.5 | 81,920 |
| Gemma-4 | , top- , top- | 32,768 |
| Medical: reasoning disabled; 1,273 MedQA-USMLE questions | ||
| All models | , top- , top- , presence penalty 1.5 | 32,768 |
| Mathematics | Medical QA | Code generation | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | Q3 1.7B | Q3 4B | Q3.5 2B | Q3.5 4B | G4 E2B | Q3 1.7B | Q3 4B | Q3.5 2B | Q3.5 4B | G4 E2B | Q3 1.7B | Q3 4B | Q3.5 2B | Q3.5 4B | G4 E2B |
| TPR at 5% FPR | |||||||||||||||
| LOSS | .045 | .035 | .049 | .070 | .055 | .039 | .053 | .047 | .049 | .041 | .033 | .043 | .033 | .035 | .047 |
| ZLIB | .043 | .039 | .059 | .051 | .045 | .051 | .049 | .041 | .051 | .049 | .049 | .057 | .055 | .082 | .082 |
| Min-K% | .043 | .039 | .049 | .070 | .055 | .043 | .035 | .043 | .039 | .029 | .031 | .037 | .041 | .045 | .053 |
| Min-K%++ | .031 | .037 | .062 | .047 | .053 | .047 | .041 | .059 | .053 | .061 | .035 | .037 | .035 | .061 | .057 |
| Mathematics | Medical QA | Code generation | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | Q3 1.7B | Q3 4B | Q3.5 2B | Q3.5 4B | G4 E2B | Q3 1.7B | Q3 4B | Q3.5 2B | Q3.5 4B | G4 E2B | Q3 1.7B | Q3 4B | Q3.5 2B | Q3.5 4B | G4 E2B |
| AUROC | |||||||||||||||
| LOSS | .502 | .477 | .489 | .506 | .495 | .536 | .549 | .568 | .557 | .550 | .534 | .536 | .547 | .551 | .544 |
| ZLIB | .504 | .472 | .490 | .507 | .487 | .505 | .530 | .558 | .546 | .540 | .531 | .543 | .552 | .555 | .553 |
| Min-K% | .501 | .473 | .492 | .510 | .496 | .531 | .548 | .572 | .559 | .544 | .530 | .536 | .557 | .556 | .545 |
| Min-K%++ | .486 | .472 | .491 | .492 | .495 | .491 | .482 | .564 | .550 | .499 | .510 | .503 | .558 | .566 | .512 |
| Reference | Scoring rule | Mean AUROC | Mean TPR at 1% FPR |
|---|---|---|---|
| None | Target log-probability mean | 0.529 | 0.009 |
| None | Min-K% (20%) | 0.530 | 0.009 |
| None | Min-K%++ (20%) | 0.511 | 0.013 |
| Base model | Mean gap | 0.520 | 0.014 |
| Reference mean | Mean gap | 0.801 | 0.282 |
| Reference maximum | Mean gap | 0.658 | 0.068 |
| Training step | OPSD AUROC | OPSD TPR | OPD AUROC | OPD TPR |
|---|---|---|---|---|
| 25 | 0.5935 | 0.090 | 0.7259 | 0.260 |
| 50 | 0.6565 | 0.090 | 0.8088 | 0.336 |
| 75 | 0.6869 | 0.146 | 0.8654 | 0.424 |
| 100 | 0.6987 | 0.150 | 0.8771 | 0.449 |
| Student | TPR at 5% FPR | TPR at 10% FPR |
|---|---|---|
| Mathematics | ||
| Qwen3-1.7B | 0.393 | 0.533 |
| Qwen3-4B | 0.453 | 0.543 |
| Qwen3.5-2B | 0.344 | 0.486 |
| Qwen3.5-4B | 0.469 | 0.568 |
| Gemma-4-E2B | 0.283 | 0.396 |
| Domain | Training | Util. | AUROC | TPR@1% | TPR@5% | TPR@10% |
|---|---|---|---|---|---|---|
| Mathematics | Full fine-tuning | 0.9158 | 0.418 | 0.662 | 0.758 | |
| LoRA | 0.6455 | 0.098 | 0.180 | 0.277 | ||
| DP-LoRA | 0.4903 | 0.014 | 0.049 | 0.092 | ||
| Medical QA | Full fine-tuning | 0.9665 | 0.740 | 0.865 | 0.928 | |
| LoRA | 0.7868 | 0.268 | 0.396 | 0.502 | ||
| DP-LoRA | 0.5044 | 0.023 | 0.070 | 0.111 |
| Domain | Attack configuration | LoRA | DP-LoRA |
|---|---|---|---|
| Mathematics | Leaky ( , ) | 0.6455 / 0.098 | 0.4903 / 0.014 |
| ReLU ( , ) | 0.5881 / 0.084 | 0.4874 / 0.016 | |
| Leaky ( , ) | 0.5866 / 0.076 | 0.4856 / 0.008 | |
| Leaky ( , ) | 0.5511 / 0.039 | 0.4903 / 0.008 | |
| Medical QA | Leaky ( , ) | 0.7868 / 0.268 | 0.5044 / 0.023 |
| ReLU ( , ) | 0.7689 / 0.240 | 0.5025 / 0.021 |
Membership Inference Attacks
Membership inference attacks test whether records or entities were used to train a machine-learning model, revealing potential privacy leakage.
See all 111 papers