Calculating Basin Volumes in

high dimensions

VolumeEstimation.jl

BasinVolumes.jl

 

Work done with:
Stefano Martiniani

Praharsh Suryadevara

Why Basin volumes

As a resilience measure

Wiley, D. A., Strogatz, S. H., & Girvan, M. (2006). The size of the sync basin. Chaos: An Interdisciplinary Journal of Nonlinear Science, 16(1).

Menck, P. J., Heitzig, J., Marwan, N., & Kurths, J. (2013). How basin stability complements the linear-stability paradigm. Nature physics, 9(2), 89-92.

\(A\)

\(B\)

\(B\) is more stable

To calculate configurational entropy

Martiniani, S., Schrenk, K. J., Ramola, K., Chakraborty, B., & Frenkel, D. (2017). Numerical test of the Edwards conjecture shows that all packings are equally probable at jamming. Nature physics, 13(9), 848-851.

Casiulis et al. Papers in Physics 15 (2023): 150001-150001.

Basin Volumes

Basin Stability

Soft sphere packings

Wiley, D. A., Strogatz, S. H., & Girvan, M. (2006). The size of the sync basin. Chaos: An Interdisciplinary Journal of Nonlinear Science, 16(1).

Menck, P. J., Heitzig, J., Marwan, N., & Kurths, J. (2013). How basin stability complements the linear-stability paradigm. Nature physics, 9(2), 89-92.

Uses naive sampling.

Xu, N., Frenkel, D., & Liu, A. J. (2011). Direct determination of the size of basins of attraction of jammed solids. Physical Review Letters, 106(24), 245502.

Asenjo, Daniel, Fabien Paillusson, and Daan Frenkel. "Numerical calculation of granular entropy." Physical review letters 112.9 (2014): 098002.

Martiniani, S., Schrenk, K. J., Stevenson, J. D., Wales, D. J., & Frenkel, D. (2016). Structural analysis of high-dimensional basins of attraction. Physical Review E, 94(3), 031301.

Martiniani, S., Schrenk, K. J., Ramola, K., Chakraborty, B., & Frenkel, D. (2017). Numerical test of the Edwards conjecture shows that all packings are equally probable at jamming. Nature physics, 13(9), 848-851.

Uses optimizers.

Why Monte Carlo

Cousins, Ben, and Santosh Vempala. "Gaussian Cooling and O^*(n^3) Algorithms for Volume and Gaussian Volume." SIAM Journal on Computing 47.3 (2018): 1237-1273.

Algorithm for convex objects

$$Z(k) = \int_{\mathbb{R}^N}^{} \mathcal{O}(x)  dx$$

Oracle (1 if inside basin. 0 if outside) defined by ODE solves

Volume

Basin Volume computation

Complexity

Dimension

Kuramoto

Soft spheres

Gradient systems, No limit cycles, easy to identify attractors

Calculating volumes in high dimensions

Casiulis et al. Papers in Physics 15 (2023): 150001-150001.

$$Z(k) = \int_{\mathbb{R}^N}^{} \mathcal{O}(x) e^{- \frac{1}{2} k \left|x-x_{0}\right|^{2}} dx$$

Normalizing constant of probability distribution

Oracle (1 if inside basin. 0 if outside)

Gaussian centered around minimum

$$ F(k) = - log(Z_{k})  $$

"Free energy"

$$  F(0) - F(k_{\infty}) = \int_{0}^{k_{\infty}} \frac{\partial F}{\partial k}  dk  = \int_{k_{\infty}}^{0} \langle  \left| x-x_{0}\right|^{2} \rangle_{k} dk$$

Log volume (unknown)

Gaussian normalizing constant

Sampling basins in high dimensions

Brute force MC misses most of the volume!!

 Reconstruct uniform samples from MC walkers at different distances, which can be used to constuct volumes

Casiulis et al. Papers in Physics 15 (2023): 150001-150001.

Replica exchange

Replica Exchange Monte Carlo

Casiulis et al. Papers in Physics 15 (2023): 150001-150001.

$$\alpha_{\text{swap}} = \min\left(1, \exp\left(-\frac{k}{2}(\beta_k - \beta_l)(|x_l - x^*|^2 - |x_k - x^*|^2)\right)\right)$$

Swap acceptance criterion

Volumes of cubes/cuboids: Test

Volume estimation is the hard part

Volumes of polytopes: Test

$$  \dot{\theta}_j = \sin(\theta_{j+1} - \theta_j) + \sin(\theta_{j-1} - \theta_j)$$

$$\theta_j^* = \frac{2\pi q \, j}{N}, \quad \text{stable for } |q| < N/4$$

$$\log S_B(q) = \log \frac{V(q)}{|\mathbb{T}_n|} \approx C - k q^2$$

Volumes of polytopes: Test

$$  \dot{\theta}_j = \sin(\theta_{j+1} - \theta_j) + \sin(\theta_{j-1} - \theta_j)$$

$$\theta_j^* = \frac{2\pi q \, j}{N}, \quad \text{stable for } |q| < N/4$$

$$\log S_B(q) = \log \frac{V(q)}{|\mathbb{T}_n|} \approx C - k q^2$$

See https://github.com/JuliaDynamics/Attractors.jl/issues/60

Hard to compute numerically

Kuramoto convergence: on single core

Kuramoto convergence: on single core

Interface

using VolumeEstimation, CommonSolve

# Estimate the volume of a 5D unit hypercube (true volume = 1)
membership(x) = all(abs.(x) .<= 0.5)
prob = VolumeProblem(membership, 5)
sol = solve(prob)

sol.log_volume  # ≈ 0.0 (log of 1)
sol.volume      # ≈ 1.0

VolumeEstimation.jl

using BasinVolumes

dim = 2
power = 0.5
offset = 1.0

# Gradient descent on a cosine potential with basins at integer lattice points
function neg_grad(u, p, t)
    S = dim + offset - sum(cos.(2pi .* u))
    -power .* S^(power - 1) .* (2pi) .* sin.(2pi .* u)
end

# Check convergence to the basin at the origin
basin_check(u) = sum(abs2, u) < 1e-6

prob = BasinVolumeProblem(neg_grad, nothing, basin_check, dim; x0=zeros(dim))
sol = solve(prob; n_rounds=8, n_chains=8)

sol.log_volume  # log of the estimated basin volume
sol.volume      # the estimated basin volume

Basinvolumes.jl

What's left/Goals

  1. MPI parallelization, Pigeons is MPI parallelized but none of the code was tested for it. Also C++/Python version for packings uses a queueing system for efficiency
  2. VolumeEstimation.jl needs to interface all algorithms for volume estimation, Vempala et. al needs to be integrated
  3. Testing more systems (Feel free to suggest sysems)

Acknowledgments

Stefano Martiniani

Mathias Casiulis

Martiniani Lab

Copy of JuliaDynamics Talk

By Praharsh Suryadevara

Copy of JuliaDynamics Talk

  • 15