arXiv:2610.17246cs.LGOct 2026

Manuscript Offprint

arXiv:2610.17246

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

Riccardo De Santi, Federico Di Gennaro, Angelo Gnazzo, Sophia Tang, Pranam Chatterjee, Fanny Yang, İsmail İlkan Ceylan, Michael M. Bronstein, Andreas Krause

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Generative discovery in science requires coupling high-level scientific reasoning with the ability to generate samples respecting the structure of a design space. Yet these capabilities remain largely separated: foundation LLMs encode broad chemical and biological knowledge, while domain-specific flow- and diffusion-based generators capture the priors needed to produce valid sequences and geometries. We study how to align such scientific generators to high-level natural-language discovery goals without requiring an explicit proxy reward, which is often unavailable or poorly captured by learned predictors in experimental sciences. We introduce LLM-to-Flow Distillation (LFD), where a frozen LLM acts as an adaptive teacher for a domain-specific generator. Given a goal such as 'generate peptides with promising anticancer activity', the teacher constructs a curriculum of intermediate sub-goals aware of the flow's current capabilities, and progressively directs them toward the original discovery goal. At each round, the LLM judges sampled candidates under the current objective. These judgments induce preferences that are iteratively distilled into the generator through DPO. This procedure provides dense learning signals even when the initial model places negligible probability on designs satisfying the final goal, enabling adaptation toward poorly covered, out-of-distribution regions. Experiments on therapeutic peptides and small-molecule structure design demonstrate that LFD enables a new form of generative control: aligning arbitrary domain-specific scientific generators to scientific discovery tasks expressed via high-level natural-language goals.

1 INTRODUCTION

Generative discovery in experimental sciences requires combining two complementary capabilities. The first is broad scientific knowledge and high-level reasoning about chemical and biological systems, e.g., which mechanism drives a disease and which molecules may act on it. The second is the ability to generate valid designs from low-level, domain-specific priors that can capture the structure of a design space, such as which amino-acid sequences fold and remain soluble, or which crystal geometries are plausible. Today, these capabilities are often split across two families of models: LLMs, which absorb the scientific literature yet cannot reliably produce valid designs in several domains (Sriram et al., 2024; Khastagir et al., 2026; Huang et al.,

Current

This work

Reward-guided fine-tuning

Ex∼p1π[r(x)]\mathbb{E}_{x\sim p_1^\pi}[r(x)]

↓

Natural-language goal fine-tuning

'generate peptides with promising anticancer activity'

Figure 1: We extend the capabilities of current fine-tuning methods for specialized scientific generators (e.g., flow models), allowing them to align to natural-language goals.

*Equal contribution, alphabetical. Correspondence to {rdesanti, fdigennaro}@ethz.ch, agnazzo@aithyra.at

2026), and domain-specific generative models, such as flow (Lipman et al., 2023; 2024) and diffusion models (Sohl-Dickstein et al., 2015; Song & Ermon, 2019). Training the latter on scientific designs allows them to capture complex structural and geometric priors, but they lack both the high-level scientific knowledge and the natural language grounding required to interpret a scientist's discovery goal. An LLM's knowledge might be actionable in a discovery task in two key ways. It can concretize a goal, turning a high-level prompt such as 'generate peptides with promising anticancer activity' into concrete measurable design requirements, e.g., engagement with anionic cell membrane to facilitate insertion into the lipid bilayer. Further, it can also assess generated designs via first-principles chemical and biological reasoning based on observable structural measurements.

Over the last few years, a growing literature has proposed methods adapting pre-trained flow and diffusion models to downstream reward functions via fine-tuning, such as FlowGRPO, Adjoint Matching, DiffusionNFT, and Flow Density Control (Liu et al., 2025a; Domingo-Enrich et al., 2025; Zheng et al., 2026; De Santi et al., 2025b). These methods use explicit reward functions to model discovery objectives (Fig. 1). However, proxy rewards in sciences are often unavailable or unreliable learned predictors (Lyu et al., 2019; Wong et al., 2022; Gao et al., 2023; Yoshizawa et al., 2025). Moreover, discovery goals are often not expressed in terms of rewards, but instead formulated via high-level natural-language. In this work, we hence tackle the central question:

How can we align a domain-specific generator (e.g., a molecular flow model) directly to a natural-language discovery goal?

Answering this question would enable scientists to directly adapt specialized generators to natural-language prompts without using proxy rewards (Fig. 1). We cast the LLM as a teacher that distills high-level goal information into the domain-specific generator, the student, steering it toward the discovery region Ωg\Omega_{g} specified by the natural-language goal g (Fig. 2). This raises two key challenges.

First, the teacher’s knowledge must yield a usable signal for flow adaptation. Current LLMs are poor at estimating absolute scores over designs (Jacobs et al., 2024), so these cannot serve as reliable rewards. Their relative judgments are far more reliable, as we show across three scientific domains in Sec. 4. Second, the pre-trained generator may assign negligible probability to Ωg\Omega_g (e.g., De Santi et al., 2026a; Uehara et al., 2024b). Its samples then rarely satisfy g, so direct feedback under the goal might not discriminate among them, thus yielding no useful learning signal. We address both challenges with LLM-to-Flow Distillation (LFD), where the LLM acts as an adaptive teacher for the domain-specific generator. Rather than supervising with the final goal g directly, it constructs a generator-dependent curriculum of sub-goals by inferring the student’s current capabilities through observable properties, and progressively tightens it toward Ωg\Omega_g (Fig. 2, right). At each stage, the teacher assesses current samples under the current sub-goal and distills the resulting judgments into the student via DPO. This provides dense supervision even when the initial generator places negligible probability on Ωg\Omega_g, enabling adaptation to poorly covered, out-of-distribution discovery regions.

References (92)