Borrowed Capacity for Absorbing Domain Knowledge into Tiny Language Models

Small language models that run on phones or offline hospital tablets do badly on professional exams. One common explanation is that they never saw the right facts. A second explanation, which this note proposes to test, is that they see the facts and lack the room to store them. In the second case, a tiny model trained on a medical knowledge corpus underfits that corpus: its training loss stays high because it cannot memorize thousands of drug–indication–contraindication relations. In tiny vision models, the cure for underfitting is to borrow capacity only during training. The model is embedded in a temporarily larger network and trained jointly with it, and the extra parameters are then thrown away or folded back in, so deployment cost does not change. We propose to apply that cure at one specific point in a small language model's training: the phase where it absorbs a structured domain knowledge base. It should not be applied during task fine-tuning, where the data are small and the model may already overfit.

The core claim is falsifiable and regime-specific. When a tiny transformer is trained on a pharmacology knowledge graph rendered as text, training-time width expansion of its feed-forward layers will raise closed-book recall of graph facts. That gain will carry over to licensed-pharmacist exam accuracy with no added inference parameters and no retrieval at test time. The same expansion applied only during exam fine-tuning will give little or nothing, mirroring how expansion hurts large, overfitting vision models. If the prediction holds, the domain knowledge gap in compact models is partly a capacity gap that can be targeted surgically. If it fails, the result tells practitioners to spend their budget on retrieval or distillation instead.

What the Two Literatures Establish

On the capacity side, Network Augmentation for Tiny Deep Learning (NetAug) trains a tiny network as a weight-sharing slice of a wider "augmented" network and discards the extra width at inference. It reports a 2.2% ImageNet gain for MobileNetV3 w0.35. The same paper reports that applying it to ResNet50 hurts by 0.3%, and that dropout, Mixup and AutoAugment degrade tiny models. That pair of findings is the hinge of our proposal: expansion helps only in the underfitting regime. NetBooster instead expands depth and width. It then gradually fades the inserted nonlinearities into identities using the activation $\max(\alpha X, X)$ with $\alpha$ annealed from 0 to 1, so that stacked layers fold into one. This takes MobileNetV2-Tiny from 51.2% to 53.7% at fixed FLOPs. MINA widens the input layer into parallel branches that are summed at the end. All three supply the method we reuse, but all three were tested on convolutional vision backbones. The file lists folding through GeLU or softmax attention as unresolved.

MobileBERT is the language-side precedent. It is a deep, thin 25.3M-parameter BERT trained by layer-by-layer transfer from an inverted-bottleneck teacher, and it reaches 77.7 GLUE and 90.0 SQuAD F1. It was trained and evaluated only on general text, and its capacity help comes from a separate teacher rather than from the student's own expanded parameters.

On the domain side, Towards Medical Machine Reading Comprehension with Structural Knowledge and Plain Text motivates the proposal. It introduces NLPEC, over 21,000 Chinese pharmacist-exam questions whose answers depend on facts absent from the reference snippets. Its KMQA system retrieves triples from the CMeKG medical knowledge graph, turns them into pseudo-sentences, and runs a graph network beside a RoBERTa reader, reaching 61.8%. That system is large, carries the graph and retriever at inference, and loses 32% of its errors to retrieval noise. It is therefore both our strongest reference point and a design we want to make unnecessary on-device.

TheoremQA constrains the design. Putting the needed theorem in the prompt did not significantly help models. This suggests that supplying knowledge only in the input is not enough and that knowledge has to be internalized. AGRE-KD is a warning about distillation: capacity-starved students amplify teacher shortcuts, with worst-group accuracy at 46.4% under plain ensemble averaging on Waterbirds.

Closest Existing Work and How This Differs

The closest work is VE-KD. It trains small domain language models by expanding the vocabulary and distilling from a larger teacher. Its expansion is lexical and permanent, and its capacity comes from an external teacher. Domain-specific knowledge distillation yields smaller and better models for conversational commerce and GAPrune compress domain models by distillation or pruning, on intent classification and embeddings respectively.

