Skip to content
AI.info

Research

Ambient Discrete Diffusion: Using the Wrong Data at the Right Time for Data Efficient Learning

Overview Research area: Generative machine learning — specifically discrete diffusion models (masked and uniform kernels) trained under severe data scarcity, and domain adaptation from a data-rich sou

Ambient Discrete Diffusion: Using the Wrong Data at the Right Time for Data Efficient Learning
arXiv
2610.12340
Published
2026-10-08
Authors
Julian Kleutgens, Mauricio Tec, Claudio Battiloro, Francesca Dominici, Giannis Daras

AI summary

Overview

Research area: Generative machine learning — specifically discrete diffusion models (masked and uniform kernels) trained under severe data scarcity, and domain adaptation from a data-rich source domain to a small target domain.

Technical level: Intermediate. The method itself is simple (a data-loading rule), but the paper leans on diffusion-model notation (forward process, categorical prior, NELBO, denoisers) and a theoretical analysis with explicit assumptions and theorems.

Scope in one sentence: The paper introduces RefineMix, a training scheme that uses out-of-distribution source data only at low diffusion times and target data alone at high diffusion times, with theory and experiments across text and protein sequence generation.

What This Paper Is About

Diffusion models usually need a lot of data, but many scientific and specialized domains offer only a handful of in-domain examples while related domains have plenty of data. The two standard workarounds — mixing source and target data uniformly during training, or pretraining on everything and fine-tuning on the small target — either bias the model toward the source or overfit the small target. This paper asks how to borrow from related data in discrete diffusion without corrupting the sampled distribution, and answers with a noise-level-dependent data-selection rule called RefineMix.

Key Contributions

  1. The RefineMix algorithm. A single change to the discrete diffusion training loop: below a cutoff time t_max, each training sequence is drawn from the source with probability λ and from the target otherwise; above the cutoff, only target data is used. The schedule, loss, network, and sampler are unchanged, so it works as a data loader on top of any architecture or kernel.

  2. A theoretical account of the cost of mixing (Theorem 1). The probability that RefineMix generates a source sequence is λ/(1−λ) · C(t_max), where the "overlap" C(t) is the average probability a classifier assigns to the target when shown a noised source sequence. Since overlap only grows with noise, any level above the cutoff also bounds the cost: sampling stays on target as long as a classifier can separate the domains at the cutoff.

  3. A theoretical account of the benefit of mixing (Theorem 4). Under assumptions that the domains share a "realization" from content to tokens and that the shared factor's error scales as e(t)/N, the gain over target-only training equals (1/N_T − 1/N_eff) ∫₀^{t_max} e(t)dt − B(t_max) plus higher-order terms. The best cutoff t* is nonincreasing in the number of target samples N_T.

  4. Empirical validation in five text domain-shift settings, four pretrained diffusion language models (130M to 7B parameters), and one protein family — including a real data-scarcity problem where only 197 peroxiredoxin sequences are available as the target.

Main Findings

  • RefineMix matches or beats all baselines on five text domain pairs. Using a 139M-parameter DiT denoiser with the masked kernel, three seeds and λ = 0.9, RefineMix reaches the lowest or equal target validation perplexity in every pair. Examples: Math→Stat 18.29 ± 0.01 versus fine-tuning 19.92 ± 0.01, data mixing 19.61 ± 0.01, and conditional training 19.10 ± 0.00; Patents-G→AG News 27.47 ± 0.02 versus 28.02 ± 0.15, 31.55 ± 0.16, and 29.55 ± 0.04.

  • The best cutoff tracks domain distance. The cutoff t_max lies between 0.7 and 0.9 for close domain pairs and drops to 0.2 for Patents-G→AG News.

  • A few revealed target tokens settle the domain. In a fully mixed model (t_max = 1) on CS→Math with 1% of the target, roughly four revealed target tokens turn generation to the target domain, while shared tokens change nothing.

  • Perplexity is lowest at an intermediate cutoff. On cc_news→Hep-Ex from a source checkpoint, the optimum is t* = 0.8, and every cutoff beats both fine-tuning (t_max = 0) and data mixing (t_max = 1).

  • Scarcer targets yield larger gains. On CS→Math, shrinking the target from 100% to 1% moves RefineMix from a small improvement to more than halving the target-only perplexity.

  • RefineMix adapts pretrained diffusion language models to scarce domains. Across MDLM 130M (Sahoo et al., 2024), SEDD 424M (Lou et al., 2024), SMDM 1.1B (Nie et al., 2025), and DiffuLLaMA 7B (Gong et al., 2025), targeting Lean/mathlib, Rare disease, and ChemRxiv text, RefineMix beats fine-tuning in all twelve settings. For example, on SEDD 424M with ChemRxiv it reaches 15.915 ± 0.055 versus fine-tuning 16.588 ± 0.031 and LoRA (rank 16) 19.659 ± 0.126. LoRA (rank 16) does worse than full fine-tuning, consistent with prior reports that LoRA is suboptimal for diffusion language models.

  • Protein generation improves substantially. Fine-tuning DPLM-650M with only 197 hand-curated peroxiredoxin sequences as target and generic UniRef50 proteins (with every peroxiredoxin cluster removed) as source, RefineMix (t_max = 0.7) produces 63.3 ± 2.0% sequences that are simultaneously in-family, foldable, and novel, compared with 35.8 ± 4.6% for fine-tuning and 32.9 ± 2.2% for data mixing. Real held-out peroxiredoxins score 75.1 ± 5.7 on the same "all three" measure, and generic UniRef50 proteins score 0.0.

  • Data mixing fails on the family criterion for proteins. Its samples come from the source at rate λ (per Theorem 1), so only 36.2 ± 2.2% of its generations match the peroxiredoxin family, versus 79.8 ± 2.4% for RefineMix.

