GFlowPO: Generative Flow Network as a Language Model Prompt Optimizer
Reading guide · Based on sections of the original paper
Why read this
This paper is worth reading for practitioners who optimize prompts for small open-weight target models under a tight evaluation budget and are considering whether replay-based training beats PPO/GRPO prompt optimizers or reflective LLM-based optimizers.
What the authors found
- The authors report the largest gains on instruction induction, using a Mistral-7B prompt-LM and a Gemma-7B target. GFlowPO averages 65.0 across 24 Instruction Induction tasks, versus 51.9 for APE and 51.6 for ProTeGi. On BBII text-generation tasks it scores 62.3, versus 60.2 for the second-best method. It leads five of six II categories and is comparable to ProTeGi on Translation. Results.
- An extended ablation averages 10 II tasks. Off-policy GFlowNet training with DMU scores 80.2, versus 74.4 for reward-weighted off-policy MLE on the same replay data and 74.4 for a frozen prompt-LM using DMU retrieval only. This suggests the training objective itself, not retrieval alone, drives much of the gain. Generic reward-weighted replay learning does not recover the performance of GFlowPO .
- On six few-shot GLUE-style classification tasks, with Gemma-7B as both prompt-LM and target and three seeds, GFlowPO averages 78.7 ± 0.9 versus 75.8 ± 1.2 for StablePrompt. It is not uniformly best: on MRPC it trails StablePrompt. Results.
Main limitation
The headline sample-efficiency claim needs a qualification. The first 400 evaluations are a Pre-Step that fills the replay buffer without updating the prompt-LM, so GEPA can look competitive early on. The authors concede that GFlowPO gives up some early-stage efficiency in exchange for better final accuracy, and removing the Pre-Step drops the 10-task average from 80.2 to 74.3. Appendix P Early-stage performance and comparison with GEPA.
Where to start
Appendix Q Contribution of GFlowNet Learning · Table 18 separates the contributions of DMU retrieval, generic reward-weighted replay, and GFlowNet-specific learning. Check whether the attribution holds, noting that these are single averages over 10 tasks with no reported variance.
Abstract
Finding effective prompts for language models (LMs) is critical yet notoriously difficult: the prompt space is combinatorially large, rewards are sparse due to expensive target-LM evaluation. Yet, existing RL-based prompt optimizers often rely on on-policy updates and a meta-prompt sampled from a fixed distribution, leading to poor sample efficiency. We propose GFlowPO, a probabilistic prompt optimization framework that casts prompt search as a posterior inference problem over latent prompts regularized by a meta-prompted reference-LM prior. In the first step, we fine-tune a lightweight prompt-LM with an off-policy Generative Flow Network (GFlowNet) objective, using a replay-based training policy that reuses past prompt evaluations to enable sample-efficient exploration. In the second step, we introduce Dynamic Memory Update (DMU), a training-free mechanism that updates the meta-prompt by injecting both (i) diverse prompts from a replay buffer and (ii) top-performing prompts from a small priority queue, thereby progressively concentrating the search process on high-reward regions. Across few-shot text classification, instruction induction benchmarks, and question answering tasks, GFlowPO consistently outperforms recent discrete prompt optimization baselines.