Neuroscience
Brain maps on the folded cortex
Spatial null models compare brain maps through the distance along the cortex between every pair of its points.
2,000×faster than BrainSMASH's distance step: 1.6 hours to 2.6 seconds
MinPlus
Julia · CPUs · NVIDIA GPUs
PATHPACK.jl computes shortest paths, widest paths, reachability and their relatives between all pairs of vertices of a sparse graph, as one sparse factorization. One call, any semiring, on multithreaded CPUs and on one GPU or many.
Try it
Move across Paris. Your browser recomputes one source's distances on every move. PATHPACK.jl answers the whole question, the distance from every junction to every other one, in one call.
Move over the map; click to pin the source. Your browser computes one row of the distance matrix per move, with PATHPACK.jl's triangular solves on its factorization of the street graph, made once ahead of time. PATHPACK.jl computes every row, all 140 million distances, in 0.28 s on 16 CPU cores: 70× faster than igraph and 3.4× faster than graph-tool on the same cores. Streets © OpenStreetMap contributors.
One call, any semiring
The star of a matrix depends on the semiring it is computed in. Switch the semiring and the same landscape answers a different question: the cheapest route, the worst barrier on the way, or where a wandering animal spends its time.
mstar(MinPlus(), land)
From the Ocala National Forest, recomputed live in your browser: ms. Click anywhere on the map to move the source.
98 msfor all 4.5 billion pairs of cells on one NVIDIA B200
Land cover: NLCD 2021 (USGS, public domain), 600 m cells; illustrative resistances for a forest mammal.
Built for real workloads
Many methods need the distance between every pair of points. PATHPACK.jl computes it directly, and measured head to head, same answers, it is faster than the call each field uses today.
Neuroscience
Spatial null models compare brain maps through the distance along the cortex between every pair of its points.
2,000×faster than BrainSMASH's distance step: 1.6 hours to 2.6 seconds
MinPlus
Machine learning
Isomap unrolls data by the shortest paths of its nearest-neighbour graph: every pair of points.
105×faster than scikit-learn's Isomap shortest-path step
MinPlus
Graph neural networks
Personalized PageRank diffusion, as PyTorch Geometric's GDC computes it, is a sum over every walk.
119×faster than PyTorch Geometric's exact diffusion on a 47k-node mesh; 23× on PubMed
PlusProd
Urban planning
Closeness: each street's mean walking distance to all the others, from all 140 million distances of Paris.
70×faster than igraph; 3.4× faster than graph-tool on the same 16 cores
MinPlus
Ecology
Least-cost distances between every pair of habitat cells, and where a wandering animal goes.
15×faster than NetworKit on the same 16 cores, every cell to every cell
MinPlus · MinMax · PlusProd
Geography
Every pair of points on the Amazon river system, by boat, from OpenStreetMap waterways.
9.5 msfor all 12,785 junctions, every pair, on one GPU
MinPlus
Any graph
Proteins through their atomic contacts, surfaces through their meshes. Click the bunny to measure from anywhere on it; below, drag to turn an object and double-click to move the source of its bands.
mstar(MinPlus(), surface)
Distance along the surface from where you click to every other point, with moving contours. Drag to turn it. PATHPACK.jl's factorization of the mesh's 8,146-vertex graph, queried in your browser: … ms.
55.6 msfor every pair of the full 34,834-vertex scan on one NVIDIA B200, 2× faster than ROME and 31× faster than cuGraph
Stanford Bunny, Stanford 3D Scanning Repository. Distances along mesh edges, which run about 7% longer than exact surface distances.
Measured
On one GPU against the GPU state of the art, and on the same CPU cores against the libraries people use.
Wall-clock times from the graph in memory to the full answer in memory, the same answers checked between tools. Scripts and raw measurements are public.
Get started
using PATHPACK
using PATHPACK.CPU: MinPlus, MaxMin, mstar
D = mstar(MinPlus(), A) # shortest paths between all pairs
W = mstar(MaxMin(), A) # widest paths, same callShortest, widest, bottleneck, most reliable, reachability, sums over all walks: one solver.
One sparse factorization, then independent rows: every core busy, no write conflicts.
The CPU factorizes the small parts, the GPU the large ones; the rows split over every GPU you have.
Factorize once, then answer single-source and single-target queries with two triangular solves.