arXiv:2610.18328cs.DSOct 2026

Manuscript Offprint

arXiv:2610.18328

A Practical Combinatorial Interior Point Method for Minimum-Cost Flow

Emil Schätzle, Simon Meierhans, Rasmus Kyng, Maximilian Probst Gutenberg

Abstract

In a recent breakthrough, Chen, Kyng, Liu, Peng, Probst Gutenberg, and Sachdeva [CKL+25] designed the first almost-linear-time algorithm for minimum-cost flow. Their approach uses an Interior Point Method (IPM) to achieve complexity m1+o(1)log⁡Ulog⁡Cm^{1+o(1)}\log U\log C. However, the m1+o(1)m^{1+o(1)} factor hides intricate recursive data structures, large constants and multiple log factors. In this paper, we give an implementation following the core ideas of their IPM with practical data structures and empirically obtained decision rules. We compare our solver with the cost scaling and network simplex solvers of LEMON on the instance families of the DIMACS Flow Challenge 2.0 core benchmark. Our implementation scales competitively on five of twelve families and better on two. On grid-wide we observe close to linear scaling: m1.04m^{1.04} against m1.48m^{1.48} for LEMON. We read these results as first evidence that the almost-linear-time framework can be relevant in practice, discuss our insights gained during the implementation process, and motivate where future work should focus to bridge the theory-practice gap.

*The research leading to these results has received funding from the starting grant “A New Paradigm for Flow and Cut Algorithms” (no. TMSGI2 218022) and grant no. 200021 204787 of the Swiss National Science Foundation.

1 Introduction

The minimum-cost flow problem and its special case, the maximum flow problem, are among the most foundational problems in combinatorial optimization [AMO93]. Since their origins in the transportation problem [Sch02], they have served as a testbed for a variety of algorithmic paradigms [Sch02]; they are the central primitive in a large number of graph algorithms [LP25; LNPSY21; HHS24; ALPS23; AKL+25]; and they arise directly in applications across transportation and logistics [AMO93], image segmentation [BK04], and machine learning, where computing optimal transport distances reduces to a minimum-cost flow computation [PW09; PC19]. Formally, we consider the following problem.

Definition 1.1 (Minimum-cost flow). Let G=(V,E)G = (V, E) be a directed graph with n=∣V∣n = |V| vertices and m=∣E∣m = |E| edges, let B∈RV×E\mathbf{B} \in \mathbb{R}^{V \times E} denote its vertex-edge incidence matrix, and let u∈Z≥0E\mathbf{u} \in \mathbb{Z}_{\geq 0}^E and c∈ZE\mathbf{c} \in \mathbb{Z}^E be integral edge capacities and costs. Given a demand vector d∈ZV\mathbf{d} \in \mathbb{Z}^V with 1⊤d=0\mathbf{1}^\top \mathbf{d} = 0, the minimum-cost flow problem asks for a flow f\mathbf{f} that achieves

min⁡Bf=dc⊤f(1)\min_{\mathbf{B}\mathbf{f}=\mathbf{d}}\mathbf{c}^{\top}\mathbf{f} \tag{1}

where Bf=d\mathbf{B}\mathbf{f} = \mathbf{d} succinctly encodes that flow f\mathbf{f} routes demand d\mathbf{d} (flow conservation) and 0≤f≤u0 \leq \mathbf{f} \leq \mathbf{u} encodes that the flow does not exceed capacities (capacity constraint).

Throughout, we write U=∥u∥∞U = \|\mathbf{u}\|_{\infty} and C=∥c∥∞C = \|\mathbf{c}\|_{\infty}, and we measure running times in terms of mm, nn, UU and CC. Since the constraint matrix in Definition 1.1 is totally unimodular, the optimum is attained at an integral flow whenever the instance is feasible.

Recent Progress on the Minimum-Cost Flow Problem. Decades of work produced a rich family of algorithms for minimum-cost flow, culminating in weakly polynomial cost scaling methods [GT90] and in strongly polynomial algorithms [Orl93]. By the 1990s several algorithms had been refined to the point of being genuinely implementable and were being run on real instances at scale [BKV98; Löb96]; the 1991 DIMACS Implementation Challenge on network flows both reflected and accelerated this effort [JM93].

