Artifact of the paper: Efficient Parallel Algorithms for Hypergraph Matching
Authors/Creators
Description
Abstract
We present efficient parallel algorithms for computing maximal matchings in hypergraphs. Our algorithm finds locally maximal edges in the hypergraph and adds them in parallel to the matching. In the CRCW PRAM models our algorithms achieve $O(\log{m})$ time with $O(\kappa \log {m})$ work w.h.p.
where $m$ is the number of hyperedges,
and $\kappa$ is the sum of all vertex degrees. The CREW PRAM model algorithm has a running time of $O((\log{\Delta}+\log{d})\log{m})$ and requires $O((\kappa) \log {m})$ work w.h.p., $\Delta$ being the maximum degree and $d$ the maximum edge size. It can be implemented work-optimal with $O(\kappa)$ work in $O((\log{m}+\log{n})\log{m})$ time.
We prove a~$1/d$-approximation guarantee to the optimal maximum matching for matchings produced by our algorithms.
We evaluate our algorithms experimentally by implementing and running the proposed algorithms on the GPU using CUDA and Kokkos. Our experimental evaluation demonstrates the practical efficiency of our approach on real-world hypergraph instances, yielding a speed up of up to 76 times compared to a single-core CPU algorithm.
Reproducibility
Compilation & Simple Result (76 times performance claim)
We use Bazel (via bazelisk) to compile. The compile.sh and compile_cuda.sh automatically downloads a local version of it from github.
Download the nlpkkt160.mtx.hgr.weighted.hgr instance from this zenodo. Run a one-off experiment by greedy algorithm on a CPU by
./run_instance_greedy.sh nlpkkt160.mtx.hgr.weighted.hgr
The log contains the running time of the algorithm in a algorithm_run_informations (only the running time of the algorithmic step is important)
We expect a result like:...algorithm_run_informations { algo_duration { seconds: 3 nanos: 263994398 }...
Now compare this to the running time by GPU (here a RTX 4090) via the ./run_instance_HLMCUDA.sh script, check the last algorithm_run_informations: ./run_instance_HLMCUDA.sh nlpkkt160.mtx.hgr.weighted.hgr...algorithm_run_informations { algo_duration { nanos: 36250362 }
The running time is calculated by multiplying the seconds by $10^9$ and adding to the nanos.
If we do this for this example we see a speedup of ~90 for this specific instance. This exceeds our claim of 76, because in the category of NLP contains a second graph, and we take the geometric mean to calculate the aggregate.
You will also find information about the computed matching, like size and weight: size: 159426 weight: 12674541
Here for comparison the results from greedy (about 13~\% better) size: 159375 weight: 14380557
Graph Experiments
Unzip the graph_experiment.zip file and use the relative (important to be relative) path to call ./run_graph_experiments.sh: ./run_graph_experiments.sh ../tmp # tmp is a example here
This will automatically execute all experiments on the 25 graphs small enough to fit the storage limit. This should take less than half an hour to compute all experiments.
You should now have three pdfs in ../tmp/experiments/vis. Figure 1-3 below show the expected outcome.
Files
graph_experiment.zip
Additional details
Funding
- Deutsche Forschungsgemeinschaft
- SCHU 2567/8-1
- U.S. National Science Foundation
- 2432018
Software
- Repository URL
- https://github.com/HeiHGM/Parallel
- Programming language
- C++