None of these expands the student's own parameters temporarily. None ties that expansion to a knowledge-absorption phase. None asks whether the student underfits the knowledge or overfits the task. Our proposal does all three. It also keeps a deployment footprint identical to plain fine-tuning: no graph, no retriever, no added layers.

Core Mechanism

The student is a tiny Chinese BERT-style encoder at two sizes, about 5M parameters and MobileBERT's 25M. Training has two phases.

In the knowledge-absorption phase, the student is trained with masked-token prediction on a corpus of CMeKG triples rendered as pseudo-sentences, in the same way KMQA renders them, mixed with pharmacology text. In the task phase, it is fine-tuned on NLPEC.

Capacity is borrowed only where facts are thought to live, in the feed-forward blocks of the transformer. Two expansion variants are compared.

The first is NetAug-style weight sharing. Each feed-forward block's hidden width is multiplied by a factor $r$. The deployed model's weights $W$ form a slice of the augmented weights $W_{aug}$, and training minimizes

$$ \mathcal{L} = \mathcal{L}_{\text{MLM}}(W) + \lambda\, \mathcal{L}_{\text{MLM}}(W_{aug}), $$

where $\mathcal{L}_{\text{MLM}}$ is the masked-token loss on the knowledge corpus and $\lambda$ weights the augmented model's loss. At the end, the non-shared columns are dropped.

The second variant folds exactly and sidesteps the open problem of contracting through GeLU or attention. Each linear projection inside the feed-forward block, and optionally the attention query, key, value and output projections, is replaced during training by a short stack of wider linear maps. Inserted activations between them are faded to identity with NetBooster's annealing schedule. The stack then multiplies out into a single matrix of the original shape. The GeLU and softmax of the deployed model are never touched, because expansion and folding happen only inside linear maps. This is our answer to the contraction limitation the file identifies: it does not fold nonlinear attention, it avoids needing to.

Research Program

The work is organized around a diagnostic, then the intervention, then attribution.

The diagnostic comes first because it decides whether the idea applies at all. For students of 5M, 25M and 110M parameters, we will record final training loss and held-out loss on the knowledge corpus. We will also record closed-book recall of held-out-masked triples: given a head entity and relation as a cloze sentence, does the model produce the tail entity? We will record the same train/held-out gap on NLPEC fine-tuning. Our hypothesis predicts that small students show high training loss on the knowledge corpus, which is underfitting, while showing a growing train–validation gap on NLPEC, which is overfitting. If tiny students instead fit the knowledge corpus well, the capacity story is wrong for this domain, and we will report that rather than proceed.

The intervention then crosses the two expansion variants with three placements: knowledge phase only, task phase only, and both. The expansion factor $r$ is swept over a small grid, with the same tuning budget granted to every baseline.

Attribution ties exam gains to stored facts. We will annotate which NLPEC test questions have their answer-supporting triple present in CMeKG. KMQA's error analysis already separates "missing from text and KG" (44% of its errors), so the split is meaningful. If gains are concentrated on KG-covered questions and track per-question triple recall, borrowed capacity is helping by storing knowledge. If gains are uniform, it is acting as a generic optimizer aid.

As a second domain, we will use the legal provision recommendation and reversal prediction tasks of AppealCase. Here the knowledge corpus is the text of civil statutes and the task data are 10,000 matched case pairs. This tests whether the regime prediction transfers to a domain whose knowledge is rules rather than entity facts.

Baselines

The naive reference point is the same tiny student, initialized from general-domain pretraining and fine-tuned directly on NLPEC with the standard recipe. Every other number is reported as a gap over this one.

The first ablation that isolates the key ingredient is knowledge-phase training without expansion. It is the same student, run through the same CMeKG pseudo-sentence corpus for the same number of tokens, with no augmented width. It answers whether the gain comes from the knowledge corpus or from borrowed capacity. The proposal must beat it, at both student sizes, by a margin larger than the seed-to-seed spread across at least three seeds. A second ablation applies expansion only in the task phase. Our hypothesis predicts it yields no gain or a loss, as NetAug reports for ResNet50, and a positive result there would undercut the regime story.

