cs.LGMar 2, 2026

Learning Shortest Paths with Generative Flow Networks

Authors: Nikita Morozov, Ian Maksimov, Daniil Tiapkin, Sergey Samsonov

Organizations: HSE University · CMAP, CNRS, École polytechnique · LMO, Université Paris-Saclay

Abstract

In this paper, we present a novel learning framework for finding shortest paths in graphs utilizing Generative Flow Networks (GFlowNets). First, we examine theoretical properties of GFlowNets in non-acyclic environments in relation to shortest paths. We prove that, if the total flow is minimized, forward and backward policies traverse the environment graph exclusively along shortest paths between the initial and terminal states. Building on this result, we reduce shortest-path finding in an arbitrary unweighted graph to finding a non-acyclic GFlowNet with minimal total flow, and approximate it in practice by training with flow regularization. We experimentally demonstrate the performance of our method in pathfinding in permutation environments and in solving Rubik's Cubes of various sizes. For the latter problems, our approach shows competitive results with state-of-the-art machine learning approaches designed specifically for this task in terms of the solution length, while requiring smaller search budget at test-time.

Figures & tables

Appendix figures & tables1 asset

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Your GFlowNet Secretly Learns an Optimal Transport Plan

    Jun 4, 2026Ian Maksimov, Nikita Morozov, Denis Belomestny +1Generative Flow NetworksFlow-Based Generative Modeling

  2. Expected flow networks in stochastic environments and two-player zero-sum games

    Oct 4, 2023Marco Jiralerspong, Bilun Sun, Danilo Vucetic +4Game-Playing AgentsZero-Sum Games

  3. Sample Complexity Bounds for Stochastic Shortest Path with a Generative Model

    Apr 17, 2026Jean Tarbouriech, Matteo Pirotta, Michal Valko +1Markov Decision ProcessesPolicy Learning