Hostname: page-component-77c78cf97d-lmk9j Total loading time: 0 Render date: 2026-04-23T17:22:40.855Z Has data issue: false hasContentIssue false

Efficiently generating geometric inhomogeneous and hyperbolic random graphs

Published online by Cambridge University Press:  23 November 2022

Thomas Bläsius
Affiliation:
Karlsruhe Institute of Technology, Karlsruhe, Germany
Tobias Friedrich
Affiliation:
Hasso Plattner Institute, Potsdam, Germany
Maximilian Katzmann
Affiliation:
Hasso Plattner Institute, Potsdam, Germany
Ulrich Meyer
Affiliation:
Goethe University, Frankfurt, Germany
Manuel Penschuck
Affiliation:
Goethe University, Frankfurt, Germany
Christopher Weyand*
Affiliation:
Karlsruhe Institute of Technology, Karlsruhe, Germany
*
*Corresponding author. Email: christopher.weyand@kit.edu
Rights & Permissions [Opens in a new window]

Abstract

Hyperbolic random graphs (HRGs) and geometric inhomogeneous random graphs (GIRGs) are two similar generative network models that were designed to resemble complex real-world networks. In particular, they have a power-law degree distribution with controllable exponent $\beta$ and high clustering that can be controlled via the temperature $T$.

We present the first implementation of an efficient GIRG generator running in expected linear time. Besides varying temperatures, it also supports underlying geometries of higher dimensions. It is capable of generating graphs with ten million edges in under a second on commodity hardware. The algorithm can be adapted to HRGs. Our resulting implementation is the fastest sequential HRG generator, despite the fact that we support non-zero temperatures. Though non-zero temperatures are crucial for many applications, most existing generators are restricted to $T = 0$. We also support parallelization, although this is not the focus of this paper. Moreover, we note that our generators draw from the correct probability distribution, that is, they involve no approximation.

Besides the generators themselves, we also provide an efficient algorithm to determine the non-trivial dependency between the average degree of the resulting graph and the input parameters of the GIRG model. This makes it possible to specify the desired expected average degree as input.

Moreover, we investigate the differences between HRGs and GIRGs, shedding new light on the nature of the relation between the two models. Although HRGs represent, in a certain sense, a special case of the GIRG model, we find that a straightforward inclusion does not hold in practice. However, the difference is negligible for most use cases.

Information

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/) which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2022. Published by Cambridge University Press
Figure 0

Table 1. Existing hyperbolic random graph generators. The columns show the names used throughout the paper; the authors and reference (journal if available); whether the generator supports the binomial model; and the asymptotic running time. The time bounds hold in the worst case (wc), with high probability (whp), in expectation (exp), or empirically (emp)

Figure 1

Figure 1. (a, b) The grid used by weight bucket pairs with a connection probability threshold between $2^{-3}$ and $2^{-4}$ in two dimensions. (a) Each pair of colored cells represent neighbors. Note that the ground space is a torus and a cell is also a neighbor to itself. (b) The eight gray cells represent multiple distant cell pairs, which are replaced by one pair consisting of the red outlined parent cell pair. (c) Linearization of the cells on level 1 (left) and 2 (right) for $d = 2$.

Figure 2

Figure 2. Performance of Morton code generation in dimensions 2–5 on an Intel processor. Input coordinates are limited to $\lfloor 32/d\rfloor$ bits each, because the result is saved as a 32 bit integer.

Figure 3

Figure 3. Performance of Morton code generation in dimensions 2–5 on an AMD processor. Input coordinates are limited to $\lfloor 32/d\rfloor$ bits each, because the result is saved as a 32 bit integer.

Figure 4

Figure 4. Distance filter (left) and tasks for parallelization in the $1$-dimensional case (right).

Figure 5

Figure 5. Sequential run time for the steps of the GIRG sampling algorithm averaged over 10 iterations. Each plot varies a different model parameter deviating from a base configuration $d=1$, $n=2^{15}$, $T=0$, $\beta =2.5$, and $\bar d=10$. The base configuration is indicated by a dashed vertical line.

Figure 6

Figure 6. Comparison of HRG generators averaged over five iterations. (a, b) Threshold variant for different average degrees $\bar{d}$ and power-law exponents $\beta$. (c) Binomial variant with temperature $T = 0.5$. (d) The same configuration as (b) but utilizing multiple cores.

Figure 7

Figure 7. Relation between the HRG and the GIRG model. (a) The values for $d_{\mathrm{HRG}}$, $d_{\mathrm{GIRG}}$, $D_{\mathrm{GIRG}}$ averaged over 50 iterations. (b) The number of missing ($\text{HRG}\setminus \text{GIRG}$) and additional ($\text{GIRG} \setminus \text{HRG}$) edges depending on the expected degree of the corresponding GIRG. It can be interpreted as a cross-section of one iteration in (a).