Contrastive Data Selection for Domain Adaptation

You are reading version 1 of this direction, frozen 2026-10-04. The latest version is version 2.

Version 1 of 287 papers100 conceptsfrozen 2026-10-04

In the era of massive datasets, the prevailing wisdom is often "more is better." However, training a model on a trillion tokens of generic web text often yields a "jack of all trades, master of none." When we need a model to excel in a specific domain—be it medical records, legal briefs, or informal chat—simply adding more data can actually dilute performance.

The challenge is not just finding data that looks like the target domain, but finding data that is distinctively relevant to it. The most successful approach to this problem is a technique known as cross-entropy difference or contrastive data selection.

The Failure of Simple Likelihood

To adapt a model to a new domain, the intuitive first step is to filter a large, general corpus (like a web crawl) for sentences that are "likely" in the target domain. You might train a small language model on a sample of target data and use it to score candidate sentences from the general pool.

However, as Robert C. Moore and William D. Lewis pointed out in their seminal work, Intelligent Selection of Language Model Training Data, this "likelihood" approach has a fatal flaw: it prioritizes generic language. A sentence like "The house is blue" is highly likely in almost any domain because it uses high-frequency words and standard syntax. If you select data based solely on high likelihood in the target domain, your training set will be flooded with these "easy" generic sentences, drowning out the specialized vocabulary and structures you actually need to learn.

The Moore-Lewis Criterion: Finding the Signal

The breakthrough was to move from absolute likelihood to relative likelihood. Instead of asking "How likely is this sentence in my target domain?", we ask: "How much more likely is this sentence in my target domain than in the general domain?"

The mechanism, now widely known as the Moore-Lewis criterion, calculates a score for each sentence $s$ by subtracting its cross-entropy under a general-domain model ($H_{general}$) from its cross-entropy under a target-domain model ($H_{target}$):

$$Score(s) = H_{target}(s) - H_{general}(s)$$

This subtraction acts as a high-pass filter. Generic sentences like "The house is blue" will have low cross-entropy (high likelihood) under both models, resulting in a score near zero. However, a domain-specific sentence like "The patient presented with acute myocardial infarction" will have very low cross-entropy under the medical model but very high cross-entropy under the general model. This creates a large negative difference, flagging the sentence as highly relevant.

Evolution and Scaling

This contrastive logic has proven remarkably robust across different architectures and modalities:

  • Bilingual Adaptation: Amittai Axelrod and colleagues extended this to translation in Class-based N-gram language difference models for data selection. They found that by abstracting words into Part-of-Speech (POS) tags, the selection mechanism could focus on domain-specific syntax rather than just vocabulary, which is particularly useful for low-resource languages where specific words might be rare.
  • Speech Recognition: Researchers at Google, including Cal Peyser and Tara N. Sainath, applied contrastive perplexity to Rare-Word Speech Recognition. By pruning a 213-billion-sentence corpus by 53x using this method, they improved rare-word accuracy by 24% without degrading general performance.
  • Modern LLMs: The technique remains central to modern pre-training. David Brandfonbrener introduced CoLoR-Filter Conditional Loss Reduction Filtering, which uses the difference in negative log-likelihood between auxiliary models to select data. This allowed a 1.2B parameter model to match baseline performance using 25x less data.

The Complementarity Trap

While data selection is powerful, it must be used carefully alongside other techniques. Dan Iter and David Grangier identified a "complementarity trap" in On the Complementarity of Data Selection and Fine Tuning for Domain Adaptation.

If the selection process is too aggressive, the resulting training set becomes so narrow that it mirrors the final fine-tuning set. This redundancy eliminates the benefit of having a separate pre-training phase. The most effective strategy is often a "curriculum" approach, as explored by Xuan Zhang in Curriculum Learning for Domain Adaptation, where the model is introduced to data in a schedule from "most-similar" to "least-similar" to the target domain.

Why It Works: Information Theory Intuition

At its heart, contrastive data selection is about information gain. A general-domain model already "knows" the statistics of common language. Training on more common language provides no new information; it only reinforces what the model already knows, potentially at the expense of specialized knowledge.

By subtracting the general model's scores, we are essentially asking: "What does this sentence tell me that I don't already know from the general world?" This ensures that every gradient update during the adaptation phase is focused on the unique statistical "fingerprint" of the target domain.

Papers in this version

Showing 60 of 87 papers.

History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 156 papers
  2. Version 1 · 2026-10-04 · 87 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_cross_entropy_data_selection_71c6faab,
  title = {cross-entropy data selection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/cross-entropy-data-selection/rdr_71c6faabcf7f47baafb717e7298e4d6b},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-25},
}

This exact version (version 1, frozen text):

@misc{lacuna_contrastive_data_selection_for_domain_ad_71c6faab_v1,
  title = {Contrastive Data Selection for Domain Adaptation},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/contrastive-data-selection-for-domain-adaptation/rdr_71c6faabcf7f47baafb717e7298e4d6b/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-25},
}