DelayedDifferenceCoupling

experimental.network_dynamics.coupling.DelayedDifferenceCoupling(
    buffer_strategy='roll',
    warn_on_delay_clamp=False,
    history_interpolation=None,
    **kwargs,
)

Diffusive coupling with transmission delays.

Computes coupling based on the difference between delayed incoming states and current local states, implementing:

\[c_i(t) = G \cdot \sum_{j} w_{ij} (x_j(t - \tau_{ij}) - x_i(t))\]

This combines diffusive coupling with delayed transmission, useful for modeling synchronization dynamics with finite propagation speeds.

Parameters

Name Type Description Default
source str or list of str State name(s) to collect from connected nodes (required) required
local str or list of str State name(s) from current node (required for computing differences) required

Attributes

Name Type Description
N_OUTPUT_STATES int Number of output coupling states: 1
DEFAULT_PARAMS Bunch Default parameters: G=1.0 (global coupling strength)

Examples

>>> coupling = DelayedDifferenceCoupling(source='x', local='x', G=1.0)

Methods

Name Description
post Apply coupling strength to summed delayed differences.
pre Compute an elementwise delayed/local difference on aligned messages.

post

experimental.network_dynamics.coupling.DelayedDifferenceCoupling.post(
    summed_inputs,
    local_states,
    params,
)

Apply coupling strength to summed delayed differences.

Args: summed_inputs: Summed differences [n_inputs, n_nodes] local_states: Local states (not used) params: Bunch with G

Returns: Scaled coupling [n_inputs, n_nodes]

pre

experimental.network_dynamics.coupling.DelayedDifferenceCoupling.pre(
    delayed_states,
    local_states,
    params,
)

Compute an elementwise delayed/local difference on aligned messages.

Args: delayed_states: Delayed source states [n_incoming, *M]. local_states: Current target states aligned as [n_local, *M]. params: Coupling parameters (not used in pre)

Returns: State differences [n_output, *M]. M is a dense target/source grid or the prepared sparse edge axis.