arXiv:2610.41648cs.LGOct 2026

Manuscript Offprint

arXiv:2610.41648

On the Generation Order in GFlowNets

Timofei Gritsaev, Evgeny Katasonov, Ildus Sadrtdinov, Esmeralda S. Whitammer, Dmitry Vetrov

ABSTRACT

Sampling from discrete distributions specified by unnormalised probability functions is a classical statistical problem. GFlowNets address this problem by constructing objects sequentially, adding one discrete component at a time in either a predefined or a learned order. The choice of order determines which conditional distributions the neural network must learn, some of which may be easier to learn than others. Yet whether existing GFlowNet algorithms discover interpretable generation orders and make use of them during training remains unexplored. We introduce controlled problems where generation order is experimentally shown to affect convergence and standard GFlowNet training struggles to discover useful orders. To address this difficulty, we develop Learning-Order GFlowNet, a training recipe that learns interpretable generation orders without order annotations and improves convergence on these problems. Finally, we investigate gradient signal-to-noise ratio (SNR) as a possible explanation for order emergence: orders associated with faster convergence exhibit higher SNR at comparable validation loss, suggesting both a mechanism favouring their emergence and an SNR-based characterisation of a good generation order.

1 INTRODUCTION

We consider the problem of sampling from a discrete space X\mathcal{X}. Given an unnormalised probability function RR, also called a reward function, our goal is to sample from

p(x)=R(x)Z,Z=∑x∈XR(x),(1)p(x)=\frac{R(x)}{Z},\qquad Z=\sum_{x\in\mathcal{X}}R(x), \tag{1}

where pp is the target distribution and ZZ is its normalisation constant. The space X\mathcal{X} consists of complete discrete objects, and ZZ is generally intractable to compute. This is a classical problem with many applications, for example, in drug discovery (Bengio et al., 2021; Cretu et al., 2025) and graph combinatorial optimisation (Zhang et al., 2023).

Many discrete objects admit a hierarchical decomposition, and GFlowNets (Bengio et al., 2021; Malkin et al., 2022) provide an amortised approach to sampling based on this decomposition. Backward, or decomposing, actions define a directed acyclic graph (DAG) in which complete objects from X\mathcal{X} are progressively decomposed to an empty state. Reversing these edges gives the forward, or generative, actions and associated DAG: objects are constructed from the empty state through a sequence of intermediate states. The backward policy determines the distribution over decomposition orders. It can be fixed, for example by selecting uniformly among removable components or by following a predefined order, as in autoregressive generation. Alternatively, Malkin et al. (2022) parameterise the backward policy alongside the forward policy and learn them jointly. However, which generation orders emerge from this joint learning, and why they emerge, remain insufficiently understood.

In the generative modelling, it was shown that generation order can change the performance of a trained model (Vinyals et al., 2015). While some domains have common orders, for example, text is

*Equal contribution.

often generated from left to right, some domains, like graphs, do not have a preferred ordering (Chen et al., 2021; Wang et al., 2025). Any-order autoregressive models avoid a fixed order by training over uniformly sampled permutations of the data dimensions (Uria et al., 2014), but such order-agnostic models can underperform fixed-order autoregressive models (Hoogeboom et al., 2022). A possible explanation is that a neural network is trained to fit conditional distributions across all reveal orders, including difficult prediction problems, without learning a preference for more suitable orders (Wang et al., 2025; Kim et al., 2025). This motivates learning generation orders that expose tractable conditionals for the target distribution.

In this work, we study interpretable and learnable order in sequential sampling via GFlowNets framework. We outline our main contributions as follows:

  • We introduce discrete sampling problems in which the generation order changes the difficulty of conditional prediction, and study the effect of the choice of generation order on sampler performance.

  • We introduce and ablate Learning-Order GFlowNet (LO-GFlowNet) – a training recipe that allows learning generation orders reflecting the underlying dependencies of the problems.

  • We suggest a possible explanation for the emergence of interpretable orders through the analysis of gradient signal-to-noise ratio (SNR).

References (66)