The strongest compact competitor is knowledge distillation into the same student from a RoBERTa teacher that has itself gone through the knowledge phase and NLPEC fine-tuning. Distillation is applied in both phases, at matched GPU-hours: NetAug reports about 16.7% extra training time, so baselines receive proportionally longer schedules. We also run a "train longer" control with the same added compute and no expansion or distillation. The proposal beats distillation if expansion alone matches it, or if expansion plus distillation clearly exceeds distillation alone. The second outcome is what NetAug and NetBooster report in vision, where the two are additive.

For the strongest existing system, KMQA reports 61.8% NLPEC test accuracy with a RoBERTa reader, graph retrieval and a graph network (Towards Medical Machine Reading Comprehension with Structural Knowledge and Plain Text). We do not expect a 5M–25M model with no retrieval to exceed it. The target is to close a stated fraction of the gap between the naive tiny model and 61.8% at a fraction of the parameters and with no graph at inference, reported as an accuracy-versus-deployed-parameters curve. We also run a tiny-retrieval baseline: the same tiny student given KMQA-style retrieved pseudo-sentences in its input at inference. This tests internalization against retrieval at a matched parameter count, with the extra latency of the longer input measured and reported. For AppealCase there is no reported result found on Lacuna for small encoders; the only figure is that all 20 evaluated large models score below 50% F1 on first-instance reversal prediction. We therefore treat the naive tiny model and our own distillation baseline as the reference there.

Why not just…?

Why not just distill from a large domain teacher? This is the most serious threat. VE-KD and the conversational-commerce work show distillation alone produces usable small domain models. However, distillation passes on output distributions without changing whether the student has room to store what it is taught. AGRE-KD shows capacity-starved students turn teacher signals into shortcuts. The matched-compute distillation baseline and the expansion-plus-distillation arm decide this directly. If expansion adds nothing on top of distillation and the triple-recall gap closes under distillation alone, we will conclude distillation already solves the storage problem.

Why not just use a slightly bigger model or train longer? A bigger deployed model changes the deployment budget, which is the constraint the work exists to respect. The 110M student in the diagnostic shows how much accuracy that budget would buy, so the gain from borrowed capacity can be priced against it. Training longer is run explicitly at matched GPU-hours. NetAug reports that prolonged schedules did not match expansion on ImageNet, but that has not been shown for language knowledge corpora, so we treat it as an open empirical question.

Why not just retrieve the knowledge at inference, as KMQA does? Retrieval keeps a graph, an index and longer inputs on the device. In KMQA, 32% of errors came from retrieval noise, which a tiny reader is presumably less able to filter. TheoremQA's null result for in-prompt theorems also suggests that knowledge supplied only in the input may not be used. Still, retrieval may win on rare facts the tiny model cannot store even with borrowed capacity. The tiny-retrieval baseline, broken down by triple frequency in the knowledge corpus, will show where each approach wins. A plausible outcome is a crossover, with internalization winning on frequent facts and retrieval on the long tail, and we will report it as such.

Decisive Checks

The idea stands or falls on three measurements. The first is the diagnostic: tiny students must show high training loss on the knowledge corpus, otherwise there is nothing to cure. The second is the placement contrast: expansion during knowledge absorption must beat no expansion and must beat task-phase expansion. The third is the attribution: NLPEC gains must concentrate on CMeKG-covered questions and correlate with closed-book triple recall. All accuracy figures are reported with deployed parameter counts and measured single-question latency on a phone-class CPU, identical by construction across expanded and unexpanded students. The exact-folding variant is checked by confirming that the folded and unfolded models give identical outputs to numerical precision. A positive result on all three would show that part of the domain knowledge gap in compact models is a capacity gap that can be closed at zero inference cost. A negative result on the first would redirect effort in small domain models toward retrieval and data rather than architecture.