Methodology in Plain English

The core observation is that discrete noising (masking or scrambling tokens) does not erase the domain of a piece of text the way Gaussian noise erases the distinguishing features of an image. A single domain-specific token can reveal where a sequence came from, so text domains remain separable even under extreme masking. At the same time, once enough target-specific tokens have appeared, the remaining uncertainty is purely about how to write text, a skill shared across domains.

This leads to a training rule with two regimes. In the high-noise regime, the model is still deciding what the sequence is about, so only target data is used — otherwise the model could just as easily complete a source sequence. In the low-noise regime, the domain is effectively already determined, so source data can be added freely to teach shared structure such as syntax and spelling, without biasing what gets sampled. The paper formalizes the first regime by showing the failure probability reduces to how often a classifier mistakes a noised source sequence for a target one, and the second by splitting the denoiser into a domain-specific factor (which content) and a shared factor (how to realize content in tokens).

Experiments test each theoretical prediction separately, then apply the method to pretrained models and to proteins. The protein evaluation is designed to reward only genuinely useful output: a generated sequence counts only if a Pfam profile match identifies it as a peroxiredoxin, ESMFold confidence (pLDDT > 70) says it folds, and it is below 90% identity to every training sequence. Splits are by sequence cluster so no test sequence is identical to a training sequence. For each checkpoint the authors generate 256 sequences from the lowest-validation-perplexity model.

Why This Matters

The paper provides a principled alternative to the two default recipes for data-scarce settings (uniform data mixing and pretrain-then-finetune), and it does so with a technique that requires no new architecture, loss, or sampler — only a change to which examples are sampled at which noise level. It also corrects an intuition imported from continuous diffusion: because masking preserves domain information, related data is useful at low noise in discrete diffusion, not at high noise as in Ambient Diffusion for images.

Real-world applications suggested by the paper's own experiments:

  • Protein engineering: generating new, folding, in-family protein sequences (here, peroxiredoxin antioxidant enzymes) when only a few hundred curated family members exist, out of 83,921 UniProt entries of which just 274 are hand-curated (237 after removing duplicates).
  • Scientific and technical writing models: adapting diffusion language models to statistics abstracts, high-energy physics, chemistry preprints, patents, and news.
  • Biomedical and clinical text: the "Rare disease" target is one of the three scarce domains used with the pretrained models.
  • Formal mathematics: adapting models to Lean/mathlib, again with a target corpus that is small relative to the source.

Industry relevance: many organizations hold large general corpora but only small proprietary datasets in the domain they actually care about. RefineMix applies unchanged from 130M to 7B parameters, which suggests it can be adopted in existing fine-tuning pipelines; the finding that LoRA underperforms full

Authors’ abstract

We introduce RefineMix, a framework for training discrete diffusion models under severe data scarcity, a common constraint in scientific applications. RefineMix uses out-of-distribution data at selected diffusion times to improve generalization without biasing the sampling distribution. Although this strategy has been explored in continuous diffusion, discrete diffusion presents a distinct challenge: unlike Gaussian noise, masking preserves domain information in surviving tokens, limiting the use of related data at high noise levels. At low noise levels, however, the domains effectively disjoint supports become an advantage, allowing the model to learn from both in-domain and out-of-distribution data without biasing the sampler. We formalize these intuitions and provide a theoretical analysis for the proposed method. Experimentally, across five domain-shift settings, RefineMix matches or outperforms in-domain finetuning and data mixing. For protein sequence generation, finetuning with just 197 in-domain examples nearly doubles the fraction of generated proteins that are simultaneously novel, foldable, and in-family compared to standard finetuning.

Read the original paper