LinearCoupling

experimental.network_dynamics.coupling.LinearCoupling(
    source=None,
    local=None,
    *,
    incoming_states=None,
    local_states=None,
    **kwargs,
)

Simple linear coupling function.

Standard linear coupling with gain and offset parameters, implementing the transformation:

\[c = G \cdot \sum_{j} w_{ij} x_j + b\]

where \(w_{ij}\) are the graph weights, \(x_j\) are the incoming states, \(G\) is the global coupling strength, and \(b\) is an offset term.

Parameters

Name Type Description Default
source str or list of str State name(s) to collect from connected nodes (required) None
local str or list of str State name(s) from current node (default: []) None

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), b=0.0 (offset/bias)

Examples

>>> # Couple via 'x' state from connected nodes
>>> coupling = LinearCoupling(source='x', G=1.0)
>>>
>>> # With offset
>>> coupling = LinearCoupling(source='x', G=0.5, b=0.1)

Methods

Name Description
post Apply linear transformation to summed inputs.

post

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

Apply linear transformation to summed inputs.

Parameters

Name Type Description Default
summed_inputs jnp.ndarray Summed coupling inputs with shape [n_inputs, n_nodes] required
local_states jnp.ndarray Local states (not used) required
params Bunch Parameters with G (coupling strength) and b (offset) required

Returns

Name Type Description
jnp.ndarray Transformed coupling with shape [n_inputs, n_nodes]