Abstract
Generative Flow Networks (GFlowNets) have emerged as a powerful framework for training models to sample diverse, high-reward solutions, addressing the "mode collapse" often seen in standard Reinforcement Learning. While successful in-distribution, their ability to generalize to logically similar but unseen tasks remains under-explored. This paper investigates the transferability of GFlowNet-fine-tuned Large Language Models (LLMs) from the "Game of 24" to the "Game of 42." Our results demonstrate a significant generalization gap and extreme sensitivity to decoding hyperparameters, suggesting that GFlowNets may learn task-specific heuristics rather than underlying logical principles.
Introduction
Most Large Language Models (LLMs) are trained to find the single most probable answer, which can stifle creativity and diversity in reasoning. GFlowNets offer a solution by treating sequence generation as a flow network, ensuring that the probability of sampling a solution is proportional to its reward. This study evaluates whether the diverse reasoning capabilities acquired through GFlowNet fine-tuning on a specific arithmetic task (Game of 24) can transfer zero-shot to a related task (Game of 42).
Methodology
We fine-tuned LLaMA models (1B, 3B, and 8B parameters) using the Trajectory Balance objective. The models were trained on the "Game of 24," where the goal is to reach the target value 24 using four numbers and basic operators. We then tested these models on the "Game of 42," a logically identical task with a different target value. Performance was evaluated across various temperatures and decoding strategies, including Top-k, Top-p, and Min-p sampling.
Results and Discussion
In-Distribution Success
GFlowNet fine-tuning significantly enhances performance on the training task. As shown in Table 1, a fine-tuned LLaMA-1B model achieves a Top-10 score of 0.30 at temperature 0.7, nearly tripling the performance of the base LLaMA-1B and even outperforming the base LLaMA-8B model (0.16 at temperature 1.1). This highlights the efficiency of GFlowNets in teaching specialized reasoning.
The Generalization Gap and Hyperparameter Fragility
Despite the logical similarity between the two tasks, the models struggled to transfer their success to the Game of 42. Figure 1 illustrates the performance discrepancy and the extreme sensitivity to decoding settings. Unlike general-purpose instruction-tuned models, GFlowNet performance is highly dependent on temperature, typically peaking at 0.7 and degrading significantly at higher values. While fine-tuning (dashed lines) improves scores over pre-trained baselines (solid lines) for both tasks, the models appear to learn specific patterns for reaching 24 rather than general arithmetic logic.
Conclusion
GFlowNets are highly effective for creating diverse "expert" models for specific domains. However, their current formulation lacks the robust zero-shot transferability seen in broader instruction-tuning paradigms. Future research should explore multi-target GFlowNet training to encourage the learning of more generalized reasoning patterns.
Summary updated