What Distillation Actually Buys a Small Biomedical Model

Hospitals and labs want small language models that run cheaply on biomedical text, and the usual recipe is knowledge distillation: train a compact "student" to imitate a large "teacher" that was already pre-trained on PubMed. The student must then serve several jobs at once. It has to mark exactly where a drug or disease name starts and ends, decide whether two named things are related, answer questions, and write summaries. Distillation papers routinely report large gains, but those gains are almost never compared against the obvious alternative. That alternative is to spend the same compute pre-training the small model directly on the domain text, with the same tokenizer and the same fine-tuning pipeline. Without that comparison, nobody can say whether the teacher is teaching anything, or whether the student simply saw more computation.

This note proposes a compute-matched audit of multi-task distillation for compact biomedical models, with one specific mechanistic prediction. Imitating only the teacher's output probabilities should help sequence-level tasks (relation classification, QA, summarization) but should add little once compute is matched. Precise token-level extraction such as entity-boundary tagging should gain only when the student also imitates the teacher's internal hidden states. This mirrors the finding in object detection that output-level distillation carries "what" but not "where." If the prediction holds, the field gets a concrete rule: which distillation signal to pay for, for which task, and when to skip the teacher entirely.

Core Claim

Under a protocol that charges distillation for every teacher forward pass and fixes data, tokenizer, fine-tuning, and tuning budget, the advantage of distilling from a biomedical teacher over simply pre-training the student on biomedical text will be concentrated in token-level extraction tasks. That advantage will come from hidden-state imitation rather than from matching output probabilities. We call this the extraction–generation split. Gains on sequence-level tasks will shrink substantially relative to what an uncharged comparison shows.

The claim borrows its structure from vision. In object detection, one model must both classify and localize, and the two objectives pull shared layers in different directions (Knowledge Distillation in Object Detection: A Survey from CNN to Transformer reviews this gradient conflict). Decoupled Knowledge Distillation splits the output-matching loss into a target-class term and a non-target-class term. It shows that a confident teacher suppresses the non-target "dark knowledge," and it notes that output-level distillation still struggles to transfer localization, suggesting the idea be tried in NLP. Two further vision results supply the stronger signal. DetKDS searched thousands of detector distillation policies and found that intermediate-feature distillation dominates response distillation. CSKD found that cosine (direction-only) feature matching works across capacity gaps where plain squared-error matching fails.

These papers supply our losses, and they motivate the extraction/localization analogy. None of them studies language, and none charges the teacher's compute against the student. The second omission is the one our protocol targets.

The protocol discipline comes from two papers. On "Scientific Debt" in NLP re-ran ELMo, GPT-1 and BERT under matched data and backbone, and an 8.8-point GLUE gap shrank to 1.2. IsoPLM compared protein language model architectures under identical data and compute and found that inductive-bias advantages at small scale largely fade by 650M parameters. Neither paper touches distillation. We extend their "same everything" treatment to the question they left open.

Research Program

The teacher is BioBART-Large. BioBART continuously pre-trained BART on PubMed abstracts with text infilling, and an encoder-decoder teacher covers both extraction and generation tasks. BioBART also constrains the design. Its ablation shows that sentence permutation hurts biomedical performance, so every arm uses infilling only.

Students are BART-style encoder-decoders at two sizes: a BART-Base-sized model and a shallower, narrower variant roughly a third of that size. Two sizes let us see whether the split widens as the capacity gap grows, which is the regime where IsoPLM found small-scale effects to be largest. All students start from the same general-domain initialization, use the same PubMed text stream in the same order, and share BioBART's vocabulary in the main study, so output-level distillation is well defined.

Every arm gets the same total training compute. The quantity we fix is

$$C = N_{\text{student}} \cdot F_{\text{student}} + N_{\text{teacher}} \cdot F_{\text{teacher}},$$

where $N_{\text{student}}$ is the number of tokens the student trains on, $F_{\text{student}}$ is the student's forward-plus-backward FLOPs per token, $N_{\text{teacher}}$ is the number of tokens the teacher processes, and $F_{\text{teacher}}$ is the teacher's forward FLOPs per token. A distilled student therefore trains on fewer tokens than a directly pre-trained student at the same $C$. We report results both with and without the teacher's own pre-training cost, since a lab may already own the teacher.

After pre-training or distillation, every student goes through an identical multi-task fine-tuning pipeline on the task suite. The hyperparameter search budget is fixed per arm: the same number of trials over the same ranges. We keep per-arm tuning rather than one shared recipe, because Personalized Benchmarking with the Ludwig Benchmarking Toolkit warns that forcing one recipe on all arms can penalize methods whose stability depends on their own optimization settings.

Tasks are grouped by the kind of knowledge they need:

  • Token-level extraction. Named entity recognition on BC5CDR, NCBI Disease and BC2GM, which requires sharp decisions at token positions.
  • Sequence-level understanding. Relation extraction on GAD and CHEMPROT, and factoid QA on BioASQ.
  • Generation. Question summarization on MeQSum and dialogue on CovidDialog.

The benchmark set follows BioBERT and BioBART. To track forgetting of general ability, the known cost of narrow domain training, we also fine-tune every student on GLUE.