Despite this sustained attention, an algorithm that solves the minimum-cost flow problem in provably almost-linear time remained elusive. By the end of the 1990s, the best runtimes remained O~(m3/2)\widetilde{O}(m^{3/2}) for maximum flow [GR98], and O~(mn)\widetilde{O}(mn) for minimum-cost flow [GT90].

The decisive shift came in the early 2000s when Spielman and Teng [ST04] employed methods from convex optimization to solve electric flow problems in near-linear time. Building on this, Daitch and Spielman [DS08] applied Interior Point Methods (IPMs) to minimum-cost flow and obtained a running time of O~(m3/2log⁡2U)\widetilde{O}(m^{3/2} \log^2 U), the first improvement on the problem to come out of the continuous paradigm.

Finally, in 2022, Chen, Kyng, Liu, Peng, Probst Gutenberg, and Sachdeva [CKL+22; CKL+25] achieved the first algorithm to solve minimum-cost flow exactly in m1+o(1)log⁡Ulog⁡Cm^{1+o(1)}\log U\log C time – a major milestone in algorithmic graph theory. Their algorithm combines a new interior point method, based on the work of Karmarkar [Kar84] and Wallacher-Zimmermann [WZ92], with sophisticated graph data structures. The result has reshaped the area, and has since been strengthened and simplified in several directions, including deterministic and more modular variants [CKLMP24; BCK+23; BCK+24].

The Theory-Practice Gap. None of the IPM-based approaches, the centerpiece of algorithmic research since the 2000s, has so far reached practice. In particular, even the almost-linear-time algorithm based on the novel combinatorial IPM has not been implemented, and the practical state of the art relies entirely on insights preceding this new era. The reference point remains the experimental evaluation of Kovács [Kov15], which benchmarks the minimum-cost flow solvers of the LEMON library [DJK11]. Two of them are usually the most efficient: 1) a cost scaling solver, building on and refining the implementation of [Gol97] of the push-relabel cost scaling method of Goldberg and Tarjan [GT90], and 2) a network simplex solver adapted to minimum-cost flow [AMO93]. Network simplex is particularly fast on small networks of up to a few thousand nodes. Cost scaling scales better with instance size and takes over on larger inputs. Nonetheless, on most benchmarks, both solvers exhibit super-linear scaling [Kov15].

There is therefore a substantial gap between the asymptotics of the best algorithms we know and the asymptotics of the algorithms we can run. Closing it is one of the stated motivations for the ongoing DIMACS Flow Challenge 2.0 [DIM26], the first DIMACS challenge devoted to flow problems since [JM93]. There is a concrete obstacle: the mo(1)m^{o(1)} factor in [CKL+25] hides recursively constructed data structures whose depth and constants make a faithful implementation hopeless, so it is not clear if the IPM framework and sophisticated data structures could translate to a practical implementation.

Our Contribution. This paper gives the first practical implementation of the almost-linear-time minimum-cost flow algorithm of [CKL+25][CKL+25]. Our contributions are as follows:

  • We give a practical implementation of the combinatorial IPM of [CKL+25][CKL+25]. In doing so, we overcome obstacles arising from numerical precision by discretizing the IPM implementation. Further, our implementation removes the need for oracle access to the optimal cost.

  • We estimate progress more carefully, which allows us to take larger steps, thereby improving progress-per-step by orders of magnitude. We also introduce rules to drive the IPM more aggressively, making the IPM feasible in practice.

  • We implement a heuristic version of the intricate min-ratio cycle data structure of [CKL+25][CKL+25] that repeatedly extracts progress steps. In particular, we start with a single shortest-path tree. We then iterate over its fundamental cycles to take IPM steps. After processing each of these cycles, we consider swapping the off-tree edge with a tree edge, which ensures good progress of later IPM steps along fundamental cycles in practice.

  • We evaluate our solver against the LEMON cost scaling and network simplex solvers on 12 instance families from [Kov15]. We present the insights generated from our implementation and where future work should continue.

Despite larger constant factors of our solver, the results are already encouraging: our solver exhibits better empirical scaling than both LEMON solvers on instances from vision_rnd and grid_wide. On the latter, we observe polynomial scaling of m1.04m^{1.04} versus LEMON's m1.48m^{1.48}. Given how heavily engineered the LEMON solvers are, and that our implementation is a first attempt, which has not been optimized for constants, we read this as evidence that the almost-linear-time framework has at least some relevance in practice.

References (45)