Beyond Squared Error: Exploring Loss Design for Enhanced Training of Generative Flow Networks
<|reference_start|>Beyond Squared Error: Exploring Loss Design for Enhanced Training of Generative Flow Networks: Generative Flow Networks (GFlowNets) are a novel class of generative models designed to sample from unnormalized distributions and have found applications in various important tasks, attracting great research interest in their training algorithms. In general, GFlowNets are trained by fitting the forward flow to the backward flow on sampled training objects. Prior work focused on the choice of training objects, parameterizations, sampling and resampling strategies, and backward policies, aiming to enhance credit assignment, exploration, or exploitation of the training process. However, the choice of regression loss, which can highly influence the exploration and exploitation behavior of the under-training policy, has been overlooked. Due to the lack of theoretical understanding for choosing an appropriate regression loss, most existing algorithms train the flow network by minimizing the squared error of the forward and backward flows in log-space, i.e., using the quadratic regression loss. In this work, we rigorously prove that distinct regression losses correspond to specific divergence measures, enabling us to design and analyze regression losses according to the desired properties of the corresponding divergence measures. Specifically, we examine two key properties: zero-forcing and zero-avoiding, where the former promotes exploitation and higher rewards, and the latter encourages exploration and enhances diversity. Based on our theoretical framework, we propose three novel regression losses, namely, Shifted-Cosh, Linex(1/2), and Linex(1). We evaluate them across three benchmarks: hyper-grid, bit-sequence generation, and molecule generation. Our proposed losses are compatible with most existing training algorithms, and significantly improve the performances of the algorithms concerning convergence speed, sample diversity, and robustness.<|reference_end|>
@article{hu2024beyond,
    title={Beyond Squared Error: Exploring Loss Design for Enhanced Training of
  Generative Flow Networks},
    author={Rui Hu, Yifan Zhang, Zhuoran Li, Longbo Huang},
    journal={arXiv preprint arXiv:2410.02596},
    year={2024},
    archivePrefix={arXiv},
    eprint={2410.02596},
    primaryClass={cs.LG cs.AI}
}