The analysis side trains probes on frozen student hidden states. One probe type predicts entity boundaries; another predicts relation labels. We measure how the teacher's gap over the student on each probe changes under each distillation signal. This tests the mechanism directly rather than inferring it from end-task scores.

Baselines

Naive reference. The general-domain BART student, fine-tuned on each task with the shared pipeline and given no domain pre-training or teacher. It anchors how much any biomedical exposure matters. Evidence from BERTHop (+6.46 from swapping in a domain-pre-trained text encoder) and BioBERT suggests it will be far behind.

Strongest competitor: compute-matched direct domain pre-training. The same student, continuing infilling pre-training on PubMed for the full budget $C$, with no teacher. This is the baseline that could erase the case for distillation. MonoCoder showed that a small model trained only on in-domain HPC code beat much larger general models, which suggests a well-fed small domain model may need no teacher. It receives the same tokens, tokenizer, fine-tuning and tuning budget. It gets more student tokens than the distilled arms because it pays no teacher cost. A distillation arm "beats" it only if it wins on a task group by more than the seed-to-seed spread, averaged over three pre-training seeds.

Standard output distillation. Hinton-style matching of the teacher's per-token output distribution during infilling, mixed with the ordinary infilling loss.

Decoupled output distillation. The decoupled loss from Decoupled Knowledge Distillation, applied per token: the correct token plays the target class and the rest of the vocabulary plays the non-target classes. This is the strongest existing output-level method. The file has no reported result for it on text. Its reference figure is on ImageNet with a ResNet-18 student, where decoupled distillation reports 71.70% top-1 accuracy against 70.66% for classical distillation. That figure shows the size of gain it has delivered elsewhere; it is not a target for this study.

Hidden-state distillation. Direction-only matching between projected student and teacher hidden states, following CSKD.

Key ablation. Hidden-state distillation alone, versus output distillation alone, versus both. This isolates which signal carries extraction knowledge.

Task-level reference numbers.

  • MeQSum: BioBART-Large reports 53.15 Rouge-L against 51.05 for vanilla BART-Large (BioBART). This is the teacher's ceiling rather than a student target.
  • Compact distilled biomedical students on these benchmarks: no reported result found on Lacuna.

Why not just…?

Why not just pre-train the small model on PubMed with the same compute and skip the teacher? This is the real threat, and the proposal is built around it rather than around defending distillation. It is the main baseline arm. If it matches the distilled arms on all three task groups, the conclusion is that the teacher is unnecessary for compact biomedical models, and that conclusion is worth publishing, much as the "BERT treatment" result in On "Scientific Debt" in NLP was. Our prediction is narrower: the teacher's hidden states will still win on entity tagging.

Why not just use standard output distillation, which is simple and parameter-free? Vision evidence says output matching under-transfers position-sensitive knowledge. DetKDS found feature distillation dominating response distillation across its search, and the decoupled-distillation authors themselves flag weak transfer of localization. Whether text boundary tagging behaves like box localization is exactly what the key ablation and the boundary probes measure. Standard output distillation may well be sufficient for relation extraction and summarization, and we expect to report that.

Why not just fine-tune each task separately from a large model, or distill task by task from fine-tuned teachers? A Comparative Study of PEFT Methods for Python Code Generation finds that the choice of fine-tuning method predicts much less than whether domain pre-training happened. That argues the student's foundational domain knowledge, fixed before fine-tuning, is the lever. We still run one secondary comparison: task-specific distillation from per-task fine-tuned teachers, at matched compute, on the NER and MeQSum tasks. If it beats task-agnostic distillation, the practical recommendation changes accordingly.

Why not just reorder data by teacher uncertainty, which already worked in biomedicine? Hard-First distilled biomedical vision-language models within one model family using LoRA on a 13k-sample mix. Ordering samples from high to low teacher entropy gave +8.6 points on PathVQA over supervised fine-tuning, with smaller out-of-distribution drops. Ordering is complementary to our question rather than an answer to it. We add hard-first ordering as a single extra arm on top of the best distillation signal to check whether its benefit survives compute matching in text-only models.

Proposed Experiments

The first decisive experiment traces compute-matched curves. For each arm, student size and task group, we plot fine-tuned score against $C$ at three budgets.

  • Supporting pattern: hidden-state arms separate from direct domain pre-training on NER F1 at all budgets, while output-only arms converge with it on relation extraction, BioASQ and MeQSum as $C$ grows.
  • Falsifying pattern: either all arms converge on every task group, or output distillation alone matches hidden-state distillation on NER.

The second experiment reruns the comparison without charging teacher FLOPs. This measures how much of the apparent distillation gain is compute accounting, which is the distillation analogue of the ELMo-to-BERT gap collapse.

The third is the probing analysis. The extraction–generation split predicts that the teacher–student gap on the boundary probe closes only under hidden-state imitation.

The fourth measures the cost of specialization. It compares GLUE retention across arms, and scores on CovidDialog against MeQSum as a check on the gap between published literature and informal clinical text noted for BioBART.

Finally, we run one tokenizer probe. A student with a PubMed-trained vocabulary is distilled with hidden-state matching only, since output distillation is undefined across vocabularies. This tests whether fixing the subword fragmentation that BioBART leaves unresolved is worth losing output-level distillation.

All arms use three seeds, with the same number of hyperparameter trials per arm. We release the compute ledger for every run so the comparison can be audited.