Generative Flow Networks (GFlowNets) have emerged as a powerful paradigm for scientific discovery. By learning to sample diverse candidates—such as novel molecules or protein sequences—in proportion to a given reward function, they excel at exploring vast combinatorial spaces. However, real-world discovery rarely relies on a single metric. A viable drug candidate, for instance, must simultaneously be potent, non-toxic, and easy to synthesize.
While extending GFlowNets to handle these multi-objective settings has attracted significant interest, existing approaches suffer from severe rigidity. This paper introduces a training-free framework that treats pre-trained GFlowNets as reusable building blocks, composing them on the fly at inference time to solve complex multi-objective generation tasks.
The Problem: Rigidity in Multi-Objective GFlowNets
Currently, balancing multiple conflicting objectives in GFlowNets introduces two major bottlenecks:
- Retraining Requirements: Most multi-objective methods require joint training for every specific combination of objectives. If researchers decide to add or swap an objective later, the entire model must typically be retrained from scratch.
- High Computational Overhead: Methods that utilize logical operators (e.g., "find molecules that satisfy Objective A AND Objective B") often require training a dedicated auxiliary classifier for every new combination. This classifier guidance can be more computationally expensive than training the base models themselves.
The Solution: Routing by Reaching
To overcome these limitations, the authors propose Routing by Reaching, a framework that combines multiple pre-trained GFlowNets at inference time without any fine-tuning or retraining.
Instead of simply averaging the policies of different models, the framework mixes the forward policies ($p_{i,F}$) using weights derived from the reaching probability ($u_i(s)$). Intuitively, the reaching probability represents how likely a specific model is to visit a certain state. If a state is highly relevant to Model A's objective but irrelevant to Model B's, Model A is given more "votes" in determining the next action at that step.
This elegant approach leverages the internal flow of a GFlowNet, recognizing that the flow itself contains exactly the information needed to weight it against other models dynamically during the construction process.
Theoretical and Practical Highlights
- Linear Scalarization (Exactness): The authors provide a theoretical proof that for linear combinations of rewards, their reaching-probability mixing rule exactly recovers the target distribution.
- Nonlinear Operators (High-Quality Approximation): For complex logical operators like conjunction (harmonic mean) and subtraction (contrast), the method is not mathematically exact. However, the authors analyze a "distortion factor" ($\delta$) to demonstrate that the approximation remains highly accurate in the high-reward regions that matter most for discovery.
- Implementation Flexibility: The framework provides two methods for calculating reaching probability: one for models that explicitly learn state flow, and a recursive version for models that only learn policies. This makes the approach compatible with virtually any GFlowNet architecture.
Experimental Validation
The authors evaluated their method across three distinct domains: a synthetic 2D grid (allowing for exact ground-truth error calculations), fragment-based molecule generation, and atom-based molecule generation (QM9).
Key Results: * Exactness in Practice: On the 2D grid, the method achieved an $L_1$ error of just 0.003 for linear scalarization, significantly outperforming preference-conditioned baselines like MOGFN (which scored 0.021–0.048). Furthermore, the error remained stable regardless of the number of objectives added. * Zero-Shot Adaptation: The framework successfully composed models that were never "seen" together during training, matching or exceeding the performance of models specifically trained for those combinations. * Massive Inference Speedup: For logical operations, Routing by Reaching proved 30–65 times faster than classifier-guided methods. It requires only a single forward pass at the current state, whereas classifier guidance requires evaluating every possible next state to calculate a guidance term.
Limitations and Future Directions
While Routing by Reaching offers a massive leap forward in flexibility, it does come with constraints. Querying $k$ separate models for $k$ objectives introduces inference overhead compared to a single, monolithic multi-objective model, though parallelizing these queries could mitigate the slowdown. Additionally, the method assumes all pre-trained models operate on the same underlying state graph (DAG); composing models trained on entirely different action spaces remains an open challenge.
Finally, while the approximation for nonlinear logical operators is highly effective in practice, future work could explore techniques to further minimize the distortion factor, pushing complex nonlinear compositions closer to mathematical exactness.
Summary updated