When a general language model is adapted to a narrow, distant kind of text, such as hospital notes or patient–doctor chat, the usual recipe is to keep pre-training it on whatever target text exists. That works poorly when the target text is small and very different from what the model has seen. The model forgets general grammar and still learns too little about the target. In computer vision, a different idea has worked well for large shifts: do not jump straight to the target. Walk there through intermediate data that sits "between" the two domains, for example twilight images on the way from day to night. We propose to bring this idea to language-model pre-training in a specific form. A classifier trained to tell general text from target text scores every document in a large unorganized pool, such as PubMed, full-text science papers, and health web pages. Documents are then fed to the model in order of that score, so pre-training moves through text that becomes steadily more target-like.
The question this answers is narrower and more useful than "do curricula help?". Recent language-model work already shows that blending general and specialized data beats switching abruptly. What no one has tested is whether the intermediate documents matter, or whether a well-tuned schedule of mixing ratios between the two endpoints captures all of the benefit. Our experiments are built to separate these two explanations. If ordered bridge text does not beat a matched mixing schedule and a shuffled version of the same documents, that is itself a clear negative result for transferring gradual domain adaptation to text.
Core Claim
For a low-resource target that is far from general text, continued pre-training should follow a path of real documents ordered by how target-like they are. This should give better target-task accuracy and less forgetting than three alternatives at the same token budget: a constant general-plus-target mixture, a decaying mixture ratio, or retrieval of only the nearest documents. We further predict that the advantage grows with the distance between source and target. It should be near zero when the target is PubMed abstracts and largest when the target is informal clinical dialogue.
Four lines of prior work set up this claim. Midtraining Bridges Pretraining and Posttraining Distributions motivates it. That paper inserts a single blended "midtraining" stage between pre-training and fine-tuning and shows that the blend sharply reduces forgetting: C4 loss degradation on its GSM8K setting fell from 0.132 to 0.020. It also finds an early "plasticity window", a period when the model can absorb heavy mixes of specialized data without harm. However, it studies one stage, measures distance with unigram counts, and leaves multi-distribution paths open. Our proposal differs on all three points.
An Empirical Investigation Towards Efficient Multi-Domain Language Model Pre-training runs a hand-chosen Generic → Biomedical → Clinical sequence of separate blocks and fights forgetting with weight regularization. We keep its endpoints and evaluation but replace fixed blocks with a graded, discovered ordering.
Gradual Fine-Tuning for Low-Resource Domain Adaptation decays the share of out-of-domain labeled data across fine-tuning stages. It shows that gradual mixing beats one-stage fine-tuning by over 6% joint accuracy on MultiWOZ, but only in supervised fine-tuning. Its schedule becomes one of our main baselines, transplanted to unsupervised pre-training.
The discovery mechanism comes from vision. IDOL orders an unlabeled pool between source and target with a progressively trained domain classifier. On Portraits it beats the human-supplied chronological order (85.5% vs. 83.8%), which is the strongest hint that a discovered order can outperform a hand-picked one like Arumae et al.'s. GDAMF supplies the warm-start-from-the-previous-stage design and the observation that direct transfer collapses beyond a distance threshold. The negative results in that literature, where errors compound across badly spaced steps, constrain our design. Because we use the self-supervised language-modeling loss rather than pseudo-labels, the main compounding mechanism of vision self-training is absent. That also means vision results may not carry over, which is why we test rather than assume.
Research Program
We build the bridge in three steps.
Score the pool. We start from a general model, RoBERTa-base for the main study, matching Don't Stop Pretraining and Arumae et al. We train a light classifier, a small encoder fine-tuned on general text (Wikipedia/Books) versus the target corpus. It assigns each pool document $x$ a target probability $s(x) \in [0,1]$.
Refine the scores. Following IDOL's coarse-to-fine idea, we retrain the classifier between successive extremes of the current ordering. This makes it resolve fine differences in the middle of the range, not just the obvious endpoints.
Cut the ordering into stages. We split the ordered pool into stages so that adjacent stages differ by a bounded amount. Rather than fixing the number of stages $M$ in advance, which is an open problem flagged for IDOL, we start a new stage whenever a fresh classifier can separate the current stage's text from the next stage's with held-out accuracy above a threshold $\tau$. $M$ therefore falls out of the data. As a cross-check, we also measure stage distances with a representation-level metric: centered kernel alignment on the model's own embeddings. This replaces the unigram distance used by Liu et al.
Train through the stages. Within the bridge, each stage is sampled as a mixture of its own documents with small fixed fractions of general replay and target text. Training is warm-started from the previous stage, and the target share rises to 100% in the final stage. Pre-training begins early, within the plasticity window that Liu et al. identify.
Measure what changes along the path. At every stage boundary we record four things: masked-language-model loss on held-out target text, loss on held-out general text, CoLA accuracy, and layer-wise similarity to the starting model. This produces a trajectory, not only an endpoint, and shows whether the bridge changes upper layers more gradually than direct adaptation does.
Vary the distance to the target. Target corpora are chosen to span increasing distance from general text: PubMed abstracts (near), MIMIC-III clinical notes (far), and patient–doctor dialogue of the iCliniq/HealthCareMagic type (farthest, and the "clinical gap" noted in BioBART). For each target we subsample to a low-resource budget of a few tens of millions of tokens. At that size, training from scratch in the style of PubMedBERT is not viable. The bridging pool is identical across targets: PubMed, PubMed Central, and general web/health text. We also include the Computer Science domain of Gururangan et al., with a pool drawn from S2ORC, as a non-medical replication. A secondary run with a 1B-parameter decoder from the Pythia family tests whether conclusions hold for autoregressive models and generative clinical tasks.
Baselines
Every method gets the same starting checkpoint and the same total number of pre-training tokens. It sees the same target tokens the same number of times and receives the same hyperparameter search budget: learning rate and replay fraction, with an equal number of trials. The classifier and scoring cost of the bridge is reported separately, in GPU-hours. A "compute-inclusive" comparison also gives the baselines that many extra pre-training tokens.
No adaptation. Fine-tuning RoBERTa-base directly on each downstream task is the do-nothing reference point.
Direct domain-adaptive pre-training. Continued pre-training on the target corpus alone, as in Gururangan et al., is the standard recipe. Its known weakness is forgetting: Arumae et al. report an unmitigated 20-point CoLA drop. The file gives no specific task F1 numbers for this setting, so we report our own reproduction against the qualitative finding that DAPT beats the base model.
Hand-staged sequence with regularization. This is Arumae et al.'s Generic → Biomedical → Clinical pipeline with Elastic Weight Consolidation, a penalty that keeps parameters important for earlier stages from moving far. It is the strongest existing multi-stage method for our main clinical setting. Its reported numbers are a clinical-task score of 83.47 versus 82.03 for the baseline, with generic performance held at 86.99. Beating it means a higher clinical score at equal tokens while matching its generic retention.
Matched midtraining mixture. A single constant blend of general replay and target text, with the ratio tuned in the same search, is the strongest stand-in for Liu et al.'s single-stage bridge.
Decaying mixture. The ratio of general to target text decays linearly or stepwise over the same number of stages the bridge discovers, as in Xu et al.'s schedule transplanted to pre-training. This is the critical competitor. It has gradualness without intermediate documents.
Nearest-neighbor retrieval. kNN-TAPT from Gururangan et al. retrieves the pool documents most similar to the target and trains on them together with target text. It uses intermediate-pool data but keeps no path.
Shuffled bridge. Exactly the bridge documents, presented in random order, isolate whether ordering matters at all.
Bridge plus regularization. As an add-on, Elastic Weight Consolidation layered on the bridge shows whether the two are complementary.
Reference point only. In the PubMed-abstract setting, PubMedBERT's reported BLURB score of 81.16 is an upper reference. It is not a matched competitor, since it uses far more data and a custom vocabulary.
Winning means beating the decaying mixture, the shuffled bridge, and nearest-neighbor retrieval on target tasks by more than the seed-to-seed spread across five fine-tuning seeds, without losing general performance.
Why not just…?
Why not just keep a constant mix of general and target text? This is the cheapest remedy for forgetting, and Liu et al. show it works for one stage. But a constant mix can only include the two endpoints. When the target corpus is tiny, the model repeats the same target text many times and gets no support in the region between the domains. The matched-mixture baseline, tuned over its ratio, tests this directly. If it ties the bridge on the farthest target, we will conclude that intermediate documents add nothing.
Why not just decay the mixing ratio over time, without any intermediate documents? This is the real threat. Xu et al. show that gradual ratio decay alone gives large gains in fine-tuning, and it may account for most of whatever the bridge achieves. We do not argue around it. It is run with the same stage count and tuning budget, and the comparison with the bridge is the headline result. A tie would mean gradualness, not discovered intermediates, is the active ingredient.
Why not just retrieve the nearest pool documents and train on those? kNN-TAPT already pulls target-like text out of a large pool and often helps. The bridge differs in two ways. It covers the whole range between general and target text rather than only the nearest neighbors, and it orders that text. The nearest-neighbor baseline tests the first difference and the shuffled bridge tests the second. If shuffled and ordered bridges tie, the value lies in data selection rather than path. That would still be useful, but it would be a different and smaller claim.
Why not just pre-train from scratch on the target? PubMedBERT shows that this beats continued pre-training when billions of in-domain words exist. Our regime is defined by their absence. We include from-scratch training on the low-resource target corpus once, to confirm that it is non-competitive at that size, rather than presuming so.
Proposed Experiments
Clinical setting (primary). We run the far and farthest targets and evaluate on the clinical tasks used by Arumae et al. and Suchanek et al. (Suchanek et al. report that adding MIMIC-III notes gave +1.5% to +1.7% on clinical tasks). For the decoder runs we use the generative clinical tasks from BioBART: MeQSum (Rouge-L, where BioBART-Large reports 53.15), iCliniq, and HealthCareMagic. Forgetting is measured by CoLA and held-out general language-model loss, mirroring Arumae et al. and Liu et al.
Near-target control. The PubMed-abstract target is evaluated on BLURB.
Second domain. The Computer Science domain is evaluated on ACL-ARC and SciERC from Gururangan et al.
First decisive check: distance scaling. We plot the bridge's gain over the decaying mixture against measured source–target distance. The prediction is a gain that rises with distance. A flat or falling curve refutes the core claim.
Second decisive check: ordering versus selection. We compare the ordered bridge with the shuffled bridge and with nearest-neighbor retrieval.
Third decisive check: discovered versus hand-picked. We compare the discovered ordering with Arumae et al.'s fixed category sequence. This tests whether IDOL's advantage over human orderings in vision carries over to text.
Diagnostic. We test whether the automatic stage-cutting rule beats fixed choices of $M = 2, 4, 8$, and whether layer-wise similarity curves show smoother upper-layer change along the bridge. That would be the mechanism Liu et al. point to.
These checks together establish one of three outcomes. Either distance-ordered intermediate text is a distinct and useful ingredient for adapting language models to distant low-resource domains, or the gains reduce to gradual ratio scheduling, or they reduce to good data selection.
References
- Midtraining Bridges Pretraining and Posttraining Distributions
- An Empirical Investigation Towards Efficient Multi-Domain Language Model Pre-training
- Gradual Fine-Tuning for Low-Resource Domain Adaptation
- Gradual Domain Adaptation without Indexed Intermediate Domains
- Cost-effective framework for gradual domain adaptation with multifidelity
- Don't Stop Pretraining: Adapt Language Models to Domains and Tasks
- BioBART: Pretraining and Evaluation of A Biomedical Generative Language Model
- Domain-Specific Language Model Pretraining for Biomedical Natural Language Processing
- Pretrained Language Models for Biomedical and Clinical Tasks: Understanding and Extending the State-of-the-Art