LLM-to-Flow Distillation: Teaching Natural Language Goals to Scientific Generators

#Method: LLM-to-Flow Distillation

LLM-to-Flow Distillation (LFD) iteratively aligns a pretrained scientific generator (the student) towards a natural-language goal g with Direct Preference Optimization (DPO) on preferences induced by an LLM teacher.

Choose an attainable subgoal

Because the pretrained model may rarely generate samples aligned with the natural-language goal g, the teacher also proposes intermediate subgoals that are from the currently generated samples.

At each round t, the teacher uses observables O(Xt) of the current sample batch Xt to propose an attainable subgoal gt.

  1. Turn judgments into preferences

    For each candidate, the teacher returns a positive, negative, or abstain judgment ℓt(xi) ∈ {+, −, ∅}. Excluding abstentions, the positive and negative sets induce the dataset:

    Pt = {xi ∈ Xt : ℓt(xi) = +}, Nt = {xi ∈ Xt : ℓt(xi) = −}.
    Why preferences?

    We use a preference learning signal instead of an LLM’s pointwise estimate of a hidden quantity because such estimates can be unreliable. However, even strongly miscalibrated scores can induce an ordinal learning signal that we can exploit. Across peptide, crystal, and small-molecule tasks, numerical score differences often depart from the true differences. Yet the same frontier LLMs can induce relative preferences above chance through different elicitation methods (scoring, ranking, positive/negative labels, and pairwise comparisons).

    Hover or tap a task or method to read the prompt. Select a model in the legend to show or hide it.

    Relative judgments provide a learning signal even when score magnitudes are unreliable. LFD uses positive/negative batch judgments: each positive is preferred to each negative, while abstentions are excluded. This yields many training pairs from a single pass over the batch, avoiding a separate LLM query for every pair.

  2. Update the student and repeat

    All positive–negative pairs in Dt = Pt × Nt train the student, using the current generator pθₜ as a frozen DPO reference. We minimize the DPO loss, which favors positive over negative candidates relative to this reference:

    Δtθ = log[pθ(x⁺)/pθₜ(x⁺)] − log[pθ(x⁻)/pθₜ(x⁻)], Lt(θ, Dt) = −EDₜ log σ(βΔtθ).

    Here, σ is the logistic function and β > 0 controls regularization. Starting from θt, optimizer steps yield θt+1; we then draw fresh samples and repeat.

A design-space view. A goal g defines a target region Ωg in design space. When that region is rarely reached, LFD learns through attainable subgoals that tighten as the generator improves:

Ωg₀ → Ωg₁ → ⋯ → Ωg(T−1) → Ωg

Each Ωgₜ contains designs satisfying gt. The final goal stays fixed.

Experiments on peptides and small molecules

#BibTeX

@misc{desanti2026llmtoflowdistillationteachingnatural,
  title={LLM-to-Flow Distillation: Teaching Natural Language Goals to Scientific Generators},
  author={Riccardo De Santi and Federico Di Gennaro and Angelo Gnazzo and Sophia Tang and Pranam Chatterjee and Fanny Yang and İsmail İlkan Ceylan and Michael M. Bronstein and Andreas Krause},
  year={2026},
  eprint={2610.17246},
  archivePrefix={arXiv},
  primaryClass={cs.LG},
  url={https://arxiv.org/abs/2610.17246},
}