Asynchronous Sheaf Diffusion

CellularSheaves.NetworkSheaves.AsynchSheavesModule

Module for simulating asynchronous cellular sheaf diffusion.

Agents communicate over a sheaf's underlying graph using a gossip-like protocol: each agent maintains a local estimate of the global cochain, periodically applies a gradient descent step on its own component, and periodically broadcasts its local state to neighboring agents.

Scheduling models

Three scheduling models govern when each agent updates and broadcasts:

  • Probabilistic (ProbabilisticModelParams): each agent independently decides to update or broadcast at each iteration with random probabilities.
  • Deterministic (period vectors): each agent i updates every update_periods[i] iterations and broadcasts every broadcast_periods[i] iterations, with a random phase offset.
  • Mixture (MixtureModelParams): periods are sampled from a Gaussian mixture at the start of the simulation and held fixed thereafter.

Key functions

Utilities

source
CellularSheaves.NetworkSheaves.AsynchSheaves.MixtureModelParamsType
MixtureModelParams(dists, weights)

Parameters for a Gaussian mixture distribution over agent periods.

Each agent's update or broadcast period is sampled by:

  1. Selecting component k with probability weights[k].
  2. Drawing from dists[k] (a Normal), rounding up to the nearest integer.
  3. Clamping to [1, B].

Construct with:

using Distributions: Normal
d1 = Normal(5.0, 0.5)
d2 = Normal(50.0, 5.0)
params = MixtureModelParams([d1, d2], [0.5, 0.5])
source
CellularSheaves.NetworkSheaves.AsynchSheaves.ProbabilisticModelParamsType
ProbabilisticModelParams(update_prob_upper_bound, broadcast_prob_upper_bound)

Parameters for coin-flip-based update and broadcast scheduling.

At each iteration, agent i updates with probability pᵢ drawn uniformly from [0, update_prob_upper_bound], and broadcasts with probability qᵢ drawn from [0, broadcast_prob_upper_bound]. These probabilities are sampled once at the start of the simulation.

source
CellularSheaves.NetworkSheaves.AsynchSheaves.compute_trajectoryMethod
compute_trajectory(sheaf, x0, γ; max_iters=1000, tol=1e-8) -> Vector

Run synchronous gradient descent on sheaf_laplacian_matrix(sheaf) from initial cochain x0 with step size γ.

Returns a vector of cochains (one per iteration, including x0). Stops early when energy drops below tol.

source
CellularSheaves.NetworkSheaves.AsynchSheaves.compute_trajectory_asynchMethod
compute_trajectory_asynch(sheaf, x0, γs::AbstractVector{<:Real},
                           update_model, broadcast_model;
                           max_iters=1000, tol=1e-8, B=50) -> Vector{Vector}

Batch asynchronous diffusion over multiple step sizes.

A single schedule (periods and phases) is sampled once and reused across all step sizes in γs. This isolates the effect of the step size from the effect of the schedule.

Returns a vector of trajectories, one per element of γs.

source
CellularSheaves.NetworkSheaves.AsynchSheaves.compute_trajectory_asynchMethod
compute_trajectory_asynch(sheaf, x0, γ,
                           update_periods::Vector{Int},
                           broadcast_periods::Vector{Int};
                           max_iters=1000, tol=1e-8, B=50) -> Vector

Asynchronous sheaf diffusion with deterministic periodic scheduling.

Agent i updates every update_periods[i] iterations and broadcasts every broadcast_periods[i] iterations, starting from a random phase in [0, period-1].

Returns a vector of global cochains (one per iteration).

source
CellularSheaves.NetworkSheaves.AsynchSheaves.compute_trajectory_asynchMethod
compute_trajectory_asynch(sheaf, x0, γ,
                           update_model::MixtureModelParams,
                           broadcast_model::MixtureModelParams;
                           max_iters=1000, tol=1e-8, B=50) -> Vector

Asynchronous sheaf diffusion with mixture-model period scheduling.

Agent periods are sampled once at the start from update_model and broadcast_model (Gaussian mixture distributions), then clamped to [1, B]. Each agent starts at a random phase within its period.

Returns a vector of global cochains (one per iteration).

source
CellularSheaves.NetworkSheaves.AsynchSheaves.compute_trajectory_asynchMethod
compute_trajectory_asynch(sheaf, x0, γ, params::ProbabilisticModelParams;
                           max_iters=1000, tol=1e-8, B=50) -> Vector

Asynchronous sheaf diffusion with coin-flip scheduling.

At the start of the simulation each agent i is assigned update probability pᵢ ∈ [0, params.update_prob_upper_bound] and broadcast probability qᵢ ∈ [0, params.broadcast_prob_upper_bound], drawn uniformly at random. At each iteration, agent i independently flips these coins.

Returns a vector of global cochains (one per iteration).

source
CellularSheaves.NetworkSheaves.AsynchSheaves.compute_trajectory_asynchMethod
compute_trajectory_asynch(sheaf, x0s::Vector{<:AbstractVector}, γ,
                           update_model, broadcast_model;
                           max_iters=1000, tol=1e-8, B=50) -> Vector{Vector}

Batch asynchronous diffusion over multiple initial cochains.

A single schedule (periods and phases) is sampled once and reused across all initial conditions in x0s. This isolates the effect of initialization from the effect of the schedule.

Returns a vector of trajectories, one per element of x0s.

source