Skip to main content
grid

July 14, 2026

MPFlow: Our Lightning Liquidity Research Is Now on arXiv

MPFlow, our deep graph reinforcement learning agent for placing Bitcoin liquidity on the Lightning Network, is now a public preprint on arXiv. Here is what the paper shows and how it already runs in production.

AIResearchLightning
author

Harrison Rush

Machine Learning Engineer

post

Our research on MPFlow is now public. The paper, MPFlow: Learning Budgeted Max-Flow Optimization on the Lightning Network with Deep Graph Reinforcement Learning, is available as a preprint on arXiv. It describes the AI agent Amboss uses to decide where to place Bitcoin liquidity on the Lightning Network, Bitcoin's payment layer that settles transactions in under a second for a fraction of a cent.

The work was done in collaboration with Stillmark, and the agent it describes is already running in production.

The problem: where should liquidity go?

Lightning moves payments through channels, and a channel only routes what its liquidity allows. Place that liquidity in the wrong channels and payments fail or take longer, more expensive paths. The core question for any node is narrow and hard: given a fixed budget, which channels should you open to move the most payment volume?

Most nodes answer it with simple heuristics, such as connecting to whichever node already has the most connections. That concentrates the network around a few hubs and leaves capacity poorly matched to real demand.

What the paper shows

MPFlow treats liquidity placement as a budget-constrained optimization problem on a graph: pick a fixed number of new channels that most increase a node's routing capacity. It measures that capacity with max-flow, a classical result in network theory for the most a network can move between two points.

The agent is deliberately small. It pairs a message-passing graph neural network with proximal policy optimization (PPO) and action masking, so it can run in production rather than only in a lab. During training it uses a hub-exclusion curriculum: the network's largest hubs are hidden from the model, which forces it to learn capacity-aware placement instead of defaulting to "attach to the biggest node."

On real Lightning Network snapshots, MPFlow consistently beats strong heuristic baselines, including degree and betweenness centrality, on the max-flow objective, and it holds that lead across multiple random seeds and network states it never saw in training.

MPFlow overview: Lightning Network liquidity allocation framed as a Markov decision process, where a GNN actor-critic trained with PPO opens channels to maximize the max-flow gain.

From paper to production

MPFlow is not a research demo. According to the paper, the agent has been deployed for peer recommendations and has executed 4,640 channel-open decisions that allocate 267.3 BTC, worth over $16 million, across 30 managed nodes. Those decisions run on live network conditions, not a static snapshot.

Vikash Singh, Principal at Stillmark and a research collaborator on the paper, put the motivation this way:

Payment volumes for the AI economy can't be served by adding a new blockchain. Even centralized blockchains can't handle one payment per Google search. Lightning, as an off-chain protocol, can. Optimizing Lightning is a perfect problem for geometric deep learning, and MPFlow proves that thesis.

The result is a working example of machine learning and self-custody coexisting: better capital efficiency for node operators, with no change to how Lightning stays decentralized.

Few Lightning operators run learned models against live network conditions at this capital scale; most still rely on the degree-centrality heuristics MPFlow outperforms. Publishing the method is another step in keeping Amboss's operation of the Lightning Network among the most sophisticated in the industry. For us, the research and the production system are the same thing.

Read the paper

The preprint is on arXiv: MPFlow: Learning Budgeted Max-Flow Optimization on the Lightning Network, by Harrison Rush, Vincent Davis, Simone Antonelli, Vikash Singh, Jesse Shrader, and Emanuele Rossi.

MPFlow runs inside Rails, the Amboss product for earning Bitcoin yield through Lightning routing while keeping custody of your coins. If you want the research to translate into something you can use, that is where it lives.

For media inquiries, contact 21M Communications.

author

Harrison Rush

Machine Learning Engineer